diff --git a/css/985.954a317a.css b/css/932.954a317a.css similarity index 100% rename from css/985.954a317a.css rename to css/932.954a317a.css diff --git a/css/vendor.5147185a.css b/css/vendor.0c92bbad.css similarity index 99% rename from css/vendor.5147185a.css rename to css/vendor.0c92bbad.css index f841bf5..5a402f8 100644 --- a/css/vendor.5147185a.css +++ b/css/vendor.0c92bbad.css @@ -1,6 +1,6 @@ -@charset "UTF-8";@font-face{font-family:Roboto;font-style:normal;font-weight:100;src:url(../fonts/KFOkCnqEu92Fr1MmgVxIIzQ.68bb21d0.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:url(../fonts/KFOlCnqEu92Fr1MmSU5fBBc-.c2f7ab22.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(../fonts/KFOmCnqEu92Fr1Mu4mxM.f1e2a767.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:500;src:url(../fonts/KFOlCnqEu92Fr1MmEU9fBBc-.48af7707.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:url(../fonts/KFOlCnqEu92Fr1MmWUlfBBc-.77ecb942.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:900;src:url(../fonts/KFOlCnqEu92Fr1MmYUtfBBc-.f5677eb2.woff) format("woff")}@font-face{font-display:block;font-family:Material Icons;font-style:normal;font-weight:400;src:url(../fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.c5371cfb.woff2) format("woff2"),url(../fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.4d73cb90.woff) format("woff")}.material-icons{font-feature-settings:"liga";font-family:Material Icons}@font-face{font-display:block;font-family:Material Symbols Sharp;font-style:normal;font-weight:100 700;src:url(../fonts/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWHSSmlN.1553cbe5.woff2) format("woff2"),url(../fonts/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCN.57189e59.woff) format("woff")}.material-icons,.material-symbols-sharp{word-wrap:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;direction:ltr;display:inline-block;font-style:normal;font-weight:400;letter-spacing:normal;line-height:1;text-rendering:optimizeLegibility;text-transform:none;white-space:nowrap}.material-symbols-sharp{font-feature-settings:"liga";font-family:Material Symbols Sharp} +@charset "UTF-8";@font-face{font-family:Roboto;font-style:normal;font-weight:100;src:url(../fonts/KFOkCnqEu92Fr1MmgVxIIzQ.fa21e2c7.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:url(../fonts/KFOlCnqEu92Fr1MmSU5fBBc-.7b05c22e.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(../fonts/KFOmCnqEu92Fr1Mu4mxM.676b7653.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:500;src:url(../fonts/KFOlCnqEu92Fr1MmEU9fBBc-.4dc33a1e.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:url(../fonts/KFOlCnqEu92Fr1MmWUlfBBc-.87f3a1cb.woff) format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:900;src:url(../fonts/KFOlCnqEu92Fr1MmYUtfBBc-.fe849ef5.woff) format("woff")}@font-face{font-display:block;font-family:Material Icons;font-style:normal;font-weight:400;src:url(../fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.c5371cfb.woff2) format("woff2"),url(../fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.4d73cb90.woff) format("woff")}.material-icons{font-feature-settings:"liga";font-family:Material Icons}@font-face{font-display:block;font-family:Material Symbols Sharp;font-style:normal;font-weight:100 700;src:url(../fonts/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWHSSmlN.73994b0a.woff2) format("woff2"),url(../fonts/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCN.f928a497.woff) format("woff")}.material-icons,.material-symbols-sharp{word-wrap:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;direction:ltr;display:inline-block;font-style:normal;font-weight:400;letter-spacing:normal;line-height:1;text-rendering:optimizeLegibility;text-transform:none;white-space:nowrap}.material-symbols-sharp{font-feature-settings:"liga";font-family:Material Symbols Sharp} /*! - * * Quasar Framework v2.17.0 + * * Quasar Framework v2.17.2 * * (c) 2015-present Razvan Stoenescu * * Released under the MIT License. * */.body--light .bg-surface{background-color:#eee!important}.body--light .bg-surface .q-field__control{background-color:#fff!important}.body--dark .q-field--highlighted .q-field__label,.body--dark .q-radio__inner,.body--dark .q-tab--active .q-tab__label{color:#fff!important}.body--dark .ais-Stats-text{color:#fffc!important}*,:after,:before{-webkit-tap-highlight-color:transparent;-moz-tap-highlight-color:#0000;box-sizing:inherit}#q-app,body,html{direction:ltr;width:100%}body.platform-ios.within-iframe,body.platform-ios.within-iframe #q-app{min-width:100%;width:100px}body,html{box-sizing:border-box;margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}img{border-style:none}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:initial;height:0;overflow:visible}button,input,optgroup,select,textarea{font:inherit;font-family:inherit;margin:0}optgroup{font-weight:700}button,input,select{overflow:visible;text-transform:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button:-moz-focusring,input:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:initial}textarea{overflow:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.q-icon{word-wrap:normal;fill:currentColor;box-sizing:initial;direction:ltr;flex-shrink:0;height:1em;letter-spacing:normal;line-height:1;position:relative;text-align:center;text-transform:none;white-space:nowrap;width:1em}.q-icon:after,.q-icon:before{align-items:center;display:flex!important;height:100%;justify-content:center;width:100%}.q-icon>img,.q-icon>svg{height:100%;width:100%}.q-icon>div{box-sizing:border-box}.material-icons,.material-icons-outlined,.material-icons-round,.material-icons-sharp,.material-symbols-outlined,.material-symbols-rounded,.material-symbols-sharp,.q-icon{align-items:center;cursor:inherit;display:inline-flex;font-size:inherit;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle}.q-panel,.q-panel>div{height:100%;width:100%}.q-panel-parent{overflow:hidden;position:relative}.q-loading-bar{background:#f44336;position:fixed;transition:transform .5s cubic-bezier(0,0,.2,1),opacity .5s;z-index:9998}.q-loading-bar--top{left:0;right:0;top:0;width:100%}.q-loading-bar--bottom{bottom:0;left:0;right:0;width:100%}.q-loading-bar--right{bottom:0;height:100%;right:0;top:0}.q-loading-bar--left{bottom:0;height:100%;left:0;top:0}.q-avatar{border-radius:50%;display:inline-block;font-size:48px;height:1em;position:relative;vertical-align:middle;width:1em}.q-avatar__content{font-size:.5em;line-height:.5em}.q-avatar img:not(.q-icon):not(.q-img__image),.q-avatar__content{border-radius:inherit;height:inherit;width:inherit}.q-avatar--square{border-radius:0}.q-badge{background-color:var(--q-primary);border-radius:4px;color:#fff;font-size:12px;font-weight:400;line-height:1;min-height:12px;padding:2px 6px;vertical-align:initial}.q-badge--single-line{white-space:nowrap}.q-badge--multi-line{word-wrap:break-word;word-break:break-all}.q-badge--floating{cursor:inherit;position:absolute;right:-3px;top:-4px}.q-badge--transparent{opacity:.8}.q-badge--outline{background-color:initial;border:1px solid}.q-badge--rounded{border-radius:1em}.q-banner{background:#fff;min-height:54px;padding:8px 16px}.q-banner--top-padding{padding-top:14px}.q-banner__avatar{min-width:1px!important}.q-banner__avatar>.q-avatar{font-size:46px}.q-banner__avatar>.q-icon{font-size:40px}.q-banner__actions.col-auto,.q-banner__avatar:not(:empty)+.q-banner__content{padding-left:16px}.q-banner__actions.col-all .q-btn-item{margin:4px 0 0 4px}.q-banner--dense{min-height:32px;padding:8px}.q-banner--dense.q-banner--top-padding{padding-top:12px}.q-banner--dense .q-banner__avatar>.q-avatar,.q-banner--dense .q-banner__avatar>.q-icon{font-size:28px}.q-banner--dense .q-banner__actions.col-auto,.q-banner--dense .q-banner__avatar:not(:empty)+.q-banner__content{padding-left:8px}.q-bar{background:#0003}.q-bar>.q-icon{margin-left:2px}.q-bar>div,.q-bar>div+.q-icon{margin-left:8px}.q-bar>.q-btn{margin-left:2px}.q-bar>.q-btn:first-child,.q-bar>.q-icon:first-child,.q-bar>div:first-child{margin-left:0}.q-bar--standard{font-size:18px;height:32px;padding:0 12px}.q-bar--standard>div{font-size:16px}.q-bar--standard .q-btn{font-size:11px}.q-bar--dense{font-size:14px;height:24px;padding:0 8px}.q-bar--dense .q-btn{font-size:8px}.q-bar--dark{background:#ffffff26}.q-breadcrumbs__el{color:inherit}.q-breadcrumbs__el-icon{font-size:125%}.q-breadcrumbs__el-icon--with-label{margin-right:8px}[dir=rtl] .q-breadcrumbs__separator .q-icon{transform:scaleX(-1)}.q-btn{align-items:stretch;background:#0000;border:0;color:inherit;cursor:default;display:inline-flex;flex-direction:column;font-size:14px;font-weight:500;height:auto;line-height:1.715em;min-height:2.572em;outline:0;padding:4px 16px;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;vertical-align:middle;width:auto}.q-btn .q-icon,.q-btn .q-spinner{font-size:1.715em}.q-btn.disabled{opacity:.7!important}.q-btn:before{border-radius:inherit;bottom:0;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;content:"";display:block;left:0;position:absolute;right:0;top:0}.q-btn--actionable{cursor:pointer}.q-btn--actionable.q-btn--standard:before{transition:box-shadow .3s cubic-bezier(.25,.8,.5,1)}.q-btn--actionable.q-btn--standard.q-btn--active:before,.q-btn--actionable.q-btn--standard:active:before{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.q-btn--no-uppercase{text-transform:none}.q-btn--rectangle{border-radius:3px}.q-btn--outline{background:#0000!important}.q-btn--outline:before{border:1px solid}.q-btn--push{border-radius:7px}.q-btn--push:before{border-bottom:3px solid #00000026}.q-btn--push.q-btn--actionable{transition:transform .3s cubic-bezier(.25,.8,.5,1)}.q-btn--push.q-btn--actionable:before{transition:border-width .3s cubic-bezier(.25,.8,.5,1)}.q-btn--push.q-btn--actionable.q-btn--active,.q-btn--push.q-btn--actionable:active{transform:translateY(2px)}.q-btn--push.q-btn--actionable.q-btn--active:before,.q-btn--push.q-btn--actionable:active:before{border-bottom-width:0}.q-btn--rounded{border-radius:28px}.q-btn--round{border-radius:50%;min-height:3em;min-width:3em;padding:0}.q-btn--square{border-radius:0}.q-btn--flat:before,.q-btn--outline:before,.q-btn--unelevated:before{box-shadow:none}.q-btn--dense{min-height:2em;padding:.285em}.q-btn--dense.q-btn--round{min-height:2.4em;min-width:2.4em;padding:0}.q-btn--dense .on-left{margin-right:6px}.q-btn--dense .on-right{margin-left:6px}.q-btn--fab .q-icon,.q-btn--fab-mini .q-icon{font-size:24px}.q-btn--fab{min-height:56px;min-width:56px;padding:16px}.q-btn--fab .q-icon{margin:auto}.q-btn--fab-mini{min-height:40px;min-width:40px;padding:8px}.q-btn__content{transition:opacity .3s;z-index:0}.q-btn__content--hidden{opacity:0;pointer-events:none}.q-btn__progress{border-radius:inherit;z-index:0}.q-btn__progress-indicator{background:#ffffff40;transform:translateX(-100%);z-index:-1}.q-btn__progress--dark .q-btn__progress-indicator{background:#0003}.q-btn--flat .q-btn__progress-indicator,.q-btn--outline .q-btn__progress-indicator{background:currentColor;opacity:.2}.q-btn-dropdown--split .q-btn-dropdown__arrow-container{padding:0 4px}.q-btn-dropdown--split .q-btn-dropdown__arrow-container.q-btn--outline{border-left:1px solid}.q-btn-dropdown--split .q-btn-dropdown__arrow-container:not(.q-btn--outline){border-left:1px solid #ffffff4d}.q-btn-dropdown--simple *+.q-btn-dropdown__arrow{margin-left:8px}.q-btn-dropdown__arrow{transition:transform .28s}.q-btn-dropdown--current{flex-grow:1}.q-btn-group{border-radius:3px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;vertical-align:middle}.q-btn-group>.q-btn-item{align-self:stretch;border-radius:inherit}.q-btn-group>.q-btn-item:before{box-shadow:none}.q-btn-group>.q-btn-item .q-badge--floating{right:0}.q-btn-group>.q-btn-group{box-shadow:none}.q-btn-group>.q-btn-group:first-child>.q-btn:first-child{border-bottom-left-radius:inherit;border-top-left-radius:inherit}.q-btn-group>.q-btn-group:last-child>.q-btn:last-child{border-bottom-right-radius:inherit;border-top-right-radius:inherit}.q-btn-group>.q-btn-group:not(:first-child)>.q-btn:first-child:before{border-left:0}.q-btn-group>.q-btn-group:not(:last-child)>.q-btn:last-child:before{border-right:0}.q-btn-group>.q-btn-item:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.q-btn-group>.q-btn-item:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.q-btn-group>.q-btn-item.q-btn--standard:before{z-index:-1}.q-btn-group--push{border-radius:7px}.q-btn-group--push>.q-btn--push.q-btn--actionable{transform:none}.q-btn-group--push>.q-btn--push.q-btn--actionable .q-btn__content{transition:margin-top .3s cubic-bezier(.25,.8,.5,1),margin-bottom .3s cubic-bezier(.25,.8,.5,1)}.q-btn-group--push>.q-btn--push.q-btn--actionable.q-btn--active .q-btn__content,.q-btn-group--push>.q-btn--push.q-btn--actionable:active .q-btn__content{margin-bottom:-2px;margin-top:2px}.q-btn-group--rounded{border-radius:28px}.q-btn-group--square{border-radius:0}.q-btn-group--flat,.q-btn-group--outline,.q-btn-group--unelevated{box-shadow:none}.q-btn-group--outline>.q-separator{display:none}.q-btn-group--outline>.q-btn-item+.q-btn-item:before{border-left:0}.q-btn-group--outline>.q-btn-item:not(:last-child):before{border-right:0}.q-btn-group--stretch{align-self:stretch;border-radius:0}.q-btn-group--glossy>.q-btn-item{background-image:linear-gradient(180deg,#ffffff4d,#fff0 50%,#0000001f 51%,#0000000a)!important}.q-btn-group--spread>.q-btn-group{display:flex!important}.q-btn-group--spread>.q-btn-group>.q-btn-item:not(.q-btn-dropdown__arrow-container),.q-btn-group--spread>.q-btn-item{flex:10000 1 0%;max-width:100%;min-width:0;width:auto}.q-btn-toggle,.q-card{position:relative}.q-card{background:#fff;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;vertical-align:top}.q-card>div:not(.q--avoid-card-border),.q-card>img:not(.q--avoid-card-border){border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:0}.q-card>div:nth-child(1 of :not(.q--avoid-card-border)),.q-card>img:nth-child(1 of :not(.q--avoid-card-border)){border-top:0;border-top-left-radius:inherit;border-top-right-radius:inherit}.q-card>div:nth-last-child(1 of :not(.q--avoid-card-border)),.q-card>img:nth-last-child(1 of :not(.q--avoid-card-border)){border-bottom:0;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.q-card>div:not(.q--avoid-card-border){border-left:0;border-right:0;box-shadow:none}.q-card--bordered{border:1px solid #0000001f}.q-card--dark{border-color:#ffffff47;box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-card__section{position:relative}.q-card__section--vert{padding:16px}.q-card__section--horiz>div:not(.q--avoid-card-border),.q-card__section--horiz>img:not(.q--avoid-card-border){border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:0}.q-card__section--horiz>div:nth-child(1 of :not(.q--avoid-card-border)),.q-card__section--horiz>img:nth-child(1 of :not(.q--avoid-card-border)){border-bottom-left-radius:inherit;border-top-left-radius:inherit}.q-card__section--horiz>div:nth-last-child(1 of :not(.q--avoid-card-border)),.q-card__section--horiz>img:nth-last-child(1 of :not(.q--avoid-card-border)){border-bottom-right-radius:inherit;border-top-right-radius:inherit}.q-card__section--horiz>div:not(.q--avoid-card-border){border-bottom:0;border-top:0;box-shadow:none}.q-card__actions{align-items:center;padding:8px}.q-card__actions .q-btn--rectangle{padding:0 8px}.q-card__actions--horiz>.q-btn-group+.q-btn-item,.q-card__actions--horiz>.q-btn-item+.q-btn-group,.q-card__actions--horiz>.q-btn-item+.q-btn-item{margin-left:8px}.q-card__actions--vert>.q-btn-item.q-btn--round{align-self:center}.q-card__actions--vert>.q-btn-group+.q-btn-item,.q-card__actions--vert>.q-btn-item+.q-btn-group,.q-card__actions--vert>.q-btn-item+.q-btn-item{margin-top:4px}.q-card__actions--vert>.q-btn-group>.q-btn-item{flex-grow:1}.q-card>img{border:0;display:block;max-width:100%;width:100%}.q-carousel{background-color:#fff;height:400px}.q-carousel__slide{background-position:50%;background-size:cover;min-height:100%}.q-carousel .q-carousel--padding,.q-carousel__slide{padding:16px}.q-carousel__slides-container{height:100%}.q-carousel__control{color:#fff}.q-carousel__arrow{pointer-events:none}.q-carousel__arrow .q-icon{font-size:28px}.q-carousel__arrow .q-btn{pointer-events:all}.q-carousel__next-arrow--horizontal,.q-carousel__prev-arrow--horizontal{bottom:16px;top:16px}.q-carousel__prev-arrow--horizontal{left:16px}.q-carousel__next-arrow--horizontal{right:16px}.q-carousel__next-arrow--vertical,.q-carousel__prev-arrow--vertical{left:16px;right:16px}.q-carousel__prev-arrow--vertical{top:16px}.q-carousel__next-arrow--vertical{bottom:16px}.q-carousel__navigation--bottom,.q-carousel__navigation--top{left:16px;overflow-x:auto;overflow-y:hidden;right:16px}.q-carousel__navigation--top{top:16px}.q-carousel__navigation--bottom{bottom:16px}.q-carousel__navigation--left,.q-carousel__navigation--right{bottom:16px;overflow-x:hidden;overflow-y:auto;top:16px}.q-carousel__navigation--left>.q-carousel__navigation-inner,.q-carousel__navigation--right>.q-carousel__navigation-inner{flex-direction:column}.q-carousel__navigation--left{left:16px}.q-carousel__navigation--right{right:16px}.q-carousel__navigation-inner{flex:1 1 auto}.q-carousel__navigation .q-btn{margin:6px 4px;padding:5px}.q-carousel__navigation-icon--inactive{opacity:.7}.q-carousel .q-carousel__thumbnail{border:1px solid #0000;border-radius:4px;cursor:pointer;display:inline-block;height:50px;margin:2px;opacity:.7;transition:opacity .3s;vertical-align:middle;width:auto}.q-carousel .q-carousel__thumbnail--active,.q-carousel .q-carousel__thumbnail:hover{opacity:1}.q-carousel .q-carousel__thumbnail--active{border-color:currentColor;cursor:default}.q-carousel--arrows-vertical .q-carousel--padding,.q-carousel--arrows-vertical.q-carousel--with-padding .q-carousel__slide,.q-carousel--navigation-top .q-carousel--padding,.q-carousel--navigation-top.q-carousel--with-padding .q-carousel__slide{padding-top:60px}.q-carousel--arrows-vertical .q-carousel--padding,.q-carousel--arrows-vertical.q-carousel--with-padding .q-carousel__slide,.q-carousel--navigation-bottom .q-carousel--padding,.q-carousel--navigation-bottom.q-carousel--with-padding .q-carousel__slide{padding-bottom:60px}.q-carousel--arrows-horizontal .q-carousel--padding,.q-carousel--arrows-horizontal.q-carousel--with-padding .q-carousel__slide,.q-carousel--navigation-left .q-carousel--padding,.q-carousel--navigation-left.q-carousel--with-padding .q-carousel__slide{padding-left:60px}.q-carousel--arrows-horizontal .q-carousel--padding,.q-carousel--arrows-horizontal.q-carousel--with-padding .q-carousel__slide,.q-carousel--navigation-right .q-carousel--padding,.q-carousel--navigation-right.q-carousel--with-padding .q-carousel__slide{padding-right:60px}.q-carousel.fullscreen{height:100%}.q-message-name{font-size:small}.q-message-label{font-size:small;margin:24px 0;text-align:center}.q-message-stamp{color:inherit;display:none;font-size:small;margin-top:4px;opacity:.6}.q-message-avatar{border-radius:50%;height:48px;min-width:48px;width:48px}.q-message{margin-bottom:8px}.q-message:first-child .q-message-label{margin-top:0}.q-message-avatar--received{margin-right:8px}.q-message-text--received{border-radius:4px 4px 4px 0;color:#81c784}.q-message-text--received:last-child:before{border-bottom:8px solid;border-left:8px solid #0000;border-right:0 solid #0000;right:100%}.q-message-text-content--received{color:#000}.q-message-name--sent{text-align:right}.q-message-avatar--sent{margin-left:8px}.q-message-container--sent{flex-direction:row-reverse}.q-message-text--sent{border-radius:4px 4px 0 4px;color:#e0e0e0}.q-message-text--sent:last-child:before{border-bottom:8px solid;border-left:0 solid #0000;border-right:8px solid #0000;left:100%}.q-message-text-content--sent{color:#000}.q-message-text{background:currentColor;line-height:1.2;padding:8px;position:relative;word-break:break-word}.q-message-text+.q-message-text{margin-top:3px}.q-message-text:last-child{min-height:48px}.q-message-text:last-child .q-message-stamp{display:block}.q-message-text:last-child:before{bottom:0;content:"";height:0;position:absolute;width:0}.q-checkbox{vertical-align:middle}.q-checkbox__native{height:1px;width:1px}.q-checkbox__bg,.q-checkbox__icon-container{-webkit-user-select:none;user-select:none}.q-checkbox__bg{border:2px solid;border-radius:2px;height:50%;left:25%;-webkit-print-color-adjust:exact;top:25%;transition:background .22s cubic-bezier(0,0,.2,1) 0ms;width:50%}.q-checkbox__icon{color:currentColor;font-size:.5em}.q-checkbox__svg{color:#fff}.q-checkbox__truthy{stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.78334;stroke-dasharray:29.78334}.q-checkbox__indet{fill:currentColor;transform:rotate(-280deg) scale(0);transform-origin:50% 50%}.q-checkbox__inner{border-radius:50%;color:#0000008a;font-size:40px;height:1em;min-width:1em;outline:0;width:1em}.q-checkbox__inner--indet,.q-checkbox__inner--truthy{color:var(--q-primary)}.q-checkbox__inner--indet .q-checkbox__bg,.q-checkbox__inner--truthy .q-checkbox__bg{background:currentColor}.q-checkbox__inner--truthy path{stroke-dashoffset:0;transition:stroke-dashoffset .18s cubic-bezier(.4,0,.6,1) 0ms}.q-checkbox__inner--indet .q-checkbox__indet{transform:rotate(0) scale(1);transition:transform .22s cubic-bezier(0,0,.2,1) 0ms}.q-checkbox.disabled{opacity:.75!important}.q-checkbox--dark .q-checkbox__inner{color:#ffffffb3}.q-checkbox--dark .q-checkbox__inner:before{opacity:.32!important}.q-checkbox--dark .q-checkbox__inner--indet,.q-checkbox--dark .q-checkbox__inner--truthy{color:var(--q-primary)}.q-checkbox--dense .q-checkbox__inner{height:.5em;min-width:.5em;width:.5em}.q-checkbox--dense .q-checkbox__bg{height:90%;left:5%;top:5%;width:90%}.q-checkbox--dense .q-checkbox__label{padding-left:.5em}.q-checkbox--dense.reverse .q-checkbox__label{padding-left:0;padding-right:.5em}body.desktop .q-checkbox:not(.disabled) .q-checkbox__inner:before{background:currentColor;border-radius:50%;bottom:0;content:"";left:0;opacity:.12;position:absolute;right:0;top:0;transform:scale3d(0,0,1);transition:transform .22s cubic-bezier(0,0,.2,1)}body.desktop .q-checkbox:not(.disabled):focus .q-checkbox__inner:before,body.desktop .q-checkbox:not(.disabled):hover .q-checkbox__inner:before{transform:scaleX(1)}body.desktop .q-checkbox--dense:not(.disabled):focus .q-checkbox__inner:before,body.desktop .q-checkbox--dense:not(.disabled):hover .q-checkbox__inner:before{transform:scale3d(1.4,1.4,1)}.q-chip{background:#e0e0e0;border-radius:16px;color:#000000de;font-size:14px;height:2em;margin:4px;max-width:100%;outline:0;padding:.5em .9em;position:relative;vertical-align:middle}.q-chip--colored .q-chip__icon,.q-chip--dark .q-chip__icon{color:inherit}.q-chip--outline{background:#0000!important;border:1px solid}.q-chip .q-avatar{border-radius:16px;font-size:2em;margin-left:-.45em;margin-right:.2em}.q-chip--selected .q-avatar{display:none}.q-chip__icon{color:#0000008a;font-size:1.5em;margin:-.2em}.q-chip__icon--left{margin-right:.2em}.q-chip__icon--right{margin-left:.2em}.q-chip__icon--remove{margin-left:.1em;margin-right:-.5em;opacity:.6;outline:0}.q-chip__icon--remove:focus,.q-chip__icon--remove:hover{opacity:1}.q-chip__content{white-space:nowrap}.q-chip--dense{border-radius:12px;height:1.5em;padding:0 .4em}.q-chip--dense .q-avatar{border-radius:12px;font-size:1.5em;margin-left:-.27em;margin-right:.1em}.q-chip--dense .q-chip__icon{font-size:1.25em}.q-chip--dense .q-chip__icon--left{margin-right:.195em}.q-chip--dense .q-chip__icon--remove{margin-right:-.25em}.q-chip--square{border-radius:4px}.q-chip--square .q-avatar{border-radius:3px 0 0 3px}body.desktop .q-chip--clickable:focus{box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f}body.desktop.body--dark .q-chip--clickable:focus{box-shadow:0 1px 3px #fff3,0 1px 1px #ffffff24,0 2px 1px -1px #ffffff1f}.q-circular-progress{display:inline-block;height:1em;line-height:1;position:relative;vertical-align:middle;width:1em}.q-circular-progress.q-focusable{border-radius:50%}.q-circular-progress__svg{height:100%;width:100%}.q-circular-progress__text{font-size:.25em}.q-circular-progress--indeterminate .q-circular-progress__svg{animation:q-spin 2s linear infinite;transform-origin:50% 50%}.q-circular-progress--indeterminate .q-circular-progress__circle{stroke-dasharray:1 400;stroke-dashoffset:0;animation:q-circular-progress-circle 1.5s ease-in-out infinite}@keyframes q-circular-progress-circle{0%{stroke-dasharray:1,400;stroke-dashoffset:0}50%{stroke-dasharray:400,400;stroke-dashoffset:-100}to{stroke-dasharray:400,400;stroke-dashoffset:-300}}.q-color-picker{background:#fff;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;max-width:350px;min-width:180px;overflow:hidden;vertical-align:top}.q-color-picker .q-tab{padding:0!important}.q-color-picker--bordered{border:1px solid #0000001f}.q-color-picker__header-tabs{height:32px}.q-color-picker__header input{border:0;line-height:24px}.q-color-picker__header .q-tab{height:32px!important;min-height:32px!important}.q-color-picker__header .q-tab--inactive{background:linear-gradient(0deg,#0000004d 0,#00000026 25%,#0000001a)}.q-color-picker__error-icon{bottom:2px;font-size:24px;opacity:0;right:2px;transition:opacity .3s ease-in}.q-color-picker__header-content{background:#fff;position:relative}.q-color-picker__header-content--light{color:#000}.q-color-picker__header-content--dark{color:#fff}.q-color-picker__header-content--dark .q-tab--inactive:before{background:#fff3;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.q-color-picker__header-banner{height:36px}.q-color-picker__header-bg{background:#fff;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==")!important}.q-color-picker__footer{height:36px}.q-color-picker__footer .q-tab{height:36px!important;min-height:36px!important}.q-color-picker__footer .q-tab--inactive{background:linear-gradient(180deg,#0000004d 0,#00000026 25%,#0000001a)}.q-color-picker__spectrum{height:100%;width:100%}.q-color-picker__spectrum-tab{padding:0!important}.q-color-picker__spectrum-white{background:linear-gradient(90deg,#fff,#fff0)}.q-color-picker__spectrum-black{background:linear-gradient(0deg,#000,#0000)}.q-color-picker__spectrum-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006;height:10px;transform:translate(-5px,-5px);width:10px}.q-color-picker__hue .q-slider__track{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)!important;opacity:1}.q-color-picker__alpha .q-slider__track-container{padding-top:0}.q-color-picker__alpha .q-slider__track:before{background:linear-gradient(90deg,#fff0,#757575);border-radius:inherit;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.q-color-picker__sliders{padding:0 16px}.q-color-picker__sliders .q-slider__thumb{color:#424242}.q-color-picker__sliders .q-slider__thumb path{stroke-width:2px;fill:#0000}.q-color-picker__sliders .q-slider--active path{stroke-width:3px}.q-color-picker__tune-tab .q-slider{margin-left:18px;margin-right:18px}.q-color-picker__tune-tab input{border:1px solid #e0e0e0;border-radius:4px;font-size:11px;width:3.5em}.q-color-picker__palette-tab{padding:0!important}.q-color-picker__palette-rows--editable .q-color-picker__cube{cursor:pointer}.q-color-picker__cube{padding-bottom:10%;width:10%!important}.q-color-picker input{background:#0000;color:inherit;outline:0;text-align:center}.q-color-picker .q-tabs{overflow:hidden}.q-color-picker .q-tab--active{box-shadow:0 0 14px 3px #0003}.q-color-picker .q-tab--active .q-focus-helper,.q-color-picker .q-tab__indicator{display:none}.q-color-picker .q-tab-panels{background:inherit}.q-color-picker--dark{box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-color-picker--dark .q-color-picker__tune-tab input{border:1px solid #ffffff4d}.q-color-picker--dark .q-slider__thumb{color:#fafafa}.q-date{background:#fff;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;display:inline-flex;max-width:100%;min-width:290px;width:290px}.q-date--bordered{border:1px solid #0000001f}.q-date__header{background-color:var(--q-primary);border-top-left-radius:inherit;color:#fff;padding:16px}.q-date__actions{padding:0 16px 16px}.q-date__content,.q-date__main{outline:0}.q-date__content .q-btn{font-weight:400}.q-date__header-link{opacity:.64;outline:0;transition:opacity .3s ease-out}.q-date__header-link--active,.q-date__header-link:focus,.q-date__header-link:hover{opacity:1}.q-date__header-subtitle{font-size:14px;letter-spacing:.00938em;line-height:1.75}.q-date__header-title-label{font-size:24px;letter-spacing:.00735em;line-height:1.2}.q-date__view{height:100%;min-height:290px;padding:16px;width:100%}.q-date__navigation{height:12.5%}.q-date__navigation>div:first-child{justify-content:flex-end;min-width:24px;width:8%}.q-date__navigation>div:last-child{justify-content:flex-start;min-width:24px;width:8%}.q-date__calendar-weekdays{height:12.5%}.q-date__calendar-weekdays>div{font-size:12px;opacity:.38}.q-date__calendar-item{align-items:center;display:inline-flex;height:12.5%!important;justify-content:center;padding:1px;position:relative;vertical-align:middle;width:14.285%!important}.q-date__calendar-item:after{border:1px dashed #0000;bottom:1px;content:"";left:0;pointer-events:none;position:absolute;right:0;top:1px}.q-date__calendar-item button,.q-date__calendar-item>div{border-radius:50%;height:30px;width:30px}.q-date__calendar-item>div{line-height:30px;text-align:center}.q-date__calendar-item>button{line-height:22px}.q-date__calendar-item--out{opacity:.18}.q-date__calendar-item--fill{visibility:hidden}.q-date__range-from:before,.q-date__range-to:before,.q-date__range:before{background-color:currentColor;bottom:1px;content:"";left:0;opacity:.3;position:absolute;right:0;top:1px}.q-date__range-from:nth-child(7n-6):before,.q-date__range-to:nth-child(7n-6):before,.q-date__range:nth-child(7n-6):before{border-bottom-left-radius:0;border-top-left-radius:0}.q-date__range-from:nth-child(7n):before,.q-date__range-to:nth-child(7n):before,.q-date__range:nth-child(7n):before{border-bottom-right-radius:0;border-top-right-radius:0}.q-date__range-from:before{left:50%}.q-date__range-to:before{right:50%}.q-date__edit-range:after{border-color:currentColor #0000}.q-date__edit-range:nth-child(7n-6):after{border-bottom-left-radius:0;border-top-left-radius:0}.q-date__edit-range:nth-child(7n):after{border-bottom-right-radius:0;border-top-right-radius:0}.q-date__edit-range-from-to:after,.q-date__edit-range-from:after{border-bottom-color:initial;border-bottom-left-radius:28px;border-left-color:initial;border-top-color:initial;border-top-left-radius:28px;left:4px}.q-date__edit-range-from-to:after,.q-date__edit-range-to:after{border-bottom-color:initial;border-bottom-right-radius:28px;border-right-color:initial;border-top-color:initial;border-top-right-radius:28px;right:4px}.q-date__calendar-days-container{height:75%;min-height:192px}.q-date__calendar-days>div{height:16.66%!important}.q-date__event{background-color:var(--q-secondary);border-radius:5px;bottom:2px;height:5px;left:50%;position:absolute;transform:translate3d(-50%,0,0);width:8px}.q-date__today{box-shadow:0 0 1px 0 currentColor}.q-date__years-content{padding:0 8px}.q-date__months-item,.q-date__years-item{flex:0 0 33.3333%}.q-date--readonly .q-date__content,.q-date--readonly .q-date__header,.q-date.disabled .q-date__content,.q-date.disabled .q-date__header{pointer-events:none}.q-date--readonly .q-date__navigation{display:none}.q-date--portrait{flex-direction:column}.q-date--portrait-standard .q-date__content{height:calc(100% - 86px)}.q-date--portrait-standard .q-date__header{border-top-right-radius:inherit;height:86px}.q-date--portrait-standard .q-date__header-title{align-items:center;height:30px}.q-date--portrait-minimal .q-date__content{height:100%}.q-date--landscape{align-items:stretch;flex-direction:row;min-width:420px}.q-date--landscape>div{display:flex;flex-direction:column}.q-date--landscape .q-date__content{height:100%}.q-date--landscape-standard{min-width:420px}.q-date--landscape-standard .q-date__header{border-bottom-left-radius:inherit;min-width:110px;width:110px}.q-date--landscape-standard .q-date__header-title{flex-direction:column}.q-date--landscape-standard .q-date__header-today{margin-left:-8px;margin-top:12px}.q-date--landscape-minimal{width:310px}.q-date--dark{border-color:#ffffff47;box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-dialog__title{font-size:1.25rem;font-weight:500;letter-spacing:.0125em;line-height:1.6}.q-dialog__progress{font-size:4rem}.q-dialog__inner{outline:0}.q-dialog__inner>div{-webkit-overflow-scrolling:touch;border-radius:4px;overflow:auto;pointer-events:all;will-change:scroll-position}.q-dialog__inner--square>div{border-radius:0!important}.q-dialog__inner>.q-card>.q-card__actions .q-btn--rectangle{min-width:64px}.q-dialog__inner--minimized{padding:24px}.q-dialog__inner--minimized>div{max-height:calc(100vh - 48px)}.q-dialog__inner--maximized>div{border-radius:0!important;height:100%;left:0!important;max-height:100vh;max-width:100vw;top:0!important;width:100%}.q-dialog__inner--bottom,.q-dialog__inner--top{padding-bottom:0!important;padding-top:0!important}.q-dialog__inner--left,.q-dialog__inner--right{padding-left:0!important;padding-right:0!important}.q-dialog__inner--left:not(.q-dialog__inner--animating)>div,.q-dialog__inner--top:not(.q-dialog__inner--animating)>div{border-top-left-radius:0}.q-dialog__inner--right:not(.q-dialog__inner--animating)>div,.q-dialog__inner--top:not(.q-dialog__inner--animating)>div{border-top-right-radius:0}.q-dialog__inner--bottom:not(.q-dialog__inner--animating)>div,.q-dialog__inner--left:not(.q-dialog__inner--animating)>div{border-bottom-left-radius:0}.q-dialog__inner--bottom:not(.q-dialog__inner--animating)>div,.q-dialog__inner--right:not(.q-dialog__inner--animating)>div{border-bottom-right-radius:0}.q-dialog__inner--fullwidth>div{max-width:100%!important;width:100%!important}.q-dialog__inner--fullheight>div{height:100%!important;max-height:100%!important}.q-dialog__backdrop{background:#0006;outline:0;pointer-events:all;z-index:-1}body.platform-android:not(.native-mobile) .q-dialog__inner--minimized>div,body.platform-ios .q-dialog__inner--minimized>div{max-height:calc(100vh - 108px)}body.q-ios-padding .q-dialog__inner{padding-bottom:env(safe-area-inset-bottom)!important;padding-top:env(safe-area-inset-top)!important}body.q-ios-padding .q-dialog__inner>div{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}@media (max-width:599.98px){.q-dialog__inner--bottom,.q-dialog__inner--top{padding-left:0;padding-right:0}.q-dialog__inner--bottom>div,.q-dialog__inner--top>div{width:100%!important}}@media (min-width:600px){.q-dialog__inner--minimized>div{max-width:560px}}.q-body--dialog{overflow:hidden}.q-editor{background-color:#fff;border:1px solid #0000001f;border-radius:4px}.q-editor.disabled{border-style:dashed}.q-editor>div:first-child,.q-editor__toolbars-container,.q-editor__toolbars-container>div:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.q-editor__content{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;max-width:100%;min-height:10em;outline:0;overflow:auto;padding:10px}.q-editor__content pre{white-space:pre-wrap}.q-editor__content hr{background:#0000001f;border:0;height:1px;margin:1px;outline:0}.q-editor__content:empty:not(:focus):before{content:attr(placeholder);opacity:.7}.q-editor__toolbar{border-bottom:1px solid #0000001f;min-height:32px}.q-editor__toolbars-container{max-width:100%}.q-editor .q-btn{margin:4px}.q-editor__toolbar-group{margin:0 4px;position:relative}.q-editor__toolbar-group+.q-editor__toolbar-group:before{background:#0000001f;bottom:4px;content:"";left:-4px;position:absolute;top:4px;width:1px}.q-editor__link-input{background:none;border:none;border-radius:0;color:inherit;outline:0;text-decoration:none;text-transform:none}.q-editor--flat,.q-editor--flat .q-editor__toolbar{border:0}.q-editor--dense .q-editor__toolbar-group{align-items:center;display:flex;flex-wrap:nowrap}.q-editor--dark{border-color:#ffffff47}.q-editor--dark .q-editor__content hr{background:#ffffff47}.q-editor--dark .q-editor__toolbar{border-color:#ffffff47}.q-editor--dark .q-editor__toolbar-group+.q-editor__toolbar-group:before{background:#ffffff47}.q-expansion-item__border{opacity:0}.q-expansion-item__toggle-icon{position:relative;transition:transform .3s}.q-expansion-item__toggle-icon--rotated{transform:rotate(180deg)}.q-expansion-item__toggle-focus{height:1em!important;position:relative!important;width:1em!important}.q-expansion-item__toggle-focus+.q-expansion-item__toggle-icon{margin-top:-1em}.q-expansion-item--standard.q-expansion-item--expanded>div>.q-expansion-item__border{opacity:1}.q-expansion-item--popup{transition:padding .5s}.q-expansion-item--popup>.q-expansion-item__container{border:1px solid #0000001f}.q-expansion-item--popup>.q-expansion-item__container>.q-separator{display:none}.q-expansion-item--popup.q-expansion-item--collapsed{padding:0 15px}.q-expansion-item--popup.q-expansion-item--expanded{padding:15px 0}.q-expansion-item--popup.q-expansion-item--expanded+.q-expansion-item--popup.q-expansion-item--expanded{padding-top:0}.q-expansion-item--popup.q-expansion-item--collapsed:not(:first-child)>.q-expansion-item__container{border-top-width:0}.q-expansion-item--popup.q-expansion-item--expanded+.q-expansion-item--popup.q-expansion-item--collapsed>.q-expansion-item__container{border-top-width:1px}.q-expansion-item__content>.q-card{border-radius:0;box-shadow:none}.q-expansion-item--expanded+.q-expansion-item--expanded>div>.q-expansion-item__border--top,.q-expansion-item:first-child>div>.q-expansion-item__border--top,.q-expansion-item:last-child>div>.q-expansion-item__border--bottom{opacity:0}.q-expansion-item--expanded .q-textarea--autogrow textarea{animation:q-expansion-done 0s}@keyframes q-expansion-done{0%{--q-exp-done:1}}.z-fab{z-index:990}.q-fab{position:relative;vertical-align:middle}.q-fab>.q-btn{width:100%}.q-fab--form-rounded{border-radius:28px}.q-fab--form-square{border-radius:4px}.q-fab__active-icon,.q-fab__icon{transition:opacity .4s,transform .4s}.q-fab__icon{opacity:1;transform:rotate(0deg)}.q-fab__active-icon{opacity:0;transform:rotate(-180deg)}.q-fab__label--external{padding:0 8px;position:absolute;transition:opacity .18s cubic-bezier(.65,.815,.735,.395)}.q-fab__label--external-hidden{opacity:0;pointer-events:none}.q-fab__label--external-left{left:-12px;top:50%;transform:translate(-100%,-50%)}.q-fab__label--external-right{right:-12px;top:50%;transform:translate(100%,-50%)}.q-fab__label--external-bottom{bottom:-12px;left:50%;transform:translate(-50%,100%)}.q-fab__label--external-top{left:50%;top:-12px;transform:translate(-50%,-100%)}.q-fab__label--internal{max-height:30px;padding:0;transition:font-size .12s cubic-bezier(.65,.815,.735,.395),max-height .12s cubic-bezier(.65,.815,.735,.395),opacity .07s cubic-bezier(.65,.815,.735,.395)}.q-fab__label--internal-hidden{font-size:0;opacity:0}.q-fab__label--internal-top{padding-bottom:.12em}.q-fab__label--internal-bottom{padding-top:.12em}.q-fab__label--internal-bottom.q-fab__label--internal-hidden,.q-fab__label--internal-top.q-fab__label--internal-hidden{max-height:0}.q-fab__label--internal-left{padding-left:.285em;padding-right:.571em}.q-fab__label--internal-right{padding-left:.571em;padding-right:.285em}.q-fab__icon-holder{min-height:24px;min-width:24px;position:relative}.q-fab__icon-holder--opened .q-fab__icon{opacity:0;transform:rotate(180deg)}.q-fab__icon-holder--opened .q-fab__active-icon{opacity:1;transform:rotate(0deg)}.q-fab__actions{align-items:center;align-self:center;justify-content:center;opacity:0;padding:3px;pointer-events:none;position:absolute;transition:transform .18s ease-in,opacity .18s ease-in}.q-fab__actions .q-btn{margin:5px}.q-fab__actions--right{height:56px;left:100%;margin-left:9px;transform:scale(.4) translateX(-62px);transform-origin:0 50%}.q-fab__actions--left{flex-direction:row-reverse;height:56px;margin-right:9px;right:100%;transform:scale(.4) translateX(62px);transform-origin:100% 50%}.q-fab__actions--up{bottom:100%;flex-direction:column-reverse;margin-bottom:9px;transform:scale(.4) translateY(62px);transform-origin:50% 100%;width:56px}.q-fab__actions--down{flex-direction:column;margin-top:9px;top:100%;transform:scale(.4) translateY(-62px);transform-origin:50% 0;width:56px}.q-fab__actions--down,.q-fab__actions--up{left:50%;margin-left:-28px}.q-fab__actions--opened{opacity:1;pointer-events:all;transform:scale(1) translate(.1px)}.q-fab--align-left>.q-fab__actions--down,.q-fab--align-left>.q-fab__actions--up{align-items:flex-start;left:28px}.q-fab--align-right>.q-fab__actions--down,.q-fab--align-right>.q-fab__actions--up{align-items:flex-end;left:auto;right:0}.q-field{font-size:14px}.q-field ::-ms-clear,.q-field ::-ms-reveal{display:none}.q-field--with-bottom{padding-bottom:20px}.q-field__marginal{color:#0000008a;font-size:24px;height:56px}.q-field__marginal>*+*{margin-left:2px}.q-field__marginal .q-avatar{font-size:32px}.q-field__before,.q-field__prepend{padding-right:12px}.q-field__after,.q-field__append{padding-left:12px}.q-field__after:empty,.q-field__append:empty{display:none}.q-field__append+.q-field__append{padding-left:2px}.q-field__inner{text-align:left}.q-field__bottom{backface-visibility:hidden;color:#0000008a;font-size:12px;line-height:1;min-height:20px;padding:8px 12px 0}.q-field__bottom--animated{bottom:0;left:0;position:absolute;right:0;transform:translateY(100%)}.q-field__messages{line-height:1}.q-field__messages>div{word-wrap:break-word;overflow-wrap:break-word;word-break:break-word}.q-field__messages>div+div{margin-top:4px}.q-field__counter{line-height:1;padding-left:8px}.q-field--item-aligned{padding:8px 16px}.q-field--item-aligned .q-field__before{min-width:56px}.q-field__control-container{height:inherit}.q-field__control{color:var(--q-primary);height:56px;max-width:100%;outline:none}.q-field__control:after,.q-field__control:before{bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.q-field__control:before{border-radius:inherit}.q-field__shadow{opacity:0;overflow:hidden;top:8px;white-space:pre-wrap}.q-field__shadow,.q-field__shadow+.q-field__native::placeholder{transition:opacity .36s cubic-bezier(.4,0,.2,1)}.q-field__shadow+.q-field__native:focus::placeholder{opacity:0}.q-field__input,.q-field__native,.q-field__prefix,.q-field__suffix{background:none;border:none;border-radius:0;color:#000000de;font-weight:400;letter-spacing:.00937em;line-height:28px;outline:0;padding:6px 0;text-decoration:inherit;text-transform:inherit}.q-field__input,.q-field__native{min-width:0;outline:0!important;-webkit-user-select:auto;user-select:auto;width:100%}.q-field__input:-webkit-autofill,.q-field__native:-webkit-autofill{-webkit-animation-fill-mode:both;-webkit-animation-name:q-autofill}.q-field__input:-webkit-autofill+.q-field__label,.q-field__native:-webkit-autofill+.q-field__label{transform:translateY(-40%) scale(.75)}.q-field__input[type=color]+.q-field__label,.q-field__input[type=date]+.q-field__label,.q-field__input[type=datetime-local]+.q-field__label,.q-field__input[type=month]+.q-field__label,.q-field__input[type=time]+.q-field__label,.q-field__input[type=week]+.q-field__label,.q-field__native[type=color]+.q-field__label,.q-field__native[type=date]+.q-field__label,.q-field__native[type=datetime-local]+.q-field__label,.q-field__native[type=month]+.q-field__label,.q-field__native[type=time]+.q-field__label,.q-field__native[type=week]+.q-field__label{transform:translateY(-40%) scale(.75)}.q-field__input:invalid,.q-field__native:invalid{box-shadow:none}.q-field__native[type=file]{line-height:1em}.q-field__input{height:0;line-height:24px;min-height:24px;padding:0}.q-field__prefix,.q-field__suffix{transition:opacity .36s cubic-bezier(.4,0,.2,1);white-space:nowrap}.q-field__prefix{padding-right:4px}.q-field__suffix{padding-left:4px}.q-field--disabled .q-placeholder,.q-field--readonly .q-placeholder{opacity:1!important}.q-field--readonly.q-field--labeled .q-field__input,.q-field--readonly.q-field--labeled .q-field__native{cursor:default}.q-field--readonly.q-field--float .q-field__input,.q-field--readonly.q-field--float .q-field__native{cursor:text}.q-field--disabled .q-field__inner{cursor:not-allowed}.q-field--disabled .q-field__control{pointer-events:none}.q-field--disabled .q-field__control>div{opacity:.6!important}.q-field--disabled .q-field__control>div,.q-field--disabled .q-field__control>div *{outline:0!important}.q-field__label{backface-visibility:hidden;color:#0009;font-size:16px;font-weight:400;left:0;letter-spacing:.00937em;line-height:1.25;max-width:100%;text-decoration:inherit;text-transform:inherit;top:18px;transform-origin:left top;transition:transform .36s cubic-bezier(.4,0,.2,1),max-width .324s cubic-bezier(.4,0,.2,1)}.q-field--float .q-field__label{max-width:133%;transform:translateY(-40%) scale(.75);transition:transform .36s cubic-bezier(.4,0,.2,1),max-width .396s cubic-bezier(.4,0,.2,1)}.q-field--highlighted .q-field__label{color:currentColor}.q-field--highlighted .q-field__shadow{opacity:.5}.q-field--filled .q-field__control{background:#0000000d;border-radius:4px 4px 0 0;padding:0 12px}.q-field--filled .q-field__control:before{background:#0000000d;border-bottom:1px solid #0000006b;opacity:0;transition:opacity .36s cubic-bezier(.4,0,.2,1),background .36s cubic-bezier(.4,0,.2,1)}.q-field--filled .q-field__control:hover:before{opacity:1}.q-field--filled .q-field__control:after{background:currentColor;height:2px;top:auto;transform:scaleX(0);transform-origin:center bottom;transition:transform .36s cubic-bezier(.4,0,.2,1)}.q-field--filled.q-field--rounded .q-field__control{border-radius:28px 28px 0 0}.q-field--filled.q-field--highlighted .q-field__control:before{background:#0000001f;opacity:1}.q-field--filled.q-field--highlighted .q-field__control:after{transform:scaleX(1)}.q-field--filled.q-field--dark .q-field__control,.q-field--filled.q-field--dark .q-field__control:before{background:#ffffff12}.q-field--filled.q-field--dark.q-field--highlighted .q-field__control:before{background:#ffffff1a}.q-field--filled.q-field--readonly .q-field__control:before{background:#0000;border-bottom-style:dashed;opacity:1}.q-field--outlined .q-field__control{border-radius:4px;padding:0 12px}.q-field--outlined .q-field__control:before{border:1px solid #0000003d;transition:border-color .36s cubic-bezier(.4,0,.2,1)}.q-field--outlined .q-field__control:hover:before{border-color:#000}.q-field--outlined .q-field__control:after{border:2px solid #0000;border-radius:inherit;height:inherit;transition:border-color .36s cubic-bezier(.4,0,.2,1)}.q-field--outlined .q-field__input:-webkit-autofill,.q-field--outlined .q-field__native:-webkit-autofill{margin-bottom:1px;margin-top:1px}.q-field--outlined.q-field--rounded .q-field__control{border-radius:28px}.q-field--outlined.q-field--highlighted .q-field__control:hover:before{border-color:#0000}.q-field--outlined.q-field--highlighted .q-field__control:after{border-color:currentColor;border-width:2px;transform:scaleX(1)}.q-field--outlined.q-field--readonly .q-field__control:before{border-style:dashed}.q-field--standard .q-field__control:before{border-bottom:1px solid #0000003d;transition:border-color .36s cubic-bezier(.4,0,.2,1)}.q-field--standard .q-field__control:hover:before{border-color:#000}.q-field--standard .q-field__control:after{background:currentColor;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;height:2px;top:auto;transform:scaleX(0);transform-origin:center bottom;transition:transform .36s cubic-bezier(.4,0,.2,1)}.q-field--standard.q-field--highlighted .q-field__control:after{transform:scaleX(1)}.q-field--standard.q-field--readonly .q-field__control:before{border-bottom-style:dashed}.q-field--dark .q-field__control:before{border-color:#fff9}.q-field--dark .q-field__control:hover:before{border-color:#fff}.q-field--dark .q-field__input,.q-field--dark .q-field__native,.q-field--dark .q-field__prefix,.q-field--dark .q-field__suffix{color:#fff}.q-field--dark .q-field__bottom,.q-field--dark .q-field__marginal,.q-field--dark:not(.q-field--highlighted) .q-field__label{color:#ffffffb3}.q-field--standout .q-field__control{background:#0000000d;border-radius:4px;padding:0 12px;transition:box-shadow .36s cubic-bezier(.4,0,.2,1),background-color .36s cubic-bezier(.4,0,.2,1)}.q-field--standout .q-field__control:before{background:#00000012;opacity:0;transition:opacity .36s cubic-bezier(.4,0,.2,1),background .36s cubic-bezier(.4,0,.2,1)}.q-field--standout .q-field__control:hover:before{opacity:1}.q-field--standout.q-field--rounded .q-field__control{border-radius:28px}.q-field--standout.q-field--highlighted .q-field__control{background:#000;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f}.q-field--standout.q-field--highlighted .q-field__append,.q-field--standout.q-field--highlighted .q-field__input,.q-field--standout.q-field--highlighted .q-field__native,.q-field--standout.q-field--highlighted .q-field__prefix,.q-field--standout.q-field--highlighted .q-field__prepend,.q-field--standout.q-field--highlighted .q-field__suffix{color:#fff}.q-field--standout.q-field--readonly .q-field__control:before{background:#0000;border:1px dashed #0000003d;opacity:1}.q-field--standout.q-field--dark .q-field__control,.q-field--standout.q-field--dark .q-field__control:before{background:#ffffff12}.q-field--standout.q-field--dark.q-field--highlighted .q-field__control{background:#fff}.q-field--standout.q-field--dark.q-field--highlighted .q-field__append,.q-field--standout.q-field--dark.q-field--highlighted .q-field__input,.q-field--standout.q-field--dark.q-field--highlighted .q-field__native,.q-field--standout.q-field--dark.q-field--highlighted .q-field__prefix,.q-field--standout.q-field--dark.q-field--highlighted .q-field__prepend,.q-field--standout.q-field--dark.q-field--highlighted .q-field__suffix{color:#000}.q-field--standout.q-field--dark.q-field--readonly .q-field__control:before{border-color:#ffffff3d}.q-field--labeled .q-field__native,.q-field--labeled .q-field__prefix,.q-field--labeled .q-field__suffix{line-height:24px;padding-bottom:8px;padding-top:24px}.q-field--labeled .q-field__shadow{top:0}.q-field--labeled:not(.q-field--float) .q-field__prefix,.q-field--labeled:not(.q-field--float) .q-field__suffix{opacity:0}.q-field--labeled:not(.q-field--float) .q-field__input::placeholder,.q-field--labeled:not(.q-field--float) .q-field__native::placeholder{color:#0000}.q-field--labeled.q-field--dense .q-field__native,.q-field--labeled.q-field--dense .q-field__prefix,.q-field--labeled.q-field--dense .q-field__suffix{padding-bottom:2px;padding-top:14px}.q-field--dense .q-field--with-bottom{padding-bottom:19px}.q-field--dense .q-field__shadow{top:0}.q-field--dense .q-field__control,.q-field--dense .q-field__marginal{height:40px}.q-field--dense .q-field__bottom{font-size:11px}.q-field--dense .q-field__label{font-size:14px;top:10px}.q-field--dense .q-field__before,.q-field--dense .q-field__prepend{padding-right:6px}.q-field--dense .q-field__after,.q-field--dense .q-field__append{padding-left:6px}.q-field--dense .q-field__append+.q-field__append{padding-left:2px}.q-field--dense .q-field__marginal .q-avatar{font-size:24px}.q-field--dense.q-field--float .q-field__label{transform:translateY(-30%) scale(.75)}.q-field--dense .q-field__input:-webkit-autofill+.q-field__label,.q-field--dense .q-field__native:-webkit-autofill+.q-field__label{transform:translateY(-30%) scale(.75)}.q-field--dense .q-field__input[type=color]+.q-field__label,.q-field--dense .q-field__input[type=date]+.q-field__label,.q-field--dense .q-field__input[type=datetime-local]+.q-field__label,.q-field--dense .q-field__input[type=month]+.q-field__label,.q-field--dense .q-field__input[type=time]+.q-field__label,.q-field--dense .q-field__input[type=week]+.q-field__label,.q-field--dense .q-field__native[type=color]+.q-field__label,.q-field--dense .q-field__native[type=date]+.q-field__label,.q-field--dense .q-field__native[type=datetime-local]+.q-field__label,.q-field--dense .q-field__native[type=month]+.q-field__label,.q-field--dense .q-field__native[type=time]+.q-field__label,.q-field--dense .q-field__native[type=week]+.q-field__label{transform:translateY(-30%) scale(.75)}.q-field--borderless .q-field__bottom,.q-field--borderless.q-field--dense .q-field__control,.q-field--standard .q-field__bottom,.q-field--standard.q-field--dense .q-field__control{padding-left:0;padding-right:0}.q-field--error .q-field__label{animation:q-field-label .36s}.q-field--error .q-field__bottom{color:var(--q-negative)}.q-field__focusable-action{background:#0000;border:0;color:inherit;cursor:pointer;opacity:.6;outline:0!important;padding:0}.q-field__focusable-action:focus,.q-field__focusable-action:hover{opacity:1}.q-field--auto-height .q-field__control{height:auto}.q-field--auto-height .q-field__control,.q-field--auto-height .q-field__native{min-height:56px}.q-field--auto-height .q-field__native{align-items:center}.q-field--auto-height .q-field__control-container{padding-top:0}.q-field--auto-height .q-field__native,.q-field--auto-height .q-field__prefix,.q-field--auto-height .q-field__suffix{line-height:18px}.q-field--auto-height.q-field--labeled .q-field__control-container{padding-top:24px}.q-field--auto-height.q-field--labeled .q-field__shadow{top:24px}.q-field--auto-height.q-field--labeled .q-field__native,.q-field--auto-height.q-field--labeled .q-field__prefix,.q-field--auto-height.q-field--labeled .q-field__suffix{padding-top:0}.q-field--auto-height.q-field--labeled .q-field__native{min-height:24px}.q-field--auto-height.q-field--dense .q-field__control,.q-field--auto-height.q-field--dense .q-field__native{min-height:40px}.q-field--auto-height.q-field--dense.q-field--labeled .q-field__control-container{padding-top:14px}.q-field--auto-height.q-field--dense.q-field--labeled .q-field__shadow{top:14px}.q-field--auto-height.q-field--dense.q-field--labeled .q-field__native{min-height:24px}.q-field--square .q-field__control{border-radius:0!important}.q-transition--field-message-enter-active,.q-transition--field-message-leave-active{transition:transform .6s cubic-bezier(.86,0,.07,1),opacity .6s cubic-bezier(.86,0,.07,1)}.q-transition--field-message-enter-from,.q-transition--field-message-leave-to{opacity:0;transform:translateY(-10px)}.q-transition--field-message-leave-active,.q-transition--field-message-leave-from{position:absolute}@keyframes q-field-label{40%{margin-left:2px}60%,80%{margin-left:-2px}70%,90%{margin-left:2px}}@keyframes q-autofill{to{background:#0000;color:inherit}}.q-file .q-field__native{overflow:hidden;word-break:break-all}.q-file .q-field__input{opacity:0!important}.q-file .q-field__input::-webkit-file-upload-button{cursor:pointer}.q-file__filler{border:none;padding:0;visibility:hidden;width:100%}.q-file__dnd{outline:1px dashed currentColor;outline-offset:-4px}.q-form,.q-img{position:relative}.q-img{display:inline-block;overflow:hidden;vertical-align:middle;width:100%}.q-img__loading .q-spinner{font-size:50px}.q-img__container{border-radius:inherit;font-size:0}.q-img__image{border-radius:inherit;height:100%;opacity:0;width:100%}.q-img__image--with-transition{transition:opacity .28s ease-in}.q-img__image--loaded{opacity:1}.q-img__content{border-radius:inherit;pointer-events:none}.q-img__content>div{background:#00000078;color:#fff;padding:16px;pointer-events:all;position:absolute}.q-img--no-menu .q-img__image,.q-img--no-menu .q-img__placeholder{pointer-events:none}.q-inner-loading{background:#fff9;border-radius:inherit}.q-inner-loading--dark{background:#0006}.q-inner-loading__label{margin-top:8px}.q-textarea .q-field__control{height:auto;min-height:56px}.q-textarea .q-field__control-container{padding-bottom:2px;padding-top:2px}.q-textarea .q-field__shadow{bottom:2px;top:2px}.q-textarea .q-field__native,.q-textarea .q-field__prefix,.q-textarea .q-field__suffix{line-height:18px}.q-textarea .q-field__native{min-height:52px;padding-top:17px;resize:vertical}.q-textarea.q-field--labeled .q-field__control-container{padding-top:26px}.q-textarea.q-field--labeled .q-field__shadow{top:26px}.q-textarea.q-field--labeled .q-field__native,.q-textarea.q-field--labeled .q-field__prefix,.q-textarea.q-field--labeled .q-field__suffix{padding-top:0}.q-textarea.q-field--labeled .q-field__native{min-height:26px;padding-top:1px}.q-textarea--autogrow .q-field__native{resize:none}.q-textarea.q-field--dense .q-field__control,.q-textarea.q-field--dense .q-field__native{min-height:36px}.q-textarea.q-field--dense .q-field__native{padding-top:9px}.q-textarea.q-field--dense.q-field--labeled .q-field__control-container{padding-top:14px}.q-textarea.q-field--dense.q-field--labeled .q-field__shadow{top:14px}.q-textarea.q-field--dense.q-field--labeled .q-field__native{min-height:24px;padding-top:3px}.q-textarea.q-field--dense.q-field--labeled .q-field__prefix,.q-textarea.q-field--dense.q-field--labeled .q-field__suffix{padding-top:2px}.q-textarea.disabled .q-field__native,body.mobile .q-textarea .q-field__native{resize:none}.q-intersection{position:relative}.q-item{color:inherit;min-height:48px;padding:8px 16px;transition:color .3s,background-color .3s}.q-item__section--side{align-items:flex-start;color:#757575;max-width:100%;min-width:0;padding-right:16px;width:auto}.q-item__section--side>.q-icon{font-size:24px}.q-item__section--side>.q-avatar{font-size:40px}.q-item__section--avatar{color:inherit;min-width:56px}.q-item__section--thumbnail img{height:56px;width:100px}.q-item__section--nowrap{white-space:nowrap}.q-item>.q-focus-helper+.q-item__section--thumbnail,.q-item>.q-item__section--thumbnail:first-child{margin-left:-16px}.q-item>.q-item__section--thumbnail:last-of-type{margin-right:-16px}.q-item__label{line-height:1.2em!important;max-width:100%}.q-item__label--overline{color:#000000b3}.q-item__label--caption{color:#0000008a}.q-item__label--header{color:#757575;font-size:.875rem;letter-spacing:.01786em;line-height:1.25rem;padding:16px}.q-list--padding .q-item__label--header,.q-separator--spaced+.q-item__label--header{padding-top:8px}.q-item__label+.q-item__label{margin-top:4px}.q-item__section--main{flex:10000 1 0%;max-width:100%;min-width:0;width:auto}.q-item__section--main+.q-item__section--main{margin-left:8px}.q-item__section--main~.q-item__section--side{align-items:flex-end;padding-left:16px;padding-right:0}.q-item__section--main.q-item__section--thumbnail{margin-left:0;margin-right:-16px}.q-list--bordered{border:1px solid #0000001f}.q-list--separator>.q-item-type+.q-item-type,.q-list--separator>.q-virtual-scroll__content>.q-item-type+.q-item-type{border-top:1px solid #0000001f}.q-list--padding{padding:8px 0}.q-item--dense,.q-list--dense>.q-item{min-height:32px;padding:2px 16px}.q-list--dark.q-list--separator>.q-item-type+.q-item-type,.q-list--dark.q-list--separator>.q-virtual-scroll__content>.q-item-type+.q-item-type{border-top-color:#ffffff47}.q-item--dark,.q-list--dark{border-color:#ffffff47;color:#fff}.q-item--dark .q-item__section--side:not(.q-item__section--avatar),.q-list--dark .q-item__section--side:not(.q-item__section--avatar){color:#ffffffb3}.q-item--dark .q-item__label--header,.q-list--dark .q-item__label--header{color:#ffffffa3}.q-item--dark .q-item__label--caption,.q-item--dark .q-item__label--overline,.q-list--dark .q-item__label--caption,.q-list--dark .q-item__label--overline{color:#fffc}.q-item{position:relative}.q-item--active,.q-item.q-router-link--active{color:var(--q-primary)}.q-knob{font-size:48px}.q-knob--editable{cursor:pointer;outline:0}.q-knob--editable:before{border-radius:50%;bottom:0;box-shadow:none;content:"";left:0;position:absolute;right:0;top:0;transition:box-shadow .24s ease-in-out}.q-knob--editable:focus:before{box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f}body.body--dark .q-knob--editable:focus:before{box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-layout{outline:0;width:100%}.q-layout-container{height:100%;position:relative;width:100%}.q-layout-container .q-layout{min-height:100%}.q-layout-container>div{transform:translateZ(0)}.q-layout-container>div>div{max-height:100%;min-height:0}.q-layout__shadow{width:100%}.q-layout__shadow:after{bottom:0;box-shadow:0 0 10px 2px #0003,0 0 10px #0000003d;content:"";left:0;position:absolute;right:0;top:0}.q-layout__section--marginal{background-color:var(--q-primary);color:#fff}.q-header--hidden{transform:translateY(-110%)}.q-header--bordered{border-bottom:1px solid #0000001f}.q-header .q-layout__shadow{bottom:-10px}.q-header .q-layout__shadow:after{bottom:10px}.q-footer--hidden{transform:translateY(110%)}.q-footer--bordered{border-top:1px solid #0000001f}.q-footer .q-layout__shadow{top:-10px}.q-footer .q-layout__shadow:after{top:10px}.q-footer,.q-header{z-index:2000}.q-drawer{background:#fff;bottom:0;position:absolute;top:0;z-index:1000}.q-drawer--on-top{z-index:3000}.q-drawer--left{left:0;transform:translateX(-100%)}.q-drawer--left.q-drawer--bordered{border-right:1px solid #0000001f}.q-drawer--left .q-layout__shadow{left:10px;right:-10px}.q-drawer--left .q-layout__shadow:after{right:10px}.q-drawer--right{right:0;transform:translateX(100%)}.q-drawer--right.q-drawer--bordered{border-left:1px solid #0000001f}.q-drawer--right .q-layout__shadow{left:-10px}.q-drawer--right .q-layout__shadow:after{left:10px}.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini{padding:0!important}.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item,.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item__section{justify-content:center;min-width:0;padding-left:0;padding-right:0;text-align:center}.q-drawer--mini .q-expansion-item__content,.q-drawer--mini .q-mini-drawer-hide,.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item__label,.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item__section--main,.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item__section--side~.q-item__section--side{display:none}.q-drawer--mini-animate .q-drawer__content{overflow-x:hidden!important;white-space:nowrap}.q-drawer--mobile .q-mini-drawer-hide,.q-drawer--mobile .q-mini-drawer-only,.q-drawer--standard .q-mini-drawer-only{display:none}.q-drawer__backdrop{will-change:background-color;z-index:2999!important}.q-drawer__opener{height:100%;-webkit-user-select:none;user-select:none;width:15px;z-index:2001}.q-footer,.q-header,.q-layout,.q-page{position:relative}.q-page-sticky--shrink{pointer-events:none}.q-page-sticky--shrink>div{display:inline-block;pointer-events:auto}body.q-ios-padding .q-layout--standard .q-drawer--top-padding .q-drawer__content,body.q-ios-padding .q-layout--standard .q-header>.q-tabs:first-child .q-tabs__content,body.q-ios-padding .q-layout--standard .q-header>.q-toolbar:first-child{min-height:70px;min-height:calc(env(safe-area-inset-top) + 50px);padding-top:env(safe-area-inset-top)}body.q-ios-padding .q-layout--standard .q-drawer--top-padding .q-drawer__content,body.q-ios-padding .q-layout--standard .q-footer>.q-tabs:nth-last-child(1 of :not(.q-layout__shadow)) .q-tabs__content,body.q-ios-padding .q-layout--standard .q-footer>.q-toolbar:last-child{min-height:calc(env(safe-area-inset-bottom) + 50px);padding-bottom:env(safe-area-inset-bottom)}.q-body--layout-animate .q-drawer__backdrop{transition:background-color .12s!important}.q-body--layout-animate .q-drawer{transition:transform .12s,width .12s,top .12s,bottom .12s!important}.q-body--layout-animate .q-layout__section--marginal{transition:transform .12s,left .12s,right .12s!important}.q-body--layout-animate .q-page-container{transition:padding-top .12s,padding-right .12s,padding-bottom .12s,padding-left .12s!important}.q-body--layout-animate .q-page-sticky{transition:transform .12s,left .12s,right .12s,top .12s,bottom .12s!important}body:not(.q-body--layout-animate) .q-layout--prevent-focus{visibility:hidden}.q-body--drawer-toggle{overflow-x:hidden!important}@media (max-width:599.98px){.q-layout-padding{padding:8px}}@media (min-width:600px) and (max-width:1439.98px){.q-layout-padding{padding:16px}}@media (min-width:1440px){.q-layout-padding{padding:24px}}body.body--dark .q-drawer,body.body--dark .q-footer,body.body--dark .q-header{border-color:#ffffff47}body.body--dark .q-layout__shadow:after{box-shadow:0 0 10px 2px #fff3,0 0 10px #ffffff3d}body.platform-ios .q-layout--containerized{position:unset!important}.q-linear-progress{--q-linear-progress-speed:.3s;color:var(--q-primary);font-size:4px;height:1em;overflow:hidden;position:relative;transform:scaleX(1);width:100%}.q-linear-progress__model,.q-linear-progress__track{transform-origin:0 0}.q-linear-progress__model--with-transition,.q-linear-progress__track--with-transition{transition:transform var(--q-linear-progress-speed)}.q-linear-progress--reverse .q-linear-progress__model,.q-linear-progress--reverse .q-linear-progress__track{transform-origin:0 100%}.q-linear-progress__model--determinate{background:currentColor}.q-linear-progress__model--indeterminate,.q-linear-progress__model--query{transition:none}.q-linear-progress__model--indeterminate:after,.q-linear-progress__model--indeterminate:before,.q-linear-progress__model--query:after,.q-linear-progress__model--query:before{background:currentColor;bottom:0;content:"";left:0;position:absolute;right:0;top:0;transform-origin:0 0}.q-linear-progress__model--indeterminate:before,.q-linear-progress__model--query:before{animation:q-linear-progress--indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.q-linear-progress__model--indeterminate:after,.q-linear-progress__model--query:after{animation:q-linear-progress--indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s;transform:translate3d(-101%,0,0) scaleX(1)}.q-linear-progress__track{opacity:.4}.q-linear-progress__track--light{background:#00000042}.q-linear-progress__track--dark{background:#fff9}.q-linear-progress__stripe{background-image:linear-gradient(45deg,#ffffff26 25%,#fff0 0,#fff0 50%,#ffffff26 0,#ffffff26 75%,#fff0 0,#fff0)!important;background-size:40px 40px!important}.q-linear-progress__stripe--with-transition{transition:width var(--q-linear-progress-speed)}@keyframes q-linear-progress--indeterminate{0%{transform:translate3d(-35%,0,0) scaleX(.35)}60%{transform:translate3d(100%,0,0) scaleX(.9)}to{transform:translate3d(100%,0,0) scaleX(.9)}}@keyframes q-linear-progress--indeterminate-short{0%{transform:translate3d(-101%,0,0) scaleX(1)}60%{transform:translate3d(107%,0,0) scaleX(.01)}to{transform:translate3d(107%,0,0) scaleX(.01)}}.q-menu{background:#fff;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;display:inline-block;max-height:65vh;max-width:95vw;outline:0;overflow-x:hidden;overflow-y:auto;position:fixed!important;z-index:6000}.q-menu--square{border-radius:0}.q-menu--dark{box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-option-group--inline>div{display:inline-block}.q-pagination input{-moz-appearance:textfield;text-align:center}.q-pagination input::-webkit-inner-spin-button,.q-pagination input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.q-pagination__content{--q-pagination-gutter-parent:-2px;--q-pagination-gutter-child:2px;margin-left:var(--q-pagination-gutter-parent);margin-top:var(--q-pagination-gutter-parent)}.q-pagination__content>.q-btn,.q-pagination__content>.q-input,.q-pagination__middle>.q-btn{margin-left:var(--q-pagination-gutter-child);margin-top:var(--q-pagination-gutter-child)}.q-parallax{border-radius:inherit;overflow:hidden;position:relative;width:100%}.q-parallax__media>img,.q-parallax__media>video{bottom:0;display:none;left:50%;min-height:100%;min-width:100%;position:absolute;will-change:transform}.q-popup-edit{padding:8px 16px}.q-popup-edit__buttons{margin-top:8px}.q-popup-edit__buttons .q-btn+.q-btn{margin-left:8px}.q-pull-to-refresh{position:relative}.q-pull-to-refresh__puller{background:#fff;border-radius:50%;box-shadow:0 0 4px 0 #0000004d;color:var(--q-primary);height:40px;width:40px}.q-pull-to-refresh__puller--animating{transition:transform .3s,opacity .3s}.q-radio{vertical-align:middle}.q-radio__native{height:1px;width:1px}.q-radio__bg,.q-radio__icon-container{-webkit-user-select:none;user-select:none}.q-radio__bg{height:50%;left:25%;-webkit-print-color-adjust:exact;top:25%;width:50%}.q-radio__bg path{fill:currentColor}.q-radio__icon{color:currentColor;font-size:.5em}.q-radio__check{transform:scale3d(0,0,1);transform-origin:50% 50%;transition:transform .22s cubic-bezier(0,0,.2,1) 0ms}.q-radio__inner{border-radius:50%;color:#0000008a;font-size:40px;height:1em;min-width:1em;outline:0;width:1em}.q-radio__inner--truthy{color:var(--q-primary)}.q-radio__inner--truthy .q-radio__check{transform:scaleX(1)}.q-radio.disabled{opacity:.75!important}.q-radio--dark .q-radio__inner{color:#ffffffb3}.q-radio--dark .q-radio__inner:before{opacity:.32!important}.q-radio--dark .q-radio__inner--truthy{color:var(--q-primary)}.q-radio--dense .q-radio__inner{height:.5em;min-width:.5em;width:.5em}.q-radio--dense .q-radio__bg{height:100%;left:0;top:0;width:100%}.q-radio--dense .q-radio__label{padding-left:.5em}.q-radio--dense.reverse .q-radio__label{padding-left:0;padding-right:.5em}body.desktop .q-radio:not(.disabled) .q-radio__inner:before{background:currentColor;border-radius:50%;bottom:0;content:"";left:0;opacity:.12;position:absolute;right:0;top:0;transform:scale3d(0,0,1);transition:transform .22s cubic-bezier(0,0,.2,1) 0ms}body.desktop .q-radio:not(.disabled):focus .q-radio__inner:before,body.desktop .q-radio:not(.disabled):hover .q-radio__inner:before{transform:scaleX(1)}body.desktop .q-radio--dense:not(.disabled):focus .q-radio__inner:before,body.desktop .q-radio--dense:not(.disabled):hover .q-radio__inner:before{transform:scale3d(1.5,1.5,1)}.q-rating{color:#ffeb3b;vertical-align:middle}.q-rating__icon-container{height:1em;outline:0}.q-rating__icon-container+.q-rating__icon-container{margin-left:2px}.q-rating__icon{color:currentColor;opacity:.4;position:relative;text-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d;transition:transform .2s ease-in,opacity .2s ease-in}.q-rating__icon--hovered{transform:scale(1.3)}.q-rating__icon--active{opacity:1}.q-rating__icon--exselected{opacity:.7}.q-rating--no-dimming .q-rating__icon{opacity:1}.q-rating--editable .q-rating__icon-container{cursor:pointer}.q-responsive{max-height:100%;max-width:100%;position:relative}.q-responsive__filler{height:inherit;max-height:inherit;max-width:inherit;width:inherit}.q-responsive__content{border-radius:inherit}.q-responsive__content>*{height:100%!important;max-height:100%!important;max-width:100%!important;width:100%!important}.q-scrollarea{contain:strict;position:relative}.q-scrollarea__bar,.q-scrollarea__thumb{cursor:grab;opacity:.2;transition:opacity .3s;will-change:opacity}.q-scrollarea__bar--v,.q-scrollarea__thumb--v{right:0;width:10px}.q-scrollarea__bar--h,.q-scrollarea__thumb--h{bottom:0;height:10px}.q-scrollarea__bar--invisible,.q-scrollarea__thumb--invisible{opacity:0!important;pointer-events:none}.q-scrollarea__thumb{background:#000;border-radius:3px}.q-scrollarea__thumb:hover{opacity:.3}.q-scrollarea__thumb:active{opacity:.5}.q-scrollarea__content{min-height:100%;min-width:100%}.q-scrollarea--dark .q-scrollarea__thumb{background:#fff}.q-select--without-input .q-field__control{cursor:pointer}.q-select--with-input .q-field__control{cursor:text}.q-select .q-field__input{cursor:text;min-width:50px!important}.q-select .q-field__input--padding{padding-left:4px}.q-select__autocomplete-input,.q-select__focus-target{border:0;height:1px;opacity:0;outline:0!important;padding:0;position:absolute;width:1px}.q-select__dropdown-icon{cursor:pointer;transition:transform .28s}.q-select.q-field--readonly .q-field__control,.q-select.q-field--readonly .q-select__dropdown-icon{cursor:default}.q-select__dialog{background:#fff;display:flex;flex-direction:column;max-height:calc(100vh - 70px)!important;max-width:90vw!important;width:90vw!important}.q-select__dialog>.scroll{background:inherit;position:relative}body.mobile:not(.native-mobile) .q-select__dialog{max-height:calc(100vh - 108px)!important}body.platform-android.native-mobile .q-dialog__inner--top .q-select__dialog{max-height:calc(100vh - 24px)!important}body.platform-android:not(.native-mobile) .q-dialog__inner--top .q-select__dialog{max-height:calc(100vh - 80px)!important}body.platform-ios.native-mobile .q-dialog__inner--top>div{border-radius:4px}body.platform-ios.native-mobile .q-dialog__inner--top .q-select__dialog--focused{max-height:47vh!important}body.platform-ios:not(.native-mobile) .q-dialog__inner--top .q-select__dialog--focused{max-height:50vh!important}.q-separator{background:#0000001f;border:0;flex-shrink:0;margin:0;transition:background .3s,opacity .3s}.q-separator--dark{background:#ffffff47}.q-separator--horizontal{display:block;height:1px}.q-separator--horizontal-inset{margin-left:16px;margin-right:16px}.q-separator--horizontal-item-inset{margin-left:72px;margin-right:0}.q-separator--horizontal-item-thumbnail-inset{margin-left:116px;margin-right:0}.q-separator--vertical{align-self:stretch;height:auto;width:1px}.q-separator--vertical-inset{margin-bottom:8px;margin-top:8px}.q-skeleton{--q-skeleton-speed:1500ms;background:#0000001f;border-radius:4px;box-sizing:border-box}.q-skeleton--anim{cursor:wait}.q-skeleton:before{content:" "}.q-skeleton--type-text{transform:scaleY(.5)}.q-skeleton--type-QAvatar,.q-skeleton--type-circle{border-radius:50%;height:48px;width:48px}.q-skeleton--type-QBtn{height:36px;width:90px}.q-skeleton--type-QBadge{height:16px;width:70px}.q-skeleton--type-QChip{border-radius:16px;height:28px;width:90px}.q-skeleton--type-QToolbar{height:50px}.q-skeleton--type-QCheckbox,.q-skeleton--type-QRadio{border-radius:50%;height:40px;width:40px}.q-skeleton--type-QToggle{border-radius:7px;height:40px;width:56px}.q-skeleton--type-QRange,.q-skeleton--type-QSlider{height:40px}.q-skeleton--type-QInput{height:56px}.q-skeleton--bordered{border:1px solid #0000000d}.q-skeleton--square{border-radius:0}.q-skeleton--anim-fade{animation:q-skeleton--fade var(--q-skeleton-speed) linear .5s infinite}.q-skeleton--anim-pulse{animation:q-skeleton--pulse var(--q-skeleton-speed) ease-in-out .5s infinite}.q-skeleton--anim-pulse-x{animation:q-skeleton--pulse-x var(--q-skeleton-speed) ease-in-out .5s infinite}.q-skeleton--anim-pulse-y{animation:q-skeleton--pulse-y var(--q-skeleton-speed) ease-in-out .5s infinite}.q-skeleton--anim-blink,.q-skeleton--anim-pop,.q-skeleton--anim-wave{overflow:hidden;position:relative;z-index:1}.q-skeleton--anim-blink:after,.q-skeleton--anim-pop:after,.q-skeleton--anim-wave:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:0}.q-skeleton--anim-blink:after{animation:q-skeleton--fade var(--q-skeleton-speed) linear .5s infinite;background:#ffffffb3}.q-skeleton--anim-wave:after{animation:q-skeleton--wave var(--q-skeleton-speed) linear .5s infinite;background:linear-gradient(90deg,#fff0,#ffffff80,#fff0)}.q-skeleton--dark{background:#ffffff0d}.q-skeleton--dark.q-skeleton--bordered{border:1px solid #ffffff40}.q-skeleton--dark.q-skeleton--anim-wave:after{background:linear-gradient(90deg,#fff0,#ffffff1a,#fff0)}.q-skeleton--dark.q-skeleton--anim-blink:after{background:#fff3}@keyframes q-skeleton--fade{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes q-skeleton--pulse{0%{transform:scale(1)}50%{transform:scale(.85)}to{transform:scale(1)}}@keyframes q-skeleton--pulse-x{0%{transform:scaleX(1)}50%{transform:scaleX(.75)}to{transform:scaleX(1)}}@keyframes q-skeleton--pulse-y{0%{transform:scaleY(1)}50%{transform:scaleY(.75)}to{transform:scaleY(1)}}@keyframes q-skeleton--wave{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}.q-slide-item{background:#fff;position:relative}.q-slide-item__bottom,.q-slide-item__left,.q-slide-item__right,.q-slide-item__top{color:#fff;font-size:14px;visibility:hidden}.q-slide-item__bottom .q-icon,.q-slide-item__left .q-icon,.q-slide-item__right .q-icon,.q-slide-item__top .q-icon{font-size:1.714em}.q-slide-item__left{background:#4caf50;padding:8px 16px}.q-slide-item__left>div{transform-origin:left center}.q-slide-item__right{background:#ff9800;padding:8px 16px}.q-slide-item__right>div{transform-origin:right center}.q-slide-item__top{background:#2196f3;padding:16px 8px}.q-slide-item__top>div{transform-origin:top center}.q-slide-item__bottom{background:#9c27b0;padding:16px 8px}.q-slide-item__bottom>div{transform-origin:bottom center}.q-slide-item__content{background:inherit;cursor:pointer;transition:transform .2s ease-in;-webkit-user-select:none;user-select:none}.q-slider{position:relative}.q-slider--h{width:100%}.q-slider--v{height:200px}.q-slider--editable .q-slider__track-container{cursor:grab}.q-slider__track-container{outline:0}.q-slider__track-container--h{padding:12px 0;width:100%}.q-slider__track-container--h .q-slider__selection{will-change:width,left}.q-slider__track-container--v{height:100%;padding:0 12px}.q-slider__track-container--v .q-slider__selection{will-change:height,top}.q-slider__track{background:#0000001a;border-radius:4px;color:var(--q-primary);height:inherit;width:inherit}.q-slider__inner{background:#0000001a}.q-slider__inner,.q-slider__selection{border-radius:inherit;height:100%;width:100%}.q-slider__selection{background:currentColor}.q-slider__markers{border-radius:inherit;color:#0000004d;height:100%;width:100%}.q-slider__markers:after{background:currentColor;content:"";position:absolute}.q-slider__markers--h{background-image:repeating-linear-gradient(90deg,currentColor,currentColor 2px,#fff0 0,#fff0)}.q-slider__markers--h:after{height:100%;right:0;top:0;width:2px}.q-slider__markers--v{background-image:repeating-linear-gradient(180deg,currentColor,currentColor 2px,#fff0 0,#fff0)}.q-slider__markers--v:after{bottom:0;height:2px;left:0;width:100%}.q-slider__marker-labels-container{height:100%;min-height:24px;min-width:24px;position:relative;width:100%}.q-slider__marker-labels{position:absolute}.q-slider__marker-labels--h-standard{top:0}.q-slider__marker-labels--h-switched{bottom:0}.q-slider__marker-labels--h-ltr{transform:translateX(-50%)}.q-slider__marker-labels--h-rtl{transform:translateX(50%)}.q-slider__marker-labels--v-standard{left:4px}.q-slider__marker-labels--v-switched{right:4px}.q-slider__marker-labels--v-ltr{transform:translateY(-50%)}.q-slider__marker-labels--v-rtl{transform:translateY(50%)}.q-slider__thumb{color:var(--q-primary);outline:0;transition:transform .18s ease-out,fill .18s ease-out,stroke .18s ease-out;z-index:1}.q-slider__thumb.q-slider--focus{opacity:1!important}.q-slider__thumb--h{top:50%;will-change:left}.q-slider__thumb--h-ltr{transform:scale(1) translate(-50%,-50%)}.q-slider__thumb--h-rtl{transform:scale(1) translate(50%,-50%)}.q-slider__thumb--v{left:50%;will-change:top}.q-slider__thumb--v-ltr{transform:scale(1) translate(-50%,-50%)}.q-slider__thumb--v-rtl{transform:scale(1) translate(-50%,50%)}.q-slider__thumb-shape{stroke-width:3.5;stroke:currentColor;left:0;top:0;transition:transform .28s}.q-slider__thumb-shape path{stroke:currentColor;fill:currentColor}.q-slider__focus-ring{border-radius:50%;opacity:0;transition:transform .26667s ease-out,opacity .26667s ease-out,background-color .26667s ease-out;transition-delay:.14s}.q-slider__pin{opacity:0;transition:opacity .28s ease-out;transition-delay:.14s;white-space:nowrap}.q-slider__pin:before{content:"";height:0;position:absolute;width:0}.q-slider__pin--h:before{border-left:6px solid #0000;border-right:6px solid #0000;left:50%;transform:translateX(-50%)}.q-slider__pin--h-standard{bottom:100%}.q-slider__pin--h-standard:before{border-top:6px solid;bottom:2px}.q-slider__pin--h-switched{top:100%}.q-slider__pin--h-switched:before{border-bottom:6px solid;top:2px}.q-slider__pin--v{top:0}.q-slider__pin--v:before{border-bottom:6px solid #0000;border-top:6px solid #0000;top:50%;transform:translateY(-50%)}.q-slider__pin--v-standard{left:100%}.q-slider__pin--v-standard:before{border-right:6px solid;left:2px}.q-slider__pin--v-switched{right:100%}.q-slider__pin--v-switched:before{border-left:6px solid;right:2px}.q-slider__label{position:absolute;white-space:nowrap;z-index:1}.q-slider__label--h{left:50%;transform:translateX(-50%)}.q-slider__label--h-standard{bottom:7px}.q-slider__label--h-switched{top:7px}.q-slider__label--v{top:50%;transform:translateY(-50%)}.q-slider__label--v-standard{left:7px}.q-slider__label--v-switched{right:7px}.q-slider__text-container{background:currentColor;border-radius:4px;min-height:25px;padding:2px 8px;position:relative;text-align:center}.q-slider__text{color:#fff;font-size:12px}.q-slider--no-value .q-slider__inner,.q-slider--no-value .q-slider__selection,.q-slider--no-value .q-slider__thumb{opacity:0}.q-slider--focus .q-slider__focus-ring,body.desktop .q-slider.q-slider--editable .q-slider__track-container:hover .q-slider__focus-ring{background:currentColor;opacity:.25;transform:scale3d(1.55,1.55,1)}.q-slider--focus .q-slider__inner,.q-slider--focus .q-slider__selection,.q-slider--focus .q-slider__thumb,body.desktop .q-slider.q-slider--editable .q-slider__track-container:hover .q-slider__inner,body.desktop .q-slider.q-slider--editable .q-slider__track-container:hover .q-slider__selection,body.desktop .q-slider.q-slider--editable .q-slider__track-container:hover .q-slider__thumb{opacity:1}.q-slider--inactive .q-slider__thumb--h{transition:left .28s,right .28s}.q-slider--inactive .q-slider__thumb--v{transition:top .28s,bottom .28s}.q-slider--inactive .q-slider__selection{transition:width .28s,left .28s,right .28s,height .28s,top .28s,bottom .28s}.q-slider--inactive .q-slider__text-container{transition:transform .28s}.q-slider--active{cursor:grabbing}.q-slider--active .q-slider__thumb-shape{transform:scale(1.5)}.q-slider--active .q-slider__focus-ring,.q-slider--active.q-slider--label .q-slider__thumb-shape{transform:scale(0)!important}.q-slider--label .q-slider--focus .q-slider__pin,.q-slider--label.q-slider--active .q-slider__pin,.q-slider--label.q-slider--label-always .q-slider__pin,body.desktop .q-slider.q-slider--enabled .q-slider__track-container:hover .q-slider__pin{opacity:1}.q-slider--dark .q-slider__inner,.q-slider--dark .q-slider__track{background:#ffffff1a}.q-slider--dark .q-slider__markers{color:#ffffff4d}.q-slider--dense .q-slider__track-container--h{padding:6px 0}.q-slider--dense .q-slider__track-container--v{padding:0 6px}.q-space{flex-grow:1!important}.q-spinner{vertical-align:middle}.q-spinner-mat{animation:q-spin 2s linear infinite;transform-origin:center center}.q-spinner-mat .path{stroke-dasharray:1,200;stroke-dashoffset:0;animation:q-mat-dash 1.5s ease-in-out infinite}@keyframes q-spin{0%{transform:rotate(0deg)}25%{transform:rotate(90deg)}50%{transform:rotate(180deg)}75%{transform:rotate(270deg)}to{transform:rotate(359deg)}}@keyframes q-mat-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.q-splitter__panel{position:relative;z-index:0}.q-splitter__panel>.q-splitter{height:100%;width:100%}.q-splitter__separator{background-color:#0000001f;position:relative;-webkit-user-select:none;user-select:none;z-index:1}.q-splitter__separator-area>*{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.q-splitter--dark .q-splitter__separator{background-color:#ffffff47}.q-splitter--vertical>.q-splitter__panel{height:100%}.q-splitter--vertical.q-splitter--active{cursor:col-resize}.q-splitter--vertical>.q-splitter__separator{width:1px}.q-splitter--vertical>.q-splitter__separator>div{left:-6px;right:-6px}.q-splitter--vertical.q-splitter--workable>.q-splitter__separator{cursor:col-resize}.q-splitter--horizontal>.q-splitter__panel{width:100%}.q-splitter--horizontal.q-splitter--active{cursor:row-resize}.q-splitter--horizontal>.q-splitter__separator{height:1px}.q-splitter--horizontal>.q-splitter__separator>div{bottom:-6px;top:-6px}.q-splitter--horizontal.q-splitter--workable>.q-splitter__separator{cursor:row-resize}.q-splitter__after,.q-splitter__before{overflow:auto}.q-stepper{background:#fff;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f}.q-stepper__title{font-size:14px;letter-spacing:.1px;line-height:1.285714}.q-stepper__caption{font-size:12px;line-height:1.16667}.q-stepper__dot{background:currentColor;border-radius:50%;contain:layout;font-size:14px;height:24px;margin-right:8px;min-width:24px;width:24px}.q-stepper__dot span{color:#fff}.q-stepper__tab{color:#9e9e9e;flex-direction:row;font-size:14px;padding:8px 24px}.q-stepper--dark{box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-stepper--dark .q-stepper__dot span{color:#000}.q-stepper__tab--navigation{cursor:pointer;-webkit-user-select:none;user-select:none}.q-stepper__tab--active,.q-stepper__tab--done{color:var(--q-primary)}.q-stepper__tab--active .q-stepper__dot,.q-stepper__tab--active .q-stepper__label,.q-stepper__tab--done .q-stepper__dot,.q-stepper__tab--done .q-stepper__label{text-shadow:0 0 0 currentColor}.q-stepper__tab--disabled .q-stepper__dot{background:#00000038}.q-stepper__tab--disabled .q-stepper__label{color:#00000052}.q-stepper__tab--error{color:var(--q-negative)}.q-stepper__tab--error-with-icon .q-stepper__dot{background:#0000!important}.q-stepper__tab--error-with-icon .q-stepper__dot span{color:currentColor;font-size:24px}.q-stepper__header{border-top-left-radius:inherit;border-top-right-radius:inherit}.q-stepper__header--border{border-bottom:1px solid #0000001f}.q-stepper__header--standard-labels .q-stepper__tab{justify-content:center;min-height:72px}.q-stepper__header--standard-labels .q-stepper__tab:first-child{justify-content:flex-start}.q-stepper__header--standard-labels .q-stepper__tab:last-child{justify-content:flex-end}.q-stepper__header--standard-labels .q-stepper__tab:only-child{justify-content:center}.q-stepper__header--standard-labels .q-stepper__dot:after{display:none}.q-stepper__header--alternative-labels .q-stepper__tab{flex-direction:column;justify-content:flex-start;min-height:104px;padding:24px 32px}.q-stepper__header--alternative-labels .q-stepper__dot{margin-right:0}.q-stepper__header--alternative-labels .q-stepper__label{margin-top:8px;text-align:center}.q-stepper__header--alternative-labels .q-stepper__label:after,.q-stepper__header--alternative-labels .q-stepper__label:before{display:none}.q-stepper__header--contracted,.q-stepper__header--contracted.q-stepper__header--alternative-labels .q-stepper__tab{min-height:72px}.q-stepper__header--contracted.q-stepper__header--alternative-labels .q-stepper__tab:first-child{align-items:flex-start}.q-stepper__header--contracted.q-stepper__header--alternative-labels .q-stepper__tab:last-child{align-items:flex-end}.q-stepper__header--contracted .q-stepper__tab{padding:24px 0}.q-stepper__header--contracted .q-stepper__tab:first-child .q-stepper__dot{transform:translateX(24px)}.q-stepper__header--contracted .q-stepper__tab:last-child .q-stepper__dot{transform:translateX(-24px)}.q-stepper__header--contracted .q-stepper__tab:not(:last-child) .q-stepper__dot:after{display:block!important}.q-stepper__header--contracted .q-stepper__dot{margin:0}.q-stepper__header--contracted .q-stepper__label{display:none}.q-stepper__nav{padding-top:24px}.q-stepper--flat{box-shadow:none}.q-stepper--bordered{border:1px solid #0000001f}.q-stepper--horizontal .q-stepper__step-inner{padding:24px}.q-stepper--horizontal .q-stepper__tab:first-child{border-top-left-radius:inherit}.q-stepper--horizontal .q-stepper__tab:last-child{border-top-right-radius:inherit}.q-stepper--horizontal .q-stepper__tab:first-child .q-stepper__dot:before,.q-stepper--horizontal .q-stepper__tab:last-child .q-stepper__dot:after,.q-stepper--horizontal .q-stepper__tab:last-child .q-stepper__label:after{display:none}.q-stepper--horizontal .q-stepper__tab{overflow:hidden}.q-stepper--horizontal .q-stepper__line{contain:layout}.q-stepper--horizontal .q-stepper__line:after,.q-stepper--horizontal .q-stepper__line:before{background:#0000001f;height:1px;position:absolute;top:50%;width:100vw}.q-stepper--horizontal .q-stepper__dot:after,.q-stepper--horizontal .q-stepper__label:after{content:"";left:100%;margin-left:8px}.q-stepper--horizontal .q-stepper__dot:before{content:"";margin-right:8px;right:100%}.q-stepper--horizontal>.q-stepper__nav{padding:0 24px 24px}.q-stepper--vertical{padding:16px 0}.q-stepper--vertical .q-stepper__tab{padding:12px 24px}.q-stepper--vertical .q-stepper__title{line-height:18px}.q-stepper--vertical .q-stepper__step-inner{padding:0 24px 32px 60px}.q-stepper--vertical>.q-stepper__nav{padding:24px 24px 0}.q-stepper--vertical .q-stepper__step{overflow:hidden}.q-stepper--vertical .q-stepper__dot{margin-right:12px}.q-stepper--vertical .q-stepper__dot:after,.q-stepper--vertical .q-stepper__dot:before{background:#0000001f;content:"";height:99999px;left:50%;position:absolute;width:1px}.q-stepper--vertical .q-stepper__dot:before{bottom:100%;margin-bottom:8px}.q-stepper--vertical .q-stepper__dot:after{margin-top:8px;top:100%}.q-stepper--vertical .q-stepper__step:first-child .q-stepper__dot:before,.q-stepper--vertical .q-stepper__step:last-child .q-stepper__dot:after{display:none}.q-stepper--vertical .q-stepper__step:last-child .q-stepper__step-inner{padding-bottom:8px}.q-stepper--dark .q-stepper__header--border,.q-stepper--dark.q-stepper--bordered{border-color:#ffffff47}.q-stepper--dark.q-stepper--horizontal .q-stepper__line:after,.q-stepper--dark.q-stepper--horizontal .q-stepper__line:before,.q-stepper--dark.q-stepper--vertical .q-stepper__dot:after,.q-stepper--dark.q-stepper--vertical .q-stepper__dot:before{background:#ffffff47}.q-stepper--dark .q-stepper__tab--disabled{color:#ffffff47}.q-stepper--dark .q-stepper__tab--disabled .q-stepper__dot{background:#ffffff47}.q-stepper--dark .q-stepper__tab--disabled .q-stepper__label{color:#ffffff8a}.q-tab-panels{background:#fff}.q-tab-panel{padding:16px}.q-markup-table{background:#fff;overflow:auto}.q-table{border-collapse:initial;border-spacing:0;max-width:100%;width:100%}.q-table tbody td,.q-table thead tr{height:48px}.q-table th{font-size:12px;font-weight:500;-webkit-user-select:none;user-select:none}.q-table th.sortable{cursor:pointer}.q-table th.sortable:hover .q-table__sort-icon{opacity:.64}.q-table th.sorted .q-table__sort-icon{opacity:.86!important}.q-table th.sort-desc .q-table__sort-icon{transform:rotate(180deg)}.q-table td,.q-table th{background-color:inherit;padding:7px 16px}.q-table td,.q-table th,.q-table thead{border-style:solid;border-width:0}.q-table tbody td{font-size:13px}.q-table__card{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;color:#000}.q-table__card .q-table__middle{flex:1 1 auto}.q-table__card .q-table__bottom,.q-table__card .q-table__top{flex:0 0 auto}.q-table__container{position:relative}.q-table__container>div:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.q-table__container>div:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.q-table__container>.q-inner-loading{border-radius:inherit!important}.q-table__top{padding:12px 16px}.q-table__top .q-table__control{flex-wrap:wrap}.q-table__title{font-size:20px;font-weight:400;letter-spacing:.005em}.q-table__separator{min-width:8px!important}.q-table__progress{height:0!important}.q-table__progress th{border:0!important;padding:0!important}.q-table__progress .q-linear-progress{bottom:0;position:absolute}.q-table__middle{max-width:100%}.q-table__bottom{font-size:12px;min-height:50px;padding:4px 14px 4px 16px}.q-table__bottom .q-table__control{min-height:24px}.q-table__bottom-nodata-icon{font-size:200%;margin-right:8px}.q-table__bottom-item{margin-right:16px}.q-table__control{align-items:center;display:flex}.q-table__sort-icon{font-size:120%;opacity:0;transition:transform .3s cubic-bezier(.25,.8,.5,1)}.q-table__sort-icon--center,.q-table__sort-icon--left{margin-left:4px}.q-table__sort-icon--right{margin-right:4px}.q-table--col-auto-width{width:1px}.q-table--dark,.q-table__card--dark{box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-table--flat{box-shadow:none}.q-table--bordered{border:1px solid #0000001f}.q-table--square{border-radius:0}.q-table__linear-progress{height:2px}.q-table--no-wrap td,.q-table--no-wrap th{white-space:nowrap}.q-table--grid{border-radius:4px;box-shadow:none}.q-table--grid .q-table__top{padding-bottom:4px}.q-table--grid .q-table__middle{margin-bottom:4px;min-height:2px}.q-table--grid .q-table__middle thead,.q-table--grid .q-table__middle thead th{border:0!important}.q-table--grid .q-table__linear-progress{bottom:0}.q-table--grid .q-table__bottom{border-top:0}.q-table--grid .q-table__grid-content{flex:1 1 auto}.q-table--grid.fullscreen{background:inherit}.q-table__grid-item-card{padding:12px;vertical-align:top}.q-table__grid-item-card .q-separator{margin:12px 0}.q-table__grid-item-row+.q-table__grid-item-row{margin-top:8px}.q-table__grid-item-title{font-size:12px;font-weight:500;opacity:.54}.q-table__grid-item-value{font-size:13px}.q-table__grid-item{padding:4px;transition:transform .3s cubic-bezier(.25,.8,.5,1)}.q-table__grid-item--selected{transform:scale(.95)}.q-table--cell-separator tbody tr:not(:last-child)>td,.q-table--cell-separator thead th,.q-table--horizontal-separator tbody tr:not(:last-child)>td,.q-table--horizontal-separator thead th{border-bottom-width:1px}.q-table--cell-separator td,.q-table--cell-separator th,.q-table--vertical-separator td,.q-table--vertical-separator th{border-left-width:1px}.q-table--cell-separator thead tr:last-child th,.q-table--cell-separator.q-table--loading tr:nth-last-child(2) th,.q-table--vertical-separator thead tr:last-child th,.q-table--vertical-separator.q-table--loading tr:nth-last-child(2) th{border-bottom-width:1px}.q-table--cell-separator td:first-child,.q-table--cell-separator th:first-child,.q-table--vertical-separator td:first-child,.q-table--vertical-separator th:first-child{border-left:0}.q-table--cell-separator .q-table__top,.q-table--vertical-separator .q-table__top{border-bottom:1px solid #0000001f}.q-table--dense .q-table__top{padding:6px 16px}.q-table--dense .q-table__bottom{min-height:33px}.q-table--dense .q-table__sort-icon{font-size:110%}.q-table--dense .q-table td,.q-table--dense .q-table th{padding:4px 8px}.q-table--dense .q-table tbody td,.q-table--dense .q-table tbody tr,.q-table--dense .q-table thead tr{height:28px}.q-table--dense .q-table td:first-child,.q-table--dense .q-table th:first-child{padding-left:16px}.q-table--dense .q-table td:last-child,.q-table--dense .q-table th:last-child{padding-right:16px}.q-table--dense .q-table__bottom-item{margin-right:8px}.q-table--dense .q-table__select .q-field__control,.q-table--dense .q-table__select .q-field__native{min-height:24px;padding:0}.q-table--dense .q-table__select .q-field__marginal{height:24px}.q-table__bottom{border-top:1px solid #0000001f}.q-table td,.q-table th,.q-table thead,.q-table tr{border-color:#0000001f}.q-table tbody td{position:relative}.q-table tbody td:after,.q-table tbody td:before{bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0}.q-table tbody td:before{background:#00000008}.q-table tbody td:after{background:#0000000f}.q-table tbody tr.selected td:after,body.desktop .q-table>tbody>tr:not(.q-tr--no-hover):hover>td:not(.q-td--no-hover):before{content:""}.q-table--dark,.q-table--dark .q-table__bottom,.q-table--dark td,.q-table--dark th,.q-table--dark thead,.q-table--dark tr,.q-table__card--dark{border-color:#ffffff47}.q-table--dark tbody td:before{background:#ffffff12}.q-table--dark tbody td:after{background:#ffffff1a}.q-table--dark.q-table--cell-separator .q-table__top,.q-table--dark.q-table--vertical-separator .q-table__top{border-color:#ffffff47}.q-tab{color:inherit;min-height:48px;padding:0 16px;text-decoration:none;text-transform:uppercase;transition:color .3s,background-color .3s;white-space:nowrap}.q-tab--full{min-height:72px}.q-tab--no-caps{text-transform:none}.q-tab__content{height:inherit;min-width:40px;padding:4px 0}.q-tab__content--inline .q-tab__icon+.q-tab__label{padding-left:8px}.q-tab__content .q-chip--floating{right:-16px;top:0}.q-tab__icon{font-size:24px;height:24px;width:24px}.q-tab__label{font-size:14px;font-weight:500;line-height:1.715em}.q-tab .q-badge{right:-12px;top:3px}.q-tab__alert,.q-tab__alert-icon{position:absolute}.q-tab__alert{background:currentColor;border-radius:50%;height:10px;right:-9px;top:7px;width:10px}.q-tab__alert-icon{font-size:18px;right:-12px;top:2px}.q-tab__indicator{background:currentColor;height:2px;opacity:0}.q-tab--active .q-tab__indicator{opacity:1;transform-origin:left}.q-tab--inactive{opacity:.85}.q-tabs{position:relative;transition:color .3s,background-color .3s}.q-tabs--scrollable.q-tabs__arrows--outside.q-tabs--horizontal{padding-left:36px;padding-right:36px}.q-tabs--scrollable.q-tabs__arrows--outside.q-tabs--vertical{padding-bottom:36px;padding-top:36px}.q-tabs--scrollable.q-tabs__arrows--outside .q-tabs__arrow--faded{opacity:.3;pointer-events:none}.q-tabs--scrollable.q-tabs__arrows--inside .q-tabs__arrow--faded{display:none}.q-tabs--not-scrollable.q-tabs__arrows--outside,body.mobile .q-tabs--scrollable.q-tabs--mobile-without-arrows.q-tabs__arrows--outside{padding-left:0;padding-right:0}.q-tabs--not-scrollable .q-tabs__arrow,body.mobile .q-tabs--scrollable.q-tabs--mobile-without-arrows .q-tabs__arrow{display:none}.q-tabs--not-scrollable .q-tabs__content,body.mobile .q-tabs--scrollable.q-tabs--mobile-without-arrows .q-tabs__content{border-radius:inherit}.q-tabs__arrow{cursor:pointer;font-size:32px;min-width:36px;text-shadow:0 0 3px #fff,0 0 1px #fff,0 0 1px #000;transition:opacity .3s}.q-tabs__content{flex:1 1 auto;overflow:hidden}.q-tabs__content--align-center{justify-content:center}.q-tabs__content--align-right{justify-content:flex-end}.q-tabs__content--align-justify .q-tab{flex:1 1 auto}.q-tabs__offset{display:none}.q-tabs--horizontal .q-tabs__arrow{height:100%}.q-tabs--horizontal .q-tabs__arrow--left{bottom:0;left:0;top:0}.q-tabs--horizontal .q-tabs__arrow--right{bottom:0;right:0;top:0}.q-tabs--vertical,.q-tabs--vertical .q-tabs__content{display:block!important;height:100%}.q-tabs--vertical .q-tabs__arrow{height:36px;text-align:center;width:100%}.q-tabs--vertical .q-tabs__arrow--left{left:0;right:0;top:0}.q-tabs--vertical .q-tabs__arrow--right{bottom:0;left:0;right:0}.q-tabs--vertical .q-tab{padding:0 8px}.q-tabs--vertical .q-tab__indicator{height:unset;width:2px}.q-tabs--vertical.q-tabs--not-scrollable .q-tabs__content{height:100%}.q-tabs--vertical.q-tabs--dense .q-tab__content{min-width:24px}.q-tabs--dense .q-tab{min-height:36px}.q-tabs--dense .q-tab--full{min-height:52px}.q-time{background:#fff;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;max-width:100%;min-width:290px;outline:0;width:290px}.q-time--bordered{border:1px solid #0000001f}.q-time__header{background-color:var(--q-primary);border-top-left-radius:inherit;color:#fff;font-weight:300;padding:16px}.q-time__actions{padding:0 16px 16px}.q-time__header-label{font-size:28px;letter-spacing:-.00833em;line-height:1}.q-time__header-label>div+div{margin-left:4px}.q-time__link{opacity:.56;outline:0;transition:opacity .3s ease-out}.q-time__link--active,.q-time__link:focus,.q-time__link:hover{opacity:1}.q-time__header-ampm{font-size:16px;letter-spacing:.1em}.q-time__content{padding:16px}.q-time__content:before{content:"";display:block;padding-bottom:100%}.q-time__container-parent{padding:16px}.q-time__container-child{background:#0000001f;border-radius:50%}.q-time__clock{font-size:14px;height:100%;max-height:100%;max-width:100%;padding:24px;width:100%}.q-time__clock-circle{position:relative}.q-time__clock-center{background:currentColor;border-radius:50%;height:6px;margin:auto;min-height:0;width:6px}.q-time__clock-pointer{background:currentColor;bottom:0;color:var(--q-primary);height:50%;left:50%;min-height:0;position:absolute;right:0;transform:translateX(-50%);transform-origin:0 0;width:2px}.q-time__clock-pointer:after,.q-time__clock-pointer:before{background:currentColor;border-radius:50%;content:"";left:50%;position:absolute;transform:translateX(-50%)}.q-time__clock-pointer:before{bottom:-4px;height:8px;width:8px}.q-time__clock-pointer:after{height:6px;top:-3px;width:6px}.q-time__clock-position{border-radius:50%;font-size:12px;height:32px;line-height:32px;margin:0;min-height:32px;padding:0;position:absolute;transform:translate(-50%,-50%);width:32px}.q-time__clock-position--disable{opacity:.4}.q-time__clock-position--active{background-color:var(--q-primary);color:#fff}.q-time__clock-pos-0{left:50%;top:0}.q-time__clock-pos-1{left:75%;top:6.7%}.q-time__clock-pos-2{left:93.3%;top:25%}.q-time__clock-pos-3{left:100%;top:50%}.q-time__clock-pos-4{left:93.3%;top:75%}.q-time__clock-pos-5{left:75%;top:93.3%}.q-time__clock-pos-6{left:50%;top:100%}.q-time__clock-pos-7{left:25%;top:93.3%}.q-time__clock-pos-8{left:6.7%;top:75%}.q-time__clock-pos-9{left:0;top:50%}.q-time__clock-pos-10{left:6.7%;top:25%}.q-time__clock-pos-11{left:25%;top:6.7%}.q-time__clock-pos-12{left:50%;top:15%}.q-time__clock-pos-13{left:67.5%;top:19.69%}.q-time__clock-pos-14{left:80.31%;top:32.5%}.q-time__clock-pos-15{left:85%;top:50%}.q-time__clock-pos-16{left:80.31%;top:67.5%}.q-time__clock-pos-17{left:67.5%;top:80.31%}.q-time__clock-pos-18{left:50%;top:85%}.q-time__clock-pos-19{left:32.5%;top:80.31%}.q-time__clock-pos-20{left:19.69%;top:67.5%}.q-time__clock-pos-21{left:15%;top:50%}.q-time__clock-pos-22{left:19.69%;top:32.5%}.q-time__clock-pos-23{left:32.5%;top:19.69%}.q-time__now-button{background-color:var(--q-primary);color:#fff;right:12px;top:12px}.q-time--readonly .q-time__content,.q-time--readonly .q-time__header-ampm,.q-time.disabled .q-time__content,.q-time.disabled .q-time__header-ampm{pointer-events:none}.q-time--portrait{display:inline-flex;flex-direction:column}.q-time--portrait .q-time__header{border-top-right-radius:inherit;min-height:86px}.q-time--portrait .q-time__header-ampm{margin-left:12px}.q-time--portrait.q-time--bordered .q-time__content{margin:1px 0}.q-time--landscape{align-items:stretch;display:inline-flex;min-width:420px}.q-time--landscape>div{display:flex;flex-direction:column;justify-content:center}.q-time--landscape .q-time__header{border-bottom-left-radius:inherit;min-width:156px}.q-time--landscape .q-time__header-ampm{margin-top:12px}.q-time--dark{border-color:#ffffff47;box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-timeline{list-style:none;padding:0;width:100%}.q-timeline h6{line-height:inherit}.q-timeline--dark{color:#fff}.q-timeline--dark .q-timeline__subtitle{opacity:.7}.q-timeline__content{padding-bottom:24px}.q-timeline__title{margin-bottom:16px;margin-top:0}.q-timeline__subtitle{font-size:12px;font-weight:700;letter-spacing:1px;margin-bottom:8px;opacity:.6;text-transform:uppercase}.q-timeline__dot{bottom:0;position:absolute;top:0;width:15px}.q-timeline__dot:after,.q-timeline__dot:before{background:currentColor;content:"";display:block;position:absolute}.q-timeline__dot:before{border:3px solid #0000;border-radius:100%;height:15px;left:0;top:4px;transition:background .3s ease-in-out,border .3s ease-in-out;width:15px}.q-timeline__dot:after{bottom:0;left:6px;opacity:.4;top:24px;width:3px}.q-timeline__dot .q-icon{color:#fff;font-size:16px;height:38px;left:0;line-height:38px;position:absolute;right:0;top:0;width:100%}.q-timeline__dot .q-icon>img,.q-timeline__dot .q-icon>svg{height:1em;width:1em}.q-timeline__dot-img{background:currentColor;border-radius:50%;height:31px;left:0;position:absolute;right:0;top:4px;width:31px}.q-timeline__heading{position:relative}.q-timeline__heading:first-child .q-timeline__heading-title{padding-top:0}.q-timeline__heading:last-child .q-timeline__heading-title{padding-bottom:0}.q-timeline__heading-title{margin:0;padding:32px 0}.q-timeline__entry{line-height:22px;position:relative}.q-timeline__entry:last-child{padding-bottom:0!important}.q-timeline__entry:last-child .q-timeline__dot:after{content:none}.q-timeline__entry--icon .q-timeline__dot{width:31px}.q-timeline__entry--icon .q-timeline__dot:before{height:31px;width:31px}.q-timeline__entry--icon .q-timeline__dot:after{left:14px;top:41px}.q-timeline__entry--icon .q-timeline__subtitle{padding-top:8px}.q-timeline--dense--right .q-timeline__entry{padding-left:40px}.q-timeline--dense--right .q-timeline__entry--icon .q-timeline__dot{left:-8px}.q-timeline--dense--right .q-timeline__dot{left:0}.q-timeline--dense--left .q-timeline__heading{text-align:right}.q-timeline--dense--left .q-timeline__entry{padding-right:40px}.q-timeline--dense--left .q-timeline__entry--icon .q-timeline__dot{right:-8px}.q-timeline--dense--left .q-timeline__content,.q-timeline--dense--left .q-timeline__subtitle,.q-timeline--dense--left .q-timeline__title{text-align:right}.q-timeline--dense--left .q-timeline__dot{right:0}.q-timeline--comfortable{display:table}.q-timeline--comfortable .q-timeline__heading{display:table-row;font-size:200%}.q-timeline--comfortable .q-timeline__heading>div{display:table-cell}.q-timeline--comfortable .q-timeline__entry{display:table-row;padding:0}.q-timeline--comfortable .q-timeline__entry--icon .q-timeline__content{padding-top:8px}.q-timeline--comfortable .q-timeline__content,.q-timeline--comfortable .q-timeline__dot,.q-timeline--comfortable .q-timeline__subtitle{display:table-cell;vertical-align:top}.q-timeline--comfortable .q-timeline__subtitle{width:35%}.q-timeline--comfortable .q-timeline__dot{min-width:31px;position:relative}.q-timeline--comfortable--right .q-timeline__heading .q-timeline__heading-title{margin-left:-50px}.q-timeline--comfortable--right .q-timeline__subtitle{padding-right:30px;text-align:right}.q-timeline--comfortable--right .q-timeline__content{padding-left:30px}.q-timeline--comfortable--right .q-timeline__entry--icon .q-timeline__dot{left:-8px}.q-timeline--comfortable--left .q-timeline__heading{text-align:right}.q-timeline--comfortable--left .q-timeline__heading .q-timeline__heading-title{margin-right:-50px}.q-timeline--comfortable--left .q-timeline__subtitle{padding-left:30px}.q-timeline--comfortable--left .q-timeline__content{padding-right:30px}.q-timeline--comfortable--left .q-timeline__content,.q-timeline--comfortable--left .q-timeline__title{text-align:right}.q-timeline--comfortable--left .q-timeline__entry--icon .q-timeline__dot{right:0}.q-timeline--comfortable--left .q-timeline__dot{right:-8px}.q-timeline--loose .q-timeline__heading-title{margin-left:0;text-align:center}.q-timeline--loose .q-timeline__content,.q-timeline--loose .q-timeline__dot,.q-timeline--loose .q-timeline__entry,.q-timeline--loose .q-timeline__subtitle{display:block;margin:0;padding:0}.q-timeline--loose .q-timeline__dot{left:50%;margin-left:-7.15px;position:absolute}.q-timeline--loose .q-timeline__entry{overflow:hidden;padding-bottom:24px}.q-timeline--loose .q-timeline__entry--icon .q-timeline__dot{margin-left:-15px}.q-timeline--loose .q-timeline__entry--icon .q-timeline__subtitle{line-height:38px}.q-timeline--loose .q-timeline__entry--icon .q-timeline__content{padding-top:8px}.q-timeline--loose .q-timeline__entry--left .q-timeline__content,.q-timeline--loose .q-timeline__entry--right .q-timeline__subtitle{float:left;padding-right:30px;text-align:right}.q-timeline--loose .q-timeline__entry--left .q-timeline__subtitle,.q-timeline--loose .q-timeline__entry--right .q-timeline__content{float:right;padding-left:30px;text-align:left}.q-timeline--loose .q-timeline__content,.q-timeline--loose .q-timeline__subtitle{width:50%}.q-toggle{vertical-align:middle}.q-toggle__native{height:1px;width:1px}.q-toggle__track{background:currentColor;border-radius:.175em;height:.35em;opacity:.38}.q-toggle__thumb{height:.5em;left:.25em;top:.25em;transition:left .22s cubic-bezier(.4,0,.2,1);-webkit-user-select:none;user-select:none;width:.5em;z-index:0}.q-toggle__thumb:after{background:#fff;border-radius:50%;bottom:0;box-shadow:0 3px 1px -2px #0003,0 2px 2px 0 #00000024,0 1px 5px 0 #0000001f;content:"";left:0;position:absolute;right:0;top:0}.q-toggle__thumb .q-icon{color:#000;font-size:.3em;min-width:1em;opacity:.54;z-index:1}.q-toggle__inner{font-size:40px;height:1em;min-width:1.4em;padding:.325em .3em;-webkit-print-color-adjust:exact;width:1.4em}.q-toggle__inner--indet .q-toggle__thumb{left:.45em}.q-toggle__inner--truthy{color:var(--q-primary)}.q-toggle__inner--truthy .q-toggle__track{opacity:.54}.q-toggle__inner--truthy .q-toggle__thumb{left:.65em}.q-toggle__inner--truthy .q-toggle__thumb:after{background-color:currentColor}.q-toggle__inner--truthy .q-toggle__thumb .q-icon{color:#fff;opacity:1}.q-toggle.disabled{opacity:.75!important}.q-toggle--dark .q-toggle__inner{color:#fff}.q-toggle--dark .q-toggle__inner--truthy{color:var(--q-primary)}.q-toggle--dark .q-toggle__thumb:after{box-shadow:none}.q-toggle--dark .q-toggle__thumb:before{opacity:.32!important}.q-toggle--dense .q-toggle__inner{height:.5em;min-width:.8em;padding:.07625em 0;width:.8em}.q-toggle--dense .q-toggle__thumb{left:0;top:0}.q-toggle--dense .q-toggle__inner--indet .q-toggle__thumb{left:.15em}.q-toggle--dense .q-toggle__inner--truthy .q-toggle__thumb{left:.3em}.q-toggle--dense .q-toggle__label{padding-left:.5em}.q-toggle--dense.reverse .q-toggle__label{padding-left:0;padding-right:.5em}body.desktop .q-toggle:not(.disabled) .q-toggle__thumb:before{background:currentColor;border-radius:50%;bottom:0;content:"";left:0;opacity:.12;position:absolute;right:0;top:0;transform:scale3d(0,0,1);transition:transform .22s cubic-bezier(0,0,.2,1)}body.desktop .q-toggle:not(.disabled):focus .q-toggle__thumb:before,body.desktop .q-toggle:not(.disabled):hover .q-toggle__thumb:before{transform:scale3d(2,2,1)}body.desktop .q-toggle--dense:not(.disabled):focus .q-toggle__thumb:before,body.desktop .q-toggle--dense:not(.disabled):hover .q-toggle__thumb:before{transform:scale3d(1.5,1.5,1)}.q-toolbar{min-height:50px;padding:0 12px;position:relative;width:100%}.q-toolbar--inset{padding-left:58px}.q-toolbar .q-avatar{font-size:38px}.q-toolbar__title{flex:1 1 0%;font-size:21px;font-weight:400;letter-spacing:.01em;max-width:100%;min-width:1px;padding:0 12px}.q-toolbar__title:first-child{padding-left:0}.q-toolbar__title:last-child{padding-right:0}.q-tooltip--style{background:#757575;border-radius:4px;color:#fafafa;font-size:10px;font-weight:400;text-transform:none}.q-tooltip{max-height:65vh;max-width:95vw;overflow-x:hidden;overflow-y:auto;padding:6px 10px;position:fixed!important;z-index:9000}@media (max-width:599.98px){.q-tooltip{font-size:14px;padding:8px 16px}}.q-tree{color:#9e9e9e;position:relative}.q-tree__node{padding:0 0 3px 22px}.q-tree__node:after{border-left:1px solid;bottom:0;content:"";left:-13px;position:absolute;right:auto;top:-3px;width:2px}.q-tree__node:last-child:after{display:none}.q-tree__node--disabled{pointer-events:none}.q-tree__node--disabled .disabled{opacity:1!important}.q-tree__node--disabled>.disabled,.q-tree__node--disabled>div,.q-tree__node--disabled>i{opacity:.6!important}.q-tree__node--disabled>.disabled .q-tree__node--disabled>.disabled,.q-tree__node--disabled>.disabled .q-tree__node--disabled>div,.q-tree__node--disabled>.disabled .q-tree__node--disabled>i,.q-tree__node--disabled>div .q-tree__node--disabled>.disabled,.q-tree__node--disabled>div .q-tree__node--disabled>div,.q-tree__node--disabled>div .q-tree__node--disabled>i,.q-tree__node--disabled>i .q-tree__node--disabled>.disabled,.q-tree__node--disabled>i .q-tree__node--disabled>div,.q-tree__node--disabled>i .q-tree__node--disabled>i{opacity:1!important}.q-tree__node-header:before{border-bottom:1px solid;border-left:1px solid;bottom:50%;content:"";left:-35px;position:absolute;top:-3px;width:31px}.q-tree__children{padding-left:25px}.q-tree__node-body{padding:5px 0 8px 5px}.q-tree__node--parent{padding-left:2px}.q-tree__node--parent>.q-tree__node-header:before{left:-15px;width:15px}.q-tree__node--parent>.q-tree__node-collapsible>.q-tree__node-body{padding:5px 0 8px 27px}.q-tree__node--parent>.q-tree__node-collapsible>.q-tree__node-body:after{border-left:1px solid;bottom:50px;content:"";height:100%;left:12px;position:absolute;right:auto;top:0;width:2px}.q-tree__node--link{cursor:pointer}.q-tree__node-header{border-radius:4px;margin-top:3px;outline:0;padding:4px}.q-tree__node-header-content{color:#000;transition:color .3s}.q-tree__node--selected .q-tree__node-header-content{color:#9e9e9e}.q-tree__icon,.q-tree__node-header-content .q-icon{font-size:21px}.q-tree__img{border-radius:2px;height:42px}.q-tree__avatar,.q-tree__node-header-content .q-avatar{border-radius:50%;font-size:28px;height:28px;width:28px}.q-tree__arrow,.q-tree__spinner{font-size:16px;margin-right:4px}.q-tree__arrow{transition:transform .3s}.q-tree__arrow--rotate{transform:rotate(90deg)}.q-tree__tickbox{margin-right:4px}.q-tree>.q-tree__node{padding:0}.q-tree>.q-tree__node:after,.q-tree>.q-tree__node>.q-tree__node-header:before{display:none}.q-tree>.q-tree__node--child>.q-tree__node-header{padding-left:24px}.q-tree--dark .q-tree__node-header-content{color:#fff}.q-tree--no-connectors .q-tree__node-body:after,.q-tree--no-connectors .q-tree__node-header:before,.q-tree--no-connectors .q-tree__node:after{display:none!important}.q-tree--dense>.q-tree__node--child>.q-tree__node-header{padding-left:1px}.q-tree--dense .q-tree__arrow,.q-tree--dense .q-tree__spinner{margin-right:1px}.q-tree--dense .q-tree__img{height:32px}.q-tree--dense .q-tree__tickbox{margin-right:3px}.q-tree--dense .q-tree__node{padding:0}.q-tree--dense .q-tree__node:after{left:-8px;top:0}.q-tree--dense .q-tree__node-header{margin-top:0;padding:1px}.q-tree--dense .q-tree__node-header:before{left:-8px;top:0;width:8px}.q-tree--dense .q-tree__node--child{padding-left:17px}.q-tree--dense .q-tree__node--child>.q-tree__node-header:before{left:-25px;width:21px}.q-tree--dense .q-tree__node-body{padding:0 0 2px}.q-tree--dense .q-tree__node--parent>.q-tree__node-collapsible>.q-tree__node-body{padding:0 0 2px 20px}.q-tree--dense .q-tree__node--parent>.q-tree__node-collapsible>.q-tree__node-body:after{left:8px}.q-tree--dense .q-tree__children{padding-left:16px}[dir=rtl] .q-tree__arrow{transform:rotate(180deg)}[dir=rtl] .q-tree__arrow--rotate{transform:rotate(90deg)}.q-uploader{background:#fff;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;max-height:320px;position:relative;vertical-align:top;width:320px}.q-uploader--bordered{border:1px solid #0000001f}.q-uploader__input{cursor:pointer!important;height:100%;opacity:0;width:100%;z-index:1}.q-uploader__input::-webkit-file-upload-button{cursor:pointer}.q-uploader__file:before{background:currentColor;bottom:0;content:"";left:0;opacity:.04;pointer-events:none;position:absolute;right:0;top:0}.q-uploader__file:before,.q-uploader__header{border-top-left-radius:inherit;border-top-right-radius:inherit}.q-uploader__header{background-color:var(--q-primary);color:#fff;position:relative;width:100%}.q-uploader__spinner{font-size:24px;margin-right:4px}.q-uploader__header-content{padding:8px}.q-uploader__dnd{background:#fff9;outline:1px dashed currentColor;outline-offset:-4px}.q-uploader__overlay{background-color:#fff9;color:#000;font-size:36px}.q-uploader__list{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;flex:1 1 auto;min-height:60px;padding:8px;position:relative}.q-uploader__file{border:1px solid #0000001f;border-radius:4px 4px 0 0}.q-uploader__file .q-circular-progress{font-size:24px}.q-uploader__file--img{background-position:50% 50%;background-repeat:no-repeat;color:#fff;height:200px;min-width:200px}.q-uploader__file--img:before{content:none}.q-uploader__file--img .q-circular-progress{color:#fff}.q-uploader__file--img .q-uploader__file-header{background:linear-gradient(180deg,#000000b3 20%,#fff0);padding-bottom:24px}.q-uploader__file+.q-uploader__file{margin-top:8px}.q-uploader__file-header{border-top-left-radius:inherit;border-top-right-radius:inherit;padding:4px 8px;position:relative}.q-uploader__file-header-content{padding-right:8px}.q-uploader__file-status{font-size:24px;margin-right:4px}.q-uploader__title{font-size:14px;font-weight:700;line-height:1.285714;word-break:break-word}.q-uploader__subtitle{font-size:12px;line-height:1.5}.q-uploader--disable .q-uploader__header,.q-uploader--disable .q-uploader__list{pointer-events:none}.q-uploader--dark{box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}.q-uploader--dark,.q-uploader--dark .q-uploader__file{border-color:#ffffff47}.q-uploader--dark .q-uploader__dnd,.q-uploader--dark .q-uploader__overlay{background:#ffffff4d}.q-uploader--dark .q-uploader__overlay{color:#fff}.q-video{border-radius:inherit;overflow:hidden;position:relative}.q-video embed,.q-video iframe,.q-video object{height:100%;width:100%}.q-video--responsive{height:0}.q-video--responsive embed,.q-video--responsive iframe,.q-video--responsive object{left:0;position:absolute;top:0}.q-virtual-scroll:focus{outline:0}.q-virtual-scroll__content{contain:content;outline:none}.q-virtual-scroll__content>*{overflow-anchor:none}.q-virtual-scroll__content>[data-q-vs-anchor]{overflow-anchor:auto}.q-virtual-scroll__padding{background:linear-gradient(#fff0,#fff0 20%,#80808008 0,#80808014 50%,#80808008 80%,#fff0 0,#fff0);background-size:var(--q-virtual-scroll-item-width,100%) var(--q-virtual-scroll-item-height,50px)}.q-table .q-virtual-scroll__padding tr{height:0!important}.q-table .q-virtual-scroll__padding td{padding:0!important}.q-virtual-scroll--horizontal{align-items:stretch}.q-virtual-scroll--horizontal,.q-virtual-scroll--horizontal .q-virtual-scroll__content{display:flex;flex-direction:row;flex-wrap:nowrap}.q-virtual-scroll--horizontal .q-virtual-scroll__content,.q-virtual-scroll--horizontal .q-virtual-scroll__content>*,.q-virtual-scroll--horizontal .q-virtual-scroll__padding{flex:0 0 auto}.q-virtual-scroll--horizontal .q-virtual-scroll__padding{background:linear-gradient(270deg,#fff0,#fff0 20%,#80808008 0,#80808014 50%,#80808008 80%,#fff0 0,#fff0);background-size:var(--q-virtual-scroll-item-width,50px) var(--q-virtual-scroll-item-height,100%)}.q-ripple{border-radius:inherit;contain:strict;height:100%;overflow:hidden;width:100%;z-index:0}.q-ripple,.q-ripple__inner{color:inherit;left:0;pointer-events:none;position:absolute;top:0}.q-ripple__inner{background:currentColor;border-radius:50%;opacity:0;will-change:transform,opacity}.q-ripple__inner--enter{transition:transform .225s cubic-bezier(.4,0,.2,1),opacity .1s cubic-bezier(.4,0,.2,1)}.q-ripple__inner--leave{transition:opacity .25s cubic-bezier(.4,0,.2,1)}.q-morph--internal,.q-morph--invisible{bottom:200vh!important;opacity:0!important;pointer-events:none!important;position:fixed!important;right:200vw!important}.q-bottom-sheet{padding-bottom:8px}.q-bottom-sheet__avatar{border-radius:50%}.q-bottom-sheet--list{width:400px}.q-bottom-sheet--list .q-icon,.q-bottom-sheet--list img{font-size:24px;height:24px;width:24px}.q-bottom-sheet--grid{width:700px}.q-bottom-sheet--grid .q-bottom-sheet__item{min-width:100px;padding:8px;text-align:center}.q-bottom-sheet--grid .q-bottom-sheet__empty-icon,.q-bottom-sheet--grid .q-icon,.q-bottom-sheet--grid img{font-size:48px;height:48px;margin-bottom:8px;width:48px}.q-bottom-sheet--grid .q-separator{margin:12px 0}.q-bottom-sheet__item{flex:0 0 33.3333%}@media (min-width:600px){.q-bottom-sheet__item{flex:0 0 25%}}.q-dialog-plugin{width:400px}.q-dialog-plugin__form{max-height:50vh}.q-dialog-plugin .q-card__section+.q-card__section{padding-top:0}.q-dialog-plugin--progress{text-align:center}.q-loading{color:#000;position:fixed!important}.q-loading__backdrop{background-color:#000;bottom:0;left:0;opacity:.5;position:fixed;right:0;top:0;transition:background-color .28s;z-index:-1}.q-loading__box{border-radius:4px;color:#fff;max-width:450px;padding:18px}.q-loading__message{margin:40px 20px 0;text-align:center}.q-notifications__list{left:0;margin-bottom:10px;pointer-events:none;position:relative;right:0;z-index:9500}.q-notifications__list--center{bottom:0;top:0}.q-notifications__list--top{top:0}.q-notifications__list--bottom{bottom:0}body.q-ios-padding .q-notifications__list--center,body.q-ios-padding .q-notifications__list--top{top:20px;top:env(safe-area-inset-top)}body.q-ios-padding .q-notifications__list--bottom,body.q-ios-padding .q-notifications__list--center{bottom:env(safe-area-inset-bottom)}.q-notification{background:#323232;border-radius:4px;box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f;color:#fff;display:inline-flex;flex-shrink:0;font-size:14px;margin:10px 10px 0;max-width:95vw;pointer-events:all;transition:transform 1s,opacity 1s;z-index:9500}.q-notification__icon{flex:0 0 1em;font-size:24px}.q-notification__icon--additional{margin-right:16px}.q-notification__avatar{font-size:32px}.q-notification__avatar--additional{margin-right:8px}.q-notification__spinner{font-size:32px}.q-notification__spinner--additional{margin-right:8px}.q-notification__message{padding:8px 0}.q-notification__caption{font-size:.9em;opacity:.7}.q-notification__actions{color:var(--q-primary)}.q-notification__badge{animation:q-notif-badge .42s;background-color:var(--q-negative);border-radius:4px;box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f;color:#fff;font-size:12px;line-height:12px;padding:4px 8px;position:absolute}.q-notification__badge--top-left,.q-notification__badge--top-right{top:-6px}.q-notification__badge--bottom-left,.q-notification__badge--bottom-right{bottom:-6px}.q-notification__badge--bottom-left,.q-notification__badge--top-left{left:-22px}.q-notification__badge--bottom-right,.q-notification__badge--top-right{right:-22px}.q-notification__progress{animation:q-notif-progress linear;background:currentColor;border-radius:4px 4px 0 0;bottom:0;height:3px;left:-10px;opacity:.3;position:absolute;right:-10px;transform:scaleX(0);transform-origin:0 50%;z-index:-1}.q-notification--standard{min-height:48px;padding:0 16px}.q-notification--standard .q-notification__actions{margin-right:-8px;padding:6px 0 6px 8px}.q-notification--multi-line{min-height:68px;padding:8px 16px}.q-notification--multi-line .q-notification__badge--top-left,.q-notification--multi-line .q-notification__badge--top-right{top:-15px}.q-notification--multi-line .q-notification__badge--bottom-left,.q-notification--multi-line .q-notification__badge--bottom-right{bottom:-15px}.q-notification--multi-line .q-notification__progress{bottom:-8px}.q-notification--multi-line .q-notification__actions{padding:0}.q-notification--multi-line .q-notification__actions--with-media{padding-left:25px}.q-notification--top-enter-from,.q-notification--top-leave-to,.q-notification--top-left-enter-from,.q-notification--top-left-leave-to,.q-notification--top-right-enter-from,.q-notification--top-right-leave-to{opacity:0;transform:translateY(-50px);z-index:9499}.q-notification--center-enter-from,.q-notification--center-leave-to,.q-notification--left-enter-from,.q-notification--left-leave-to,.q-notification--right-enter-from,.q-notification--right-leave-to{opacity:0;transform:rotateX(90deg);z-index:9499}.q-notification--bottom-enter-from,.q-notification--bottom-leave-to,.q-notification--bottom-left-enter-from,.q-notification--bottom-left-leave-to,.q-notification--bottom-right-enter-from,.q-notification--bottom-right-leave-to{opacity:0;transform:translateY(50px);z-index:9499}.q-notification--bottom-leave-active,.q-notification--bottom-left-leave-active,.q-notification--bottom-right-leave-active,.q-notification--center-leave-active,.q-notification--left-leave-active,.q-notification--right-leave-active,.q-notification--top-leave-active,.q-notification--top-left-leave-active,.q-notification--top-right-leave-active{margin-left:0;margin-right:0;position:absolute;z-index:9499}.q-notification--center-leave-active,.q-notification--top-leave-active{top:0}.q-notification--bottom-leave-active,.q-notification--bottom-left-leave-active,.q-notification--bottom-right-leave-active{bottom:0}@media (min-width:600px){.q-notification{max-width:65vw}}@keyframes q-notif-badge{15%{transform:translate3d(-25%,0,0) rotate(-5deg)}30%{transform:translate3d(20%,0,0) rotate(3deg)}45%{transform:translate3d(-15%,0,0) rotate(-3deg)}60%{transform:translate3d(10%,0,0) rotate(2deg)}75%{transform:translate3d(-5%,0,0) rotate(-1deg)}}@keyframes q-notif-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}:root{--animate-duration:0.3s;--animate-delay:0.3s;--animate-repeat:1}.animated{animation-duration:var(--animate-duration);animation-fill-mode:both}.animated.infinite{animation-iteration-count:infinite}.animated.hinge{animation-duration:2s}.animated.repeat-1{animation-iteration-count:var(--animate-repeat)}.animated.repeat-2{animation-iteration-count:calc(var(--animate-repeat)*2)}.animated.repeat-3{animation-iteration-count:calc(var(--animate-repeat)*3)}.animated.delay-1s{animation-delay:var(--animate-delay)}.animated.delay-2s{animation-delay:calc(var(--animate-delay)*2)}.animated.delay-3s{animation-delay:calc(var(--animate-delay)*3)}.animated.delay-4s{animation-delay:calc(var(--animate-delay)*4)}.animated.delay-5s{animation-delay:calc(var(--animate-delay)*5)}.animated.faster{animation-duration:calc(var(--animate-duration)/2)}.animated.fast{animation-duration:calc(var(--animate-duration)*.8)}.animated.slow{animation-duration:calc(var(--animate-duration)*2)}.animated.slower{animation-duration:calc(var(--animate-duration)*3)}@media (prefers-reduced-motion:reduce),print{.animated{animation-duration:1ms!important;animation-iteration-count:1!important;transition-duration:1ms!important}.animated[class*=Out]{opacity:0}}.q-animate--scale{animation:q-scale .15s;animation-timing-function:cubic-bezier(.25,.8,.25,1)}@keyframes q-scale{0%{transform:scale(1)}50%{transform:scale(1.04)}to{transform:scale(1)}}.q-animate--fade{animation:q-fade .2s}@keyframes q-fade{0%{opacity:0}to{opacity:1}}:root{--q-primary:#1f2937;--q-secondary:#e69e3b;--q-accent:#31316a;--q-positive:#10b981;--q-negative:#e11d48;--q-info:#2361ce;--q-warning:#fba918;--q-dark:#111827;--q-dark-page:#121212}.text-dark{color:var(--q-dark)!important}.bg-dark{background:var(--q-dark)!important}.text-primary{color:var(--q-primary)!important}.bg-primary{background:var(--q-primary)!important}.text-secondary{color:var(--q-secondary)!important}.bg-secondary{background:var(--q-secondary)!important}.text-accent{color:var(--q-accent)!important}.bg-accent{background:var(--q-accent)!important}.text-positive{color:var(--q-positive)!important}.bg-positive{background:var(--q-positive)!important}.text-negative{color:var(--q-negative)!important}.bg-negative{background:var(--q-negative)!important}.text-info{color:var(--q-info)!important}.bg-info{background:var(--q-info)!important}.text-warning{color:var(--q-warning)!important}.bg-warning{background:var(--q-warning)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.text-transparent{color:#0000!important}.bg-transparent{background:#0000!important}.text-separator{color:#0000001f!important}.bg-separator{background:#0000001f!important}.text-dark-separator{color:#ffffff47!important}.bg-dark-separator{background:#ffffff47!important}.text-red{color:#f44336!important}.text-red-1{color:#ffebee!important}.text-red-2{color:#ffcdd2!important}.text-red-3{color:#ef9a9a!important}.text-red-4{color:#e57373!important}.text-red-5{color:#ef5350!important}.text-red-6{color:#f44336!important}.text-red-7{color:#e53935!important}.text-red-8{color:#d32f2f!important}.text-red-9{color:#c62828!important}.text-red-10{color:#b71c1c!important}.text-red-11{color:#ff8a80!important}.text-red-12{color:#ff5252!important}.text-red-13{color:#ff1744!important}.text-red-14{color:#d50000!important}.text-pink{color:#e91e63!important}.text-pink-1{color:#fce4ec!important}.text-pink-2{color:#f8bbd0!important}.text-pink-3{color:#f48fb1!important}.text-pink-4{color:#f06292!important}.text-pink-5{color:#ec407a!important}.text-pink-6{color:#e91e63!important}.text-pink-7{color:#d81b60!important}.text-pink-8{color:#c2185b!important}.text-pink-9{color:#ad1457!important}.text-pink-10{color:#880e4f!important}.text-pink-11{color:#ff80ab!important}.text-pink-12{color:#ff4081!important}.text-pink-13{color:#f50057!important}.text-pink-14{color:#c51162!important}.text-purple{color:#9c27b0!important}.text-purple-1{color:#f3e5f5!important}.text-purple-2{color:#e1bee7!important}.text-purple-3{color:#ce93d8!important}.text-purple-4{color:#ba68c8!important}.text-purple-5{color:#ab47bc!important}.text-purple-6{color:#9c27b0!important}.text-purple-7{color:#8e24aa!important}.text-purple-8{color:#7b1fa2!important}.text-purple-9{color:#6a1b9a!important}.text-purple-10{color:#4a148c!important}.text-purple-11{color:#ea80fc!important}.text-purple-12{color:#e040fb!important}.text-purple-13{color:#d500f9!important}.text-purple-14{color:#a0f!important}.text-deep-purple{color:#673ab7!important}.text-deep-purple-1{color:#ede7f6!important}.text-deep-purple-2{color:#d1c4e9!important}.text-deep-purple-3{color:#b39ddb!important}.text-deep-purple-4{color:#9575cd!important}.text-deep-purple-5{color:#7e57c2!important}.text-deep-purple-6{color:#673ab7!important}.text-deep-purple-7{color:#5e35b1!important}.text-deep-purple-8{color:#512da8!important}.text-deep-purple-9{color:#4527a0!important}.text-deep-purple-10{color:#311b92!important}.text-deep-purple-11{color:#b388ff!important}.text-deep-purple-12{color:#7c4dff!important}.text-deep-purple-13{color:#651fff!important}.text-deep-purple-14{color:#6200ea!important}.text-indigo{color:#3f51b5!important}.text-indigo-1{color:#e8eaf6!important}.text-indigo-2{color:#c5cae9!important}.text-indigo-3{color:#9fa8da!important}.text-indigo-4{color:#7986cb!important}.text-indigo-5{color:#5c6bc0!important}.text-indigo-6{color:#3f51b5!important}.text-indigo-7{color:#3949ab!important}.text-indigo-8{color:#303f9f!important}.text-indigo-9{color:#283593!important}.text-indigo-10{color:#1a237e!important}.text-indigo-11{color:#8c9eff!important}.text-indigo-12{color:#536dfe!important}.text-indigo-13{color:#3d5afe!important}.text-indigo-14{color:#304ffe!important}.text-blue{color:#2196f3!important}.text-blue-1{color:#e3f2fd!important}.text-blue-2{color:#bbdefb!important}.text-blue-3{color:#90caf9!important}.text-blue-4{color:#64b5f6!important}.text-blue-5{color:#42a5f5!important}.text-blue-6{color:#2196f3!important}.text-blue-7{color:#1e88e5!important}.text-blue-8{color:#1976d2!important}.text-blue-9{color:#1565c0!important}.text-blue-10{color:#0d47a1!important}.text-blue-11{color:#82b1ff!important}.text-blue-12{color:#448aff!important}.text-blue-13{color:#2979ff!important}.text-blue-14{color:#2962ff!important}.text-light-blue{color:#03a9f4!important}.text-light-blue-1{color:#e1f5fe!important}.text-light-blue-2{color:#b3e5fc!important}.text-light-blue-3{color:#81d4fa!important}.text-light-blue-4{color:#4fc3f7!important}.text-light-blue-5{color:#29b6f6!important}.text-light-blue-6{color:#03a9f4!important}.text-light-blue-7{color:#039be5!important}.text-light-blue-8{color:#0288d1!important}.text-light-blue-9{color:#0277bd!important}.text-light-blue-10{color:#01579b!important}.text-light-blue-11{color:#80d8ff!important}.text-light-blue-12{color:#40c4ff!important}.text-light-blue-13{color:#00b0ff!important}.text-light-blue-14{color:#0091ea!important}.text-cyan{color:#00bcd4!important}.text-cyan-1{color:#e0f7fa!important}.text-cyan-2{color:#b2ebf2!important}.text-cyan-3{color:#80deea!important}.text-cyan-4{color:#4dd0e1!important}.text-cyan-5{color:#26c6da!important}.text-cyan-6{color:#00bcd4!important}.text-cyan-7{color:#00acc1!important}.text-cyan-8{color:#0097a7!important}.text-cyan-9{color:#00838f!important}.text-cyan-10{color:#006064!important}.text-cyan-11{color:#84ffff!important}.text-cyan-12{color:#18ffff!important}.text-cyan-13{color:#00e5ff!important}.text-cyan-14{color:#00b8d4!important}.text-teal{color:#009688!important}.text-teal-1{color:#e0f2f1!important}.text-teal-2{color:#b2dfdb!important}.text-teal-3{color:#80cbc4!important}.text-teal-4{color:#4db6ac!important}.text-teal-5{color:#26a69a!important}.text-teal-6{color:#009688!important}.text-teal-7{color:#00897b!important}.text-teal-8{color:#00796b!important}.text-teal-9{color:#00695c!important}.text-teal-10{color:#004d40!important}.text-teal-11{color:#a7ffeb!important}.text-teal-12{color:#64ffda!important}.text-teal-13{color:#1de9b6!important}.text-teal-14{color:#00bfa5!important}.text-green{color:#4caf50!important}.text-green-1{color:#e8f5e9!important}.text-green-2{color:#c8e6c9!important}.text-green-3{color:#a5d6a7!important}.text-green-4{color:#81c784!important}.text-green-5{color:#66bb6a!important}.text-green-6{color:#4caf50!important}.text-green-7{color:#43a047!important}.text-green-8{color:#388e3c!important}.text-green-9{color:#2e7d32!important}.text-green-10{color:#1b5e20!important}.text-green-11{color:#b9f6ca!important}.text-green-12{color:#69f0ae!important}.text-green-13{color:#00e676!important}.text-green-14{color:#00c853!important}.text-light-green{color:#8bc34a!important}.text-light-green-1{color:#f1f8e9!important}.text-light-green-2{color:#dcedc8!important}.text-light-green-3{color:#c5e1a5!important}.text-light-green-4{color:#aed581!important}.text-light-green-5{color:#9ccc65!important}.text-light-green-6{color:#8bc34a!important}.text-light-green-7{color:#7cb342!important}.text-light-green-8{color:#689f38!important}.text-light-green-9{color:#558b2f!important}.text-light-green-10{color:#33691e!important}.text-light-green-11{color:#ccff90!important}.text-light-green-12{color:#b2ff59!important}.text-light-green-13{color:#76ff03!important}.text-light-green-14{color:#64dd17!important}.text-lime{color:#cddc39!important}.text-lime-1{color:#f9fbe7!important}.text-lime-2{color:#f0f4c3!important}.text-lime-3{color:#e6ee9c!important}.text-lime-4{color:#dce775!important}.text-lime-5{color:#d4e157!important}.text-lime-6{color:#cddc39!important}.text-lime-7{color:#c0ca33!important}.text-lime-8{color:#afb42b!important}.text-lime-9{color:#9e9d24!important}.text-lime-10{color:#827717!important}.text-lime-11{color:#f4ff81!important}.text-lime-12{color:#eeff41!important}.text-lime-13{color:#c6ff00!important}.text-lime-14{color:#aeea00!important}.text-yellow{color:#ffeb3b!important}.text-yellow-1{color:#fffde7!important}.text-yellow-2{color:#fff9c4!important}.text-yellow-3{color:#fff59d!important}.text-yellow-4{color:#fff176!important}.text-yellow-5{color:#ffee58!important}.text-yellow-6{color:#ffeb3b!important}.text-yellow-7{color:#fdd835!important}.text-yellow-8{color:#fbc02d!important}.text-yellow-9{color:#f9a825!important}.text-yellow-10{color:#f57f17!important}.text-yellow-11{color:#ffff8d!important}.text-yellow-12{color:#ff0!important}.text-yellow-13{color:#ffea00!important}.text-yellow-14{color:#ffd600!important}.text-amber{color:#ffc107!important}.text-amber-1{color:#fff8e1!important}.text-amber-2{color:#ffecb3!important}.text-amber-3{color:#ffe082!important}.text-amber-4{color:#ffd54f!important}.text-amber-5{color:#ffca28!important}.text-amber-6{color:#ffc107!important}.text-amber-7{color:#ffb300!important}.text-amber-8{color:#ffa000!important}.text-amber-9{color:#ff8f00!important}.text-amber-10{color:#ff6f00!important}.text-amber-11{color:#ffe57f!important}.text-amber-12{color:#ffd740!important}.text-amber-13{color:#ffc400!important}.text-amber-14{color:#ffab00!important}.text-orange{color:#ff9800!important}.text-orange-1{color:#fff3e0!important}.text-orange-2{color:#ffe0b2!important}.text-orange-3{color:#ffcc80!important}.text-orange-4{color:#ffb74d!important}.text-orange-5{color:#ffa726!important}.text-orange-6{color:#ff9800!important}.text-orange-7{color:#fb8c00!important}.text-orange-8{color:#f57c00!important}.text-orange-9{color:#ef6c00!important}.text-orange-10{color:#e65100!important}.text-orange-11{color:#ffd180!important}.text-orange-12{color:#ffab40!important}.text-orange-13{color:#ff9100!important}.text-orange-14{color:#ff6d00!important}.text-deep-orange{color:#ff5722!important}.text-deep-orange-1{color:#fbe9e7!important}.text-deep-orange-2{color:#ffccbc!important}.text-deep-orange-3{color:#ffab91!important}.text-deep-orange-4{color:#ff8a65!important}.text-deep-orange-5{color:#ff7043!important}.text-deep-orange-6{color:#ff5722!important}.text-deep-orange-7{color:#f4511e!important}.text-deep-orange-8{color:#e64a19!important}.text-deep-orange-9{color:#d84315!important}.text-deep-orange-10{color:#bf360c!important}.text-deep-orange-11{color:#ff9e80!important}.text-deep-orange-12{color:#ff6e40!important}.text-deep-orange-13{color:#ff3d00!important}.text-deep-orange-14{color:#dd2c00!important}.text-brown{color:#795548!important}.text-brown-1{color:#efebe9!important}.text-brown-2{color:#d7ccc8!important}.text-brown-3{color:#bcaaa4!important}.text-brown-4{color:#a1887f!important}.text-brown-5{color:#8d6e63!important}.text-brown-6{color:#795548!important}.text-brown-7{color:#6d4c41!important}.text-brown-8{color:#5d4037!important}.text-brown-9{color:#4e342e!important}.text-brown-10{color:#3e2723!important}.text-brown-11{color:#d7ccc8!important}.text-brown-12{color:#bcaaa4!important}.text-brown-13{color:#8d6e63!important}.text-brown-14{color:#5d4037!important}.text-grey{color:#9e9e9e!important}.text-grey-1{color:#fafafa!important}.text-grey-2{color:#f5f5f5!important}.text-grey-3{color:#eee!important}.text-grey-4{color:#e0e0e0!important}.text-grey-5{color:#bdbdbd!important}.text-grey-6{color:#9e9e9e!important}.text-grey-7{color:#757575!important}.text-grey-8{color:#616161!important}.text-grey-9{color:#424242!important}.text-grey-10{color:#212121!important}.text-grey-11{color:#f5f5f5!important}.text-grey-12{color:#eee!important}.text-grey-13{color:#bdbdbd!important}.text-grey-14{color:#616161!important}.text-blue-grey{color:#607d8b!important}.text-blue-grey-1{color:#eceff1!important}.text-blue-grey-2{color:#cfd8dc!important}.text-blue-grey-3{color:#b0bec5!important}.text-blue-grey-4{color:#90a4ae!important}.text-blue-grey-5{color:#78909c!important}.text-blue-grey-6{color:#607d8b!important}.text-blue-grey-7{color:#546e7a!important}.text-blue-grey-8{color:#455a64!important}.text-blue-grey-9{color:#37474f!important}.text-blue-grey-10{color:#263238!important}.text-blue-grey-11{color:#cfd8dc!important}.text-blue-grey-12{color:#b0bec5!important}.text-blue-grey-13{color:#78909c!important}.text-blue-grey-14{color:#455a64!important}.bg-red{background:#f44336!important}.bg-red-1{background:#ffebee!important}.bg-red-2{background:#ffcdd2!important}.bg-red-3{background:#ef9a9a!important}.bg-red-4{background:#e57373!important}.bg-red-5{background:#ef5350!important}.bg-red-6{background:#f44336!important}.bg-red-7{background:#e53935!important}.bg-red-8{background:#d32f2f!important}.bg-red-9{background:#c62828!important}.bg-red-10{background:#b71c1c!important}.bg-red-11{background:#ff8a80!important}.bg-red-12{background:#ff5252!important}.bg-red-13{background:#ff1744!important}.bg-red-14{background:#d50000!important}.bg-pink{background:#e91e63!important}.bg-pink-1{background:#fce4ec!important}.bg-pink-2{background:#f8bbd0!important}.bg-pink-3{background:#f48fb1!important}.bg-pink-4{background:#f06292!important}.bg-pink-5{background:#ec407a!important}.bg-pink-6{background:#e91e63!important}.bg-pink-7{background:#d81b60!important}.bg-pink-8{background:#c2185b!important}.bg-pink-9{background:#ad1457!important}.bg-pink-10{background:#880e4f!important}.bg-pink-11{background:#ff80ab!important}.bg-pink-12{background:#ff4081!important}.bg-pink-13{background:#f50057!important}.bg-pink-14{background:#c51162!important}.bg-purple{background:#9c27b0!important}.bg-purple-1{background:#f3e5f5!important}.bg-purple-2{background:#e1bee7!important}.bg-purple-3{background:#ce93d8!important}.bg-purple-4{background:#ba68c8!important}.bg-purple-5{background:#ab47bc!important}.bg-purple-6{background:#9c27b0!important}.bg-purple-7{background:#8e24aa!important}.bg-purple-8{background:#7b1fa2!important}.bg-purple-9{background:#6a1b9a!important}.bg-purple-10{background:#4a148c!important}.bg-purple-11{background:#ea80fc!important}.bg-purple-12{background:#e040fb!important}.bg-purple-13{background:#d500f9!important}.bg-purple-14{background:#a0f!important}.bg-deep-purple{background:#673ab7!important}.bg-deep-purple-1{background:#ede7f6!important}.bg-deep-purple-2{background:#d1c4e9!important}.bg-deep-purple-3{background:#b39ddb!important}.bg-deep-purple-4{background:#9575cd!important}.bg-deep-purple-5{background:#7e57c2!important}.bg-deep-purple-6{background:#673ab7!important}.bg-deep-purple-7{background:#5e35b1!important}.bg-deep-purple-8{background:#512da8!important}.bg-deep-purple-9{background:#4527a0!important}.bg-deep-purple-10{background:#311b92!important}.bg-deep-purple-11{background:#b388ff!important}.bg-deep-purple-12{background:#7c4dff!important}.bg-deep-purple-13{background:#651fff!important}.bg-deep-purple-14{background:#6200ea!important}.bg-indigo{background:#3f51b5!important}.bg-indigo-1{background:#e8eaf6!important}.bg-indigo-2{background:#c5cae9!important}.bg-indigo-3{background:#9fa8da!important}.bg-indigo-4{background:#7986cb!important}.bg-indigo-5{background:#5c6bc0!important}.bg-indigo-6{background:#3f51b5!important}.bg-indigo-7{background:#3949ab!important}.bg-indigo-8{background:#303f9f!important}.bg-indigo-9{background:#283593!important}.bg-indigo-10{background:#1a237e!important}.bg-indigo-11{background:#8c9eff!important}.bg-indigo-12{background:#536dfe!important}.bg-indigo-13{background:#3d5afe!important}.bg-indigo-14{background:#304ffe!important}.bg-blue{background:#2196f3!important}.bg-blue-1{background:#e3f2fd!important}.bg-blue-2{background:#bbdefb!important}.bg-blue-3{background:#90caf9!important}.bg-blue-4{background:#64b5f6!important}.bg-blue-5{background:#42a5f5!important}.bg-blue-6{background:#2196f3!important}.bg-blue-7{background:#1e88e5!important}.bg-blue-8{background:#1976d2!important}.bg-blue-9{background:#1565c0!important}.bg-blue-10{background:#0d47a1!important}.bg-blue-11{background:#82b1ff!important}.bg-blue-12{background:#448aff!important}.bg-blue-13{background:#2979ff!important}.bg-blue-14{background:#2962ff!important}.bg-light-blue{background:#03a9f4!important}.bg-light-blue-1{background:#e1f5fe!important}.bg-light-blue-2{background:#b3e5fc!important}.bg-light-blue-3{background:#81d4fa!important}.bg-light-blue-4{background:#4fc3f7!important}.bg-light-blue-5{background:#29b6f6!important}.bg-light-blue-6{background:#03a9f4!important}.bg-light-blue-7{background:#039be5!important}.bg-light-blue-8{background:#0288d1!important}.bg-light-blue-9{background:#0277bd!important}.bg-light-blue-10{background:#01579b!important}.bg-light-blue-11{background:#80d8ff!important}.bg-light-blue-12{background:#40c4ff!important}.bg-light-blue-13{background:#00b0ff!important}.bg-light-blue-14{background:#0091ea!important}.bg-cyan{background:#00bcd4!important}.bg-cyan-1{background:#e0f7fa!important}.bg-cyan-2{background:#b2ebf2!important}.bg-cyan-3{background:#80deea!important}.bg-cyan-4{background:#4dd0e1!important}.bg-cyan-5{background:#26c6da!important}.bg-cyan-6{background:#00bcd4!important}.bg-cyan-7{background:#00acc1!important}.bg-cyan-8{background:#0097a7!important}.bg-cyan-9{background:#00838f!important}.bg-cyan-10{background:#006064!important}.bg-cyan-11{background:#84ffff!important}.bg-cyan-12{background:#18ffff!important}.bg-cyan-13{background:#00e5ff!important}.bg-cyan-14{background:#00b8d4!important}.bg-teal{background:#009688!important}.bg-teal-1{background:#e0f2f1!important}.bg-teal-2{background:#b2dfdb!important}.bg-teal-3{background:#80cbc4!important}.bg-teal-4{background:#4db6ac!important}.bg-teal-5{background:#26a69a!important}.bg-teal-6{background:#009688!important}.bg-teal-7{background:#00897b!important}.bg-teal-8{background:#00796b!important}.bg-teal-9{background:#00695c!important}.bg-teal-10{background:#004d40!important}.bg-teal-11{background:#a7ffeb!important}.bg-teal-12{background:#64ffda!important}.bg-teal-13{background:#1de9b6!important}.bg-teal-14{background:#00bfa5!important}.bg-green{background:#4caf50!important}.bg-green-1{background:#e8f5e9!important}.bg-green-2{background:#c8e6c9!important}.bg-green-3{background:#a5d6a7!important}.bg-green-4{background:#81c784!important}.bg-green-5{background:#66bb6a!important}.bg-green-6{background:#4caf50!important}.bg-green-7{background:#43a047!important}.bg-green-8{background:#388e3c!important}.bg-green-9{background:#2e7d32!important}.bg-green-10{background:#1b5e20!important}.bg-green-11{background:#b9f6ca!important}.bg-green-12{background:#69f0ae!important}.bg-green-13{background:#00e676!important}.bg-green-14{background:#00c853!important}.bg-light-green{background:#8bc34a!important}.bg-light-green-1{background:#f1f8e9!important}.bg-light-green-2{background:#dcedc8!important}.bg-light-green-3{background:#c5e1a5!important}.bg-light-green-4{background:#aed581!important}.bg-light-green-5{background:#9ccc65!important}.bg-light-green-6{background:#8bc34a!important}.bg-light-green-7{background:#7cb342!important}.bg-light-green-8{background:#689f38!important}.bg-light-green-9{background:#558b2f!important}.bg-light-green-10{background:#33691e!important}.bg-light-green-11{background:#ccff90!important}.bg-light-green-12{background:#b2ff59!important}.bg-light-green-13{background:#76ff03!important}.bg-light-green-14{background:#64dd17!important}.bg-lime{background:#cddc39!important}.bg-lime-1{background:#f9fbe7!important}.bg-lime-2{background:#f0f4c3!important}.bg-lime-3{background:#e6ee9c!important}.bg-lime-4{background:#dce775!important}.bg-lime-5{background:#d4e157!important}.bg-lime-6{background:#cddc39!important}.bg-lime-7{background:#c0ca33!important}.bg-lime-8{background:#afb42b!important}.bg-lime-9{background:#9e9d24!important}.bg-lime-10{background:#827717!important}.bg-lime-11{background:#f4ff81!important}.bg-lime-12{background:#eeff41!important}.bg-lime-13{background:#c6ff00!important}.bg-lime-14{background:#aeea00!important}.bg-yellow{background:#ffeb3b!important}.bg-yellow-1{background:#fffde7!important}.bg-yellow-2{background:#fff9c4!important}.bg-yellow-3{background:#fff59d!important}.bg-yellow-4{background:#fff176!important}.bg-yellow-5{background:#ffee58!important}.bg-yellow-6{background:#ffeb3b!important}.bg-yellow-7{background:#fdd835!important}.bg-yellow-8{background:#fbc02d!important}.bg-yellow-9{background:#f9a825!important}.bg-yellow-10{background:#f57f17!important}.bg-yellow-11{background:#ffff8d!important}.bg-yellow-12{background:#ff0!important}.bg-yellow-13{background:#ffea00!important}.bg-yellow-14{background:#ffd600!important}.bg-amber{background:#ffc107!important}.bg-amber-1{background:#fff8e1!important}.bg-amber-2{background:#ffecb3!important}.bg-amber-3{background:#ffe082!important}.bg-amber-4{background:#ffd54f!important}.bg-amber-5{background:#ffca28!important}.bg-amber-6{background:#ffc107!important}.bg-amber-7{background:#ffb300!important}.bg-amber-8{background:#ffa000!important}.bg-amber-9{background:#ff8f00!important}.bg-amber-10{background:#ff6f00!important}.bg-amber-11{background:#ffe57f!important}.bg-amber-12{background:#ffd740!important}.bg-amber-13{background:#ffc400!important}.bg-amber-14{background:#ffab00!important}.bg-orange{background:#ff9800!important}.bg-orange-1{background:#fff3e0!important}.bg-orange-2{background:#ffe0b2!important}.bg-orange-3{background:#ffcc80!important}.bg-orange-4{background:#ffb74d!important}.bg-orange-5{background:#ffa726!important}.bg-orange-6{background:#ff9800!important}.bg-orange-7{background:#fb8c00!important}.bg-orange-8{background:#f57c00!important}.bg-orange-9{background:#ef6c00!important}.bg-orange-10{background:#e65100!important}.bg-orange-11{background:#ffd180!important}.bg-orange-12{background:#ffab40!important}.bg-orange-13{background:#ff9100!important}.bg-orange-14{background:#ff6d00!important}.bg-deep-orange{background:#ff5722!important}.bg-deep-orange-1{background:#fbe9e7!important}.bg-deep-orange-2{background:#ffccbc!important}.bg-deep-orange-3{background:#ffab91!important}.bg-deep-orange-4{background:#ff8a65!important}.bg-deep-orange-5{background:#ff7043!important}.bg-deep-orange-6{background:#ff5722!important}.bg-deep-orange-7{background:#f4511e!important}.bg-deep-orange-8{background:#e64a19!important}.bg-deep-orange-9{background:#d84315!important}.bg-deep-orange-10{background:#bf360c!important}.bg-deep-orange-11{background:#ff9e80!important}.bg-deep-orange-12{background:#ff6e40!important}.bg-deep-orange-13{background:#ff3d00!important}.bg-deep-orange-14{background:#dd2c00!important}.bg-brown{background:#795548!important}.bg-brown-1{background:#efebe9!important}.bg-brown-2{background:#d7ccc8!important}.bg-brown-3{background:#bcaaa4!important}.bg-brown-4{background:#a1887f!important}.bg-brown-5{background:#8d6e63!important}.bg-brown-6{background:#795548!important}.bg-brown-7{background:#6d4c41!important}.bg-brown-8{background:#5d4037!important}.bg-brown-9{background:#4e342e!important}.bg-brown-10{background:#3e2723!important}.bg-brown-11{background:#d7ccc8!important}.bg-brown-12{background:#bcaaa4!important}.bg-brown-13{background:#8d6e63!important}.bg-brown-14{background:#5d4037!important}.bg-grey{background:#9e9e9e!important}.bg-grey-1{background:#fafafa!important}.bg-grey-2{background:#f5f5f5!important}.bg-grey-3{background:#eee!important}.bg-grey-4{background:#e0e0e0!important}.bg-grey-5{background:#bdbdbd!important}.bg-grey-6{background:#9e9e9e!important}.bg-grey-7{background:#757575!important}.bg-grey-8{background:#616161!important}.bg-grey-9{background:#424242!important}.bg-grey-10{background:#212121!important}.bg-grey-11{background:#f5f5f5!important}.bg-grey-12{background:#eee!important}.bg-grey-13{background:#bdbdbd!important}.bg-grey-14{background:#616161!important}.bg-blue-grey{background:#607d8b!important}.bg-blue-grey-1{background:#eceff1!important}.bg-blue-grey-2{background:#cfd8dc!important}.bg-blue-grey-3{background:#b0bec5!important}.bg-blue-grey-4{background:#90a4ae!important}.bg-blue-grey-5{background:#78909c!important}.bg-blue-grey-6{background:#607d8b!important}.bg-blue-grey-7{background:#546e7a!important}.bg-blue-grey-8{background:#455a64!important}.bg-blue-grey-9{background:#37474f!important}.bg-blue-grey-10{background:#263238!important}.bg-blue-grey-11{background:#cfd8dc!important}.bg-blue-grey-12{background:#b0bec5!important}.bg-blue-grey-13{background:#78909c!important}.bg-blue-grey-14{background:#455a64!important}.shadow-transition{transition:box-shadow .28s cubic-bezier(.4,0,.2,1)!important}.shadow-1{box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f}.shadow-up-1{box-shadow:0 -1px 3px #0003,0 -1px 1px #00000024,0 -2px 1px -1px #0000001f}.shadow-2{box-shadow:0 1px 5px #0003,0 2px 2px #00000024,0 3px 1px -2px #0000001f}.shadow-up-2{box-shadow:0 -1px 5px #0003,0 -2px 2px #00000024,0 -3px 1px -2px #0000001f}.shadow-3{box-shadow:0 1px 8px #0003,0 3px 4px #00000024,0 3px 3px -2px #0000001f}.shadow-up-3{box-shadow:0 -1px 8px #0003,0 -3px 4px #00000024,0 -3px 3px -2px #0000001f}.shadow-4{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.shadow-up-4{box-shadow:0 -2px 4px -1px #0003,0 -4px 5px #00000024,0 -1px 10px #0000001f}.shadow-5{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.shadow-up-5{box-shadow:0 -3px 5px -1px #0003,0 -5px 8px #00000024,0 -1px 14px #0000001f}.shadow-6{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.shadow-up-6{box-shadow:0 -3px 5px -1px #0003,0 -6px 10px #00000024,0 -1px 18px #0000001f}.shadow-7{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.shadow-up-7{box-shadow:0 -4px 5px -2px #0003,0 -7px 10px 1px #00000024,0 -2px 16px 1px #0000001f}.shadow-8{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.shadow-up-8{box-shadow:0 -5px 5px -3px #0003,0 -8px 10px 1px #00000024,0 -3px 14px 2px #0000001f}.shadow-9{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.shadow-up-9{box-shadow:0 -5px 6px -3px #0003,0 -9px 12px 1px #00000024,0 -3px 16px 2px #0000001f}.shadow-10{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.shadow-up-10{box-shadow:0 -6px 6px -3px #0003,0 -10px 14px 1px #00000024,0 -4px 18px 3px #0000001f}.shadow-11{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.shadow-up-11{box-shadow:0 -6px 7px -4px #0003,0 -11px 15px 1px #00000024,0 -4px 20px 3px #0000001f}.shadow-12{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.shadow-up-12{box-shadow:0 -7px 8px -4px #0003,0 -12px 17px 2px #00000024,0 -5px 22px 4px #0000001f}.shadow-13{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.shadow-up-13{box-shadow:0 -7px 8px -4px #0003,0 -13px 19px 2px #00000024,0 -5px 24px 4px #0000001f}.shadow-14{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.shadow-up-14{box-shadow:0 -7px 9px -4px #0003,0 -14px 21px 2px #00000024,0 -5px 26px 4px #0000001f}.shadow-15{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.shadow-up-15{box-shadow:0 -8px 9px -5px #0003,0 -15px 22px 2px #00000024,0 -6px 28px 5px #0000001f}.shadow-16{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.shadow-up-16{box-shadow:0 -8px 10px -5px #0003,0 -16px 24px 2px #00000024,0 -6px 30px 5px #0000001f}.shadow-17{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.shadow-up-17{box-shadow:0 -8px 11px -5px #0003,0 -17px 26px 2px #00000024,0 -6px 32px 5px #0000001f}.shadow-18{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.shadow-up-18{box-shadow:0 -9px 11px -5px #0003,0 -18px 28px 2px #00000024,0 -7px 34px 6px #0000001f}.shadow-19{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.shadow-up-19{box-shadow:0 -9px 12px -6px #0003,0 -19px 29px 2px #00000024,0 -7px 36px 6px #0000001f}.shadow-20{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.shadow-up-20{box-shadow:0 -10px 13px -6px #0003,0 -20px 31px 3px #00000024,0 -8px 38px 7px #0000001f}.shadow-21{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.shadow-up-21{box-shadow:0 -10px 13px -6px #0003,0 -21px 33px 3px #00000024,0 -8px 40px 7px #0000001f}.shadow-22{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.shadow-up-22{box-shadow:0 -10px 14px -6px #0003,0 -22px 35px 3px #00000024,0 -8px 42px 7px #0000001f}.shadow-23{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.shadow-up-23{box-shadow:0 -11px 14px -7px #0003,0 -23px 36px 3px #00000024,0 -9px 44px 8px #0000001f}.shadow-24{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.shadow-up-24{box-shadow:0 -11px 15px -7px #0003,0 -24px 38px 3px #00000024,0 -9px 46px 8px #0000001f}.inset-shadow{box-shadow:inset 0 7px 9px -7px #000000b3}.inset-shadow-down{box-shadow:inset 0 -7px 9px -7px #000000b3}body.body--dark .shadow-1{box-shadow:0 1px 3px #fff3,0 1px 1px #ffffff24,0 2px 1px -1px #ffffff1f}body.body--dark .shadow-up-1{box-shadow:0 -1px 3px #fff3,0 -1px 1px #ffffff24,0 -2px 1px -1px #ffffff1f}body.body--dark .shadow-2{box-shadow:0 1px 5px #fff3,0 2px 2px #ffffff24,0 3px 1px -2px #ffffff1f}body.body--dark .shadow-up-2{box-shadow:0 -1px 5px #fff3,0 -2px 2px #ffffff24,0 -3px 1px -2px #ffffff1f}body.body--dark .shadow-3{box-shadow:0 1px 8px #fff3,0 3px 4px #ffffff24,0 3px 3px -2px #ffffff1f}body.body--dark .shadow-up-3{box-shadow:0 -1px 8px #fff3,0 -3px 4px #ffffff24,0 -3px 3px -2px #ffffff1f}body.body--dark .shadow-4{box-shadow:0 2px 4px -1px #fff3,0 4px 5px #ffffff24,0 1px 10px #ffffff1f}body.body--dark .shadow-up-4{box-shadow:0 -2px 4px -1px #fff3,0 -4px 5px #ffffff24,0 -1px 10px #ffffff1f}body.body--dark .shadow-5{box-shadow:0 3px 5px -1px #fff3,0 5px 8px #ffffff24,0 1px 14px #ffffff1f}body.body--dark .shadow-up-5{box-shadow:0 -3px 5px -1px #fff3,0 -5px 8px #ffffff24,0 -1px 14px #ffffff1f}body.body--dark .shadow-6{box-shadow:0 3px 5px -1px #fff3,0 6px 10px #ffffff24,0 1px 18px #ffffff1f}body.body--dark .shadow-up-6{box-shadow:0 -3px 5px -1px #fff3,0 -6px 10px #ffffff24,0 -1px 18px #ffffff1f}body.body--dark .shadow-7{box-shadow:0 4px 5px -2px #fff3,0 7px 10px 1px #ffffff24,0 2px 16px 1px #ffffff1f}body.body--dark .shadow-up-7{box-shadow:0 -4px 5px -2px #fff3,0 -7px 10px 1px #ffffff24,0 -2px 16px 1px #ffffff1f}body.body--dark .shadow-8{box-shadow:0 5px 5px -3px #fff3,0 8px 10px 1px #ffffff24,0 3px 14px 2px #ffffff1f}body.body--dark .shadow-up-8{box-shadow:0 -5px 5px -3px #fff3,0 -8px 10px 1px #ffffff24,0 -3px 14px 2px #ffffff1f}body.body--dark .shadow-9{box-shadow:0 5px 6px -3px #fff3,0 9px 12px 1px #ffffff24,0 3px 16px 2px #ffffff1f}body.body--dark .shadow-up-9{box-shadow:0 -5px 6px -3px #fff3,0 -9px 12px 1px #ffffff24,0 -3px 16px 2px #ffffff1f}body.body--dark .shadow-10{box-shadow:0 6px 6px -3px #fff3,0 10px 14px 1px #ffffff24,0 4px 18px 3px #ffffff1f}body.body--dark .shadow-up-10{box-shadow:0 -6px 6px -3px #fff3,0 -10px 14px 1px #ffffff24,0 -4px 18px 3px #ffffff1f}body.body--dark .shadow-11{box-shadow:0 6px 7px -4px #fff3,0 11px 15px 1px #ffffff24,0 4px 20px 3px #ffffff1f}body.body--dark .shadow-up-11{box-shadow:0 -6px 7px -4px #fff3,0 -11px 15px 1px #ffffff24,0 -4px 20px 3px #ffffff1f}body.body--dark .shadow-12{box-shadow:0 7px 8px -4px #fff3,0 12px 17px 2px #ffffff24,0 5px 22px 4px #ffffff1f}body.body--dark .shadow-up-12{box-shadow:0 -7px 8px -4px #fff3,0 -12px 17px 2px #ffffff24,0 -5px 22px 4px #ffffff1f}body.body--dark .shadow-13{box-shadow:0 7px 8px -4px #fff3,0 13px 19px 2px #ffffff24,0 5px 24px 4px #ffffff1f}body.body--dark .shadow-up-13{box-shadow:0 -7px 8px -4px #fff3,0 -13px 19px 2px #ffffff24,0 -5px 24px 4px #ffffff1f}body.body--dark .shadow-14{box-shadow:0 7px 9px -4px #fff3,0 14px 21px 2px #ffffff24,0 5px 26px 4px #ffffff1f}body.body--dark .shadow-up-14{box-shadow:0 -7px 9px -4px #fff3,0 -14px 21px 2px #ffffff24,0 -5px 26px 4px #ffffff1f}body.body--dark .shadow-15{box-shadow:0 8px 9px -5px #fff3,0 15px 22px 2px #ffffff24,0 6px 28px 5px #ffffff1f}body.body--dark .shadow-up-15{box-shadow:0 -8px 9px -5px #fff3,0 -15px 22px 2px #ffffff24,0 -6px 28px 5px #ffffff1f}body.body--dark .shadow-16{box-shadow:0 8px 10px -5px #fff3,0 16px 24px 2px #ffffff24,0 6px 30px 5px #ffffff1f}body.body--dark .shadow-up-16{box-shadow:0 -8px 10px -5px #fff3,0 -16px 24px 2px #ffffff24,0 -6px 30px 5px #ffffff1f}body.body--dark .shadow-17{box-shadow:0 8px 11px -5px #fff3,0 17px 26px 2px #ffffff24,0 6px 32px 5px #ffffff1f}body.body--dark .shadow-up-17{box-shadow:0 -8px 11px -5px #fff3,0 -17px 26px 2px #ffffff24,0 -6px 32px 5px #ffffff1f}body.body--dark .shadow-18{box-shadow:0 9px 11px -5px #fff3,0 18px 28px 2px #ffffff24,0 7px 34px 6px #ffffff1f}body.body--dark .shadow-up-18{box-shadow:0 -9px 11px -5px #fff3,0 -18px 28px 2px #ffffff24,0 -7px 34px 6px #ffffff1f}body.body--dark .shadow-19{box-shadow:0 9px 12px -6px #fff3,0 19px 29px 2px #ffffff24,0 7px 36px 6px #ffffff1f}body.body--dark .shadow-up-19{box-shadow:0 -9px 12px -6px #fff3,0 -19px 29px 2px #ffffff24,0 -7px 36px 6px #ffffff1f}body.body--dark .shadow-20{box-shadow:0 10px 13px -6px #fff3,0 20px 31px 3px #ffffff24,0 8px 38px 7px #ffffff1f}body.body--dark .shadow-up-20{box-shadow:0 -10px 13px -6px #fff3,0 -20px 31px 3px #ffffff24,0 -8px 38px 7px #ffffff1f}body.body--dark .shadow-21{box-shadow:0 10px 13px -6px #fff3,0 21px 33px 3px #ffffff24,0 8px 40px 7px #ffffff1f}body.body--dark .shadow-up-21{box-shadow:0 -10px 13px -6px #fff3,0 -21px 33px 3px #ffffff24,0 -8px 40px 7px #ffffff1f}body.body--dark .shadow-22{box-shadow:0 10px 14px -6px #fff3,0 22px 35px 3px #ffffff24,0 8px 42px 7px #ffffff1f}body.body--dark .shadow-up-22{box-shadow:0 -10px 14px -6px #fff3,0 -22px 35px 3px #ffffff24,0 -8px 42px 7px #ffffff1f}body.body--dark .shadow-23{box-shadow:0 11px 14px -7px #fff3,0 23px 36px 3px #ffffff24,0 9px 44px 8px #ffffff1f}body.body--dark .shadow-up-23{box-shadow:0 -11px 14px -7px #fff3,0 -23px 36px 3px #ffffff24,0 -9px 44px 8px #ffffff1f}body.body--dark .shadow-24{box-shadow:0 11px 15px -7px #fff3,0 24px 38px 3px #ffffff24,0 9px 46px 8px #ffffff1f}body.body--dark .shadow-up-24{box-shadow:0 -11px 15px -7px #fff3,0 -24px 38px 3px #ffffff24,0 -9px 46px 8px #ffffff1f}body.body--dark .inset-shadow{box-shadow:inset 0 7px 9px -7px #ffffffb3}body.body--dark .inset-shadow-down{box-shadow:inset 0 -7px 9px -7px #ffffffb3}.no-shadow,.shadow-0{box-shadow:none!important}.z-marginals{z-index:2000}.z-notify{z-index:9500}.z-fullscreen{z-index:6000}.z-inherit{z-index:inherit!important}.column,.flex,.row{display:flex;flex-wrap:wrap}.column.inline,.flex.inline,.row.inline{display:inline-flex}.row.reverse{flex-direction:row-reverse}.column{flex-direction:column}.column.reverse{flex-direction:column-reverse}.wrap{flex-wrap:wrap}.no-wrap{flex-wrap:nowrap}.reverse-wrap{flex-wrap:wrap-reverse}.order-first{order:-10000}.order-last{order:10000}.order-none{order:0}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.flex-center,.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.flex-center,.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-center{align-content:center}.content-stretch{align-content:stretch}.content-between{align-content:space-between}.content-around{align-content:space-around}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-baseline{align-self:baseline}.self-stretch{align-self:stretch}.q-gutter-none,.q-gutter-none>*,.q-gutter-x-none,.q-gutter-x-none>*{margin-left:0}.q-gutter-none,.q-gutter-none>*,.q-gutter-y-none,.q-gutter-y-none>*{margin-top:0}.q-col-gutter-none,.q-col-gutter-x-none{margin-left:0}.q-col-gutter-none>*,.q-col-gutter-x-none>*{padding-left:0}.q-col-gutter-none,.q-col-gutter-y-none{margin-top:0}.q-col-gutter-none>*,.q-col-gutter-y-none>*{padding-top:0}.q-gutter-x-xs,.q-gutter-xs{margin-left:-4px}.q-gutter-x-xs>*,.q-gutter-xs>*{margin-left:4px}.q-gutter-xs,.q-gutter-y-xs{margin-top:-4px}.q-gutter-xs>*,.q-gutter-y-xs>*{margin-top:4px}.q-col-gutter-x-xs,.q-col-gutter-xs{margin-left:-4px}.q-col-gutter-x-xs>*,.q-col-gutter-xs>*{padding-left:4px}.q-col-gutter-xs,.q-col-gutter-y-xs{margin-top:-4px}.q-col-gutter-xs>*,.q-col-gutter-y-xs>*{padding-top:4px}.q-gutter-sm,.q-gutter-x-sm{margin-left:-8px}.q-gutter-sm>*,.q-gutter-x-sm>*{margin-left:8px}.q-gutter-sm,.q-gutter-y-sm{margin-top:-8px}.q-gutter-sm>*,.q-gutter-y-sm>*{margin-top:8px}.q-col-gutter-sm,.q-col-gutter-x-sm{margin-left:-8px}.q-col-gutter-sm>*,.q-col-gutter-x-sm>*{padding-left:8px}.q-col-gutter-sm,.q-col-gutter-y-sm{margin-top:-8px}.q-col-gutter-sm>*,.q-col-gutter-y-sm>*{padding-top:8px}.q-gutter-md,.q-gutter-x-md{margin-left:-16px}.q-gutter-md>*,.q-gutter-x-md>*{margin-left:16px}.q-gutter-md,.q-gutter-y-md{margin-top:-16px}.q-gutter-md>*,.q-gutter-y-md>*{margin-top:16px}.q-col-gutter-md,.q-col-gutter-x-md{margin-left:-16px}.q-col-gutter-md>*,.q-col-gutter-x-md>*{padding-left:16px}.q-col-gutter-md,.q-col-gutter-y-md{margin-top:-16px}.q-col-gutter-md>*,.q-col-gutter-y-md>*{padding-top:16px}.q-gutter-lg,.q-gutter-x-lg{margin-left:-24px}.q-gutter-lg>*,.q-gutter-x-lg>*{margin-left:24px}.q-gutter-lg,.q-gutter-y-lg{margin-top:-24px}.q-gutter-lg>*,.q-gutter-y-lg>*{margin-top:24px}.q-col-gutter-lg,.q-col-gutter-x-lg{margin-left:-24px}.q-col-gutter-lg>*,.q-col-gutter-x-lg>*{padding-left:24px}.q-col-gutter-lg,.q-col-gutter-y-lg{margin-top:-24px}.q-col-gutter-lg>*,.q-col-gutter-y-lg>*{padding-top:24px}.q-gutter-x-xl,.q-gutter-xl{margin-left:-48px}.q-gutter-x-xl>*,.q-gutter-xl>*{margin-left:48px}.q-gutter-xl,.q-gutter-y-xl{margin-top:-48px}.q-gutter-xl>*,.q-gutter-y-xl>*{margin-top:48px}.q-col-gutter-x-xl,.q-col-gutter-xl{margin-left:-48px}.q-col-gutter-x-xl>*,.q-col-gutter-xl>*{padding-left:48px}.q-col-gutter-xl,.q-col-gutter-y-xl{margin-top:-48px}.q-col-gutter-xl>*,.q-col-gutter-y-xl>*{padding-top:48px}@media (min-width:0){.flex>.col,.flex>.col-0,.flex>.col-1,.flex>.col-10,.flex>.col-11,.flex>.col-12,.flex>.col-2,.flex>.col-3,.flex>.col-4,.flex>.col-5,.flex>.col-6,.flex>.col-7,.flex>.col-8,.flex>.col-9,.flex>.col-auto,.flex>.col-grow,.flex>.col-shrink,.flex>.col-xs,.flex>.col-xs-0,.flex>.col-xs-1,.flex>.col-xs-10,.flex>.col-xs-11,.flex>.col-xs-12,.flex>.col-xs-2,.flex>.col-xs-3,.flex>.col-xs-4,.flex>.col-xs-5,.flex>.col-xs-6,.flex>.col-xs-7,.flex>.col-xs-8,.flex>.col-xs-9,.flex>.col-xs-auto,.flex>.col-xs-grow,.flex>.col-xs-shrink,.row>.col,.row>.col-0,.row>.col-1,.row>.col-10,.row>.col-11,.row>.col-12,.row>.col-2,.row>.col-3,.row>.col-4,.row>.col-5,.row>.col-6,.row>.col-7,.row>.col-8,.row>.col-9,.row>.col-auto,.row>.col-grow,.row>.col-shrink,.row>.col-xs,.row>.col-xs-0,.row>.col-xs-1,.row>.col-xs-10,.row>.col-xs-11,.row>.col-xs-12,.row>.col-xs-2,.row>.col-xs-3,.row>.col-xs-4,.row>.col-xs-5,.row>.col-xs-6,.row>.col-xs-7,.row>.col-xs-8,.row>.col-xs-9,.row>.col-xs-auto,.row>.col-xs-grow,.row>.col-xs-shrink{max-width:100%;min-width:0;width:auto}.column>.col,.column>.col-0,.column>.col-1,.column>.col-10,.column>.col-11,.column>.col-12,.column>.col-2,.column>.col-3,.column>.col-4,.column>.col-5,.column>.col-6,.column>.col-7,.column>.col-8,.column>.col-9,.column>.col-auto,.column>.col-grow,.column>.col-shrink,.column>.col-xs,.column>.col-xs-0,.column>.col-xs-1,.column>.col-xs-10,.column>.col-xs-11,.column>.col-xs-12,.column>.col-xs-2,.column>.col-xs-3,.column>.col-xs-4,.column>.col-xs-5,.column>.col-xs-6,.column>.col-xs-7,.column>.col-xs-8,.column>.col-xs-9,.column>.col-xs-auto,.column>.col-xs-grow,.column>.col-xs-shrink,.flex>.col,.flex>.col-0,.flex>.col-1,.flex>.col-10,.flex>.col-11,.flex>.col-12,.flex>.col-2,.flex>.col-3,.flex>.col-4,.flex>.col-5,.flex>.col-6,.flex>.col-7,.flex>.col-8,.flex>.col-9,.flex>.col-auto,.flex>.col-grow,.flex>.col-shrink,.flex>.col-xs,.flex>.col-xs-0,.flex>.col-xs-1,.flex>.col-xs-10,.flex>.col-xs-11,.flex>.col-xs-12,.flex>.col-xs-2,.flex>.col-xs-3,.flex>.col-xs-4,.flex>.col-xs-5,.flex>.col-xs-6,.flex>.col-xs-7,.flex>.col-xs-8,.flex>.col-xs-9,.flex>.col-xs-auto,.flex>.col-xs-grow,.flex>.col-xs-shrink{height:auto;max-height:100%;min-height:0}.col,.col-xs{flex:10000 1 0%}.col-0,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-xs-0,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-auto{flex:0 0 auto}.col-grow,.col-xs-grow{flex:1 0 auto}.col-shrink,.col-xs-shrink{flex:0 1 auto}.row>.col-0,.row>.col-xs-0{height:auto;width:0}.row>.offset-0,.row>.offset-xs-0{margin-left:0}.column>.col-0,.column>.col-xs-0{height:0;width:auto}.row>.col-1,.row>.col-xs-1{height:auto;width:8.3333%}.row>.offset-1,.row>.offset-xs-1{margin-left:8.3333%}.column>.col-1,.column>.col-xs-1{height:8.3333%;width:auto}.row>.col-2,.row>.col-xs-2{height:auto;width:16.6667%}.row>.offset-2,.row>.offset-xs-2{margin-left:16.6667%}.column>.col-2,.column>.col-xs-2{height:16.6667%;width:auto}.row>.col-3,.row>.col-xs-3{height:auto;width:25%}.row>.offset-3,.row>.offset-xs-3{margin-left:25%}.column>.col-3,.column>.col-xs-3{height:25%;width:auto}.row>.col-4,.row>.col-xs-4{height:auto;width:33.3333%}.row>.offset-4,.row>.offset-xs-4{margin-left:33.3333%}.column>.col-4,.column>.col-xs-4{height:33.3333%;width:auto}.row>.col-5,.row>.col-xs-5{height:auto;width:41.6667%}.row>.offset-5,.row>.offset-xs-5{margin-left:41.6667%}.column>.col-5,.column>.col-xs-5{height:41.6667%;width:auto}.row>.col-6,.row>.col-xs-6{height:auto;width:50%}.row>.offset-6,.row>.offset-xs-6{margin-left:50%}.column>.col-6,.column>.col-xs-6{height:50%;width:auto}.row>.col-7,.row>.col-xs-7{height:auto;width:58.3333%}.row>.offset-7,.row>.offset-xs-7{margin-left:58.3333%}.column>.col-7,.column>.col-xs-7{height:58.3333%;width:auto}.row>.col-8,.row>.col-xs-8{height:auto;width:66.6667%}.row>.offset-8,.row>.offset-xs-8{margin-left:66.6667%}.column>.col-8,.column>.col-xs-8{height:66.6667%;width:auto}.row>.col-9,.row>.col-xs-9{height:auto;width:75%}.row>.offset-9,.row>.offset-xs-9{margin-left:75%}.column>.col-9,.column>.col-xs-9{height:75%;width:auto}.row>.col-10,.row>.col-xs-10{height:auto;width:83.3333%}.row>.offset-10,.row>.offset-xs-10{margin-left:83.3333%}.column>.col-10,.column>.col-xs-10{height:83.3333%;width:auto}.row>.col-11,.row>.col-xs-11{height:auto;width:91.6667%}.row>.offset-11,.row>.offset-xs-11{margin-left:91.6667%}.column>.col-11,.column>.col-xs-11{height:91.6667%;width:auto}.row>.col-12,.row>.col-xs-12{height:auto;width:100%}.row>.offset-12,.row>.offset-xs-12{margin-left:100%}.column>.col-12,.column>.col-xs-12{height:100%;width:auto}.row>.col-all{flex:0 0 100%;height:auto}}@media (min-width:600px){.flex>.col-sm,.flex>.col-sm-0,.flex>.col-sm-1,.flex>.col-sm-10,.flex>.col-sm-11,.flex>.col-sm-12,.flex>.col-sm-2,.flex>.col-sm-3,.flex>.col-sm-4,.flex>.col-sm-5,.flex>.col-sm-6,.flex>.col-sm-7,.flex>.col-sm-8,.flex>.col-sm-9,.flex>.col-sm-auto,.flex>.col-sm-grow,.flex>.col-sm-shrink,.row>.col-sm,.row>.col-sm-0,.row>.col-sm-1,.row>.col-sm-10,.row>.col-sm-11,.row>.col-sm-12,.row>.col-sm-2,.row>.col-sm-3,.row>.col-sm-4,.row>.col-sm-5,.row>.col-sm-6,.row>.col-sm-7,.row>.col-sm-8,.row>.col-sm-9,.row>.col-sm-auto,.row>.col-sm-grow,.row>.col-sm-shrink{max-width:100%;min-width:0;width:auto}.column>.col-sm,.column>.col-sm-0,.column>.col-sm-1,.column>.col-sm-10,.column>.col-sm-11,.column>.col-sm-12,.column>.col-sm-2,.column>.col-sm-3,.column>.col-sm-4,.column>.col-sm-5,.column>.col-sm-6,.column>.col-sm-7,.column>.col-sm-8,.column>.col-sm-9,.column>.col-sm-auto,.column>.col-sm-grow,.column>.col-sm-shrink,.flex>.col-sm,.flex>.col-sm-0,.flex>.col-sm-1,.flex>.col-sm-10,.flex>.col-sm-11,.flex>.col-sm-12,.flex>.col-sm-2,.flex>.col-sm-3,.flex>.col-sm-4,.flex>.col-sm-5,.flex>.col-sm-6,.flex>.col-sm-7,.flex>.col-sm-8,.flex>.col-sm-9,.flex>.col-sm-auto,.flex>.col-sm-grow,.flex>.col-sm-shrink{height:auto;max-height:100%;min-height:0}.col-sm{flex:10000 1 0%}.col-sm-0,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto{flex:0 0 auto}.col-sm-grow{flex:1 0 auto}.col-sm-shrink{flex:0 1 auto}.row>.col-sm-0{height:auto;width:0}.row>.offset-sm-0{margin-left:0}.column>.col-sm-0{height:0;width:auto}.row>.col-sm-1{height:auto;width:8.3333%}.row>.offset-sm-1{margin-left:8.3333%}.column>.col-sm-1{height:8.3333%;width:auto}.row>.col-sm-2{height:auto;width:16.6667%}.row>.offset-sm-2{margin-left:16.6667%}.column>.col-sm-2{height:16.6667%;width:auto}.row>.col-sm-3{height:auto;width:25%}.row>.offset-sm-3{margin-left:25%}.column>.col-sm-3{height:25%;width:auto}.row>.col-sm-4{height:auto;width:33.3333%}.row>.offset-sm-4{margin-left:33.3333%}.column>.col-sm-4{height:33.3333%;width:auto}.row>.col-sm-5{height:auto;width:41.6667%}.row>.offset-sm-5{margin-left:41.6667%}.column>.col-sm-5{height:41.6667%;width:auto}.row>.col-sm-6{height:auto;width:50%}.row>.offset-sm-6{margin-left:50%}.column>.col-sm-6{height:50%;width:auto}.row>.col-sm-7{height:auto;width:58.3333%}.row>.offset-sm-7{margin-left:58.3333%}.column>.col-sm-7{height:58.3333%;width:auto}.row>.col-sm-8{height:auto;width:66.6667%}.row>.offset-sm-8{margin-left:66.6667%}.column>.col-sm-8{height:66.6667%;width:auto}.row>.col-sm-9{height:auto;width:75%}.row>.offset-sm-9{margin-left:75%}.column>.col-sm-9{height:75%;width:auto}.row>.col-sm-10{height:auto;width:83.3333%}.row>.offset-sm-10{margin-left:83.3333%}.column>.col-sm-10{height:83.3333%;width:auto}.row>.col-sm-11{height:auto;width:91.6667%}.row>.offset-sm-11{margin-left:91.6667%}.column>.col-sm-11{height:91.6667%;width:auto}.row>.col-sm-12{height:auto;width:100%}.row>.offset-sm-12{margin-left:100%}.column>.col-sm-12{height:100%;width:auto}}@media (min-width:1024px){.flex>.col-md,.flex>.col-md-0,.flex>.col-md-1,.flex>.col-md-10,.flex>.col-md-11,.flex>.col-md-12,.flex>.col-md-2,.flex>.col-md-3,.flex>.col-md-4,.flex>.col-md-5,.flex>.col-md-6,.flex>.col-md-7,.flex>.col-md-8,.flex>.col-md-9,.flex>.col-md-auto,.flex>.col-md-grow,.flex>.col-md-shrink,.row>.col-md,.row>.col-md-0,.row>.col-md-1,.row>.col-md-10,.row>.col-md-11,.row>.col-md-12,.row>.col-md-2,.row>.col-md-3,.row>.col-md-4,.row>.col-md-5,.row>.col-md-6,.row>.col-md-7,.row>.col-md-8,.row>.col-md-9,.row>.col-md-auto,.row>.col-md-grow,.row>.col-md-shrink{max-width:100%;min-width:0;width:auto}.column>.col-md,.column>.col-md-0,.column>.col-md-1,.column>.col-md-10,.column>.col-md-11,.column>.col-md-12,.column>.col-md-2,.column>.col-md-3,.column>.col-md-4,.column>.col-md-5,.column>.col-md-6,.column>.col-md-7,.column>.col-md-8,.column>.col-md-9,.column>.col-md-auto,.column>.col-md-grow,.column>.col-md-shrink,.flex>.col-md,.flex>.col-md-0,.flex>.col-md-1,.flex>.col-md-10,.flex>.col-md-11,.flex>.col-md-12,.flex>.col-md-2,.flex>.col-md-3,.flex>.col-md-4,.flex>.col-md-5,.flex>.col-md-6,.flex>.col-md-7,.flex>.col-md-8,.flex>.col-md-9,.flex>.col-md-auto,.flex>.col-md-grow,.flex>.col-md-shrink{height:auto;max-height:100%;min-height:0}.col-md{flex:10000 1 0%}.col-md-0,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto{flex:0 0 auto}.col-md-grow{flex:1 0 auto}.col-md-shrink{flex:0 1 auto}.row>.col-md-0{height:auto;width:0}.row>.offset-md-0{margin-left:0}.column>.col-md-0{height:0;width:auto}.row>.col-md-1{height:auto;width:8.3333%}.row>.offset-md-1{margin-left:8.3333%}.column>.col-md-1{height:8.3333%;width:auto}.row>.col-md-2{height:auto;width:16.6667%}.row>.offset-md-2{margin-left:16.6667%}.column>.col-md-2{height:16.6667%;width:auto}.row>.col-md-3{height:auto;width:25%}.row>.offset-md-3{margin-left:25%}.column>.col-md-3{height:25%;width:auto}.row>.col-md-4{height:auto;width:33.3333%}.row>.offset-md-4{margin-left:33.3333%}.column>.col-md-4{height:33.3333%;width:auto}.row>.col-md-5{height:auto;width:41.6667%}.row>.offset-md-5{margin-left:41.6667%}.column>.col-md-5{height:41.6667%;width:auto}.row>.col-md-6{height:auto;width:50%}.row>.offset-md-6{margin-left:50%}.column>.col-md-6{height:50%;width:auto}.row>.col-md-7{height:auto;width:58.3333%}.row>.offset-md-7{margin-left:58.3333%}.column>.col-md-7{height:58.3333%;width:auto}.row>.col-md-8{height:auto;width:66.6667%}.row>.offset-md-8{margin-left:66.6667%}.column>.col-md-8{height:66.6667%;width:auto}.row>.col-md-9{height:auto;width:75%}.row>.offset-md-9{margin-left:75%}.column>.col-md-9{height:75%;width:auto}.row>.col-md-10{height:auto;width:83.3333%}.row>.offset-md-10{margin-left:83.3333%}.column>.col-md-10{height:83.3333%;width:auto}.row>.col-md-11{height:auto;width:91.6667%}.row>.offset-md-11{margin-left:91.6667%}.column>.col-md-11{height:91.6667%;width:auto}.row>.col-md-12{height:auto;width:100%}.row>.offset-md-12{margin-left:100%}.column>.col-md-12{height:100%;width:auto}}@media (min-width:1440px){.flex>.col-lg,.flex>.col-lg-0,.flex>.col-lg-1,.flex>.col-lg-10,.flex>.col-lg-11,.flex>.col-lg-12,.flex>.col-lg-2,.flex>.col-lg-3,.flex>.col-lg-4,.flex>.col-lg-5,.flex>.col-lg-6,.flex>.col-lg-7,.flex>.col-lg-8,.flex>.col-lg-9,.flex>.col-lg-auto,.flex>.col-lg-grow,.flex>.col-lg-shrink,.row>.col-lg,.row>.col-lg-0,.row>.col-lg-1,.row>.col-lg-10,.row>.col-lg-11,.row>.col-lg-12,.row>.col-lg-2,.row>.col-lg-3,.row>.col-lg-4,.row>.col-lg-5,.row>.col-lg-6,.row>.col-lg-7,.row>.col-lg-8,.row>.col-lg-9,.row>.col-lg-auto,.row>.col-lg-grow,.row>.col-lg-shrink{max-width:100%;min-width:0;width:auto}.column>.col-lg,.column>.col-lg-0,.column>.col-lg-1,.column>.col-lg-10,.column>.col-lg-11,.column>.col-lg-12,.column>.col-lg-2,.column>.col-lg-3,.column>.col-lg-4,.column>.col-lg-5,.column>.col-lg-6,.column>.col-lg-7,.column>.col-lg-8,.column>.col-lg-9,.column>.col-lg-auto,.column>.col-lg-grow,.column>.col-lg-shrink,.flex>.col-lg,.flex>.col-lg-0,.flex>.col-lg-1,.flex>.col-lg-10,.flex>.col-lg-11,.flex>.col-lg-12,.flex>.col-lg-2,.flex>.col-lg-3,.flex>.col-lg-4,.flex>.col-lg-5,.flex>.col-lg-6,.flex>.col-lg-7,.flex>.col-lg-8,.flex>.col-lg-9,.flex>.col-lg-auto,.flex>.col-lg-grow,.flex>.col-lg-shrink{height:auto;max-height:100%;min-height:0}.col-lg{flex:10000 1 0%}.col-lg-0,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto{flex:0 0 auto}.col-lg-grow{flex:1 0 auto}.col-lg-shrink{flex:0 1 auto}.row>.col-lg-0{height:auto;width:0}.row>.offset-lg-0{margin-left:0}.column>.col-lg-0{height:0;width:auto}.row>.col-lg-1{height:auto;width:8.3333%}.row>.offset-lg-1{margin-left:8.3333%}.column>.col-lg-1{height:8.3333%;width:auto}.row>.col-lg-2{height:auto;width:16.6667%}.row>.offset-lg-2{margin-left:16.6667%}.column>.col-lg-2{height:16.6667%;width:auto}.row>.col-lg-3{height:auto;width:25%}.row>.offset-lg-3{margin-left:25%}.column>.col-lg-3{height:25%;width:auto}.row>.col-lg-4{height:auto;width:33.3333%}.row>.offset-lg-4{margin-left:33.3333%}.column>.col-lg-4{height:33.3333%;width:auto}.row>.col-lg-5{height:auto;width:41.6667%}.row>.offset-lg-5{margin-left:41.6667%}.column>.col-lg-5{height:41.6667%;width:auto}.row>.col-lg-6{height:auto;width:50%}.row>.offset-lg-6{margin-left:50%}.column>.col-lg-6{height:50%;width:auto}.row>.col-lg-7{height:auto;width:58.3333%}.row>.offset-lg-7{margin-left:58.3333%}.column>.col-lg-7{height:58.3333%;width:auto}.row>.col-lg-8{height:auto;width:66.6667%}.row>.offset-lg-8{margin-left:66.6667%}.column>.col-lg-8{height:66.6667%;width:auto}.row>.col-lg-9{height:auto;width:75%}.row>.offset-lg-9{margin-left:75%}.column>.col-lg-9{height:75%;width:auto}.row>.col-lg-10{height:auto;width:83.3333%}.row>.offset-lg-10{margin-left:83.3333%}.column>.col-lg-10{height:83.3333%;width:auto}.row>.col-lg-11{height:auto;width:91.6667%}.row>.offset-lg-11{margin-left:91.6667%}.column>.col-lg-11{height:91.6667%;width:auto}.row>.col-lg-12{height:auto;width:100%}.row>.offset-lg-12{margin-left:100%}.column>.col-lg-12{height:100%;width:auto}}@media (min-width:1920px){.flex>.col-xl,.flex>.col-xl-0,.flex>.col-xl-1,.flex>.col-xl-10,.flex>.col-xl-11,.flex>.col-xl-12,.flex>.col-xl-2,.flex>.col-xl-3,.flex>.col-xl-4,.flex>.col-xl-5,.flex>.col-xl-6,.flex>.col-xl-7,.flex>.col-xl-8,.flex>.col-xl-9,.flex>.col-xl-auto,.flex>.col-xl-grow,.flex>.col-xl-shrink,.row>.col-xl,.row>.col-xl-0,.row>.col-xl-1,.row>.col-xl-10,.row>.col-xl-11,.row>.col-xl-12,.row>.col-xl-2,.row>.col-xl-3,.row>.col-xl-4,.row>.col-xl-5,.row>.col-xl-6,.row>.col-xl-7,.row>.col-xl-8,.row>.col-xl-9,.row>.col-xl-auto,.row>.col-xl-grow,.row>.col-xl-shrink{max-width:100%;min-width:0;width:auto}.column>.col-xl,.column>.col-xl-0,.column>.col-xl-1,.column>.col-xl-10,.column>.col-xl-11,.column>.col-xl-12,.column>.col-xl-2,.column>.col-xl-3,.column>.col-xl-4,.column>.col-xl-5,.column>.col-xl-6,.column>.col-xl-7,.column>.col-xl-8,.column>.col-xl-9,.column>.col-xl-auto,.column>.col-xl-grow,.column>.col-xl-shrink,.flex>.col-xl,.flex>.col-xl-0,.flex>.col-xl-1,.flex>.col-xl-10,.flex>.col-xl-11,.flex>.col-xl-12,.flex>.col-xl-2,.flex>.col-xl-3,.flex>.col-xl-4,.flex>.col-xl-5,.flex>.col-xl-6,.flex>.col-xl-7,.flex>.col-xl-8,.flex>.col-xl-9,.flex>.col-xl-auto,.flex>.col-xl-grow,.flex>.col-xl-shrink{height:auto;max-height:100%;min-height:0}.col-xl{flex:10000 1 0%}.col-xl-0,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{flex:0 0 auto}.col-xl-grow{flex:1 0 auto}.col-xl-shrink{flex:0 1 auto}.row>.col-xl-0{height:auto;width:0}.row>.offset-xl-0{margin-left:0}.column>.col-xl-0{height:0;width:auto}.row>.col-xl-1{height:auto;width:8.3333%}.row>.offset-xl-1{margin-left:8.3333%}.column>.col-xl-1{height:8.3333%;width:auto}.row>.col-xl-2{height:auto;width:16.6667%}.row>.offset-xl-2{margin-left:16.6667%}.column>.col-xl-2{height:16.6667%;width:auto}.row>.col-xl-3{height:auto;width:25%}.row>.offset-xl-3{margin-left:25%}.column>.col-xl-3{height:25%;width:auto}.row>.col-xl-4{height:auto;width:33.3333%}.row>.offset-xl-4{margin-left:33.3333%}.column>.col-xl-4{height:33.3333%;width:auto}.row>.col-xl-5{height:auto;width:41.6667%}.row>.offset-xl-5{margin-left:41.6667%}.column>.col-xl-5{height:41.6667%;width:auto}.row>.col-xl-6{height:auto;width:50%}.row>.offset-xl-6{margin-left:50%}.column>.col-xl-6{height:50%;width:auto}.row>.col-xl-7{height:auto;width:58.3333%}.row>.offset-xl-7{margin-left:58.3333%}.column>.col-xl-7{height:58.3333%;width:auto}.row>.col-xl-8{height:auto;width:66.6667%}.row>.offset-xl-8{margin-left:66.6667%}.column>.col-xl-8{height:66.6667%;width:auto}.row>.col-xl-9{height:auto;width:75%}.row>.offset-xl-9{margin-left:75%}.column>.col-xl-9{height:75%;width:auto}.row>.col-xl-10{height:auto;width:83.3333%}.row>.offset-xl-10{margin-left:83.3333%}.column>.col-xl-10{height:83.3333%;width:auto}.row>.col-xl-11{height:auto;width:91.6667%}.row>.offset-xl-11{margin-left:91.6667%}.column>.col-xl-11{height:91.6667%;width:auto}.row>.col-xl-12{height:auto;width:100%}.row>.offset-xl-12{margin-left:100%}.column>.col-xl-12{height:100%;width:auto}}.rounded-borders{border-radius:4px}.border-radius-inherit{border-radius:inherit}.no-transition{transition:none!important}.transition-0{transition:0s!important}.glossy{background-image:linear-gradient(180deg,#ffffff4d,#fff0 50%,#0000001f 51%,#0000000a)!important}.q-placeholder::placeholder{color:inherit;opacity:.7}.q-body--fullscreen-mixin,.q-body--prevent-scroll{position:fixed!important}.q-body--force-scrollbar-x{overflow-x:scroll}.q-body--force-scrollbar-y{overflow-y:scroll}.q-no-input-spinner{-moz-appearance:textfield!important}.q-no-input-spinner::-webkit-inner-spin-button,.q-no-input-spinner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.q-link{outline:0;text-decoration:none}.q-link--focusable:focus-visible{-webkit-text-decoration:underline dashed currentColor 1px;text-decoration:underline dashed currentColor 1px}body.electron .q-electron-drag{-webkit-app-region:drag;-webkit-user-select:none}body.electron .q-electron-drag .q-btn-item,body.electron .q-electron-drag--exception{-webkit-app-region:no-drag}img.responsive{height:auto;max-width:100%}.non-selectable{-webkit-user-select:none!important;user-select:none!important}.scroll,body.mobile .scroll--mobile{overflow:auto}.scroll,.scroll-x,.scroll-y{-webkit-overflow-scrolling:touch;will-change:scroll-position}.scroll-x{overflow-x:auto}.scroll-y{overflow-y:auto}.no-scroll{overflow:hidden!important}.no-pointer-events,.no-pointer-events--children,.no-pointer-events--children *{pointer-events:none!important}.all-pointer-events{pointer-events:all!important}.cursor-pointer{cursor:pointer!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-inherit{cursor:inherit!important}.cursor-none{cursor:none!important}[aria-busy=true]{cursor:progress}[aria-controls]{cursor:pointer}[aria-disabled=true]{cursor:default}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-135{transform:rotate(135deg)}.rotate-180{transform:rotate(180deg)}.rotate-225{transform:rotate(225deg)}.rotate-270{transform:rotate(270deg)}.rotate-315{transform:rotate(315deg)}.flip-horizontal{transform:scaleX(-1)}.flip-vertical{transform:scaleY(-1)}.float-left{float:left}.float-right{float:right}.relative-position{position:relative}.fixed,.fixed-bottom,.fixed-bottom-left,.fixed-bottom-right,.fixed-center,.fixed-full,.fixed-left,.fixed-right,.fixed-top,.fixed-top-left,.fixed-top-right,.fullscreen{position:fixed}.absolute,.absolute-bottom,.absolute-bottom-left,.absolute-bottom-right,.absolute-center,.absolute-full,.absolute-left,.absolute-right,.absolute-top,.absolute-top-left,.absolute-top-right{position:absolute}.absolute-top,.fixed-top{left:0;right:0;top:0}.absolute-right,.fixed-right{bottom:0;right:0;top:0}.absolute-bottom,.fixed-bottom{bottom:0;left:0;right:0}.absolute-left,.fixed-left{bottom:0;left:0;top:0}.absolute-top-left,.fixed-top-left{left:0;top:0}.absolute-top-right,.fixed-top-right{right:0;top:0}.absolute-bottom-left,.fixed-bottom-left{bottom:0;left:0}.absolute-bottom-right,.fixed-bottom-right{bottom:0;right:0}.fullscreen{border-radius:0!important;max-height:100vh;max-width:100vw;z-index:6000}body.q-ios-padding .fullscreen{padding-bottom:env(safe-area-inset-bottom)!important;padding-top:env(safe-area-inset-top)!important}.absolute-full,.fixed-full,.fullscreen{bottom:0;left:0;right:0;top:0}.absolute-center,.fixed-center{left:50%;top:50%;transform:translate(-50%,-50%)}.vertical-top{vertical-align:top!important}.vertical-middle{vertical-align:middle!important}.vertical-bottom{vertical-align:bottom!important}.on-left{margin-right:12px}.on-right{margin-left:12px}.q-position-engine{margin-left:var(--q-pe-left,0)!important;margin-top:var(--q-pe-top,0)!important;visibility:collapse;will-change:auto}:root{--q-size-xs:0;--q-size-sm:600px;--q-size-md:1024px;--q-size-lg:1440px;--q-size-xl:1920px}.fit{width:100%!important}.fit,.full-height{height:100%!important}.full-width{margin-left:0!important;margin-right:0!important;width:100%!important}.window-height{height:100vh!important;margin-bottom:0!important;margin-top:0!important}.window-width{margin-left:0!important;margin-right:0!important;width:100vw!important}.block{display:block!important}.inline-block{display:inline-block!important}.q-pa-none{padding:0}.q-pl-none{padding-left:0}.q-pr-none{padding-right:0}.q-pt-none{padding-top:0}.q-pb-none{padding-bottom:0}.q-px-none{padding-left:0;padding-right:0}.q-py-none{padding-bottom:0;padding-top:0}.q-ma-none{margin:0}.q-ml-none{margin-left:0}.q-mr-none{margin-right:0}.q-mt-none{margin-top:0}.q-mb-none{margin-bottom:0}.q-mx-none{margin-left:0;margin-right:0}.q-my-none{margin-bottom:0;margin-top:0}.q-pa-xs{padding:4px}.q-pl-xs{padding-left:4px}.q-pr-xs{padding-right:4px}.q-pt-xs{padding-top:4px}.q-pb-xs{padding-bottom:4px}.q-px-xs{padding-left:4px;padding-right:4px}.q-py-xs{padding-bottom:4px;padding-top:4px}.q-ma-xs{margin:4px}.q-ml-xs{margin-left:4px}.q-mr-xs{margin-right:4px}.q-mt-xs{margin-top:4px}.q-mb-xs{margin-bottom:4px}.q-mx-xs{margin-left:4px;margin-right:4px}.q-my-xs{margin-bottom:4px;margin-top:4px}.q-pa-sm{padding:8px}.q-pl-sm{padding-left:8px}.q-pr-sm{padding-right:8px}.q-pt-sm{padding-top:8px}.q-pb-sm{padding-bottom:8px}.q-px-sm{padding-left:8px;padding-right:8px}.q-py-sm{padding-bottom:8px;padding-top:8px}.q-ma-sm{margin:8px}.q-ml-sm{margin-left:8px}.q-mr-sm{margin-right:8px}.q-mt-sm{margin-top:8px}.q-mb-sm{margin-bottom:8px}.q-mx-sm{margin-left:8px;margin-right:8px}.q-my-sm{margin-bottom:8px;margin-top:8px}.q-pa-md{padding:16px}.q-pl-md{padding-left:16px}.q-pr-md{padding-right:16px}.q-pt-md{padding-top:16px}.q-pb-md{padding-bottom:16px}.q-px-md{padding-left:16px;padding-right:16px}.q-py-md{padding-bottom:16px;padding-top:16px}.q-ma-md{margin:16px}.q-ml-md{margin-left:16px}.q-mr-md{margin-right:16px}.q-mt-md{margin-top:16px}.q-mb-md{margin-bottom:16px}.q-mx-md{margin-left:16px;margin-right:16px}.q-my-md{margin-bottom:16px;margin-top:16px}.q-pa-lg{padding:24px}.q-pl-lg{padding-left:24px}.q-pr-lg{padding-right:24px}.q-pt-lg{padding-top:24px}.q-pb-lg{padding-bottom:24px}.q-px-lg{padding-left:24px;padding-right:24px}.q-py-lg{padding-bottom:24px;padding-top:24px}.q-ma-lg{margin:24px}.q-ml-lg{margin-left:24px}.q-mr-lg{margin-right:24px}.q-mt-lg{margin-top:24px}.q-mb-lg{margin-bottom:24px}.q-mx-lg{margin-left:24px;margin-right:24px}.q-my-lg{margin-bottom:24px;margin-top:24px}.q-pa-xl{padding:48px}.q-pl-xl{padding-left:48px}.q-pr-xl{padding-right:48px}.q-pt-xl{padding-top:48px}.q-pb-xl{padding-bottom:48px}.q-px-xl{padding-left:48px;padding-right:48px}.q-py-xl{padding-bottom:48px;padding-top:48px}.q-ma-xl{margin:48px}.q-ml-xl{margin-left:48px}.q-mr-xl{margin-right:48px}.q-mt-xl{margin-top:48px}.q-mb-xl{margin-bottom:48px}.q-mx-xl{margin-left:48px;margin-right:48px}.q-my-xl{margin-bottom:48px;margin-top:48px}.q-mt-auto,.q-my-auto{margin-top:auto}.q-ml-auto{margin-left:auto}.q-mb-auto,.q-my-auto{margin-bottom:auto}.q-mr-auto,.q-mx-auto{margin-right:auto}.q-mx-auto{margin-left:auto}.q-touch{user-drag:none;-khtml-user-drag:none;-webkit-user-drag:none;-webkit-user-select:none;user-select:none}.q-touch-x{touch-action:pan-x}.q-touch-y{touch-action:pan-y}:root{--q-transition-duration:.3s}.q-transition--fade-enter-active,.q-transition--fade-leave-active,.q-transition--flip-enter-active,.q-transition--flip-leave-active,.q-transition--jump-down-enter-active,.q-transition--jump-down-leave-active,.q-transition--jump-left-enter-active,.q-transition--jump-left-leave-active,.q-transition--jump-right-enter-active,.q-transition--jump-right-leave-active,.q-transition--jump-up-enter-active,.q-transition--jump-up-leave-active,.q-transition--rotate-enter-active,.q-transition--rotate-leave-active,.q-transition--scale-enter-active,.q-transition--scale-leave-active,.q-transition--slide-down-enter-active,.q-transition--slide-down-leave-active,.q-transition--slide-left-enter-active,.q-transition--slide-left-leave-active,.q-transition--slide-right-enter-active,.q-transition--slide-right-leave-active,.q-transition--slide-up-enter-active,.q-transition--slide-up-leave-active{--q-transition-duration:.3s;--q-transition-easing:cubic-bezier(0.215,0.61,0.355,1)}.q-transition--fade-leave-active,.q-transition--flip-leave-active,.q-transition--jump-down-leave-active,.q-transition--jump-left-leave-active,.q-transition--jump-right-leave-active,.q-transition--jump-up-leave-active,.q-transition--rotate-leave-active,.q-transition--scale-leave-active,.q-transition--slide-down-leave-active,.q-transition--slide-left-leave-active,.q-transition--slide-right-leave-active,.q-transition--slide-up-leave-active{position:absolute}.q-transition--slide-down-enter-active,.q-transition--slide-down-leave-active,.q-transition--slide-left-enter-active,.q-transition--slide-left-leave-active,.q-transition--slide-right-enter-active,.q-transition--slide-right-leave-active,.q-transition--slide-up-enter-active,.q-transition--slide-up-leave-active{transition:transform var(--q-transition-duration) var(--q-transition-easing)}.q-transition--slide-right-enter-from{transform:translate3d(-100%,0,0)}.q-transition--slide-left-enter-from,.q-transition--slide-right-leave-to{transform:translate3d(100%,0,0)}.q-transition--slide-left-leave-to{transform:translate3d(-100%,0,0)}.q-transition--slide-up-enter-from{transform:translate3d(0,100%,0)}.q-transition--slide-down-enter-from,.q-transition--slide-up-leave-to{transform:translate3d(0,-100%,0)}.q-transition--slide-down-leave-to{transform:translate3d(0,100%,0)}.q-transition--jump-down-enter-active,.q-transition--jump-down-leave-active,.q-transition--jump-left-enter-active,.q-transition--jump-left-leave-active,.q-transition--jump-right-enter-active,.q-transition--jump-right-leave-active,.q-transition--jump-up-enter-active,.q-transition--jump-up-leave-active{transition:opacity var(--q-transition-duration),transform var(--q-transition-duration)}.q-transition--jump-down-enter-from,.q-transition--jump-down-leave-to,.q-transition--jump-left-enter-from,.q-transition--jump-left-leave-to,.q-transition--jump-right-enter-from,.q-transition--jump-right-leave-to,.q-transition--jump-up-enter-from,.q-transition--jump-up-leave-to{opacity:0}.q-transition--jump-right-enter-from{transform:translate3d(-15px,0,0)}.q-transition--jump-left-enter-from,.q-transition--jump-right-leave-to{transform:translate3d(15px,0,0)}.q-transition--jump-left-leave-to{transform:translateX(-15px)}.q-transition--jump-up-enter-from{transform:translate3d(0,15px,0)}.q-transition--jump-down-enter-from,.q-transition--jump-up-leave-to{transform:translate3d(0,-15px,0)}.q-transition--jump-down-leave-to{transform:translate3d(0,15px,0)}.q-transition--fade-enter-active,.q-transition--fade-leave-active{transition:opacity var(--q-transition-duration) ease-out}.q-transition--fade-enter-from,.q-transition--fade-leave-to{opacity:0}.q-transition--scale-enter-active,.q-transition--scale-leave-active{transition:opacity var(--q-transition-duration),transform var(--q-transition-duration) var(--q-transition-easing)}.q-transition--scale-enter-from,.q-transition--scale-leave-to{opacity:0;transform:scale3d(0,0,1)}.q-transition--rotate-enter-active,.q-transition--rotate-leave-active{transform-style:preserve-3d;transition:opacity var(--q-transition-duration),transform var(--q-transition-duration) var(--q-transition-easing)}.q-transition--rotate-enter-from,.q-transition--rotate-leave-to{opacity:0;transform:scale3d(0,0,1) rotate(90deg)}.q-transition--flip-down-enter-active,.q-transition--flip-down-leave-active,.q-transition--flip-left-enter-active,.q-transition--flip-left-leave-active,.q-transition--flip-right-enter-active,.q-transition--flip-right-leave-active,.q-transition--flip-up-enter-active,.q-transition--flip-up-leave-active{backface-visibility:hidden;transition:transform var(--q-transition-duration)}.q-transition--flip-down-enter-to,.q-transition--flip-down-leave-from,.q-transition--flip-left-enter-to,.q-transition--flip-left-leave-from,.q-transition--flip-right-enter-to,.q-transition--flip-right-leave-from,.q-transition--flip-up-enter-to,.q-transition--flip-up-leave-from{transform:perspective(400px) rotate3d(1,1,0,0deg)}.q-transition--flip-right-enter-from{transform:perspective(400px) rotateY(-180deg)}.q-transition--flip-left-enter-from,.q-transition--flip-right-leave-to{transform:perspective(400px) rotateY(180deg)}.q-transition--flip-left-leave-to{transform:perspective(400px) rotateY(-180deg)}.q-transition--flip-up-enter-from{transform:perspective(400px) rotateX(-180deg)}.q-transition--flip-down-enter-from,.q-transition--flip-up-leave-to{transform:perspective(400px) rotateX(180deg)}.q-transition--flip-down-leave-to{transform:perspective(400px) rotateX(-180deg)}body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:antialiased;font-family:Roboto,-apple-system,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.5;min-height:100%;min-width:100px}h1{font-size:6rem;letter-spacing:-.01562em;line-height:6rem}h1,h2{font-weight:300}h2{font-size:3.75rem;letter-spacing:-.00833em;line-height:3.75rem}h3{font-size:3rem;letter-spacing:normal;line-height:3.125rem}h3,h4{font-weight:400}h4{font-size:2.125rem;letter-spacing:.00735em;line-height:2.5rem}h5{font-size:1.5rem;font-weight:400;letter-spacing:normal}h5,h6{line-height:2rem}h6{font-size:1.25rem;font-weight:500;letter-spacing:.0125em}p{margin:0 0 16px}.text-h1{font-size:6rem;font-weight:300;letter-spacing:-.01562em;line-height:6rem}.text-h2{font-size:3.75rem;font-weight:300;letter-spacing:-.00833em;line-height:3.75rem}.text-h3{font-size:3rem;font-weight:400;letter-spacing:normal;line-height:3.125rem}.text-h4{font-size:2.125rem;font-weight:400;letter-spacing:.00735em;line-height:2.5rem}.text-h5{font-size:1.5rem;font-weight:400;letter-spacing:normal;line-height:2rem}.text-h6{font-size:1.25rem;font-weight:500;letter-spacing:.0125em;line-height:2rem}.text-subtitle1{font-size:1rem;font-weight:400;letter-spacing:.00937em;line-height:1.75rem}.text-subtitle2{font-size:.875rem;font-weight:500;letter-spacing:.00714em;line-height:1.375rem}.text-body1{font-size:1rem;font-weight:400;letter-spacing:.03125em;line-height:1.5rem}.text-body2{font-size:.875rem;font-weight:400;letter-spacing:.01786em;line-height:1.25rem}.text-overline{font-size:.75rem;font-weight:500;letter-spacing:.16667em;line-height:2rem}.text-caption{font-size:.75rem;font-weight:400;letter-spacing:.03333em;line-height:1.25rem}.text-uppercase{text-transform:uppercase}.text-lowercase{text-transform:lowercase}.text-capitalize{text-transform:capitalize}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-justify{-webkit-hyphens:auto;hyphens:auto;text-align:justify}.text-italic{font-style:italic}.text-bold{font-weight:700}.text-no-wrap{white-space:nowrap}.text-strike{text-decoration:line-through}.text-weight-thin{font-weight:100}.text-weight-light{font-weight:300}.text-weight-regular{font-weight:400}.text-weight-medium{font-weight:500}.text-weight-bold{font-weight:700}.text-weight-bolder{font-weight:900}small{font-size:80%}big{font-size:170%}sub{bottom:-.25em}sup{top:-.5em}.no-margin{margin:0!important}.no-padding{padding:0!important}.no-border{border:0!important}.no-border-radius{border-radius:0!important}.no-box-shadow{box-shadow:none!important}.no-outline{outline:0!important}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ellipsis-2-lines,.ellipsis-3-lines{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ellipsis-2-lines{-webkit-line-clamp:2}.ellipsis-3-lines{-webkit-line-clamp:3}.readonly{cursor:default!important}.disabled,.disabled *,[disabled],[disabled] *{cursor:not-allowed!important;outline:0!important}.disabled,[disabled]{opacity:.6!important}.hidden{display:none!important}.invisible,.invisible *{animation:none!important;transition:none!important;visibility:hidden!important}.transparent{background:#0000!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-hidden-y{overflow-y:hidden!important}.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none;height:0;width:0}.dimmed:after,.light-dimmed:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0}.dimmed:after{background:#0006!important}.light-dimmed:after{background:#fff9!important}.z-top{z-index:7000!important}.z-max{z-index:9998!important}body.capacitor .capacitor-hide,body.cordova .cordova-hide,body.desktop .desktop-hide,body.electron .electron-hide,body.mobile .mobile-hide,body.native-mobile .native-mobile-hide,body.platform-android .platform-android-hide,body.platform-ios .platform-ios-hide,body.touch .touch-hide,body.within-iframe .within-iframe-hide,body:not(.capacitor) .capacitor-only,body:not(.cordova) .cordova-only,body:not(.desktop) .desktop-only,body:not(.electron) .electron-only,body:not(.mobile) .mobile-only,body:not(.native-mobile) .native-mobile-only,body:not(.platform-android) .platform-android-only,body:not(.platform-ios) .platform-ios-only,body:not(.touch) .touch-only,body:not(.within-iframe) .within-iframe-only{display:none!important}@media (orientation:portrait){.orientation-landscape{display:none!important}}@media (orientation:landscape){.orientation-portrait{display:none!important}}@media screen{.print-only{display:none!important}}@media print{.print-hide{display:none!important}}@media (max-width:599.98px){.gt-lg,.gt-md,.gt-sm,.gt-xs,.lg,.md,.sm,.xl,.xs-hide{display:none!important}}@media (min-width:600px) and (max-width:1023.98px){.gt-lg,.gt-md,.gt-sm,.lg,.lt-sm,.md,.sm-hide,.xl,.xs{display:none!important}}@media (min-width:1024px) and (max-width:1439.98px){.gt-lg,.gt-md,.lg,.lt-md,.lt-sm,.md-hide,.sm,.xl,.xs{display:none!important}}@media (min-width:1440px) and (max-width:1919.98px){.gt-lg,.lg-hide,.lt-lg,.lt-md,.lt-sm,.md,.sm,.xl,.xs{display:none!important}}@media (min-width:1920px){.lg,.lt-lg,.lt-md,.lt-sm,.lt-xl,.md,.sm,.xl-hide,.xs{display:none!important}}.q-focus-helper,.q-focusable,.q-hoverable,.q-manual-focusable{outline:0}body.desktop .q-focus-helper{border-radius:inherit;height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:background-color .3s cubic-bezier(.25,.8,.5,1),opacity .4s cubic-bezier(.25,.8,.5,1);width:100%}body.desktop .q-focus-helper:after,body.desktop .q-focus-helper:before{border-radius:inherit;content:"";height:100%;left:0;opacity:0;position:absolute;top:0;transition:background-color .3s cubic-bezier(.25,.8,.5,1),opacity .6s cubic-bezier(.25,.8,.5,1);width:100%}body.desktop .q-focus-helper:before{background:#000}body.desktop .q-focus-helper:after{background:#fff}body.desktop .q-focus-helper--rounded{border-radius:4px}body.desktop .q-focus-helper--round{border-radius:50%}body.desktop .q-focusable:focus>.q-focus-helper,body.desktop .q-hoverable:hover>.q-focus-helper,body.desktop .q-manual-focusable--focused>.q-focus-helper{background:currentColor;opacity:.15}body.desktop .q-focusable:focus>.q-focus-helper:before,body.desktop .q-hoverable:hover>.q-focus-helper:before,body.desktop .q-manual-focusable--focused>.q-focus-helper:before{opacity:.1}body.desktop .q-focusable:focus>.q-focus-helper:after,body.desktop .q-hoverable:hover>.q-focus-helper:after,body.desktop .q-manual-focusable--focused>.q-focus-helper:after{opacity:.4}body.desktop .q-focusable:focus>.q-focus-helper,body.desktop .q-manual-focusable--focused>.q-focus-helper{opacity:.22}body.body--dark{background:var(--q-dark-page);color:#fff}.q-dark{background:var(--q-dark);color:#fff}.ais-Breadcrumb-list,.ais-Carousel-list,.ais-CurrentRefinements-list,.ais-FrequentlyBoughtTogether-list,.ais-HierarchicalMenu-list,.ais-Hits-list,.ais-InfiniteHits-list,.ais-InfiniteResults-list,.ais-LookingSimilar-list,.ais-Menu-list,.ais-NumericMenu-list,.ais-Pagination-list,.ais-RatingMenu-list,.ais-RefinementList-list,.ais-RelatedProducts-list,.ais-Results-list,.ais-ToggleRefinement-list,.ais-TrendingItems-list{list-style:none;margin:0;padding:0}.ais-Carousel-navigation,.ais-ClearRefinements-button,.ais-CurrentRefinements-delete,.ais-CurrentRefinements-reset,.ais-GeoSearch-redo,.ais-GeoSearch-reset,.ais-HierarchicalMenu-showMore,.ais-InfiniteHits-loadMore,.ais-InfiniteHits-loadPrevious,.ais-InfiniteResults-loadMore,.ais-Menu-showMore,.ais-RangeInput-submit,.ais-RefinementList-showMore,.ais-SearchBox-reset,.ais-SearchBox-submit,.ais-VoiceSearch-button{background:none;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;user-select:none}.ais-Carousel-navigation::-moz-focus-inner,.ais-ClearRefinements-button::-moz-focus-inner,.ais-CurrentRefinements-delete::-moz-focus-inner,.ais-CurrentRefinements-reset::-moz-focus-inner,.ais-GeoSearch-redo::-moz-focus-inner,.ais-GeoSearch-reset::-moz-focus-inner,.ais-HierarchicalMenu-showMore::-moz-focus-inner,.ais-InfiniteHits-loadMore::-moz-focus-inner,.ais-InfiniteHits-loadPrevious::-moz-focus-inner,.ais-InfiniteResults-loadMore::-moz-focus-inner,.ais-Menu-showMore::-moz-focus-inner,.ais-RangeInput-submit::-moz-focus-inner,.ais-RefinementList-showMore::-moz-focus-inner,.ais-SearchBox-reset::-moz-focus-inner,.ais-SearchBox-submit::-moz-focus-inner,.ais-VoiceSearch-button::-moz-focus-inner{border:0;padding:0}.ais-Carousel-navigation[disabled],.ais-ClearRefinements-button[disabled],.ais-CurrentRefinements-delete[disabled],.ais-CurrentRefinements-reset[disabled],.ais-GeoSearch-redo[disabled],.ais-GeoSearch-reset[disabled],.ais-HierarchicalMenu-showMore[disabled],.ais-InfiniteHits-loadMore[disabled],.ais-InfiniteHits-loadPrevious[disabled],.ais-InfiniteResults-loadMore[disabled],.ais-Menu-showMore[disabled],.ais-RangeInput-submit[disabled],.ais-RefinementList-showMore[disabled],.ais-SearchBox-reset[disabled],.ais-SearchBox-submit[disabled],.ais-VoiceSearch-button[disabled]{cursor:default}.ais-HierarchicalMenu-showMore,.ais-InfiniteHits-loadMore,.ais-InfiniteHits-loadPrevious,.ais-Menu-showMore,.ais-RefinementList-showMore{overflow-anchor:none}.ais-Breadcrumb-item,.ais-Breadcrumb-list,.ais-Pagination-list,.ais-PoweredBy,.ais-RangeInput-form,.ais-RatingMenu-link{align-items:center;display:flex}.ais-GeoSearch,.ais-GeoSearch-map{height:100%}.ais-HierarchicalMenu-list .ais-HierarchicalMenu-list{margin-left:1em}.ais-PoweredBy-logo{display:block;height:1.2em;width:auto}.ais-PoweredBy-text{margin-right:.3rem}.ais-RatingMenu-starIcon{display:block;height:20px;width:20px}.ais-SearchBox-input::-ms-clear,.ais-SearchBox-input::-ms-reveal{display:none;height:0;width:0}.ais-SearchBox-input::-webkit-search-cancel-button,.ais-SearchBox-input::-webkit-search-decoration,.ais-SearchBox-input::-webkit-search-results-button,.ais-SearchBox-input::-webkit-search-results-decoration{display:none}.ais-RangeSlider .rheostat{margin-bottom:40px;margin-top:40px;overflow:visible}.ais-RangeSlider .rheostat-background{height:6px;top:0;width:100%}.ais-RangeSlider .rheostat-handle{margin-left:-12px;top:-7px}.ais-RangeSlider .rheostat-background{background-color:#fff;border:1px solid #aaa;position:relative}.ais-RangeSlider .rheostat-progress{background-color:#333;height:4px;position:absolute;top:1px}.rheostat-handle{background-color:#fff;border:1px solid #333;border-radius:50%;cursor:grab;height:20px;position:relative;width:20px;z-index:1}.rheostat-marker{background-color:#aaa;height:5px;margin-left:-1px;position:absolute;width:1px}.rheostat-marker--large{height:9px}.rheostat-value{padding-top:15px}.rheostat-tooltip,.rheostat-value{margin-left:50%;position:absolute;text-align:center;transform:translateX(-50%)}.rheostat-tooltip{top:-22px}.ais-Carousel{position:relative}.ais-Carousel-list{display:grid;grid-auto-columns:42%;grid-auto-flow:column;overflow-x:auto;scroll-behavior:smooth;scroll-snap-type:x proximity}@media(min-width:999px){.ais-Carousel-list{grid-auto-columns:20%}}.ais-Carousel-navigation{position:absolute;top:35%;z-index:1}.ais-Carousel-navigation--previous{left:0;transform:translateX(-25%)}.ais-Carousel-navigation--next{right:0;transform:translateX(25%)}.ais-Carousel-item{scroll-snap-align:start}[class^=ais-]{box-sizing:border-box;font-size:1rem}a[class^=ais-]{text-decoration:none}.ais-Breadcrumb,.ais-ClearRefinements,.ais-CurrentRefinements,.ais-FrequentlyBoughtTogether,.ais-GeoSearch,.ais-HierarchicalMenu,.ais-Hits,.ais-HitsPerPage,.ais-InfiniteHits,.ais-InfiniteResults,.ais-LookingSimilar,.ais-Menu,.ais-MenuSelect,.ais-NumericMenu,.ais-NumericSelector,.ais-Pagination,.ais-Panel,.ais-PoweredBy,.ais-RangeInput,.ais-RangeSlider,.ais-RatingMenu,.ais-RefinementList,.ais-RelatedProducts,.ais-RelevantSort,.ais-Results,.ais-ResultsPerPage,.ais-SearchBox,.ais-SortBy,.ais-Stats,.ais-ToggleRefinement,.ais-TrendingItems{color:#3a4570}.ais-Breadcrumb-item--selected,.ais-HierarchicalMenu-item--selected,.ais-Menu-item--selected{font-weight:700}.ais-Breadcrumb-separator{font-weight:400;margin:0 .3em}.ais-Breadcrumb-link,.ais-HierarchicalMenu-link,.ais-Menu-link,.ais-Pagination-link,.ais-RatingMenu-link{color:#0096db;transition:color .2s ease-out}.ais-Breadcrumb-link:focus,.ais-Breadcrumb-link:hover,.ais-HierarchicalMenu-link:focus,.ais-HierarchicalMenu-link:hover,.ais-Menu-link:focus,.ais-Menu-link:hover,.ais-Pagination-link:focus,.ais-Pagination-link:hover,.ais-RatingMenu-link:focus,.ais-RatingMenu-link:hover{color:#0073a8}.ais-Carousel-navigation,.ais-ClearRefinements-button,.ais-CurrentRefinements-reset,.ais-GeoSearch-redo,.ais-GeoSearch-reset,.ais-HierarchicalMenu-showMore,.ais-InfiniteHits-loadMore,.ais-InfiniteHits-loadPrevious,.ais-InfiniteResults-loadMore,.ais-Menu-showMore,.ais-RefinementList-showMore,.ais-RelevantSort-button{background-color:#0096db;border-radius:5px;color:#fff;font-size:.8rem;outline:none;padding:.3rem .5rem;transition:background-color .2s ease-out}.ais-Carousel-navigation:focus,.ais-Carousel-navigation:hover,.ais-ClearRefinements-button:focus,.ais-ClearRefinements-button:hover,.ais-CurrentRefinements-reset:focus,.ais-CurrentRefinements-reset:hover,.ais-GeoSearch-redo:focus,.ais-GeoSearch-redo:hover,.ais-GeoSearch-reset:focus,.ais-GeoSearch-reset:hover,.ais-HierarchicalMenu-showMore:focus,.ais-HierarchicalMenu-showMore:hover,.ais-InfiniteHits-loadMore:focus,.ais-InfiniteHits-loadMore:hover,.ais-InfiniteHits-loadPrevious:focus,.ais-InfiniteHits-loadPrevious:hover,.ais-InfiniteResults-loadMore:focus,.ais-InfiniteResults-loadMore:hover,.ais-Menu-showMore:focus,.ais-Menu-showMore:hover,.ais-RefinementList-showMore:focus,.ais-RefinementList-showMore:hover,.ais-RelevantSort-button:focus,.ais-RelevantSort-button:hover{background-color:#0073a8}.ais-ClearRefinements-button--disabled,.ais-GeoSearch-redo--disabled,.ais-GeoSearch-reset--disabled,.ais-HierarchicalMenu-showMore--disabled,.ais-InfiniteHits-loadMore--disabled,.ais-InfiniteResults-loadMore--disabled,.ais-Menu-showMore--disabled,.ais-RefinementList-showMore--disabled{cursor:not-allowed;opacity:.6}.ais-ClearRefinements-button--disabled:focus,.ais-ClearRefinements-button--disabled:hover,.ais-GeoSearch-redo--disabled:focus,.ais-GeoSearch-redo--disabled:hover,.ais-GeoSearch-reset--disabled:focus,.ais-GeoSearch-reset--disabled:hover,.ais-HierarchicalMenu-showMore--disabled:focus,.ais-HierarchicalMenu-showMore--disabled:hover,.ais-InfiniteHits-loadMore--disabled:focus,.ais-InfiniteHits-loadMore--disabled:hover,.ais-InfiniteResults-loadMore--disabled:focus,.ais-InfiniteResults-loadMore--disabled:hover,.ais-Menu-showMore--disabled:focus,.ais-Menu-showMore--disabled:hover,.ais-RefinementList-showMore--disabled:focus,.ais-RefinementList-showMore--disabled:hover{background-color:#0096db}.ais-InfiniteHits-loadPrevious--disabled{display:none}@media(hover:none)and (pointer:coarse){.ais-Carousel-navigation{display:none}}.ais-Carousel-navigation,.ais-Carousel-navigation[hidden]{opacity:0;visibility:hidden}.ais-Carousel:hover .ais-Carousel-navigation:not([hidden]){opacity:1;visibility:visible}.ais-Carousel-list{gap:.5rem;outline-color:#0096db;outline-offset:.5rem;padding-bottom:.5rem;scrollbar-color:#3a4570 #c4c8d8;scrollbar-width:thin}.ais-Carousel-list::-webkit-scrollbar{height:2px}.ais-Carousel-list::-webkit-scrollbar-track{background-color:#c4c8d8}.ais-Carousel-list::-webkit-scrollbar-thumb{background-color:#3a4570}.ais-CurrentRefinements{margin-top:-.3rem}.ais-CurrentRefinements,.ais-CurrentRefinements-list{display:flex;flex-wrap:wrap}.ais-CurrentRefinements-item{background-color:#495588;border-radius:5px;display:flex;margin-right:.3rem;margin-top:.3rem;padding:.3rem .5rem}.ais-CurrentRefinements-category{display:flex;margin-left:.3em}.ais-CurrentRefinements-delete{margin-left:.3rem}.ais-CurrentRefinements-categoryLabel,.ais-CurrentRefinements-delete,.ais-CurrentRefinements-label{color:#fff;font-size:.8rem;white-space:nowrap}.ais-CurrentRefinements-reset{margin-top:.3rem;white-space:nowrap}.ais-CurrentRefinements-reset+.ais-CurrentRefinements-list{margin-left:.3rem}.ais-GeoSearch{position:relative}.ais-GeoSearch-control{left:3.75rem;position:absolute;top:.8rem}.ais-GeoSearch-label{background-color:#fff;border-radius:5px;box-shadow:0 1px 1px #0000001a;display:block;font-size:.8rem;outline:none;padding:.3rem .5rem;transition:background-color .2s ease-out}.ais-GeoSearch-input{margin:0 .25rem 0 0}.ais-GeoSearch-label,.ais-GeoSearch-redo,.ais-GeoSearch-reset{white-space:nowrap}.ais-GeoSearch-reset{bottom:1.25rem;left:50%;position:absolute;transform:translateX(-50%)}.ais-HierarchicalMenu-link,.ais-Menu-link{display:block;line-height:1.5}.ais-HierarchicalMenu-list,.ais-Menu-list,.ais-NumericMenu-list,.ais-RatingMenu-list,.ais-RefinementList-list{font-weight:400;line-height:1.5}.ais-HierarchicalMenu-link:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7.3 24-2.8-2.8 9.3-9.2-9.3-9.2L7.3 0l12.2 12z' fill='%233A4570'/%3E%3C/svg%3E");background-size:100% 100%;content:"";display:none;height:10px;margin-left:.3em;width:10px}.ais-HierarchicalMenu-item--parent>.ais-HierarchicalMenu-link:after{display:inline-block}.ais-HierarchicalMenu-item--selected>.ais-HierarchicalMenu-link:after{transform:rotate(90deg)}.ais-CurrentRefinements-count,.ais-RatingMenu-count{font-size:.8rem}.ais-CurrentRefinements-count:before,.ais-RatingMenu-count:before{content:"("}.ais-CurrentRefinements-count:after,.ais-RatingMenu-count:after{content:")"}.ais-HierarchicalMenu-count,.ais-Menu-count,.ais-RefinementList-count,.ais-ToggleRefinement-count{background-color:#dfe2ee;border-radius:8px;color:#3a4570;font-size:.8rem;padding:.1rem .4rem}.ais-HierarchicalMenu-showMore,.ais-Menu-showMore,.ais-RefinementList-showMore{margin-top:.5rem}.ais-Highlight-highlighted,.ais-Snippet-highlighted{background-color:#ffc168}.ais-ReverseHighlight-highlighted,.ais-ReverseSnippet-highlighted{background:none;font-style:normal;font-weight:700}.ais-FrequentlyBoughtTogether-list,.ais-Hits-list,.ais-InfiniteHits-list,.ais-InfiniteResults-list,.ais-LookingSimilar-list,.ais-RelatedProducts-list,.ais-Results-list,.ais-TrendingItems-list{display:flex;flex-wrap:wrap;margin-left:-1rem;margin-top:-1rem}.ais-Panel-body .ais-FrequentlyBoughtTogether-list,.ais-Panel-body .ais-Hits-list,.ais-Panel-body .ais-InfiniteHits-list,.ais-Panel-body .ais-InfiniteResults-list,.ais-Panel-body .ais-LookingSimilar-list,.ais-Panel-body .ais-RelatedProducts-list,.ais-Panel-body .ais-Results-list,.ais-Panel-body .ais-TrendingItems-list{margin:.5rem 0 0 -1rem}.ais-FrequentlyBoughtTogether-item,.ais-Hits-item,.ais-InfiniteHits-item,.ais-InfiniteResults-item,.ais-LookingSimilar-item,.ais-RelatedProducts-item,.ais-Results-item,.ais-TrendingItems-item{border:1px solid #c4c8d8;box-shadow:0 2px 5px 0 #e3e5ec;margin-left:1rem;margin-top:1rem;padding:1rem;width:calc(25% - 1rem)}.ais-Panel-body .ais-FrequentlyBoughtTogether-item,.ais-Panel-body .ais-Hits-item,.ais-Panel-body .ais-InfiniteHits-item,.ais-Panel-body .ais-InfiniteResults-item,.ais-Panel-body .ais-LookingSimilar-item,.ais-Panel-body .ais-RelatedProducts-item,.ais-Panel-body .ais-Results-item,.ais-Panel-body .ais-TrendingItems-item{margin:.5rem 0 .5rem 1rem}.ais-InfiniteHits-loadMore,.ais-InfiniteResults-loadMore{margin-top:1rem}.ais-InfiniteHits-loadPrevious{margin-bottom:1rem}.ais-Hits-banner,.ais-InfiniteHits-banner{display:flex;justify-content:center}.ais-Hits-banner-image .ais-InfiniteHits-banner-image{max-width:100%}.ais-HitsPerPage-select,.ais-MenuSelect-select,.ais-NumericSelector-select,.ais-ResultsPerPage-select,.ais-SortBy-select{appearance:none;background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m0 7.3 2.8-2.8 9.2 9.3 9.2-9.3L24 7.3 12 19.5z' fill='%233A4570'/%3E%3C/svg%3E");background-position:92% 50%;background-repeat:no-repeat;background-size:10px 10px;border:1px solid #c4c8d8;border-radius:5px;max-width:100%;padding:.3rem 2rem .3rem .3rem}.ais-Panel--collapsible{position:relative}.ais-Panel--collapsible.ais-Panel--collapsed .ais-Panel-body,.ais-Panel--collapsible.ais-Panel--collapsed .ais-Panel-footer{display:none}.ais-Panel--collapsible .ais-Panel-collapseButton{background:none;border:none;padding:0;position:absolute;right:0;top:0}.ais-Panel-header{border-bottom:1px solid #c4c8d8;font-size:.8rem;font-weight:700;margin-bottom:.5rem;padding-bottom:.5rem;text-transform:uppercase}.ais-Panel-footer{font-size:.8rem;margin-top:.5rem}.ais-RangeInput-input{height:1.5rem;line-height:1.5rem;padding:0 .2rem;width:5rem}.ais-RangeInput-separator{margin:0 .3rem}.ais-RangeInput-submit{appearance:none;background-color:#0096db;border:none;border-radius:5px;color:#fff;font-size:.8rem;height:1.5rem;line-height:1.5rem;margin-left:.3rem;outline:none;padding:0 .5rem;transition:.2s ease-out}.ais-RangeInput-submit:focus,.ais-RangeInput-submit:hover{background-color:#0073a8}.ais-RatingMenu-count{color:#3a4570}.ais-Pagination-list{justify-content:center}.ais-Pagination-item+.ais-Pagination-item{margin-left:.3rem}.ais-Pagination-link{border:1px solid #c4c8d8;border-radius:5px;display:block;padding:.3rem .6rem;transition:background-color .2s ease-out}.ais-Pagination-link:focus,.ais-Pagination-link:hover{background-color:#e3e5ec}.ais-Pagination-item--disabled .ais-Pagination-link{color:#a5abc4;cursor:not-allowed;opacity:.6}.ais-Pagination-item--disabled .ais-Pagination-link:focus,.ais-Pagination-item--disabled .ais-Pagination-link:hover{background-color:#fff;color:#a5abc4}.ais-Pagination-item--selected .ais-Pagination-link{background-color:#0096db;border-color:#0096db;color:#fff}.ais-Pagination-item--selected .ais-Pagination-link:focus,.ais-Pagination-item--selected .ais-Pagination-link:hover{color:#fff}.ais-PoweredBy-text,.ais-RelevantSort-text,.ais-Stats-text,.rheostat-tooltip,.rheostat-value{font-size:.8rem}.ais-RangeSlider .rheostat-progress{background-color:#495588}.ais-RangeSlider .rheostat-background{border-color:#878faf;box-sizing:border-box}.ais-RangeSlider .rheostat-handle{border-color:#878faf}.ais-RangeSlider .rheostat-marker{background-color:#878faf}.ais-Panel-body .ais-RangeSlider{margin:2rem 0}.ais-RangeSlider-handle{background:#fff;border:1px solid #46aeda;border-radius:50%;cursor:pointer;height:20px;position:relative;width:20px;z-index:1}.ais-RangeSlider-tooltip{background:#fff;font-size:.8em;position:absolute;top:-22px}.ais-RangeSlider-value{font-size:.8em;margin-left:-20px;padding-top:15px;position:absolute;text-align:center;width:40px}.ais-RangeSlider-marker{background:#ddd;height:5px;margin-left:-1px;position:absolute;width:1px}.ais-RatingMenu-item--disabled .ais-RatingMenu-count,.ais-RatingMenu-item--disabled .ais-RatingMenu-label{color:#c4c8d8}.ais-RatingMenu-item--selected{font-weight:700}.ais-RatingMenu-link{line-height:1.5}.ais-RatingMenu-link>*+*{margin-left:.3rem}.ais-RatingMenu-starIcon{fill:#ffc168;position:relative;top:-1px;width:15px}.ais-RatingMenu-item--disabled .ais-RatingMenu-starIcon{fill:#c4c8d8}.ais-HierarchicalMenu-searchBox>*,.ais-Menu-searchBox>*,.ais-RefinementList-searchBox>*{margin-bottom:.5rem}.ais-SearchBox-form{display:block;position:relative}.ais-SearchBox-input{appearance:none;background-color:#fff;border:1px solid #c4c8d8;border-radius:5px;padding:.3rem 1.7rem;position:relative;width:100%}.ais-SearchBox-input::-webkit-input-placeholder{color:#a5aed1}.ais-SearchBox-input::-moz-placeholder{color:#a5aed1}.ais-SearchBox-input:-ms-input-placeholder{color:#a5aed1}.ais-SearchBox-input:-moz-placeholder{color:#a5aed1}.ais-SearchBox-loadingIndicator,.ais-SearchBox-reset,.ais-SearchBox-submit{appearance:none;height:20px;position:absolute;right:.3rem;top:50%;transform:translateY(-50%);width:20px;z-index:1}.ais-SearchBox-submit{left:.3rem}.ais-SearchBox-reset{right:.3rem}.ais-SearchBox-loadingIcon,.ais-SearchBox-resetIcon,.ais-SearchBox-submitIcon{left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%)}.ais-SearchBox-resetIcon path,.ais-SearchBox-submitIcon path{fill:#495588}.ais-SearchBox-submitIcon{height:14px;width:14px}.ais-SearchBox-resetIcon{height:12px;width:12px}.ais-SearchBox-loadingIcon{height:16px;width:16px}.ais-VoiceSearch-button{background-color:#0000;border:none;border-radius:50%;color:#3a4570;height:24px;padding:4px;width:24px}.ais-VoiceSearch-button svg{color:currentColor}.ais-VoiceSearch-button:hover{background-color:#a5aed1;color:#fff;cursor:pointer}.ais-VoiceSearch-button:disabled{color:#a5aed1}.ais-VoiceSearch-button:disabled:hover{background:inherit;color:#a5aed1;cursor:not-allowed}.monaco-aria-container{left:-999em;position:absolute}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{background-color:var(--vscode-editorBracketMatch-background);border:1px solid var(--vscode-editorBracketMatch-border);box-sizing:border-box}.inline-editor-progress-decoration{display:inline-block;height:1em;width:1em}.inline-progress-widget{align-items:center;display:flex!important;justify-content:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{animation:none;font-size:90%!important}.inline-progress-widget:hover .icon:before{content:var(--vscode-icon-x-content);font-family:var(--vscode-icon-x-font-family)}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-inputValidation-infoBorder);border-radius:3px;color:var(--vscode-editorHoverWidget-foreground);padding:2px 4px}.monaco-editor .monaco-editor-overlaymessage .message p{margin-block:0}.monaco-editor .monaco-editor-overlaymessage .message a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-editor-overlaymessage .message a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor.hc-black .monaco-editor-overlaymessage .message,.monaco-editor.hc-light .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{border:8px solid #0000;height:0!important;left:2px;position:absolute;width:0!important;z-index:1000}.monaco-editor .monaco-editor-overlaymessage .anchor.top{border-bottom-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage .anchor.below{border-top-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage.below .anchor.below,.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .rendered-markdown kbd{background-color:var(--vscode-keybindingLabel-background);border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);border-radius:3px;border-style:solid;border-width:1px;box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);color:var(--vscode-keybindingLabel-foreground);padding:1px 3px;vertical-align:middle}.rendered-markdown li:has(input[type=checkbox]){list-style-type:none}.monaco-text-button{align-items:center;border:1px solid var(--vscode-button-border,#0000);border-radius:2px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;line-height:18px;padding:4px;text-align:center;width:100%}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled,.monaco-button.disabled:focus{cursor:default;opacity:.4!important}.monaco-text-button .codicon{color:inherit!important;margin:0 .2em}.monaco-text-button.monaco-text-button-with-short-label{flex-direction:row;flex-wrap:wrap;height:28px;overflow:hidden;padding:0 4px}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label{flex-basis:100%}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{flex-grow:1;overflow:hidden;width:0}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label,.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{align-items:center;display:flex;font-style:inherit;font-weight:400;justify-content:center;padding:4px 0}.monaco-button-dropdown{cursor:pointer;display:flex}.monaco-button-dropdown.disabled{cursor:default}.monaco-button-dropdown>.monaco-button:focus{outline-offset:-1px!important}.monaco-button-dropdown.disabled>.monaco-button-dropdown-separator,.monaco-button-dropdown.disabled>.monaco-button.disabled,.monaco-button-dropdown.disabled>.monaco-button.disabled:focus{opacity:.4!important}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-right-width:0!important}.monaco-button-dropdown .monaco-button-dropdown-separator{cursor:default;padding:4px 0}.monaco-button-dropdown .monaco-button-dropdown-separator>div{height:100%;width:1px}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button{align-items:center;border:1px solid var(--vscode-button-border,#0000);border-left-width:0!important;border-radius:0 2px 2px 0;display:flex}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-radius:2px 0 0 2px}.monaco-description-button{align-items:center;display:flex;flex-direction:column;margin:4px 5px}.monaco-description-button .monaco-button-description{font-size:11px;font-style:italic;padding:4px 20px}.monaco-description-button .monaco-button-description,.monaco-description-button .monaco-button-label{align-items:center;display:flex;justify-content:center}.monaco-description-button .monaco-button-description>.codicon,.monaco-description-button .monaco-button-label>.codicon{color:inherit!important;margin:0 .2em}.monaco-button-dropdown.default-colors>.monaco-button,.monaco-button.default-colors{background-color:var(--vscode-button-background);color:var(--vscode-button-foreground)}.monaco-button-dropdown.default-colors>.monaco-button:hover,.monaco-button.default-colors:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-button-dropdown.default-colors>.monaco-button.secondary,.monaco-button.default-colors.secondary{background-color:var(--vscode-button-secondaryBackground);color:var(--vscode-button-secondaryForeground)}.monaco-button-dropdown.default-colors>.monaco-button.secondary:hover,.monaco-button.default-colors.secondary:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator{background-color:var(--vscode-button-background);border-bottom:1px solid var(--vscode-button-border);border-top:1px solid var(--vscode-button-border)}.monaco-button-dropdown.default-colors .monaco-button.secondary+.monaco-button-dropdown-separator{background-color:var(--vscode-button-secondaryBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator>div{background-color:var(--vscode-button-separator)}.post-edit-widget{background-color:var(--vscode-editorWidget-background);border:1px solid var(--vscode-widget-border,#0000);border-radius:4px;box-shadow:0 0 8px 2px var(--vscode-widget-shadow);overflow:hidden}.post-edit-widget .monaco-button{border:none;border-radius:0;padding:2px}.post-edit-widget .monaco-button:hover{background-color:var(--vscode-button-secondaryHoverBackground)!important}.post-edit-widget .monaco-button .codicon{margin:0}@font-face{font-display:block;font-family:codicon;src:url(../fonts/codicon.f6283f7c.ttf) format("truetype")}.codicon[class*=codicon-]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font:normal normal normal 16px/1 codicon;text-align:center;text-decoration:none;text-rendering:auto;text-transform:none;user-select:none;-webkit-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(1turn)}}.codicon-gear.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin,.codicon-sync.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.monaco-editor .codicon.codicon-symbol-array,.monaco-workbench .codicon.codicon-symbol-array{color:var(--vscode-symbolIcon-arrayForeground)}.monaco-editor .codicon.codicon-symbol-boolean,.monaco-workbench .codicon.codicon-symbol-boolean{color:var(--vscode-symbolIcon-booleanForeground)}.monaco-editor .codicon.codicon-symbol-class,.monaco-workbench .codicon.codicon-symbol-class{color:var(--vscode-symbolIcon-classForeground)}.monaco-editor .codicon.codicon-symbol-method,.monaco-workbench .codicon.codicon-symbol-method{color:var(--vscode-symbolIcon-methodForeground)}.monaco-editor .codicon.codicon-symbol-color,.monaco-workbench .codicon.codicon-symbol-color{color:var(--vscode-symbolIcon-colorForeground)}.monaco-editor .codicon.codicon-symbol-constant,.monaco-workbench .codicon.codicon-symbol-constant{color:var(--vscode-symbolIcon-constantForeground)}.monaco-editor .codicon.codicon-symbol-constructor,.monaco-workbench .codicon.codicon-symbol-constructor{color:var(--vscode-symbolIcon-constructorForeground)}.monaco-editor .codicon.codicon-symbol-enum,.monaco-editor .codicon.codicon-symbol-value,.monaco-workbench .codicon.codicon-symbol-enum,.monaco-workbench .codicon.codicon-symbol-value{color:var(--vscode-symbolIcon-enumeratorForeground)}.monaco-editor .codicon.codicon-symbol-enum-member,.monaco-workbench .codicon.codicon-symbol-enum-member{color:var(--vscode-symbolIcon-enumeratorMemberForeground)}.monaco-editor .codicon.codicon-symbol-event,.monaco-workbench .codicon.codicon-symbol-event{color:var(--vscode-symbolIcon-eventForeground)}.monaco-editor .codicon.codicon-symbol-field,.monaco-workbench .codicon.codicon-symbol-field{color:var(--vscode-symbolIcon-fieldForeground)}.monaco-editor .codicon.codicon-symbol-file,.monaco-workbench .codicon.codicon-symbol-file{color:var(--vscode-symbolIcon-fileForeground)}.monaco-editor .codicon.codicon-symbol-folder,.monaco-workbench .codicon.codicon-symbol-folder{color:var(--vscode-symbolIcon-folderForeground)}.monaco-editor .codicon.codicon-symbol-function,.monaco-workbench .codicon.codicon-symbol-function{color:var(--vscode-symbolIcon-functionForeground)}.monaco-editor .codicon.codicon-symbol-interface,.monaco-workbench .codicon.codicon-symbol-interface{color:var(--vscode-symbolIcon-interfaceForeground)}.monaco-editor .codicon.codicon-symbol-key,.monaco-workbench .codicon.codicon-symbol-key{color:var(--vscode-symbolIcon-keyForeground)}.monaco-editor .codicon.codicon-symbol-keyword,.monaco-workbench .codicon.codicon-symbol-keyword{color:var(--vscode-symbolIcon-keywordForeground)}.monaco-editor .codicon.codicon-symbol-module,.monaco-workbench .codicon.codicon-symbol-module{color:var(--vscode-symbolIcon-moduleForeground)}.monaco-editor .codicon.codicon-symbol-namespace,.monaco-workbench .codicon.codicon-symbol-namespace{color:var(--vscode-symbolIcon-namespaceForeground)}.monaco-editor .codicon.codicon-symbol-null,.monaco-workbench .codicon.codicon-symbol-null{color:var(--vscode-symbolIcon-nullForeground)}.monaco-editor .codicon.codicon-symbol-number,.monaco-workbench .codicon.codicon-symbol-number{color:var(--vscode-symbolIcon-numberForeground)}.monaco-editor .codicon.codicon-symbol-object,.monaco-workbench .codicon.codicon-symbol-object{color:var(--vscode-symbolIcon-objectForeground)}.monaco-editor .codicon.codicon-symbol-operator,.monaco-workbench .codicon.codicon-symbol-operator{color:var(--vscode-symbolIcon-operatorForeground)}.monaco-editor .codicon.codicon-symbol-package,.monaco-workbench .codicon.codicon-symbol-package{color:var(--vscode-symbolIcon-packageForeground)}.monaco-editor .codicon.codicon-symbol-property,.monaco-workbench .codicon.codicon-symbol-property{color:var(--vscode-symbolIcon-propertyForeground)}.monaco-editor .codicon.codicon-symbol-reference,.monaco-workbench .codicon.codicon-symbol-reference{color:var(--vscode-symbolIcon-referenceForeground)}.monaco-editor .codicon.codicon-symbol-snippet,.monaco-workbench .codicon.codicon-symbol-snippet{color:var(--vscode-symbolIcon-snippetForeground)}.monaco-editor .codicon.codicon-symbol-string,.monaco-workbench .codicon.codicon-symbol-string{color:var(--vscode-symbolIcon-stringForeground)}.monaco-editor .codicon.codicon-symbol-struct,.monaco-workbench .codicon.codicon-symbol-struct{color:var(--vscode-symbolIcon-structForeground)}.monaco-editor .codicon.codicon-symbol-text,.monaco-workbench .codicon.codicon-symbol-text{color:var(--vscode-symbolIcon-textForeground)}.monaco-editor .codicon.codicon-symbol-type-parameter,.monaco-workbench .codicon.codicon-symbol-type-parameter{color:var(--vscode-symbolIcon-typeParameterForeground)}.monaco-editor .codicon.codicon-symbol-unit,.monaco-workbench .codicon.codicon-symbol-unit{color:var(--vscode-symbolIcon-unitForeground)}.monaco-editor .codicon.codicon-symbol-variable,.monaco-workbench .codicon.codicon-symbol-variable{color:var(--vscode-symbolIcon-variableForeground)}.monaco-editor .lightBulbWidget{align-items:center;display:flex;justify-content:center}.monaco-editor .lightBulbWidget:hover{cursor:pointer}.monaco-editor .lightBulbWidget.codicon-light-bulb,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix{color:var(--vscode-editorLightBulbAutoFix-foreground,var(--vscode-editorLightBulb-foreground))}.monaco-editor .lightBulbWidget.codicon-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground,var(--vscode-icon-foreground))}.monaco-editor .lightBulbWidget:before{position:relative;z-index:2}.monaco-editor .lightBulbWidget:after{content:"";display:block;height:100%;left:0;opacity:.3;position:absolute;top:0;width:100%;z-index:1}.monaco-editor .glyph-margin-widgets .cgmr[class*=codicon-gutter-lightbulb]{cursor:pointer;display:block}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-aifix-auto-fix,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-auto-fix{color:var(--vscode-editorLightBulbAutoFix-foreground,var(--vscode-editorLightBulb-foreground))}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground,var(--vscode-icon-foreground))}.monaco-list{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{height:100%;position:relative;width:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{min-width:100%;width:auto}.monaco-list-row{box-sizing:border-box;overflow:hidden;position:absolute;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list .monaco-scrollable-element>.scrollbar.vertical,.monaco-pane-view>.monaco-split-view2.vertical>.monaco-scrollable-element>.scrollbar.vertical{z-index:14}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-multiple,.monaco-list.selection-single{outline:0!important}.monaco-drag-image{border-radius:10px;display:inline-block;font-size:12px;padding:1px 7px;position:absolute;z-index:1000}.monaco-list-type-filter-message{box-sizing:border-box;height:100%;left:0;opacity:.7;padding:40px 1em 1em;pointer-events:none;position:absolute;text-align:center;top:0;white-space:normal;width:100%}.monaco-list-type-filter-message:empty{display:none}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{background:#0000;opacity:1;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{display:none;position:absolute}.monaco-scrollable-element>.shadow.top{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;display:block;height:3px;left:3px;top:0;width:100%}.monaco-scrollable-element>.shadow.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;display:block;height:100%;left:0;top:3px;width:3px}.monaco-scrollable-element>.shadow.top-left-corner{display:block;height:3px;left:0;top:0;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.scrollbar>.slider{background:var(--vscode-scrollbarSlider-background)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-scrollable-element>.scrollbar>.slider.active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-select-box-dropdown-padding{--dropdown-padding-top:1px;--dropdown-padding-bottom:1px}.hc-black .monaco-select-box-dropdown-padding,.hc-light .monaco-select-box-dropdown-padding{--dropdown-padding-top:3px;--dropdown-padding-bottom:4px}.monaco-select-box-dropdown-container{box-sizing:border-box;display:none}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown *{margin:0}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown a:focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown code{font-family:var(--monaco-monospace-font);line-height:15px}.monaco-select-box-dropdown-container.visible{border-bottom-left-radius:3px;border-bottom-right-radius:3px;display:flex;flex-direction:column;overflow:hidden;text-align:left;width:1px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container{align-self:flex-start;box-sizing:border-box;flex:0 0 auto;overflow:hidden;padding-bottom:var(--dropdown-padding-bottom);padding-left:1px;padding-right:1px;padding-top:var(--dropdown-padding-top);width:100%}.monaco-select-box-dropdown-container>.select-box-details-pane{padding:5px}.hc-black .monaco-select-box-dropdown-container>.select-box-dropdown-list-container{padding-bottom:var(--dropdown-padding-bottom);padding-top:var(--dropdown-padding-top)}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row{cursor:pointer}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-text{float:left;overflow:hidden;padding-left:3.5px;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-detail{float:left;opacity:.7;overflow:hidden;padding-left:3.5px;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-decorator-right{float:right;overflow:hidden;padding-right:10px;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.visually-hidden{height:1px;left:-10000px;overflow:hidden;position:absolute;top:auto;width:1px}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control{align-self:flex-start;flex:1 1 auto;opacity:0}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div{max-height:0;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div>.option-text-width-control{padding-left:4px;padding-right:8px;white-space:nowrap}.monaco-select-box{border-radius:2px;cursor:pointer;width:100%}.monaco-select-box-dropdown-container{font-size:13px;font-weight:400;text-transform:none}.monaco-action-bar .action-item.select-container{cursor:default}.monaco-action-bar .action-item .monaco-select-box{cursor:pointer;min-height:18px;min-width:100px;padding:2px 23px 2px 8px}.mac .monaco-action-bar .action-item .monaco-select-box{border-radius:5px;font-size:11px}.monaco-action-bar{height:100%;white-space:nowrap}.monaco-action-bar .actions-container{align-items:center;display:flex;height:100%;margin:0 auto;padding:0;width:100%}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{align-items:center;cursor:pointer;display:block;justify-content:center;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .codicon,.monaco-action-bar .action-item .icon{display:block}.monaco-action-bar .action-item .codicon{align-items:center;display:flex;height:16px;width:16px}.monaco-action-bar .action-label{border-radius:5px;display:flex;font-size:11px;padding:3px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{color:var(--vscode-disabledForeground)}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #bbb;display:block;margin-left:.8em;margin-right:.8em;padding-top:1px}.monaco-action-bar .action-item .action-label.separator{background-color:#bbb;cursor:default;height:16px;margin:5px 4px!important;min-width:1px;padding:0;width:1px}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{align-items:center;display:flex;flex:1;justify-content:center;margin-right:10px;max-width:170px;min-width:60px;overflow:hidden}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator{align-items:center;cursor:default;display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator>div{width:1px}.action-widget{background-color:var(--vscode-editorActionList-background);border:1px solid var(--vscode-editorWidget-border)!important;border-radius:0;border-radius:5px;box-shadow:0 2px 8px var(--vscode-widget-shadow);color:var(--vscode-editorActionList-foreground);display:block;font-size:13px;max-width:80vw;min-width:160px;padding:4px;width:100%;z-index:40}.context-view-block{z-index:-1}.context-view-block,.context-view-pointerBlock{cursor:auto;height:100%;left:0;position:fixed;top:0;width:100%}.context-view-pointerBlock{z-index:2}.action-widget .monaco-list{border:0!important;user-select:none;-webkit-user-select:none}.action-widget .monaco-list:focus:before{outline:0!important}.action-widget .monaco-list .monaco-scrollable-element{overflow:visible}.action-widget .monaco-list .monaco-list-row{border-radius:4px;cursor:pointer;padding:0 10px;touch-action:none;white-space:nowrap;width:100%}.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled){background-color:var(--vscode-editorActionList-focusBackground)!important;color:var(--vscode-editorActionList-focusForeground);outline:1px solid var(--vscode-menu-selectionBorder,#0000);outline-offset:-1px}.action-widget .monaco-list-row.group-header{color:var(--vscode-descriptionForeground)!important;font-size:12px;font-weight:600}.action-widget .monaco-list-row.group-header:not(:first-of-type){margin-top:2px}.action-widget .monaco-list .group-header,.action-widget .monaco-list .option-disabled,.action-widget .monaco-list .option-disabled .focused,.action-widget .monaco-list .option-disabled .focused:before,.action-widget .monaco-list .option-disabled:before{-webkit-touch-callout:none;background-color:initial!important;cursor:default!important;outline:0 solid!important;-webkit-user-select:none;user-select:none}.action-widget .monaco-list-row.action{align-items:center;display:flex;gap:8px}.action-widget .monaco-list-row.action.option-disabled,.action-widget .monaco-list-row.action.option-disabled .codicon,.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled{color:var(--vscode-disabledForeground)}.action-widget .monaco-list-row.action:not(.option-disabled) .codicon{color:inherit}.action-widget .monaco-list-row.action .title{flex:1;overflow:hidden;text-overflow:ellipsis}.action-widget .monaco-list-row.action .monaco-keybinding>.monaco-keybinding-key{background-color:var(--vscode-keybindingLabel-background);border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);border-radius:3px;border-style:solid;border-width:1px;box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);color:var(--vscode-keybindingLabel-foreground)}.action-widget .action-widget-action-bar{background-color:var(--vscode-editorActionList-background);border-top:1px solid var(--vscode-editorHoverWidget-border);margin-top:2px}.action-widget .action-widget-action-bar:before{content:"";display:block;width:100%}.action-widget .action-widget-action-bar .actions-container{padding:3px 8px 0}.action-widget-action-bar .action-label{color:var(--vscode-textLink-activeForeground);font-size:12px;line-height:22px;padding:0;pointer-events:all}.action-widget-action-bar .action-item{margin-right:16px;pointer-events:none}.action-widget-action-bar .action-label:hover{background-color:initial!important}.monaco-action-bar .actions-container.highlight-toggled .action-label.checked{background:var(--vscode-actionBar-toggledBackground)!important}.monaco-keybinding{align-items:center;display:flex;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{border-radius:3px;border-style:solid;border-width:1px;display:inline-block;font-size:11px;margin:0 2px;padding:3px 5px;vertical-align:middle}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{-webkit-text-size-adjust:100%;color:var(--vscode-editor-foreground);overflow:visible;overflow-wrap:normal;position:relative}.monaco-editor,.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);border:1px solid var(--vscode-editor-rangeHighlightBorder);box-sizing:border-box}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);border:1px solid var(--vscode-editor-symbolHighlightBorder);box-sizing:border-box}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .overflow-guard{overflow:hidden;position:relative}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .margin-view-overlays>div,.monaco-editor .view-overlays>div{position:absolute;width:100%}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{background:var(--vscode-editorError-background);content:"";display:block;height:100%;width:100%}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{background:var(--vscode-editorWarning-background);content:"";display:block;height:100%;width:100%}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{background:var(--vscode-editorInfo-background);content:"";display:block;height:100%;width:100%}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground,inherit)}.monaco-editor .inputarea{background-color:initial;border:none;color:#0000;margin:0;min-height:0;min-width:0;outline:none!important;overflow:hidden;padding:0;position:absolute;resize:none;z-index:-10}.monaco-editor .inputarea.ime-input{caret-color:var(--vscode-editorCursor-foreground);color:var(--vscode-editor-foreground);z-index:10}.monaco-editor .margin-view-overlays .line-numbers{bottom:0;box-sizing:border-box;cursor:default;display:inline-block;font-variant-numeric:tabular-nums;position:absolute;text-align:right;vertical-align:middle}.monaco-editor .relative-current-line-number{display:inline-block;text-align:left;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground)}.monaco-editor .line-numbers.active-line-number{color:var(--vscode-editorLineNumber-activeForeground)}.monaco-editor .margin{background-color:var(--vscode-editorGutter-background)}.monaco-mouse-cursor-text{cursor:text}.monaco-editor .blockDecorations-container{pointer-events:none;position:absolute;top:0}.monaco-editor .blockDecorations-block{box-sizing:border-box;position:absolute}.monaco-editor .margin-view-overlays .current-line,.monaco-editor .view-overlays .current-line{box-sizing:border-box;display:block;height:100%;left:0;position:absolute;top:0}.monaco-editor diff --git a/editor.worker.js b/editor.worker.js index ad62572..2f09857 100644 --- a/editor.worker.js +++ b/editor.worker.js @@ -1 +1 @@ -(()=>{var e={5053:(e,t,n)=>{"use strict";function i(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,r=e.length;ie){const n=new Set;return e.filter((e=>{const i=t(e);return!n.has(i)&&(n.add(i),!0)}))}function l(e,t){return e.length>0?e[0]:t}function h(e,t,n){const i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)}function c(e,t){for(const n of t)e.push(n)}var u;function d(e,t){return(n,i)=>t(e(n),e(i))}n.d(t,{E4:()=>c,Fy:()=>l,Hw:()=>f,U9:()=>g,VE:()=>d,aI:()=>i,c1:()=>p,dM:()=>a,j3:()=>m,kj:()=>o,n:()=>r,nK:()=>h,pN:()=>s}),function(e){function t(e){return e<0}function n(e){return e<=0}function i(e){return e>0}function r(e){return 0===e}e.isLessThan=t,e.isLessThanOrEqual=n,e.isGreaterThan=i,e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(u||(u={}));const g=(e,t)=>e-t;function f(e){return(t,n)=>-e(t,n)}class m{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;while(t=0&&e(this.items[t]))t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class p{static{this.empty=new p((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new p((t=>this.iterate((n=>!e(n)||t(n)))))}map(e){return new p((t=>this.iterate((n=>t(e(n))))))}findLast(e){let t;return this.iterate((n=>(e(n)&&(t=n),!0))),t}findLastMaxBy(e){let t,n=!0;return this.iterate((i=>((n||u.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0))),t}}},3654:(e,t,n)=>{"use strict";function i(e,t){const n=r(e,t);if(-1!==n)return e[n]}function r(e,t,n=e.length-1){for(let i=n;i>=0;i--){const n=e[i];if(t(n))return i}return-1}function s(e,t){const n=o(e,t);return-1===n?void 0:e[n]}function o(e,t,n=0,i=e.length){let r=n,s=i;while(ri,XP:()=>a,hw:()=>l,iM:()=>o,lx:()=>s,vJ:()=>h});class h{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(h.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=o(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}},9109:(e,t,n)=>{"use strict";n.d(t,{Ft:()=>o,Xo:()=>a,ok:()=>r,xb:()=>s});var i=n(4396);function r(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function o(e){e()||(e(),(0,i.dz)(new i.D7("Assertion Failed")))}function a(e,t){let n=0;while(n{"use strict";n.d(t,{vb:()=>l,uC:()=>h,Qg:()=>a,$6:()=>c});n(7792);var i=n(4396),r=n(231),s=n(8894),o=n(5160);Symbol("MicrotaskDelay");function a(e){return!!e&&"function"===typeof e.then}class l{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new i.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const r=n.setInterval((()=>{e()}),t);this.disposable=(0,s.s)((()=>{n.clearInterval(r),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class h{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let c,u;(function(){u="function"!==typeof globalThis.requestIdleCallback||"function"!==typeof globalThis.cancelIdleCallback?(e,t)=>{(0,o._p)((()=>{if(n)return;const e=Date.now()+15,i={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(i))}));let n=!1;return{dispose(){n||(n=!0)}}}:(e,t,n)=>{const i=e.requestIdleCallback(t,"number"===typeof n?{timeout:n}:void 0);let r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(i))}}},c=e=>u(globalThis,e)})();var d;(function(e){async function t(e){let t;const n=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if("undefined"!==typeof t)throw t;return n}function n(e){return new Promise((async(t,n)=>{try{await e(t,n)}catch(i){n(i)}}))}e.settled=t,e.withAsyncBody=n})(d||(d={}));class g{static fromArray(e){return new g((t=>{t.emitMany(e)}))}static fromPromise(e){return new g((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new g((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new g((async t=>{await Promise.all(e.map((async e=>{for await(const n of e)t.emitOne(n)})))}))}static{this.EMPTY=g.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new r.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(n){this.reject(n)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new g((async n=>{for await(const i of e)n.emitOne(t(i))}))}map(e){return g.map(this,e)}static filter(e,t){return new g((async n=>{for await(const i of e)t(i)&&n.emitOne(i)}))}filter(e){return g.filter(this,e)}static coalesce(e){return g.filter(e,(e=>!!e))}coalesce(){return g.coalesce(this)}static async toPromise(e){const t=[];for await(const n of e)t.push(n);return t}toPromise(){return g.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}},7885:(e,t,n)=>{"use strict";n.d(t,{$l:()=>a,Gs:()=>d,MB:()=>o,Sw:()=>c,bb:()=>h,gN:()=>l,pJ:()=>u});var i=n(5661);const r="undefined"!==typeof Buffer;new i.d((()=>new Uint8Array(256)));let s;class o{static wrap(e){return r&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new o(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return r?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function l(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function h(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function c(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function u(e,t){return e[t]}function d(e,t,n){e[n]=t}},7389:(e,t,n)=>{"use strict";function i(e){return e}n.d(t,{VV:()=>s,o5:()=>r});class r{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"===typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class s{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"===typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const n=this._fn(e);return this._map.set(e,n),this._map2.set(t,n),n}}},7792:(e,t,n)=>{"use strict";n.d(t,{Qi:()=>a});var i=n(231);const r=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var s;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof o||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r})})(s||(s={}));class o{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?r:(this._emitter||(this._emitter=new i.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token instanceof o&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=s.None}}},6455:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var i=n(322);const r=Object.create(null);function s(e,t){if((0,i.Kg)(t)){const n=r[t];if(void 0===n)throw new Error(`${e} references an unknown codicon: ${t}`);t=n}return r[e]=t,{id:e}}const o={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),gitPullRequestLabel:s("git-pull-request-label",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugHint:s("debug-hint",60017),terminalDecorationSuccess:s("terminal-decoration-success",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circleOutline:s("circle-outline",60092),circle:s("circle",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:s("terminal-decoration-incomplete",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),diffSidebyside:s("diff-sidebyside",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),compareChanges:s("compare-changes",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),gitPullRequestMilestone:s("git-pull-request-milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),terminalDecorationMark:s("terminal-decoration-mark",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),debugAlt:s("debug-alt",60305),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),gitPullRequestReviewer:s("git-pull-request-reviewer",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),gitPullRequestAssignee:s("git-pull-request-assignee",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),issueClosed:s("issue-closed",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),export:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnknown:s("workspace-unknown",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracket:s("bracket",60175),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newline:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),terminalDecorationError:s("terminal-decoration-error",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),blank:s("blank",60419),heartFilled:s("heart-filled",60420),map:s("map",60421),mapHorizontal:s("map-horizontal",60421),foldHorizontal:s("fold-horizontal",60421),mapFilled:s("map-filled",60422),mapHorizontalFilled:s("map-horizontal-filled",60422),foldHorizontalFilled:s("fold-horizontal-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),send:s("send",60431),sparkle:s("sparkle",60432),insert:s("insert",60433),mic:s("mic",60434),thumbsdownFilled:s("thumbsdown-filled",60435),thumbsupFilled:s("thumbsup-filled",60436),coffee:s("coffee",60437),snake:s("snake",60438),game:s("game",60439),vr:s("vr",60440),chip:s("chip",60441),piano:s("piano",60442),music:s("music",60443),micFilled:s("mic-filled",60444),repoFetch:s("repo-fetch",60445),copilot:s("copilot",60446),lightbulbSparkle:s("lightbulb-sparkle",60447),robot:s("robot",60448),sparkleFilled:s("sparkle-filled",60449),diffSingle:s("diff-single",60450),diffMultiple:s("diff-multiple",60451),surroundWith:s("surround-with",60452),share:s("share",60453),gitStash:s("git-stash",60454),gitStashApply:s("git-stash-apply",60455),gitStashPop:s("git-stash-pop",60456),vscode:s("vscode",60457),vscodeInsiders:s("vscode-insiders",60458),codeOss:s("code-oss",60459),runCoverage:s("run-coverage",60460),runAllCoverage:s("run-all-coverage",60461),coverage:s("coverage",60462),githubProject:s("github-project",60463),mapVertical:s("map-vertical",60464),foldVertical:s("fold-vertical",60464),mapVerticalFilled:s("map-vertical-filled",60465),foldVerticalFilled:s("fold-vertical-filled",60465),goToSearch:s("go-to-search",60466),percentage:s("percentage",60467),sortPercentage:s("sort-percentage",60467),attach:s("attach",60468)},a={dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left"),dropDownButton:s("drop-down-button",60084),symbolCustomColor:s("symbol-customcolor",60252),exportIcon:s("export",60332),workspaceUnspecified:s("workspace-unspecified",60355),newLine:s("newline",60394),thumbsDownFilled:s("thumbsdown-filled",60435),thumbsUpFilled:s("thumbsup-filled",60436),gitFetch:s("git-fetch",60445),lightbulbSparkleAutofix:s("lightbulb-sparkle-autofix",60447),debugBreakpointPending:s("debug-breakpoint-pending",60377)},l={...o,...a}},5476:(e,t,n)=>{"use strict";function i(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,{Q1:()=>a,bU:()=>r,hB:()=>s});class r{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=e.a,o=Math.max(t,n,i),a=Math.min(t,n,i);let l=0,h=0;const c=(a+o)/2,u=o-a;if(u>0){switch(h=Math.min(c<=.5?u/(2*c):u/(2-2*c),1),o){case t:l=(n-i)/u+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:o}=e;let a,l,h;if(0===n)a=l=h=i;else{const e=i<.5?i*(1+n):i+n-i*n,r=2*i-e;a=s._hue2rgb(r,e,t+1/3),l=s._hue2rgb(r,e,t),h=s._hue2rgb(r,e,t-1/3)}return new r(Math.round(255*a),Math.round(255*l),Math.round(255*h),o)}}class o{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=Math.max(t,n,i),s=Math.min(t,n,i),a=r-s,l=0===r?0:a/r;let h;return h=0===a?0:r===t?((n-i)/a%6+6)%6:r===n?(i-t)/a+2:(t-n)/a+4,new o(Math.round(60*h),l,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:s}=e,o=i*n,a=o*(1-Math.abs(t/60%2-1)),l=i-o;let[h,c,u]=[0,0,0];return t<60?(h=o,c=a):t<120?(h=a,c=o):t<180?(c=o,u=a):t<240?(c=a,u=o):t<300?(h=a,u=o):t<=360&&(h=o,u=a),h=Math.round(255*(h+l)),c=Math.round(255*(c+l)),u=Math.round(255*(u+l)),new r(h,c,u,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof r)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof o))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=o.toRGBA(e)}}equals(e){return!!e&&r.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&o.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g),n=a._relativeLuminanceForComponent(this.rgba.b),r=.2126*e+.7152*t+.0722*n;return i(r,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t{"use strict";n.d(t,{D7:()=>f,EM:()=>d,Qg:()=>c,cU:()=>o,dz:()=>s,iH:()=>u});class i{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(g.isErrorNoTelemetry(e))throw new g(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const r=new i;function s(e){l(e)||r.onUnexpectedError(e)}function o(e){if(e instanceof Error){const{name:t,message:n}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i,noTelemetry:g.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof h||e instanceof Error&&e.name===a&&e.message===a}class h extends Error{constructor(){super(a),this.name=this.message}}function c(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class d extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class g extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof g)return e;const t=new g;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}},231:(e,t,n)=>{"use strict";n.d(t,{Jh:()=>h,vl:()=>v});var i=n(4396),r=n(8894),s=(n(7806),n(4240));const o=!1,a=!1,l=!1;var h;(function(e){function t(e){if(l){const{onDidAddListener:t}=e,n=g.create();let i=0;e.onDidAddListener=()=>{2===++i&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),n.print()),t?.()}}}function n(e,t){return p(e,(()=>{}),0,void 0,!0,void 0,t)}function i(e){return(t,n=null,i)=>{let r,s=!1;return r=e((e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)}),null,i),s&&r.dispose(),r}}function s(t,n){return e.once(e.filter(t,n))}function o(e,t,n){return f(((n,i=null,r)=>e((e=>n.call(i,t(e))),null,r)),n)}function a(e,t,n){return f(((n,i=null,r)=>e((e=>{t(e),n.call(i,e)}),null,r)),n)}function h(e,t,n){return f(((n,i=null,r)=>e((e=>t(e)&&n.call(i,e)),null,r)),n)}function c(e){return e}function u(...e){return(t,n=null,i)=>{const s=(0,r.qE)(...e.map((e=>e((e=>t.call(n,e))))));return m(s,i)}}function d(e,t,n,i){let r=n;return o(e,(e=>(r=t(r,e),r)),i)}function f(e,n){let i;const r={onWillAddFirstListener(){i=e(s.fire,s)},onDidRemoveLastListener(){i?.dispose()}};n||t(r);const s=new v(r);return n?.add(s),s.event}function m(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function p(e,n,i=100,r=!1,s=!1,o,a){let l,h,c,u,d=0;const g={leakWarningThreshold:o,onWillAddFirstListener(){l=e((e=>{d++,h=n(h,e),r&&!c&&(f.fire(h),h=void 0),u=()=>{const e=h;h=void 0,c=void 0,(!r||d>1)&&f.fire(e),d=0},"number"===typeof i?(clearTimeout(c),c=setTimeout(u,i)):void 0===c&&(c=0,queueMicrotask(u))}))},onWillRemoveListener(){s&&d>0&&u?.()},onDidRemoveLastListener(){u=void 0,l.dispose()}};a||t(g);const f=new v(g);return a?.add(f),f.event}function _(t,n=0,i){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),n,void 0,!0,void 0,i)}function b(e,t=(e,t)=>e===t,n){let i,r=!0;return h(e,(e=>{const n=r||!t(e,i);return r=!1,i=e,n}),n)}function k(t,n,i){return[e.filter(t,n,i),e.filter(t,(e=>!n(e)),i)]}function C(e,t=!1,n=[],i){let r=n.slice(),s=e((e=>{r?r.push(e):a.fire(e)}));i&&i.add(s);const o=()=>{r?.forEach((e=>a.fire(e))),r=null},a=new v({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),i&&i.add(s))},onDidAddFirstListener(){r&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return i&&i.add(a),a.event}function L(e,t){const n=(n,i,r)=>{const s=t(new y);return e((function(e){const t=s.evaluate(e);t!==w&&n.call(i,t)}),void 0,r)};return n}e.None=()=>r.jG.None,e.defer=n,e.once=i,e.onceIf=s,e.map=o,e.forEach=a,e.filter=h,e.signal=c,e.any=u,e.reduce=d,e.debounce=p,e.accumulate=_,e.latch=b,e.split=k,e.buffer=C,e.chain=L;const w=Symbol("HaltChainable");class y{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:w)),this}reduce(e,t){let n=t;return this.steps.push((t=>(n=e(n,t),n))),this}latch(e=(e,t)=>e===t){let t,n=!0;return this.steps.push((i=>{const r=n||!e(i,t);return n=!1,t=i,r?i:w})),this}evaluate(e){for(const t of this.steps)if(e=t(e),e===w)break;return e}}function S(e,t,n=e=>e){const i=(...e)=>o.fire(n(...e)),r=()=>e.on(t,i),s=()=>e.removeListener(t,i),o=new v({onWillAddFirstListener:r,onDidRemoveLastListener:s});return o.event}function x(e,t,n=e=>e){const i=(...e)=>o.fire(n(...e)),r=()=>e.addEventListener(t,i),s=()=>e.removeEventListener(t,i),o=new v({onWillAddFirstListener:r,onDidRemoveLastListener:s});return o.event}function E(e){return new Promise((t=>i(e)(t)))}function N(e){const t=new v;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event}function I(e,t){return e((e=>t.fire(e)))}function T(e,t,n){return t(n),e((e=>t(e)))}e.fromNodeEventEmitter=S,e.fromDOMEventEmitter=x,e.toPromise=E,e.fromPromise=N,e.forward=I,e.runAndSubscribe=T;class A{constructor(e,n){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};n||t(i),this.emitter=new v(i),n&&n.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function D(e,t){const n=new A(e,t);return n.emitter.event}function M(e){return(t,n,i)=>{let s=0,o=!1;const a={beginUpdate(){s++},endUpdate(){s--,0===s&&(e.reportChanges(),o&&(o=!1,t.call(n)))},handlePossibleChange(){},handleChange(){o=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return i instanceof r.Cm?i.add(l):Array.isArray(i)&&i.push(l),l}}e.fromObservable=D,e.fromObservableLight=M})(h||(h={}));class c{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${c._idPool++}`,c.all.add(this)}start(e){this._stopWatch=new s.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}let u=-1;class d{static{this._idPool=1}constructor(e,t,n=(d._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[n,i]of this._stacks)(!e||t{if(e instanceof p)t(e);else for(let n=0;n{0!==e.length&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join("\n")),e.length=0)}),3e3),k=new FinalizationRegistry((t=>{"string"===typeof t&&e.push(t)}))}class v{constructor(e){this._size=0,this._options=e,this._leakageMon=u>0||this._options?.leakWarningThreshold?new d(e?.onListenerError??i.dz,this._options?.leakWarningThreshold??u):void 0,this._perfMon=this._options?._profName?new c(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(a){const e=this._listeners;queueMicrotask((()=>{b(e,(e=>e.stack?.print()))}))}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],n=new m(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]),s=this._options?.onListenerError||i.dz;return s(n),r.jG.None}if(this._disposed)return r.jG.None;t&&(e=e.bind(t));const s=new p(e);let o,l;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(s.stack=g.create(),o=this._leakageMon.check(s.stack,this._size+1)),a&&(s.stack=l??g.create()),this._listeners?this._listeners instanceof p?(this._deliveryQueue??=new C,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;const h=(0,r.s)((()=>{k?.unregister(h),o?.(),this._removeListener(s)}));if(n instanceof r.Cm?n.add(h):Array.isArray(n)&&n.push(h),k){const e=(new Error).stack.split("\n").slice(2,3).join("\n").trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);k.register(h,t?.[2]??e,h)}return h},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,n=t.indexOf(e);if(-1===n)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const i=this._deliveryQueue.current===this;if(this._size*_<=t.length){let e=0;for(let n=0;n0}}class C{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}},7531:(e,t,n)=>{"use strict";n.d(t,{TH:()=>o,Zn:()=>l,_1:()=>h,kb:()=>a});var i=n(1643),r=(n(5160),n(601));function s(e){return 47===e||92===e}function o(e){return e.replace(/[\\/]/g,i.SA.sep)}function a(e){return-1===e.indexOf("/")&&(e=o(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function l(e,t=i.SA.sep){if(!e)return"";const n=e.length,r=e.charCodeAt(0);if(s(r)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){let i=3;const r=i;for(;ie.length)return!1;if(n){const n=(0,r.ns)(e,t);if(!n)return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===s&&i--,e.charAt(i)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}function c(e){return e>=65&&e<=90||e>=97&&e<=122}},3589:(e,t,n)=>{"use strict";n.d(t,{YW:()=>R,qg:()=>O});var i=n(3723),r=n(7531),s=n(1553),o=n(1643),a=n(5160),l=n(601);const h="**",c="/",u="[/\\\\]",d="[^/\\\\]",g=/\//g;function f(e,t){switch(e){case 0:return"";case 1:return`${d}*?`;default:return`(?:${u}|${d}+${u}${t?`|${u}${d}+`:""})*?`}}function m(e,t){if(!e)return[];const n=[];let i=!1,r=!1,s="";for(const o of e){switch(o){case t:if(!i&&!r){n.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1;break}s+=o}return s&&n.push(s),n}function p(e){if(!e)return"";let t="";const n=m(e,c);if(n.every((e=>e===h)))t=".*";else{let e=!1;n.forEach(((i,r)=>{if(i===h){if(e)return;t+=f(2,r===n.length-1)}else{let e=!1,s="",o=!1,a="";for(const n of i)if("}"!==n&&e)s+=n;else if(!o||"]"===n&&a)switch(n){case"{":e=!0;continue;case"[":o=!0;continue;case"}":{const n=m(s,","),i=`(?:${n.map((e=>p(e))).join("|")})`;t+=i,e=!1,s="";break}case"]":t+="["+a+"]",o=!1,a="";break;case"?":t+=d;continue;case"*":t+=f(1);continue;default:t+=(0,l.bm)(n)}else{let e;e="-"===n?n:"^"!==n&&"!"!==n||a?n===c?"":(0,l.bm)(n):"^",a+=e}rx(e,t))).filter((e=>e!==S)),e),i=n.length;if(!i)return S;if(1===i)return n[0];const r=function(t,i){for(let r=0,s=n.length;r!!e.allBasenames));s&&(r.allBasenames=s.allBasenames);const o=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(r.allPaths=o),r}function D(e,t,n){const i=o.Vn===o.SA.sep,r=i?e:e.replace(g,o.Vn),s=o.Vn+r,a=o.SA.sep+e;let l;return l=n?function(n,o){return"string"!==typeof n||n!==r&&!n.endsWith(s)&&(i||n!==e&&!n.endsWith(a))?null:t}:function(n,s){return"string"!==typeof n||n!==r&&(i||n!==e)?null:t},l.allPaths=[(n?"*/":"./")+e],l}function M(e){try{const t=new RegExp(`^${p(e)}$`);return function(n){return t.lastIndex=0,"string"===typeof n&&t.test(n)?e:null}}catch(t){return S}}function R(e,t,n){return!(!e||"string"!==typeof t)&&O(e)(t,void 0,n)}function O(e,t={}){if(!e)return y;if("string"===typeof e||B(e)){const n=x(e,t);if(n===S)return y;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return F(e,t)}function B(e){const t=e;return!!t&&("string"===typeof t.base&&"string"===typeof t.pattern)}function F(e,t){const n=z(Object.getOwnPropertyNames(e).map((n=>P(n,e[n],t))).filter((e=>e!==S))),r=n.length;if(!r)return S;if(!n.some((e=>!!e.requiresSiblings))){if(1===r)return n[0];const e=function(e,t){let r;for(let s=0,o=n.length;s{for(const e of r){const t=await e;if("string"===typeof t)return t}return null})():null},t=n.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,r){let s,a;for(let l=0,h=n.length;l{for(const e of a){const t=await e;if("string"===typeof t)return t}return null})():null},a=n.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}function P(e,t,n){if(!1===t)return S;const r=x(e,n);if(r===S)return S;if("boolean"===typeof t)return r;if(t){const n=t.when;if("string"===typeof n){const t=(t,s,o,a)=>{if(!a||!r(t,s))return null;const l=n.replace("$(basename)",(()=>o)),h=a(l);return(0,i.Qg)(h)?h.then((t=>t?e:null)):h?e:null};return t.requiresSiblings=!0,t}}return r}function z(e,t){const n=e.filter((e=>!!e.basenames));if(n.length<2)return e;const i=n.reduce(((e,t)=>{const n=t.basenames;return n?e.concat(n):e}),[]);let r;if(t){r=[];for(let e=0,n=i.length;e{const n=t.patterns;return n?e.concat(n):e}),[]);const s=function(e,t){if("string"!==typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?r[n]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;const o=e.filter((e=>!e.basenames));return o.push(s),o}},5647:(e,t,n)=>{"use strict";n.d(t,{e2:()=>a,sN:()=>r,v7:()=>f});var i=n(601);function r(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?l(e,t):h(e,t);case"string":return a(e,t);case"boolean":return o(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}}function s(e,t){return(t<<5)-t+e|0}function o(e,t){return s(e?433:863,t)}function a(e,t){t=s(149417,t);for(let n=0,i=e.length;nr(t,e)),t)}function h(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,n)=>(t=a(n,t),r(e[n],t))),t)}function c(e,t,n=32){const i=n-t,r=~((1<>>i)>>>0}function u(e,t=0,n=e.byteLength,i=0){for(let r=0;re.toString(16).padStart(2,"0"))).join(""):d((e>>>0).toString(16),t/4)}class f{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let r,s,o=this._buffLen,a=this._leftoverHighSurrogate;0!==a?(r=a,s=-1,a=0):(r=e.charCodeAt(0),s=0);while(1){let l=r;if(i.pc(r)){if(!(s+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),g(this._h0)+g(this._h1)+g(this._h2)+g(this._h3)+g(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,u(this._buff,this._buffLen),this._buffLen>56&&(this._step(),u(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=f._bigBlock32,t=this._buffDV;for(let c=0;c<64;c+=4)e.setUint32(c,t.getUint32(c,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,c(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let n,i,r,s=this._h0,o=this._h1,a=this._h2,l=this._h3,h=this._h4;for(let u=0;u<80;u++)u<20?(n=o&a|~o&l,i=1518500249):u<40?(n=o^a^l,i=1859775393):u<60?(n=o&a|o&l|a&l,i=2400959708):(n=o^a^l,i=3395469782),r=c(s,5)+n+h+i+e.getUint32(4*u,!1)&4294967295,h=l,l=a,a=c(o,30),o=s,s=r;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+h&4294967295}}},5837:(e,t,n)=>{"use strict";var i;n.d(t,{f:()=>i}),function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function i(){return n}function*r(e){yield e}function s(e){return t(e)?e:r(e)}function o(e){return e||n}function*a(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function l(e){return!e||!0===e[Symbol.iterator]().next().done}function h(e){return e[Symbol.iterator]().next().value}function c(e,t){let n=0;for(const i of e)if(t(i,n++))return!0;return!1}function u(e,t){for(const n of e)if(t(n))return n}function*d(e,t){for(const n of e)t(n)&&(yield n)}function*g(e,t){let n=0;for(const i of e)yield t(i,n++)}function*f(e,t){let n=0;for(const i of e)yield*t(i,n++)}function*m(...e){for(const t of e)yield*t}function p(e,t,n){let i=n;for(const r of e)i=t(i,r);return i}function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t{"use strict";n.d(t,{d:()=>i});class i{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},8894:(e,t,n)=>{"use strict";function i(e,t){const n=this;let i,r=!1;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}n.d(t,{jG:()=>p,$w:()=>b,Cm:()=>m,HE:()=>_,qE:()=>g,AS:()=>d,VD:()=>h,s:()=>f,Ay:()=>l});var r=n(5837);const s=!1;let o=null;function a(e){o=e}if(s){const e="__is_disposable_tracked__";a(new class{trackDisposable(t){const n=new Error("Potentially leaked disposable").stack;setTimeout((()=>{t[e]||console.log(n)}),3e3)}setParent(t,n){if(t&&t!==p.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==p.None)try{t[e]=!0}catch{}}markAsSingleton(e){}})}function l(e){return o?.trackDisposable(e),e}function h(e){o?.markAsDisposed(e)}function c(e,t){o?.setParent(e,t)}function u(e,t){if(o)for(const n of e)o.setParent(n,t)}function d(e){if(r.f.is(e)){const n=[];for(const i of e)if(i)try{i.dispose()}catch(t){n.push(t)}if(1===n.length)throw n[0];if(n.length>1)throw new AggregateError(n,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function g(...e){const t=f((()=>d(e)));return u(e,t),t}function f(e){const t=l({dispose:i((()=>{h(t),e()}))});return t}class m{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,l(this)}dispose(){this._isDisposed||(h(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{d(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return c(e,this),this._isDisposed?m.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),c(e,null))}}class p{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new m,l(this),c(this._store,this)}dispose(){h(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class _{constructor(){this._isDisposed=!1,l(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&c(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,h(this),this._value?.dispose(),this._value=void 0}}class b{constructor(){this._store=new Map,this._isDisposed=!1,l(this)}dispose(){h(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{d(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},7806:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});class i{static{this.Undefined=new i(void 0)}constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}}class r{constructor(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===i.Undefined}clear(){let e=this._first;while(e!==i.Undefined){const t=e.next;e.prev=i.Undefined,e.next=i.Undefined,e=t}this._first=i.Undefined,this._last=i.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new i(e);if(this._first===i.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==i.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==i.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==i.Undefined&&e.next!==i.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===i.Undefined&&e.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):e.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):e.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==i.Undefined)yield e.element,e=e.next}}},1553:(e,t,n)=>{"use strict";var i,r;n.d(t,{cO:()=>u,db:()=>d,fT:()=>a,qK:()=>c});class s{constructor(e,t){this.uri=e,this.value=t}}function o(e){return Array.isArray(e)}class a{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[i]="ResourceMap",e instanceof a)this.map=new Map(e.map),this.toKey=t??a.defaultToKey;else if(o(e)){this.map=new Map,this.toKey=t??a.defaultToKey;for(const[t,n]of e)this.set(t,n)}else this.map=new Map,this.toKey=e??a.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(const[n,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(i=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class l{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;while(i){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class h extends l{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class c extends h{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class d{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}},3911:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});const i=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},6657:(e,t,n)=>{"use strict";n.d(t,{ny:()=>i,v$:()=>h,zl:()=>m});var i,r=n(4396),s=n(5160),o=n(601),a=n(9133),l=n(1643);function h(e,t){return a.r.isUri(e)?(0,o.Q_)(e.scheme,t):(0,o.ns)(e,t+":")}(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(i||(i={}));const c="tkn";class u{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,i.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(u){return r.dz(u),e}const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&-1===n.indexOf("[")&&(n=`[${n}]`);const o=this._ports[t],l=this._connectionTokens[t];let h=`path=${encodeURIComponent(e.path)}`;return"string"===typeof l&&(h+=`&${c}=${encodeURIComponent(l)}`),a.r.from({scheme:s.HZ?this._preferredWebSchema:i.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:h})}}const d=new u,g="vscode-app";class f{static{this.FALLBACK_AUTHORITY=g}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===i.vscodeRemote?d.rewrite(e):e.scheme!==i.file||!s.ib&&s.lg!==`${i.vscodeFileResource}://${f.FALLBACK_AUTHORITY}`?e:e.with({scheme:i.vscodeFileResource,authority:e.authority||f.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const n=l.fj(t,e);return a.r.file(n)}return a.r.parse(t.toUrl(e))}}const m=new f;var p;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";function i(e){let i;"string"===typeof e?i=new URL(e).searchParams:e instanceof URL?i=e.searchParams:a.r.isUri(e)&&(i=new URL(e.toString(!0)).searchParams);const r=i?.get(n);if(r)return t.get(r)}function r(e,t,i){if(!globalThis.crossOriginIsolated)return;const r=t&&i?"3":i?"2":"1";e instanceof URLSearchParams?e.set(n,r):e[n]=r}e.getHeadersFromQuery=i,e.addSearchParam=r})(p||(p={}))},5603:(e,t,n)=>{"use strict";n.d(t,{V0:()=>s,aI:()=>i,kT:()=>o});Object.prototype.hasOwnProperty;function i(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;nfunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},i={};for(const r of e)i[r]=n(r);return i}},1643:(e,t,n)=>{"use strict";n.d(t,{P8:()=>B,pD:()=>O,LC:()=>F,fj:()=>D,S8:()=>A,SA:()=>T,V8:()=>R,hd:()=>M,Vn:()=>P,IN:()=>N});var i=n(5160);let r;const s=globalThis.vscode;if("undefined"!==typeof s&&"undefined"!==typeof s.process){const e=s.process;r={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else r="undefined"!==typeof process&&"string"===typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env["VSCODE_CWD"]||process.cwd()}}:{get platform(){return i.uF?"win32":i.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const o=r.cwd,a=r.env,l=r.platform,h=65,c=97,u=90,d=122,g=46,f=47,m=92,p=58,_=63;class b extends Error{constructor(e,t,n){let i;"string"===typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${r} ${i} of type ${t}`;s+=". Received type "+typeof n,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function k(e,t){if(null===e||"object"!==typeof e)throw new b(t,"Object",e)}function v(e,t){if("string"!==typeof e)throw new b(t,"string",e)}const C="win32"===l;function L(e){return e===f||e===m}function w(e){return e===f}function y(e){return e>=h&&e<=u||e>=c&&e<=d}function S(e,t,n,i){let r="",s=0,o=-1,a=0,l=0;for(let h=0;h<=e.length;++h){if(h2){const e=r.lastIndexOf(n);-1===e?(r="",s=0):(r=r.slice(0,e),s=r.length-1-r.lastIndexOf(n)),o=h,a=0;continue}if(0!==r.length){r="",s=0,o=h,a=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(o+1,h)}`:r=e.slice(o+1,h),s=h-o-1;o=h,a=0}else l===g&&-1!==a?++a:a=-1}return r}function x(e){return e?`${"."===e[0]?"":"."}${e}`:""}function E(e,t){k(t,"pathObject");const n=t.dir||t.root,i=t.base||`${t.name||""}${x(t.ext)}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const N={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],v(s,`paths[${r}]`),0===s.length)continue}else 0===t.length?s=o():(s=a[`=${t}`]||o(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===m)&&(s=`${t}\\`));const l=s.length;let h=0,c="",u=!1;const d=s.charCodeAt(0);if(1===l)L(d)&&(h=1,u=!0);else if(L(d))if(u=!0,L(s.charCodeAt(1))){let e=2,t=e;while(e2&&L(s.charCodeAt(2))&&(u=!0,h=3));if(c.length>0)if(t.length>0){if(c.toLowerCase()!==t.toLowerCase())continue}else t=c;if(i){if(t.length>0)break}else if(n=`${s.slice(h)}\\${n}`,i=u,u&&t.length>0)break}return n=S(n,!i,"\\",L),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){v(e,"path");const t=e.length;if(0===t)return".";let n,i=0,r=!1;const s=e.charCodeAt(0);if(1===t)return w(s)?"\\":e;if(L(s))if(r=!0,L(e.charCodeAt(1))){let r=2,s=r;while(r2&&L(e.charCodeAt(2))&&(r=!0,i=3));let o=i0&&L(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?r?`\\${o}`:o:r?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){v(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return L(n)||t>2&&y(n)&&e.charCodeAt(1)===p&&L(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let s=0;s0&&(void 0===t?t=n=i:t+=`\\${i}`)}if(void 0===t)return".";let i=!0,r=0;if("string"===typeof n&&L(n.charCodeAt(0))){++r;const e=n.length;e>1&&L(n.charCodeAt(1))&&(++r,e>2&&(L(n.charCodeAt(2))?++r:i=!1))}if(i){while(r=2&&(t=`\\${t.slice(r)}`)}return N.normalize(t)},relative(e,t){if(v(e,"from"),v(t,"to"),e===t)return"";const n=N.resolve(e),i=N.resolve(t);if(n===i)return"";if(e=n.toLowerCase(),t=i.toLowerCase(),e===t)return"";let r=0;while(rr&&e.charCodeAt(s-1)===m)s--;const o=s-r;let a=0;while(aa&&t.charCodeAt(l-1)===m)l--;const h=l-a,c=oc){if(t.charCodeAt(a+d)===m)return i.slice(a+d+1);if(2===d)return i.slice(a+d)}o>c&&(e.charCodeAt(r+d)===m?u=d:2===d&&(u=3)),-1===u&&(u=0)}let g="";for(d=r+u+1;d<=s;++d)d!==s&&e.charCodeAt(d)!==m||(g+=0===g.length?"..":"\\..");return a+=u,g.length>0?`${g}${i.slice(a,l)}`:(i.charCodeAt(a)===m&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e||0===e.length)return e;const t=N.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===m){if(t.charCodeAt(1)===m){const e=t.charCodeAt(2);if(e!==_&&e!==g)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===p&&t.charCodeAt(2)===m)return`\\\\?\\${t}`;return e},dirname(e){v(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const r=e.charCodeAt(0);if(1===t)return L(r)?e:".";if(L(r)){if(n=i=1,L(e.charCodeAt(1))){let r=2,s=r;while(r2&&L(e.charCodeAt(2))?3:2,i=n);let s=-1,o=!0;for(let a=t-1;a>=i;--a)if(L(e.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&v(t,"suffix"),v(e,"path");let n,i=0,r=-1,s=!0;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===p&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(L(l)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=i;--n)if(L(e.charCodeAt(n))){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){v(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===p&&y(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(L(t)){if(!s){i=a+1;break}}else-1===r&&(s=!1,r=a+1),t===g?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:E.bind(null,"\\"),parse(e){v(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,r=e.charCodeAt(0);if(1===n)return L(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(L(r)){if(i=1,L(e.charCodeAt(1))){let t=2,r=t;while(t0&&(t.root=e.slice(0,i));let s=-1,o=i,a=-1,l=!0,h=e.length-1,c=0;for(;h>=i;--h)if(r=e.charCodeAt(h),L(r)){if(!l){o=h+1;break}}else-1===a&&(l=!1,a=h+1),r===g?-1===s?s=h:1!==c&&(c=1):-1!==s&&(c=-1);return-1!==a&&(-1===s||0===c||1===c&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==i?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},I=(()=>{if(C){const e=/\\/g;return()=>{const t=o().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>o()})(),T={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const r=i>=0?e[i]:I();v(r,`paths[${i}]`),0!==r.length&&(t=`${r}/${t}`,n=r.charCodeAt(0)===f)}return t=S(t,!n,"/",w),n?`/${t}`:t.length>0?t:"."},normalize(e){if(v(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===f,n=e.charCodeAt(e.length-1)===f;return e=S(e,!t,"/",w),0===e.length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return v(e,"path"),e.length>0&&e.charCodeAt(0)===f},join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":T.normalize(t)},relative(e,t){if(v(e,"from"),v(t,"to"),e===t)return"";if(e=T.resolve(e),t=T.resolve(t),e===t)return"";const n=1,i=e.length,r=i-n,s=1,o=t.length-s,a=ra){if(t.charCodeAt(s+h)===f)return t.slice(s+h+1);if(0===h)return t.slice(s+h)}else r>a&&(e.charCodeAt(n+h)===f?l=h:0===h&&(l=0));let c="";for(h=n+l+1;h<=i;++h)h!==i&&e.charCodeAt(h)!==f||(c+=0===c.length?"..":"/..");return`${c}${t.slice(s+l)}`},toNamespacedPath(e){return e},dirname(e){if(v(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===f;let n=-1,i=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===f){if(!i){n=r;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&v(t,"ext"),v(e,"path");let n,i=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===f){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===f){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){v(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==f)-1===i&&(r=!1,i=o+1),a===g?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=o+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:E.bind(null,"/"),parse(e){v(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===f;let i;n?(t.root="/",i=1):i=0;let r=-1,s=0,o=-1,a=!0,l=e.length-1,h=0;for(;l>=i;--l){const t=e.charCodeAt(l);if(t!==f)-1===o&&(a=!1,o=l+1),t===g?-1===r?r=l:1!==h&&(h=1):-1!==r&&(h=-1);else if(!a){s=l+1;break}}if(-1!==o){const i=0===s&&n?1:s;-1===r||0===h||1===h&&r===o-1&&r===s+1?t.base=t.name=e.slice(i,o):(t.name=e.slice(i,r),t.base=e.slice(i,o),t.ext=e.slice(r,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};T.win32=N.win32=N,T.posix=N.posix=T;const A=C?N.normalize:T.normalize,D=C?N.join:T.join,M=C?N.resolve:T.resolve,R=C?N.relative:T.relative,O=C?N.dirname:T.dirname,B=C?N.basename:T.basename,F=C?N.extname:T.extname,P=C?N.sep:T.sep},5160:(e,t,n)=>{"use strict";n.d(t,{H8:()=>z,HZ:()=>I,OS:()=>O,UP:()=>q,_p:()=>R,cm:()=>P,gm:()=>V,ib:()=>N,j9:()=>E,lg:()=>A,nr:()=>W,uF:()=>S,zx:()=>x});var i=n(1337);const r="en";let s,o,a=!1,l=!1,h=!1,c=!1,u=!1,d=!1,g=!1,f=!1,m=!1,p=!1,_=null,b=null,k=null;const v=globalThis;let C;"undefined"!==typeof v.vscode&&"undefined"!==typeof v.vscode.process?C=v.vscode.process:"undefined"!==typeof process&&"string"===typeof process?.versions?.node&&(C=process);const L="string"===typeof C?.versions?.electron,w=L&&"renderer"===C?.type;if("object"===typeof C){a="win32"===C.platform,l="darwin"===C.platform,h="linux"===C.platform,c=h&&!!C.env["SNAP"]&&!!C.env["SNAP_REVISION"],g=L,m=!!C.env["CI"]||!!C.env["BUILD_ARTIFACTSTAGINGDIRECTORY"],s=r,_=r;const e=C.env["VSCODE_NLS_CONFIG"];if(e)try{const t=JSON.parse(e);s=t.userLocale,b=t.osLocale,_=t.resolvedLanguage||r,k=t.languagePack?.translationsConfigFile}catch(H){}u=!0}else"object"!==typeof navigator||w?console.error("Unable to resolve platform."):(o=navigator.userAgent,a=o.indexOf("Windows")>=0,l=o.indexOf("Macintosh")>=0,f=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h=o.indexOf("Linux")>=0,p=o?.indexOf("Mobi")>=0,d=!0,_=i.i8()||r,s=navigator.language.toLowerCase(),b=s);let y=0;l?y=1:a?y=3:h&&(y=2);const S=a,x=l,E=h,N=u,I=d,T=d&&"function"===typeof v.importScripts,A=T?v.origin:void 0,D=o,M="function"===typeof v.postMessage&&!v.importScripts,R=(()=>{if(M){const e=[];v.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n{const i=++t;e.push({id:i,callback:n}),v.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})(),O=l||f?2:a?1:3;let B=!0,F=!1;function P(){if(!F){F=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);B=513===t[0]}return B}const z=!!(D&&D.indexOf("Chrome")>=0),V=!!(D&&D.indexOf("Firefox")>=0),W=!!(!z&&D&&D.indexOf("Safari")>=0),q=!!(D&&D.indexOf("Edg/")>=0);D&&D.indexOf("Android")},4366:(e,t,n)=>{"use strict";n.d(t,{B6:()=>m,P8:()=>d});var i=n(7531),r=n(6657),s=n(1643),o=n(5160),a=n(601),l=n(9133);function h(e){return(0,l.I)(e,!0)}class c{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===r.ny.file)return i._1(h(e),h(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(g(e.authority,t.authority))return i._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return d(e)||e.authority}basename(e){return s.SA.basename(e.path)}extname(e){return s.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===r.ny.file?t=l.r.file(s.pD(h(e))).path:(t=s.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===r.ny.file?l.r.file(s.S8(h(e))).path:s.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!g(e.authority,t.authority))return;if(e.scheme===r.ny.file){const n=s.V8(h(e),h(t));return o.uF?i.TH(n):n}let n=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(n.length,a.length);ei.Zn(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.Vn){return f(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.Vn){let n=!1;if(e.scheme===r.ny.file){const r=h(e);n=void 0!==r&&r.length===i.Zn(r).length&&r[r.length-1]===t}else{t="/";const i=e.path;n=1===i.length&&47===i.charCodeAt(i.length-1)}return n||f(e,t)?e:e.with({path:e.path+"/"})}}const u=new c((()=>!1)),d=(new c((e=>e.scheme!==r.ny.file||!o.j9)),new c((e=>!0)),u.isEqual.bind(u),u.isEqualOrParent.bind(u),u.getComparisonKey.bind(u),u.basenameOrAuthority.bind(u),u.basename.bind(u)),g=(u.extname.bind(u),u.dirname.bind(u),u.joinPath.bind(u),u.normalizePath.bind(u),u.relativePath.bind(u),u.resolvePath.bind(u),u.isAbsolutePath.bind(u),u.isEqualAuthority.bind(u)),f=u.hasTrailingPathSeparator.bind(u);u.removeTrailingPathSeparator.bind(u),u.addTrailingPathSeparator.bind(u);var m;(function(e){function t(t){const n=new Map,i=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));i.split(";").forEach((e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)}));const r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(e.META_DATA_MIME,r),n}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(m||(m={}))},4240:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const i=globalThis.performance&&"function"===typeof globalThis.performance.now;class r{static create(e){return new r(e)}constructor(e){this._now=i&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},601:(e,t,n)=>{"use strict";n.d(t,{$X:()=>R,AV:()=>s,E_:()=>T,HG:()=>d,LJ:()=>L,LU:()=>P,NB:()=>l,OS:()=>h,Q_:()=>k,Ss:()=>B,UD:()=>f,Wv:()=>b,Z5:()=>y,_J:()=>M,aC:()=>D,bm:()=>a,eY:()=>c,jy:()=>o,km:()=>E,lT:()=>g,ne:()=>O,ns:()=>v,pc:()=>C,r_:()=>F,tk:()=>z,tl:()=>H,uz:()=>u,y_:()=>U,z_:()=>w});var i=n(7389),r=n(5661);function s(e){return!e||"string"!==typeof e||0===e.trim().length}function o(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;while(e.indexOf(t,i)===i)i+=n;return e.substring(i)}function h(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function c(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function u(e){return e.split(/\r\n|\r|\n/)}function d(e){for(let t=0,n=e.length;t=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function f(e,t){return et?1:0}function m(e,t,n=0,i=e.length,r=0,s=t.length){for(;ns)return 1}const o=i-n,a=s-r;return oa?1:0}function p(e,t,n=0,i=e.length,r=0,s=t.length){for(;n=128||a>=128)return m(e.toLowerCase(),t.toLowerCase(),n,i,r,s);_(o)&&(o-=32),_(a)&&(a-=32);const l=o-a;if(0!==l)return l}const o=i-n,a=s-r;return oa?1:0}function _(e){return e>=97&&e<=122}function b(e){return e>=65&&e<=90}function k(e,t){return e.length===t.length&&0===p(e,t)}function v(e,t){const n=t.length;return!(t.length>e.length)&&0===p(e,t,0,n)}function C(e){return 55296<=e&&e<=56319}function L(e){return 56320<=e&&e<=57343}function w(e,t){return t-56320+(e-55296<<10)+65536}function y(e,t,n){const i=e.charCodeAt(n);if(C(i)&&n+11){const i=e.charCodeAt(t-2);if(C(i))return w(i,n)}return n}class x{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=S(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=y(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class E{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new x(e,t)}nextGraphemeLength(){const e=W.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.nextCodePoint());while(!t.eol()){const n=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());if(V(i,r)){t.setOffset(n);break}i=r}return t.offset-n}prevGraphemeLength(){const e=W.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.prevCodePoint());while(t.offset>0){const n=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());if(V(r,i)){t.setOffset(n);break}i=r}return n-t.offset}eol(){return this._iterator.eol()}}let N;function I(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function T(e){return N||(N=I()),N.test(e)}const A=/^[\t\n\r\x20-\x7E]*$/;function D(e){return A.test(e)}const M=/[\u2028\u2029]/;function R(e){return M.test(e)}function O(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function B(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const F=String.fromCharCode(65279);function P(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function z(e){const t=26;return e%=2*t,et[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}function q(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}class H{static{this.ambiguousCharacterData=new r.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new i.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let n=0;n!e.startsWith("_")&&e in r));0===o.length&&(o=["_default"]);for(const h of o){const e=t(r[h]);s=i(s,e)}const a=t(r["_common"]),l=n(a,s);return new H(l)}))}static getInstance(e){return H.cache.get(Array.from(e))}static{this._locales=new r.d((()=>Object.keys(H.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return H._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class U{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(U.getRawData())),this._data}static isInvisibleCharacter(e){return U.getData().has(e)}static get codePoints(){return U.getData()}}},322:(e,t,n)=>{"use strict";function i(e){return"string"===typeof e}function r(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(e){return"undefined"===typeof e}function o(e){return s(e)||null===e}n.d(t,{Gv:()=>r,Kg:()=>i,b0:()=>s,z:()=>o})},2647:(e,t,n)=>{"use strict";function i(e){return e<0?0:e>255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,{W:()=>i,j:()=>r})},9133:(e,t,n)=>{"use strict";n.d(t,{I:()=>v,r:()=>f});var i=n(1643),r=n(5160);const s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function h(e,t){return e||t?e:"file"}function c(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d;break}return t}const u="",d="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){return e instanceof f||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"string"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}constructor(e,t,n,i,r,s=!1){"object"===typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=h(e,s),this.authority=t||u,this.path=c(this.scheme,n||u),this.query=i||u,this.fragment=r||u,l(this,s))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===i?i=this.path:null===i&&(i=u),void 0===r?r=this.query:null===r&&(r=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new p(t,n,i,r,s)}static parse(e,t=!1){const n=g.exec(e);return n?new p(n[2]||u,y(n[4]||u),y(n[5]||u),y(n[7]||u),y(n[9]||u),t):new p(u,u,u,u,u)}static file(e){let t=u;if(r.uF&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new p("file",t,e,u,u)}static from(e,t){const n=new p(e.scheme,e.authority,e.path,e.query,e.fragment,t);return n}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=r.uF&&"file"===e.scheme?f.file(i.IN.join(v(e,!0),...t)).path:i.SA.join(e.path,...t),e.with({path:n})}toString(e=!1){return C(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{const t=new p(e);return t._formatted=e.external??null,t._fsPath=e._sep===m?e.fsPath??null:null,t}}return e}}const m=r.uF?1:void 0;class p extends f{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const _={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function b(e,t,n){let i,r=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=_[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function k(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.uF&&(n=n.replace(/\//g,"\\")),n}function C(e,t){const n=t?k:b;let i="",{scheme:r,authority:s,path:o,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=d,i+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),l&&(i+="#",i+=t?l:b(l,!1,!1)),i}function L(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+L(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(e){return e.match(w)?e.replace(w,(e=>L(e))):e}},1352:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SimpleWorkerClient:()=>v,SimpleWorkerServer:()=>w,create:()=>y,logOnceWebWorkerWarning:()=>g});var i=n(4396),r=n(231),s=n(8894),o=n(6657),a=n(5160),l=n(601);const h=!0,c="default",u="$initialize";let d=!1;function g(e){a.HZ&&(d||(d=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class f{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.method=i,this.args=r,this.type=0}}class m{constructor(e,t,n,i){this.vsWorker=e,this.seq=t,this.res=n,this.err=i,this.type=1}}class p{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=i,this.arg=r,this.type=2}}class _{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class b{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class k{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const i=String(++this._lastSentReq);return new Promise(((r,s)=>{this._pendingReplies[i]={resolve:r,reject:s},this._send(new f(this._workerId,i,e,t,n))}))}listen(e,t,n){let i=null;const s=new r.vl({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new p(this._workerId,i,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new b(this._workerId,i)),i=null}});return s.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const n={get:(n,i)=>("string"!==typeof i||n[i]||(L(i)?n[i]=t=>this.listen(e,i,t):C(i)?n[i]=this.listen(e,i,void 0):36===i.charCodeAt(0)&&(n[i]=async(...n)=>(await(t?.()),this.sendMessage(e,i,n)))),n[i])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;return e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req,n=this._handler.handleMessage(e.channel,e.method,e.args);n.then((e=>{this._send(new m(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,i.cU)(e.detail)),this._send(new m(this._workerId,t,void 0,(0,i.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new _(this._workerId,t,e))}));this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let n=0;n{this._protocol.handleMessage(e)}),(e=>{(0,i.dz)(e)}))),this._protocol=new k({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)}),this._protocol.setWorkerId(this._worker.getId());let n=null;const r=globalThis.require;"undefined"!==typeof r&&"function"===typeof r.getConfig?n=r.getConfig():"undefined"!==typeof globalThis.requirejs&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(c,u,[this._worker.getId(),JSON.parse(JSON.stringify(n)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(c,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,n){const i=this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!==typeof i[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(r){return Promise.reject(r)}}_handleEvent(e,t,n){const i=this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on main thread`);if(L(t)){const r=i[t].call(i,n);if("function"!==typeof r)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return r}if(C(t)){const n=i[t];if("function"!==typeof n)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return n}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function C(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function L(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class w{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new k({sendMessage:(t,n)=>{e(t,n)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===c&&t===u)return this.initialize(n[0],n[1],n[2]);const i=e===c?this._requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!==typeof i[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(r){return Promise.reject(r)}}_handleEvent(e,t,n){const i=e===c?this._requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(L(t)){const e=i[t].call(i,n);if("function"!==typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(C(t)){const e=i[t];if("function"!==typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,i){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){if(t&&("undefined"!==typeof t.baseUrl&&delete t["baseUrl"],"undefined"!==typeof t.paths&&"undefined"!==typeof t.paths.vs&&delete t.paths["vs"],"undefined"!==typeof t.trustedTypesPolicy&&delete t["trustedTypesPolicy"],t.catchError=!0,globalThis.require.config(t)),h){const e=o.zl.asBrowserUri(`${i}.js`).toString(!0);return n(5890)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}return new Promise(((e,t)=>{const n=globalThis.require;n([i],(n=>{this._requestHandler=n.create(this),this._requestHandler?e():t(new Error("No RequestHandler!"))}),t)}))}this._requestHandler=this._requestHandlerFactory(this)}}function y(e){return new w(e,null)}},4529:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(2647);class r{constructor(e){const t=(0,i.W)(e);this._defaultValue=t,this._asciiMap=r._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=(0,i.W)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}},2764:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>_,aZ:()=>p,l5:()=>C,lQ:()=>k,s7:()=>y,sH:()=>L,sN:()=>b,ss:()=>v,yI:()=>m,zp:()=>w});var i=n(1337),r=n(5476),s=n(7732),o=n(3711);const a=(0,s.x1A)("editor.lineHighlightBackground",null,i.kg("lineHighlight","Background color for the highlight of line at the cursor position.")),l=((0,s.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.b1q},i.kg("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),(0,s.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},i.kg("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("rangeHighlightBorder","Background color of the border around highlighted ranges.")),(0,s.x1A)("editor.symbolHighlightBackground",{dark:s.Ubg,light:s.Ubg,hcDark:null,hcLight:null},i.kg("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("symbolHighlightBorder","Background color of the border around highlighted symbols.")),(0,s.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:r.Q1.black,hcDark:r.Q1.white,hcLight:"#0F4A85"},i.kg("caret","Color of the editor cursor."))),h=(0,s.x1A)("editorCursor.background",null,i.kg("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),c=((0,s.x1A)("editorMultiCursor.primary.foreground",l,i.kg("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.primary.background",h,i.kg("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorMultiCursor.secondary.foreground",l,i.kg("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.secondary.background",h,i.kg("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},i.kg("editorWhitespaces","Color of whitespace characters in the editor."))),u=((0,s.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorLineNumbers","Color of editor line numbers.")),(0,s.x1A)("editorIndentGuide.background",c,i.kg("editorIndentGuides","Color of the editor indentation guides."),!1,i.kg("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead."))),d=(0,s.x1A)("editorIndentGuide.activeBackground",c,i.kg("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,i.kg("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),g=((0,s.x1A)("editorIndentGuide.background1",u,i.kg("editorIndentGuides1","Color of the editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.background2","#00000000",i.kg("editorIndentGuides2","Color of the editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.background3","#00000000",i.kg("editorIndentGuides3","Color of the editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.background4","#00000000",i.kg("editorIndentGuides4","Color of the editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.background5","#00000000",i.kg("editorIndentGuides5","Color of the editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.background6","#00000000",i.kg("editorIndentGuides6","Color of the editor indentation guides (6).")),(0,s.x1A)("editorIndentGuide.activeBackground1",d,i.kg("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.activeBackground2","#00000000",i.kg("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.activeBackground3","#00000000",i.kg("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.activeBackground4","#00000000",i.kg("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.activeBackground5","#00000000",i.kg("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.activeBackground6","#00000000",i.kg("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),(0,s.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.buw,hcLight:s.buw},i.kg("editorActiveLineNumber","Color of editor active line number"),!1,i.kg("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."))),f=((0,s.x1A)("editorLineNumber.activeForeground",g,i.kg("editorActiveLineNumber","Color of editor active line number")),(0,s.x1A)("editorLineNumber.dimmedForeground",null,i.kg("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),(0,s.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:r.Q1.lightgrey,hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorRuler","Color of the editor rulers.")),(0,s.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},i.kg("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},i.kg("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.b1q,hcLight:s.b1q},i.kg("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},i.kg("editorOverviewRulerBorder","Color of the overview ruler border.")),(0,s.x1A)("editorOverviewRuler.background",null,i.kg("editorOverviewRulerBackground","Background color of the editor overview ruler.")),(0,s.x1A)("editorGutter.background",s.YtV,i.kg("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:s.b1q},i.kg("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.x1A)("editorUnnecessaryCode.opacity",{dark:r.Q1.fromHex("#000a"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),(0,s.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:r.Q1.fromHex("#292929").transparent(.8)},i.kg("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.x1A)("editorGhostText.foreground",{dark:r.Q1.fromHex("#ffffff56"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.x1A)("editorGhostText.background",null,i.kg("editorGhostTextBackground","Background color of the ghost text in the editor.")),new r.Q1(new r.bU(0,122,204,.6))),m=((0,s.x1A)("editorOverviewRuler.rangeHighlightForeground",f,i.kg("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editorOverviewRuler.errorForeground",{dark:new r.Q1(new r.bU(255,18,18,.7)),light:new r.Q1(new r.bU(255,18,18,.7)),hcDark:new r.Q1(new r.bU(255,50,50,1)),hcLight:"#B5200D"},i.kg("overviewRuleError","Overview ruler marker color for errors."))),p=(0,s.x1A)("editorOverviewRuler.warningForeground",{dark:s.Hng,light:s.Hng,hcDark:s.Stt,hcLight:s.Stt},i.kg("overviewRuleWarning","Overview ruler marker color for warnings.")),_=(0,s.x1A)("editorOverviewRuler.infoForeground",{dark:s.pOz,light:s.pOz,hcDark:s.IIb,hcLight:s.IIb},i.kg("overviewRuleInfo","Overview ruler marker color for infos.")),b=(0,s.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},i.kg("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),k=(0,s.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},i.kg("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),v=(0,s.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},i.kg("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),C=(0,s.x1A)("editorBracketHighlight.foreground4","#00000000",i.kg("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),L=(0,s.x1A)("editorBracketHighlight.foreground5","#00000000",i.kg("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),w=(0,s.x1A)("editorBracketHighlight.foreground6","#00000000",i.kg("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),y=(0,s.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new r.Q1(new r.bU(255,18,18,.8)),light:new r.Q1(new r.bU(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},i.kg("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));(0,s.x1A)("editorBracketPairGuide.background1","#00000000",i.kg("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background2","#00000000",i.kg("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background3","#00000000",i.kg("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background4","#00000000",i.kg("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background5","#00000000",i.kg("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background6","#00000000",i.kg("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground1","#00000000",i.kg("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground2","#00000000",i.kg("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground3","#00000000",i.kg("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground4","#00000000",i.kg("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground5","#00000000",i.kg("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground6","#00000000",i.kg("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorUnicodeHighlight.border",s.Hng,i.kg("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.x1A)("editorUnicodeHighlight.background",s.whs,i.kg("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));(0,o.zy)(((e,t)=>{const n=e.getColor(s.YtV),i=e.getColor(a),r=i&&!i.isTransparent()?i:n;r&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${r}; }`)}))},6627:(e,t,n)=>{"use strict";function i(e){let t=0,n=0,i=0,r=0;for(let s=0,o=e.length;si})},4544:(e,t,n)=>{"use strict";n.d(t,{M:()=>a,S:()=>l});var i=n(4396),r=n(371),s=n(8690),o=n(3654);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let n=1;nt)throw new i.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}contains(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let n=0,i=0,r=null;while(n=s.startLineNumber?r=new a(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return null!==r&&t.push(r),new l(t)}subtractFrom(e){const t=(0,o.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)return new l([e]);const i=[];let r=e.startLineNumber;for(let s=t;sr&&i.push(new a(r,e.startLineNumber)),r=e.endLineNumberExclusive}return re.toString())).join(", ")}getIntersection(e){const t=[];let n=0,i=0;while(nt.delta(e))))}}},371:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(4396);class r{static addRange(e,t){let n=0;while(nt))return new r(e,t)}static ofLength(e){return new r(0,e)}static ofStartAndLength(e,t){return new r(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new i.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new r(this.start+e,this.endExclusive+e)}deltaStart(e){return new r(this.start+e,this.endExclusive)}deltaEnd(e){return new r(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t{"use strict";n.d(t,{y:()=>i});class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";n.d(t,{Q:()=>r});var i=n(6788);class r{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let n,i,s,o;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new r(n,i,s,o)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,o=e.endColumn;const a=t.startLineNumber,l=t.startColumn,h=t.endLineNumber,c=t.endColumn;return nh?(s=h,o=c):s===h&&(o=Math.min(o,c)),n>s||n===s&&i>o?null:new r(n,i,s,o)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new i.y(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new i.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return r.collapseToEnd(this)}static collapseToEnd(e){return new r(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new r(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},8581:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(6788),r=n(8690);class s extends r.Q{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new i.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new i.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n{"use strict";n.d(t,{W:()=>s});var i=n(6788),r=n(8690);class s{static{this.zero=new s(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new s(0,t.column-e.column):new s(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return s.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const i of e)"\n"===i?(t++,n=0):n++;return new s(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new r.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new r.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new i.y(e.lineNumber,e.column+this.columnCount):new i.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},939:(e,t,n)=>{"use strict";n.d(t,{Io:()=>l,Ld:()=>a,Th:()=>c});var i=n(5837),r=n(7806);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function o(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of s)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const a=o();function l(e){let t=a;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const h=new r.w;function c(e,t,n,r,s){if(t=l(t),s||(s=i.f.first(h)),n.length>s.maxLen){let i=e-s.maxLen/2;return i<0?i=0:r+=i,n=n.substring(i,e+s.maxLen/2),c(e,t,n,r,s)}const o=Date.now(),a=e-1-r;let d=-1,g=null;for(let i=1;;i++){if(Date.now()-o>=s.timeBudget)break;const e=a-s.windowSize*i;t.lastIndex=Math.max(0,e);const r=u(t,n,a,d);if(!r&&g)break;if(g=r,e<=0)break;d=e}if(g){const e={word:g[0],startColumn:r+1+g.index,endColumn:r+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function u(e,t,n,i){let r;while(r=e.exec(t)){const t=r.index||0;if(t<=n&&e.lastIndex>=n)return r;if(i>0&&t>i)return null}return null}h.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},4577:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});class i{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!==(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){const t=this.getForeground(e);let n="mtk"+t;const i=this.getFontStyle(e);return 1&i&&(n+=" mtki"),2&i&&(n+=" mtkb"),4&i&&(n+=" mtku"),8&i&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let r=`color: ${t[n]};`;1&i&&(r+="font-style: italic;"),2&i&&(r+="font-weight: bold;");let s="";return 4&i&&(s+=" underline"),8&i&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&n),bold:Boolean(2&n),underline:Boolean(4&n),strikethrough:Boolean(8&n)}}}},5350:(e,t,n)=>{"use strict";n.d(t,{rY:()=>p,ou:()=>m,dG:()=>w,OB:()=>y});var i=n(6455),r=(n(9133),n(231)),s=n(8894);class o{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,s.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new a(this,e,t);return this._factories.set(e,n),(0,s.s)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){const t=this.get(e);if(t)return!0;const n=this._factories.get(e);return!(n&&!n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class a extends s.jG{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var l,h,c,u,d,g,f=n(1337);class m{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class p{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}(function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"})(l||(l={})),function(e){const t=new Map;function n(e){let n=t.get(e);return n||(console.info("No codicon found for CompletionItemKind "+e),n=i.W.symbolProperty),n}t.set(0,i.W.symbolMethod),t.set(1,i.W.symbolFunction),t.set(2,i.W.symbolConstructor),t.set(3,i.W.symbolField),t.set(4,i.W.symbolVariable),t.set(5,i.W.symbolClass),t.set(6,i.W.symbolStruct),t.set(7,i.W.symbolInterface),t.set(8,i.W.symbolModule),t.set(9,i.W.symbolProperty),t.set(10,i.W.symbolEvent),t.set(11,i.W.symbolOperator),t.set(12,i.W.symbolUnit),t.set(13,i.W.symbolValue),t.set(15,i.W.symbolEnum),t.set(14,i.W.symbolConstant),t.set(15,i.W.symbolEnum),t.set(16,i.W.symbolEnumMember),t.set(17,i.W.symbolKeyword),t.set(27,i.W.symbolSnippet),t.set(18,i.W.symbolText),t.set(19,i.W.symbolColor),t.set(20,i.W.symbolFile),t.set(21,i.W.symbolReference),t.set(22,i.W.symbolCustomColor),t.set(23,i.W.symbolFolder),t.set(24,i.W.symbolTypeParameter),t.set(25,i.W.account),t.set(26,i.W.issues),e.toIcon=n;const r=new Map;function s(e,t){let n=r.get(e);return"undefined"!==typeof n||t||(n=9),n}r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26),e.fromString=s}(h||(h={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(c||(c={}));(function(e){e[e["Automatic"]=0]="Automatic",e[e["PasteAs"]=1]="PasteAs"})(u||(u={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(d||(d={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(g||(g={}));(0,f.kg)("Array","array"),(0,f.kg)("Boolean","boolean"),(0,f.kg)("Class","class"),(0,f.kg)("Constant","constant"),(0,f.kg)("Constructor","constructor"),(0,f.kg)("Enum","enumeration"),(0,f.kg)("EnumMember","enumeration member"),(0,f.kg)("Event","event"),(0,f.kg)("Field","field"),(0,f.kg)("File","file"),(0,f.kg)("Function","function"),(0,f.kg)("Interface","interface"),(0,f.kg)("Key","key"),(0,f.kg)("Method","method"),(0,f.kg)("Module","module"),(0,f.kg)("Namespace","namespace"),(0,f.kg)("Null","null"),(0,f.kg)("Number","number"),(0,f.kg)("Object","object"),(0,f.kg)("Operator","operator"),(0,f.kg)("Package","package"),(0,f.kg)("Property","property"),(0,f.kg)("String","string"),(0,f.kg)("Struct","struct"),(0,f.kg)("TypeParameter","type parameter"),(0,f.kg)("Variable","variable");var _,b,k,v,C;(function(e){const t=new Map;function n(e){let n=t.get(e);return n||(console.info("No codicon found for SymbolKind "+e),n=i.W.symbolProperty),n}t.set(0,i.W.symbolFile),t.set(1,i.W.symbolModule),t.set(2,i.W.symbolNamespace),t.set(3,i.W.symbolPackage),t.set(4,i.W.symbolClass),t.set(5,i.W.symbolMethod),t.set(6,i.W.symbolProperty),t.set(7,i.W.symbolField),t.set(8,i.W.symbolConstructor),t.set(9,i.W.symbolEnum),t.set(10,i.W.symbolInterface),t.set(11,i.W.symbolFunction),t.set(12,i.W.symbolVariable),t.set(13,i.W.symbolConstant),t.set(14,i.W.symbolString),t.set(15,i.W.symbolNumber),t.set(16,i.W.symbolBoolean),t.set(17,i.W.symbolArray),t.set(18,i.W.symbolObject),t.set(19,i.W.symbolKey),t.set(20,i.W.symbolNull),t.set(21,i.W.symbolEnumMember),t.set(22,i.W.symbolStruct),t.set(23,i.W.symbolEvent),t.set(24,i.W.symbolOperator),t.set(25,i.W.symbolTypeParameter),e.toIcon=n})(_||(_={}));class L{static{this.Comment=new L("comment")}static{this.Imports=new L("imports")}static{this.Region=new L("region")}static fromValue(e){switch(e){case"comment":return L.Comment;case"imports":return L.Imports;case"region":return L.Region}return new L(e)}constructor(e){this.value=e}}(function(e){e[e["AIGenerated"]=1]="AIGenerated"})(b||(b={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(k||(k={})),function(e){function t(e){return!(!e||"object"!==typeof e)&&("string"===typeof e.id&&"string"===typeof e.title)}e.is=t}(v||(v={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(C||(C={}));const w=new o,y=new o;var S;(function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"})(S||(S={}))},4573:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(7778);const r=(0,i.u1)("languageService")},5764:(e,t,n)=>{"use strict";n.d(t,{W6:()=>c,vH:()=>u});var i=n(1337),r=n(231),s=n(6374),o=n(3911),a=n(7503);const l={ModesRegistry:"editor.modesRegistry"};class h{constructor(){this._onDidChangeLanguages=new r.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t{"use strict";n.d(t,{A5:()=>i,Dg:()=>l,F4:()=>d,L5:()=>u,Wo:()=>c,X2:()=>a,ZS:()=>r,nk:()=>h,vd:()=>g});var i,r,s,o=n(5603);(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(i||(i={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(r||(r={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,o.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function h(e){return e&&"function"===typeof e.read}class c{constructor(e,t,n,i,r,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=r,this._isTracked=s}}class u{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class d{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},2773:(e,t,n)=>{"use strict";n.d(t,{lt:()=>g,W5:()=>C,hB:()=>_,dr:()=>m,wC:()=>v});var i=n(601),r=n(1553),s=n(4529);class o extends s.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let n=0,i=e.length;nt)break;n=i}return n}findNextIntlWordAtOrAfterOffset(e,t){for(const n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index=0;let t=null;try{t=i.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(r){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new u.L5(t,this.wordSeparators?l(this.wordSeparators,[]):null,n?this.searchString:null)}}function f(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t=n)break;const i=e.charCodeAt(t);if(110===i||114===i||87===i)return!0}}return!1}function m(e,t,n){if(!n)return new u.Dg(e,null);const i=[];for(let r=0,s=t.length;r=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1}}class _{static findMatches(e,t,n,i,r){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new C(s.wordSeparators,s.regex),i,r):this._doFindMatchesLineByLine(e,n,s,i,r):[]}static _getMultilineMatchRange(e,t,n,i,r,s){let o,a,l=0;if(i?(l=i.findLineFeedCountBeforeOffset(r),o=t+r+l):o=t+r,i){const e=i.findLineFeedCountBeforeOffset(r+s.length),t=e-l;a=o+s.length+t}else a=o+s.length;const h=e.getPositionAt(o),u=e.getPositionAt(a);return new c.Q(h.lineNumber,h.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,n,i,r){const s=e.getOffsetAt(t.getStartPosition()),o=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new p(o):null,l=[];let h,c=0;n.reset(0);while(h=n.next(o))if(l[c++]=m(this._getMultilineMatchRange(e,s,o,a,h.index,h[0]),h,i),c>=r)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,r){const s=[];let o=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r);for(let l=t.startLineNumber+1;l=a))return r;return r}const h=new C(e.wordSeparators,e.regex);let d;h.reset(0);do{if(d=h.next(t),d&&(s[r++]=m(new c.Q(n,d.index+1+i,n,d.index+1+d[0].length+i),d,o),r>=a))return r}while(d);return r}static findNextMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new C(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,s,i):this._doFindNextMatchLineByLine(e,n,s,i)}static _doFindNextMatchMultiline(e,t,n,i){const r=new h.y(t.lineNumber,1),s=e.getOffsetAt(r),o=e.getLineCount(),a=e.getValueInRange(new c.Q(r.lineNumber,r.column,o,e.getLineMaxColumn(o)),1),l="\r\n"===e.getEOL()?new p(a):null;n.reset(t.column-1);const u=n.next(a);return u?m(this._getMultilineMatchRange(e,s,a,l,u.index,u[0]),u,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new h.y(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s),a=this._findFirstMatchInLine(n,o,s,t.column,i);if(a)return a;for(let l=1;l<=r;l++){const t=(s+l-1)%r,o=e.getLineContent(t+1),a=this._findFirstMatchInLine(n,o,t+1,1,i);if(a)return a}return null}static _findFirstMatchInLine(e,t,n,i,r){e.reset(i-1);const s=e.next(t);return s?m(new c.Q(n,s.index+1,n,s.index+1+s[0].length),s,r):null}static findPreviousMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new C(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,i):this._doFindPreviousMatchLineByLine(e,n,s,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const r=this._doFindMatchesMultiline(e,new c.Q(1,1,t.lineNumber,t.column),n,i,10*d);if(r.length>0)return r[r.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new h.y(s,e.getLineMaxColumn(s)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(n,o,s,i);if(a)return a;for(let l=1;l<=r;l++){const t=(r+s-l-1)%r,o=e.getLineContent(t+1),a=this._findLastMatchInLine(n,o,t+1,i);if(a)return a}return null}static _findLastMatchInLine(e,t,n,i){let r,s=null;e.reset(0);while(r=e.next(t))s=m(new c.Q(n,r.index+1,n,r.index+1+r[0].length),r,i);return s}}function b(e,t,n,i,r){if(0===i)return!0;const s=t.charCodeAt(i-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}function k(e,t,n,i,r){if(i+r===n)return!0;const s=t.charCodeAt(i+r);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i+r-1);if(0!==e.get(n))return!0}return!1}function v(e,t,n,i,r){return b(e,t,n,i,r)&&k(e,t,n,i,r)}class C{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const r=n.index,s=n[0].length;if(r===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){i.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=s,!this._wordSeparators||v(this._wordSeparators,e,t,r,s))return n}while(n);return null}}},215:(e,t,n)=>{"use strict";n.r(t),n.d(t,{KeyMod:()=>me,createMonacoBaseAPI:()=>pe});var i=n(7792),r=n(231);class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new s,a=new s,l=new s,h=new Array(230),c={},u=[],d=Object.create(null),g=Object.create(null),f=[],m=[];for(let _e=0;_e<=193;_e++)f[_e]=-1;for(let _e=0;_e<=132;_e++)m[_e]=-1;var p;function _(e,t){const n=(65535&t)<<16>>>0;return(e|n)>>>0}(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],i=[];for(const r of t){const[e,t,s,p,_,b,k,v,C]=r;if(i[t]||(i[t]=!0,u[t]=s,d[s]=t,g[s.toLowerCase()]=t,e&&(f[t]=p,0!==p&&3!==p&&5!==p&&4!==p&&6!==p&&57!==p&&(m[p]=t))),!n[p]){if(n[p]=!0,!_)throw new Error(`String representation missing for key code ${p} around scan code ${s}`);o.define(p,_),a.define(p,v||_),l.define(p,C||v||_)}b&&(h[b]=p),k&&(c[k]=p)}m[3]=46})(),function(e){function t(e){return o.keyCodeToStr(e)}function n(e){return o.strToKeyCode(e)}function i(e){return a.keyCodeToStr(e)}function r(e){return l.keyCodeToStr(e)}function s(e){return a.strToKeyCode(e)||l.strToKeyCode(e)}function h(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=i,e.toUserSettingsGeneral=r,e.fromUserSettings=s,e.toElectronAccelerator=h}(p||(p={}));var b,k,v,C,L,w,y,S,x,E,N,I,T,A,D,M,R,O,B,F,P,z,V,W,q,H,U,j,$,K,G,Q,Y,X,Z,J,ee,te,ne,ie,re,se,oe,ae,le,he,ce=n(9133),ue=n(6788),de=n(8690),ge=n(8581),fe=n(5350);(function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"})(b||(b={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["Auto"]=2]="Auto"}(k||(k={})),function(e){e[e["None"]=0]="None",e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(v||(v={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(C||(C={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(L||(L={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(w||(w={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(y||(y={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(S||(S={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(x||(x={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(E||(E={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(N||(N={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["ariaRequired"]=5]="ariaRequired",e[e["autoClosingBrackets"]=6]="autoClosingBrackets",e[e["autoClosingComments"]=7]="autoClosingComments",e[e["screenReaderAnnounceInlineSuggestion"]=8]="screenReaderAnnounceInlineSuggestion",e[e["autoClosingDelete"]=9]="autoClosingDelete",e[e["autoClosingOvertype"]=10]="autoClosingOvertype",e[e["autoClosingQuotes"]=11]="autoClosingQuotes",e[e["autoIndent"]=12]="autoIndent",e[e["automaticLayout"]=13]="automaticLayout",e[e["autoSurround"]=14]="autoSurround",e[e["bracketPairColorization"]=15]="bracketPairColorization",e[e["guides"]=16]="guides",e[e["codeLens"]=17]="codeLens",e[e["codeLensFontFamily"]=18]="codeLensFontFamily",e[e["codeLensFontSize"]=19]="codeLensFontSize",e[e["colorDecorators"]=20]="colorDecorators",e[e["colorDecoratorsLimit"]=21]="colorDecoratorsLimit",e[e["columnSelection"]=22]="columnSelection",e[e["comments"]=23]="comments",e[e["contextmenu"]=24]="contextmenu",e[e["copyWithSyntaxHighlighting"]=25]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=26]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=27]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=28]="cursorStyle",e[e["cursorSurroundingLines"]=29]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=30]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=31]="cursorWidth",e[e["disableLayerHinting"]=32]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=33]="disableMonospaceOptimizations",e[e["domReadOnly"]=34]="domReadOnly",e[e["dragAndDrop"]=35]="dragAndDrop",e[e["dropIntoEditor"]=36]="dropIntoEditor",e[e["emptySelectionClipboard"]=37]="emptySelectionClipboard",e[e["experimentalWhitespaceRendering"]=38]="experimentalWhitespaceRendering",e[e["extraEditorClassName"]=39]="extraEditorClassName",e[e["fastScrollSensitivity"]=40]="fastScrollSensitivity",e[e["find"]=41]="find",e[e["fixedOverflowWidgets"]=42]="fixedOverflowWidgets",e[e["folding"]=43]="folding",e[e["foldingStrategy"]=44]="foldingStrategy",e[e["foldingHighlight"]=45]="foldingHighlight",e[e["foldingImportsByDefault"]=46]="foldingImportsByDefault",e[e["foldingMaximumRegions"]=47]="foldingMaximumRegions",e[e["unfoldOnClickAfterEndOfLine"]=48]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=49]="fontFamily",e[e["fontInfo"]=50]="fontInfo",e[e["fontLigatures"]=51]="fontLigatures",e[e["fontSize"]=52]="fontSize",e[e["fontWeight"]=53]="fontWeight",e[e["fontVariations"]=54]="fontVariations",e[e["formatOnPaste"]=55]="formatOnPaste",e[e["formatOnType"]=56]="formatOnType",e[e["glyphMargin"]=57]="glyphMargin",e[e["gotoLocation"]=58]="gotoLocation",e[e["hideCursorInOverviewRuler"]=59]="hideCursorInOverviewRuler",e[e["hover"]=60]="hover",e[e["inDiffEditor"]=61]="inDiffEditor",e[e["inlineSuggest"]=62]="inlineSuggest",e[e["inlineEdit"]=63]="inlineEdit",e[e["letterSpacing"]=64]="letterSpacing",e[e["lightbulb"]=65]="lightbulb",e[e["lineDecorationsWidth"]=66]="lineDecorationsWidth",e[e["lineHeight"]=67]="lineHeight",e[e["lineNumbers"]=68]="lineNumbers",e[e["lineNumbersMinChars"]=69]="lineNumbersMinChars",e[e["linkedEditing"]=70]="linkedEditing",e[e["links"]=71]="links",e[e["matchBrackets"]=72]="matchBrackets",e[e["minimap"]=73]="minimap",e[e["mouseStyle"]=74]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=75]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=76]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=77]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=78]="multiCursorModifier",e[e["multiCursorPaste"]=79]="multiCursorPaste",e[e["multiCursorLimit"]=80]="multiCursorLimit",e[e["occurrencesHighlight"]=81]="occurrencesHighlight",e[e["overviewRulerBorder"]=82]="overviewRulerBorder",e[e["overviewRulerLanes"]=83]="overviewRulerLanes",e[e["padding"]=84]="padding",e[e["pasteAs"]=85]="pasteAs",e[e["parameterHints"]=86]="parameterHints",e[e["peekWidgetDefaultFocus"]=87]="peekWidgetDefaultFocus",e[e["placeholder"]=88]="placeholder",e[e["definitionLinkOpensInPeek"]=89]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=90]="quickSuggestions",e[e["quickSuggestionsDelay"]=91]="quickSuggestionsDelay",e[e["readOnly"]=92]="readOnly",e[e["readOnlyMessage"]=93]="readOnlyMessage",e[e["renameOnType"]=94]="renameOnType",e[e["renderControlCharacters"]=95]="renderControlCharacters",e[e["renderFinalNewline"]=96]="renderFinalNewline",e[e["renderLineHighlight"]=97]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=98]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=99]="renderValidationDecorations",e[e["renderWhitespace"]=100]="renderWhitespace",e[e["revealHorizontalRightPadding"]=101]="revealHorizontalRightPadding",e[e["roundedSelection"]=102]="roundedSelection",e[e["rulers"]=103]="rulers",e[e["scrollbar"]=104]="scrollbar",e[e["scrollBeyondLastColumn"]=105]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=106]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=107]="scrollPredominantAxis",e[e["selectionClipboard"]=108]="selectionClipboard",e[e["selectionHighlight"]=109]="selectionHighlight",e[e["selectOnLineNumbers"]=110]="selectOnLineNumbers",e[e["showFoldingControls"]=111]="showFoldingControls",e[e["showUnused"]=112]="showUnused",e[e["snippetSuggestions"]=113]="snippetSuggestions",e[e["smartSelect"]=114]="smartSelect",e[e["smoothScrolling"]=115]="smoothScrolling",e[e["stickyScroll"]=116]="stickyScroll",e[e["stickyTabStops"]=117]="stickyTabStops",e[e["stopRenderingLineAfter"]=118]="stopRenderingLineAfter",e[e["suggest"]=119]="suggest",e[e["suggestFontSize"]=120]="suggestFontSize",e[e["suggestLineHeight"]=121]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=122]="suggestOnTriggerCharacters",e[e["suggestSelection"]=123]="suggestSelection",e[e["tabCompletion"]=124]="tabCompletion",e[e["tabIndex"]=125]="tabIndex",e[e["unicodeHighlighting"]=126]="unicodeHighlighting",e[e["unusualLineTerminators"]=127]="unusualLineTerminators",e[e["useShadowDOM"]=128]="useShadowDOM",e[e["useTabStops"]=129]="useTabStops",e[e["wordBreak"]=130]="wordBreak",e[e["wordSegmenterLocales"]=131]="wordSegmenterLocales",e[e["wordSeparators"]=132]="wordSeparators",e[e["wordWrap"]=133]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=134]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=135]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=136]="wordWrapColumn",e[e["wordWrapOverride1"]=137]="wordWrapOverride1",e[e["wordWrapOverride2"]=138]="wordWrapOverride2",e[e["wrappingIndent"]=139]="wrappingIndent",e[e["wrappingStrategy"]=140]="wrappingStrategy",e[e["showDeprecated"]=141]="showDeprecated",e[e["inlayHints"]=142]="inlayHints",e[e["editorClassName"]=143]="editorClassName",e[e["pixelRatio"]=144]="pixelRatio",e[e["tabFocusMode"]=145]="tabFocusMode",e[e["layoutInfo"]=146]="layoutInfo",e[e["wrappingInfo"]=147]="wrappingInfo",e[e["defaultColorDecorators"]=148]="defaultColorDecorators",e[e["colorDecoratorsActivatedOn"]=149]="colorDecoratorsActivatedOn",e[e["inlineCompletionsAccessibilityVerbose"]=150]="inlineCompletionsAccessibilityVerbose"}(I||(I={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(T||(T={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(A||(A={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(D||(D={})),function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"}(M||(M={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(R||(R={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(O||(O={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(B||(B={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(F||(F={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(P||(P={})),function(e){e[e["DependsOnKbLayout"]=-1]="DependsOnKbLayout",e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["Digit0"]=21]="Digit0",e[e["Digit1"]=22]="Digit1",e[e["Digit2"]=23]="Digit2",e[e["Digit3"]=24]="Digit3",e[e["Digit4"]=25]="Digit4",e[e["Digit5"]=26]="Digit5",e[e["Digit6"]=27]="Digit6",e[e["Digit7"]=28]="Digit7",e[e["Digit8"]=29]="Digit8",e[e["Digit9"]=30]="Digit9",e[e["KeyA"]=31]="KeyA",e[e["KeyB"]=32]="KeyB",e[e["KeyC"]=33]="KeyC",e[e["KeyD"]=34]="KeyD",e[e["KeyE"]=35]="KeyE",e[e["KeyF"]=36]="KeyF",e[e["KeyG"]=37]="KeyG",e[e["KeyH"]=38]="KeyH",e[e["KeyI"]=39]="KeyI",e[e["KeyJ"]=40]="KeyJ",e[e["KeyK"]=41]="KeyK",e[e["KeyL"]=42]="KeyL",e[e["KeyM"]=43]="KeyM",e[e["KeyN"]=44]="KeyN",e[e["KeyO"]=45]="KeyO",e[e["KeyP"]=46]="KeyP",e[e["KeyQ"]=47]="KeyQ",e[e["KeyR"]=48]="KeyR",e[e["KeyS"]=49]="KeyS",e[e["KeyT"]=50]="KeyT",e[e["KeyU"]=51]="KeyU",e[e["KeyV"]=52]="KeyV",e[e["KeyW"]=53]="KeyW",e[e["KeyX"]=54]="KeyX",e[e["KeyY"]=55]="KeyY",e[e["KeyZ"]=56]="KeyZ",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["F20"]=78]="F20",e[e["F21"]=79]="F21",e[e["F22"]=80]="F22",e[e["F23"]=81]="F23",e[e["F24"]=82]="F24",e[e["NumLock"]=83]="NumLock",e[e["ScrollLock"]=84]="ScrollLock",e[e["Semicolon"]=85]="Semicolon",e[e["Equal"]=86]="Equal",e[e["Comma"]=87]="Comma",e[e["Minus"]=88]="Minus",e[e["Period"]=89]="Period",e[e["Slash"]=90]="Slash",e[e["Backquote"]=91]="Backquote",e[e["BracketLeft"]=92]="BracketLeft",e[e["Backslash"]=93]="Backslash",e[e["BracketRight"]=94]="BracketRight",e[e["Quote"]=95]="Quote",e[e["OEM_8"]=96]="OEM_8",e[e["IntlBackslash"]=97]="IntlBackslash",e[e["Numpad0"]=98]="Numpad0",e[e["Numpad1"]=99]="Numpad1",e[e["Numpad2"]=100]="Numpad2",e[e["Numpad3"]=101]="Numpad3",e[e["Numpad4"]=102]="Numpad4",e[e["Numpad5"]=103]="Numpad5",e[e["Numpad6"]=104]="Numpad6",e[e["Numpad7"]=105]="Numpad7",e[e["Numpad8"]=106]="Numpad8",e[e["Numpad9"]=107]="Numpad9",e[e["NumpadMultiply"]=108]="NumpadMultiply",e[e["NumpadAdd"]=109]="NumpadAdd",e[e["NUMPAD_SEPARATOR"]=110]="NUMPAD_SEPARATOR",e[e["NumpadSubtract"]=111]="NumpadSubtract",e[e["NumpadDecimal"]=112]="NumpadDecimal",e[e["NumpadDivide"]=113]="NumpadDivide",e[e["KEY_IN_COMPOSITION"]=114]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=115]="ABNT_C1",e[e["ABNT_C2"]=116]="ABNT_C2",e[e["AudioVolumeMute"]=117]="AudioVolumeMute",e[e["AudioVolumeUp"]=118]="AudioVolumeUp",e[e["AudioVolumeDown"]=119]="AudioVolumeDown",e[e["BrowserSearch"]=120]="BrowserSearch",e[e["BrowserHome"]=121]="BrowserHome",e[e["BrowserBack"]=122]="BrowserBack",e[e["BrowserForward"]=123]="BrowserForward",e[e["MediaTrackNext"]=124]="MediaTrackNext",e[e["MediaTrackPrevious"]=125]="MediaTrackPrevious",e[e["MediaStop"]=126]="MediaStop",e[e["MediaPlayPause"]=127]="MediaPlayPause",e[e["LaunchMediaPlayer"]=128]="LaunchMediaPlayer",e[e["LaunchMail"]=129]="LaunchMail",e[e["LaunchApp2"]=130]="LaunchApp2",e[e["Clear"]=131]="Clear",e[e["MAX_VALUE"]=132]="MAX_VALUE"}(z||(z={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(V||(V={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(W||(W={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(q||(q={})),function(e){e[e["Normal"]=1]="Normal",e[e["Underlined"]=2]="Underlined"}(H||(H={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(U||(U={})),function(e){e[e["AIGenerated"]=1]="AIGenerated"}(j||(j={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}($||($={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(K||(K={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(G||(G={})),function(e){e[e["Word"]=0]="Word",e[e["Line"]=1]="Line",e[e["Suggest"]=2]="Suggest"}(Q||(Q={})),function(e){e[e["Left"]=0]="Left",e[e["Right"]=1]="Right",e[e["None"]=2]="None",e[e["LeftOfInjectedText"]=3]="LeftOfInjectedText",e[e["RightOfInjectedText"]=4]="RightOfInjectedText"}(Y||(Y={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(X||(X={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(Z||(Z={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(J||(J={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(ee||(ee={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(te||(te={})),function(e){e["Off"]="off",e["OnCode"]="onCode",e["On"]="on"}(ne||(ne={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(ie||(ie={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(re||(re={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(se||(se={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(oe||(oe={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(ae||(ae={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(le||(le={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(he||(he={}));class me{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return _(e,t)}}function pe(){return{editor:void 0,languages:void 0,CancellationTokenSource:i.Qi,Emitter:r.vl,KeyCode:z,KeyMod:me,Position:ue.y,Range:de.Q,Selection:ge.L,SelectionDirection:te,MarkerSeverity:V,MarkerTag:W,Uri:ce.r,Token:fe.ou}}},5926:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseEditorSimpleWorker:()=>it,EditorSimpleWorker:()=>rt,create:()=>st});class i{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var r=n(5647);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class c{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,s]=c._getElements(e),[o,a,l]=c._getElements(t);this._hasStrings=s&&l,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(c._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n=e&&r>=n&&this.ElementsAreEqual(t,r))t--,r--;if(e>t||n>r){let s;return n<=r?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,r-n+1)]):e<=t?(a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],l=[0],h=this.ComputeRecursionPoint(e,t,n,r,o,l,s),c=o[0],u=l[0];if(null!==h)return h;if(!s[0]){const o=this.ComputeDiffRecursive(e,c,n,u,s);let a=[];return a=s[0]?[new i(c+1,t-(c+1)+1,u+1,r-(u+1)+1)]:this.ComputeDiffRecursive(c+1,t,u+1,r,s),this.ConcatenateChanges(o,a)}return[new i(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,s,o,a,l,c,u,d,g,f,m,p,_,b,k){let v=null,C=null,L=new h,w=t,y=n,S=f[0]-_[0]-r,x=-1073741824,E=this.m_forwardHistory.length-1;do{const t=S+e;t===w||t=0&&(c=this.m_forwardHistory[E],e=c[0],w=1,y=c.length-1)}while(--E>=-1);if(v=L.getReverseChanges(),k[0]){let e=f[0]+1,t=_[0]+1;if(null!==v&&v.length>0){const n=v[v.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}C=[new i(e,g-e+1,t,p-t+1)]}else{L=new h,w=o,y=a,S=f[0]-_[0]-l,x=1073741824,E=b?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+s;e===w||e=u[e+1]?(d=u[e+1]-1,m=d-S-l,d>x&&L.MarkNextChange(),x=d+1,L.AddOriginalElement(d+1,m+1),S=e+1-s):(d=u[e-1],m=d-S-l,d>x&&L.MarkNextChange(),x=d,L.AddModifiedElement(d+1,m+1),S=e-1-s),E>=0&&(u=this.m_reverseHistory[E],s=u[0],w=1,y=u.length-1)}while(--E>=-1);C=L.getChanges()}return this.ConcatenateChanges(v,C)}ComputeRecursionPoint(e,t,n,r,s,o,a){let h=0,c=0,u=0,d=0,g=0,f=0;e--,n--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(r-n),p=m+1,_=new Int32Array(p),b=new Int32Array(p),k=r-n,v=t-e,C=e-n,L=t-r,w=v-k,y=w%2===0;_[k]=e,b[v]=t,a[0]=!1;for(let S=1;S<=m/2+1;S++){let m=0,w=0;u=this.ClipDiagonalBound(k-S,S,k,p),d=this.ClipDiagonalBound(k+S,S,k,p);for(let e=u;e<=d;e+=2){h=e===u||em+w&&(m=h,w=c),!y&&Math.abs(e-v)<=S-1&&h>=b[e])return s[0]=h,o[0]=c,n<=b[e]&&S<=1448?this.WALKTRACE(k,u,d,C,v,g,f,L,_,b,h,t,s,c,r,o,y,a):null}const x=(m-e+(w-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,x))return a[0]=!0,s[0]=m,o[0]=w,x>0&&S<=1448?this.WALKTRACE(k,u,d,C,v,g,f,L,_,b,h,t,s,c,r,o,y,a):(e++,n++,[new i(e,t-e+1,n,r-n+1)]);g=this.ClipDiagonalBound(v-S,S,v,p),f=this.ClipDiagonalBound(v+S,S,v,p);for(let i=g;i<=f;i+=2){h=i===g||i=b[i+1]?b[i+1]-1:b[i-1],c=h-(i-v)-L;const l=h;while(h>e&&c>n&&this.ElementsAreEqual(h,c))h--,c--;if(b[i]=h,y&&Math.abs(i-k)<=S&&h<=_[i])return s[0]=h,o[0]=c,l>=_[i]&&S<=1448?this.WALKTRACE(k,u,d,C,v,g,f,L,_,b,h,t,s,c,r,o,y,a):null}if(S<=1447){let e=new Int32Array(d-u+2);e[0]=k-u+1,l.Copy2(_,u,e,1,d-u+1),this.m_forwardHistory.push(e),e=new Int32Array(f-g+2),e[0]=v-g+1,l.Copy2(b,g,e,1,f-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(k,u,d,C,v,g,f,L,_,b,h,t,s,c,r,o,y,a)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;while(n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,r=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,r=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,h=n.modifiedStart-e;if(tl&&(l=u,a=e)}n.originalStart-=a,n.modifiedStart-=a;const h=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],h)&&(e[t-1]=h[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&t>a&&(a=t,l=c,h=e)}return a>0?[l,h]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){const r=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,i)?1:0;return r+s}ConcatenateChanges(e,t){const n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return l.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],l.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return l.Copy(e,0,n,0,e.length),l.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(r,s,o,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&et&&(t=s),i>n&&(n=i),o>n&&(n=o)}t++,n++;const i=new g(n,t,0);for(let r=0,s=e.length;r=this._maxCharCode?0:this._states.get(e,t)}}let m=null;function p(){return null===m&&(m=new f([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),m}let _=null;function b(){if(null===_){_=new d.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let n=0;ni);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:s+2},url:t.substring(i,s+1)}}static computeLinks(e,t=p()){const n=b(),i=[];for(let r=1,s=e.getLineCount();r<=s;r++){const s=e.getLineContent(r),o=s.length;let a=0,l=0,h=0,c=1,u=!1,d=!1,g=!1,f=!1;while(a=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}var L=n(215),w=n(2899),y=n(4240),S=n(7412);class x{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class E{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}var N=n(4396),I=n(4544),T=n(6788),A=n(9109),D=n(371);n(3904);class M{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}class R{static inverse(e,t,n){const i=[];let r=1,s=1;for(const a of e){const e=new R(new I.M(r,a.original.startLineNumber),new I.M(s,a.modified.startLineNumber));e.modified.isEmpty||i.push(e),r=a.original.endLineNumberExclusive,s=a.modified.endLineNumberExclusive}const o=new R(new I.M(r,t+1),new I.M(s,n+1));return o.modified.isEmpty||i.push(o),i}static clip(e,t,n){const i=[];for(const r of e){const e=r.original.intersect(t),s=r.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&i.push(new R(e,s))}return i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new R(this.modified,this.original)}join(e){return new R(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new P(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new N.D7("not a valid diff");return new P(new u.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new u.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new P(new u.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new u.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(B(this.original.endLineNumberExclusive,e)&&B(this.modified.endLineNumberExclusive,t))return new P(new u.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new u.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new P(u.Q.fromPositions(new T.y(this.original.startLineNumber,1),O(new T.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),u.Q.fromPositions(new T.y(this.modified.startLineNumber,1),O(new T.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new P(u.Q.fromPositions(O(new T.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),O(new T.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),u.Q.fromPositions(O(new T.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),O(new T.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new N.D7}}function O(e,t){if(e.lineNumber<1)return new T.y(1,1);if(e.lineNumber>t.length)return new T.y(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new T.y(e.lineNumber,n.length+1):e}function B(e,t){return e>=1&&e<=t.length}class F extends R{static fromRangeMappings(e){const t=I.M.join(e.map((e=>I.M.fromRangeInclusive(e.originalRange)))),n=I.M.join(e.map((e=>I.M.fromRangeInclusive(e.modifiedRange))));return new F(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new F(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new F(this.original,this.modified,[this.toRangeMapping()])}}class P{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new P(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new M(this.originalRange,t)}}var z=n(601);const V=3;class W{computeDiff(e,t,n){const i=new G(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}),r=i.computeDiff(),s=[];let o=null;for(const a of r.changes){let e,t;e=0===a.originalEndLineNumber?new I.M(a.originalStartLineNumber+1,a.originalStartLineNumber+1):new I.M(a.originalStartLineNumber,a.originalEndLineNumber+1),t=0===a.modifiedEndLineNumber?new I.M(a.modifiedStartLineNumber+1,a.modifiedStartLineNumber+1):new I.M(a.modifiedStartLineNumber,a.modifiedEndLineNumber+1);let n=new F(e,t,a.charChanges?.map((e=>new P(new u.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new u.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));o&&(o.modified.endLineNumberExclusive!==n.modified.startLineNumber&&o.original.endLineNumberExclusive!==n.original.startLineNumber||(n=new F(o.original.join(n.original),o.modified.join(n.modified),o.innerChanges&&n.innerChanges?o.innerChanges.concat(n.innerChanges):void 0),s.pop())),s.push(n),o=n}return(0,A.Ft)((()=>(0,A.Xo)(s,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class j{constructor(e,t,n,i,r,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const i=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),h=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),c=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new j(i,r,s,o,a,l,h,c)}}function $(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,r=e.length;i0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=q(s,a,r,!0).changes;o&&(e=$(e)),u=[];for(let t=0,n=e.length;t1&&o>1){const i=e.charCodeAt(n-2),r=t.charCodeAt(o-2);if(i!==r)break;n--,o--}(n>1||o>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,n,s+1,1,o)}{let n=Y(e,1),o=Y(t,1);const a=e.length+1,l=t.length+1;while(n!0;const t=Date.now();return()=>Date.now()-t{n.push(ee.fromOffsetPairs(e?e.getEndExclusives():te.zero,i?i.getStarts():new te(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),n}static fromOffsetPairs(e,t){return new ee(new D.L(e.offset1,t.offset1),new D.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new N.D7("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new ee(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new ee(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new ee(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new ee(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new ee(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(t&&n)return new ee(t,n)}getStarts(){return new te(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new te(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class te{static{this.zero=new te(0,0)}static{this.max=new te(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new te(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class ne{static{this.instance=new ne}isValid(){return!0}}class ie{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new N.D7("timeout must be positive")}isValid(){const e=Date.now()-this.startTime0&&a>0&&3===s.get(g-1,a-1)&&(c+=o.get(g-1,a-1)),c+=i?i(g,a):1):c=-1;const u=Math.max(l,h,c);if(u===c){const e=g>0&&a>0?o.get(g-1,a-1):0;o.set(g,a,e+1),s.set(g,a,3)}else u===l?(o.set(g,a,0),s.set(g,a,1)):u===h&&(o.set(g,a,0),s.set(g,a,2));r.set(g,a,u)}const a=[];let l=e.length,h=t.length;function c(e,t){e+1===l&&t+1===h||a.push(new ee(new D.L(e+1,l),new D.L(t+1,h))),l=e,h=t}let u=e.length-1,d=t.length-1;while(u>=0&&d>=0)3===s.get(u,d)?(c(u,d),u--,d--):1===s.get(u,d)?u--:d--;return c(-1,-1),a.reverse(),new J(a,!1)}}class le{compute(e,t,n=ne.instance){if(0===e.length||0===t.length)return J.trivial(e,t);const i=e,r=t;function s(e,t){while(ei.length||d>r.length)continue;const g=s(u,d);a.set(h,g);const f=u===o?l.get(h+1):l.get(h-1);if(l.set(h,g!==u?new he(f,u,d,g-u):f),a.get(h)===i.length&&a.get(h)-h===r.length)break e}}let c=l.get(h);const u=[];let d=i.length,g=r.length;while(1){const e=c?c.x+c.length:0,t=c?c.y+c.length:0;if(e===d&&t===g||u.push(new ee(new D.L(e,d),new D.L(t,g))),!c)break;d=c.x,g=c.y,c=c.prev}return u.reverse(),new J(u,!1)}}class he{constructor(e,t,n,i){this.prev=e,this.x=t,this.y=n,this.length=i}}class ce{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class ue{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var de=n(3654),ge=n(1553);class fe{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let t=e[i-1],r=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(r=this.range.startColumn-1,t=t.substring(r)),this.lineStartOffsets.push(r);let s=0;if(!n){const e=t.trimStart();s=t.length-e.length,t=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-r-s,t.length):t.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=be(e>0?this.elements[e-1]:-1),n=be(et<=e)),i=e-this.firstElementOffsetByLineIdx[n];return new T.y(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+i+(0===i&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?u.Q.fromPositions(n,n):u.Q.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!me(this.elements[e]))return;let t=e;while(t>0&&me(this.elements[t-1]))t--;let n=e;while(nt<=e.start))??0,n=(0,de.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new D.L(t,n)}}function me(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const pe={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:30,[6]:3,[7]:10,[8]:10};function _e(e){return pe[e]}function be(e){return 10===e?8:13===e?7:se(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function ke(e,t,n,i,r,s){let{moves:o,excludedChanges:a}=Ce(e,t,n,s);if(!s.isValid())return[];const l=e.filter((e=>!a.has(e))),h=Le(l,i,r,t,n,s);return(0,Z.E4)(o,h),o=ye(o),o=o.filter((e=>{const n=e.original.toOffsetRange().slice(t).map((e=>e.trim())),i=n.join("\n");return i.length>=15&&ve(n,(e=>e.length>=2))>=2})),o=Se(e,o),o}function ve(e,t){let n=0;for(const i of e)t(i)&&n++;return n}function Ce(e,t,n,i){const r=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new oe(e.original,t,e))),o=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new oe(e.modified,n,e)))),a=new Set;for(const l of s){let e,t=-1;for(const n of o){const i=l.computeSimilarity(n);i>t&&(t=i,e=n)}if(t>.9&&e&&(o.delete(e),r.push(new R(l.range,e.range)),a.add(l.source),a.add(e.source)),!i.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}function Le(e,t,n,i,r,s){const o=[],a=new ge.db;for(const d of e)for(let e=d.original.startLineNumber;ee.modified.startLineNumber),Z.U9));for(const d of e){let e=[];for(let t=d.modified.startLineNumber;t{for(const i of e)if(i.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&i.modifiedLineRange.endLineNumberExclusive+1===r.endLineNumberExclusive)return i.originalLineRange=new I.M(i.originalLineRange.startLineNumber,t.endLineNumberExclusive),i.modifiedLineRange=new I.M(i.modifiedLineRange.startLineNumber,r.endLineNumberExclusive),void s.push(i);const n={modifiedLineRange:r,originalLineRange:t};l.push(n),s.push(n)})),e=s}if(!s.isValid())return[]}l.sort((0,Z.Hw)((0,Z.VE)((e=>e.modifiedLineRange.length),Z.U9)));const h=new I.S,c=new I.S;for(const d of l){const e=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,t=h.subtractFrom(d.modifiedLineRange),n=c.subtractFrom(d.originalLineRange).getWithDelta(e),i=t.getIntersection(n);for(const r of i.ranges){if(r.length<3)continue;const t=r,n=r.delta(-e);o.push(new R(n,t)),h.addRange(t),c.addRange(n)}}o.sort((0,Z.VE)((e=>e.original.startLineNumber),Z.U9));const u=new de.vJ(e);for(let d=0;de.original.startLineNumber<=t.original.startLineNumber)),a=(0,de.lx)(e,(e=>e.modified.startLineNumber<=t.modified.startLineNumber)),l=Math.max(t.original.startLineNumber-n.original.startLineNumber,t.modified.startLineNumber-a.modified.startLineNumber),g=u.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumberi.length||n>r.length)break;if(h.contains(n)||c.contains(e))break;if(!we(i[e-1],r[n-1],s))break}for(p>0&&(c.addRange(new I.M(t.original.startLineNumber-p,t.original.startLineNumber)),h.addRange(new I.M(t.modified.startLineNumber-p,t.modified.startLineNumber))),_=0;_i.length||n>r.length)break;if(h.contains(n)||c.contains(e))break;if(!we(i[e-1],r[n-1],s))break}_>0&&(c.addRange(new I.M(t.original.endLineNumberExclusive,t.original.endLineNumberExclusive+_)),h.addRange(new I.M(t.modified.endLineNumberExclusive,t.modified.endLineNumberExclusive+_))),(p>0||_>0)&&(o[d]=new R(new I.M(t.original.startLineNumber-p,t.original.endLineNumberExclusive+_),new I.M(t.modified.startLineNumber-p,t.modified.endLineNumberExclusive+_)))}return o}function we(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new le,r=i.compute(new fe([e],new u.Q(1,1,1,e.length),!1),new fe([t],new u.Q(1,1,1,t.length),!1),n);let s=0;const o=ee.invert(r.diffs,e.length);for(const c of o)c.seq1Range.forEach((t=>{se(e.charCodeAt(t))||s++}));function a(t){let n=0;for(let i=0;it.length?e:t),h=s/l>.6&&l>10;return h}function ye(e){if(0===e.length)return e;e.sort((0,Z.VE)((e=>e.original.startLineNumber),Z.U9));const t=[e[0]];for(let n=1;n=0&&o>=0;a&&s+o<=2?t[t.length-1]=i.join(r):t.push(r)}return t}function Se(e,t){const n=new de.vJ(e);return t=t.filter((t=>{const i=n.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber0&&(o=o.delta(a))}r.push(o)}return i.length>0&&r.push(i[i.length-1]),r}function Ne(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let i=0;i0?n[i-1]:void 0,s=n[i],o=i+1=i.start&&e.seq2Range.start-o>=r.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&oh&&(h=o,l=c)}return e.delta(l)}function Te(e,t,n){const i=[];for(const r of n){const e=i[i.length-1];e?r.seq1Range.start-e.seq1Range.endExclusive<=2||r.seq2Range.start-e.seq2Range.endExclusive<=2?i[i.length-1]=new ee(e.seq1Range.join(r.seq1Range),e.seq2Range.join(r.seq2Range)):i.push(r):i.push(r)}return i}function Ae(e,t,n){const i=ee.invert(n,e.length),r=[];let s=new te(0,0);function o(n,o){if(n.offset10){const n=i[0],r=n.seq1Range.intersects(h.seq1Range)||n.seq2Range.intersects(h.seq2Range);if(!r)break;const s=e.findWordContaining(n.seq1Range.start),o=t.findWordContaining(n.seq2Range.start),a=new ee(s,o),l=a.intersect(n);if(u+=l.seq1Range.length,d+=l.seq2Range.length,h=h.join(a),!(h.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;i.shift()}u+d<2*(h.seq1Range.length+h.seq2Range.length)/3&&r.push(h),s=h.getEndExclusives()}while(i.length>0){const e=i.shift();e.seq1Range.isEmpty||(o(e.getStarts(),e),o(e.getEndExclusives().delta(-1),e))}const a=De(n,r);return a}function De(e,t){const n=[];while(e.length>0||t.length>0){const i=e[0],r=t[0];let s;s=i&&(!r||i.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Me(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const o=[i[0]];for(let a=1;a5||n.seq1Range.length+n.seq2Range.length>5)}const u=c(h,l);u?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}i=o}while(s++<10&&r);return i}function Re(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const a=[i[0]];for(let l=1;l5||r.length>500)return!1;const o=e.getText(r).trim();if(o.length>20||o.split(/\r\n|\r|\n/).length>1)return!1;const a=e.countLinesIn(n.seq1Range),l=n.seq1Range.length,u=t.countLinesIn(n.seq2Range),d=n.seq2Range.length,g=e.countLinesIn(i.seq1Range),f=i.seq1Range.length,m=t.countLinesIn(i.seq2Range),p=i.seq2Range.length,_=130;function b(e){return Math.min(e,_)}return Math.pow(Math.pow(b(40*a+l),1.5)+Math.pow(b(40*u+d),1.5),1.5)+Math.pow(Math.pow(b(40*g+f),1.5)+Math.pow(b(40*m+p),1.5),1.5)>(_**1.5)**1.5*1.3}const d=u(c,h);d?(r=!0,a[a.length-1]=a[a.length-1].join(h)):a.push(h)}i=a}while(s++<10&&r);const o=[];return(0,Z.kj)(i,((t,n,i)=>{let r=n;function s(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}const a=e.extendToFullLines(n.seq1Range),l=e.getText(new D.L(a.start,n.seq1Range.start));s(l)&&(r=r.deltaStart(-l.length));const h=e.getText(new D.L(n.seq1Range.endExclusive,a.endExclusive));s(h)&&(r=r.deltaEnd(h.length));const c=ee.fromOffsetPairs(t?t.getEndExclusives():te.zero,i?i.getStarts():te.max),u=r.intersect(c);o.length>0&&u.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(u):o.push(u)})),o}class Oe{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=0===e?0:Be(this.lines[e-1]),n=e===this.lines.length?0:Be(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function Be(e){let t=0;while(te===t)))return new x([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new x([new F(new I.M(1,e.length+1),new I.M(1,t.length+1),[new P(new u.Q(1,1,e.length,e[e.length-1].length+1),new u.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const i=0===n.maxComputationTimeMs?ne.instance:new ie(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,s=new Map;function o(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map((e=>o(e.trim()))),l=t.map((e=>o(e.trim()))),h=new Oe(a,e),c=new Oe(l,t),d=(()=>h.length+c.length<1700?this.dynamicProgrammingDiffing.compute(h,c,i,((n,i)=>e[n]===t[i]?0===t[i].length?.1:1+Math.log(1+t[i].length):.99)):this.myersDiffingAlgorithm.compute(h,c,i))();let g=d.diffs,f=d.hitTimeout;g=xe(h,c,g),g=Me(h,c,g);const m=[],p=n=>{if(r)for(let s=0;su.seq1Range.start-_===u.seq2Range.start-b));const n=u.seq1Range.start-_;p(n),_=u.seq1Range.endExclusive,b=u.seq2Range.endExclusive;const s=this.refineDiff(e,t,u,i,r);s.hitTimeout&&(f=!0);for(const e of s.mappings)m.push(e)}p(e.length-_);const k=Pe(m,e,t);let v=[];return n.computeMoves&&(v=this.computeMoves(k,e,t,a,l,i,r)),(0,A.Ft)((()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function i(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const r of k){if(!r.innerChanges)return!1;for(const i of r.innerChanges){const r=n(i.modifiedRange.getStartPosition(),t)&&n(i.modifiedRange.getEndPosition(),t)&&n(i.originalRange.getStartPosition(),e)&&n(i.originalRange.getEndPosition(),e);if(!r)return!1}if(!i(r.modified,t)||!i(r.original,e))return!1}return!0})),new x(k,v,f)}computeMoves(e,t,n,i,r,s,o){const a=ke(e,t,n,i,r,s),l=a.map((e=>{const i=this.refineDiff(t,n,new ee(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o),r=Pe(i.mappings,t,n,!0);return new E(e,r)}));return l}refineDiff(e,t,n,i,r){const s=Ve(n),o=s.toRangeMapping2(e,t),a=new fe(e,o.originalRange,r),l=new fe(t,o.modifiedRange,r),h=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,i):this.myersDiffingAlgorithm.compute(a,l,i),c=!1;let u=h.diffs;c&&ee.assertSorted(u),u=xe(a,l,u),c&&ee.assertSorted(u),u=Ae(a,l,u),c&&ee.assertSorted(u),u=Te(a,l,u),c&&ee.assertSorted(u),u=Re(a,l,u),c&&ee.assertSorted(u);const d=u.map((e=>new P(a.translateRange(e.seq1Range),l.translateRange(e.seq2Range))));return c&&P.assertSorted(d),{mappings:d,hitTimeout:h.hitTimeout}}}function Pe(e,t,n,i=!1){const r=[];for(const s of(0,Z.n)(e.map((e=>ze(e,t,n))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=s[0],t=s[s.length-1];r.push(new F(e.original.join(t.original),e.modified.join(t.modified),s.map((e=>e.innerChanges[0]))))}return(0,A.Ft)((()=>{if(!i&&r.length>0){if(r[0].modified.startLineNumber!==r[0].original.startLineNumber)return!1;if(n.length-r[r.length-1].modified.endLineNumberExclusive!==t.length-r[r.length-1].original.endLineNumberExclusive)return!1}return(0,A.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+r&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+r&&(i=1);const s=new I.M(e.originalRange.startLineNumber+i,e.originalRange.endLineNumber+1+r),o=new I.M(e.modifiedRange.startLineNumber+i,e.modifiedRange.endLineNumber+1+r);return new F(s,o,[e])}function Ve(e){return new R(new I.M(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new I.M(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}const We={getLegacy:()=>new W,getDefault:()=>new Fe};var qe=n(5603),He=n(6657),Ue=n(5476);function je(e){const t=[];for(const n of e){const e=Number(n);(e||0===e&&""!==n.replace(/\s/g,""))&&t.push(e)}return t}function $e(e,t,n,i){return{red:e/255,blue:n/255,green:t/255,alpha:i}}function Ke(e,t){const n=t.index,i=t[0].length;if(!n)return;const r=e.positionAt(n),s={startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:r.lineNumber,endColumn:r.column+i};return s}function Ge(e,t){if(!e)return;const n=Ue.Q1.Format.CSS.parseHex(t);return n?{range:e,color:$e(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}:void 0}function Qe(e,t,n){if(!e||1!==t.length)return;const i=t[0],r=i.values(),s=je(r);return{range:e,color:$e(s[0],s[1],s[2],n?s[3]:1)}}function Ye(e,t,n){if(!e||1!==t.length)return;const i=t[0],r=i.values(),s=je(r),o=new Ue.Q1(new Ue.hB(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:e,color:$e(o.rgba.r,o.rgba.g,o.rgba.b,o.rgba.a)}}function Xe(e,t){return"string"===typeof e?[...e.matchAll(t)]:e.findMatches(t)}function Ze(e){const t=[],n=/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm,i=Xe(e,n);if(i.length>0)for(const r of i){const n=r.filter((e=>void 0!==e)),i=n[1],s=n[2];if(!s)continue;let o;if("rgb"===i){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;o=Qe(Ke(e,r),Xe(s,t),!1)}else if("rgba"===i){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Qe(Ke(e,r),Xe(s,t),!0)}else if("hsl"===i){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=Ye(Ke(e,r),Xe(s,t),!1)}else if("hsla"===i){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Ye(Ke(e,r),Xe(s,t),!0)}else"#"===i&&(o=Ge(Ke(e,r),i+s));o&&t.push(o)}return t}function Je(e){return e&&"function"===typeof e.getValue&&"function"===typeof e.positionAt?Ze(e):[]}var et=n(6198),tt=n(6294);const nt=!0;class it{constructor(){this._workerTextModelSyncServer=new tt.WorkerTextModelSyncServer}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){const i=this._getModel(e);return i?S.UnicodeTextModelHighlighter.computeUnicodeHighlights(i,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const n=this._getModel(e);return n?(0,et.findSectionHeaders)(n,t):[]}async $computeDiff(e,t,n,i){const r=this._getModel(e),s=this._getModel(t);if(!r||!s)return null;const o=rt.computeDiff(r,s,n,i);return o}static computeDiff(e,t,n,i){const r="advanced"===i?We.getDefault():We.getLegacy(),s=e.getLinesContent(),o=t.getLinesContent(),a=r.computeDiff(s,o,n),l=!(a.changes.length>0)&&this._modelsAreIdentical(e,t);function h(e){return e.map((e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:l,quitEarly:a.hitTimeout,changes:h(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,h(e.changes)]))}}static _modelsAreIdentical(e,t){const n=e.getLineCount(),i=t.getLineCount();if(n!==i)return!1;for(let r=1;r<=n;r++){const n=e.getLineContent(r),i=t.getLineContent(r);if(n!==i)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){const i=this._getModel(e);if(!i)return t;const r=[];let s;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return u.Q.compareRangesUsingStarts(e.range,t.range);const n=e.range?0:1,i=t.range?0:1;return n-i}));let a=0;for(let o=1;ort._diffLimit){r.push({range:l,text:h});continue}const t=o(e,h,n),a=i.offsetAt(u.Q.lift(l).getStartPosition());for(const n of t){const e=i.positionAt(a+n.originalStart),t=i.positionAt(a+n.originalStart+n.originalLength),s={text:h.substr(n.modifiedStart,n.modifiedLength),range:{startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:t.lineNumber,endColumn:t.column}};i.getValueInRange(s.range)!==s.text&&r.push(s)}}return"number"===typeof s&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?v(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?Je(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,i){const r=new y.W,s=new RegExp(n,i),o=new Set;e:for(const a of e){const e=this._getModel(a);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>rt._suggestionsLimit))break e}return{words:Array.from(o),duration:r.elapsed()}}async $computeWordRanges(e,t,n,i){const r=this._getModel(e);if(!r)return Object.create(null);const s=new RegExp(n,i),o=Object.create(null);for(let a=t.startLineNumber;athis._host.$fhr(e,t),s=(0,qe.kT)(i,r),o={host:s,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve((0,qe.V0)(this._foreignModule))):new Promise(((i,r)=>{const s=e=>{this._foreignModule=e.create(o,t),i((0,qe.V0)(this._foreignModule))};if(nt){const t=He.zl.asBrowserUri(`${e}.js`).toString(!0);n(9204)(`${t}`).then(s).catch(r)}else Promise.resolve().then(function(){var t=[n(7614)(`${e}`)];s.apply(null,t)}.bind(this))["catch"](r.bind(this))}))}$fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}}function st(e){return new rt(w.EditorWorkerHost.getChannel(e),null)}"function"===typeof importScripts&&(globalThis.monaco=(0,L.createMonacoBaseAPI)())},4117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IEditorWorkerService:()=>r});var i=n(7778);const r=(0,i.u1)("editorWorkerService")},2899:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EditorWorkerHost:()=>i});class i{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(i.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(i.CHANNEL_NAME,t)}}},6198:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findSectionHeaders:()=>s});const i=new RegExp("\\bMARK:\\s*(.*)$","d"),r=/^-+|-+$/g;function s(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const i=o(e,t);n=n.concat(i)}if(t.findMarkSectionHeaders){const t=a(e);n=n.concat(t)}return n}function o(e,t){const n=[],i=e.getLineCount();for(let r=1;r<=i;r++){const i=e.getLineContent(r),s=i.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:r,startColumn:s[0].length+1,endLineNumber:r,endColumn:i.length+1};if(e.endColumn>e.startColumn){const t={range:e,...h(i.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}function a(e){const t=[],n=e.getLineCount();for(let i=1;i<=n;i++){const n=e.getLineContent(i);l(n,i,t)}return t}function l(e,t,n){i.lastIndex=0;const r=i.exec(e);if(r){const e=r.indices[1][0]+1,i=r.indices[1][1]+1,s={startLineNumber:t,startColumn:e,endLineNumber:t,endColumn:i};if(s.endColumn>s.startColumn){const e={range:s,...h(r[1]),shouldBeInComments:!0};(e.text||e.hasSeparatorLine)&&n.push(e)}}}function h(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(r,""),{text:e,hasSeparatorLine:t}}},2340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getIconClasses:()=>d});var i,r=n(6657),s=n(4366),o=n(9133),a=n(5764);(function(e){e[e["FILE"]=0]="FILE",e[e["FOLDER"]=1]="FOLDER",e[e["ROOT_FOLDER"]=2]="ROOT_FOLDER"})(i||(i={}));var l,h,c=n(6455);(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeColor=t})(l||(l={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(e){const i=t.exec(e.id);if(!i)return n(c.W.error);const[,r,s]=i,o=["codicon","codicon-"+r];return s&&o.push("codicon-modifier-"+s.substring(1)),o}function i(e){return n(e).join(" ")}function r(e){return"."+n(e).join(".")}function s(e){return e&&"object"===typeof e&&"string"===typeof e.id&&("undefined"===typeof e.color||l.isThemeColor(e.color))}e.asClassNameArray=n,e.asClassName=i,e.asCSSSelector=r,e.isThemeIcon=s;const o=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);function a(e){const t=o.exec(e);if(!t)return;const[,n]=t;return{id:n}}function h(e){return{id:e}}function u(e,t){let n=e.id;const i=n.lastIndexOf("~");return-1!==i&&(n=n.substring(0,i)),t&&(n=`${n}~${t}`),{id:n}}function d(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)}function g(e,t){return e.id===t.id&&e.color?.id===t.color?.id}e.fromString=a,e.fromId=h,e.modify=u,e.getModifier=d,e.isEqual=g}(h||(h={}));const u=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,n,a,l){if(h.isThemeIcon(l))return[`codicon-${l.id}`,"predefined-file-icon"];if(o.r.isUri(l))return[];const c=a===i.ROOT_FOLDER?["rootfolder-icon"]:a===i.FOLDER?["folder-icon"]:["file-icon"];if(n){let o;if(n.scheme===r.ny.data){const e=s.B6.parseMetaData(n);o=e.get(s.B6.META_DATA_LABEL)}else{const e=n.path.match(u);e?(o=f(e[2].toLowerCase()),e[1]&&c.push(`${f(e[1].toLowerCase())}-name-dir-icon`)):o=f(n.authority.toLowerCase())}if(a===i.ROOT_FOLDER)c.push(`${o}-root-name-folder-icon`);else if(a===i.FOLDER)c.push(`${o}-name-folder-icon`);else{if(o){if(c.push(`${o}-name-file-icon`),c.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t{"use strict";n.r(t),n.d(t,{ILanguageFeatureDebounceService:()=>m,LanguageFeatureDebounceService:()=>k});var i=n(5647),r=n(1553);function s(e,t,n){return Math.min(Math.max(e,t),n)}class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class a{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},f=function(e,t){return function(n,i){t(n,i,e)}};const m=(0,l.u1)("ILanguageFeatureDebounceService");var p;(function(e){const t=new WeakMap;let n=0;function i(e){let i=t.get(e);return void 0===i&&(i=++n,t.set(e,i)),i}e.of=i})(p||(p={}));class _{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class b{constructor(e,t,n,i,s,o){this._logService=e,this._name=t,this._registry=n,this._default=i,this._min=s,this._max=o,this._cache=new r.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,i.sN)(p.of(t),e)),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?s(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let i=this._cache.get(n);i||(i=new a(6),this._cache.set(n,i));const r=s(i.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new o;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return s(e,this._min,this._max)}}let k=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){const i=n?.min??50,r=n?.max??i**2,s=n?.key??void 0,o=`${p.of(e)},${i}${s?","+s:""}`;let a=this._data.get(o);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new _(1.5*i)):a=new b(this._logService,t,e,0|this._overallAverage()||1.5*i,i,r),this._data.set(o,a)),a}_overallAverage(){const e=new o;for(const t of this._data.values())e.update(t.default());return e.value}};k=g([f(0,u.rr),f(1,h)],k),(0,c.v)(m,k,1)},2847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ILanguageFeaturesService:()=>r});var i=n(7778);const r=(0,i.u1)("ILanguageFeaturesService")},1369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageFeaturesService:()=>m});var i=n(231),r=n(8894),s=n(9322),o=n(3589),a=n(1643);function l(e,t,n,i,r,s){if(Array.isArray(e)){let o=0;for(const a of e){const e=l(a,t,n,i,r,s);if(10===e)return e;e>o&&(o=e)}return o}if("string"===typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){const{language:l,pattern:h,scheme:c,hasAccessToAllModels:u,notebookType:d}=e;if(!i&&!u)return 0;d&&r&&(t=r);let g=0;if(c)if(c===t.scheme)g=10;else{if("*"!==c)return 0;g=5}if(l)if(l===n)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(d)if(d===s)g=10;else{if("*"!==d||void 0===s)return 0;g=Math.max(g,5)}if(h){let e;if(e="string"===typeof h?h:{...h,base:(0,a.S8)(h.base)},e!==t.fsPath&&!(0,o.YW)(e,t.fsPath))return 0;g=10}return g}return 0}function h(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(h):!!e.exclusive)}class c{constructor(e,t,n,i,r){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=i,this.recursive=r}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class u{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new i.vl,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,r.s)((()=>{if(n){const e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e,t=!1){const n=[];return this._orderedForEach(e,t,(e=>n.push(e.provider))),n}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,!1,(e=>{n&&i===e._score?n.push(e.provider):(i=e._score,n=[e.provider],t.push(n))})),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(const i of this._entries)i._score>0&&n(i)}_updateScores(e,t){const n=this._notebookInfoResolver?.(e.uri),i=n?new c(e.uri,e.getLanguageId(),n.uri,n.type,t):new c(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(i)){this._lastCandidate=i;for(const n of this._entries)if(n._score=l(n.selector,i.uri,i.languageId,(0,s.vd)(e),i.notebookUri,i.notebookType),h(n.selector)&&n._score>0){if(!t){for(const e of this._entries)e._score=0;n._score=1e3;break}n._score=0}this._entries.sort(u._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._timet._time?-1:0}}function d(e){return"string"!==typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var g=n(2847),f=n(4979);class m{constructor(){this.referenceProvider=new u(this._score.bind(this)),this.renameProvider=new u(this._score.bind(this)),this.newSymbolNamesProvider=new u(this._score.bind(this)),this.codeActionProvider=new u(this._score.bind(this)),this.definitionProvider=new u(this._score.bind(this)),this.typeDefinitionProvider=new u(this._score.bind(this)),this.declarationProvider=new u(this._score.bind(this)),this.implementationProvider=new u(this._score.bind(this)),this.documentSymbolProvider=new u(this._score.bind(this)),this.inlayHintsProvider=new u(this._score.bind(this)),this.colorProvider=new u(this._score.bind(this)),this.codeLensProvider=new u(this._score.bind(this)),this.documentFormattingEditProvider=new u(this._score.bind(this)),this.documentRangeFormattingEditProvider=new u(this._score.bind(this)),this.onTypeFormattingEditProvider=new u(this._score.bind(this)),this.signatureHelpProvider=new u(this._score.bind(this)),this.hoverProvider=new u(this._score.bind(this)),this.documentHighlightProvider=new u(this._score.bind(this)),this.multiDocumentHighlightProvider=new u(this._score.bind(this)),this.selectionRangeProvider=new u(this._score.bind(this)),this.foldingRangeProvider=new u(this._score.bind(this)),this.linkProvider=new u(this._score.bind(this)),this.inlineCompletionsProvider=new u(this._score.bind(this)),this.inlineEditProvider=new u(this._score.bind(this)),this.completionProvider=new u(this._score.bind(this)),this.linkedEditingRangeProvider=new u(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new u(this._score.bind(this)),this.documentSemanticTokensProvider=new u(this._score.bind(this)),this.documentDropEditProvider=new u(this._score.bind(this)),this.documentPasteEditProvider=new u(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,f.v)(g.ILanguageFeaturesService,m,1)},2657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageService:()=>ne});var i=n(231),r=n(8894),s=n(7024),o=n(5053),a=n(5350),l=n(5764);const h=(e,t)=>e===t;new WeakMap;class c{constructor(e,t,n){this.owner=e,this.debugNameSource=t,this.referenceFn=n}getDebugName(e){return g(e,this)}}const u=new Map,d=new WeakMap;function g(e,t){const n=d.get(e);if(n)return n;const i=f(e,t);if(i){let t=u.get(i)??0;t++,u.set(i,t);const n=1===t?i:`${i}#${t}`;return d.set(e,n),n}}function f(e,t){const n=d.get(e);if(n)return n;const i=t.owner?b(t.owner)+".":"";let r;const s=t.debugNameSource;if(void 0!==s){if("function"!==typeof s)return i+s;if(r=s(),void 0!==r)return i+r}const o=t.referenceFn;if(void 0!==o&&(r=v(o),void 0!==r))return i+r;if(void 0!==t.owner){const n=m(t.owner,e);if(void 0!==n)return i+n}}function m(e,t){for(const n in e)if(e[n]===t)return n}const p=new Map,_=new WeakMap;function b(e){const t=_.get(e);if(t)return t;const n=k(e);let i=p.get(n)??0;i++,p.set(n,i);const r=1===i?n:`${n}#${i}`;return _.set(e,r),r}function k(e){const t=e.constructor;return t?t.name:"Object"}function v(e){const t=e.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//,i=n.exec(t),r=i?i[1]:void 0;return r?.trim()}let C,L,w,y;function S(e){C=e}function x(){return C}class E{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return N([I(O("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[I(" "),A(D(e.oldValue,70),{color:"red",strikeThrough:!0}),I(" "),A(D(e.newValue,60),{color:"green"})]:[I(" (unchanged)")]:[I(" "),A(D(e.newValue,60),{color:"green"}),I(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([T("observable value changed"),A(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return A(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,i)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,i]))}handleDerivedRecomputed(e,t){const n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([T("derived recomputed"),A(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([T("observable from event triggered"),A(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,i)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,i]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([T("autorun"),A(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([T("transaction"),A(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function N(e){const t=new Array,n=[];let i="";function r(e){if("length"in e)for(const t of e)t&&r(t);else"text"in e?(i+=`%c${e.text}`,t.push(e.style),e.data&&n.push(...e.data)):"data"in e&&n.push(...e.data)}r(e);const s=[i,...t];return s.push(...n),s}function I(e){return A(e,{color:"black"})}function T(e){return A(B(`${e}: `,10),{color:"black",bold:!0})}function A(e,t={color:"black"}){function n(e){return Object.entries(e).reduce(((e,[t,n])=>`${e}${t}:${n};`),"")}const i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:n(i)}}function D(e,t){switch(typeof e){case"number":return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?M(e,t):R(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`;default:return""+e}}function M(e,t){let n="[ ",i=!0;for(const r of e){if(i||(n+=", "),n.length-5>t){n+="...";break}i=!1,n+=`${D(r,t-n.length)}`}return n+=" ]",n}function R(e,t){let n="{ ",i=!0;for(const[r,s]of Object.entries(e)){if(i||(n+=", "),n.length-5>t){n+="...";break}i=!1,n+=`${r}: ${D(s,t-n.length)}`}return n+=" }",n}function O(e,t){let n="";for(let i=1;i<=t;i++)n+=e;return n}function B(e,t){while(e.length{const e=v(i);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/,r=t.exec(i.toString());return r?`${this.debugName}.${r[2]}`:n?void 0:`${this.debugName} (mapped)`},debugReferenceFn:i},(e=>i(this.read(e),e)))}flatten(){return y({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(L(this,t)),this}keepObserved(e){return e.add(w(this)),this}}class W extends V{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){const t=this.observers.delete(e);t&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function q(e,t){const n=new U(e,t);try{e(n)}finally{n.finish()}}function H(e,t,n){e?t(e):q(t,n)}class U{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],x()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():v(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const n of this.observers)n.handlePossibleChange(this);if(t)for(const n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,j.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),i=3===this.state;if(n&&(1===this.state||i)&&(this.state=2,i))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function G(e){return new Q(new c(void 0,void 0,e),e,void 0,void 0)}class Q{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,i){this._debugNameData=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=i,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),x()?.handleAutorunCreated(this),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){x()?.handleAutorunTriggered(this);const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{t||x()?.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,j.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary);n&&(this.state=2)}}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(e){e.Observer=Q})(G||(G={}));function Y(...e){let t,n,i;return 3===e.length?[t,n,i]=e:[n,i]=e,new X(new c(t,void 0,i),n,i,(()=>X.globalTransaction),h)}class X extends W{constructor(e,t,n,i,r){super(),this._debugNameData=e,this.event=t,this._getValue=n,this._getTransaction=i,this._equalityComparator=r,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),n=this.value,i=!this.hasValue||!this._equalityComparator(n,t);let r=!1;i&&(this.value=t,this.hasValue&&(r=!0,H(this._getTransaction(),(e=>{x()?.handleFromEventObservableTriggered(this,{oldValue:n,newValue:t,change:void 0,didChange:i,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),r||x()?.handleFromEventObservableTriggered(this,{oldValue:n,newValue:t,change:void 0,didChange:i,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){if(this.subscription)return this.hasValue||this.handleEvent(void 0),this.value;{const e=this._getValue(void 0);return e}}}(function(e){function t(e,t){let n=!1;void 0===X.globalTransaction&&(X.globalTransaction=e,n=!0);try{t()}finally{n&&(X.globalTransaction=void 0)}}e.Observer=X,e.batchEventsGlobally=t})(Y||(Y={}));function Z(e){const t=new ee(!1,void 0);return e.addObserver(t),(0,r.s)((()=>{e.removeObserver(t)}))}function J(e,t){const n=new ee(!0,t);return e.addObserver(n),t?t(e.get()):e.reportChanges(),(0,r.s)((()=>{e.removeObserver(n)}))}P(Z),F(J);class ee{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}n(4396);const te=!1;te&&S(new E);class ne extends r.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new i.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new i.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new i.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,ne.instanceCount++,this._registry=this._register(new s.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){ne.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,o.Fy)(n,null)}createById(e){return new ie(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new ie(this.onDidChange,(()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class ie{constructor(e,t){this._value=Y(this,e,(()=>t())),this.onDidChange=i.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},5911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clearPlatformLanguageAssociations:()=>p,getLanguageIds:()=>_,registerPlatformLanguageAssociation:()=>g});var i=n(3589),r=n(3911),s=n(6657),o=n(1643),a=n(4366),l=n(601),h=n(5764);let c=[],u=[],d=[];function g(e,t=!1){f(e,!1,t)}function f(e,t,n){const i=m(e,t);c.push(i),i.userConfigured?d.push(i):u.push(i),n&&!i.userConfigured&&c.forEach((e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))}))}function m(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:t,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,i.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(o.SA.sep)>=0}}function p(){c=c.filter((e=>e.userConfigured)),u=[]}function _(e,t){return b(e,t).map((e=>e.id))}function b(e,t){let n;if(e)switch(e.scheme){case s.ny.file:n=e.fsPath;break;case s.ny.data:{const t=a.B6.parseMetaData(e);n=t.get(a.B6.META_DATA_LABEL);break}case s.ny.vscodeNotebookCell:n=void 0;break;default:n=e.path}if(!n)return[{id:"unknown",mime:r.K.unknown}];n=n.toLowerCase();const i=(0,o.P8)(n),l=k(n,i,d);if(l)return[l,{id:h.vH,mime:r.K.text}];const c=k(n,i,u);if(c)return[c,{id:h.vH,mime:r.K.text}];if(t){const e=v(t);if(e)return[e,{id:h.vH,mime:r.K.text}]}return[{id:"unknown",mime:r.K.unknown}]}function k(e,t,n){let i,r,s;for(let o=n.length-1;o>=0;o--){const a=n[o];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!r||a.filepattern.length>r.filepattern.length)){const n=a.filepatternOnPath?e:t;a.filepatternLowercase?.(n)&&(r=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&t.endsWith(a.extensionLowercase)&&(s=a)}return i||(r||(s||void 0))}function v(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=c.length-1;t>=0;t--){const n=c[t];if(!n.firstline)continue;const i=e.match(n.firstline);if(i&&i.length>0)return n}}},7024:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageIdCodec:()=>d,LanguagesRegistry:()=>g});var i=n(231),r=n(8894),s=n(601),o=n(5911),a=n(5764),l=n(7503),h=n(6374);const c=Object.prototype.hasOwnProperty,u="vs.editor.nullLanguage";class d{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(u,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||u}}class g extends r.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new d,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,o.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),h.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;c.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i=`text/x-${n}`,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const s of t.filenames)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filename:s},this._warnOnOverwrite),e.filenames.push(s);if(Array.isArray(t.filenamePatterns))for(const s of t.filenamePatterns)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filepattern:s},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,s.eY)(t)||(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,firstline:t},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,l)}}e.aliases.push(n);let r=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(r=0===t.aliases.length?[null]:t.aliases),null!==r)for(const s of r)s&&0!==s.length&&e.aliases.push(s);const a=null!==r&&r.length>0;if(a&&null===r[0]);else{const t=(a?r[0]:null)||n;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&c.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return c.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&c.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,o.getLanguageIds)(e,t):[]}}},3637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IMarkerDecorationsService:()=>r});var i=n(7778);const r=(0,i.u1)("markerDecorationsService")},9420:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MarkerDecorationsService:()=>y});var i,r=n(601);(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(i||(i={})),function(e){const t="error",n="warning",i="warn",s="info",o="ignore";function a(o){return o?r.Q_(t,o)?e.Error:r.Q_(n,o)||r.Q_(i,o)?e.Warning:r.Q_(s,o)?e.Info:e.Ignore:e.Ignore}function l(i){switch(i){case e.Error:return t;case e.Warning:return n;case e.Info:return s;default:return o}}e.fromValue=a,e.toString=l}(i||(i={}));const s=i;var o,a,l=n(1337),h=n(7778);(function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"})(o||(o={})),function(e){function t(e,t){return t-e}e.compare=t;const n=Object.create(null);function i(e){return n[e]||""}function r(t){switch(t){case s.Error:return e.Error;case s.Warning:return e.Warning;case s.Info:return e.Info;case s.Ignore:return e.Hint}}function o(t){switch(t){case e.Error:return s.Error;case e.Warning:return s.Warning;case e.Info:return s.Info;case e.Hint:return s.Ignore}}n[e.Error]=(0,l.kg)("sev.error","Error"),n[e.Warning]=(0,l.kg)("sev.warning","Warning"),n[e.Info]=(0,l.kg)("sev.info","Info"),e.toString=i,e.fromSeverity=r,e.toSeverity=o}(o||(o={})),function(e){const t="";function n(e){return i(e,!0)}function i(e,n){const i=[t];return e.source?i.push(e.source.replace("¦","\\¦")):i.push(t),e.code?"string"===typeof e.code?i.push(e.code.replace("¦","\\¦")):i.push(e.code.value.replace("¦","\\¦")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(o.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("¦","\\¦")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("¦")}e.makeKey=n,e.makeKeyOptionalMessage=i}(a||(a={}));const c=(0,h.u1)("markerService");var u=n(8894),d=n(9322),g=n(3711),f=n(2764),m=n(9361),p=n(8690),_=n(6657),b=n(231),k=n(7732),v=n(1553);function C(e,t){const n=[],i=[];for(const r of e)t.has(r)||n.push(r);for(const r of t)e.has(r)||i.push(r);return{removed:n,added:i}}var L=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},w=function(e,t){return function(n,i){t(n,i,e)}};let y=class extends u.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new b.vl),this._markerDecorations=new v.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new S(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==_.ny.inMemory&&e.uri.scheme!==_.ny.internal&&e.uri.scheme!==_.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};y=L([w(0,m.IModelService),w(1,c)],y);class S extends u.jG{constructor(e){super(),this.model=e,this._map=new v.cO,this._register((0,u.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:n}=C(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===n.length)return!1;const i=n.map((e=>this._map.get(e))),r=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(i,r);for(const o of n)this._map.delete(o);for(let o=0;o=t)return n;const i=e.getWordAtPosition(n.getStartPosition());i&&(n=new p.Q(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){const i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0}}},9361:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IModelService:()=>r});var i=n(7778);const r=(0,i.u1)("modelService")},2713:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultModelSHA1Computer:()=>cs,ModelService:()=>hs});var i=n(231),r=n(8894),s=n(5160),o=n(5053),a=n(5476),l=n(4396),h=n(601),c=n(9133),u=n(6627);class d{static _nextVisibleColumn(e,t,n){return 9===e?d.nextRenderTabStop(t,n):h.ne(e)||h.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){const i=Math.min(t-1,e.length),r=e.substring(0,i),s=new h.km(r);let o=0;while(!s.eol()){const e=h.Z5(r,i,s.offset);s.nextGraphemeLength(),o=this._nextVisibleColumn(e,o,n)}return o}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const i=e.length,r=new h.km(e);let s=0,o=1;while(!r.eol()){const a=h.Z5(e,i,r.offset);r.nextGraphemeLength();const l=this._nextVisibleColumn(a,s,n),c=r.offset+1;if(l>=t){const e=t-s,n=l-t;return n \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new L(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new L({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new L({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"===typeof e.autoCloseBefore?e.autoCloseBefore:S.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"===typeof e.autoCloseBefore?e.autoCloseBefore:S.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}function x(e){return 0!==(3&e)}var E=n(7885);let N,I,T;function A(){return N||(N=new TextDecoder("UTF-16LE")),N}function D(){return I||(I=new TextDecoder("UTF-16BE")),I}function M(){return T||(T=s.cm()?A():D()),T}function R(e,t,n){const i=new Uint16Array(e.buffer,t,n);return n>0&&(65279===i[0]||65534===i[0])?O(e,t,n):A().decode(i)}function O(e,t,n){const i=[];let r=0;for(let s=0;s[e[0].toLowerCase(),e[1].toLowerCase()]));const n=[];for(let o=0;o{const[n,i]=e,[r,s]=t;return n===r||n===s||i===r||i===s},r=(e,i)=>{const r=Math.min(e,i),s=Math.max(e,i);for(let o=0;o0&&s.push({open:i,close:r})}return s}class P{constructor(e,t){this._richEditBracketsBrand=void 0;const n=F(t);this.brackets=n.map(((t,i)=>new B(e,i,t.open,t.close,q(t.open,t.close,n,i),H(t.open,t.close,n,i)))),this.forwardRegex=U(this.brackets),this.reversedRegex=j(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const i of this.brackets){for(const e of i.open)this.textIsBracket[e]=i,this.textIsOpenBracket[e]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,e.length);for(const e of i.close)this.textIsBracket[e]=i,this.textIsOpenBracket[e]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,e.length)}}}function z(e,t,n,i){for(let r=0,s=t.length;r=0&&i.push(t);for(const t of s.close)t.indexOf(e)>=0&&i.push(t)}}function V(e,t){return e.length-t.length}function W(e){if(e.length<=1)return e;const t=[],n=new Set;for(const i of e)n.has(i)||(t.push(i),n.add(i));return t}function q(e,t,n,i){let r=[];r=r.concat(e),r=r.concat(t);for(let s=0,o=r.length;s=0;i--)t[n++]=e.charCodeAt(i);return M().decode(t)}let t=null,n=null;return function(i){return t!==i&&(t=i,n=e(t)),n}}();class Q{static _findPrevBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=n.length-(r.index||0),o=r[0].length,a=i+s;return new p.Q(t,a-o+1,t,a+1)}static findPrevBracketInRange(e,t,n,i,r){const s=G(n),o=s.substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,o,i)}static findNextBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=r.index||0,o=r[0].length;if(0===o)return null;const a=i+s;return new p.Q(t,a+1,t,a+1+o)}static findNextBracketInRange(e,t,n,i,r){const s=n.substring(i,r);return this.findNextBracketInText(e,t,s,i)}}class Y{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return(0,o.dM)(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const i=t.findTokenIndexAtOffset(n-1);if(x(t.getStandardTokenType(i)))return null;const r=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,o=Q.findPrevBracketInRange(r,1,s,0,s.length);if(!o)return null;const a=s.substring(o.startColumn-1,o.endColumn-1).toLowerCase(),l=this._richEditBrackets.textIsOpenBracket[a];if(l)return null;const h=t.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(h)?{matchOpenBracket:a}:null}}function X(e){return e.global&&(e.lastIndex=0),!0}class Z{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&X(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&X(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&X(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&X(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class J{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=J._createOpenBracketRegExp(e[0]),n=J._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let r=0,s=this._regExpRules.length;r!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))));if(s)return e.action}if(e>=2&&n.length>0&&i.length>0)for(let r=0,s=this._brackets.length;r=2&&n.length>0)for(let r=0,s=this._brackets.length;r{const t=new Set;return{info:new le(this,e,t),closing:t}})),r=new re.VV((e=>{const t=new Set,n=new Set;return{info:new he(this,e,t,n),opening:t,openingColorized:n}}));for(const[o,a]of n){const e=i.get(o),t=r.get(a);e.closing.add(t.info),t.opening.add(e.info)}const s=t.colorizedBracketPairs?oe(t.colorizedBracketPairs):n.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[o,a]of s){const e=i.get(o),t=r.get(a);e.closing.add(t.info),t.openingColorized.add(e.info),t.opening.add(e.info)}this._openingBrackets=new Map([...i.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...r.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return K(t,e)}}function oe(e){return e.filter((([e,t])=>""!==e&&""!==t))}class ae{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class le extends ae{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}}class he extends ae{constructor(e,t,n,i){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(e){return e["config"]===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e["config"]===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var ce=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},ue=function(e,t){return function(n,i){t(n,i,e)}};class de{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const ge=(0,ee.u1)("languageConfigurationService");let fe=class extends r.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new we),this.onDidChangeEmitter=this._register(new i.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(pe));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>n.has(e))),i=e.change.overrides.filter((([e,t])=>t.some((e=>n.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new de(void 0));else for(const n of i)this.languageService.isRegisteredLanguageId(n)&&(this.configurations.delete(n),this.onDidChangeEmitter.fire(new de(n)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new de(e.languageId))})))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=me(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};function me(e,t,n,i){let r=t.getLanguageConfiguration(e);if(!r){if(!i.isRegisteredLanguageId(e))return new ye(e,{});r=new ye(e,{})}const s=_e(r.languageId,n),o=ve([r.underlyingConfig,s]),a=new ye(r.languageId,o);return a}fe=ce([ue(0,te.pG),ue(1,v.L)],fe);const pe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function _e(e,t){const n=t.getValue(pe.brackets,{overrideIdentifier:e}),i=t.getValue(pe.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:be(n),colorizedBracketPairs:be(i)}}function be(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class ke{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new Ce(e,t,++this._order);return this._entries.push(n),this._resolved=null,(0,r.s)((()=>{for(let e=0;ee.configuration))))}}function ve(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const n of e)t={comments:n.comments||t.comments,brackets:n.brackets||t.brackets,wordPattern:n.wordPattern||t.wordPattern,indentationRules:n.indentationRules||t.indentationRules,onEnterRules:n.onEnterRules||t.onEnterRules,autoClosingPairs:n.autoClosingPairs||t.autoClosingPairs,surroundingPairs:n.surroundingPairs||t.surroundingPairs,autoCloseBefore:n.autoCloseBefore||t.autoCloseBefore,folding:n.folding||t.folding,colorizedBracketPairs:n.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:n.__electricCharacterSupport||t.__electricCharacterSupport};return t}class Ce{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class Le{constructor(e){this.languageId=e}}class we extends r.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(ie.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let i=this._entries.get(e);i||(i=new ke(e),this._entries.set(e,i));const s=i.register(t,n);return this._onDidChange.fire(new Le(e)),(0,r.s)((()=>{s.dispose(),this._onDidChange.fire(new Le(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class ye{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new J(this.underlyingConfig):null,this.comments=ye._handleComments(this.underlyingConfig),this.characterPair=new S(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||C.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new Z(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new se(e,this.underlyingConfig)}getWordDefinition(){return(0,C.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new P(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Y(this.brackets)),this._electricCharacter}onEnter(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null}getAutoClosingPairs(){return new w(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){const[e,i]=t.blockComment;n.blockCommentStartToken=e,n.blockCommentEndToken=i}return n}}(0,ne.v)(ge,fe,1);var Se=n(9322);class xe{constructor(e,t,n,i){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=i}}class Ee{constructor(e,t,n,i,r,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=i,this.nestingLevelOfEqualBracketType=r,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class Ne extends Ee{constructor(e,t,n,i,r,s,o){super(e,t,n,i,r,s),this.minVisibleColumnIndentation=o}}var Ie=n(3904);function Te(e,t,n,i){return e!==n?Re(n-e,i):Re(0,i-t)}const Ae=0;function De(e){return 0===e}const Me=2**26;function Re(e,t){return e*Me+t}function Oe(e){const t=e,n=Math.floor(t/Me),i=t-n*Me;return new Ie.W(n,i)}function Be(e){return Math.floor(e/Me)}function Fe(e){return e}function Pe(e,t){let n=e+t;return t>=Me&&(n-=e%Me),n}function ze(e,t){return e.reduce(((e,n)=>Pe(e,t(n))),Ae)}function Ve(e,t){return e===t}function We(e,t){const n=e,i=t,r=i-n;if(r<=0)return Ae;const s=Math.floor(n/Me),o=Math.floor(i/Me),a=i-o*Me;if(s===o){const e=n-s*Me;return Re(0,a-e)}return Re(o-s,a)}function qe(e,t){return e=t}function je(e){return Re(e.lineNumber-1,e.column-1)}function $e(e,t){const n=e,i=Math.floor(n/Me),r=n-i*Me,s=t,o=Math.floor(s/Me),a=s-o*Me;return new p.Q(i+1,r+1,o+1,a+1)}function Ke(e){const t=(0,h.uz)(e);return Re(t.length-1,t[t.length-1].length)}class Ge{static fromModelContentChanges(e){const t=e.map((e=>{const t=p.Q.lift(e.range);return new Ge(je(t.getStartPosition()),je(t.getEndPosition()),Ke(e.text))})).reverse();return t}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${Oe(this.startOffset)}...${Oe(this.endOffset)}) -> ${Oe(this.newLength)}`}}class Qe{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Ye.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return null===n?null:We(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Re(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Re(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Oe(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Re(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Re(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){while(this.nextEditIdx>5;if(0===i){const e=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;while(1){const i=this.lineTokens,r=i.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(n>1500)break}const i=Te(e,t,this.lineIdx,this.lineCharOffset);return new ft(i,0,-1,Ze.getEmpty(),new ct(i))}}class _t{constructor(e,t){this.text=e,this._offset=Ae,this.idx=0;const n=t.getRegExpStr(),i=n?new RegExp(n+"|\n","gi"):null,r=[];let s,o=0,a=0,l=0,h=0;const c=[];for(let g=0;g<60;g++)c.push(new ft(Re(0,g),0,-1,Ze.getEmpty(),new ct(Re(0,g))));const u=[];for(let g=0;g<60;g++)u.push(new ft(Re(1,g),0,-1,Ze.getEmpty(),new ct(Re(1,g))));if(i){i.lastIndex=0;while(null!==(s=i.exec(e))){const e=s.index,n=s[0];if("\n"===n)o++,a=e+1;else{if(l!==e){let t;if(h===o){const n=e-l;if(nkt(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(2===n.kind&&n.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}function kt(e){let t=(0,h.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}class vt{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=bt.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Ct(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function n(){if(t>=e.length)return null;const n=t,i=e[n].listHeight;t++;while(t=2?Lt(0===n&&t===e.length?e:e.slice(n,t),!1):e[n]}let i=n(),r=n();if(!r)return i;for(let o=n();o;o=n())wt(i,r)<=wt(r,o)?(i=yt(i,r),r=o):r=yt(r,o);const s=yt(i,r);return s}function Lt(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let n=e.length;while(n>3){const i=n>>1;for(let r=0;r=3?e[2]:null,t)}function wt(e,t){return Math.abs(e.listHeight-t.listHeight)}function yt(e,t){return e.listHeight===t.listHeight?it.create23(e,t,null,!1):e.listHeight>t.listHeight?St(e,t):xt(t,e)}function St(e,t){e=e.toMutable();let n=e;const i=[];let r;while(1){if(t.listHeight===n.listHeight){r=t;break}if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const e=i[s];r?e.childrenLength>=3?r=it.create23(e.unappendChild(),r,null,!1):(e.appendChildOfSameHeight(r),r=void 0):e.handleChildrenChanged()}return r?it.create23(e,r,null,!1):e}function xt(e,t){e=e.toMutable();let n=e;const i=[];while(t.listHeight!==n.listHeight){if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeFirstElementMutable()}let r=t;for(let s=i.length-1;s>=0;s--){const e=i[s];r?e.childrenLength>=3?r=it.create23(r,e.unprependChild(),null,!1):(e.prependChildOfSameHeight(r),r=void 0):e.handleChildrenChanged()}return r?it.create23(r,e,null,!1):e}class Et{constructor(e){this.lastOffset=Ae,this.nextNodes=[e],this.offsets=[Ae],this.idxs=[]}readLongestNodeAt(e,t){if(qe(e,this.lastOffset))throw new Error("Invalid offset");this.lastOffset=e;while(1){const n=It(this.nextNodes);if(!n)return;const i=It(this.offsets);if(qe(e,i))return;if(qe(i,e))if(Pe(i,n.length)<=e)this.nextNodeAfterCurrent();else{const e=Nt(n);-1!==e?(this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const e=Nt(n);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)}}}}nextNodeAfterCurrent(){while(1){const e=It(this.offsets),t=It(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const n=It(this.nextNodes),i=Nt(n,this.idxs[this.idxs.length-1]);if(-1!==i){this.nextNodes.push(n.getChild(i)),this.offsets.push(Pe(e,t.length)),this.idxs[this.idxs.length-1]=i;break}this.idxs.pop()}}}function Nt(e,t=-1){while(1){if(t++,t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function It(e){return e.length>0?e[e.length-1]:void 0}function Tt(e,t,n,i){const r=new At(e,t,n,i);return r.parseDocument()}class At{constructor(e,t,n,i){if(this.tokenizer=e,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,n&&i)throw new Error("Not supported");this.oldNodeReader=n?new Et(n):void 0,this.positionMapper=new Qe(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ze.getEmpty(),0);return e||(e=it.getEmpty()),e}parseList(e,t){const n=[];while(1){let i=this.tryReadChildFromCache(e);if(!i){const n=this.tokenizer.peek();if(!n||2===n.kind&&n.bracketIds.intersects(e))break;i=this.parseChild(e,t+1)}4===i.kind&&0===i.childrenLength||n.push(i)}const i=this.oldNodeReader?Ct(n):Lt(n,this.createImmutableLists);return i}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!De(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(n=>{if(null!==t&&!qe(n.length,t))return!1;const i=n.canBeReused(e);return i}));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new dt(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new ct(n.length);const i=e.merge(n.bracketIds),r=this.parseList(i,t+1),s=this.tokenizer.peek();return s&&2===s.kind&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),nt.create(n.astNode,r,s.astNode)):nt.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}function Dt(e,t){if(0===e.length)return t;if(0===t.length)return e;const n=new o.j3(Rt(e)),i=Rt(t);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let r=n.dequeue();function s(e){if(void 0===e){const e=n.takeWhile((e=>!0))||[];return r&&e.unshift(r),e}const t=[];while(r&&!De(e)){const[i,s]=r.splitAt(e);t.push(i),e=We(i.lengthAfter,e),r=s??n.dequeue()}return De(e)||t.push(new Mt(!1,e,e)),t}const a=[];function l(e,t,n){if(a.length>0&&Ve(a[a.length-1].endOffset,e)){const e=a[a.length-1];a[a.length-1]=new Ge(e.startOffset,t,Pe(e.newLength,n))}else a.push({startOffset:e,endOffset:t,newLength:n})}let h=Ae;for(const o of i){const e=s(o.lengthBefore);if(o.modified){const t=ze(e,(e=>e.lengthBefore)),n=Pe(h,t);l(h,n,o.lengthAfter),h=n}else for(const t of e){const e=h;h=Pe(h,t.lengthBefore),t.modified&&l(e,h,t.lengthAfter)}}return a}class Mt{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=We(e,this.lengthAfter);return Ve(t,Ae)?[this,void 0]:this.modified?[new Mt(this.modified,this.lengthBefore,e),new Mt(this.modified,Ae,t)]:[new Mt(this.modified,e,e),new Mt(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${Oe(this.lengthBefore)} -> ${Oe(this.lengthAfter)}`}}function Rt(e){const t=[];let n=Ae;for(const i of e){const e=We(n,i.startOffset);De(e)||t.push(new Mt(!1,e,e));const r=We(i.startOffset,i.endOffset);t.push(new Mt(!0,r,i.newLength)),n=i.endOffset}return t}class Ot extends r.jG{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new i.vl,this.denseKeyProvider=new et,this.brackets=new vt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new _t(this.textModel.getValue(),e);this.initialAstWithoutTokens=Tt(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Ge(Re(e.fromLineNumber-1,0),Re(e.toLineNumber,0),Re(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Ge.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=Dt(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=Dt(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const i=!1,r=i?t?.deepClone():t,s=new mt(this.textModel,this.brackets),o=Tt(s,e,r,n);return o}getBracketsInRange(e,t){this.flushQueue();const n=Re(e.startLineNumber-1,e.startColumn-1),i=Re(e.endLineNumber-1,e.endColumn-1);return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens;Pt(r,Ae,r.length,n,i,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const n=je(e.getStartPosition()),i=je(e.getEndPosition());return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens,s=new zt(e,t,this.textModel);Vt(r,Ae,r.length,n,i,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Ft(t,Ae,t.length,je(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Bt(t,Ae,t.length,je(e))}}function Bt(e,t,n,i){if(4===e.kind||2===e.kind){const r=[];for(const i of e.children)n=Pe(t,i.length),r.push({nodeOffsetStart:t,nodeOffsetEnd:n}),t=n;for(let t=r.length-1;t>=0;t--){const{nodeOffsetStart:n,nodeOffsetEnd:s}=r[t];if(qe(n,i)){const r=Bt(e.children[t],n,s,i);if(r)return r}}return null}if(3===e.kind)return null;if(1===e.kind){const i=$e(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function Ft(e,t,n,i){if(4===e.kind||2===e.kind){for(const r of e.children){if(n=Pe(t,r.length),qe(i,n)){const e=Ft(r,t,n,i);if(e)return e}t=n}return null}if(3===e.kind)return null;if(1===e.kind){const i=$e(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function Pt(e,t,n,i,r,s,o,a,l,h,c=!1){if(o>200)return!0;e:while(1)switch(e.kind){case 4:{const a=e.childrenLength;for(let c=0;c200)return!0;let l=!0;if(2===e.kind){let h=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),h=t,t++,a.set(e.openingBracket.text,t)}const c=Pe(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),l=s.push(new Ne($e(t,n),$e(t,c),e.closingBracket?$e(Pe(c,e.child?.length||Ae),n):void 0,o,h,e,u)),t=c,l&&e.child){const h=e.child;if(n=Pe(t,h.length),He(t,r)&&Ue(n,i)&&(l=Vt(h,t,n,i,r,s,o+1,a),!l))return!1}a?.set(e.openingBracket.text,h)}else{let n=t;for(const t of e.children){const e=n;if(n=Pe(n,t.length),He(e,r)&&He(i,n)&&(l=Vt(t,e,n,i,r,s,o,a),!l))return!1}}return l}class Wt extends r.jG{get canBuildAST(){const e=5e6;return this.textModel.getValueLength()<=e}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new r.HE),this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new r.Cm;this.bracketPairsTree.value=qt(e.add(new Ot(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),e),e.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||o.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||o.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||o.c1.empty}findMatchingBracketUp(e,t,n){const i=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column);if(this.canBuildAST){const n=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!n)return null;const i=this.getBracketPairsInRange(p.Q.fromPositions(t,t)).findLast((e=>n.closes(e.openingBracketInfo)));return i?i.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!s)return null;const o=s.textIsBracket[t];return o?jt(this._findMatchingBracketUp(o,i,Ht(n))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(p.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,o.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),p.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const n=Ht(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,i){const r=t.getCount(),s=t.getLanguageId(i);let o=Math.max(0,e.column-1-n.maxBracketLength);for(let l=i-1;l>=0;l--){const e=t.getEndOffset(l);if(e<=o)break;if(x(t.getStandardTokenType(l))||t.getLanguageId(l)!==s){o=e;break}}let a=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let l=i+1;l=a)break;if(x(t.getStandardTokenType(l))||t.getLanguageId(l)!==s){a=e;break}}return{searchStartOffset:o,searchEndOffset:a}}_matchBracket(e,t){const n=e.lineNumber,i=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),s=i.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(o&&!x(i.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,s),h=null;while(1){const i=Q.findNextBracketInRange(o.forwardRegex,n,r,a,l);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=r.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),n=this._matchFoundBracket(i,o.textIsBracket[e],o.textIsOpenBracket[e],t);if(n){if(n instanceof Ut)return null;h=n}}a=i.endColumn-1}if(h)return h}if(s>0&&i.getStartOffset(s)===e.column-1){const o=s-1,a=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(o)).brackets;if(a&&!x(i.getStandardTokenType(o))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,a,o),h=Q.findPrevBracketInRange(a.reversedRegex,n,r,s,l);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const e=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),n=this._matchFoundBracket(h,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(n)return n instanceof Ut?null:n}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return r?r instanceof Ut?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const i=e.languageId,r=e.reversedRegex;let s=-1,o=0;const a=(t,i,a,l)=>{while(1){if(n&&++o%100===0&&!n())return Ut.INSTANCE;const h=Q.findPrevBracketInRange(r,t,i,a,l);if(!h)break;const c=i.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return h;l=h.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this.textModel.tokenization.getLineTokens(l),n=e.getCount(),r=this.textModel.getLineContent(l);let s=n-1,o=r.length,h=r.length;l===t.lineNumber&&(s=e.findTokenIndexAtOffset(t.column-1),o=t.column-1,h=t.column-1);let c=!0;for(;s>=0;s--){const t=e.getLanguageId(s)===i&&!x(e.getStandardTokenType(s));if(t)c?o=e.getStartOffset(s):(o=e.getStartOffset(s),h=e.getEndOffset(s));else if(c&&o!==h){const e=a(l,r,o,h);if(e)return e}c=t}if(c&&o!==h){const e=a(l,r,o,h);if(e)return e}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageId,r=e.forwardRegex;let s=1,o=0;const a=(t,i,a,l)=>{while(1){if(n&&++o%100===0&&!n())return Ut.INSTANCE;const h=Q.findNextBracketInRange(r,t,i,a,l);if(!h)break;const c=i.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return h;a=h.endColumn-1}return null},l=this.textModel.getLineCount();for(let h=t.lineNumber;h<=l;h++){const e=this.textModel.tokenization.getLineTokens(h),n=e.getCount(),r=this.textModel.getLineContent(h);let s=0,o=0,l=0;h===t.lineNumber&&(s=e.findTokenIndexAtOffset(t.column-1),o=t.column-1,l=t.column-1);let c=!0;for(;s=1;s--){const e=this.textModel.tokenization.getLineTokens(s),o=e.getCount(),a=this.textModel.getLineContent(s);let l=o-1,h=a.length,c=a.length;if(s===t.lineNumber){l=e.findTokenIndexAtOffset(t.column-1),h=t.column-1,c=t.column-1;const s=e.getLanguageId(l);n!==s&&(n=s,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let u=!0;for(;l>=0;l--){const t=e.getLanguageId(l);if(n!==t){if(i&&r&&u&&h!==c){const e=Q.findPrevBracketInRange(i.reversedRegex,s,a,h,c);if(e)return this._toFoundBracket(r,e);u=!1}n=t,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const o=!!i&&!x(e.getStandardTokenType(l));if(o)u?h=e.getStartOffset(l):(h=e.getStartOffset(l),c=e.getEndOffset(l));else if(r&&i&&u&&h!==c){const e=Q.findPrevBracketInRange(i.reversedRegex,s,a,h,c);if(e)return this._toFoundBracket(r,e)}u=o}if(r&&i&&u&&h!==c){const e=Q.findPrevBracketInRange(i.reversedRegex,s,a,h,c);if(e)return this._toFoundBracket(r,e)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const n=this.textModel.getLineCount();let i=null,r=null,s=null;for(let o=t.lineNumber;o<=n;o++){const e=this.textModel.tokenization.getLineTokens(o),n=e.getCount(),a=this.textModel.getLineContent(o);let l=0,h=0,c=0;if(o===t.lineNumber){l=e.findTokenIndexAtOffset(t.column-1),h=t.column-1,c=t.column-1;const n=e.getLanguageId(l);i!==n&&(i=n,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let u=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const i=Ht(t),r=this.textModel.getLineCount(),s=new Map;let o=[];const a=(e,t)=>{if(!s.has(e)){const n=[];for(let e=0,i=t?t.brackets.length:0;e{while(1){if(i&&++l%100===0&&!i())return Ut.INSTANCE;const a=Q.findNextBracketInRange(e.forwardRegex,t,n,r,s);if(!a)break;const h=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),c=e.textIsBracket[h];if(c&&(c.isOpen(h)?o[c.index]++:c.isClose(h)&&o[c.index]--,-1===o[c.index]))return this._matchFoundBracket(a,c,!1,i);r=a.endColumn-1}return null};let c=null,u=null;for(let d=n.lineNumber;d<=r;d++){const e=this.textModel.tokenization.getLineTokens(d),t=e.getCount(),i=this.textModel.getLineContent(d);let r=0,s=0,o=0;if(d===n.lineNumber){r=e.findTokenIndexAtOffset(n.column-1),s=n.column-1,o=n.column-1;const t=e.getLanguageId(r);c!==t&&(c=t,u=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a(c,u))}let l=!0;for(;rt?.dispose()}}function Ht(e){if("undefined"===typeof e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class Ut{static{this.INSTANCE=new Ut}constructor(){this._searchCanceledBrand=void 0}}function jt(e){return e instanceof Ut?null:e}var $t=n(2764),Kt=n(3711);class Gt extends r.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new Qt,this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,i){if(i)return[];if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const r=this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray();return r}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new p.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Qt{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,Kt.zy)(((e,t)=>{const n=[$t.sN,$t.lQ,$t.ss,$t.l5,$t.sH,$t.zp],i=new Qt;t.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${e.getColor($t.s7)}; }`);const r=n.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let s=0;s<30;s++){const e=r[s%r.length];t.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${e}; }`)}}));var Yt=n(1337);function Xt(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Zt{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Xt(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Xt(this.oldText)}")`:`(replace@${this.oldPosition} "${Xt(this.oldText)}" with "${Xt(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const i=t.length;E.Sw(e,i,n),n+=4;for(let r=0;r0&&(this.changes=Jt(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(E.Sw(e,t?t.length:0,n),n+=4,t)for(const i of t)E.Sw(e,i.selectionStartLineNumber,n),n+=4,E.Sw(e,i.selectionStartColumn,n),n+=4,E.Sw(e,i.positionLineNumber,n),n+=4,E.Sw(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=E.bb(e,t);t+=4;for(let r=0;re.toString())).join(", ")}matchesResource(e){const t=c.r.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof rn}append(e,t,n,i,r){this._data instanceof rn&&this._data.append(e,t,n,i,r)}close(){this._data instanceof rn&&(this._data=this._data.serialize())}open(){this._data instanceof rn||(this._data=rn.deserialize(this._data))}undo(){if(c.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof rn&&(this._data=this._data.serialize());const e=rn.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(c.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof rn&&(this._data=this._data.serialize());const e=rn.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof rn&&(this._data=this._data.serialize()),this._data.byteLength+168}}class on{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const e=nn(i.resource);this._editStackElementsMap.set(e,i)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=nn(e);return this._editStackElementsMap.has(t)}setModel(e){const t=nn(c.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=nn(e.uri);if(this._editStackElementsMap.has(t)){const n=this._editStackElementsMap.get(t);return n.canAppend(e)}return!1}append(e,t,n,i,r){const s=nn(e.uri),o=this._editStackElementsMap.get(s);o.append(e,t,n,i,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=nn(e);if(this._editStackElementsMap.has(t)){const e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,tn.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function an(e){const t=e.getEOL();return"\n"===t?0:1}function ln(e){return!!e&&(e instanceof sn||e instanceof on)}class hn{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ln(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ln(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const n=this._undoRedoService.getLastElement(this._model.uri);if(ln(n)&&n.canAppend(this._model))return n;const i=new sn(Yt.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i,t),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],an(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,i){const r=this._getOrCreateEditStackElement(e,i),s=this._model.applyEdits(t,!0),o=hn._computeCursorState(n,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),r.append(this._model,a.map((e=>e.textChange)),an(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return(0,l.dz)(n),null}}}var cn,un=n(3654);class dn extends r.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function gn(e,t){let n=0,i=0;const r=e.length;while(ii)throw new l.D7("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide);let o=-2,a=-1,h=-2,c=-1;const u=e=>{if(-1!==o&&(-2===o||o>e-1)){o=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){o=t,a=e;break}}}if(-2===h){h=-1,c=-1;for(let t=e;t=0){h=t,c=e;break}}}};let d=-2,g=-1,f=-2,m=-1;const p=e=>{if(-2===d){d=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){d=t,g=e;break}}}if(-1!==f&&(-2===f||f=0){f=t,m=e;break}}}};let _=0,b=!0,k=0,v=!0,C=0,L=0;for(let l=0;b||v;l++){const r=e-l,o=e+l;l>1&&(r<1||r1&&(o>i||o>n)&&(v=!1),l>5e4&&(b=!1,v=!1);let f=-1;if(b&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(h=r-1,c=e,f=Math.ceil(e/this.textModel.getOptions().indentSize)):(u(r),f=this._getIndentLevelForWhitespaceLine(s,a,c))}let w=-1;if(v&&o<=i){const e=this._computeIndentLevel(o-1);e>=0?(d=o-1,g=e,w=Math.ceil(e/this.textModel.getOptions().indentSize)):(p(o),w=this._getIndentLevelForWhitespaceLine(s,g,m))}if(0!==l){if(1===l){if(o<=i&&w>=0&&L+1===w){b=!1,_=o,k=o,C=w;continue}if(r>=1&&f>=0&&f-1===L){v=!1,_=r,k=r,C=f;continue}if(_=e,k=e,C=L,0===C)return{startLineNumber:_,endLineNumber:k,indent:C}}b&&(f>=C?_=r:b=!1),v&&(w>=C?k=o:v=!1)}else L=f}return{startLineNumber:_,endLineNumber:k,indent:C}}getLinesBracketGuides(e,t,n,i){const r=[];for(let h=e;h<=t;h++)r.push([]);const s=!0,o=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new p.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let a;if(n&&o.length>0){const i=(e<=n.lineNumber&&n.lineNumber<=t?o:this.textModel.bracketPairs.getBracketPairsInRange(p.Q.fromPositions(n)).toArray()).filter((e=>p.Q.strictContainsPosition(e.range,n)));a=(0,un.Uk)(i,(e=>s||e.range.startLineNumber!==e.range.endLineNumber))?.range}const l=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,c=new _n;for(const u of o){if(!u.closingBracketRange)continue;const n=a&&u.range.equalsRange(a);if(!n&&!i.includeInactive)continue;const o=c.getInlineClassName(u.nestingLevel,u.nestingLevelOfEqualBracketType,l)+(i.highlightActive&&n?" "+c.activeClassName:""),d=u.openingBracketRange.getStartPosition(),g=u.closingBracketRange.getStartPosition(),f=i.horizontalGuides===cn.Enabled||i.horizontalGuides===cn.EnabledForActive&&n;if(u.range.startLineNumber===u.range.endLineNumber){s&&f&&r[u.range.startLineNumber-e].push(new fn(-1,u.openingBracketRange.getEndPosition().column,o,new mn(!1,g.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(g),p=this.getVisibleColumnFromPosition(u.openingBracketRange.getStartPosition()),_=Math.min(p,m,u.minVisibleColumnIndentation+1);let b=!1;const k=h.HG(this.textModel.getLineContent(u.closingBracketRange.startLineNumber)),v=k=e&&p>_&&r[d.lineNumber-e].push(new fn(_,-1,o,new mn(!1,d.column),-1,-1)),g.lineNumber<=t&&m>_&&r[g.lineNumber-e].push(new fn(_,-1,o,new mn(!b,g.column),-1,-1)))}for(const h of r)h.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return r}getVisibleColumnFromPosition(e){return d.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide),o=new Array(t-e+1);let a=-2,l=-1,h=-2,c=-1;for(let u=e;u<=t;u++){const t=u-e,r=this._computeIndentLevel(u-1);if(r>=0)a=u-1,l=r,o[t]=Math.ceil(r/i.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=u-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h=0){h=e,c=t;break}}}o[t]=this._getIndentLevelForWhitespaceLine(s,l,c)}}return o}_getIndentLevelForWhitespaceLine(e,t,n){const i=this.textModel.getOptions();return-1===t||-1===n?0:t0&&a>0)return;if(l>0&&h>0)return;const c=Math.abs(a-h),u=Math.abs(o-l);if(0===c)return r.spacesDiff=u,void(u>0&&0<=l-1&&l-10?r++:p>1&&s++,kn(o,a,l,m,u),u.looksLikeAlignment&&(!n||t!==u.spacesDiff))continue;const b=u.spacesDiff;b<=h&&c[b]++,o=l,a=m}let d=n;r!==s&&(d=r{const n=c[t];n>e&&(e=n,g=t)})),4===g&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(g=2)}return{insertSpaces:d,tabSize:g}}function Cn(e){return(1&e.metadata)>>>0}function Ln(e,t){e.metadata=254&e.metadata|t}function wn(e){return(2&e.metadata)>>>1===1}function yn(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function Sn(e){return(4&e.metadata)>>>2===1}function xn(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function En(e){return(64&e.metadata)>>>6===1}function Nn(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function In(e){return(24&e.metadata)>>>3}function Tn(e,t){e.metadata=231&e.metadata|t<<3}function An(e){return(32&e.metadata)>>>5===1}function Dn(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class Mn{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,Ln(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,xn(this,!1),Nn(this,!1),Tn(this,1),Dn(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,yn(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;const t=this.options.className;xn(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Nn(this,null!==this.options.glyphMarginClassName),Tn(this,this.options.stickiness),Dn(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Rn=new Mn(null,0,0);Rn.parent=Rn,Rn.left=Rn,Rn.right=Rn,Ln(Rn,0);class On{constructor(){this.root=Rn,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,r,s){return this.root===Rn?[]:Un(this,e,t,n,i,r,s)}search(e,t,n,i){return this.root===Rn?[]:Hn(this,e,t,n,i)}collectNodesFromOwner(e){return Wn(this,e)}collectNodesPostOrder(){return qn(this)}insert(e){jn(this,e),this._normalizeDeltaIfNecessary()}delete(e){Kn(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;while(e!==this.root)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const r=n.start+i,s=n.end+i;n.setCachedOffsets(r,s,t)}acceptReplace(e,t,n,i){const r=zn(this,e,e+t);for(let s=0,o=r.length;sn)&&(1!==i&&(2===i||t))}function Pn(e,t,n,i,r){const s=In(e),o=0===s||2===s,a=1===s||2===s,l=n-t,h=i,c=Math.min(l,h),u=e.start;let d=!1;const g=e.end;let f=!1;t<=u&&g<=n&&An(e)&&(e.start=t,d=!0,e.end=t,f=!0);{const e=r?1:l>0?2:0;!d&&Fn(u,o,t,e)&&(d=!0),!f&&Fn(g,a,t,e)&&(f=!0)}if(c>0&&!r){const e=l>h?2:0;!d&&Fn(u,o,t+c,e)&&(d=!0),!f&&Fn(g,a,t+c,e)&&(f=!0)}{const i=r?1:0;!d&&Fn(u,o,n,i)&&(e.start=t+h,d=!0),!f&&Fn(g,a,n,i)&&(e.end=t+h,f=!0)}const m=h-l;d||(e.start=Math.max(0,u+m)),f||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function zn(e,t,n){let i=e.root,r=0,s=0,o=0,a=0;const l=[];let h=0;while(i!==Rn)if(wn(i))yn(i.left,!1),yn(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else{if(!wn(i.left)){if(s=r+i.maxEnd,sn?yn(i,!0):(a=r+i.end,a>=t&&(i.setCachedOffsets(o,a,0),l[h++]=i),yn(i,!0),i.right===Rn||wn(i.right)||(r+=i.delta,i=i.right))}return yn(e.root,!1),l}function Vn(e,t,n,i){let r=e.root,s=0,o=0,a=0;const l=i-(n-t);while(r!==Rn)if(wn(r))yn(r.left,!1),yn(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),Jn(r),r=r.parent;else{if(!wn(r.left)){if(o=s+r.maxEnd,on?(r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),yn(r,!0)):(yn(r,!0),r.right===Rn||wn(r.right)||(s+=r.delta,r=r.right))}yn(e.root,!1)}function Wn(e,t){let n=e.root;const i=[];let r=0;while(n!==Rn)wn(n)?(yn(n.left,!1),yn(n.right,!1),n=n.parent):n.left===Rn||wn(n.left)?(n.ownerId===t&&(i[r++]=n),yn(n,!0),n.right===Rn||wn(n.right)||(n=n.right)):n=n.left;return yn(e.root,!1),i}function qn(e){let t=e.root;const n=[];let i=0;while(t!==Rn)wn(t)?(yn(t.left,!1),yn(t.right,!1),t=t.parent):t.left===Rn||wn(t.left)?t.right===Rn||wn(t.right)?(n[i++]=t,yn(t,!0)):t=t.right:t=t.left;return yn(e.root,!1),n}function Hn(e,t,n,i,r){let s=e.root,o=0,a=0,l=0;const h=[];let c=0;while(s!==Rn){if(wn(s)){yn(s.left,!1),yn(s.right,!1),s===s.parent.right&&(o-=s.parent.delta),s=s.parent;continue}if(s.left!==Rn&&!wn(s.left)){s=s.left;continue}a=o+s.start,l=o+s.end,s.setCachedOffsets(a,l,i);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),n&&Sn(s)&&(e=!1),r&&!En(s)&&(e=!1),e&&(h[c++]=s),yn(s,!0),s.right===Rn||wn(s.right)||(o+=s.delta,s=s.right)}return yn(e.root,!1),h}function Un(e,t,n,i,r,s,o){let a=e.root,l=0,h=0,c=0,u=0;const d=[];let g=0;while(a!==Rn)if(wn(a))yn(a.left,!1),yn(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!wn(a.left)){if(h=l+a.maxEnd,hn)yn(a,!0);else{if(u=l+a.end,u>=t){a.setCachedOffsets(c,u,s);let e=!0;i&&a.ownerId&&a.ownerId!==i&&(e=!1),r&&Sn(a)&&(e=!1),o&&!En(a)&&(e=!1),e&&(d[g++]=a)}yn(a,!0),a.right===Rn||wn(a.right)||(l+=a.delta,a=a.right)}}return yn(e.root,!1),d}function jn(e,t){if(e.root===Rn)return t.parent=Rn,t.left=Rn,t.right=Rn,Ln(t,0),e.root=t,e.root;$n(e,t),ei(t.parent);let n=t;while(n!==e.root&&1===Cn(n.parent))if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===Cn(t)?(Ln(n.parent,0),Ln(t,0),Ln(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,Yn(e,n)),Ln(n.parent,0),Ln(n.parent.parent,1),Xn(e,n.parent.parent))}else{const t=n.parent.parent.left;1===Cn(t)?(Ln(n.parent,0),Ln(t,0),Ln(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,Xn(e,n)),Ln(n.parent,0),Ln(n.parent.parent,1),Yn(e,n.parent.parent))}return Ln(e.root,0),t}function $n(e,t){let n=0,i=e.root;const r=t.start,s=t.end;while(1){const e=ti(r,s,i.start+n,i.end+n);if(e<0){if(i.left===Rn){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===Rn){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=Rn,t.right=Rn,Ln(t,1)}function Kn(e,t){let n,i;if(t.left===Rn?(n=t.right,i=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===Rn?(n=t.left,i=t):(i=Gn(t.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,Ln(n,0),t.detach(),Qn(),Jn(n),void(e.root.parent=Rn);const r=1===Cn(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,Ln(i,Cn(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==Rn&&(i.left.parent=i),i.right!==Rn&&(i.right.parent=i)),t.detach(),r)return ei(n.parent),i!==t&&(ei(i),ei(i.parent)),void Qn();let s;ei(n),ei(n.parent),i!==t&&(ei(i),ei(i.parent));while(n!==e.root&&0===Cn(n))n===n.parent.left?(s=n.parent.right,1===Cn(s)&&(Ln(s,0),Ln(n.parent,1),Yn(e,n.parent),s=n.parent.right),0===Cn(s.left)&&0===Cn(s.right)?(Ln(s,1),n=n.parent):(0===Cn(s.right)&&(Ln(s.left,0),Ln(s,1),Xn(e,s),s=n.parent.right),Ln(s,Cn(n.parent)),Ln(n.parent,0),Ln(s.right,0),Yn(e,n.parent),n=e.root)):(s=n.parent.left,1===Cn(s)&&(Ln(s,0),Ln(n.parent,1),Xn(e,n.parent),s=n.parent.left),0===Cn(s.left)&&0===Cn(s.right)?(Ln(s,1),n=n.parent):(0===Cn(s.left)&&(Ln(s.right,0),Ln(s,1),Yn(e,s),s=n.parent.left),Ln(s,Cn(n.parent)),Ln(n.parent,0),Ln(s.left,0),Xn(e,n.parent),n=e.root));Ln(n,0),Qn()}function Gn(e){while(e.left!==Rn)e=e.left;return e}function Qn(){Rn.parent=Rn,Rn.delta=0,Rn.start=0,Rn.end=0}function Yn(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==Rn&&(n.left.parent=t),n.parent=t.parent,t.parent===Rn?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,Jn(t),Jn(n)}function Xn(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==Rn&&(n.right.parent=t),n.parent=t.parent,t.parent===Rn?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,Jn(t),Jn(n)}function Zn(e){let t=e.end;if(e.left!==Rn){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==Rn){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function Jn(e){e.maxEnd=Zn(e)}function ei(e){while(e!==Rn){const t=Zn(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function ti(e,t,n,i){return e===n?t-i:e-n}class ni{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==ii)return ri(this.right);let e=this;while(e.parent!==ii){if(e.parent.left===e)break;e=e.parent}return e.parent===ii?ii:e.parent}prev(){if(this.left!==ii)return si(this.left);let e=this;while(e.parent!==ii){if(e.parent.right===e)break;e=e.parent}return e.parent===ii?ii:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const ii=new ni(null,0);function ri(e){while(e.left!==ii)e=e.left;return e}function si(e){while(e.right!==ii)e=e.right;return e}function oi(e){return e===ii?0:e.size_left+e.piece.length+oi(e.right)}function ai(e){return e===ii?0:e.lf_left+e.piece.lineFeedCnt+ai(e.right)}function li(){ii.parent=ii}function hi(e,t){const n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==ii&&(n.left.parent=t),n.parent=t.parent,t.parent===ii?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function ci(e,t){const n=t.left;t.left=n.right,n.right!==ii&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===ii?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function ui(e,t){let n,i;if(t.left===ii?(i=t,n=i.right):t.right===ii?(i=t,n=i.left):(i=ri(t.right),n=i.right),i===e.root)return e.root=n,n.color=0,t.detach(),li(),void(e.root.parent=ii);const r=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,fi(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,fi(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==ii&&(i.left.parent=i),i.right!==ii&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,fi(e,i)),t.detach(),n.parent.left===n){const t=oi(n),i=ai(n);if(t!==n.parent.size_left||i!==n.parent.lf_left){const r=t-n.parent.size_left,s=i-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=i,gi(e,n.parent,r,s)}}if(fi(e,n.parent),r)return void li();let s;while(n!==e.root&&0===n.color)n===n.parent.left?(s=n.parent.right,1===s.color&&(s.color=0,n.parent.color=1,hi(e,n.parent),s=n.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.right.color&&(s.left.color=0,s.color=1,ci(e,s),s=n.parent.right),s.color=n.parent.color,n.parent.color=0,s.right.color=0,hi(e,n.parent),n=e.root)):(s=n.parent.left,1===s.color&&(s.color=0,n.parent.color=1,ci(e,n.parent),s=n.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.left.color&&(s.right.color=0,s.color=1,hi(e,s),s=n.parent.left),s.color=n.parent.color,n.parent.color=0,s.left.color=0,ci(e,n.parent),n=e.root));n.color=0,li()}function di(e,t){fi(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,hi(e,t)),t.parent.color=0,t.parent.parent.color=1,ci(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,ci(e,t)),t.parent.color=0,t.parent.parent.color=1,hi(e,t.parent.parent))}e.root.color=0}function gi(e,t,n,i){while(t!==e.root&&t!==ii)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function fi(e,t){let n=0,i=0;if(t!==e.root){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t!==e.root){t=t.parent,n=oi(t.left)-t.size_left,i=ai(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i;while(t!==e.root&&(0!==n||0!==i))t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}}ii.parent=ii,ii.left=ii,ii.right=ii,ii.color=0;var mi=n(2773);const pi=65535;function _i(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class bi{constructor(e,t,n,i,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=r}}function ki(e,t=!0){const n=[0];let i=1;for(let r=0,s=e.length;r126)&&(o=!1)}const a=new bi(_i(e),i,r,s,o);return e.length=0,a}class Ci{constructor(e,t,n,i,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=r}}class Li{constructor(e,t){this.buffer=e,this.lineStarts=t}}class wi{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==ii&&e.iterate(e.root,(e=>(e!==ii&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class yi{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const n=this._cache;for(let i=0;i=e)&&(n[i]=null,t=!0)}if(t){const e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class Si{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new Li("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ii,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let r=0,s=e.length;r0){e[r].lineStarts||(e[r].lineStarts=ki(e[r].buffer));const t=new Ci(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),i=this.rbInsertRight(i,t)}this._searchCache=new yi(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=pi,n=t-Math.floor(t/3),i=2*n;let r="",s=0;const o=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(s<=n||s+l0){const t=r.replace(/\r\n|\r|\n/g,e);o.push(new Li(t,ki(t)))}this.create(o,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new wi(this,e)}getOffsetAt(e,t){let n=0,i=this.root;while(i!==ii)if(i.left!==ii&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;const r=this.getAccumulatedValue(i,e-i.lf_left-2);return n+(r+t-1)}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const i=e;while(t!==ii)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,0===r.index){const e=this.getOffsetAt(n+1,1),t=i-e;return new m.y(n+1,t+1)}return new m.y(n+1,r.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===ii){const t=this.getOffsetAt(n+1,1),r=i-e-t;return new m.y(n+1,r+1)}t=t.right}return new m.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){const n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(r+e.remainder,r+t.remainder)}let n=e.node;const i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let s=i.substring(r+e.remainder,r+n.piece.length);n=n.next();while(n!==ii){const e=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=e.substring(i,i+t.remainder);break}s+=e.substr(i,n.piece.length),n=n.next()}return s}getLinesContent(){const e=[];let t=0,n="",i=!1;return this.iterate(this.root,(r=>{if(r===ii)return!0;const s=r.piece;let o=s.length;if(0===o)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,h=s.start.line,c=s.end.line;let u=l[h]+s.start.column;if(i&&(10===a.charCodeAt(u)&&(u++,o--),e[t++]=n,n="",i=!1,0===o))return!0;if(h===c)return this._EOLNormalized||13!==a.charCodeAt(u+o-1)?n+=a.substr(u,o):(i=!0,n+=a.substr(u,o-1)),!0;n+=this._EOLNormalized?a.substring(u,Math.max(u,l[h+1]-this._EOLLength)):a.substring(u,l[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let i=h+1;ie+g,t.reset(0)):(b=u.buffer,k=e=>e,t.reset(g));do{if(m=t.next(b),m){if(k(m.index)>=f)return h;this.positionInBuffer(e,k(m.index)-d,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,r,_),s=_.line===r.line?_.column-r.column+i:_.column+1,o=s+m[0].length;if(c[h++]=(0,mi.dr)(new p.Q(n+t,s,n+t,o),m,a),k(m.index)+m[0].length>=f)return h;if(h>=l)return h}}while(m);return h}findMatchesLineByLine(e,t,n,i){const r=[];let s=0;const o=new mi.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let h=this.positionInBuffer(a.node,a.remainder);const c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,o,e.startLineNumber,e.startColumn,h,c,t,n,i,s,r),r;let u=e.startLineNumber,d=a.node;while(d!==l.node){const l=this.getLineFeedCnt(d.piece.bufferIndex,h,d.piece.end);if(l>=1){const a=this._buffers[d.piece.bufferIndex].lineStarts,c=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),g=a[h.line+l],f=u===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(d,o,u,f,h,this.positionInBuffer(d,g-c),t,n,i,s,r),s>=i)return r;u+=l}const c=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const a=this.getLineContent(u).substring(c,e.endColumn-1);return s=this._findMatchesInLine(t,o,a,e.endLineNumber,c,s,r,n,i),r}if(s=this._findMatchesInLine(t,o,this.getLineContent(u).substr(c),u,c,s,r,n,i),s>=i)return r;u++,a=this.nodeAt2(u,1),d=a.node,h=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){const a=u===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(u).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,o,l,e.endLineNumber,a,s,r,n,i),r}const g=u===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,o,u,g,h,c,t,n,i,s,r),r}_findMatchesInLine(e,t,n,i,r,s,o,a,l){const h=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,c=n.length;let u=-a;while(-1!==(u=n.indexOf(t,u+a)))if((!h||(0,mi.wC)(h,n,c,u,a))&&(o[s++]=new Se.Dg(new p.Q(i,u+1+r,i,u+1+a+r),null),s>=l))return s;return s}let c;t.reset(0);do{if(c=t.next(n),c&&(o[s++]=(0,mi.dr)(new p.Q(i,c.index+1+r,i,c.index+1+c[0].length+r),c,a),s>=l))return s}while(c);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==ii){const{node:n,remainder:i,nodeStartOffset:r}=this.nodeAt(e),s=n.piece,o=s.bufferIndex,a=this.positionInBuffer(n,i);if(0===n.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&r+s.length===e&&t.lengthe){const e=[];let r=new Ci(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(o,s.end)-this.offsetInBuffer(o,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){const e=this.nodeCharCodeAt(n,i);if(10===e){const e={line:r.start.line+1,column:0};r=new Ci(r.bufferIndex,e,r.end,this.getLineFeedCnt(r.bufferIndex,e,r.end),r.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){const r=this.nodeCharCodeAt(n,i-1);if(13===r){const r=this.positionInBuffer(n,i-1);this.deleteNodeTail(n,r),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a)}else this.deleteNodeTail(n,a);const l=this.createNewPieces(t);r.length>0&&this.rbInsertRight(n,r);let h=n;for(let t=0;t=0;s--)r=this.rbInsertLeft(r,i[s]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]);let r=i;for(let s=1;s=u))break;l=c+1}}return n?(n.line=c,n.column=a-d,null):{line:c,column:a-d}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;const i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;const r=i[n.line+1],s=i[n.line]+n.column;if(r>s+1)return n.line-t.line;const o=s-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(o)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){const n=this._buffers[e].lineStarts;return n[t.line]+t.column}deleteNodes(e){for(let t=0;tpi){const t=[];while(e.length>pi){const n=e.charCodeAt(pi-1);let i;13===n||n>=55296&&n<=56319?(i=e.substring(0,pi-1),e=e.substring(pi-1)):(i=e.substring(0,pi),e=e.substring(pi));const r=ki(i);t.push(new Ci(this._buffers.length,{line:0,column:0},{line:r.length-1,column:i.length-r[r.length-1]},r.length-1,i.length)),this._buffers.push(new Li(i,r))}const n=ki(e);return t.push(new Ci(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new Li(e,n)),t}let t=this._buffers[0].buffer.length;const n=ki(e,!1);let i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let e=0;e=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const i=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:r,nodeStartLineNumber:s-(e-1-n.lf_left)}),a.substring(l+i,l+o-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(n,e-n.lf_left-2),r=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=r.substring(s+t,s+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right}}n=n.next();while(n!==ii){const e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const r=this.getAccumulatedValue(n,0),s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=e.substring(s,s+r-t),i}{const t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=e.substr(t,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;while(e!==ii)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){const n=e.piece,i=this.positionInBuffer(e,t),r=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(t!==r)return{index:t,remainder:0}}return{index:r,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;const n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[r]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),s=t,o=this.offsetInBuffer(n.bufferIndex,s),a=this.getLineFeedCnt(n.bufferIndex,n.start,s),l=a-i,h=o-r,c=n.length+h;e.piece=new Ci(n.bufferIndex,n.start,s,a,c),gi(this,e,h,l)}deleteNodeHead(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),s=t,o=this.getLineFeedCnt(n.bufferIndex,s,n.end),a=this.offsetInBuffer(n.bufferIndex,s),l=o-i,h=r-a,c=n.length+h;e.piece=new Ci(n.bufferIndex,s,n.end,o,c),gi(this,e,h,l)}shrinkNode(e,t,n){const i=e.piece,r=i.start,s=i.end,o=i.length,a=i.lineFeedCnt,l=t,h=this.getLineFeedCnt(i.bufferIndex,i.start,l),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,r);e.piece=new Ci(i.bufferIndex,i.start,l,h,c),gi(this,e,c-o,h-a);const u=new Ci(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(d)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const r=ki(t,!1);for(let d=0;de)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;const n={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,i=0;while(n!==ii)if(n.left!==ii&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(r+t-1,s),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:i};t-=n.piece.length-r;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}n=n.next();while(n!==ii){if(n.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(n,0),i=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:i}}if(n.piece.length>=t-1){const e=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:e}}t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===ii||0===e.piece.lineFeedCnt)return!1;const t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,r=n[i]+t.start.column;if(i===n.length-1)return!1;const s=n[i+1];return!(s>r+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(r)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==ii&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const n=[],i=this._buffers[e.piece.bufferIndex].lineStarts;let r;r=0===e.piece.end.column?{line:e.piece.end.line-1,column:i[e.piece.end.line]-i[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,o=e.piece.lineFeedCnt-1;e.piece=new Ci(e.piece.bufferIndex,e.piece.start,r,o,s),gi(this,e,-1,-1),0===e.piece.length&&n.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Ci(t.piece.bufferIndex,a,t.piece.end,h,l),gi(this,t,-1,-1),0===t.piece.length&&n.push(t);const c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(let u=0;ue.sortIndex-t.sortIndex))}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;const f=this._doApplyEdits(a);let m=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const n=d[e].oldContent,i=this.getLineContent(t);0!==i.length&&i!==n&&-1===h.HG(i)&&m.push(t)}}return this._onDidChangeContent.fire(),new Se.F4(g,f,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,i=e[e.length-1].range,r=new p.Q(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn);let s=n.startLineNumber,o=n.startColumn;const a=[];for(let u=0,g=e.length;u0&&a.push(n.text),s=i.endLineNumber,o=i.endColumn}const l=a.join(""),[h,c,d]=(0,u.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:l,eolCount:h,firstLineLength:c,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(xi._sortOpsDescending);const t=[];for(let n=0;n0){const e=o.eolCount+1;h=1===e?new p.Q(a,l,a,l+o.firstLineLength):new p.Q(a,l,a+e-1,o.lastLineLength+1)}else h=new p.Q(a,l,a,l);n=h.endLineNumber,i=h.endColumn,t.push(h),r=o}return t}static _sortOpsAscending(e,t){const n=p.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){const n=p.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class Ei{constructor(e,t,n,i,r,s,o,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=r,this._containsRTL=s,this._containsUnusualLineTerminators=o,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let r=0,s=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=vi(this._tmpLineStarts,e);this.chunks.push(new Li(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=h.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=h.$X(e)))}finish(e=!0){return this._finish(),new Ei(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=ki(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Ii=n(4544),Ti=n(5350),Ai=n(3723),Di=n(4240),Mi=n(371);const Ri=new class{clone(){return this}equals(e){return this===e}};function Oi(e,t){const n=new Uint32Array(2);return n[0]=0,n[1]=(32768|e|2<<24)>>>0,new Ti.rY(n,null===t?Ri:t)}class Bi{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(0===t)return void this.insert(e,n);if(0===n)return void this.delete(e,t);const i=this._store.slice(0,e),r=this._store.slice(e+t),s=Fi(n,this._default);this._store=i.concat(s,r)}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const n=[];for(let i=0;i0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e)return void n.appendLineTokens(t)}this._tokens.push(new Pi(e,[t]))}finalize(){return this._tokens}}class Vi{static{this.defaultTokenMetadata=33587200}static createEmpty(e,t){const n=Vi.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=n,new Vi(i,e,t)}static createFromTextAndMetadata(e,t){let n=0,i="";const r=new Array;for(const{text:s,metadata:o}of e)r.push(n+s.length,o),n+=s.length,i+=s;return new Vi(new Uint32Array(r),i,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=n}equals(e){return e instanceof Vi&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const i=t<<1,r=i+(n<<1);for(let s=i;s0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)],n=gt.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return gt.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return gt.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return gt.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return gt.x.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return gt.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Vi.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new Wi(this,e,t,n)}static convertToEndOffset(e,t){const n=e.length>>>1,i=n-1;for(let r=0;r>>1)-1;while(nt&&(i=r)}return n}withInserted(e){if(0===e.length)return this;let t=0,n=0,i="";const r=new Array;let s=0;while(1){const o=ts){i+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];r.push(i.length,e),s=a.offset}i+=a.text,r.push(i.length,a.tokenMetadata),n++}}return new Vi(new Uint32Array(r),i,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),n=this.getEndOffset(e),i=this._text.substring(t,n);return i}forEach(e){const t=this.getCount();for(let n=0;n=n)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof Wi&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,n=this._source.getStartOffset(t),i=this._source.getEndOffset(t);let r=this._source.getTokenText(t);return nthis._endOffset&&(r=r.substring(0,r.length-(i-this._endOffset))),r}forEach(e){for(let t=0;tt)break;const r=this._textModel.getLineContent(i.lineNumber),s=Ki(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i.startState);e.add(i.lineNumber,s.tokens),this.store.setEndState(i.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const n=this.getStartState(e.lineNumber);if(!n)return 0;const i=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),s=r.substring(0,e.column-1)+t+r.substring(e.column-1),o=Ki(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n),a=new Vi(o.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,n){const i=e.lineNumber,r=e.column,s=this.getStartState(i);if(!s)return null;const o=this._textModel.getLineContent(i),a=o.substring(0,r-1)+n+o.substring(r-1+t),l=this._textModel.getLanguageIdAtPosition(i,0),h=Ki(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s),c=new Vi(h.tokens,a,this._languageIdCodec);return c}hasAccurateTokensForLine(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&o>=1;o--){const e=this._textModel.getLineFirstNonWhitespaceColumn(o);if(0!==e&&(e0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}}class $i{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Mi.L(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Mi.L(n.start,e):this._ranges.splice(t,1,new Mi.L(n.start,e),new Mi.L(e+1,n.endExclusive))}}addRange(e){Mi.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;while(!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive))n++;let i=n;while(!(i>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function Ki(e,t,n,i,r,s){let o=null;if(n)try{o=n.tokenizeEncoded(i,r,s.clone())}catch(a){(0,l.dz)(a)}return o||(o=Oi(e.encodeLanguageId(t),s)),Vi.convertToEndOffset(o.tokens,i.length),o}class Gi{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,Ai.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;const i=this._tokenizeOneInvalidLine(t);if(i>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Ii.M(e,t))}}class Qi{constructor(){this._onDidChangeVisibleRanges=new i.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Yi((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Yi{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const n=e.map((e=>new Ii.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}class Xi extends r.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Ai.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,o.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class Zi extends r.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new i.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class Ji extends Zi{constructor(e,t,n,i){super(t,n,i),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=Ti.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new Vi(n,t,this._languageIdCodec)}return Vi.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLineWithEdit(e,t,n){return null}get hasTokens(){const e=void 0!==this._treeSitterService.getParseResult(this._textModel);return e}}var er=n(5863);const tr=new Uint32Array(0).buffer;class nr{static deleteBeginning(e,t){return null===e||e===tr?e:nr.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===tr)return e;const n=ir(e),i=n[n.length-2];return nr.delete(e,t,i)}static delete(e,t,n){if(null===e||e===tr||t===n)return e;const i=ir(e),r=i.length>>>1;if(0===t&&i[i.length-2]===n)return tr;const s=Vi.findIndexInTokensArray(i,t),o=s>0?i[s-1<<1]:0,a=i[s<<1];if(nh&&(i[l++]=e,i[l++]=i[1+(d<<1)],h=e)}if(l===i.length)return e;const u=new Uint32Array(l);return u.set(i.subarray(0,l),0),u.buffer}static append(e,t){if(t===tr)return e;if(e===tr)return t;if(null===e)return e;if(null===t)return null;const n=ir(e),i=ir(t),r=i.length>>>1,s=new Uint32Array(n.length+i.length);s.set(n,0);let o=n.length;const a=n[n.length-2];for(let l=0;l>>1;let s=Vi.findIndexInTokensArray(i,t);if(s>0){const e=i[s-1<<1];e===t&&s--}for(let o=s;o0}getTokens(e,t,n){let i=null;if(t1&&(t=gt.x.getLanguageId(i[1])!==e),!t)return tr}if(!i||0===i.length){const n=new Uint32Array(2);return n[0]=t,n[1]=sr(e),n.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const n=[];for(let i=0;i=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=nr.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=nr.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n=this._len||(0!==t?(this._lineTokens[i]=nr.deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=nr.insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[i]=nr.insert(this._lineTokens[i],e.column-1,n))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const n=[];for(let i=0,r=e.length;i>>0}class or{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const i=t[0].getRange(),r=t[t.length-1].getRange();if(!i||!r)return e;n=e.plusRange(i).plusRange(r)}let i=null;for(let r=0,s=this._pieces.length;rn.endLineNumber){i=i||{index:r};break}if(e.removeTokens(n),e.isEmpty()){this._pieces.splice(r,1),r--,s--;continue}if(e.endLineNumbern.endLineNumber){i=i||{index:r};continue}const[t,o]=e.split(n);t.isEmpty()?i=i||{index:r}:o.isEmpty()||(this._pieces.splice(r,1,t,o),r++,s++,i=i||{index:r})}return i=i||{index:this._pieces.length},t.length>0&&(this._pieces=o.nK(this._pieces,i.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const n=this._pieces;if(0===n.length)return t;const i=or._findFirstPieceWithLine(n,e),r=n[i].getLineTokens(e);if(!r)return t;const s=t.getCount(),o=r.getCount();let a=0;const l=[];let h=0,c=0;const u=(e,t)=>{e!==c&&(c=e,l[h++]=e,l[h++]=t)};for(let d=0;d>>0,l=~o>>>0;while(at)){while(r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber)r--;return r}i=r-1}}return n}acceptEdit(e,t,n,i,r){for(const s of this._pieces)s.acceptEdit(e,t,n,i,r)}}var ar,lr=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},hr=function(e,t){return function(n,i){t(n,i,e)}};let cr=ar=class extends dn{constructor(e,t,n,s,o,a,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=s,this._languageService=o,this._languageConfigurationService=a,this._treeSitterService=l,this._semanticTokens=new or(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new i.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new i.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new r.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(i.Jh.filter(Ti.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new ur(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new Ji(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){Ti.OB.get(this._languageId)?this._tokens instanceof Ji||this.createTokens(!0):this._tokens instanceof ur||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,n,i]=(0,u.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,n,i,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new l.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this._tokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),i=this.getLineTokens(t.lineNumber),r=i.findTokenIndexAtOffset(t.column-1),[s,o]=ar._findLanguageBoundaries(i,r),a=(0,C.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(r>0&&s===t.column-1){const[s,o]=ar._findLanguageBoundaries(i,r-1),a=(0,C.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r-1)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let s=t;s>=0&&e.getLanguageId(s)===n;s--)i=e.getStartOffset(s);let r=e.getLineContent().length;for(let s=t,o=e.getCount();s{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(i.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let n=this._attachedViewStates.get(e);n||(n=new Xi((()=>this.refreshRanges(n.lineRanges))),this._attachedViewStates.set(e,n)),n.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new Ui(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Ti.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(n){return(0,l.dz)(n),[null,null]}return[e,t]},[n,i]=t();if(this._tokenizer=n&&i?new Hi(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{if(2===this._backgroundTokenizationState)return;const e=2;this._backgroundTokenizationState=e,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(e,t)=>{if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&this._tokenizer?.store.setEndState(e,t)}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Gi(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),n?.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new rr(this._languageIdCodec),this._debugBackgroundStates=new Ui(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,n]=(0,u.W)(t.text);this._tokens.acceptEdit(t.range,e,n),this._debugBackgroundTokens?.acceptEdit(t.range,e,n)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Ii.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const n=new zi,{heuristicTokens:i}=this._tokenizer.tokenizeHeuristically(n,e,t),r=this.setTokens(n.finalize());if(i)for(const s of r.changes)this._backgroundTokenizer.value?.requestTokens(s.fromLineNumber,s.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new zi;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const i=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(i)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;const i=this._textModel.validatePosition(new m.y(e,t));return this.forceTokenization(i.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(i,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;const i=this._textModel.validatePosition(e);return this.forceTokenization(i.lineNumber),this._tokenizer.tokenizeLineWithEdit(i,t,n)}get hasTokens(){return this._tokens.hasTokens}}class dr{constructor(){this.changeType=1}}class gr{static applyInjectedText(e,t){if(!t||0===t.length)return e;let n="",i=0;for(const r of t)n+=e.substring(i,r.column-1),i=r.column-1,n+=r.options.content;return n+=e.substring(i),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new gr(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new gr(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,n,i,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=i,this.order=r}}class fr{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class mr{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class pr{constructor(e,t,n,i){this.changeType=4,this.injectedTexts=i,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class _r{constructor(){this.changeType=5}}class br{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},xr=function(e,t){return function(n,i){t(n,i,e)}};function Er(e){const t=new Ni;return t.acceptChunk(e),t.finish()}function Nr(e){const t=new Ni;let n;while("string"===typeof(n=e.read()))t.acceptChunk(n);return t.finish()}function Ir(e,t){let n;return n="string"===typeof e?Er(e):Se.nk(e)?Nr(e):e,n.create(t)}let Tr=0;const Ar=999,Dr=1e4;class Mr{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,n=0;do{const i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}while(1)}}const Rr=()=>{throw new Error("Invalid change accessor")};let Or=class extends r.jG{static{yr=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:b.tabSize,indentSize:b.indentSize,insertSpaces:b.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:b.trimAutoWhitespace,largeFileOptimizations:b.largeFileOptimizations,bracketPairColorizationOptions:b.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const n=vn(e,t.tabSize,t.insertSpaces);return new Se.X2({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Se.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,r.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,s=null,o,a,l,u){super(),this._undoRedoService=o,this._languageService=a,this._languageConfigurationService=l,this.instantiationService=u,this._onWillDispose=this._register(new i.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Yr((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new i.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new i.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new i.vl),this._eventEmitter=this._register(new Xr),this._languageSelectionListener=this._register(new r.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new Qi,Tr++,this.id="$model"+Tr,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource="undefined"===typeof s||null===s?c.r.parse("inmemory://model/"+Tr):s,this._attachedEditorCount=0;const{textBuffer:d,disposable:g}=Ir(e,n.defaultEOL);this._buffer=d,this._bufferDisposable=g,this._options=yr.resolveOptions(this._buffer,n);const f="string"===typeof t?t:t.languageId;"string"!==typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new Wt(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new pn(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Gt(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(cr,this,this._bracketPairs,f,this._attachedViews);const m=this._buffer.getLineCount(),_=this._buffer.getValueLengthInRange(new p.Q(1,1,m,this._buffer.getLineLength(m)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=_>yr.LARGE_FILE_SIZE_THRESHOLD||m>yr.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=_>yr.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=_>yr._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=h.tk(Tr),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Vr,this._commandManager=new hn(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new xi([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=r.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new l.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new vr(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e||void 0===e)throw(0,l.Qg)();const{textBuffer:t,disposable:n}=Ir(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,r,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:r,isRedoing:s,isFlush:o}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Vr,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new br([new dr],this._versionId,!1,!1),this._createContentChanged2(new p.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new br([new _r],this._versionId,!1,!1),this._createContentChanged2(new p.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const n=this._buffer.getLineLength(i);n>=Dr?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!==typeof e.indentSize?e.indentSize:this._options.originalIndentSize,i="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,r="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s="undefined"!==typeof e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,o=new Se.X2({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:s});if(this._options.equals(o))return;const a=this._options.createChangeEvent(o);this._options=o,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const n=vn(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),f(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(h._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new Mr(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let r=Math.floor("number"!==typeof n||isNaN(n)?1:n),s=Math.floor("number"!==typeof i||isNaN(i)?1:i);if(r<1)r=1,s=1;else if(r>t)r=t,s=this.getLineMaxColumn(r);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(r);s>=e&&(s=e)}const o=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!==typeof o||isNaN(o)?1:o),h=Math.floor("number"!==typeof a||isNaN(a)?1:a);if(l<1)l=1,h=1;else if(l>t)l=t,h=this.getLineMaxColumn(l);else if(h<=1)h=1;else{const e=this.getLineMaxColumn(l);h>=e&&(h=e)}return n===r&&i===s&&o===l&&a===h&&e instanceof p.Q&&!(e instanceof _.L)?e:new p.Q(r,s,l,h)}_isValidPosition(e,t,n){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const i=this._buffer.getLineCount();if(e>i)return!1;if(1===t)return!0;const r=this.getLineMaxColumn(e);if(t>r)return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(h.pc(n))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor("number"!==typeof e||isNaN(e)?1:e),r=Math.floor("number"!==typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(i<1)return new m.y(1,1);if(i>s)return new m.y(s,this.getLineMaxColumn(s));if(r<=1)return new m.y(i,1);const o=this.getLineMaxColumn(i);if(r>=o)return new m.y(i,o);if(1===n){const e=this._buffer.getLineCharCode(i,r-2);if(h.pc(e))return new m.y(i,r-1)}return new m.y(i,r)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof m.y&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(r,s,0))return!1;if(1===t){const e=i>1?this._buffer.getLineCharCode(n,i-2):0,t=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,o=h.pc(e),a=h.pc(t);return!o&&!a}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof p.Q&&!(e instanceof _.L)&&this._isValidRange(e,t))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,s=n.column,o=i.lineNumber,a=i.column;if(1===t){const e=s>1?this._buffer.getLineCharCode(r,s-2):0,t=a>1&&a<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,a-2):0,n=h.pc(e),i=h.pc(t);return n||i?r===o&&s===a?new p.Q(r,s-1,o,a-1):n&&i?new p.Q(r,s-1,o,a+1):n?new p.Q(r,s-1,o,a):new p.Q(r,s,o,a+1):new p.Q(r,s,o,a)}return new p.Q(r,s,o,a)}modifyPosition(e,t){this._assertNotDisposed();const n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new p.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,r,s,o=Ar){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>p.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let h;if(l.push(a.reduce(((e,t)=>p.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!n&&e.indexOf("\n")<0){const t=new mi.lt(e,n,i,r),a=t.parseSearchRequest();if(!a)return[];h=e=>this.findMatchesLineByLine(e,a,s,o)}else h=t=>mi.hB.findMatches(this,new mi.lt(e,n,i,r),t,s,o);return l.map(h).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new mi.lt(e,n,i,r),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let h=new p.Q(o.lineNumber,o.column,l,this.getLineMaxColumn(l)),c=this.findMatchesLineByLine(h,a,s,1);return mi.hB.findNextMatch(this,new mi.lt(e,n,i,r),o,s),c.length>0?c[0]:(h=new p.Q(1,1,o.lineNumber,this.getLineMaxColumn(o.lineNumber)),c=this.findMatchesLineByLine(h,a,s,1),c.length>0?c[0]:null)}return mi.hB.findNextMatch(this,new mi.lt(e,n,i,r),o,s)}findPreviousMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);return mi.hB.findPreviousMatch(this,new mi.lt(e,n,i,r),o,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Se.Wo?e:new Se.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n({range:this.validateRange(e.range),text:e.text})));let i=!0;if(e)for(let t=0,r=e.length;tr.endLineNumber,o=r.startLineNumber>t.endLineNumber;if(!i&&!o){s=!0;break}}if(!s){i=!1;break}}if(i)for(let e=0,r=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&(!(i===t.startLineNumber&&t.startColumn===r&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(0))&&!(i===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(o.length-1)))){s=!1;break}}if(s){const e=new p.Q(i,1,i,r);t.push(new Se.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,i)}_applyUndo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new p.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}}));this._applyUndoRedoEdits(r,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new p.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}}));this._applyUndoRedoEdits(r,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,r,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==s.length){for(let n=0,i=s.length;n=0;t--){const n=l+t,i=p+t;C.takeFromEndWhile((e=>e.lineNumber>i));const r=C.takeFromEndWhile((e=>e.lineNumber===i));e.push(new fr(n,this.getLineContent(i),r))}if(ge.lineNumbere.lineNumber===t))}e.push(new pr(i+1,l+d,c,h))}t+=f}this._emitContentChangedEvent(new br(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===i.reverseEdits?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e),n=t.map((e=>new fr(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new kr(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(t,n)=>this._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Qr(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)};let i=null;try{i=t(n)}catch(r){(0,l.dz)(r)}return n.addDecoration=Rr,n.changeDecoration=Rr,n.changeDecorationOptions=Rr,n.removeDecoration=Rr,n.deltaDecorations=Rr,i}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,l.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Gr[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),o=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,r),i.setOptions(Gr[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,i=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1,r=!1){const s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),h=this.getLineMaxColumn(l),c=new p.Q(a,1,l,h),u=this._getDecorationsInRange(c,n,i,r);return(0,o.E4)(u,this._decorationProvider.getDecorationsInRange(c,n,i)),u}getDecorationsInRange(e,t=0,n=!1,i=!1,r=!1){const s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,r);return(0,o.E4)(a,this._decorationProvider.getDecorationsInRange(s,t,n,i)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return gr.fromDecorations(i).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,i){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(n.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),s=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!(!n.options.overviewRuler||!n.options.overviewRuler.color),r=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(n.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=i!==r,o=Pr(t)!==zr(n);s||o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,i=!1){const r=this.getVersionId(),s=t.length;let o=0;const a=n.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const h=new Array(a);while(othis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Br(this.getLineContent(e))+1}};function Br(e){let t=0;for(const n of e){if(" "!==n&&"\t"!==n)break;t++}return t}function Fr(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Pr(e){return!!e.after||!!e.before}function zr(e){return!!e.options.after||!!e.options.before}Or=yr=Sr([xr(4,Cr),xr(5,v.L),xr(6,ge),xr(7,ee._Y)],Or);class Vr{constructor(){this._decorationsTree0=new On,this._decorationsTree1=new On,this._injectedTextDecorationsTree=new On}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)null===n.range&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,i,r,s){const o=e.getVersionId(),a=this._intervalSearch(t,n,i,r,o,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,n,i,r,s){const o=this._decorationsTree0.intervalSearch(e,t,n,i,r,s),a=this._decorationsTree1.intervalSearch(e,t,n,i,r,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,n,i,r,s);return o.concat(a).concat(l)}getInjectedTextInInterval(e,t,n,i){const r=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,i,!1,r,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const n=e.getVersionId(),i=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,i).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,n,i,r){const s=e.getVersionId(),o=this._search(t,n,i,s,r);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,i,r){if(n)return this._decorationsTree1.search(e,t,i,r);{const n=this._decorationsTree0.search(e,t,i,r),s=this._decorationsTree1.search(e,t,i,r),o=this._injectedTextDecorationsTree.search(e,t,i,r);return n.concat(s).concat(o)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),i=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){zr(e)?this._injectedTextDecorationsTree.insert(e):Fr(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){zr(e)?this._injectedTextDecorationsTree.delete(e):Fr(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){zr(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Fr(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i),this._injectedTextDecorationsTree.acceptReplace(e,t,n,i)}}function Wr(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class qr{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Hr extends qr{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:Se.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class Ur{constructor(e){this.position=e?.position??Se.ZS.Center,this.persistLane=e?.persistLane}}class jr extends qr{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?a.Q1.fromHex(e):t.getColor(e.id)}}class $r{static from(e){return e instanceof $r?e:new $r(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Kr{static register(e){return new Kr(e)}static createDynamic(e){return new Kr(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?Wr(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Wr(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Hr(e.overviewRuler):null,this.minimap=e.minimap?new jr(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Ur(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?Wr(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Wr(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?Wr(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?h.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Wr(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Wr(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Wr(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Wr(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Wr(e.afterContentClassName):null,this.after=e.after?$r.from(e.after):null,this.before=e.before?$r.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}Kr.EMPTY=Kr.register({description:"empty"});const Gr=[Kr.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Kr.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Kr.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Kr.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Qr(e){return e instanceof Kr?e:Kr.createDynamic(e)}class Yr extends r.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new i.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Xr extends r.jG{constructor(){super(),this._fastEmitter=this._register(new i.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new i.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}var Zr,Jr=n(6151),es=n(5647),ts=n(6657),ns=n(5603),is=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},rs=function(e,t){return function(n,i){t(n,i,e)}};function ss(e){return e.toString()}class os{constructor(e,t,n){this.model=e,this._modelEventListeners=new r.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>n(e,t))))}dispose(){this._modelEventListeners.dispose()}}const as=s.j9||s.zx?1:2;class ls{constructor(e,t,n,i,r,s,o,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=r,this.sha1=s,this.versionId=o,this.alternativeVersionId=a}}let hs=class extends r.jG{static{Zr=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,n,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=r,this._onModelAdded=this._register(new i.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new i.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new i.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let n=b.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let i="tabSize";if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(i=Math.max(t,1))}let r=b.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=as;const o=e.eol;"\r\n"===o?s=2:"\n"===o&&(s=1);let a=b.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let l=b.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let h=b.largeFileOptimizations;e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(h="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let c=b.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"===typeof e.editor.bracketPairColorization&&(c={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:i,insertSpaces:r,detectIndentation:l,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:h,bracketPairColorizationOptions:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"string"===typeof n&&"auto"!==n?n:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}getCreationOptions(e,t,n){const i="string"===typeof e?e:e.languageId;let r=this._modelCreationOptionsByLanguageAndResource[i+t];if(!r){const e=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:t}),s=this._getEOL(t,i);r=Zr._readModelOptions({editor:e,eol:s},n),this._modelCreationOptionsByLanguageAndResource[i+t]=r}return r}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,r=n.length;ie){const t=[];this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));while(t.length>0&&this._disposedModelsHeapSize>e){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const r=this.getCreationOptions(t,n,i),s=this._instantiationService.createInstance(Or,e,t,r,n);if(n&&this._disposedModels.has(ss(n))){const e=this._removeDisposedModel(n),t=this._undoRedoService.getElements(n),i=this._getSHA1Computer(),r=!!i.canComputeSHA1(s)&&i.computeSHA1(s)===e.sha1;if(r||e.sharesUndoRedoStack){for(const e of t.past)ln(e)&&e.matchesResource(n)&&e.setModel(s);for(const e of t.future)ln(e)&&e.matchesResource(n)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,(e=>ln(e)&&e.matchesResource(n))),r&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const o=ss(s.uri);if(this._models[o])throw new Error("ModelService: Cannot add model because it already exists!");const a=new os(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[o]=a,a}createModel(e,t,n,i=!1){let r;return r=t?this._createModelData(e,t,n,i):this._createModelData(e,ie.vH,n,i),this._onModelAdded.fire(r.model),r.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n0||t.future.length>0){for(const n of t.past)ln(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri));for(const n of t.future)ln(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri))}}const o=Zr.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(r)if(i||!(s>o)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(o-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>ln(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new ls(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),i,s,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!i){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,i=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget);Zr._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new cs}};hs=Zr=is([rs(0,te.pG),rs(1,Jr.ITextResourcePropertiesService),rs(2,Cr),rs(3,ee._Y)],hs);class cs{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=cs.MAX_MODEL_SIZE}computeSHA1(e){const t=new es.v7,n=e.createSnapshot();let i;while(i=n.read())t.update(i);return t.digest()}}},4037:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextModelService:()=>r});var i=n(7778);const r=(0,i.u1)("textModelService")},3699:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeSemanticTokensDto:()=>a});var i=n(7885),r=n(5160);function s(e){for(let t=0,n=e.length;t{"use strict";n.r(t),n.d(t,{SemanticTokensProviderStyling:()=>p,toMultilineTokens2:()=>_});var i=n(4577),r=n(3711),s=n(458),o=n(6788),a=n(8690),l=n(6627);class h{static create(e,t){return new h(e,new c(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.Q(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[i,r,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new h(this._startLineNumber,i),new h(this._startLineNumber+s,r)]}applyEdit(e,t){const[n,i,r]=(0,l.W)(t);this.acceptEdit(e,n,i,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,r){this._acceptDeleteRange(e),this._acceptInsertText(new o.y(e.startLineNumber,e.startColumn),t,n,i,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const e=n-t;return void(this._startLineNumber-=e)}const i=this._tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const i=-t;this._startLineNumber-=i,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,r){if(0===t&&0===n)return;const s=e.lineNumber-this._startLineNumber;if(s<0)return void(this._startLineNumber+=t);const o=this._tokens.getMaxDeltaLine();s>=o+1||this._tokens.acceptInsertText(s,e.column-1,t,n,i,r)}}class c{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)){let r=i;while(r>t&&this._getDeltaLine(r-1)===e)r--;let s=i;while(se||c===e&&d>=t)&&(ce||o===e&&g>=t){if(or?f-=r-n:f=n;else if(d===t&&g===n){if(!(d===i&&f>r)){h=!0;continue}f-=r-n}else if(dr)){h=!0;continue}d=t,g=n,f=g+(f-r)}else if(d>i){if(0===a&&!h){l=o;break}d-=a}else{if(!(d===i&&g>=r))throw new Error("Not possible!");e&&0===d&&(g+=e,f+=e),d-=a,g-=r-n,f-=r-n}const p=4*l;s[p]=d,s[p+1]=g,s[p+2]=f,s[p+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,r,s){const o=0===n&&1===i&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let h=0;h=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},f=function(e,t){return function(n,i){t(n,i,e)}};const m=!1;let p=class{constructor(e,t,n,i){this._legend=e,this._themeService=t,this._languageService=n,this._logService=i,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new k}getMetadata(e,t,n){const r=this._languageService.languageIdCodec.encodeLanguageId(n),o=this._hashTable.get(e,t,r);let a;if(o)a=o.metadata,m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${i.x.getForeground(a)}, fontStyle ${i.x.getFontStyle(a).toString(2)}`);else{let o=this._legend.tokenTypes[e];const l=[];if(o){let e=t;for(let t=0;e>0&&t>=1;m&&e>0&&this._logService.getLevel()===s.$b.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const i=this._themeService.getColorTheme().getTokenStyleMetadata(o,l,n);if("undefined"===typeof i)a=2147483647;else{if(a=0,"undefined"!==typeof i.italic){const e=(i.italic?1:0)<<11;a|=1|e}if("undefined"!==typeof i.bold){const e=(i.bold?2:0)<<11;a|=2|e}if("undefined"!==typeof i.underline){const e=(i.underline?4:0)<<11;a|=4|e}if("undefined"!==typeof i.strikethrough){const e=(i.strikethrough?8:0)<<11;a|=8|e}if(i.foreground){const e=i.foreground<<15;a|=16|e}0===a&&(a=2147483647)}}else m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,o="not-in-legend";this._hashTable.add(e,t,r,a),m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${l.join(" ")}): foreground ${i.x.getForeground(a)}, fontStyle ${i.x.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,i,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${i} is outside the previous data (length ${r}).`))}};function _(e,t,n){const i=e.data,r=e.data.length/5|0,s=Math.max(Math.ceil(r/1024),400),o=[];let a=0,l=1,c=0;while(ae&&0===i[5*t])t--;if(t-1===e){let e=u;while(e+1h)t.warnOverlappingSemanticTokens(o,h+1);else{const e=t.getMetadata(b,k,n);2147483647!==e&&(0===f&&(f=o),d[g]=o-f,d[g+1]=h,d[g+2]=_,d[g+3]=e,g+=4,m=o,p=_)}l=o,c=h,a++}g!==d.length&&(d=d.subarray(0,g));const _=h.create(f,d);o.push(_)}return o}p=g([f(1,r.Gy),f(2,d.L),f(3,s.rr)],p);class b{constructor(e,t,n,i){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=i,this.next=null}}class k{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=k._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=k._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";n.r(t),n.d(t,{ISemanticTokensStylingService:()=>r});var i=n(7778);const r=(0,i.u1)("semanticTokensStylingService")},2205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SemanticTokensStylingService:()=>d});var i=n(8894),r=n(4573),s=n(3711),o=n(458),a=n(4686),l=n(7284),h=n(4979),c=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},u=function(e,t){return function(n,i){t(n,i,e)}};let d=class extends i.jG{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};d=c([u(0,s.Gy),u(1,o.rr),u(2,r.L)],d),(0,h.v)(l.ISemanticTokensStylingService,d,1)},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MirrorModel:()=>_,STOP_SYNC_MODEL_DELTA_TIME_MS:()=>f,WorkerTextModelSyncClient:()=>m,WorkerTextModelSyncServer:()=>p});var i=n(3723),r=n(8894),s=n(9133),o=n(6788),a=n(8690),l=n(939),h=n(601),c=(n(5053),n(2647));class u{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,c.j)(e);const n=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,c.j)(e),t=(0,c.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,c.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,s=0;while(t<=n)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e=r))break;t=i+1}return new d(i,e-s)}}class d{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class g{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new o.y(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;ithis._checkStopModelSync()),Math.round(f/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,r.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const n of e){const e=n.toString();this._syncedModels[e]||this._beginModelSync(n,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const n in this._syncedModelsLastUsedTime){const i=e-this._syncedModelsLastUsedTime[n];i>f&&t.push(n)}for(const n of t)this._stopModelSync(n)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n)return;if(!t&&n.isTooLargeForSyncing())return;const i=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const s=new r.Cm;s.add(n.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(i.toString(),e)}))),s.add(n.onWillDispose((()=>{this._stopModelSync(i)}))),s.add((0,r.s)((()=>{this._proxy.$acceptRemovedModel(i)}))),this._syncedModels[i]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,r.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new _(s.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;const n=this._models[e];n.onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class _ extends g{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}},4977:(e,t,n)=>{"use strict";n.r(t)},6151:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextResourceConfigurationService:()=>r,ITextResourcePropertiesService:()=>s});var i=n(7778);const r=(0,i.u1)("textResourceConfigurationService"),s=(0,i.u1)("textResourcePropertiesService")},5863:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeSitterParserService:()=>r});var i=n(7778);const r=(0,i.u1)("treeSitterParserService")},1210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DraggedTreeItemsIdentifier:()=>r,TreeViewsDnDService:()=>i});class i{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class r{constructor(e){this.identifier=e}}},5231:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeViewsDnDService:()=>o});var i=n(4979),r=n(7778),s=n(1210);const o=(0,r.u1)("treeViewsDndService");(0,i.v)(o,s.TreeViewsDnDService,1)},7412:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnicodeTextModelHighlighter:()=>l});var i=n(8690),r=n(2773),s=n(601),o=n(9109),a=n(939);class l{static computeUnicodeHighlights(e,t,n){const l=n?n.startLineNumber:1,u=n?n.endLineNumber:e.getLineCount(),d=new c(t),g=d.getCandidateCodePoints();let f;f="allNonBasicAscii"===g?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(`${h(Array.from(g))}`,"g");const m=new r.W5(null,f),p=[];let _,b=!1,k=0,v=0,C=0;e:for(let r=l,h=u;r<=h;r++){const t=e.getLineContent(r),n=t.length;m.reset(0);do{if(_=m.next(t),_){let e=_.index,l=_.index+_[0].length;if(e>0){const n=t.charCodeAt(e-1);s.pc(n)&&e--}if(l+1=t){b=!0;break e}p.push(new i.Q(r,e+1,r,l+1))}}}while(_)}return{ranges:p,hasMore:b,ambiguousCharacterCount:k,invisibleCharacterCount:v,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(e,t){const n=new c(t),i=n.shouldHighlightNonBasicASCII(e,null);switch(i){case 0:return null;case 2:return{kind:1};case 3:{const i=e.codePointAt(0),r=n.ambiguousCharacters.getPrimaryConfusable(i),o=s.tl.getLocales().filter((e=>!s.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(i)));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function h(e,t){const n=`[${s.bm(e.map((e=>String.fromCodePoint(e))).join(""))}]`;return n}class c{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.y_.codePoints)u(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,r=!1;if(t)for(const o of t){const e=o.codePointAt(0),t=s.aC(o);i=i||t,t||this.ambiguousCharacters.isAmbiguous(e)||s.y_.isInvisibleCharacter(e)||(r=!0)}return!i&&r?0:this.options.invisibleCharacters&&!u(e)&&s.y_.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function u(e){return" "===e||"\n"===e||"\t"===e}},1337:(e,t,n)=>{"use strict";function i(){return globalThis._VSCODE_NLS_MESSAGES}function r(){return globalThis._VSCODE_NLS_LANGUAGE}n.d(t,{i8:()=>r,kg:()=>a});const s="pseudo"===r()||"undefined"!==typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>{const i=n[0],r=t[i];let s=e;return"string"===typeof r?s=r:"number"!==typeof r&&"boolean"!==typeof r&&void 0!==r&&null!==r||(s=String(r)),s})),s&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function a(e,t,...n){return o("number"===typeof e?l(e,t):t,n)}function l(e,t){const n=i()?.[e];if("string"!==typeof n){if("string"===typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}},2828:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>s,pG:()=>r});var i=n(7778);const r=(0,i.u1)("configurationService");function s(e){return e.replace(/[\[\]]/g,"")}},7503:(e,t,n)=>{"use strict";n.d(t,{Fd:()=>c});var i=n(5053),r=n(231),s=n(322),o=n(1337),a=n(2828),l=n(6223),h=n(6374);const c={Configuration:"base.contributions.configuration"},u={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},_="vscode://schemas/settings/resourceLanguage",b=h.O.as(l.F.JSONContribution);class k{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new r.vl,this._onDidUpdateConfiguration=new r.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:o.kg("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},b.registerSchema(_,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=new Set;this.doRegisterConfigurations(e,t,n),b.registerSchema(_,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const n=[];for(const{overrides:i,source:r}of e)for(const e in i){t.add(e);const s=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),o=i[e];if(s.configurationDefaultOverrides.push({value:o,source:r}),w.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,r),n.push(...y(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t;const n=this.configurationProperties[e];n&&(this.updatePropertyDefaultValue(e,n),this.updateSchema(e,n))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,t,n){const i={type:"object",default:t.value,description:o.kg("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,a.Mo)(e)),$ref:_,defaultDefaultValue:t.value,source:n,defaultValueSource:n};this.configurationProperties[e]=i,this.defaultLanguageConfigurationOverridesNode.properties[e]=i}mergeDefaultConfigurationsForOverrideIdentifier(e,t,n,i){const r=i?.value||{},o=i?.source??new Map;if(o instanceof Map){for(const e of Object.keys(t)){const i=t[e],a=s.Gv(i)&&(s.b0(r[e])||s.Gv(r[e]));if(a){if(r[e]={...r[e]??{},...i},n)for(const t in i)o.set(`${e}.${t}`,n)}else r[e]=i,n?o.set(e,n):o.delete(e)}return{value:r,source:o}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,n,i){const r=this.configurationProperties[e],o=i?.value??r?.defaultDefaultValue;let a=n;const l=s.Gv(t)&&(void 0!==r&&"object"===r.type||void 0===r&&(s.b0(o)||s.Gv(o)));if(l){if(a=i?.source??new Map,!(a instanceof Map))return void console.error("defaultValueSource is not a Map");for(const i in t)n&&a.set(`${e}.${i}`,n);t={...s.Gv(o)?o:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,n),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,n,i,r=3,o){r=s.z(e.scope)?r:e.scope;const a=e.properties;if(a)for(const h in a){const e=a[h];t&&E(h,e)?delete a[h]:(e.source=n,e.defaultDefaultValue=a[h].default,this.updatePropertyDefaultValue(h,e),w.test(h)?e.scope=void 0:(e.scope=s.z(e.scope)?r:e.scope,e.restricted=s.z(e.restricted)?!!i?.includes(h):e.restricted),!a[h].hasOwnProperty("included")||a[h].included?(this.configurationProperties[h]=a[h],a[h].policy?.name&&this.policyConfigurations.set(a[h].policy.name,h),!a[h].deprecationMessage&&a[h].markdownDeprecationMessage&&(a[h].deprecationMessage=a[h].markdownDeprecationMessage),o.add(h)):(this.excludedConfigurationProperties[h]=a[h],delete a[h]))}const l=e.allOf;if(l)for(const s of l)this.validateAndRegisterProperties(s,t,n,i,r,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const n=e.properties;if(n)for(const t in n)this.updateSchema(t,n[t]);const i=e.allOf;i?.forEach(t)};t(e)}updateSchema(e,t){switch(u.properties[e]=t,t.scope){case 1:d.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:f.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:p.properties[e]=t;break;case 5:p.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,n),u.properties[t]=n,d.properties[t]=n,g.properties[t]=n,f.properties[t]=n,m.properties[t]=n,p.properties[t]=n}}registerOverridePropertyPatternKey(){const e={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};u.patternProperties[L]=e,d.patternProperties[L]=e,g.patternProperties[L]=e,f.patternProperties[L]=e,m.patternProperties[L]=e,p.patternProperties[L]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let i,r;!n||t.disallowConfigurationDefault&&n.source||(i=n.value,r=n.source),s.b0(i)&&(i=t.defaultDefaultValue,r=void 0),s.b0(i)&&(i=S(t.type)),t.default=i,t.defaultValueSource=r}}const v="\\[([^\\]]+)\\]",C=new RegExp(v,"g"),L=`^(${v})+$`,w=new RegExp(L);function y(e){const t=[];if(w.test(e)){let n=C.exec(e);while(n?.length){const i=n[1].trim();i&&t.push(i),n=C.exec(e)}}return(0,i.dM)(t)}function S(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const x=new k;function E(e,t){return e.trim()?w.test(e)?o.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==x.getConfigurationProperties()[e]?o.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==x.getPolicyConfigurations().get(t.policy?.name)?o.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,x.getPolicyConfigurations().get(t.policy?.name)):null:o.kg("config.property.empty","Cannot register an empty property")}h.O.add(c.Configuration,x)},4979:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});class i{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const r=[];function s(e,t,n){t instanceof i||(t=new i(t,[],Boolean(n))),r.push([e,t])}},7778:(e,t,n)=>{"use strict";var i;n.d(t,{_Y:()=>r,u1:()=>o}),function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t}(i||(i={}));const r=o("instantiationService");function s(e,t,n){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n}],t[i.DI_TARGET]=t)}function o(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(t,e,i)};return t.toString=()=>e,i.serviceIds.set(e,t),t}},6223:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var i=n(231),r=n(6374);const s={JSONContribution:"base.contributions.json"};function o(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class a{constructor(){this._onDidChangeSchema=new i.vl,this.schemasById={}}registerSchema(e,t){this.schemasById[o(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const l=new a;r.O.add(s.JSONContribution,l)},458:(e,t,n)=>{"use strict";n.d(t,{rr:()=>Q,$b:()=>Y});n(231);var i=n(8894),r=n(5160),s=n(601),o=n(4396),a=n(1337);function l(...e){switch(e.length){case 1:return(0,a.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,a.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,a.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const h=(0,a.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),c=(0,a.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class u{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw(0,o.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){while(!this._isAtEnd()){this._start=this._current;const e=this._advance();switch(e){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(l("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(l("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(l("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&(this._input.charCodeAt(this._current)===e&&(this._current++,!0))}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,n=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),n=u._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){while(39!==this._peek()&&!this._isAtEnd())this._advance();this._isAtEnd()?this._error(h):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,n=!1;while(1){if(e>=this._input.length)return this._current=e,void this._error(c);const i=this._input.charCodeAt(e);if(t)t=!1;else{if(47===i&&!n){e++;break}91===i?n=!0:92===i?t=!0:93===i&&(n=!1)}e++}while(e=this._input.length}}var d=n(7778);const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",r.zx),g.set("isLinux",r.j9),g.set("isWindows",r.uF),g.set("isWeb",r.HZ),g.set("isMacNative",r.zx&&!r.HZ),g.set("isEdge",r.UP),g.set("isFirefox",r.gm),g.set("isChrome",r.H8),g.set("isSafari",r.nr);const f=Object.prototype.hasOwnProperty,m={regexParsingWithErrorRecovery:!0},p=(0,a.kg)("contextkey.parser.error.emptyString","Empty context key expression"),_=(0,a.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),b=(0,a.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),k=(0,a.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),v=(0,a.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),C=(0,a.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),L=(0,a.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),w=(0,a.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class y{static{this._parseError=new Error}constructor(e=m){this._config=e,this._scanner=new u,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?C:void 0;throw this._parsingErrors.push({message:v,offset:e.offset,lexeme:u.getLexeme(e),additionalInfo:t}),y._parseError}return e}catch(t){if(t!==y._parseError)throw t;return}}else this._parsingErrors.push({message:p,offset:0,lexeme:"",additionalInfo:_})}_expr(){return this._or()}_or(){const e=[this._and()];while(this._matchOne(16)){const t=this._and();e.push(t)}return 1===e.length?e[0]:S.or(...e)}_and(){const e=[this._term()];while(this._matchOne(15)){const t=this._term();e.push(t)}return 1===e.length?e[0]:S.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),E.INSTANCE;case 12:return this._advance(),N.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,k),e?.negate()}case 17:return this._advance(),R.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),S.true();case 12:return this._advance(),S.false();case 0:{this._advance();const e=this._expr();return this._consume(1,k),e}case 17:{const i=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const n=e.lexeme,r=n.lastIndexOf("/"),s=r===n.length-1?void 0:this._removeFlagsGY(n.substring(r+1));let o;try{o=new RegExp(n.substring(1,r),s)}catch(t){throw this._errExpectedButGot("REGEX",e)}return V.create(i,o)}switch(e.type){case 10:case 19:{const n=[e.lexeme];this._advance();let r=this._peek(),s=0;for(let t=0;t=0){const o=t.slice(i+1,s),a="i"===t[s+1]?"i":"";try{r=new RegExp(o,a)}catch(n){throw this._errExpectedButGot("REGEX",e)}}}if(null===r)throw this._errExpectedButGot("REGEX",e);return V.create(i,r)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,b);const e=this._value();return S.notIn(i,e)}const r=this._peek().type;switch(r){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return S.equals(i,e);switch(e){case"true":return S.has(i);case"false":return S.not(i);default:return S.equals(i,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return S.notEquals(i,e);switch(e){case"true":return S.not(i);case"false":return S.has(i);default:return S.notEquals(i,e)}}case 5:return this._advance(),P.create(i,this._value());case 6:return this._advance(),z.create(i,this._value());case 7:return this._advance(),B.create(i,this._value());case 8:return this._advance(),F.create(i,this._value());case 13:return this._advance(),S.in(i,this._value());default:return S.has(i)}}case 20:throw this._parsingErrors.push({message:L,offset:e.offset,lexeme:"",additionalInfo:w}),y._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){const i=(0,a.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,u.getLexeme(t)),r=t.offset,s=u.getLexeme(t);return this._parsingErrors.push({message:i,offset:r,lexeme:s,additionalInfo:n}),y._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class S{static false(){return E.INSTANCE}static true(){return N.INSTANCE}static has(e){return I.create(e)}static equals(e,t){return T.create(e,t)}static notEquals(e,t){return M.create(e,t)}static regex(e,t){return V.create(e,t)}static in(e,t){return A.create(e,t)}static notIn(e,t){return D.create(e,t)}static not(e){return R.create(e)}static and(...e){return H.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static{this._parser=new y({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(void 0===e||null===e)return;const t=this._parser.parse(e);return t}}function x(e,t){return e.cmp(t)}class E{static{this.INSTANCE=new E}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return N.INSTANCE}}class N{static{this.INSTANCE=new N}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}class I{static create(e,t=null){const n=g.get(e);return"boolean"===typeof n?n?N.INSTANCE:E.INSTANCE:new I(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"===typeof e?e?N.INSTANCE:E.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this)),this.negated}}class T{static create(e,t,n=null){if("boolean"===typeof t)return t?I.create(e,n):R.create(e,n);const i=g.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?N.INSTANCE:E.INSTANCE}return new T(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=g.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?N.INSTANCE:E.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class A{static create(e,t){return new A(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):"string"===typeof n&&"object"===typeof t&&null!==t&&f.call(t,n)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=D.create(this.key,this.valueKey)),this.negated}}class D{static create(e,t){return new D(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=A.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class M{static create(e,t,n=null){if("boolean"===typeof t)return t?R.create(e,n):I.create(e,n);const i=g.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?E.INSTANCE:N.INSTANCE}return new M(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=g.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?E.INSTANCE:N.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}class R{static create(e,t=null){const n=g.get(e);return"boolean"===typeof n?n?E.INSTANCE:N.INSTANCE:new R(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"===typeof e?e?E.INSTANCE:N.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this)),this.negated}}function O(e,t){if("string"===typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"===typeof e||"number"===typeof e?t(e):E.INSTANCE}class B{static create(e,t,n=null){return O(t,(t=>new B(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,n=null){return O(t,(t=>new F(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class P{static create(e,t,n=null){return O(t,(t=>new P(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))new z(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class V{static create(e,t){return new V(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this)),this.negated}}class W{static create(e){return new W(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function q(e){let t=null;for(let n=0,i=e.length;ne.expr.length)return 1;for(let t=0,n=this.expr.length;t1){const e=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),r=0===i.length,s=U.create(e.expr.map((e=>H.create([e,t],null,n))),null,r);s&&(i.push(s),i.sort(x))}if(1===i.length)return i[0];if(n){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,n){return U._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());while(e.length>1){const t=e.shift(),n=e.shift(),i=[];for(const e of G(t))for(const t of G(n))i.push(H.create([e,t],null,!1));e.unshift(U.create(i,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class j extends I{static{this._info=[]}static all(){return j._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,"object"===typeof n?j._info.push({...n,key:e}):!0!==n&&j._info.push({key:e,description:n,type:null!==t&&void 0!==t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return T.create(this.key,e)}}(0,d.u1)("contextKeyService");function $(e,t){return et?1:0}function K(e,t,n,i){return en?1:ti?1:0}function G(e){return 9===e.type?e.expr:[e]}const Q=(0,d.u1)("logService");var Y;(function(e){e[e["Off"]=0]="Off",e[e["Trace"]=1]="Trace",e[e["Debug"]=2]="Debug",e[e["Info"]=3]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=5]="Error"})(Y||(Y={}));Y.Info;i.jG;function X(e){switch(e){case Y.Trace:return"trace";case Y.Debug:return"debug";case Y.Info:return"info";case Y.Warning:return"warn";case Y.Error:return"error";case Y.Off:return"off"}}new j("logLevel",X(Y.Info))},6374:(e,t,n)=>{"use strict";n.d(t,{O:()=>o});var i=n(9109),r=n(322);class s{constructor(){this.data=new Map}add(e,t){i.ok(r.Kg(e)),i.ok(r.Gv(t)),i.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const o=new s},7732:(e,t,n)=>{"use strict";n.d(t,{buw:()=>A,b1q:()=>T,YtV:()=>F,Ubg:()=>G,IIb:()=>$,pOz:()=>j,whs:()=>q,Stt:()=>U,Hng:()=>H,yLC:()=>_e,KoI:()=>me,uMG:()=>pe,x1A:()=>m});var i=n(9109),r=n(3723),s=n(5476),o=n(231),a=n(6223),l=n(6374),h=n(1337);function c(e){return null!==e&&"object"===typeof e&&"light"in e&&"dark"in e}const u={ColorContribution:"base.contributions.colors"},d="default";class g{constructor(){this._onDidChangeSchema=new o.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,r){const s={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r};this.colorsById[e]=s;const o={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(o.deprecationMessage=r),i&&(o.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",o.patternErrorMessage=h.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[o,{type:"string",const:d,description:h.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n?.defaults){const e=c(n.defaults)?n.defaults[t.type]:n.defaults;return w(e,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(e,t)=>{const n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}}const f=new g;function m(e,t,n,i,r){return f.registerColor(e,t,n,i,r)}function p(e,t){switch(e.op){case 0:return w(e.value,t)?.darken(e.factor);case 1:return w(e.value,t)?.lighten(e.factor);case 2:return w(e.value,t)?.transparent(e.factor);case 3:{const n=w(e.background,t);return n?w(e.value,t)?.makeOpaque(n):w(e.value,t)}case 4:for(const n of e.values){const e=w(n,t);if(e)return e}return;case 6:return w(t.defines(e.if)?e.then:e.else,t);case 5:{const n=w(e.value,t);if(!n)return;const i=w(e.background,t);return i?n.isDarkerThan(i)?s.Q1.getLighterColor(n,i,e.factor).transparent(e.transparency):s.Q1.getDarkerColor(n,i,e.factor).transparent(e.transparency):n.transparent(e.factor*e.transparency)}default:throw(0,i.xb)(e)}}function _(e,t){return{op:0,value:e,factor:t}}function b(e,t){return{op:1,value:e,factor:t}}function k(e,t){return{op:2,value:e,factor:t}}function v(...e){return{op:4,values:e}}function C(e,t,n){return{op:6,if:e,then:t,else:n}}function L(e,t,n,i){return{op:5,value:e,background:t,factor:n,transparency:i}}function w(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?s.Q1.fromHex(e):t.getColor(e):e instanceof s.Q1?e:"object"===typeof e?p(e,t):void 0}l.O.add(u.ColorContribution,f);const y="vscode://schemas/workbench-colors",S=l.O.as(a.F.JSONContribution);S.registerSchema(y,f.getColorSchema());const x=new r.uC((()=>S.notifySchemaChanged(y)),200);f.onDidChangeSchema((()=>{x.isScheduled()||x.schedule()}));const E=m("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},h.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),N=(m("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},h.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),m("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},h.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),m("descriptionForeground",{light:"#717171",dark:k(E,.7),hcDark:k(E,.7),hcLight:k(E,.7)},h.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),m("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},h.kg("iconForeground","The default color for icons in the workbench."))),I=m("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},h.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),T=m("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},h.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),A=m("contrastActiveBorder",{light:null,dark:null,hcDark:I,hcLight:I},h.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),D=(m("selection.background",null,h.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),m("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},h.kg("textLinkForeground","Foreground color for links in text.")),m("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},h.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),m("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Q1.black,hcLight:"#292929"},h.kg("textSeparatorForeground","Color for text separators.")),m("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},h.kg("textPreformatForeground","Foreground color for preformatted text segments.")),m("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},h.kg("textPreformatBackground","Background color for preformatted text segments.")),m("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},h.kg("textBlockQuoteBackground","Background color for block quotes in text.")),m("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Q1.white,hcLight:"#292929"},h.kg("textBlockQuoteBorder","Border color for block quotes in text.")),m("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Q1.black,hcLight:"#F2F2F2"},h.kg("textCodeBlockBackground","Background color for code blocks in text.")),m("sash.hoverBorder",I,h.kg("sashActiveBorder","Border color of active sashes.")),m("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Q1.black,hcLight:"#0F4A85"},h.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),M=(m("badge.foreground",{dark:s.Q1.white,light:"#333",hcDark:s.Q1.white,hcLight:s.Q1.white},h.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),m("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},h.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled."))),R=m("scrollbarSlider.background",{dark:s.Q1.fromHex("#797979").transparent(.4),light:s.Q1.fromHex("#646464").transparent(.4),hcDark:k(T,.6),hcLight:k(T,.4)},h.kg("scrollbarSliderBackground","Scrollbar slider background color.")),O=m("scrollbarSlider.hoverBackground",{dark:s.Q1.fromHex("#646464").transparent(.7),light:s.Q1.fromHex("#646464").transparent(.7),hcDark:k(T,.8),hcLight:k(T,.8)},h.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),B=m("scrollbarSlider.activeBackground",{dark:s.Q1.fromHex("#BFBFBF").transparent(.4),light:s.Q1.fromHex("#000000").transparent(.6),hcDark:T,hcLight:T},h.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),F=(m("progressBar.background",{dark:s.Q1.fromHex("#0E70C0"),light:s.Q1.fromHex("#0E70C0"),hcDark:T,hcLight:T},h.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),m("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("editorBackground","Editor background color."))),P=(m("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Q1.white,hcLight:E},h.kg("editorForeground","Editor default foreground color.")),m("editorStickyScroll.background",F,h.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),m("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),m("editorStickyScroll.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),m("editorStickyScroll.shadow",M,h.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),m("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Q1.white},h.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),z=m("editorWidget.foreground",E,h.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),V=m("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:T,hcLight:T},h.kg("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),W=(m("editorWidget.resizeBorder",null,h.kg("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),m("editorError.background",null,h.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},h.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),q=(m("editorError.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},h.kg("errorBorder","If set, color of double underlines for errors in the editor.")),m("editorWarning.background",null,h.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0)),H=m("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},h.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),U=m("editorWarning.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#FFCC00").transparent(.8),hcLight:s.Q1.fromHex("#FFCC00").transparent(.8)},h.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),j=(m("editorInfo.background",null,h.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},h.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),$=m("editorInfo.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},h.kg("infoBorder","If set, color of double underlines for infos in the editor.")),K=(m("editorHint.foreground",{dark:s.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},h.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),m("editorHint.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},h.kg("hintBorder","If set, color of double underlines for hints in the editor.")),m("editorLink.activeForeground",{dark:"#4E94CE",light:s.Q1.blue,hcDark:s.Q1.cyan,hcLight:"#292929"},h.kg("activeLinkForeground","Color of active links.")),m("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},h.kg("editorSelectionBackground","Color of the editor selection."))),G=(m("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Q1.white},h.kg("editorSelectionForeground","Color of the selected text for high contrast.")),m("editor.inactiveSelectionBackground",{light:k(K,.5),dark:k(K,.5),hcDark:k(K,.7),hcLight:k(K,.5)},h.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.selectionHighlightBackground",{light:L(K,F,.3,.6),dark:L(K,F,.3,.6),hcDark:null,hcLight:null},h.kg("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:A,hcLight:A},h.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),m("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},h.kg("editorFindMatch","Color of the current search match.")),m("editor.findMatchForeground",null,h.kg("editorFindMatchForeground","Text color of the current search match.")),m("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},h.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),Q=(m("editor.findMatchHighlightForeground",null,h.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),m("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},h.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.findMatchBorder",{light:null,dark:null,hcDark:A,hcLight:A},h.kg("editorFindMatchBorder","Border color of the current search match.")),m("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:A,hcLight:A},h.kg("findMatchHighlightBorder","Border color of the other search matches."))),Y=(m("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:k(A,.4),hcLight:k(A,.4)},h.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},h.kg("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorHoverWidget.background",P,h.kg("hoverBackground","Background color of the editor hover."))),X=(m("editorHoverWidget.foreground",z,h.kg("hoverForeground","Foreground color of the editor hover.")),m("editorHoverWidget.border",V,h.kg("hoverBorder","Border color of the editor hover.")),m("editorHoverWidget.statusBarBackground",{dark:b(Y,.2),light:_(Y,.05),hcDark:P,hcLight:P},h.kg("statusBarBackground","Background color of the editor hover status bar.")),m("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Q1.white,hcLight:s.Q1.black},h.kg("editorInlayHintForeground","Foreground color of inline hints"))),Z=m("editorInlayHint.background",{dark:k(D,.1),light:k(D,.1),hcDark:k(s.Q1.white,.1),hcLight:k(D,.1)},h.kg("editorInlayHintBackground","Background color of inline hints")),J=(m("editorInlayHint.typeForeground",X,h.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),m("editorInlayHint.typeBackground",Z,h.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),m("editorInlayHint.parameterForeground",X,h.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),m("editorInlayHint.parameterBackground",Z,h.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),m("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},h.kg("editorLightBulbForeground","The color used for the lightbulb actions icon."))),ee=(m("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},h.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),m("editorLightBulbAi.foreground",J,h.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),m("editor.snippetTabstopHighlightBackground",{dark:new s.Q1(new s.bU(124,124,124,.3)),light:new s.Q1(new s.bU(10,50,100,.2)),hcDark:new s.Q1(new s.bU(124,124,124,.3)),hcLight:new s.Q1(new s.bU(10,50,100,.2))},h.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),m("editor.snippetTabstopHighlightBorder",null,h.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),m("editor.snippetFinalTabstopHighlightBackground",null,h.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),m("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Q1(new s.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},h.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new s.Q1(new s.bU(155,185,85,.2))),te=new s.Q1(new s.bU(255,0,0,.2)),ne=(m("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},h.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},h.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.insertedLineBackground",{dark:ee,light:ee,hcDark:null,hcLight:null},h.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedLineBackground",{dark:te,light:te,hcDark:null,hcLight:null},h.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditorGutter.insertedLineBackground",null,h.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),m("diffEditorGutter.removedLineBackground",null,h.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),m("diffEditorOverview.insertedForeground",null,h.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),m("diffEditorOverview.removedForeground",null,h.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),m("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},h.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),m("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},h.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),m("diffEditor.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("diffEditorBorder","Border color between the two text editors.")),m("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},h.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),m("diffEditor.unchangedRegionBackground","sideBar.background",h.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedRegionForeground","foreground",h.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},h.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),m("widget.shadow",{dark:k(s.Q1.black,.36),light:k(s.Q1.black,.16),hcDark:null,hcLight:null},h.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),ie=(m("widget.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),m("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},h.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"))),re=(m("toolbar.hoverOutline",{dark:null,light:null,hcDark:A,hcLight:A},h.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),m("toolbar.activeBackground",{dark:b(ie,.1),light:_(ie,.1),hcDark:null,hcLight:null},h.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),m("breadcrumb.foreground",k(E,.8),h.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),m("breadcrumb.background",F,h.kg("breadcrumbsBackground","Background color of breadcrumb items.")),m("breadcrumb.focusForeground",{light:_(E,.2),dark:b(E,.1),hcDark:b(E,.1),hcLight:b(E,.1)},h.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),m("breadcrumb.activeSelectionForeground",{light:_(E,.2),dark:b(E,.1),hcDark:b(E,.1),hcLight:b(E,.1)},h.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),m("breadcrumbPicker.background",P,h.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),.5),se=s.Q1.fromHex("#40C8AE").transparent(re),oe=s.Q1.fromHex("#40A6FF").transparent(re),ae=s.Q1.fromHex("#606060").transparent(.4),le=.4,he=1,ce=m("merge.currentHeaderBackground",{dark:se,light:se,hcDark:null,hcLight:null},h.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),ue=(m("merge.currentContentBackground",k(ce,le),h.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.incomingHeaderBackground",{dark:oe,light:oe,hcDark:null,hcLight:null},h.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),de=(m("merge.incomingContentBackground",k(ue,le),h.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.commonHeaderBackground",{dark:ae,light:ae,hcDark:null,hcLight:null},h.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),ge=(m("merge.commonContentBackground",k(de,le),h.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},h.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),fe=(m("editorOverviewRuler.currentContentForeground",{dark:k(ce,he),light:k(ce,he),hcDark:ge,hcLight:ge},h.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.incomingContentForeground",{dark:k(ue,he),light:k(ue,he),hcDark:ge,hcLight:ge},h.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.commonContentForeground",{dark:k(de,he),light:k(de,he),hcDark:ge,hcLight:ge},h.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},h.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",h.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),m("problemsErrorIcon.foreground",W,h.kg("problemsErrorIconForeground","The color used for the problems error icon.")),m("problemsWarningIcon.foreground",H,h.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),m("problemsInfoIcon.foreground",j,h.kg("problemsInfoIconForeground","The color used for the problems info icon.")),m("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},h.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0)),me=(m("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},h.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),m("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},h.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),m("minimap.infoHighlight",{dark:j,light:j,hcDark:$,hcLight:$},h.kg("minimapInfo","Minimap marker color for infos."))),pe=m("minimap.warningHighlight",{dark:H,light:H,hcDark:U,hcLight:U},h.kg("overviewRuleWarning","Minimap marker color for warnings.")),_e=m("minimap.errorHighlight",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},h.kg("minimapError","Minimap marker color for errors.")),be=(m("minimap.background",null,h.kg("minimapBackground","Minimap background color.")),m("minimap.foregroundOpacity",s.Q1.fromHex("#000f"),h.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),m("minimapSlider.background",k(R,.5),h.kg("minimapSliderBackground","Minimap slider background color.")),m("minimapSlider.hoverBackground",k(O,.5),h.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),m("minimapSlider.activeBackground",k(B,.5),h.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),m("charts.foreground",E,h.kg("chartsForeground","The foreground color used in charts.")),m("charts.lines",k(E,.5),h.kg("chartsLines","The color used for horizontal lines in charts.")),m("charts.red",W,h.kg("chartsRed","The red color used in chart visualizations.")),m("charts.blue",j,h.kg("chartsBlue","The blue color used in chart visualizations.")),m("charts.yellow",H,h.kg("chartsYellow","The yellow color used in chart visualizations.")),m("charts.orange",fe,h.kg("chartsOrange","The orange color used in chart visualizations.")),m("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},h.kg("chartsGreen","The green color used in chart visualizations.")),m("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},h.kg("chartsPurple","The purple color used in chart visualizations.")),m("input.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputBoxBackground","Input box background.")),m("input.foreground",E,h.kg("inputBoxForeground","Input box foreground.")),m("input.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("inputBoxBorder","Input box border.")),m("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:T,hcLight:T},h.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields."))),ke=m("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},h.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),ve=m("inputOption.activeBackground",{dark:k(I,.4),light:k(I,.2),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},h.kg("inputOption.activeBackground","Background hover color of options in input fields.")),Ce=m("inputOption.activeForeground",{dark:s.Q1.white,light:s.Q1.black,hcDark:E,hcLight:E},h.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),Le=(m("input.placeholderForeground",{light:k(E,.5),dark:k(E,.5),hcDark:k(E,.7),hcLight:k(E,.7)},h.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),m("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationInfoBackground","Input validation background color for information severity.")),m("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:E},h.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),m("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:T,hcLight:T},h.kg("inputValidationInfoBorder","Input validation border color for information severity.")),m("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),m("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:E},h.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),m("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:T,hcLight:T},h.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),m("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationErrorBackground","Input validation background color for error severity.")),m("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:E},h.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),m("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:T,hcLight:T},h.kg("inputValidationErrorBorder","Input validation border color for error severity.")),m("dropdown.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("dropdownBackground","Dropdown background."))),we=(m("dropdown.listBackground",{dark:null,light:null,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("dropdownListBackground","Dropdown list background.")),m("dropdown.foreground",{dark:"#F0F0F0",light:E,hcDark:s.Q1.white,hcLight:E},h.kg("dropdownForeground","Dropdown foreground."))),ye=m("dropdown.border",{dark:Le,light:"#CECECE",hcDark:T,hcLight:T},h.kg("dropdownBorder","Dropdown border.")),Se=m("button.foreground",s.Q1.white,h.kg("buttonForeground","Button foreground color.")),xe=(m("button.separator",k(Se,.4),h.kg("buttonSeparator","Button separator color.")),m("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},h.kg("buttonBackground","Button background color."))),Ee=(m("button.hoverBackground",{dark:b(xe,.2),light:_(xe,.2),hcDark:xe,hcLight:xe},h.kg("buttonHoverBackground","Button background color when hovering.")),m("button.border",T,h.kg("buttonBorder","Button border color.")),m("button.secondaryForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:s.Q1.white,hcLight:E},h.kg("buttonSecondaryForeground","Secondary button foreground color.")),m("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Q1.white},h.kg("buttonSecondaryBackground","Secondary button background color."))),Ne=(m("button.secondaryHoverBackground",{dark:b(Ee,.2),light:_(Ee,.2),hcDark:null,hcLight:null},h.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),m("radio.activeForeground",Ce,h.kg("radioActiveForeground","Foreground color of active radio option."))),Ie=(m("radio.activeBackground",ve,h.kg("radioBackground","Background color of active radio option.")),m("radio.activeBorder",be,h.kg("radioActiveBorder","Border color of the active radio option.")),m("radio.inactiveForeground",null,h.kg("radioInactiveForeground","Foreground color of inactive radio option.")),m("radio.inactiveBackground",null,h.kg("radioInactiveBackground","Background color of inactive radio option.")),m("radio.inactiveBorder",{light:k(Ne,.2),dark:k(Ne,.2),hcDark:k(Ne,.4),hcLight:k(Ne,.2)},h.kg("radioInactiveBorder","Border color of the inactive radio option.")),m("radio.inactiveHoverBackground",ke,h.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),m("checkbox.background",Le,h.kg("checkbox.background","Background color of checkbox widget.")),m("checkbox.selectBackground",P,h.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),m("checkbox.foreground",we,h.kg("checkbox.foreground","Foreground color of checkbox widget.")),m("checkbox.border",ye,h.kg("checkbox.border","Border color of checkbox widget.")),m("checkbox.selectBorder",N,h.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),m("keybindingLabel.background",{dark:new s.Q1(new s.bU(128,128,128,.17)),light:new s.Q1(new s.bU(221,221,221,.4)),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},h.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.foreground",{dark:s.Q1.fromHex("#CCCCCC"),light:s.Q1.fromHex("#555555"),hcDark:s.Q1.white,hcLight:E},h.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.border",{dark:new s.Q1(new s.bU(51,51,51,.6)),light:new s.Q1(new s.bU(204,204,204,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:T},h.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.bottomBorder",{dark:new s.Q1(new s.bU(68,68,68,.6)),light:new s.Q1(new s.bU(187,187,187,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:E},h.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),m("list.focusBackground",null,h.kg("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusForeground",null,h.kg("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusOutline",{dark:I,light:I,hcDark:A,hcLight:A},h.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusAndSelectionOutline",null,h.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),m("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),Te=m("list.activeSelectionForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:null,hcLight:null},h.kg("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ae=m("list.activeSelectionIconForeground",null,h.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),De=(m("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveSelectionForeground",null,h.kg("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveSelectionIconForeground",null,h.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveFocusBackground",null,h.kg("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveFocusOutline",null,h.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Q1.white.transparent(.1),hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),m("list.hoverForeground",null,h.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),m("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},h.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),m("list.dropBetweenBackground",{dark:N,light:N,hcDark:null,hcLight:null},h.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),m("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:I,hcLight:I},h.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree."))),Me=(m("list.focusHighlightForeground",{dark:De,light:C(Ie,De,"#BBE7FF"),hcDark:De,hcLight:De},h.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),m("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},h.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),m("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},h.kg("listErrorForeground","Foreground color of list items containing errors.")),m("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},h.kg("listWarningForeground","Foreground color of list items containing warnings.")),m("listFilterWidget.background",{light:_(P,0),dark:b(P,0),hcDark:P,hcLight:P},h.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),m("listFilterWidget.outline",{dark:s.Q1.transparent,light:s.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},h.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),m("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:T,hcLight:T},h.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),m("listFilterWidget.shadow",ne,h.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),m("list.filterMatchBackground",{dark:G,light:G,hcDark:null,hcLight:null},h.kg("listFilterMatchHighlight","Background color of the filtered match.")),m("list.filterMatchBorder",{dark:Q,light:Q,hcDark:T,hcLight:A},h.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),m("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},h.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),m("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},h.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),Re=(m("tree.inactiveIndentGuidesStroke",k(Me,.4),h.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),m("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},h.kg("tableColumnsBorder","Table border color between columns.")),m("tree.tableOddRowsBackground",{dark:k(E,.04),light:k(E,.04),hcDark:null,hcLight:null},h.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),m("editorActionList.background",P,h.kg("editorActionListBackground","Action List background color.")),m("editorActionList.foreground",z,h.kg("editorActionListForeground","Action List foreground color.")),m("editorActionList.focusForeground",Te,h.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),m("editorActionList.focusBackground",Ie,h.kg("editorActionListFocusBackground","Action List background color for the focused item.")),m("menu.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("menuBorder","Border color of menus.")),m("menu.foreground",we,h.kg("menuForeground","Foreground color of menu items.")),m("menu.background",Le,h.kg("menuBackground","Background color of menu items.")),m("menu.selectionForeground",Te,h.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),m("menu.selectionBackground",Ie,h.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),m("menu.selectionBorder",{dark:null,light:null,hcDark:A,hcLight:A},h.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),m("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:T,hcLight:T},h.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),m("quickInput.background",P,h.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),m("quickInput.foreground",z,h.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),m("quickInputTitle.background",{dark:new s.Q1(new s.bU(255,255,255,.105)),light:new s.Q1(new s.bU(0,0,0,.06)),hcDark:"#000000",hcLight:s.Q1.white},h.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),m("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Q1.white,hcLight:"#0F4A85"},h.kg("pickerGroupForeground","Quick picker color for grouping labels.")),m("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Q1.white,hcLight:"#0F4A85"},h.kg("pickerGroupBorder","Quick picker color for grouping borders.")),m("quickInput.list.focusBackground",null,"",void 0,h.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")));m("quickInputList.focusForeground",Te,h.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),m("quickInputList.focusIconForeground",Ae,h.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),m("quickInputList.focusBackground",{dark:v(Re,Ie),light:v(Re,Ie),hcDark:null,hcLight:null},h.kg("quickInput.listFocusBackground","Quick picker background color for the focused item.")),m("search.resultsInfoForeground",{light:E,dark:k(E,.65),hcDark:E,hcLight:E},h.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),m("searchEditor.findMatchBackground",{light:k(G,.66),dark:k(G,.66),hcDark:G,hcLight:G},h.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),m("searchEditor.findMatchBorder",{light:k(Q,.66),dark:k(Q,.66),hcDark:Q,hcLight:Q},h.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},3711:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>l,zy:()=>g,Yf:()=>h});var i,r=n(231),s=n(8894),o=n(7778),a=n(6374);(function(e){e["DARK"]="dark",e["LIGHT"]="light",e["HIGH_CONTRAST_DARK"]="hcDark",e["HIGH_CONTRAST_LIGHT"]="hcLight"})(i||(i={}));const l=(0,o.u1)("themeService");function h(e){return{id:e}}const c={ThemingContribution:"base.contributions.theming"};class u{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new r.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,s.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}}const d=new u;function g(e){return d.onColorThemeChange(e)}a.O.add(c.ThemingContribution,d);s.jG},5890:(e,t,n)=>{var i={"./simpleWorker":1352,"./simpleWorker.js":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker.js":1352};function r(e){return Promise.resolve().then((()=>{if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var r=i[e];return n(r)}))}r.keys=()=>Object.keys(i),r.id=5890,e.exports=r},9204:(e,t,n)=>{var i={"./editorBaseApi":[215],"./editorBaseApi.js":[215],"./editorSimpleWorker":[5926],"./editorSimpleWorker.js":[5926],"./editorWorker":[4117,792],"./editorWorker.js":[4117,792],"./editorWorkerHost":[2899],"./editorWorkerHost.js":[2899],"./findSectionHeaders":[6198],"./findSectionHeaders.js":[6198],"./getIconClasses":[2340,792],"./getIconClasses.js":[2340,792],"./languageFeatureDebounce":[2454,792],"./languageFeatureDebounce.js":[2454,792],"./languageFeatures":[2847,792],"./languageFeatures.js":[2847,792],"./languageFeaturesService":[1369,792],"./languageFeaturesService.js":[1369,792],"./languageService":[2657,792],"./languageService.js":[2657,792],"./languagesAssociations":[5911,792],"./languagesAssociations.js":[5911,792],"./languagesRegistry":[7024,792],"./languagesRegistry.js":[7024,792],"./markerDecorations":[3637,792],"./markerDecorations.js":[3637,792],"./markerDecorationsService":[9420,792],"./markerDecorationsService.js":[9420,792],"./model":[9361,792],"./model.js":[9361,792],"./modelService":[2713,792],"./modelService.js":[2713,792],"./resolverService":[4037,792],"./resolverService.js":[4037,792],"./semanticTokensDto":[3699,792],"./semanticTokensDto.js":[3699,792],"./semanticTokensProviderStyling":[4686,792],"./semanticTokensProviderStyling.js":[4686,792],"./semanticTokensStyling":[7284,792],"./semanticTokensStyling.js":[7284,792],"./semanticTokensStylingService":[2205,792],"./semanticTokensStylingService.js":[2205,792],"./textModelSync/textModelSync.impl":[6294],"./textModelSync/textModelSync.impl.js":[6294],"./textModelSync/textModelSync.protocol":[4977,792],"./textModelSync/textModelSync.protocol.js":[4977,792],"./textResourceConfiguration":[6151,792],"./textResourceConfiguration.js":[6151,792],"./treeSitterParserService":[5863,792],"./treeSitterParserService.js":[5863,792],"./treeViewsDnd":[1210,792],"./treeViewsDnd.js":[1210,792],"./treeViewsDndService":[5231,792],"./treeViewsDndService.js":[5231,792],"./unicodeTextModelHighlighter":[7412],"./unicodeTextModelHighlighter.js":[7412],"monaco-editor/esm/vs/editor/common/services/editorBaseApi":[215],"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":[215],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":[5926],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":[5926],"monaco-editor/esm/vs/editor/common/services/editorWorker":[4117,792],"monaco-editor/esm/vs/editor/common/services/editorWorker.js":[4117,792],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":[2899],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":[2899],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":[6198],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":[6198],"monaco-editor/esm/vs/editor/common/services/getIconClasses":[2340,792],"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":[2340,792],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":[2454,792],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":[2454,792],"monaco-editor/esm/vs/editor/common/services/languageFeatures":[2847,792],"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":[2847,792],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":[1369,792],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":[1369,792],"monaco-editor/esm/vs/editor/common/services/languageService":[2657,792],"monaco-editor/esm/vs/editor/common/services/languageService.js":[2657,792],"monaco-editor/esm/vs/editor/common/services/languagesAssociations":[5911,792],"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":[5911,792],"monaco-editor/esm/vs/editor/common/services/languagesRegistry":[7024,792],"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":[7024,792],"monaco-editor/esm/vs/editor/common/services/markerDecorations":[3637,792],"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":[3637,792],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":[9420,792],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":[9420,792],"monaco-editor/esm/vs/editor/common/services/model":[9361,792],"monaco-editor/esm/vs/editor/common/services/model.js":[9361,792],"monaco-editor/esm/vs/editor/common/services/modelService":[2713,792],"monaco-editor/esm/vs/editor/common/services/modelService.js":[2713,792],"monaco-editor/esm/vs/editor/common/services/resolverService":[4037,792],"monaco-editor/esm/vs/editor/common/services/resolverService.js":[4037,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":[3699,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":[3699,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":[4686,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":[4686,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":[7284,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":[7284,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":[2205,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":[2205,792],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":[6294],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":[6294],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":[4977,792],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":[4977,792],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":[6151,792],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":[6151,792],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":[5863,792],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":[5863,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":[1210,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":[1210,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":[5231,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":[5231,792],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":[7412],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":[7412]};function r(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(r)))}r.keys=()=>Object.keys(i),r.id=9204,e.exports=r},7614:(e,t,n)=>{var i={"./editorBaseApi":215,"./editorBaseApi.js":215,"./editorSimpleWorker":5926,"./editorSimpleWorker.js":5926,"./editorWorker":4117,"./editorWorker.js":4117,"./editorWorkerHost":2899,"./editorWorkerHost.js":2899,"./findSectionHeaders":6198,"./findSectionHeaders.js":6198,"./getIconClasses":2340,"./getIconClasses.js":2340,"./languageFeatureDebounce":2454,"./languageFeatureDebounce.js":2454,"./languageFeatures":2847,"./languageFeatures.js":2847,"./languageFeaturesService":1369,"./languageFeaturesService.js":1369,"./languageService":2657,"./languageService.js":2657,"./languagesAssociations":5911,"./languagesAssociations.js":5911,"./languagesRegistry":7024,"./languagesRegistry.js":7024,"./markerDecorations":3637,"./markerDecorations.js":3637,"./markerDecorationsService":9420,"./markerDecorationsService.js":9420,"./model":9361,"./model.js":9361,"./modelService":2713,"./modelService.js":2713,"./resolverService":4037,"./resolverService.js":4037,"./semanticTokensDto":3699,"./semanticTokensDto.js":3699,"./semanticTokensProviderStyling":4686,"./semanticTokensProviderStyling.js":4686,"./semanticTokensStyling":7284,"./semanticTokensStyling.js":7284,"./semanticTokensStylingService":2205,"./semanticTokensStylingService.js":2205,"./textModelSync/textModelSync.impl":6294,"./textModelSync/textModelSync.impl.js":6294,"./textModelSync/textModelSync.protocol":4977,"./textModelSync/textModelSync.protocol.js":4977,"./textResourceConfiguration":6151,"./textResourceConfiguration.js":6151,"./treeSitterParserService":5863,"./treeSitterParserService.js":5863,"./treeViewsDnd":1210,"./treeViewsDnd.js":1210,"./treeViewsDndService":5231,"./treeViewsDndService.js":5231,"./unicodeTextModelHighlighter":7412,"./unicodeTextModelHighlighter.js":7412,"monaco-editor/esm/vs/editor/common/services/editorBaseApi":215,"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":215,"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":5926,"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":5926,"monaco-editor/esm/vs/editor/common/services/editorWorker":4117,"monaco-editor/esm/vs/editor/common/services/editorWorker.js":4117,"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":2899,"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":2899,"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":6198,"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":6198,"monaco-editor/esm/vs/editor/common/services/getIconClasses":2340,"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":2340,"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":2454,"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":2454,"monaco-editor/esm/vs/editor/common/services/languageFeatures":2847,"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":2847,"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":1369,"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":1369,"monaco-editor/esm/vs/editor/common/services/languageService":2657,"monaco-editor/esm/vs/editor/common/services/languageService.js":2657,"monaco-editor/esm/vs/editor/common/services/languagesAssociations":5911,"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":5911,"monaco-editor/esm/vs/editor/common/services/languagesRegistry":7024,"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":7024,"monaco-editor/esm/vs/editor/common/services/markerDecorations":3637,"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":3637,"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":9420,"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":9420,"monaco-editor/esm/vs/editor/common/services/model":9361,"monaco-editor/esm/vs/editor/common/services/model.js":9361,"monaco-editor/esm/vs/editor/common/services/modelService":2713,"monaco-editor/esm/vs/editor/common/services/modelService.js":2713,"monaco-editor/esm/vs/editor/common/services/resolverService":4037,"monaco-editor/esm/vs/editor/common/services/resolverService.js":4037,"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":3699,"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":3699,"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":4686,"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":4686,"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":7284,"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":7284,"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":2205,"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":2205,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":6294,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":6294,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":4977,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":4977,"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":6151,"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":6151,"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":5863,"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":5863,"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":1210,"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":1210,"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":5231,"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":5231,"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":7412,"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":7412};function r(e){var t=s(e);return n(t)}function s(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=s,e.exports=r,r.id=7614}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}(()=>{n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{n.e=()=>Promise.resolve()})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();(()=>{"use strict";var e=n(1352),t=n(5926),i=n(2899);let r=!1;function s(n){if(r)return;r=!0;const s=new e.SimpleWorkerServer((e=>{globalThis.postMessage(e)}),(e=>new t.EditorSimpleWorker(i.EditorWorkerHost.getChannel(e),n)));globalThis.onmessage=e=>{s.onmessage(e.data)}}globalThis.onmessage=e=>{r||s(null)}})()})(); \ No newline at end of file +(()=>{var e={5053:(e,t,n)=>{"use strict";function i(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,r=e.length;ie){const n=new Set;return e.filter((e=>{const i=t(e);return!n.has(i)&&(n.add(i),!0)}))}function l(e,t){return e.length>0?e[0]:t}function h(e,t,n){const i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)}function c(e,t){for(const n of t)e.push(n)}var u;function d(e,t){return(n,i)=>t(e(n),e(i))}n.d(t,{E4:()=>c,Fy:()=>l,Hw:()=>f,U9:()=>g,VE:()=>d,aI:()=>i,c1:()=>p,dM:()=>a,j3:()=>m,kj:()=>o,n:()=>r,nK:()=>h,pN:()=>s}),function(e){function t(e){return e<0}function n(e){return e<=0}function i(e){return e>0}function r(e){return 0===e}e.isLessThan=t,e.isLessThanOrEqual=n,e.isGreaterThan=i,e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(u||(u={}));const g=(e,t)=>e-t;function f(e){return(t,n)=>-e(t,n)}class m{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;while(t=0&&e(this.items[t]))t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class p{static{this.empty=new p((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new p((t=>this.iterate((n=>!e(n)||t(n)))))}map(e){return new p((t=>this.iterate((n=>t(e(n))))))}findLast(e){let t;return this.iterate((n=>(e(n)&&(t=n),!0))),t}findLastMaxBy(e){let t,n=!0;return this.iterate((i=>((n||u.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0))),t}}},3654:(e,t,n)=>{"use strict";function i(e,t){const n=r(e,t);if(-1!==n)return e[n]}function r(e,t,n=e.length-1){for(let i=n;i>=0;i--){const n=e[i];if(t(n))return i}return-1}function s(e,t){const n=o(e,t);return-1===n?void 0:e[n]}function o(e,t,n=0,i=e.length){let r=n,s=i;while(ri,XP:()=>a,hw:()=>l,iM:()=>o,lx:()=>s,vJ:()=>h});class h{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(h.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=o(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}},9109:(e,t,n)=>{"use strict";n.d(t,{Ft:()=>o,Xo:()=>a,ok:()=>r,xb:()=>s});var i=n(4396);function r(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function o(e){e()||(e(),(0,i.dz)(new i.D7("Assertion Failed")))}function a(e,t){let n=0;while(n{"use strict";n.d(t,{vb:()=>l,uC:()=>h,Qg:()=>a,$6:()=>c});n(7792);var i=n(4396),r=n(231),s=n(8894),o=n(5160);Symbol("MicrotaskDelay");function a(e){return!!e&&"function"===typeof e.then}class l{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new i.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const r=n.setInterval((()=>{e()}),t);this.disposable=(0,s.s)((()=>{n.clearInterval(r),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class h{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let c,u;(function(){u="function"!==typeof globalThis.requestIdleCallback||"function"!==typeof globalThis.cancelIdleCallback?(e,t)=>{(0,o._p)((()=>{if(n)return;const e=Date.now()+15,i={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(i))}));let n=!1;return{dispose(){n||(n=!0)}}}:(e,t,n)=>{const i=e.requestIdleCallback(t,"number"===typeof n?{timeout:n}:void 0);let r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(i))}}},c=e=>u(globalThis,e)})();var d;(function(e){async function t(e){let t;const n=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if("undefined"!==typeof t)throw t;return n}function n(e){return new Promise((async(t,n)=>{try{await e(t,n)}catch(e){n(e)}}))}e.settled=t,e.withAsyncBody=n})(d||(d={}));class g{static fromArray(e){return new g((t=>{t.emitMany(e)}))}static fromPromise(e){return new g((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new g((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new g((async t=>{await Promise.all(e.map((async e=>{for await(const n of e)t.emitOne(n)})))}))}static{this.EMPTY=g.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new r.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new g((async n=>{for await(const i of e)n.emitOne(t(i))}))}map(e){return g.map(this,e)}static filter(e,t){return new g((async n=>{for await(const i of e)t(i)&&n.emitOne(i)}))}filter(e){return g.filter(this,e)}static coalesce(e){return g.filter(e,(e=>!!e))}coalesce(){return g.coalesce(this)}static async toPromise(e){const t=[];for await(const n of e)t.push(n);return t}toPromise(){return g.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}},7885:(e,t,n)=>{"use strict";n.d(t,{$l:()=>a,Gs:()=>d,MB:()=>o,Sw:()=>c,bb:()=>h,gN:()=>l,pJ:()=>u});var i=n(5661);const r="undefined"!==typeof Buffer;new i.d((()=>new Uint8Array(256)));let s;class o{static wrap(e){return r&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new o(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return r?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function l(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function h(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function c(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function u(e,t){return e[t]}function d(e,t,n){e[n]=t}},7389:(e,t,n)=>{"use strict";function i(e){return e}n.d(t,{VV:()=>s,o5:()=>r});class r{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"===typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class s{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"===typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const n=this._fn(e);return this._map.set(e,n),this._map2.set(t,n),n}}},7792:(e,t,n)=>{"use strict";n.d(t,{Qi:()=>a});var i=n(231);const r=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var s;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof o||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r})})(s||(s={}));class o{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?r:(this._emitter||(this._emitter=new i.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token instanceof o&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=s.None}}},6455:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var i=n(322);const r=Object.create(null);function s(e,t){if((0,i.Kg)(t)){const n=r[t];if(void 0===n)throw new Error(`${e} references an unknown codicon: ${t}`);t=n}return r[e]=t,{id:e}}const o={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),gitPullRequestLabel:s("git-pull-request-label",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugHint:s("debug-hint",60017),terminalDecorationSuccess:s("terminal-decoration-success",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circleOutline:s("circle-outline",60092),circle:s("circle",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:s("terminal-decoration-incomplete",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),diffSidebyside:s("diff-sidebyside",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),compareChanges:s("compare-changes",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),gitPullRequestMilestone:s("git-pull-request-milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),terminalDecorationMark:s("terminal-decoration-mark",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),debugAlt:s("debug-alt",60305),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),gitPullRequestReviewer:s("git-pull-request-reviewer",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),gitPullRequestAssignee:s("git-pull-request-assignee",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),issueClosed:s("issue-closed",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),export:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnknown:s("workspace-unknown",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracket:s("bracket",60175),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newline:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),terminalDecorationError:s("terminal-decoration-error",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),blank:s("blank",60419),heartFilled:s("heart-filled",60420),map:s("map",60421),mapHorizontal:s("map-horizontal",60421),foldHorizontal:s("fold-horizontal",60421),mapFilled:s("map-filled",60422),mapHorizontalFilled:s("map-horizontal-filled",60422),foldHorizontalFilled:s("fold-horizontal-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),send:s("send",60431),sparkle:s("sparkle",60432),insert:s("insert",60433),mic:s("mic",60434),thumbsdownFilled:s("thumbsdown-filled",60435),thumbsupFilled:s("thumbsup-filled",60436),coffee:s("coffee",60437),snake:s("snake",60438),game:s("game",60439),vr:s("vr",60440),chip:s("chip",60441),piano:s("piano",60442),music:s("music",60443),micFilled:s("mic-filled",60444),repoFetch:s("repo-fetch",60445),copilot:s("copilot",60446),lightbulbSparkle:s("lightbulb-sparkle",60447),robot:s("robot",60448),sparkleFilled:s("sparkle-filled",60449),diffSingle:s("diff-single",60450),diffMultiple:s("diff-multiple",60451),surroundWith:s("surround-with",60452),share:s("share",60453),gitStash:s("git-stash",60454),gitStashApply:s("git-stash-apply",60455),gitStashPop:s("git-stash-pop",60456),vscode:s("vscode",60457),vscodeInsiders:s("vscode-insiders",60458),codeOss:s("code-oss",60459),runCoverage:s("run-coverage",60460),runAllCoverage:s("run-all-coverage",60461),coverage:s("coverage",60462),githubProject:s("github-project",60463),mapVertical:s("map-vertical",60464),foldVertical:s("fold-vertical",60464),mapVerticalFilled:s("map-vertical-filled",60465),foldVerticalFilled:s("fold-vertical-filled",60465),goToSearch:s("go-to-search",60466),percentage:s("percentage",60467),sortPercentage:s("sort-percentage",60467),attach:s("attach",60468)},a={dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left"),dropDownButton:s("drop-down-button",60084),symbolCustomColor:s("symbol-customcolor",60252),exportIcon:s("export",60332),workspaceUnspecified:s("workspace-unspecified",60355),newLine:s("newline",60394),thumbsDownFilled:s("thumbsdown-filled",60435),thumbsUpFilled:s("thumbsup-filled",60436),gitFetch:s("git-fetch",60445),lightbulbSparkleAutofix:s("lightbulb-sparkle-autofix",60447),debugBreakpointPending:s("debug-breakpoint-pending",60377)},l={...o,...a}},5476:(e,t,n)=>{"use strict";function i(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,{Q1:()=>a,bU:()=>r,hB:()=>s});class r{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=e.a,o=Math.max(t,n,i),a=Math.min(t,n,i);let l=0,h=0;const c=(a+o)/2,u=o-a;if(u>0){switch(h=Math.min(c<=.5?u/(2*c):u/(2-2*c),1),o){case t:l=(n-i)/u+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:o}=e;let a,l,h;if(0===n)a=l=h=i;else{const e=i<.5?i*(1+n):i+n-i*n,r=2*i-e;a=s._hue2rgb(r,e,t+1/3),l=s._hue2rgb(r,e,t),h=s._hue2rgb(r,e,t-1/3)}return new r(Math.round(255*a),Math.round(255*l),Math.round(255*h),o)}}class o{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=Math.max(t,n,i),s=Math.min(t,n,i),a=r-s,l=0===r?0:a/r;let h;return h=0===a?0:r===t?((n-i)/a%6+6)%6:r===n?(i-t)/a+2:(t-n)/a+4,new o(Math.round(60*h),l,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:s}=e,o=i*n,a=o*(1-Math.abs(t/60%2-1)),l=i-o;let[h,c,u]=[0,0,0];return t<60?(h=o,c=a):t<120?(h=a,c=o):t<180?(c=o,u=a):t<240?(c=a,u=o):t<300?(h=a,u=o):t<=360&&(h=o,u=a),h=Math.round(255*(h+l)),c=Math.round(255*(c+l)),u=Math.round(255*(u+l)),new r(h,c,u,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof r)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof o))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=o.toRGBA(e)}}equals(e){return!!e&&r.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&o.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g),n=a._relativeLuminanceForComponent(this.rgba.b),r=.2126*e+.7152*t+.0722*n;return i(r,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t{"use strict";n.d(t,{D7:()=>f,EM:()=>d,Qg:()=>c,cU:()=>o,dz:()=>s,iH:()=>u});class i{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(g.isErrorNoTelemetry(e))throw new g(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const r=new i;function s(e){l(e)||r.onUnexpectedError(e)}function o(e){if(e instanceof Error){const{name:t,message:n}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i,noTelemetry:g.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof h||e instanceof Error&&e.name===a&&e.message===a}class h extends Error{constructor(){super(a),this.name=this.message}}function c(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class d extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class g extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof g)return e;const t=new g;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}},231:(e,t,n)=>{"use strict";n.d(t,{Jh:()=>h,vl:()=>v});var i=n(4396),r=n(8894),s=(n(7806),n(4240));const o=!1,a=!1,l=!1;var h;(function(e){function t(e){if(l){const{onDidAddListener:t}=e,n=g.create();let i=0;e.onDidAddListener=()=>{2===++i&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),n.print()),t?.()}}}function n(e,t){return p(e,(()=>{}),0,void 0,!0,void 0,t)}function i(e){return(t,n=null,i)=>{let r,s=!1;return r=e((e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)}),null,i),s&&r.dispose(),r}}function s(t,n){return e.once(e.filter(t,n))}function o(e,t,n){return f(((n,i=null,r)=>e((e=>n.call(i,t(e))),null,r)),n)}function a(e,t,n){return f(((n,i=null,r)=>e((e=>{t(e),n.call(i,e)}),null,r)),n)}function h(e,t,n){return f(((n,i=null,r)=>e((e=>t(e)&&n.call(i,e)),null,r)),n)}function c(e){return e}function u(...e){return(t,n=null,i)=>{const s=(0,r.qE)(...e.map((e=>e((e=>t.call(n,e))))));return m(s,i)}}function d(e,t,n,i){let r=n;return o(e,(e=>(r=t(r,e),r)),i)}function f(e,n){let i;const r={onWillAddFirstListener(){i=e(s.fire,s)},onDidRemoveLastListener(){i?.dispose()}};n||t(r);const s=new v(r);return n?.add(s),s.event}function m(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function p(e,n,i=100,r=!1,s=!1,o,a){let l,h,c,u,d=0;const g={leakWarningThreshold:o,onWillAddFirstListener(){l=e((e=>{d++,h=n(h,e),r&&!c&&(f.fire(h),h=void 0),u=()=>{const e=h;h=void 0,c=void 0,(!r||d>1)&&f.fire(e),d=0},"number"===typeof i?(clearTimeout(c),c=setTimeout(u,i)):void 0===c&&(c=0,queueMicrotask(u))}))},onWillRemoveListener(){s&&d>0&&u?.()},onDidRemoveLastListener(){u=void 0,l.dispose()}};a||t(g);const f=new v(g);return a?.add(f),f.event}function _(t,n=0,i){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),n,void 0,!0,void 0,i)}function b(e,t=(e,t)=>e===t,n){let i,r=!0;return h(e,(e=>{const n=r||!t(e,i);return r=!1,i=e,n}),n)}function k(t,n,i){return[e.filter(t,n,i),e.filter(t,(e=>!n(e)),i)]}function C(e,t=!1,n=[],i){let r=n.slice(),s=e((e=>{r?r.push(e):a.fire(e)}));i&&i.add(s);const o=()=>{r?.forEach((e=>a.fire(e))),r=null},a=new v({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),i&&i.add(s))},onDidAddFirstListener(){r&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return i&&i.add(a),a.event}function L(e,t){const n=(n,i,r)=>{const s=t(new y);return e((function(e){const t=s.evaluate(e);t!==w&&n.call(i,t)}),void 0,r)};return n}e.None=()=>r.jG.None,e.defer=n,e.once=i,e.onceIf=s,e.map=o,e.forEach=a,e.filter=h,e.signal=c,e.any=u,e.reduce=d,e.debounce=p,e.accumulate=_,e.latch=b,e.split=k,e.buffer=C,e.chain=L;const w=Symbol("HaltChainable");class y{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:w)),this}reduce(e,t){let n=t;return this.steps.push((t=>(n=e(n,t),n))),this}latch(e=(e,t)=>e===t){let t,n=!0;return this.steps.push((i=>{const r=n||!e(i,t);return n=!1,t=i,r?i:w})),this}evaluate(e){for(const t of this.steps)if(e=t(e),e===w)break;return e}}function S(e,t,n=e=>e){const i=(...e)=>o.fire(n(...e)),r=()=>e.on(t,i),s=()=>e.removeListener(t,i),o=new v({onWillAddFirstListener:r,onDidRemoveLastListener:s});return o.event}function x(e,t,n=e=>e){const i=(...e)=>o.fire(n(...e)),r=()=>e.addEventListener(t,i),s=()=>e.removeEventListener(t,i),o=new v({onWillAddFirstListener:r,onDidRemoveLastListener:s});return o.event}function E(e){return new Promise((t=>i(e)(t)))}function N(e){const t=new v;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event}function I(e,t){return e((e=>t.fire(e)))}function T(e,t,n){return t(n),e((e=>t(e)))}e.fromNodeEventEmitter=S,e.fromDOMEventEmitter=x,e.toPromise=E,e.fromPromise=N,e.forward=I,e.runAndSubscribe=T;class A{constructor(e,n){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};n||t(i),this.emitter=new v(i),n&&n.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function D(e,t){const n=new A(e,t);return n.emitter.event}function M(e){return(t,n,i)=>{let s=0,o=!1;const a={beginUpdate(){s++},endUpdate(){s--,0===s&&(e.reportChanges(),o&&(o=!1,t.call(n)))},handlePossibleChange(){},handleChange(){o=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return i instanceof r.Cm?i.add(l):Array.isArray(i)&&i.push(l),l}}e.fromObservable=D,e.fromObservableLight=M})(h||(h={}));class c{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${c._idPool++}`,c.all.add(this)}start(e){this._stopWatch=new s.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}let u=-1;class d{static{this._idPool=1}constructor(e,t,n=(d._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[n,i]of this._stacks)(!e||t{if(e instanceof p)t(e);else for(let n=0;n{0!==e.length&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join("\n")),e.length=0)}),3e3),k=new FinalizationRegistry((t=>{"string"===typeof t&&e.push(t)}))}class v{constructor(e){this._size=0,this._options=e,this._leakageMon=u>0||this._options?.leakWarningThreshold?new d(e?.onListenerError??i.dz,this._options?.leakWarningThreshold??u):void 0,this._perfMon=this._options?._profName?new c(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(a){const e=this._listeners;queueMicrotask((()=>{b(e,(e=>e.stack?.print()))}))}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],n=new m(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]),s=this._options?.onListenerError||i.dz;return s(n),r.jG.None}if(this._disposed)return r.jG.None;t&&(e=e.bind(t));const s=new p(e);let o,l;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(s.stack=g.create(),o=this._leakageMon.check(s.stack,this._size+1)),a&&(s.stack=l??g.create()),this._listeners?this._listeners instanceof p?(this._deliveryQueue??=new C,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;const h=(0,r.s)((()=>{k?.unregister(h),o?.(),this._removeListener(s)}));if(n instanceof r.Cm?n.add(h):Array.isArray(n)&&n.push(h),k){const e=(new Error).stack.split("\n").slice(2,3).join("\n").trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);k.register(h,t?.[2]??e,h)}return h},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,n=t.indexOf(e);if(-1===n)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const i=this._deliveryQueue.current===this;if(this._size*_<=t.length){let e=0;for(let n=0;n0}}class C{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}},7531:(e,t,n)=>{"use strict";n.d(t,{TH:()=>o,Zn:()=>l,_1:()=>h,kb:()=>a});var i=n(1643),r=(n(5160),n(601));function s(e){return 47===e||92===e}function o(e){return e.replace(/[\\/]/g,i.SA.sep)}function a(e){return-1===e.indexOf("/")&&(e=o(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function l(e,t=i.SA.sep){if(!e)return"";const n=e.length,r=e.charCodeAt(0);if(s(r)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){let i=3;const r=i;for(;ie.length)return!1;if(n){const n=(0,r.ns)(e,t);if(!n)return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===s&&i--,e.charAt(i)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}function c(e){return e>=65&&e<=90||e>=97&&e<=122}},3589:(e,t,n)=>{"use strict";n.d(t,{YW:()=>R,qg:()=>O});var i=n(3723),r=n(7531),s=n(1553),o=n(1643),a=n(5160),l=n(601);const h="**",c="/",u="[/\\\\]",d="[^/\\\\]",g=/\//g;function f(e,t){switch(e){case 0:return"";case 1:return`${d}*?`;default:return`(?:${u}|${d}+${u}${t?`|${u}${d}+`:""})*?`}}function m(e,t){if(!e)return[];const n=[];let i=!1,r=!1,s="";for(const o of e){switch(o){case t:if(!i&&!r){n.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1;break}s+=o}return s&&n.push(s),n}function p(e){if(!e)return"";let t="";const n=m(e,c);if(n.every((e=>e===h)))t=".*";else{let e=!1;n.forEach(((i,r)=>{if(i===h){if(e)return;t+=f(2,r===n.length-1)}else{let e=!1,s="",o=!1,a="";for(const n of i)if("}"!==n&&e)s+=n;else if(!o||"]"===n&&a)switch(n){case"{":e=!0;continue;case"[":o=!0;continue;case"}":{const n=m(s,","),i=`(?:${n.map((e=>p(e))).join("|")})`;t+=i,e=!1,s="";break}case"]":t+="["+a+"]",o=!1,a="";break;case"?":t+=d;continue;case"*":t+=f(1);continue;default:t+=(0,l.bm)(n)}else{let e;e="-"===n?n:"^"!==n&&"!"!==n||a?n===c?"":(0,l.bm)(n):"^",a+=e}rx(e,t))).filter((e=>e!==S)),e),i=n.length;if(!i)return S;if(1===i)return n[0];const r=function(t,i){for(let r=0,s=n.length;r!!e.allBasenames));s&&(r.allBasenames=s.allBasenames);const o=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(r.allPaths=o),r}function D(e,t,n){const i=o.Vn===o.SA.sep,r=i?e:e.replace(g,o.Vn),s=o.Vn+r,a=o.SA.sep+e;let l;return l=n?function(n,o){return"string"!==typeof n||n!==r&&!n.endsWith(s)&&(i||n!==e&&!n.endsWith(a))?null:t}:function(n,s){return"string"!==typeof n||n!==r&&(i||n!==e)?null:t},l.allPaths=[(n?"*/":"./")+e],l}function M(e){try{const t=new RegExp(`^${p(e)}$`);return function(n){return t.lastIndex=0,"string"===typeof n&&t.test(n)?e:null}}catch(e){return S}}function R(e,t,n){return!(!e||"string"!==typeof t)&&O(e)(t,void 0,n)}function O(e,t={}){if(!e)return y;if("string"===typeof e||B(e)){const n=x(e,t);if(n===S)return y;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return F(e,t)}function B(e){const t=e;return!!t&&("string"===typeof t.base&&"string"===typeof t.pattern)}function F(e,t){const n=z(Object.getOwnPropertyNames(e).map((n=>P(n,e[n],t))).filter((e=>e!==S))),r=n.length;if(!r)return S;if(!n.some((e=>!!e.requiresSiblings))){if(1===r)return n[0];const e=function(e,t){let r;for(let s=0,o=n.length;s{for(const e of r){const t=await e;if("string"===typeof t)return t}return null})():null},t=n.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,r){let s,a;for(let l=0,h=n.length;l{for(const e of a){const t=await e;if("string"===typeof t)return t}return null})():null},a=n.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}function P(e,t,n){if(!1===t)return S;const r=x(e,n);if(r===S)return S;if("boolean"===typeof t)return r;if(t){const n=t.when;if("string"===typeof n){const t=(t,s,o,a)=>{if(!a||!r(t,s))return null;const l=n.replace("$(basename)",(()=>o)),h=a(l);return(0,i.Qg)(h)?h.then((t=>t?e:null)):h?e:null};return t.requiresSiblings=!0,t}}return r}function z(e,t){const n=e.filter((e=>!!e.basenames));if(n.length<2)return e;const i=n.reduce(((e,t)=>{const n=t.basenames;return n?e.concat(n):e}),[]);let r;if(t){r=[];for(let e=0,n=i.length;e{const n=t.patterns;return n?e.concat(n):e}),[]);const s=function(e,t){if("string"!==typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?r[n]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;const o=e.filter((e=>!e.basenames));return o.push(s),o}},5647:(e,t,n)=>{"use strict";n.d(t,{e2:()=>a,sN:()=>r,v7:()=>f});var i=n(601);function r(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?l(e,t):h(e,t);case"string":return a(e,t);case"boolean":return o(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}}function s(e,t){return(t<<5)-t+e|0}function o(e,t){return s(e?433:863,t)}function a(e,t){t=s(149417,t);for(let n=0,i=e.length;nr(t,e)),t)}function h(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,n)=>(t=a(n,t),r(e[n],t))),t)}function c(e,t,n=32){const i=n-t,r=~((1<>>i)>>>0}function u(e,t=0,n=e.byteLength,i=0){for(let r=0;re.toString(16).padStart(2,"0"))).join(""):d((e>>>0).toString(16),t/4)}class f{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let r,s,o=this._buffLen,a=this._leftoverHighSurrogate;0!==a?(r=a,s=-1,a=0):(r=e.charCodeAt(0),s=0);while(1){let l=r;if(i.pc(r)){if(!(s+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),g(this._h0)+g(this._h1)+g(this._h2)+g(this._h3)+g(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,u(this._buff,this._buffLen),this._buffLen>56&&(this._step(),u(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=f._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,c(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,i,r,s=this._h0,o=this._h1,a=this._h2,l=this._h3,h=this._h4;for(let t=0;t<80;t++)t<20?(n=o&a|~o&l,i=1518500249):t<40?(n=o^a^l,i=1859775393):t<60?(n=o&a|o&l|a&l,i=2400959708):(n=o^a^l,i=3395469782),r=c(s,5)+n+h+i+e.getUint32(4*t,!1)&4294967295,h=l,l=a,a=c(o,30),o=s,s=r;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+h&4294967295}}},5837:(e,t,n)=>{"use strict";var i;n.d(t,{f:()=>i}),function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function i(){return n}function*r(e){yield e}function s(e){return t(e)?e:r(e)}function o(e){return e||n}function*a(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function l(e){return!e||!0===e[Symbol.iterator]().next().done}function h(e){return e[Symbol.iterator]().next().value}function c(e,t){let n=0;for(const i of e)if(t(i,n++))return!0;return!1}function u(e,t){for(const n of e)if(t(n))return n}function*d(e,t){for(const n of e)t(n)&&(yield n)}function*g(e,t){let n=0;for(const i of e)yield t(i,n++)}function*f(e,t){let n=0;for(const i of e)yield*t(i,n++)}function*m(...e){for(const t of e)yield*t}function p(e,t,n){let i=n;for(const n of e)i=t(i,n);return i}function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t{"use strict";n.d(t,{d:()=>i});class i{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},8894:(e,t,n)=>{"use strict";function i(e,t){const n=this;let i,r=!1;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}n.d(t,{jG:()=>p,$w:()=>b,Cm:()=>m,HE:()=>_,qE:()=>g,AS:()=>d,VD:()=>h,s:()=>f,Ay:()=>l});var r=n(5837);const s=!1;let o=null;function a(e){o=e}if(s){const e="__is_disposable_tracked__";a(new class{trackDisposable(t){const n=new Error("Potentially leaked disposable").stack;setTimeout((()=>{t[e]||console.log(n)}),3e3)}setParent(t,n){if(t&&t!==p.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==p.None)try{t[e]=!0}catch{}}markAsSingleton(e){}})}function l(e){return o?.trackDisposable(e),e}function h(e){o?.markAsDisposed(e)}function c(e,t){o?.setParent(e,t)}function u(e,t){if(o)for(const n of e)o.setParent(n,t)}function d(e){if(r.f.is(e)){const t=[];for(const n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function g(...e){const t=f((()=>d(e)));return u(e,t),t}function f(e){const t=l({dispose:i((()=>{h(t),e()}))});return t}class m{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,l(this)}dispose(){this._isDisposed||(h(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{d(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return c(e,this),this._isDisposed?m.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),c(e,null))}}class p{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new m,l(this),c(this._store,this)}dispose(){h(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class _{constructor(){this._isDisposed=!1,l(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&c(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,h(this),this._value?.dispose(),this._value=void 0}}class b{constructor(){this._store=new Map,this._isDisposed=!1,l(this)}dispose(){h(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{d(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},7806:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});class i{static{this.Undefined=new i(void 0)}constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}}class r{constructor(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===i.Undefined}clear(){let e=this._first;while(e!==i.Undefined){const t=e.next;e.prev=i.Undefined,e.next=i.Undefined,e=t}this._first=i.Undefined,this._last=i.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new i(e);if(this._first===i.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==i.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==i.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==i.Undefined&&e.next!==i.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===i.Undefined&&e.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):e.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):e.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==i.Undefined)yield e.element,e=e.next}}},1553:(e,t,n)=>{"use strict";var i,r;n.d(t,{cO:()=>u,db:()=>d,fT:()=>a,qK:()=>c});class s{constructor(e,t){this.uri=e,this.value=t}}function o(e){return Array.isArray(e)}class a{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[i]="ResourceMap",e instanceof a)this.map=new Map(e.map),this.toKey=t??a.defaultToKey;else if(o(e)){this.map=new Map,this.toKey=t??a.defaultToKey;for(const[t,n]of e)this.set(t,n)}else this.map=new Map,this.toKey=e??a.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(const[t,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(i=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class l{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;while(i){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class h extends l{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class c extends h{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class d{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}},3911:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});const i=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},6657:(e,t,n)=>{"use strict";n.d(t,{ny:()=>i,v$:()=>h,zl:()=>m});var i,r=n(4396),s=n(5160),o=n(601),a=n(9133),l=n(1643);function h(e,t){return a.r.isUri(e)?(0,o.Q_)(e.scheme,t):(0,o.ns)(e,t+":")}(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(i||(i={}));const c="tkn";class u{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,i.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return r.dz(t),e}const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&-1===n.indexOf("[")&&(n=`[${n}]`);const o=this._ports[t],l=this._connectionTokens[t];let h=`path=${encodeURIComponent(e.path)}`;return"string"===typeof l&&(h+=`&${c}=${encodeURIComponent(l)}`),a.r.from({scheme:s.HZ?this._preferredWebSchema:i.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:h})}}const d=new u,g="vscode-app";class f{static{this.FALLBACK_AUTHORITY=g}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===i.vscodeRemote?d.rewrite(e):e.scheme!==i.file||!s.ib&&s.lg!==`${i.vscodeFileResource}://${f.FALLBACK_AUTHORITY}`?e:e.with({scheme:i.vscodeFileResource,authority:e.authority||f.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const n=l.fj(t,e);return a.r.file(n)}return a.r.parse(t.toUrl(e))}}const m=new f;var p;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";function i(e){let i;"string"===typeof e?i=new URL(e).searchParams:e instanceof URL?i=e.searchParams:a.r.isUri(e)&&(i=new URL(e.toString(!0)).searchParams);const r=i?.get(n);if(r)return t.get(r)}function r(e,t,i){if(!globalThis.crossOriginIsolated)return;const r=t&&i?"3":i?"2":"1";e instanceof URLSearchParams?e.set(n,r):e[n]=r}e.getHeadersFromQuery=i,e.addSearchParam=r})(p||(p={}))},5603:(e,t,n)=>{"use strict";n.d(t,{V0:()=>s,aI:()=>i,kT:()=>o});Object.prototype.hasOwnProperty;function i(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;nfunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},i={};for(const t of e)i[t]=n(t);return i}},1643:(e,t,n)=>{"use strict";n.d(t,{P8:()=>B,pD:()=>O,LC:()=>F,fj:()=>D,S8:()=>A,SA:()=>T,V8:()=>R,hd:()=>M,Vn:()=>P,IN:()=>N});var i=n(5160);let r;const s=globalThis.vscode;if("undefined"!==typeof s&&"undefined"!==typeof s.process){const e=s.process;r={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else r="undefined"!==typeof process&&"string"===typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env["VSCODE_CWD"]||process.cwd()}}:{get platform(){return i.uF?"win32":i.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const o=r.cwd,a=r.env,l=r.platform,h=65,c=97,u=90,d=122,g=46,f=47,m=92,p=58,_=63;class b extends Error{constructor(e,t,n){let i;"string"===typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${r} ${i} of type ${t}`;s+=". Received type "+typeof n,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function k(e,t){if(null===e||"object"!==typeof e)throw new b(t,"Object",e)}function v(e,t){if("string"!==typeof e)throw new b(t,"string",e)}const C="win32"===l;function L(e){return e===f||e===m}function w(e){return e===f}function y(e){return e>=h&&e<=u||e>=c&&e<=d}function S(e,t,n,i){let r="",s=0,o=-1,a=0,l=0;for(let h=0;h<=e.length;++h){if(h2){const e=r.lastIndexOf(n);-1===e?(r="",s=0):(r=r.slice(0,e),s=r.length-1-r.lastIndexOf(n)),o=h,a=0;continue}if(0!==r.length){r="",s=0,o=h,a=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(o+1,h)}`:r=e.slice(o+1,h),s=h-o-1;o=h,a=0}else l===g&&-1!==a?++a:a=-1}return r}function x(e){return e?`${"."===e[0]?"":"."}${e}`:""}function E(e,t){k(t,"pathObject");const n=t.dir||t.root,i=t.base||`${t.name||""}${x(t.ext)}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const N={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],v(s,`paths[${r}]`),0===s.length)continue}else 0===t.length?s=o():(s=a[`=${t}`]||o(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===m)&&(s=`${t}\\`));const l=s.length;let h=0,c="",u=!1;const d=s.charCodeAt(0);if(1===l)L(d)&&(h=1,u=!0);else if(L(d))if(u=!0,L(s.charCodeAt(1))){let e=2,t=e;while(e2&&L(s.charCodeAt(2))&&(u=!0,h=3));if(c.length>0)if(t.length>0){if(c.toLowerCase()!==t.toLowerCase())continue}else t=c;if(i){if(t.length>0)break}else if(n=`${s.slice(h)}\\${n}`,i=u,u&&t.length>0)break}return n=S(n,!i,"\\",L),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){v(e,"path");const t=e.length;if(0===t)return".";let n,i=0,r=!1;const s=e.charCodeAt(0);if(1===t)return w(s)?"\\":e;if(L(s))if(r=!0,L(e.charCodeAt(1))){let r=2,s=r;while(r2&&L(e.charCodeAt(2))&&(r=!0,i=3));let o=i0&&L(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?r?`\\${o}`:o:r?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){v(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return L(n)||t>2&&y(n)&&e.charCodeAt(1)===p&&L(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let i=0;i0&&(void 0===t?t=n=r:t+=`\\${r}`)}if(void 0===t)return".";let i=!0,r=0;if("string"===typeof n&&L(n.charCodeAt(0))){++r;const e=n.length;e>1&&L(n.charCodeAt(1))&&(++r,e>2&&(L(n.charCodeAt(2))?++r:i=!1))}if(i){while(r=2&&(t=`\\${t.slice(r)}`)}return N.normalize(t)},relative(e,t){if(v(e,"from"),v(t,"to"),e===t)return"";const n=N.resolve(e),i=N.resolve(t);if(n===i)return"";if(e=n.toLowerCase(),t=i.toLowerCase(),e===t)return"";let r=0;while(rr&&e.charCodeAt(s-1)===m)s--;const o=s-r;let a=0;while(aa&&t.charCodeAt(l-1)===m)l--;const h=l-a,c=oc){if(t.charCodeAt(a+d)===m)return i.slice(a+d+1);if(2===d)return i.slice(a+d)}o>c&&(e.charCodeAt(r+d)===m?u=d:2===d&&(u=3)),-1===u&&(u=0)}let g="";for(d=r+u+1;d<=s;++d)d!==s&&e.charCodeAt(d)!==m||(g+=0===g.length?"..":"\\..");return a+=u,g.length>0?`${g}${i.slice(a,l)}`:(i.charCodeAt(a)===m&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e||0===e.length)return e;const t=N.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===m){if(t.charCodeAt(1)===m){const e=t.charCodeAt(2);if(e!==_&&e!==g)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===p&&t.charCodeAt(2)===m)return`\\\\?\\${t}`;return e},dirname(e){v(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const r=e.charCodeAt(0);if(1===t)return L(r)?e:".";if(L(r)){if(n=i=1,L(e.charCodeAt(1))){let r=2,s=r;while(r2&&L(e.charCodeAt(2))?3:2,i=n);let s=-1,o=!0;for(let n=t-1;n>=i;--n)if(L(e.charCodeAt(n))){if(!o){s=n;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&v(t,"suffix"),v(e,"path");let n,i=0,r=-1,s=!0;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===p&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(L(l)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=i;--n)if(L(e.charCodeAt(n))){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){v(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===p&&y(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(L(t)){if(!s){i=a+1;break}}else-1===r&&(s=!1,r=a+1),t===g?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:E.bind(null,"\\"),parse(e){v(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,r=e.charCodeAt(0);if(1===n)return L(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(L(r)){if(i=1,L(e.charCodeAt(1))){let t=2,r=t;while(t0&&(t.root=e.slice(0,i));let s=-1,o=i,a=-1,l=!0,h=e.length-1,c=0;for(;h>=i;--h)if(r=e.charCodeAt(h),L(r)){if(!l){o=h+1;break}}else-1===a&&(l=!1,a=h+1),r===g?-1===s?s=h:1!==c&&(c=1):-1!==s&&(c=-1);return-1!==a&&(-1===s||0===c||1===c&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==i?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},I=(()=>{if(C){const e=/\\/g;return()=>{const t=o().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>o()})(),T={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const r=i>=0?e[i]:I();v(r,`paths[${i}]`),0!==r.length&&(t=`${r}/${t}`,n=r.charCodeAt(0)===f)}return t=S(t,!n,"/",w),n?`/${t}`:t.length>0?t:"."},normalize(e){if(v(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===f,n=e.charCodeAt(e.length-1)===f;return e=S(e,!t,"/",w),0===e.length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return v(e,"path"),e.length>0&&e.charCodeAt(0)===f},join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":T.normalize(t)},relative(e,t){if(v(e,"from"),v(t,"to"),e===t)return"";if(e=T.resolve(e),t=T.resolve(t),e===t)return"";const n=1,i=e.length,r=i-n,s=1,o=t.length-s,a=ra){if(t.charCodeAt(s+h)===f)return t.slice(s+h+1);if(0===h)return t.slice(s+h)}else r>a&&(e.charCodeAt(n+h)===f?l=h:0===h&&(l=0));let c="";for(h=n+l+1;h<=i;++h)h!==i&&e.charCodeAt(h)!==f||(c+=0===c.length?"..":"/..");return`${c}${t.slice(s+l)}`},toNamespacedPath(e){return e},dirname(e){if(v(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===f;let n=-1,i=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===f){if(!i){n=t;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&v(t,"ext"),v(e,"path");let n,i=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===f){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===f){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){v(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==f)-1===i&&(r=!1,i=o+1),a===g?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=o+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:E.bind(null,"/"),parse(e){v(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===f;let i;n?(t.root="/",i=1):i=0;let r=-1,s=0,o=-1,a=!0,l=e.length-1,h=0;for(;l>=i;--l){const t=e.charCodeAt(l);if(t!==f)-1===o&&(a=!1,o=l+1),t===g?-1===r?r=l:1!==h&&(h=1):-1!==r&&(h=-1);else if(!a){s=l+1;break}}if(-1!==o){const i=0===s&&n?1:s;-1===r||0===h||1===h&&r===o-1&&r===s+1?t.base=t.name=e.slice(i,o):(t.name=e.slice(i,r),t.base=e.slice(i,o),t.ext=e.slice(r,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};T.win32=N.win32=N,T.posix=N.posix=T;const A=C?N.normalize:T.normalize,D=C?N.join:T.join,M=C?N.resolve:T.resolve,R=C?N.relative:T.relative,O=C?N.dirname:T.dirname,B=C?N.basename:T.basename,F=C?N.extname:T.extname,P=C?N.sep:T.sep},5160:(e,t,n)=>{"use strict";n.d(t,{H8:()=>z,HZ:()=>I,OS:()=>O,UP:()=>q,_p:()=>R,cm:()=>P,gm:()=>V,ib:()=>N,j9:()=>E,lg:()=>A,nr:()=>W,uF:()=>S,zx:()=>x});var i=n(1337);const r="en";let s,o,a=!1,l=!1,h=!1,c=!1,u=!1,d=!1,g=!1,f=!1,m=!1,p=!1,_=null,b=null,k=null;const v=globalThis;let C;"undefined"!==typeof v.vscode&&"undefined"!==typeof v.vscode.process?C=v.vscode.process:"undefined"!==typeof process&&"string"===typeof process?.versions?.node&&(C=process);const L="string"===typeof C?.versions?.electron,w=L&&"renderer"===C?.type;if("object"===typeof C){a="win32"===C.platform,l="darwin"===C.platform,h="linux"===C.platform,c=h&&!!C.env["SNAP"]&&!!C.env["SNAP_REVISION"],g=L,m=!!C.env["CI"]||!!C.env["BUILD_ARTIFACTSTAGINGDIRECTORY"],s=r,_=r;const e=C.env["VSCODE_NLS_CONFIG"];if(e)try{const t=JSON.parse(e);s=t.userLocale,b=t.osLocale,_=t.resolvedLanguage||r,k=t.languagePack?.translationsConfigFile}catch(e){}u=!0}else"object"!==typeof navigator||w?console.error("Unable to resolve platform."):(o=navigator.userAgent,a=o.indexOf("Windows")>=0,l=o.indexOf("Macintosh")>=0,f=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h=o.indexOf("Linux")>=0,p=o?.indexOf("Mobi")>=0,d=!0,_=i.i8()||r,s=navigator.language.toLowerCase(),b=s);let y=0;l?y=1:a?y=3:h&&(y=2);const S=a,x=l,E=h,N=u,I=d,T=d&&"function"===typeof v.importScripts,A=T?v.origin:void 0,D=o,M="function"===typeof v.postMessage&&!v.importScripts,R=(()=>{if(M){const e=[];v.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n{const i=++t;e.push({id:i,callback:n}),v.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})(),O=l||f?2:a?1:3;let B=!0,F=!1;function P(){if(!F){F=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);B=513===t[0]}return B}const z=!!(D&&D.indexOf("Chrome")>=0),V=!!(D&&D.indexOf("Firefox")>=0),W=!!(!z&&D&&D.indexOf("Safari")>=0),q=!!(D&&D.indexOf("Edg/")>=0);D&&D.indexOf("Android")},4366:(e,t,n)=>{"use strict";n.d(t,{B6:()=>m,P8:()=>d});var i=n(7531),r=n(6657),s=n(1643),o=n(5160),a=n(601),l=n(9133);function h(e){return(0,l.I)(e,!0)}class c{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===r.ny.file)return i._1(h(e),h(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(g(e.authority,t.authority))return i._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return d(e)||e.authority}basename(e){return s.SA.basename(e.path)}extname(e){return s.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===r.ny.file?t=l.r.file(s.pD(h(e))).path:(t=s.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===r.ny.file?l.r.file(s.S8(h(e))).path:s.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!g(e.authority,t.authority))return;if(e.scheme===r.ny.file){const n=s.V8(h(e),h(t));return o.uF?i.TH(n):n}let n=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(n.length,a.length);ei.Zn(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.Vn){return f(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.Vn){let n=!1;if(e.scheme===r.ny.file){const r=h(e);n=void 0!==r&&r.length===i.Zn(r).length&&r[r.length-1]===t}else{t="/";const i=e.path;n=1===i.length&&47===i.charCodeAt(i.length-1)}return n||f(e,t)?e:e.with({path:e.path+"/"})}}const u=new c((()=>!1)),d=(new c((e=>e.scheme!==r.ny.file||!o.j9)),new c((e=>!0)),u.isEqual.bind(u),u.isEqualOrParent.bind(u),u.getComparisonKey.bind(u),u.basenameOrAuthority.bind(u),u.basename.bind(u)),g=(u.extname.bind(u),u.dirname.bind(u),u.joinPath.bind(u),u.normalizePath.bind(u),u.relativePath.bind(u),u.resolvePath.bind(u),u.isAbsolutePath.bind(u),u.isEqualAuthority.bind(u)),f=u.hasTrailingPathSeparator.bind(u);u.removeTrailingPathSeparator.bind(u),u.addTrailingPathSeparator.bind(u);var m;(function(e){function t(t){const n=new Map,i=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));i.split(";").forEach((e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)}));const r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(e.META_DATA_MIME,r),n}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(m||(m={}))},4240:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const i=globalThis.performance&&"function"===typeof globalThis.performance.now;class r{static create(e){return new r(e)}constructor(e){this._now=i&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},601:(e,t,n)=>{"use strict";n.d(t,{$X:()=>R,AV:()=>s,E_:()=>T,HG:()=>d,LJ:()=>L,LU:()=>P,NB:()=>l,OS:()=>h,Q_:()=>k,Ss:()=>B,UD:()=>f,Wv:()=>b,Z5:()=>y,_J:()=>M,aC:()=>D,bm:()=>a,eY:()=>c,jy:()=>o,km:()=>E,lT:()=>g,ne:()=>O,ns:()=>v,pc:()=>C,r_:()=>F,tk:()=>z,tl:()=>H,uz:()=>u,y_:()=>U,z_:()=>w});var i=n(7389),r=n(5661);function s(e){return!e||"string"!==typeof e||0===e.trim().length}function o(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;while(e.indexOf(t,i)===i)i+=n;return e.substring(i)}function h(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function c(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function u(e){return e.split(/\r\n|\r|\n/)}function d(e){for(let t=0,n=e.length;t=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function f(e,t){return et?1:0}function m(e,t,n=0,i=e.length,r=0,s=t.length){for(;ns)return 1}const o=i-n,a=s-r;return oa?1:0}function p(e,t,n=0,i=e.length,r=0,s=t.length){for(;n=128||a>=128)return m(e.toLowerCase(),t.toLowerCase(),n,i,r,s);_(o)&&(o-=32),_(a)&&(a-=32);const l=o-a;if(0!==l)return l}const o=i-n,a=s-r;return oa?1:0}function _(e){return e>=97&&e<=122}function b(e){return e>=65&&e<=90}function k(e,t){return e.length===t.length&&0===p(e,t)}function v(e,t){const n=t.length;return!(t.length>e.length)&&0===p(e,t,0,n)}function C(e){return 55296<=e&&e<=56319}function L(e){return 56320<=e&&e<=57343}function w(e,t){return t-56320+(e-55296<<10)+65536}function y(e,t,n){const i=e.charCodeAt(n);if(C(i)&&n+11){const i=e.charCodeAt(t-2);if(C(i))return w(i,n)}return n}class x{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=S(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=y(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class E{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new x(e,t)}nextGraphemeLength(){const e=W.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.nextCodePoint());while(!t.eol()){const n=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());if(V(i,r)){t.setOffset(n);break}i=r}return t.offset-n}prevGraphemeLength(){const e=W.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.prevCodePoint());while(t.offset>0){const n=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());if(V(r,i)){t.setOffset(n);break}i=r}return n-t.offset}eol(){return this._iterator.eol()}}let N;function I(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function T(e){return N||(N=I()),N.test(e)}const A=/^[\t\n\r\x20-\x7E]*$/;function D(e){return A.test(e)}const M=/[\u2028\u2029]/;function R(e){return M.test(e)}function O(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function B(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const F=String.fromCharCode(65279);function P(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function z(e){const t=26;return e%=2*t,et[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}function q(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}class H{static{this.ambiguousCharacterData=new r.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new i.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let n=0;n!e.startsWith("_")&&e in r));0===o.length&&(o=["_default"]);for(const e of o){const n=t(r[e]);s=i(s,n)}const a=t(r["_common"]),l=n(a,s);return new H(l)}))}static getInstance(e){return H.cache.get(Array.from(e))}static{this._locales=new r.d((()=>Object.keys(H.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return H._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class U{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(U.getRawData())),this._data}static isInvisibleCharacter(e){return U.getData().has(e)}static get codePoints(){return U.getData()}}},322:(e,t,n)=>{"use strict";function i(e){return"string"===typeof e}function r(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(e){return"undefined"===typeof e}function o(e){return s(e)||null===e}n.d(t,{Gv:()=>r,Kg:()=>i,b0:()=>s,z:()=>o})},2647:(e,t,n)=>{"use strict";function i(e){return e<0?0:e>255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,{W:()=>i,j:()=>r})},9133:(e,t,n)=>{"use strict";n.d(t,{I:()=>v,r:()=>f});var i=n(1643),r=n(5160);const s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function h(e,t){return e||t?e:"file"}function c(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d;break}return t}const u="",d="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){return e instanceof f||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"string"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}constructor(e,t,n,i,r,s=!1){"object"===typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=h(e,s),this.authority=t||u,this.path=c(this.scheme,n||u),this.query=i||u,this.fragment=r||u,l(this,s))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===i?i=this.path:null===i&&(i=u),void 0===r?r=this.query:null===r&&(r=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new p(t,n,i,r,s)}static parse(e,t=!1){const n=g.exec(e);return n?new p(n[2]||u,y(n[4]||u),y(n[5]||u),y(n[7]||u),y(n[9]||u),t):new p(u,u,u,u,u)}static file(e){let t=u;if(r.uF&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new p("file",t,e,u,u)}static from(e,t){const n=new p(e.scheme,e.authority,e.path,e.query,e.fragment,t);return n}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=r.uF&&"file"===e.scheme?f.file(i.IN.join(v(e,!0),...t)).path:i.SA.join(e.path,...t),e.with({path:n})}toString(e=!1){return C(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{const t=new p(e);return t._formatted=e.external??null,t._fsPath=e._sep===m?e.fsPath??null:null,t}}return e}}const m=r.uF?1:void 0;class p extends f{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const _={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function b(e,t,n){let i,r=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=_[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function k(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.uF&&(n=n.replace(/\//g,"\\")),n}function C(e,t){const n=t?k:b;let i="",{scheme:r,authority:s,path:o,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=d,i+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),l&&(i+="#",i+=t?l:b(l,!1,!1)),i}function L(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+L(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(e){return e.match(w)?e.replace(w,(e=>L(e))):e}},1352:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SimpleWorkerClient:()=>v,SimpleWorkerServer:()=>w,create:()=>y,logOnceWebWorkerWarning:()=>g});var i=n(4396),r=n(231),s=n(8894),o=n(6657),a=n(5160),l=n(601);const h=!0,c="default",u="$initialize";let d=!1;function g(e){a.HZ&&(d||(d=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class f{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.method=i,this.args=r,this.type=0}}class m{constructor(e,t,n,i){this.vsWorker=e,this.seq=t,this.res=n,this.err=i,this.type=1}}class p{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=i,this.arg=r,this.type=2}}class _{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class b{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class k{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const i=String(++this._lastSentReq);return new Promise(((r,s)=>{this._pendingReplies[i]={resolve:r,reject:s},this._send(new f(this._workerId,i,e,t,n))}))}listen(e,t,n){let i=null;const s=new r.vl({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new p(this._workerId,i,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new b(this._workerId,i)),i=null}});return s.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const n={get:(n,i)=>("string"!==typeof i||n[i]||(L(i)?n[i]=t=>this.listen(e,i,t):C(i)?n[i]=this.listen(e,i,void 0):36===i.charCodeAt(0)&&(n[i]=async(...n)=>(await(t?.()),this.sendMessage(e,i,n)))),n[i])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;return e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req,n=this._handler.handleMessage(e.channel,e.method,e.args);n.then((e=>{this._send(new m(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,i.cU)(e.detail)),this._send(new m(this._workerId,t,void 0,(0,i.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new _(this._workerId,t,e))}));this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let n=0;n{this._protocol.handleMessage(e)}),(e=>{(0,i.dz)(e)}))),this._protocol=new k({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)}),this._protocol.setWorkerId(this._worker.getId());let n=null;const r=globalThis.require;"undefined"!==typeof r&&"function"===typeof r.getConfig?n=r.getConfig():"undefined"!==typeof globalThis.requirejs&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(c,u,[this._worker.getId(),JSON.parse(JSON.stringify(n)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(c,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,n){const i=this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!==typeof i[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){const i=this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on main thread`);if(L(t)){const r=i[t].call(i,n);if("function"!==typeof r)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return r}if(C(t)){const n=i[t];if("function"!==typeof n)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return n}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function C(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function L(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class w{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new k({sendMessage:(t,n)=>{e(t,n)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===c&&t===u)return this.initialize(n[0],n[1],n[2]);const i=e===c?this._requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!==typeof i[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){const i=e===c?this._requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(L(t)){const e=i[t].call(i,n);if("function"!==typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(C(t)){const e=i[t];if("function"!==typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,i){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){if(t&&("undefined"!==typeof t.baseUrl&&delete t["baseUrl"],"undefined"!==typeof t.paths&&"undefined"!==typeof t.paths.vs&&delete t.paths["vs"],"undefined"!==typeof t.trustedTypesPolicy&&delete t["trustedTypesPolicy"],t.catchError=!0,globalThis.require.config(t)),h){const e=o.zl.asBrowserUri(`${i}.js`).toString(!0);return n(5890)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}return new Promise(((e,t)=>{const n=globalThis.require;n([i],(n=>{this._requestHandler=n.create(this),this._requestHandler?e():t(new Error("No RequestHandler!"))}),t)}))}this._requestHandler=this._requestHandlerFactory(this)}}function y(e){return new w(e,null)}},4529:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(2647);class r{constructor(e){const t=(0,i.W)(e);this._defaultValue=t,this._asciiMap=r._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=(0,i.W)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}},2764:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>_,aZ:()=>p,l5:()=>C,lQ:()=>k,s7:()=>y,sH:()=>L,sN:()=>b,ss:()=>v,yI:()=>m,zp:()=>w});var i=n(1337),r=n(5476),s=n(7732),o=n(3711);const a=(0,s.x1A)("editor.lineHighlightBackground",null,i.kg("lineHighlight","Background color for the highlight of line at the cursor position.")),l=((0,s.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.b1q},i.kg("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),(0,s.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},i.kg("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("rangeHighlightBorder","Background color of the border around highlighted ranges.")),(0,s.x1A)("editor.symbolHighlightBackground",{dark:s.Ubg,light:s.Ubg,hcDark:null,hcLight:null},i.kg("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("symbolHighlightBorder","Background color of the border around highlighted symbols.")),(0,s.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:r.Q1.black,hcDark:r.Q1.white,hcLight:"#0F4A85"},i.kg("caret","Color of the editor cursor."))),h=(0,s.x1A)("editorCursor.background",null,i.kg("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),c=((0,s.x1A)("editorMultiCursor.primary.foreground",l,i.kg("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.primary.background",h,i.kg("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorMultiCursor.secondary.foreground",l,i.kg("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.secondary.background",h,i.kg("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},i.kg("editorWhitespaces","Color of whitespace characters in the editor."))),u=((0,s.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorLineNumbers","Color of editor line numbers.")),(0,s.x1A)("editorIndentGuide.background",c,i.kg("editorIndentGuides","Color of the editor indentation guides."),!1,i.kg("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead."))),d=(0,s.x1A)("editorIndentGuide.activeBackground",c,i.kg("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,i.kg("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),g=((0,s.x1A)("editorIndentGuide.background1",u,i.kg("editorIndentGuides1","Color of the editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.background2","#00000000",i.kg("editorIndentGuides2","Color of the editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.background3","#00000000",i.kg("editorIndentGuides3","Color of the editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.background4","#00000000",i.kg("editorIndentGuides4","Color of the editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.background5","#00000000",i.kg("editorIndentGuides5","Color of the editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.background6","#00000000",i.kg("editorIndentGuides6","Color of the editor indentation guides (6).")),(0,s.x1A)("editorIndentGuide.activeBackground1",d,i.kg("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.activeBackground2","#00000000",i.kg("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.activeBackground3","#00000000",i.kg("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.activeBackground4","#00000000",i.kg("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.activeBackground5","#00000000",i.kg("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.activeBackground6","#00000000",i.kg("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),(0,s.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.buw,hcLight:s.buw},i.kg("editorActiveLineNumber","Color of editor active line number"),!1,i.kg("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."))),f=((0,s.x1A)("editorLineNumber.activeForeground",g,i.kg("editorActiveLineNumber","Color of editor active line number")),(0,s.x1A)("editorLineNumber.dimmedForeground",null,i.kg("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),(0,s.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:r.Q1.lightgrey,hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorRuler","Color of the editor rulers.")),(0,s.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},i.kg("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},i.kg("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.b1q,hcLight:s.b1q},i.kg("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},i.kg("editorOverviewRulerBorder","Color of the overview ruler border.")),(0,s.x1A)("editorOverviewRuler.background",null,i.kg("editorOverviewRulerBackground","Background color of the editor overview ruler.")),(0,s.x1A)("editorGutter.background",s.YtV,i.kg("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:s.b1q},i.kg("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.x1A)("editorUnnecessaryCode.opacity",{dark:r.Q1.fromHex("#000a"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),(0,s.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:r.Q1.fromHex("#292929").transparent(.8)},i.kg("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.x1A)("editorGhostText.foreground",{dark:r.Q1.fromHex("#ffffff56"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.x1A)("editorGhostText.background",null,i.kg("editorGhostTextBackground","Background color of the ghost text in the editor.")),new r.Q1(new r.bU(0,122,204,.6))),m=((0,s.x1A)("editorOverviewRuler.rangeHighlightForeground",f,i.kg("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editorOverviewRuler.errorForeground",{dark:new r.Q1(new r.bU(255,18,18,.7)),light:new r.Q1(new r.bU(255,18,18,.7)),hcDark:new r.Q1(new r.bU(255,50,50,1)),hcLight:"#B5200D"},i.kg("overviewRuleError","Overview ruler marker color for errors."))),p=(0,s.x1A)("editorOverviewRuler.warningForeground",{dark:s.Hng,light:s.Hng,hcDark:s.Stt,hcLight:s.Stt},i.kg("overviewRuleWarning","Overview ruler marker color for warnings.")),_=(0,s.x1A)("editorOverviewRuler.infoForeground",{dark:s.pOz,light:s.pOz,hcDark:s.IIb,hcLight:s.IIb},i.kg("overviewRuleInfo","Overview ruler marker color for infos.")),b=(0,s.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},i.kg("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),k=(0,s.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},i.kg("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),v=(0,s.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},i.kg("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),C=(0,s.x1A)("editorBracketHighlight.foreground4","#00000000",i.kg("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),L=(0,s.x1A)("editorBracketHighlight.foreground5","#00000000",i.kg("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),w=(0,s.x1A)("editorBracketHighlight.foreground6","#00000000",i.kg("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),y=(0,s.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new r.Q1(new r.bU(255,18,18,.8)),light:new r.Q1(new r.bU(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},i.kg("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));(0,s.x1A)("editorBracketPairGuide.background1","#00000000",i.kg("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background2","#00000000",i.kg("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background3","#00000000",i.kg("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background4","#00000000",i.kg("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background5","#00000000",i.kg("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background6","#00000000",i.kg("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground1","#00000000",i.kg("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground2","#00000000",i.kg("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground3","#00000000",i.kg("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground4","#00000000",i.kg("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground5","#00000000",i.kg("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground6","#00000000",i.kg("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorUnicodeHighlight.border",s.Hng,i.kg("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.x1A)("editorUnicodeHighlight.background",s.whs,i.kg("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));(0,o.zy)(((e,t)=>{const n=e.getColor(s.YtV),i=e.getColor(a),r=i&&!i.isTransparent()?i:n;r&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${r}; }`)}))},6627:(e,t,n)=>{"use strict";function i(e){let t=0,n=0,i=0,r=0;for(let s=0,o=e.length;si})},4544:(e,t,n)=>{"use strict";n.d(t,{M:()=>a,S:()=>l});var i=n(4396),r=n(371),s=n(8690),o=n(3654);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let n=1;nt)throw new i.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}contains(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let n=0,i=0,r=null;while(n=s.startLineNumber?r=new a(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return null!==r&&t.push(r),new l(t)}subtractFrom(e){const t=(0,o.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)return new l([e]);const i=[];let r=e.startLineNumber;for(let e=t;er&&i.push(new a(r,t.startLineNumber)),r=t.endLineNumberExclusive}return re.toString())).join(", ")}getIntersection(e){const t=[];let n=0,i=0;while(nt.delta(e))))}}},371:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(4396);class r{static addRange(e,t){let n=0;while(nt))return new r(e,t)}static ofLength(e){return new r(0,e)}static ofStartAndLength(e,t){return new r(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new i.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new r(this.start+e,this.endExclusive+e)}deltaStart(e){return new r(this.start+e,this.endExclusive)}deltaEnd(e){return new r(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t{"use strict";n.d(t,{y:()=>i});class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";n.d(t,{Q:()=>r});var i=n(6788);class r{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let n,i,s,o;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new r(n,i,s,o)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,o=e.endColumn;const a=t.startLineNumber,l=t.startColumn,h=t.endLineNumber,c=t.endColumn;return nh?(s=h,o=c):s===h&&(o=Math.min(o,c)),n>s||n===s&&i>o?null:new r(n,i,s,o)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new i.y(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new i.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return r.collapseToEnd(this)}static collapseToEnd(e){return new r(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new r(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},8581:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(6788),r=n(8690);class s extends r.Q{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new i.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new i.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n{"use strict";n.d(t,{W:()=>s});var i=n(6788),r=n(8690);class s{static{this.zero=new s(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new s(0,t.column-e.column):new s(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return s.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const i of e)"\n"===i?(t++,n=0):n++;return new s(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new r.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new r.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new i.y(e.lineNumber,e.column+this.columnCount):new i.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},939:(e,t,n)=>{"use strict";n.d(t,{Io:()=>l,Ld:()=>a,Th:()=>c});var i=n(5837),r=n(7806);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function o(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of s)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const a=o();function l(e){let t=a;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const h=new r.w;function c(e,t,n,r,s){if(t=l(t),s||(s=i.f.first(h)),n.length>s.maxLen){let i=e-s.maxLen/2;return i<0?i=0:r+=i,n=n.substring(i,e+s.maxLen/2),c(e,t,n,r,s)}const o=Date.now(),a=e-1-r;let d=-1,g=null;for(let e=1;;e++){if(Date.now()-o>=s.timeBudget)break;const i=a-s.windowSize*e;t.lastIndex=Math.max(0,i);const r=u(t,n,a,d);if(!r&&g)break;if(g=r,i<=0)break;d=i}if(g){const e={word:g[0],startColumn:r+1+g.index,endColumn:r+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function u(e,t,n,i){let r;while(r=e.exec(t)){const t=r.index||0;if(t<=n&&e.lastIndex>=n)return r;if(i>0&&t>i)return null}return null}h.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},4577:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});class i{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!==(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){const t=this.getForeground(e);let n="mtk"+t;const i=this.getFontStyle(e);return 1&i&&(n+=" mtki"),2&i&&(n+=" mtkb"),4&i&&(n+=" mtku"),8&i&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let r=`color: ${t[n]};`;1&i&&(r+="font-style: italic;"),2&i&&(r+="font-weight: bold;");let s="";return 4&i&&(s+=" underline"),8&i&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&n),bold:Boolean(2&n),underline:Boolean(4&n),strikethrough:Boolean(8&n)}}}},5350:(e,t,n)=>{"use strict";n.d(t,{rY:()=>p,ou:()=>m,dG:()=>w,OB:()=>y});var i=n(6455),r=(n(9133),n(231)),s=n(8894);class o{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,s.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new a(this,e,t);return this._factories.set(e,n),(0,s.s)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){const t=this.get(e);if(t)return!0;const n=this._factories.get(e);return!(n&&!n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class a extends s.jG{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var l,h,c,u,d,g,f=n(1337);class m{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class p{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}(function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"})(l||(l={})),function(e){const t=new Map;function n(e){let n=t.get(e);return n||(console.info("No codicon found for CompletionItemKind "+e),n=i.W.symbolProperty),n}t.set(0,i.W.symbolMethod),t.set(1,i.W.symbolFunction),t.set(2,i.W.symbolConstructor),t.set(3,i.W.symbolField),t.set(4,i.W.symbolVariable),t.set(5,i.W.symbolClass),t.set(6,i.W.symbolStruct),t.set(7,i.W.symbolInterface),t.set(8,i.W.symbolModule),t.set(9,i.W.symbolProperty),t.set(10,i.W.symbolEvent),t.set(11,i.W.symbolOperator),t.set(12,i.W.symbolUnit),t.set(13,i.W.symbolValue),t.set(15,i.W.symbolEnum),t.set(14,i.W.symbolConstant),t.set(15,i.W.symbolEnum),t.set(16,i.W.symbolEnumMember),t.set(17,i.W.symbolKeyword),t.set(27,i.W.symbolSnippet),t.set(18,i.W.symbolText),t.set(19,i.W.symbolColor),t.set(20,i.W.symbolFile),t.set(21,i.W.symbolReference),t.set(22,i.W.symbolCustomColor),t.set(23,i.W.symbolFolder),t.set(24,i.W.symbolTypeParameter),t.set(25,i.W.account),t.set(26,i.W.issues),e.toIcon=n;const r=new Map;function s(e,t){let n=r.get(e);return"undefined"!==typeof n||t||(n=9),n}r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26),e.fromString=s}(h||(h={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(c||(c={}));(function(e){e[e["Automatic"]=0]="Automatic",e[e["PasteAs"]=1]="PasteAs"})(u||(u={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(d||(d={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(g||(g={}));(0,f.kg)("Array","array"),(0,f.kg)("Boolean","boolean"),(0,f.kg)("Class","class"),(0,f.kg)("Constant","constant"),(0,f.kg)("Constructor","constructor"),(0,f.kg)("Enum","enumeration"),(0,f.kg)("EnumMember","enumeration member"),(0,f.kg)("Event","event"),(0,f.kg)("Field","field"),(0,f.kg)("File","file"),(0,f.kg)("Function","function"),(0,f.kg)("Interface","interface"),(0,f.kg)("Key","key"),(0,f.kg)("Method","method"),(0,f.kg)("Module","module"),(0,f.kg)("Namespace","namespace"),(0,f.kg)("Null","null"),(0,f.kg)("Number","number"),(0,f.kg)("Object","object"),(0,f.kg)("Operator","operator"),(0,f.kg)("Package","package"),(0,f.kg)("Property","property"),(0,f.kg)("String","string"),(0,f.kg)("Struct","struct"),(0,f.kg)("TypeParameter","type parameter"),(0,f.kg)("Variable","variable");var _,b,k,v,C;(function(e){const t=new Map;function n(e){let n=t.get(e);return n||(console.info("No codicon found for SymbolKind "+e),n=i.W.symbolProperty),n}t.set(0,i.W.symbolFile),t.set(1,i.W.symbolModule),t.set(2,i.W.symbolNamespace),t.set(3,i.W.symbolPackage),t.set(4,i.W.symbolClass),t.set(5,i.W.symbolMethod),t.set(6,i.W.symbolProperty),t.set(7,i.W.symbolField),t.set(8,i.W.symbolConstructor),t.set(9,i.W.symbolEnum),t.set(10,i.W.symbolInterface),t.set(11,i.W.symbolFunction),t.set(12,i.W.symbolVariable),t.set(13,i.W.symbolConstant),t.set(14,i.W.symbolString),t.set(15,i.W.symbolNumber),t.set(16,i.W.symbolBoolean),t.set(17,i.W.symbolArray),t.set(18,i.W.symbolObject),t.set(19,i.W.symbolKey),t.set(20,i.W.symbolNull),t.set(21,i.W.symbolEnumMember),t.set(22,i.W.symbolStruct),t.set(23,i.W.symbolEvent),t.set(24,i.W.symbolOperator),t.set(25,i.W.symbolTypeParameter),e.toIcon=n})(_||(_={}));class L{static{this.Comment=new L("comment")}static{this.Imports=new L("imports")}static{this.Region=new L("region")}static fromValue(e){switch(e){case"comment":return L.Comment;case"imports":return L.Imports;case"region":return L.Region}return new L(e)}constructor(e){this.value=e}}(function(e){e[e["AIGenerated"]=1]="AIGenerated"})(b||(b={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(k||(k={})),function(e){function t(e){return!(!e||"object"!==typeof e)&&("string"===typeof e.id&&"string"===typeof e.title)}e.is=t}(v||(v={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(C||(C={}));const w=new o,y=new o;var S;(function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"})(S||(S={}))},4573:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(7778);const r=(0,i.u1)("languageService")},5764:(e,t,n)=>{"use strict";n.d(t,{W6:()=>c,vH:()=>u});var i=n(1337),r=n(231),s=n(6374),o=n(3911),a=n(7503);const l={ModesRegistry:"editor.modesRegistry"};class h{constructor(){this._onDidChangeLanguages=new r.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t{"use strict";n.d(t,{A5:()=>i,Dg:()=>l,F4:()=>d,L5:()=>u,Wo:()=>c,X2:()=>a,ZS:()=>r,nk:()=>h,vd:()=>g});var i,r,s,o=n(5603);(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(i||(i={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(r||(r={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,o.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function h(e){return e&&"function"===typeof e.read}class c{constructor(e,t,n,i,r,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=r,this._isTracked=s}}class u{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class d{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},2773:(e,t,n)=>{"use strict";n.d(t,{lt:()=>g,W5:()=>C,hB:()=>_,dr:()=>m,wC:()=>v});var i=n(601),r=n(1553),s=n(4529);class o extends s.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let t=0,n=e.length;tt)break;n=i}return n}findNextIntlWordAtOrAfterOffset(e,t){for(const n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index=0;let t=null;try{t=i.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new u.L5(t,this.wordSeparators?l(this.wordSeparators,[]):null,n?this.searchString:null)}}function f(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t=n)break;const i=e.charCodeAt(t);if(110===i||114===i||87===i)return!0}}return!1}function m(e,t,n){if(!n)return new u.Dg(e,null);const i=[];for(let e=0,n=t.length;e=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1}}class _{static findMatches(e,t,n,i,r){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new C(s.wordSeparators,s.regex),i,r):this._doFindMatchesLineByLine(e,n,s,i,r):[]}static _getMultilineMatchRange(e,t,n,i,r,s){let o,a,l=0;if(i?(l=i.findLineFeedCountBeforeOffset(r),o=t+r+l):o=t+r,i){const e=i.findLineFeedCountBeforeOffset(r+s.length),t=e-l;a=o+s.length+t}else a=o+s.length;const h=e.getPositionAt(o),u=e.getPositionAt(a);return new c.Q(h.lineNumber,h.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,n,i,r){const s=e.getOffsetAt(t.getStartPosition()),o=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new p(o):null,l=[];let h,c=0;n.reset(0);while(h=n.next(o))if(l[c++]=m(this._getMultilineMatchRange(e,s,o,a,h.index,h[0]),h,i),c>=r)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,r){const s=[];let o=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r);for(let a=t.startLineNumber+1;a=a))return r;return r}const h=new C(e.wordSeparators,e.regex);let d;h.reset(0);do{if(d=h.next(t),d&&(s[r++]=m(new c.Q(n,d.index+1+i,n,d.index+1+d[0].length+i),d,o),r>=a))return r}while(d);return r}static findNextMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new C(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,s,i):this._doFindNextMatchLineByLine(e,n,s,i)}static _doFindNextMatchMultiline(e,t,n,i){const r=new h.y(t.lineNumber,1),s=e.getOffsetAt(r),o=e.getLineCount(),a=e.getValueInRange(new c.Q(r.lineNumber,r.column,o,e.getLineMaxColumn(o)),1),l="\r\n"===e.getEOL()?new p(a):null;n.reset(t.column-1);const u=n.next(a);return u?m(this._getMultilineMatchRange(e,s,a,l,u.index,u[0]),u,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new h.y(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s),a=this._findFirstMatchInLine(n,o,s,t.column,i);if(a)return a;for(let t=1;t<=r;t++){const o=(s+t-1)%r,a=e.getLineContent(o+1),l=this._findFirstMatchInLine(n,a,o+1,1,i);if(l)return l}return null}static _findFirstMatchInLine(e,t,n,i,r){e.reset(i-1);const s=e.next(t);return s?m(new c.Q(n,s.index+1,n,s.index+1+s[0].length),s,r):null}static findPreviousMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new C(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,i):this._doFindPreviousMatchLineByLine(e,n,s,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const r=this._doFindMatchesMultiline(e,new c.Q(1,1,t.lineNumber,t.column),n,i,10*d);if(r.length>0)return r[r.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new h.y(s,e.getLineMaxColumn(s)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(n,o,s,i);if(a)return a;for(let t=1;t<=r;t++){const o=(r+s-t-1)%r,a=e.getLineContent(o+1),l=this._findLastMatchInLine(n,a,o+1,i);if(l)return l}return null}static _findLastMatchInLine(e,t,n,i){let r,s=null;e.reset(0);while(r=e.next(t))s=m(new c.Q(n,r.index+1,n,r.index+1+r[0].length),r,i);return s}}function b(e,t,n,i,r){if(0===i)return!0;const s=t.charCodeAt(i-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}function k(e,t,n,i,r){if(i+r===n)return!0;const s=t.charCodeAt(i+r);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i+r-1);if(0!==e.get(n))return!0}return!1}function v(e,t,n,i,r){return b(e,t,n,i,r)&&k(e,t,n,i,r)}class C{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const r=n.index,s=n[0].length;if(r===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){i.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=s,!this._wordSeparators||v(this._wordSeparators,e,t,r,s))return n}while(n);return null}}},215:(e,t,n)=>{"use strict";n.r(t),n.d(t,{KeyMod:()=>me,createMonacoBaseAPI:()=>pe});var i=n(7792),r=n(231);class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new s,a=new s,l=new s,h=new Array(230),c={},u=[],d=Object.create(null),g=Object.create(null),f=[],m=[];for(let e=0;e<=193;e++)f[e]=-1;for(let e=0;e<=132;e++)m[e]=-1;var p;function _(e,t){const n=(65535&t)<<16>>>0;return(e|n)>>>0}(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],i=[];for(const e of t){const[t,r,s,p,_,b,k,v,C]=e;if(i[r]||(i[r]=!0,u[r]=s,d[s]=r,g[s.toLowerCase()]=r,t&&(f[r]=p,0!==p&&3!==p&&5!==p&&4!==p&&6!==p&&57!==p&&(m[p]=r))),!n[p]){if(n[p]=!0,!_)throw new Error(`String representation missing for key code ${p} around scan code ${s}`);o.define(p,_),a.define(p,v||_),l.define(p,C||v||_)}b&&(h[b]=p),k&&(c[k]=p)}m[3]=46})(),function(e){function t(e){return o.keyCodeToStr(e)}function n(e){return o.strToKeyCode(e)}function i(e){return a.keyCodeToStr(e)}function r(e){return l.keyCodeToStr(e)}function s(e){return a.strToKeyCode(e)||l.strToKeyCode(e)}function h(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=i,e.toUserSettingsGeneral=r,e.fromUserSettings=s,e.toElectronAccelerator=h}(p||(p={}));var b,k,v,C,L,w,y,S,x,E,N,I,T,A,D,M,R,O,B,F,P,z,V,W,q,H,U,j,$,K,G,Q,Y,X,Z,J,ee,te,ne,ie,re,se,oe,ae,le,he,ce=n(9133),ue=n(6788),de=n(8690),ge=n(8581),fe=n(5350);(function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"})(b||(b={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["Auto"]=2]="Auto"}(k||(k={})),function(e){e[e["None"]=0]="None",e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(v||(v={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(C||(C={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(L||(L={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(w||(w={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(y||(y={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(S||(S={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(x||(x={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(E||(E={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(N||(N={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["ariaRequired"]=5]="ariaRequired",e[e["autoClosingBrackets"]=6]="autoClosingBrackets",e[e["autoClosingComments"]=7]="autoClosingComments",e[e["screenReaderAnnounceInlineSuggestion"]=8]="screenReaderAnnounceInlineSuggestion",e[e["autoClosingDelete"]=9]="autoClosingDelete",e[e["autoClosingOvertype"]=10]="autoClosingOvertype",e[e["autoClosingQuotes"]=11]="autoClosingQuotes",e[e["autoIndent"]=12]="autoIndent",e[e["automaticLayout"]=13]="automaticLayout",e[e["autoSurround"]=14]="autoSurround",e[e["bracketPairColorization"]=15]="bracketPairColorization",e[e["guides"]=16]="guides",e[e["codeLens"]=17]="codeLens",e[e["codeLensFontFamily"]=18]="codeLensFontFamily",e[e["codeLensFontSize"]=19]="codeLensFontSize",e[e["colorDecorators"]=20]="colorDecorators",e[e["colorDecoratorsLimit"]=21]="colorDecoratorsLimit",e[e["columnSelection"]=22]="columnSelection",e[e["comments"]=23]="comments",e[e["contextmenu"]=24]="contextmenu",e[e["copyWithSyntaxHighlighting"]=25]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=26]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=27]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=28]="cursorStyle",e[e["cursorSurroundingLines"]=29]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=30]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=31]="cursorWidth",e[e["disableLayerHinting"]=32]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=33]="disableMonospaceOptimizations",e[e["domReadOnly"]=34]="domReadOnly",e[e["dragAndDrop"]=35]="dragAndDrop",e[e["dropIntoEditor"]=36]="dropIntoEditor",e[e["emptySelectionClipboard"]=37]="emptySelectionClipboard",e[e["experimentalWhitespaceRendering"]=38]="experimentalWhitespaceRendering",e[e["extraEditorClassName"]=39]="extraEditorClassName",e[e["fastScrollSensitivity"]=40]="fastScrollSensitivity",e[e["find"]=41]="find",e[e["fixedOverflowWidgets"]=42]="fixedOverflowWidgets",e[e["folding"]=43]="folding",e[e["foldingStrategy"]=44]="foldingStrategy",e[e["foldingHighlight"]=45]="foldingHighlight",e[e["foldingImportsByDefault"]=46]="foldingImportsByDefault",e[e["foldingMaximumRegions"]=47]="foldingMaximumRegions",e[e["unfoldOnClickAfterEndOfLine"]=48]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=49]="fontFamily",e[e["fontInfo"]=50]="fontInfo",e[e["fontLigatures"]=51]="fontLigatures",e[e["fontSize"]=52]="fontSize",e[e["fontWeight"]=53]="fontWeight",e[e["fontVariations"]=54]="fontVariations",e[e["formatOnPaste"]=55]="formatOnPaste",e[e["formatOnType"]=56]="formatOnType",e[e["glyphMargin"]=57]="glyphMargin",e[e["gotoLocation"]=58]="gotoLocation",e[e["hideCursorInOverviewRuler"]=59]="hideCursorInOverviewRuler",e[e["hover"]=60]="hover",e[e["inDiffEditor"]=61]="inDiffEditor",e[e["inlineSuggest"]=62]="inlineSuggest",e[e["inlineEdit"]=63]="inlineEdit",e[e["letterSpacing"]=64]="letterSpacing",e[e["lightbulb"]=65]="lightbulb",e[e["lineDecorationsWidth"]=66]="lineDecorationsWidth",e[e["lineHeight"]=67]="lineHeight",e[e["lineNumbers"]=68]="lineNumbers",e[e["lineNumbersMinChars"]=69]="lineNumbersMinChars",e[e["linkedEditing"]=70]="linkedEditing",e[e["links"]=71]="links",e[e["matchBrackets"]=72]="matchBrackets",e[e["minimap"]=73]="minimap",e[e["mouseStyle"]=74]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=75]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=76]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=77]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=78]="multiCursorModifier",e[e["multiCursorPaste"]=79]="multiCursorPaste",e[e["multiCursorLimit"]=80]="multiCursorLimit",e[e["occurrencesHighlight"]=81]="occurrencesHighlight",e[e["overviewRulerBorder"]=82]="overviewRulerBorder",e[e["overviewRulerLanes"]=83]="overviewRulerLanes",e[e["padding"]=84]="padding",e[e["pasteAs"]=85]="pasteAs",e[e["parameterHints"]=86]="parameterHints",e[e["peekWidgetDefaultFocus"]=87]="peekWidgetDefaultFocus",e[e["placeholder"]=88]="placeholder",e[e["definitionLinkOpensInPeek"]=89]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=90]="quickSuggestions",e[e["quickSuggestionsDelay"]=91]="quickSuggestionsDelay",e[e["readOnly"]=92]="readOnly",e[e["readOnlyMessage"]=93]="readOnlyMessage",e[e["renameOnType"]=94]="renameOnType",e[e["renderControlCharacters"]=95]="renderControlCharacters",e[e["renderFinalNewline"]=96]="renderFinalNewline",e[e["renderLineHighlight"]=97]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=98]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=99]="renderValidationDecorations",e[e["renderWhitespace"]=100]="renderWhitespace",e[e["revealHorizontalRightPadding"]=101]="revealHorizontalRightPadding",e[e["roundedSelection"]=102]="roundedSelection",e[e["rulers"]=103]="rulers",e[e["scrollbar"]=104]="scrollbar",e[e["scrollBeyondLastColumn"]=105]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=106]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=107]="scrollPredominantAxis",e[e["selectionClipboard"]=108]="selectionClipboard",e[e["selectionHighlight"]=109]="selectionHighlight",e[e["selectOnLineNumbers"]=110]="selectOnLineNumbers",e[e["showFoldingControls"]=111]="showFoldingControls",e[e["showUnused"]=112]="showUnused",e[e["snippetSuggestions"]=113]="snippetSuggestions",e[e["smartSelect"]=114]="smartSelect",e[e["smoothScrolling"]=115]="smoothScrolling",e[e["stickyScroll"]=116]="stickyScroll",e[e["stickyTabStops"]=117]="stickyTabStops",e[e["stopRenderingLineAfter"]=118]="stopRenderingLineAfter",e[e["suggest"]=119]="suggest",e[e["suggestFontSize"]=120]="suggestFontSize",e[e["suggestLineHeight"]=121]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=122]="suggestOnTriggerCharacters",e[e["suggestSelection"]=123]="suggestSelection",e[e["tabCompletion"]=124]="tabCompletion",e[e["tabIndex"]=125]="tabIndex",e[e["unicodeHighlighting"]=126]="unicodeHighlighting",e[e["unusualLineTerminators"]=127]="unusualLineTerminators",e[e["useShadowDOM"]=128]="useShadowDOM",e[e["useTabStops"]=129]="useTabStops",e[e["wordBreak"]=130]="wordBreak",e[e["wordSegmenterLocales"]=131]="wordSegmenterLocales",e[e["wordSeparators"]=132]="wordSeparators",e[e["wordWrap"]=133]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=134]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=135]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=136]="wordWrapColumn",e[e["wordWrapOverride1"]=137]="wordWrapOverride1",e[e["wordWrapOverride2"]=138]="wordWrapOverride2",e[e["wrappingIndent"]=139]="wrappingIndent",e[e["wrappingStrategy"]=140]="wrappingStrategy",e[e["showDeprecated"]=141]="showDeprecated",e[e["inlayHints"]=142]="inlayHints",e[e["editorClassName"]=143]="editorClassName",e[e["pixelRatio"]=144]="pixelRatio",e[e["tabFocusMode"]=145]="tabFocusMode",e[e["layoutInfo"]=146]="layoutInfo",e[e["wrappingInfo"]=147]="wrappingInfo",e[e["defaultColorDecorators"]=148]="defaultColorDecorators",e[e["colorDecoratorsActivatedOn"]=149]="colorDecoratorsActivatedOn",e[e["inlineCompletionsAccessibilityVerbose"]=150]="inlineCompletionsAccessibilityVerbose"}(I||(I={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(T||(T={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(A||(A={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(D||(D={})),function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"}(M||(M={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(R||(R={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(O||(O={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(B||(B={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(F||(F={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(P||(P={})),function(e){e[e["DependsOnKbLayout"]=-1]="DependsOnKbLayout",e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["Digit0"]=21]="Digit0",e[e["Digit1"]=22]="Digit1",e[e["Digit2"]=23]="Digit2",e[e["Digit3"]=24]="Digit3",e[e["Digit4"]=25]="Digit4",e[e["Digit5"]=26]="Digit5",e[e["Digit6"]=27]="Digit6",e[e["Digit7"]=28]="Digit7",e[e["Digit8"]=29]="Digit8",e[e["Digit9"]=30]="Digit9",e[e["KeyA"]=31]="KeyA",e[e["KeyB"]=32]="KeyB",e[e["KeyC"]=33]="KeyC",e[e["KeyD"]=34]="KeyD",e[e["KeyE"]=35]="KeyE",e[e["KeyF"]=36]="KeyF",e[e["KeyG"]=37]="KeyG",e[e["KeyH"]=38]="KeyH",e[e["KeyI"]=39]="KeyI",e[e["KeyJ"]=40]="KeyJ",e[e["KeyK"]=41]="KeyK",e[e["KeyL"]=42]="KeyL",e[e["KeyM"]=43]="KeyM",e[e["KeyN"]=44]="KeyN",e[e["KeyO"]=45]="KeyO",e[e["KeyP"]=46]="KeyP",e[e["KeyQ"]=47]="KeyQ",e[e["KeyR"]=48]="KeyR",e[e["KeyS"]=49]="KeyS",e[e["KeyT"]=50]="KeyT",e[e["KeyU"]=51]="KeyU",e[e["KeyV"]=52]="KeyV",e[e["KeyW"]=53]="KeyW",e[e["KeyX"]=54]="KeyX",e[e["KeyY"]=55]="KeyY",e[e["KeyZ"]=56]="KeyZ",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["F20"]=78]="F20",e[e["F21"]=79]="F21",e[e["F22"]=80]="F22",e[e["F23"]=81]="F23",e[e["F24"]=82]="F24",e[e["NumLock"]=83]="NumLock",e[e["ScrollLock"]=84]="ScrollLock",e[e["Semicolon"]=85]="Semicolon",e[e["Equal"]=86]="Equal",e[e["Comma"]=87]="Comma",e[e["Minus"]=88]="Minus",e[e["Period"]=89]="Period",e[e["Slash"]=90]="Slash",e[e["Backquote"]=91]="Backquote",e[e["BracketLeft"]=92]="BracketLeft",e[e["Backslash"]=93]="Backslash",e[e["BracketRight"]=94]="BracketRight",e[e["Quote"]=95]="Quote",e[e["OEM_8"]=96]="OEM_8",e[e["IntlBackslash"]=97]="IntlBackslash",e[e["Numpad0"]=98]="Numpad0",e[e["Numpad1"]=99]="Numpad1",e[e["Numpad2"]=100]="Numpad2",e[e["Numpad3"]=101]="Numpad3",e[e["Numpad4"]=102]="Numpad4",e[e["Numpad5"]=103]="Numpad5",e[e["Numpad6"]=104]="Numpad6",e[e["Numpad7"]=105]="Numpad7",e[e["Numpad8"]=106]="Numpad8",e[e["Numpad9"]=107]="Numpad9",e[e["NumpadMultiply"]=108]="NumpadMultiply",e[e["NumpadAdd"]=109]="NumpadAdd",e[e["NUMPAD_SEPARATOR"]=110]="NUMPAD_SEPARATOR",e[e["NumpadSubtract"]=111]="NumpadSubtract",e[e["NumpadDecimal"]=112]="NumpadDecimal",e[e["NumpadDivide"]=113]="NumpadDivide",e[e["KEY_IN_COMPOSITION"]=114]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=115]="ABNT_C1",e[e["ABNT_C2"]=116]="ABNT_C2",e[e["AudioVolumeMute"]=117]="AudioVolumeMute",e[e["AudioVolumeUp"]=118]="AudioVolumeUp",e[e["AudioVolumeDown"]=119]="AudioVolumeDown",e[e["BrowserSearch"]=120]="BrowserSearch",e[e["BrowserHome"]=121]="BrowserHome",e[e["BrowserBack"]=122]="BrowserBack",e[e["BrowserForward"]=123]="BrowserForward",e[e["MediaTrackNext"]=124]="MediaTrackNext",e[e["MediaTrackPrevious"]=125]="MediaTrackPrevious",e[e["MediaStop"]=126]="MediaStop",e[e["MediaPlayPause"]=127]="MediaPlayPause",e[e["LaunchMediaPlayer"]=128]="LaunchMediaPlayer",e[e["LaunchMail"]=129]="LaunchMail",e[e["LaunchApp2"]=130]="LaunchApp2",e[e["Clear"]=131]="Clear",e[e["MAX_VALUE"]=132]="MAX_VALUE"}(z||(z={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(V||(V={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(W||(W={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(q||(q={})),function(e){e[e["Normal"]=1]="Normal",e[e["Underlined"]=2]="Underlined"}(H||(H={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(U||(U={})),function(e){e[e["AIGenerated"]=1]="AIGenerated"}(j||(j={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}($||($={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(K||(K={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(G||(G={})),function(e){e[e["Word"]=0]="Word",e[e["Line"]=1]="Line",e[e["Suggest"]=2]="Suggest"}(Q||(Q={})),function(e){e[e["Left"]=0]="Left",e[e["Right"]=1]="Right",e[e["None"]=2]="None",e[e["LeftOfInjectedText"]=3]="LeftOfInjectedText",e[e["RightOfInjectedText"]=4]="RightOfInjectedText"}(Y||(Y={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(X||(X={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(Z||(Z={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(J||(J={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(ee||(ee={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(te||(te={})),function(e){e["Off"]="off",e["OnCode"]="onCode",e["On"]="on"}(ne||(ne={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(ie||(ie={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(re||(re={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(se||(se={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(oe||(oe={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(ae||(ae={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(le||(le={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(he||(he={}));class me{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return _(e,t)}}function pe(){return{editor:void 0,languages:void 0,CancellationTokenSource:i.Qi,Emitter:r.vl,KeyCode:z,KeyMod:me,Position:ue.y,Range:de.Q,Selection:ge.L,SelectionDirection:te,MarkerSeverity:V,MarkerTag:W,Uri:ce.r,Token:fe.ou}}},5926:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseEditorSimpleWorker:()=>it,EditorSimpleWorker:()=>rt,create:()=>st});class i{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var r=n(5647);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class c{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,s]=c._getElements(e),[o,a,l]=c._getElements(t);this._hasStrings=s&&l,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(c._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n=e&&r>=n&&this.ElementsAreEqual(t,r))t--,r--;if(e>t||n>r){let s;return n<=r?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,r-n+1)]):e<=t?(a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],l=[0],h=this.ComputeRecursionPoint(e,t,n,r,o,l,s),c=o[0],u=l[0];if(null!==h)return h;if(!s[0]){const o=this.ComputeDiffRecursive(e,c,n,u,s);let a=[];return a=s[0]?[new i(c+1,t-(c+1)+1,u+1,r-(u+1)+1)]:this.ComputeDiffRecursive(c+1,t,u+1,r,s),this.ConcatenateChanges(o,a)}return[new i(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,s,o,a,l,c,u,d,g,f,m,p,_,b,k){let v=null,C=null,L=new h,w=t,y=n,S=f[0]-_[0]-r,x=-1073741824,E=this.m_forwardHistory.length-1;do{const t=S+e;t===w||t=0&&(c=this.m_forwardHistory[E],e=c[0],w=1,y=c.length-1)}while(--E>=-1);if(v=L.getReverseChanges(),k[0]){let e=f[0]+1,t=_[0]+1;if(null!==v&&v.length>0){const n=v[v.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}C=[new i(e,g-e+1,t,p-t+1)]}else{L=new h,w=o,y=a,S=f[0]-_[0]-l,x=1073741824,E=b?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+s;e===w||e=u[e+1]?(d=u[e+1]-1,m=d-S-l,d>x&&L.MarkNextChange(),x=d+1,L.AddOriginalElement(d+1,m+1),S=e+1-s):(d=u[e-1],m=d-S-l,d>x&&L.MarkNextChange(),x=d,L.AddModifiedElement(d+1,m+1),S=e-1-s),E>=0&&(u=this.m_reverseHistory[E],s=u[0],w=1,y=u.length-1)}while(--E>=-1);C=L.getChanges()}return this.ConcatenateChanges(v,C)}ComputeRecursionPoint(e,t,n,r,s,o,a){let h=0,c=0,u=0,d=0,g=0,f=0;e--,n--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(r-n),p=m+1,_=new Int32Array(p),b=new Int32Array(p),k=r-n,v=t-e,C=e-n,L=t-r,w=v-k,y=w%2===0;_[k]=e,b[v]=t,a[0]=!1;for(let w=1;w<=m/2+1;w++){let m=0,S=0;u=this.ClipDiagonalBound(k-w,w,k,p),d=this.ClipDiagonalBound(k+w,w,k,p);for(let e=u;e<=d;e+=2){h=e===u||em+S&&(m=h,S=c),!y&&Math.abs(e-v)<=w-1&&h>=b[e])return s[0]=h,o[0]=c,n<=b[e]&&w<=1448?this.WALKTRACE(k,u,d,C,v,g,f,L,_,b,h,t,s,c,r,o,y,a):null}const x=(m-e+(S-n)-w)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,x))return a[0]=!0,s[0]=m,o[0]=S,x>0&&w<=1448?this.WALKTRACE(k,u,d,C,v,g,f,L,_,b,h,t,s,c,r,o,y,a):(e++,n++,[new i(e,t-e+1,n,r-n+1)]);g=this.ClipDiagonalBound(v-w,w,v,p),f=this.ClipDiagonalBound(v+w,w,v,p);for(let i=g;i<=f;i+=2){h=i===g||i=b[i+1]?b[i+1]-1:b[i-1],c=h-(i-v)-L;const l=h;while(h>e&&c>n&&this.ElementsAreEqual(h,c))h--,c--;if(b[i]=h,y&&Math.abs(i-k)<=w&&h<=_[i])return s[0]=h,o[0]=c,l>=_[i]&&w<=1448?this.WALKTRACE(k,u,d,C,v,g,f,L,_,b,h,t,s,c,r,o,y,a):null}if(w<=1447){let e=new Int32Array(d-u+2);e[0]=k-u+1,l.Copy2(_,u,e,1,d-u+1),this.m_forwardHistory.push(e),e=new Int32Array(f-g+2),e[0]=v-g+1,l.Copy2(b,g,e,1,f-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(k,u,d,C,v,g,f,L,_,b,h,t,s,c,r,o,y,a)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;while(n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,r=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,r=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,h=n.modifiedStart-e;if(tl&&(l=u,a=e)}n.originalStart-=a,n.modifiedStart-=a;const h=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],h)&&(e[t-1]=h[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&n>a&&(a=n,l=t,h=e)}return a>0?[l,h]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){const r=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,i)?1:0;return r+s}ConcatenateChanges(e,t){const n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return l.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],l.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return l.Copy(e,0,n,0,e.length),l.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(r,s,o,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&et&&(t=s),r>n&&(n=r),o>n&&(n=o)}t++,n++;const i=new g(n,t,0);for(let t=0,n=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let m=null;function p(){return null===m&&(m=new f([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),m}let _=null;function b(){if(null===_){_=new d.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;ti);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:s+2},url:t.substring(i,s+1)}}static computeLinks(e,t=p()){const n=b(),i=[];for(let r=1,s=e.getLineCount();r<=s;r++){const s=e.getLineContent(r),o=s.length;let a=0,l=0,h=0,c=1,u=!1,d=!1,g=!1,f=!1;while(a=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}var L=n(215),w=n(2899),y=n(4240),S=n(7412);class x{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class E{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}var N=n(4396),I=n(4544),T=n(6788),A=n(9109),D=n(371);n(3904);class M{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}class R{static inverse(e,t,n){const i=[];let r=1,s=1;for(const t of e){const e=new R(new I.M(r,t.original.startLineNumber),new I.M(s,t.modified.startLineNumber));e.modified.isEmpty||i.push(e),r=t.original.endLineNumberExclusive,s=t.modified.endLineNumberExclusive}const o=new R(new I.M(r,t+1),new I.M(s,n+1));return o.modified.isEmpty||i.push(o),i}static clip(e,t,n){const i=[];for(const r of e){const e=r.original.intersect(t),s=r.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&i.push(new R(e,s))}return i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new R(this.modified,this.original)}join(e){return new R(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new P(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new N.D7("not a valid diff");return new P(new u.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new u.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new P(new u.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new u.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(B(this.original.endLineNumberExclusive,e)&&B(this.modified.endLineNumberExclusive,t))return new P(new u.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new u.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new P(u.Q.fromPositions(new T.y(this.original.startLineNumber,1),O(new T.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),u.Q.fromPositions(new T.y(this.modified.startLineNumber,1),O(new T.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new P(u.Q.fromPositions(O(new T.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),O(new T.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),u.Q.fromPositions(O(new T.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),O(new T.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new N.D7}}function O(e,t){if(e.lineNumber<1)return new T.y(1,1);if(e.lineNumber>t.length)return new T.y(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new T.y(e.lineNumber,n.length+1):e}function B(e,t){return e>=1&&e<=t.length}class F extends R{static fromRangeMappings(e){const t=I.M.join(e.map((e=>I.M.fromRangeInclusive(e.originalRange)))),n=I.M.join(e.map((e=>I.M.fromRangeInclusive(e.modifiedRange))));return new F(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new F(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new F(this.original,this.modified,[this.toRangeMapping()])}}class P{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new P(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new M(this.originalRange,t)}}var z=n(601);const V=3;class W{computeDiff(e,t,n){const i=new G(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}),r=i.computeDiff(),s=[];let o=null;for(const e of r.changes){let t,n;t=0===e.originalEndLineNumber?new I.M(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new I.M(e.originalStartLineNumber,e.originalEndLineNumber+1),n=0===e.modifiedEndLineNumber?new I.M(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new I.M(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let i=new F(t,n,e.charChanges?.map((e=>new P(new u.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new u.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));o&&(o.modified.endLineNumberExclusive!==i.modified.startLineNumber&&o.original.endLineNumberExclusive!==i.original.startLineNumber||(i=new F(o.original.join(i.original),o.modified.join(i.modified),o.innerChanges&&i.innerChanges?o.innerChanges.concat(i.innerChanges):void 0),s.pop())),s.push(i),o=i}return(0,A.Ft)((()=>(0,A.Xo)(s,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class j{constructor(e,t,n,i,r,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const i=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),h=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),c=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new j(i,r,s,o,a,l,h,c)}}function $(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,r=e.length;i0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=q(s,a,r,!0).changes;o&&(e=$(e)),u=[];for(let t=0,n=e.length;t1&&o>1){const i=e.charCodeAt(n-2),r=t.charCodeAt(o-2);if(i!==r)break;n--,o--}(n>1||o>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,n,s+1,1,o)}{let n=Y(e,1),o=Y(t,1);const a=e.length+1,l=t.length+1;while(n!0;const t=Date.now();return()=>Date.now()-t{n.push(ee.fromOffsetPairs(e?e.getEndExclusives():te.zero,i?i.getStarts():new te(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),n}static fromOffsetPairs(e,t){return new ee(new D.L(e.offset1,t.offset1),new D.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new N.D7("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new ee(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new ee(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new ee(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new ee(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new ee(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(t&&n)return new ee(t,n)}getStarts(){return new te(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new te(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class te{static{this.zero=new te(0,0)}static{this.max=new te(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new te(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class ne{static{this.instance=new ne}isValid(){return!0}}class ie{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new N.D7("timeout must be positive")}isValid(){const e=Date.now()-this.startTime0&&l>0&&3===s.get(a-1,l-1)&&(u+=o.get(a-1,l-1)),u+=i?i(a,l):1):u=-1;const d=Math.max(h,c,u);if(d===u){const e=a>0&&l>0?o.get(a-1,l-1):0;o.set(a,l,e+1),s.set(a,l,3)}else d===h?(o.set(a,l,0),s.set(a,l,1)):d===c&&(o.set(a,l,0),s.set(a,l,2));r.set(a,l,d)}const a=[];let l=e.length,h=t.length;function c(e,t){e+1===l&&t+1===h||a.push(new ee(new D.L(e+1,l),new D.L(t+1,h))),l=e,h=t}let u=e.length-1,d=t.length-1;while(u>=0&&d>=0)3===s.get(u,d)?(c(u,d),u--,d--):1===s.get(u,d)?u--:d--;return c(-1,-1),a.reverse(),new J(a,!1)}}class le{compute(e,t,n=ne.instance){if(0===e.length||0===t.length)return J.trivial(e,t);const i=e,r=t;function s(e,t){while(ei.length||d>r.length)continue;const g=s(u,d);a.set(h,g);const f=u===o?l.get(h+1):l.get(h-1);if(l.set(h,g!==u?new he(f,u,d,g-u):f),a.get(h)===i.length&&a.get(h)-h===r.length)break e}}let c=l.get(h);const u=[];let d=i.length,g=r.length;while(1){const e=c?c.x+c.length:0,t=c?c.y+c.length:0;if(e===d&&t===g||u.push(new ee(new D.L(e,d),new D.L(t,g))),!c)break;d=c.x,g=c.y,c=c.prev}return u.reverse(),new J(u,!1)}}class he{constructor(e,t,n,i){this.prev=e,this.x=t,this.y=n,this.length=i}}class ce{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class ue{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var de=n(3654),ge=n(1553);class fe{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let i=e[t-1],r=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(r=this.range.startColumn-1,i=i.substring(r)),this.lineStartOffsets.push(r);let s=0;if(!n){const e=i.trimStart();s=i.length-e.length,i=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-r-s,i.length):i.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=be(e>0?this.elements[e-1]:-1),n=be(et<=e)),i=e-this.firstElementOffsetByLineIdx[n];return new T.y(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+i+(0===i&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?u.Q.fromPositions(n,n):u.Q.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!me(this.elements[e]))return;let t=e;while(t>0&&me(this.elements[t-1]))t--;let n=e;while(nt<=e.start))??0,n=(0,de.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new D.L(t,n)}}function me(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const pe={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function _e(e){return pe[e]}function be(e){return 10===e?8:13===e?7:se(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function ke(e,t,n,i,r,s){let{moves:o,excludedChanges:a}=Ce(e,t,n,s);if(!s.isValid())return[];const l=e.filter((e=>!a.has(e))),h=Le(l,i,r,t,n,s);return(0,Z.E4)(o,h),o=ye(o),o=o.filter((e=>{const n=e.original.toOffsetRange().slice(t).map((e=>e.trim())),i=n.join("\n");return i.length>=15&&ve(n,(e=>e.length>=2))>=2})),o=Se(e,o),o}function ve(e,t){let n=0;for(const i of e)t(i)&&n++;return n}function Ce(e,t,n,i){const r=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new oe(e.original,t,e))),o=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new oe(e.modified,n,e)))),a=new Set;for(const e of s){let t,n=-1;for(const i of o){const r=e.computeSimilarity(i);r>n&&(n=r,t=i)}if(n>.9&&t&&(o.delete(t),r.push(new R(e.range,t.range)),a.add(e.source),a.add(t.source)),!i.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}function Le(e,t,n,i,r,s){const o=[],a=new ge.db;for(const n of e)for(let e=n.original.startLineNumber;ee.modified.startLineNumber),Z.U9));for(const t of e){let e=[];for(let i=t.modified.startLineNumber;i{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===r.endLineNumberExclusive)return n.originalLineRange=new I.M(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new I.M(n.modifiedLineRange.startLineNumber,r.endLineNumberExclusive),void s.push(n);const n={modifiedLineRange:r,originalLineRange:t};l.push(n),s.push(n)})),e=s}if(!s.isValid())return[]}l.sort((0,Z.Hw)((0,Z.VE)((e=>e.modifiedLineRange.length),Z.U9)));const h=new I.S,c=new I.S;for(const e of l){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,n=h.subtractFrom(e.modifiedLineRange),i=c.subtractFrom(e.originalLineRange).getWithDelta(t),r=n.getIntersection(i);for(const e of r.ranges){if(e.length<3)continue;const n=e,i=e.delta(-t);o.push(new R(i,n)),h.addRange(n),c.addRange(i)}}o.sort((0,Z.VE)((e=>e.original.startLineNumber),Z.U9));const u=new de.vJ(e);for(let t=0;te.original.startLineNumber<=n.original.startLineNumber)),l=(0,de.lx)(e,(e=>e.modified.startLineNumber<=n.modified.startLineNumber)),d=Math.max(n.original.startLineNumber-a.original.startLineNumber,n.modified.startLineNumber-l.modified.startLineNumber),g=u.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumberi.length||t>r.length)break;if(h.contains(t)||c.contains(e))break;if(!we(i[e-1],r[t-1],s))break}for(p>0&&(c.addRange(new I.M(n.original.startLineNumber-p,n.original.startLineNumber)),h.addRange(new I.M(n.modified.startLineNumber-p,n.modified.startLineNumber))),_=0;_i.length||t>r.length)break;if(h.contains(t)||c.contains(e))break;if(!we(i[e-1],r[t-1],s))break}_>0&&(c.addRange(new I.M(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+_)),h.addRange(new I.M(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+_))),(p>0||_>0)&&(o[t]=new R(new I.M(n.original.startLineNumber-p,n.original.endLineNumberExclusive+_),new I.M(n.modified.startLineNumber-p,n.modified.endLineNumberExclusive+_)))}return o}function we(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new le,r=i.compute(new fe([e],new u.Q(1,1,1,e.length),!1),new fe([t],new u.Q(1,1,1,t.length),!1),n);let s=0;const o=ee.invert(r.diffs,e.length);for(const t of o)t.seq1Range.forEach((t=>{se(e.charCodeAt(t))||s++}));function a(t){let n=0;for(let i=0;it.length?e:t),h=s/l>.6&&l>10;return h}function ye(e){if(0===e.length)return e;e.sort((0,Z.VE)((e=>e.original.startLineNumber),Z.U9));const t=[e[0]];for(let n=1;n=0&&o>=0;a&&s+o<=2?t[t.length-1]=i.join(r):t.push(r)}return t}function Se(e,t){const n=new de.vJ(e);return t=t.filter((t=>{const i=n.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber0&&(o=o.delta(a))}r.push(o)}return i.length>0&&r.push(i[i.length-1]),r}function Ne(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let i=0;i0?n[i-1]:void 0,s=n[i],o=i+1=i.start&&e.seq2Range.start-o>=r.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&oh&&(h=a,l=i)}return e.delta(l)}function Te(e,t,n){const i=[];for(const e of n){const t=i[i.length-1];t?e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2?i[i.length-1]=new ee(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):i.push(e):i.push(e)}return i}function Ae(e,t,n){const i=ee.invert(n,e.length),r=[];let s=new te(0,0);function o(n,o){if(n.offset10){const n=i[0],r=n.seq1Range.intersects(h.seq1Range)||n.seq2Range.intersects(h.seq2Range);if(!r)break;const s=e.findWordContaining(n.seq1Range.start),o=t.findWordContaining(n.seq2Range.start),a=new ee(s,o),l=a.intersect(n);if(u+=l.seq1Range.length,d+=l.seq2Range.length,h=h.join(a),!(h.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;i.shift()}u+d<2*(h.seq1Range.length+h.seq2Range.length)/3&&r.push(h),s=h.getEndExclusives()}while(i.length>0){const e=i.shift();e.seq1Range.isEmpty||(o(e.getStarts(),e),o(e.getEndExclusives().delta(-1),e))}const a=De(n,r);return a}function De(e,t){const n=[];while(e.length>0||t.length>0){const i=e[0],r=t[0];let s;s=i&&(!r||i.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Me(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const o=[i[0]];for(let a=1;a5||n.seq1Range.length+n.seq2Range.length>5)}const u=c(h,l);u?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}i=o}while(s++<10&&r);return i}function Re(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const a=[i[0]];for(let l=1;l5||r.length>500)return!1;const o=e.getText(r).trim();if(o.length>20||o.split(/\r\n|\r|\n/).length>1)return!1;const a=e.countLinesIn(n.seq1Range),l=n.seq1Range.length,u=t.countLinesIn(n.seq2Range),d=n.seq2Range.length,g=e.countLinesIn(i.seq1Range),f=i.seq1Range.length,m=t.countLinesIn(i.seq2Range),p=i.seq2Range.length,_=130;function b(e){return Math.min(e,_)}return Math.pow(Math.pow(b(40*a+l),1.5)+Math.pow(b(40*u+d),1.5),1.5)+Math.pow(Math.pow(b(40*g+f),1.5)+Math.pow(b(40*m+p),1.5),1.5)>(_**1.5)**1.5*1.3}const d=u(c,h);d?(r=!0,a[a.length-1]=a[a.length-1].join(h)):a.push(h)}i=a}while(s++<10&&r);const o=[];return(0,Z.kj)(i,((t,n,i)=>{let r=n;function s(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}const a=e.extendToFullLines(n.seq1Range),l=e.getText(new D.L(a.start,n.seq1Range.start));s(l)&&(r=r.deltaStart(-l.length));const h=e.getText(new D.L(n.seq1Range.endExclusive,a.endExclusive));s(h)&&(r=r.deltaEnd(h.length));const c=ee.fromOffsetPairs(t?t.getEndExclusives():te.zero,i?i.getStarts():te.max),u=r.intersect(c);o.length>0&&u.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(u):o.push(u)})),o}class Oe{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=0===e?0:Be(this.lines[e-1]),n=e===this.lines.length?0:Be(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function Be(e){let t=0;while(te===t)))return new x([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new x([new F(new I.M(1,e.length+1),new I.M(1,t.length+1),[new P(new u.Q(1,1,e.length,e[e.length-1].length+1),new u.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const i=0===n.maxComputationTimeMs?ne.instance:new ie(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,s=new Map;function o(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map((e=>o(e.trim()))),l=t.map((e=>o(e.trim()))),h=new Oe(a,e),c=new Oe(l,t),d=(()=>h.length+c.length<1700?this.dynamicProgrammingDiffing.compute(h,c,i,((n,i)=>e[n]===t[i]?0===t[i].length?.1:1+Math.log(1+t[i].length):.99)):this.myersDiffingAlgorithm.compute(h,c,i))();let g=d.diffs,f=d.hitTimeout;g=xe(h,c,g),g=Me(h,c,g);const m=[],p=n=>{if(r)for(let s=0;sn.seq1Range.start-_===n.seq2Range.start-b));const s=n.seq1Range.start-_;p(s),_=n.seq1Range.endExclusive,b=n.seq2Range.endExclusive;const o=this.refineDiff(e,t,n,i,r);o.hitTimeout&&(f=!0);for(const e of o.mappings)m.push(e)}p(e.length-_);const k=Pe(m,e,t);let v=[];return n.computeMoves&&(v=this.computeMoves(k,e,t,a,l,i,r)),(0,A.Ft)((()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function i(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const r of k){if(!r.innerChanges)return!1;for(const i of r.innerChanges){const r=n(i.modifiedRange.getStartPosition(),t)&&n(i.modifiedRange.getEndPosition(),t)&&n(i.originalRange.getStartPosition(),e)&&n(i.originalRange.getEndPosition(),e);if(!r)return!1}if(!i(r.modified,t)||!i(r.original,e))return!1}return!0})),new x(k,v,f)}computeMoves(e,t,n,i,r,s,o){const a=ke(e,t,n,i,r,s),l=a.map((e=>{const i=this.refineDiff(t,n,new ee(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o),r=Pe(i.mappings,t,n,!0);return new E(e,r)}));return l}refineDiff(e,t,n,i,r){const s=Ve(n),o=s.toRangeMapping2(e,t),a=new fe(e,o.originalRange,r),l=new fe(t,o.modifiedRange,r),h=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,i):this.myersDiffingAlgorithm.compute(a,l,i),c=!1;let u=h.diffs;c&&ee.assertSorted(u),u=xe(a,l,u),c&&ee.assertSorted(u),u=Ae(a,l,u),c&&ee.assertSorted(u),u=Te(a,l,u),c&&ee.assertSorted(u),u=Re(a,l,u),c&&ee.assertSorted(u);const d=u.map((e=>new P(a.translateRange(e.seq1Range),l.translateRange(e.seq2Range))));return c&&P.assertSorted(d),{mappings:d,hitTimeout:h.hitTimeout}}}function Pe(e,t,n,i=!1){const r=[];for(const i of(0,Z.n)(e.map((e=>ze(e,t,n))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=i[0],t=i[i.length-1];r.push(new F(e.original.join(t.original),e.modified.join(t.modified),i.map((e=>e.innerChanges[0]))))}return(0,A.Ft)((()=>{if(!i&&r.length>0){if(r[0].modified.startLineNumber!==r[0].original.startLineNumber)return!1;if(n.length-r[r.length-1].modified.endLineNumberExclusive!==t.length-r[r.length-1].original.endLineNumberExclusive)return!1}return(0,A.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+r&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+r&&(i=1);const s=new I.M(e.originalRange.startLineNumber+i,e.originalRange.endLineNumber+1+r),o=new I.M(e.modifiedRange.startLineNumber+i,e.modifiedRange.endLineNumber+1+r);return new F(s,o,[e])}function Ve(e){return new R(new I.M(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new I.M(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}const We={getLegacy:()=>new W,getDefault:()=>new Fe};var qe=n(5603),He=n(6657),Ue=n(5476);function je(e){const t=[];for(const n of e){const e=Number(n);(e||0===e&&""!==n.replace(/\s/g,""))&&t.push(e)}return t}function $e(e,t,n,i){return{red:e/255,blue:n/255,green:t/255,alpha:i}}function Ke(e,t){const n=t.index,i=t[0].length;if(!n)return;const r=e.positionAt(n),s={startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:r.lineNumber,endColumn:r.column+i};return s}function Ge(e,t){if(!e)return;const n=Ue.Q1.Format.CSS.parseHex(t);return n?{range:e,color:$e(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}:void 0}function Qe(e,t,n){if(!e||1!==t.length)return;const i=t[0],r=i.values(),s=je(r);return{range:e,color:$e(s[0],s[1],s[2],n?s[3]:1)}}function Ye(e,t,n){if(!e||1!==t.length)return;const i=t[0],r=i.values(),s=je(r),o=new Ue.Q1(new Ue.hB(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:e,color:$e(o.rgba.r,o.rgba.g,o.rgba.b,o.rgba.a)}}function Xe(e,t){return"string"===typeof e?[...e.matchAll(t)]:e.findMatches(t)}function Ze(e){const t=[],n=/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm,i=Xe(e,n);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),r=i[1],s=i[2];if(!s)continue;let o;if("rgb"===r){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;o=Qe(Ke(e,n),Xe(s,t),!1)}else if("rgba"===r){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Qe(Ke(e,n),Xe(s,t),!0)}else if("hsl"===r){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=Ye(Ke(e,n),Xe(s,t),!1)}else if("hsla"===r){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Ye(Ke(e,n),Xe(s,t),!0)}else"#"===r&&(o=Ge(Ke(e,n),r+s));o&&t.push(o)}return t}function Je(e){return e&&"function"===typeof e.getValue&&"function"===typeof e.positionAt?Ze(e):[]}var et=n(6198),tt=n(6294);const nt=!0;class it{constructor(){this._workerTextModelSyncServer=new tt.WorkerTextModelSyncServer}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){const i=this._getModel(e);return i?S.UnicodeTextModelHighlighter.computeUnicodeHighlights(i,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const n=this._getModel(e);return n?(0,et.findSectionHeaders)(n,t):[]}async $computeDiff(e,t,n,i){const r=this._getModel(e),s=this._getModel(t);if(!r||!s)return null;const o=rt.computeDiff(r,s,n,i);return o}static computeDiff(e,t,n,i){const r="advanced"===i?We.getDefault():We.getLegacy(),s=e.getLinesContent(),o=t.getLinesContent(),a=r.computeDiff(s,o,n),l=!(a.changes.length>0)&&this._modelsAreIdentical(e,t);function h(e){return e.map((e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:l,quitEarly:a.hitTimeout,changes:h(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,h(e.changes)]))}}static _modelsAreIdentical(e,t){const n=e.getLineCount(),i=t.getLineCount();if(n!==i)return!1;for(let i=1;i<=n;i++){const n=e.getLineContent(i),r=t.getLineContent(i);if(n!==r)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){const i=this._getModel(e);if(!i)return t;const r=[];let s;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return u.Q.compareRangesUsingStarts(e.range,t.range);const n=e.range?0:1,i=t.range?0:1;return n-i}));let a=0;for(let e=1;ert._diffLimit){r.push({range:e,text:a});continue}const h=o(t,a,n),c=i.offsetAt(u.Q.lift(e).getStartPosition());for(const e of h){const t=i.positionAt(c+e.originalStart),n=i.positionAt(c+e.originalStart+e.originalLength),s={text:a.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};i.getValueInRange(s.range)!==s.text&&r.push(s)}}return"number"===typeof s&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?v(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?Je(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,i){const r=new y.W,s=new RegExp(n,i),o=new Set;e:for(const n of e){const e=this._getModel(n);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>rt._suggestionsLimit))break e}return{words:Array.from(o),duration:r.elapsed()}}async $computeWordRanges(e,t,n,i){const r=this._getModel(e);if(!r)return Object.create(null);const s=new RegExp(n,i),o=Object.create(null);for(let e=t.startLineNumber;ethis._host.$fhr(e,t),s=(0,qe.kT)(i,r),o={host:s,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve((0,qe.V0)(this._foreignModule))):new Promise(((i,r)=>{const s=e=>{this._foreignModule=e.create(o,t),i((0,qe.V0)(this._foreignModule))};if(nt){const t=He.zl.asBrowserUri(`${e}.js`).toString(!0);n(9204)(`${t}`).then(s).catch(r)}else Promise.resolve().then(function(){var t=[n(7614)(`${e}`)];s.apply(null,t)}.bind(this))["catch"](r.bind(this))}))}$fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}function st(e){return new rt(w.EditorWorkerHost.getChannel(e),null)}"function"===typeof importScripts&&(globalThis.monaco=(0,L.createMonacoBaseAPI)())},4117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IEditorWorkerService:()=>r});var i=n(7778);const r=(0,i.u1)("editorWorkerService")},2899:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EditorWorkerHost:()=>i});class i{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(i.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(i.CHANNEL_NAME,t)}}},6198:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findSectionHeaders:()=>s});const i=new RegExp("\\bMARK:\\s*(.*)$","d"),r=/^-+|-+$/g;function s(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const i=o(e,t);n=n.concat(i)}if(t.findMarkSectionHeaders){const t=a(e);n=n.concat(t)}return n}function o(e,t){const n=[],i=e.getLineCount();for(let r=1;r<=i;r++){const i=e.getLineContent(r),s=i.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:r,startColumn:s[0].length+1,endLineNumber:r,endColumn:i.length+1};if(e.endColumn>e.startColumn){const t={range:e,...h(i.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}function a(e){const t=[],n=e.getLineCount();for(let i=1;i<=n;i++){const n=e.getLineContent(i);l(n,i,t)}return t}function l(e,t,n){i.lastIndex=0;const r=i.exec(e);if(r){const e=r.indices[1][0]+1,i=r.indices[1][1]+1,s={startLineNumber:t,startColumn:e,endLineNumber:t,endColumn:i};if(s.endColumn>s.startColumn){const e={range:s,...h(r[1]),shouldBeInComments:!0};(e.text||e.hasSeparatorLine)&&n.push(e)}}}function h(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(r,""),{text:e,hasSeparatorLine:t}}},2340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getIconClasses:()=>d});var i,r=n(6657),s=n(4366),o=n(9133),a=n(5764);(function(e){e[e["FILE"]=0]="FILE",e[e["FOLDER"]=1]="FOLDER",e[e["ROOT_FOLDER"]=2]="ROOT_FOLDER"})(i||(i={}));var l,h,c=n(6455);(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeColor=t})(l||(l={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(e){const i=t.exec(e.id);if(!i)return n(c.W.error);const[,r,s]=i,o=["codicon","codicon-"+r];return s&&o.push("codicon-modifier-"+s.substring(1)),o}function i(e){return n(e).join(" ")}function r(e){return"."+n(e).join(".")}function s(e){return e&&"object"===typeof e&&"string"===typeof e.id&&("undefined"===typeof e.color||l.isThemeColor(e.color))}e.asClassNameArray=n,e.asClassName=i,e.asCSSSelector=r,e.isThemeIcon=s;const o=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);function a(e){const t=o.exec(e);if(!t)return;const[,n]=t;return{id:n}}function h(e){return{id:e}}function u(e,t){let n=e.id;const i=n.lastIndexOf("~");return-1!==i&&(n=n.substring(0,i)),t&&(n=`${n}~${t}`),{id:n}}function d(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)}function g(e,t){return e.id===t.id&&e.color?.id===t.color?.id}e.fromString=a,e.fromId=h,e.modify=u,e.getModifier=d,e.isEqual=g}(h||(h={}));const u=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,n,a,l){if(h.isThemeIcon(l))return[`codicon-${l.id}`,"predefined-file-icon"];if(o.r.isUri(l))return[];const c=a===i.ROOT_FOLDER?["rootfolder-icon"]:a===i.FOLDER?["folder-icon"]:["file-icon"];if(n){let o;if(n.scheme===r.ny.data){const e=s.B6.parseMetaData(n);o=e.get(s.B6.META_DATA_LABEL)}else{const e=n.path.match(u);e?(o=f(e[2].toLowerCase()),e[1]&&c.push(`${f(e[1].toLowerCase())}-name-dir-icon`)):o=f(n.authority.toLowerCase())}if(a===i.ROOT_FOLDER)c.push(`${o}-root-name-folder-icon`);else if(a===i.FOLDER)c.push(`${o}-name-folder-icon`);else{if(o){if(c.push(`${o}-name-file-icon`),c.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t{"use strict";n.r(t),n.d(t,{ILanguageFeatureDebounceService:()=>m,LanguageFeatureDebounceService:()=>k});var i=n(5647),r=n(1553);function s(e,t,n){return Math.min(Math.max(e,t),n)}class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class a{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},f=function(e,t){return function(n,i){t(n,i,e)}};const m=(0,l.u1)("ILanguageFeatureDebounceService");var p;(function(e){const t=new WeakMap;let n=0;function i(e){let i=t.get(e);return void 0===i&&(i=++n,t.set(e,i)),i}e.of=i})(p||(p={}));class _{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class b{constructor(e,t,n,i,s,o){this._logService=e,this._name=t,this._registry=n,this._default=i,this._min=s,this._max=o,this._cache=new r.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,i.sN)(p.of(t),e)),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?s(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let i=this._cache.get(n);i||(i=new a(6),this._cache.set(n,i));const r=s(i.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new o;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return s(e,this._min,this._max)}}let k=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){const i=n?.min??50,r=n?.max??i**2,s=n?.key??void 0,o=`${p.of(e)},${i}${s?","+s:""}`;let a=this._data.get(o);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new _(1.5*i)):a=new b(this._logService,t,e,0|this._overallAverage()||1.5*i,i,r),this._data.set(o,a)),a}_overallAverage(){const e=new o;for(const t of this._data.values())e.update(t.default());return e.value}};k=g([f(0,u.rr),f(1,h)],k),(0,c.v)(m,k,1)},2847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ILanguageFeaturesService:()=>r});var i=n(7778);const r=(0,i.u1)("ILanguageFeaturesService")},1369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageFeaturesService:()=>m});var i=n(231),r=n(8894),s=n(9322),o=n(3589),a=n(1643);function l(e,t,n,i,r,s){if(Array.isArray(e)){let o=0;for(const a of e){const e=l(a,t,n,i,r,s);if(10===e)return e;e>o&&(o=e)}return o}if("string"===typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){const{language:l,pattern:h,scheme:c,hasAccessToAllModels:u,notebookType:d}=e;if(!i&&!u)return 0;d&&r&&(t=r);let g=0;if(c)if(c===t.scheme)g=10;else{if("*"!==c)return 0;g=5}if(l)if(l===n)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(d)if(d===s)g=10;else{if("*"!==d||void 0===s)return 0;g=Math.max(g,5)}if(h){let e;if(e="string"===typeof h?h:{...h,base:(0,a.S8)(h.base)},e!==t.fsPath&&!(0,o.YW)(e,t.fsPath))return 0;g=10}return g}return 0}function h(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(h):!!e.exclusive)}class c{constructor(e,t,n,i,r){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=i,this.recursive=r}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class u{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new i.vl,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,r.s)((()=>{if(n){const e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e,t=!1){const n=[];return this._orderedForEach(e,t,(e=>n.push(e.provider))),n}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,!1,(e=>{n&&i===e._score?n.push(e.provider):(i=e._score,n=[e.provider],t.push(n))})),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(const e of this._entries)e._score>0&&n(e)}_updateScores(e,t){const n=this._notebookInfoResolver?.(e.uri),i=n?new c(e.uri,e.getLanguageId(),n.uri,n.type,t):new c(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(i)){this._lastCandidate=i;for(const n of this._entries)if(n._score=l(n.selector,i.uri,i.languageId,(0,s.vd)(e),i.notebookUri,i.notebookType),h(n.selector)&&n._score>0){if(!t){for(const e of this._entries)e._score=0;n._score=1e3;break}n._score=0}this._entries.sort(u._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._timet._time?-1:0}}function d(e){return"string"!==typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var g=n(2847),f=n(4979);class m{constructor(){this.referenceProvider=new u(this._score.bind(this)),this.renameProvider=new u(this._score.bind(this)),this.newSymbolNamesProvider=new u(this._score.bind(this)),this.codeActionProvider=new u(this._score.bind(this)),this.definitionProvider=new u(this._score.bind(this)),this.typeDefinitionProvider=new u(this._score.bind(this)),this.declarationProvider=new u(this._score.bind(this)),this.implementationProvider=new u(this._score.bind(this)),this.documentSymbolProvider=new u(this._score.bind(this)),this.inlayHintsProvider=new u(this._score.bind(this)),this.colorProvider=new u(this._score.bind(this)),this.codeLensProvider=new u(this._score.bind(this)),this.documentFormattingEditProvider=new u(this._score.bind(this)),this.documentRangeFormattingEditProvider=new u(this._score.bind(this)),this.onTypeFormattingEditProvider=new u(this._score.bind(this)),this.signatureHelpProvider=new u(this._score.bind(this)),this.hoverProvider=new u(this._score.bind(this)),this.documentHighlightProvider=new u(this._score.bind(this)),this.multiDocumentHighlightProvider=new u(this._score.bind(this)),this.selectionRangeProvider=new u(this._score.bind(this)),this.foldingRangeProvider=new u(this._score.bind(this)),this.linkProvider=new u(this._score.bind(this)),this.inlineCompletionsProvider=new u(this._score.bind(this)),this.inlineEditProvider=new u(this._score.bind(this)),this.completionProvider=new u(this._score.bind(this)),this.linkedEditingRangeProvider=new u(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new u(this._score.bind(this)),this.documentSemanticTokensProvider=new u(this._score.bind(this)),this.documentDropEditProvider=new u(this._score.bind(this)),this.documentPasteEditProvider=new u(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,f.v)(g.ILanguageFeaturesService,m,1)},2657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageService:()=>ne});var i=n(231),r=n(8894),s=n(7024),o=n(5053),a=n(5350),l=n(5764);const h=(e,t)=>e===t;new WeakMap;class c{constructor(e,t,n){this.owner=e,this.debugNameSource=t,this.referenceFn=n}getDebugName(e){return g(e,this)}}const u=new Map,d=new WeakMap;function g(e,t){const n=d.get(e);if(n)return n;const i=f(e,t);if(i){let t=u.get(i)??0;t++,u.set(i,t);const n=1===t?i:`${i}#${t}`;return d.set(e,n),n}}function f(e,t){const n=d.get(e);if(n)return n;const i=t.owner?b(t.owner)+".":"";let r;const s=t.debugNameSource;if(void 0!==s){if("function"!==typeof s)return i+s;if(r=s(),void 0!==r)return i+r}const o=t.referenceFn;if(void 0!==o&&(r=v(o),void 0!==r))return i+r;if(void 0!==t.owner){const n=m(t.owner,e);if(void 0!==n)return i+n}}function m(e,t){for(const n in e)if(e[n]===t)return n}const p=new Map,_=new WeakMap;function b(e){const t=_.get(e);if(t)return t;const n=k(e);let i=p.get(n)??0;i++,p.set(n,i);const r=1===i?n:`${n}#${i}`;return _.set(e,r),r}function k(e){const t=e.constructor;return t?t.name:"Object"}function v(e){const t=e.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//,i=n.exec(t),r=i?i[1]:void 0;return r?.trim()}let C,L,w,y;function S(e){C=e}function x(){return C}class E{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return N([I(O("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[I(" "),A(D(e.oldValue,70),{color:"red",strikeThrough:!0}),I(" "),A(D(e.newValue,60),{color:"green"})]:[I(" (unchanged)")]:[I(" "),A(D(e.newValue,60),{color:"green"}),I(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([T("observable value changed"),A(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return A(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,i)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,i]))}handleDerivedRecomputed(e,t){const n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([T("derived recomputed"),A(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([T("observable from event triggered"),A(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,i)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,i]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([T("autorun"),A(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([T("transaction"),A(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function N(e){const t=new Array,n=[];let i="";function r(e){if("length"in e)for(const t of e)t&&r(t);else"text"in e?(i+=`%c${e.text}`,t.push(e.style),e.data&&n.push(...e.data)):"data"in e&&n.push(...e.data)}r(e);const s=[i,...t];return s.push(...n),s}function I(e){return A(e,{color:"black"})}function T(e){return A(B(`${e}: `,10),{color:"black",bold:!0})}function A(e,t={color:"black"}){function n(e){return Object.entries(e).reduce(((e,[t,n])=>`${e}${t}:${n};`),"")}const i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:n(i)}}function D(e,t){switch(typeof e){case"number":return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?M(e,t):R(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`;default:return""+e}}function M(e,t){let n="[ ",i=!0;for(const r of e){if(i||(n+=", "),n.length-5>t){n+="...";break}i=!1,n+=`${D(r,t-n.length)}`}return n+=" ]",n}function R(e,t){let n="{ ",i=!0;for(const[r,s]of Object.entries(e)){if(i||(n+=", "),n.length-5>t){n+="...";break}i=!1,n+=`${r}: ${D(s,t-n.length)}`}return n+=" }",n}function O(e,t){let n="";for(let i=1;i<=t;i++)n+=e;return n}function B(e,t){while(e.length{const e=v(i);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/,r=t.exec(i.toString());return r?`${this.debugName}.${r[2]}`:n?void 0:`${this.debugName} (mapped)`},debugReferenceFn:i},(e=>i(this.read(e),e)))}flatten(){return y({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(L(this,t)),this}keepObserved(e){return e.add(w(this)),this}}class W extends V{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){const t=this.observers.delete(e);t&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function q(e,t){const n=new U(e,t);try{e(n)}finally{n.finish()}}function H(e,t,n){e?t(e):q(t,n)}class U{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],x()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():v(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,j.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),i=3===this.state;if(n&&(1===this.state||i)&&(this.state=2,i))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function G(e){return new Q(new c(void 0,void 0,e),e,void 0,void 0)}class Q{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,i){this._debugNameData=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=i,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),x()?.handleAutorunCreated(this),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){x()?.handleAutorunTriggered(this);const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{t||x()?.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,j.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary);n&&(this.state=2)}}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(e){e.Observer=Q})(G||(G={}));function Y(...e){let t,n,i;return 3===e.length?[t,n,i]=e:[n,i]=e,new X(new c(t,void 0,i),n,i,(()=>X.globalTransaction),h)}class X extends W{constructor(e,t,n,i,r){super(),this._debugNameData=e,this.event=t,this._getValue=n,this._getTransaction=i,this._equalityComparator=r,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),n=this.value,i=!this.hasValue||!this._equalityComparator(n,t);let r=!1;i&&(this.value=t,this.hasValue&&(r=!0,H(this._getTransaction(),(e=>{x()?.handleFromEventObservableTriggered(this,{oldValue:n,newValue:t,change:void 0,didChange:i,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),r||x()?.handleFromEventObservableTriggered(this,{oldValue:n,newValue:t,change:void 0,didChange:i,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){if(this.subscription)return this.hasValue||this.handleEvent(void 0),this.value;{const e=this._getValue(void 0);return e}}}(function(e){function t(e,t){let n=!1;void 0===X.globalTransaction&&(X.globalTransaction=e,n=!0);try{t()}finally{n&&(X.globalTransaction=void 0)}}e.Observer=X,e.batchEventsGlobally=t})(Y||(Y={}));function Z(e){const t=new ee(!1,void 0);return e.addObserver(t),(0,r.s)((()=>{e.removeObserver(t)}))}function J(e,t){const n=new ee(!0,t);return e.addObserver(n),t?t(e.get()):e.reportChanges(),(0,r.s)((()=>{e.removeObserver(n)}))}P(Z),F(J);class ee{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}n(4396);const te=!1;te&&S(new E);class ne extends r.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new i.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new i.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new i.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,ne.instanceCount++,this._registry=this._register(new s.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){ne.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,o.Fy)(n,null)}createById(e){return new ie(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new ie(this.onDidChange,(()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class ie{constructor(e,t){this._value=Y(this,e,(()=>t())),this.onDidChange=i.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},5911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clearPlatformLanguageAssociations:()=>p,getLanguageIds:()=>_,registerPlatformLanguageAssociation:()=>g});var i=n(3589),r=n(3911),s=n(6657),o=n(1643),a=n(4366),l=n(601),h=n(5764);let c=[],u=[],d=[];function g(e,t=!1){f(e,!1,t)}function f(e,t,n){const i=m(e,t);c.push(i),i.userConfigured?d.push(i):u.push(i),n&&!i.userConfigured&&c.forEach((e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))}))}function m(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:t,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,i.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(o.SA.sep)>=0}}function p(){c=c.filter((e=>e.userConfigured)),u=[]}function _(e,t){return b(e,t).map((e=>e.id))}function b(e,t){let n;if(e)switch(e.scheme){case s.ny.file:n=e.fsPath;break;case s.ny.data:{const t=a.B6.parseMetaData(e);n=t.get(a.B6.META_DATA_LABEL);break}case s.ny.vscodeNotebookCell:n=void 0;break;default:n=e.path}if(!n)return[{id:"unknown",mime:r.K.unknown}];n=n.toLowerCase();const i=(0,o.P8)(n),l=k(n,i,d);if(l)return[l,{id:h.vH,mime:r.K.text}];const c=k(n,i,u);if(c)return[c,{id:h.vH,mime:r.K.text}];if(t){const e=v(t);if(e)return[e,{id:h.vH,mime:r.K.text}]}return[{id:"unknown",mime:r.K.unknown}]}function k(e,t,n){let i,r,s;for(let o=n.length-1;o>=0;o--){const a=n[o];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!r||a.filepattern.length>r.filepattern.length)){const n=a.filepatternOnPath?e:t;a.filepatternLowercase?.(n)&&(r=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&t.endsWith(a.extensionLowercase)&&(s=a)}return i||(r||(s||void 0))}function v(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=c.length-1;t>=0;t--){const n=c[t];if(!n.firstline)continue;const i=e.match(n.firstline);if(i&&i.length>0)return n}}},7024:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageIdCodec:()=>d,LanguagesRegistry:()=>g});var i=n(231),r=n(8894),s=n(601),o=n(5911),a=n(5764),l=n(7503),h=n(6374);const c=Object.prototype.hasOwnProperty,u="vs.editor.nullLanguage";class d{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(u,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||u}}class g extends r.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new d,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,o.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),h.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;c.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i=`text/x-${n}`,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const r of t.filenames)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filename:r},this._warnOnOverwrite),e.filenames.push(r);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filepattern:e},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,s.eY)(t)||(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,firstline:t},this._warnOnOverwrite)}catch(n){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,n)}}e.aliases.push(n);let r=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(r=0===t.aliases.length?[null]:t.aliases),null!==r)for(const t of r)t&&0!==t.length&&e.aliases.push(t);const a=null!==r&&r.length>0;if(a&&null===r[0]);else{const t=(a?r[0]:null)||n;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&c.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return c.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&c.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,o.getLanguageIds)(e,t):[]}}},3637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IMarkerDecorationsService:()=>r});var i=n(7778);const r=(0,i.u1)("markerDecorationsService")},9420:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MarkerDecorationsService:()=>y});var i,r=n(601);(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(i||(i={})),function(e){const t="error",n="warning",i="warn",s="info",o="ignore";function a(o){return o?r.Q_(t,o)?e.Error:r.Q_(n,o)||r.Q_(i,o)?e.Warning:r.Q_(s,o)?e.Info:e.Ignore:e.Ignore}function l(i){switch(i){case e.Error:return t;case e.Warning:return n;case e.Info:return s;default:return o}}e.fromValue=a,e.toString=l}(i||(i={}));const s=i;var o,a,l=n(1337),h=n(7778);(function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"})(o||(o={})),function(e){function t(e,t){return t-e}e.compare=t;const n=Object.create(null);function i(e){return n[e]||""}function r(t){switch(t){case s.Error:return e.Error;case s.Warning:return e.Warning;case s.Info:return e.Info;case s.Ignore:return e.Hint}}function o(t){switch(t){case e.Error:return s.Error;case e.Warning:return s.Warning;case e.Info:return s.Info;case e.Hint:return s.Ignore}}n[e.Error]=(0,l.kg)("sev.error","Error"),n[e.Warning]=(0,l.kg)("sev.warning","Warning"),n[e.Info]=(0,l.kg)("sev.info","Info"),e.toString=i,e.fromSeverity=r,e.toSeverity=o}(o||(o={})),function(e){const t="";function n(e){return i(e,!0)}function i(e,n){const i=[t];return e.source?i.push(e.source.replace("¦","\\¦")):i.push(t),e.code?"string"===typeof e.code?i.push(e.code.replace("¦","\\¦")):i.push(e.code.value.replace("¦","\\¦")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(o.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("¦","\\¦")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("¦")}e.makeKey=n,e.makeKeyOptionalMessage=i}(a||(a={}));const c=(0,h.u1)("markerService");var u=n(8894),d=n(9322),g=n(3711),f=n(2764),m=n(9361),p=n(8690),_=n(6657),b=n(231),k=n(7732),v=n(1553);function C(e,t){const n=[],i=[];for(const i of e)t.has(i)||n.push(i);for(const n of t)e.has(n)||i.push(n);return{removed:n,added:i}}var L=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},w=function(e,t){return function(n,i){t(n,i,e)}};let y=class extends u.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new b.vl),this._markerDecorations=new v.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new S(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==_.ny.inMemory&&e.uri.scheme!==_.ny.internal&&e.uri.scheme!==_.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};y=L([w(0,m.IModelService),w(1,c)],y);class S extends u.jG{constructor(e){super(),this.model=e,this._map=new v.cO,this._register((0,u.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:n}=C(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===n.length)return!1;const i=n.map((e=>this._map.get(e))),r=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(i,r);for(const e of n)this._map.delete(e);for(let e=0;e=t)return n;const i=e.getWordAtPosition(n.getStartPosition());i&&(n=new p.Q(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){const i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0}}},9361:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IModelService:()=>r});var i=n(7778);const r=(0,i.u1)("modelService")},2713:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultModelSHA1Computer:()=>cs,ModelService:()=>hs});var i=n(231),r=n(8894),s=n(5160),o=n(5053),a=n(5476),l=n(4396),h=n(601),c=n(9133),u=n(6627);class d{static _nextVisibleColumn(e,t,n){return 9===e?d.nextRenderTabStop(t,n):h.ne(e)||h.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){const i=Math.min(t-1,e.length),r=e.substring(0,i),s=new h.km(r);let o=0;while(!s.eol()){const e=h.Z5(r,i,s.offset);s.nextGraphemeLength(),o=this._nextVisibleColumn(e,o,n)}return o}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const i=e.length,r=new h.km(e);let s=0,o=1;while(!r.eol()){const a=h.Z5(e,i,r.offset);r.nextGraphemeLength();const l=this._nextVisibleColumn(a,s,n),c=r.offset+1;if(l>=t){const e=t-s,n=l-t;return n \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new L(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new L({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new L({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"===typeof e.autoCloseBefore?e.autoCloseBefore:S.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"===typeof e.autoCloseBefore?e.autoCloseBefore:S.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}function x(e){return 0!==(3&e)}var E=n(7885);let N,I,T;function A(){return N||(N=new TextDecoder("UTF-16LE")),N}function D(){return I||(I=new TextDecoder("UTF-16BE")),I}function M(){return T||(T=s.cm()?A():D()),T}function R(e,t,n){const i=new Uint16Array(e.buffer,t,n);return n>0&&(65279===i[0]||65534===i[0])?O(e,t,n):A().decode(i)}function O(e,t,n){const i=[];let r=0;for(let s=0;s[e[0].toLowerCase(),e[1].toLowerCase()]));const n=[];for(let e=0;e{const[n,i]=e,[r,s]=t;return n===r||n===s||i===r||i===s},r=(e,i)=>{const r=Math.min(e,i),s=Math.max(e,i);for(let e=0;e0&&s.push({open:r,close:o})}return s}class P{constructor(e,t){this._richEditBracketsBrand=void 0;const n=F(t);this.brackets=n.map(((t,i)=>new B(e,i,t.open,t.close,q(t.open,t.close,n,i),H(t.open,t.close,n,i)))),this.forwardRegex=U(this.brackets),this.reversedRegex=j(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const e of this.brackets){for(const t of e.open)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,t.length);for(const t of e.close)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,t.length)}}}function z(e,t,n,i){for(let r=0,s=t.length;r=0&&i.push(t);for(const t of s.close)t.indexOf(e)>=0&&i.push(t)}}function V(e,t){return e.length-t.length}function W(e){if(e.length<=1)return e;const t=[],n=new Set;for(const i of e)n.has(i)||(t.push(i),n.add(i));return t}function q(e,t,n,i){let r=[];r=r.concat(e),r=r.concat(t);for(let e=0,t=r.length;e=0;i--)t[n++]=e.charCodeAt(i);return M().decode(t)}let t=null,n=null;return function(i){return t!==i&&(t=i,n=e(t)),n}}();class Q{static _findPrevBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=n.length-(r.index||0),o=r[0].length,a=i+s;return new p.Q(t,a-o+1,t,a+1)}static findPrevBracketInRange(e,t,n,i,r){const s=G(n),o=s.substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,o,i)}static findNextBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=r.index||0,o=r[0].length;if(0===o)return null;const a=i+s;return new p.Q(t,a+1,t,a+1+o)}static findNextBracketInRange(e,t,n,i,r){const s=n.substring(i,r);return this.findNextBracketInText(e,t,s,i)}}class Y{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return(0,o.dM)(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const i=t.findTokenIndexAtOffset(n-1);if(x(t.getStandardTokenType(i)))return null;const r=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,o=Q.findPrevBracketInRange(r,1,s,0,s.length);if(!o)return null;const a=s.substring(o.startColumn-1,o.endColumn-1).toLowerCase(),l=this._richEditBrackets.textIsOpenBracket[a];if(l)return null;const h=t.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(h)?{matchOpenBracket:a}:null}}function X(e){return e.global&&(e.lastIndex=0),!0}class Z{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&X(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&X(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&X(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&X(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class J{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=J._createOpenBracketRegExp(e[0]),n=J._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let e=0,r=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))));if(s)return r.action}if(e>=2&&n.length>0&&i.length>0)for(let e=0,t=this._brackets.length;e=2&&n.length>0)for(let e=0,t=this._brackets.length;e{const t=new Set;return{info:new le(this,e,t),closing:t}})),r=new re.VV((e=>{const t=new Set,n=new Set;return{info:new he(this,e,t,n),opening:t,openingColorized:n}}));for(const[e,t]of n){const n=i.get(e),s=r.get(t);n.closing.add(s.info),s.opening.add(n.info)}const s=t.colorizedBracketPairs?oe(t.colorizedBracketPairs):n.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of s){const n=i.get(e),s=r.get(t);n.closing.add(s.info),s.openingColorized.add(n.info),s.opening.add(n.info)}this._openingBrackets=new Map([...i.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...r.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return K(t,e)}}function oe(e){return e.filter((([e,t])=>""!==e&&""!==t))}class ae{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class le extends ae{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}}class he extends ae{constructor(e,t,n,i){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(e){return e["config"]===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e["config"]===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var ce=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},ue=function(e,t){return function(n,i){t(n,i,e)}};class de{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const ge=(0,ee.u1)("languageConfigurationService");let fe=class extends r.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new we),this.onDidChangeEmitter=this._register(new i.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(pe));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>n.has(e))),i=e.change.overrides.filter((([e,t])=>t.some((e=>n.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new de(void 0));else for(const e of i)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new de(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new de(e.languageId))})))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=me(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};function me(e,t,n,i){let r=t.getLanguageConfiguration(e);if(!r){if(!i.isRegisteredLanguageId(e))return new ye(e,{});r=new ye(e,{})}const s=_e(r.languageId,n),o=ve([r.underlyingConfig,s]),a=new ye(r.languageId,o);return a}fe=ce([ue(0,te.pG),ue(1,v.L)],fe);const pe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function _e(e,t){const n=t.getValue(pe.brackets,{overrideIdentifier:e}),i=t.getValue(pe.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:be(n),colorizedBracketPairs:be(i)}}function be(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class ke{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new Ce(e,t,++this._order);return this._entries.push(n),this._resolved=null,(0,r.s)((()=>{for(let e=0;ee.configuration))))}}function ve(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const n of e)t={comments:n.comments||t.comments,brackets:n.brackets||t.brackets,wordPattern:n.wordPattern||t.wordPattern,indentationRules:n.indentationRules||t.indentationRules,onEnterRules:n.onEnterRules||t.onEnterRules,autoClosingPairs:n.autoClosingPairs||t.autoClosingPairs,surroundingPairs:n.surroundingPairs||t.surroundingPairs,autoCloseBefore:n.autoCloseBefore||t.autoCloseBefore,folding:n.folding||t.folding,colorizedBracketPairs:n.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:n.__electricCharacterSupport||t.__electricCharacterSupport};return t}class Ce{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class Le{constructor(e){this.languageId=e}}class we extends r.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(ie.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let i=this._entries.get(e);i||(i=new ke(e),this._entries.set(e,i));const s=i.register(t,n);return this._onDidChange.fire(new Le(e)),(0,r.s)((()=>{s.dispose(),this._onDidChange.fire(new Le(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class ye{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new J(this.underlyingConfig):null,this.comments=ye._handleComments(this.underlyingConfig),this.characterPair=new S(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||C.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new Z(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new se(e,this.underlyingConfig)}getWordDefinition(){return(0,C.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new P(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Y(this.brackets)),this._electricCharacter}onEnter(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null}getAutoClosingPairs(){return new w(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){const[e,i]=t.blockComment;n.blockCommentStartToken=e,n.blockCommentEndToken=i}return n}}(0,ne.v)(ge,fe,1);var Se=n(9322);class xe{constructor(e,t,n,i){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=i}}class Ee{constructor(e,t,n,i,r,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=i,this.nestingLevelOfEqualBracketType=r,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class Ne extends Ee{constructor(e,t,n,i,r,s,o){super(e,t,n,i,r,s),this.minVisibleColumnIndentation=o}}var Ie=n(3904);function Te(e,t,n,i){return e!==n?Re(n-e,i):Re(0,i-t)}const Ae=0;function De(e){return 0===e}const Me=2**26;function Re(e,t){return e*Me+t}function Oe(e){const t=e,n=Math.floor(t/Me),i=t-n*Me;return new Ie.W(n,i)}function Be(e){return Math.floor(e/Me)}function Fe(e){return e}function Pe(e,t){let n=e+t;return t>=Me&&(n-=e%Me),n}function ze(e,t){return e.reduce(((e,n)=>Pe(e,t(n))),Ae)}function Ve(e,t){return e===t}function We(e,t){const n=e,i=t,r=i-n;if(r<=0)return Ae;const s=Math.floor(n/Me),o=Math.floor(i/Me),a=i-o*Me;if(s===o){const e=n-s*Me;return Re(0,a-e)}return Re(o-s,a)}function qe(e,t){return e=t}function je(e){return Re(e.lineNumber-1,e.column-1)}function $e(e,t){const n=e,i=Math.floor(n/Me),r=n-i*Me,s=t,o=Math.floor(s/Me),a=s-o*Me;return new p.Q(i+1,r+1,o+1,a+1)}function Ke(e){const t=(0,h.uz)(e);return Re(t.length-1,t[t.length-1].length)}class Ge{static fromModelContentChanges(e){const t=e.map((e=>{const t=p.Q.lift(e.range);return new Ge(je(t.getStartPosition()),je(t.getEndPosition()),Ke(e.text))})).reverse();return t}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${Oe(this.startOffset)}...${Oe(this.endOffset)}) -> ${Oe(this.newLength)}`}}class Qe{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Ye.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return null===n?null:We(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Re(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Re(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Oe(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Re(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Re(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){while(this.nextEditIdx>5;if(0===i){const e=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;while(1){const i=this.lineTokens,r=i.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(n>1500)break}const i=Te(e,t,this.lineIdx,this.lineCharOffset);return new ft(i,0,-1,Ze.getEmpty(),new ct(i))}}class _t{constructor(e,t){this.text=e,this._offset=Ae,this.idx=0;const n=t.getRegExpStr(),i=n?new RegExp(n+"|\n","gi"):null,r=[];let s,o=0,a=0,l=0,h=0;const c=[];for(let e=0;e<60;e++)c.push(new ft(Re(0,e),0,-1,Ze.getEmpty(),new ct(Re(0,e))));const u=[];for(let e=0;e<60;e++)u.push(new ft(Re(1,e),0,-1,Ze.getEmpty(),new ct(Re(1,e))));if(i){i.lastIndex=0;while(null!==(s=i.exec(e))){const e=s.index,n=s[0];if("\n"===n)o++,a=e+1;else{if(l!==e){let t;if(h===o){const n=e-l;if(nkt(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(2===n.kind&&n.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}function kt(e){let t=(0,h.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}class vt{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=bt.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Ct(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function n(){if(t>=e.length)return null;const n=t,i=e[n].listHeight;t++;while(t=2?Lt(0===n&&t===e.length?e:e.slice(n,t),!1):e[n]}let i=n(),r=n();if(!r)return i;for(let e=n();e;e=n())wt(i,r)<=wt(r,e)?(i=yt(i,r),r=e):r=yt(r,e);const s=yt(i,r);return s}function Lt(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let n=e.length;while(n>3){const i=n>>1;for(let r=0;r=3?e[2]:null,t)}function wt(e,t){return Math.abs(e.listHeight-t.listHeight)}function yt(e,t){return e.listHeight===t.listHeight?it.create23(e,t,null,!1):e.listHeight>t.listHeight?St(e,t):xt(t,e)}function St(e,t){e=e.toMutable();let n=e;const i=[];let r;while(1){if(t.listHeight===n.listHeight){r=t;break}if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeLastElementMutable()}for(let e=i.length-1;e>=0;e--){const t=i[e];r?t.childrenLength>=3?r=it.create23(t.unappendChild(),r,null,!1):(t.appendChildOfSameHeight(r),r=void 0):t.handleChildrenChanged()}return r?it.create23(e,r,null,!1):e}function xt(e,t){e=e.toMutable();let n=e;const i=[];while(t.listHeight!==n.listHeight){if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeFirstElementMutable()}let r=t;for(let e=i.length-1;e>=0;e--){const t=i[e];r?t.childrenLength>=3?r=it.create23(r,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(r),r=void 0):t.handleChildrenChanged()}return r?it.create23(r,e,null,!1):e}class Et{constructor(e){this.lastOffset=Ae,this.nextNodes=[e],this.offsets=[Ae],this.idxs=[]}readLongestNodeAt(e,t){if(qe(e,this.lastOffset))throw new Error("Invalid offset");this.lastOffset=e;while(1){const n=It(this.nextNodes);if(!n)return;const i=It(this.offsets);if(qe(e,i))return;if(qe(i,e))if(Pe(i,n.length)<=e)this.nextNodeAfterCurrent();else{const e=Nt(n);-1!==e?(this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const e=Nt(n);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)}}}}nextNodeAfterCurrent(){while(1){const e=It(this.offsets),t=It(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const n=It(this.nextNodes),i=Nt(n,this.idxs[this.idxs.length-1]);if(-1!==i){this.nextNodes.push(n.getChild(i)),this.offsets.push(Pe(e,t.length)),this.idxs[this.idxs.length-1]=i;break}this.idxs.pop()}}}function Nt(e,t=-1){while(1){if(t++,t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function It(e){return e.length>0?e[e.length-1]:void 0}function Tt(e,t,n,i){const r=new At(e,t,n,i);return r.parseDocument()}class At{constructor(e,t,n,i){if(this.tokenizer=e,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,n&&i)throw new Error("Not supported");this.oldNodeReader=n?new Et(n):void 0,this.positionMapper=new Qe(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ze.getEmpty(),0);return e||(e=it.getEmpty()),e}parseList(e,t){const n=[];while(1){let i=this.tryReadChildFromCache(e);if(!i){const n=this.tokenizer.peek();if(!n||2===n.kind&&n.bracketIds.intersects(e))break;i=this.parseChild(e,t+1)}4===i.kind&&0===i.childrenLength||n.push(i)}const i=this.oldNodeReader?Ct(n):Lt(n,this.createImmutableLists);return i}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!De(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(n=>{if(null!==t&&!qe(n.length,t))return!1;const i=n.canBeReused(e);return i}));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new dt(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new ct(n.length);const i=e.merge(n.bracketIds),r=this.parseList(i,t+1),s=this.tokenizer.peek();return s&&2===s.kind&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),nt.create(n.astNode,r,s.astNode)):nt.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}function Dt(e,t){if(0===e.length)return t;if(0===t.length)return e;const n=new o.j3(Rt(e)),i=Rt(t);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let r=n.dequeue();function s(e){if(void 0===e){const e=n.takeWhile((e=>!0))||[];return r&&e.unshift(r),e}const t=[];while(r&&!De(e)){const[i,s]=r.splitAt(e);t.push(i),e=We(i.lengthAfter,e),r=s??n.dequeue()}return De(e)||t.push(new Mt(!1,e,e)),t}const a=[];function l(e,t,n){if(a.length>0&&Ve(a[a.length-1].endOffset,e)){const e=a[a.length-1];a[a.length-1]=new Ge(e.startOffset,t,Pe(e.newLength,n))}else a.push({startOffset:e,endOffset:t,newLength:n})}let h=Ae;for(const e of i){const t=s(e.lengthBefore);if(e.modified){const n=ze(t,(e=>e.lengthBefore)),i=Pe(h,n);l(h,i,e.lengthAfter),h=i}else for(const e of t){const t=h;h=Pe(h,e.lengthBefore),e.modified&&l(t,h,e.lengthAfter)}}return a}class Mt{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=We(e,this.lengthAfter);return Ve(t,Ae)?[this,void 0]:this.modified?[new Mt(this.modified,this.lengthBefore,e),new Mt(this.modified,Ae,t)]:[new Mt(this.modified,e,e),new Mt(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${Oe(this.lengthBefore)} -> ${Oe(this.lengthAfter)}`}}function Rt(e){const t=[];let n=Ae;for(const i of e){const e=We(n,i.startOffset);De(e)||t.push(new Mt(!1,e,e));const r=We(i.startOffset,i.endOffset);t.push(new Mt(!0,r,i.newLength)),n=i.endOffset}return t}class Ot extends r.jG{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new i.vl,this.denseKeyProvider=new et,this.brackets=new vt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new _t(this.textModel.getValue(),e);this.initialAstWithoutTokens=Tt(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Ge(Re(e.fromLineNumber-1,0),Re(e.toLineNumber,0),Re(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Ge.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=Dt(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=Dt(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const i=!1,r=i?t?.deepClone():t,s=new mt(this.textModel,this.brackets),o=Tt(s,e,r,n);return o}getBracketsInRange(e,t){this.flushQueue();const n=Re(e.startLineNumber-1,e.startColumn-1),i=Re(e.endLineNumber-1,e.endColumn-1);return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens;Pt(r,Ae,r.length,n,i,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const n=je(e.getStartPosition()),i=je(e.getEndPosition());return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens,s=new zt(e,t,this.textModel);Vt(r,Ae,r.length,n,i,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Ft(t,Ae,t.length,je(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Bt(t,Ae,t.length,je(e))}}function Bt(e,t,n,i){if(4===e.kind||2===e.kind){const r=[];for(const i of e.children)n=Pe(t,i.length),r.push({nodeOffsetStart:t,nodeOffsetEnd:n}),t=n;for(let t=r.length-1;t>=0;t--){const{nodeOffsetStart:n,nodeOffsetEnd:s}=r[t];if(qe(n,i)){const r=Bt(e.children[t],n,s,i);if(r)return r}}return null}if(3===e.kind)return null;if(1===e.kind){const i=$e(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function Ft(e,t,n,i){if(4===e.kind||2===e.kind){for(const r of e.children){if(n=Pe(t,r.length),qe(i,n)){const e=Ft(r,t,n,i);if(e)return e}t=n}return null}if(3===e.kind)return null;if(1===e.kind){const i=$e(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function Pt(e,t,n,i,r,s,o,a,l,h,c=!1){if(o>200)return!0;e:while(1)switch(e.kind){case 4:{const a=e.childrenLength;for(let c=0;c200)return!0;let l=!0;if(2===e.kind){let h=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),h=t,t++,a.set(e.openingBracket.text,t)}const c=Pe(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),l=s.push(new Ne($e(t,n),$e(t,c),e.closingBracket?$e(Pe(c,e.child?.length||Ae),n):void 0,o,h,e,u)),t=c,l&&e.child){const h=e.child;if(n=Pe(t,h.length),He(t,r)&&Ue(n,i)&&(l=Vt(h,t,n,i,r,s,o+1,a),!l))return!1}a?.set(e.openingBracket.text,h)}else{let n=t;for(const t of e.children){const e=n;if(n=Pe(n,t.length),He(e,r)&&He(i,n)&&(l=Vt(t,e,n,i,r,s,o,a),!l))return!1}}return l}class Wt extends r.jG{get canBuildAST(){const e=5e6;return this.textModel.getValueLength()<=e}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new r.HE),this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new r.Cm;this.bracketPairsTree.value=qt(e.add(new Ot(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),e),e.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||o.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||o.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||o.c1.empty}findMatchingBracketUp(e,t,n){const i=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column);if(this.canBuildAST){const n=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!n)return null;const i=this.getBracketPairsInRange(p.Q.fromPositions(t,t)).findLast((e=>n.closes(e.openingBracketInfo)));return i?i.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!s)return null;const o=s.textIsBracket[t];return o?jt(this._findMatchingBracketUp(o,i,Ht(n))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(p.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,o.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),p.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const n=Ht(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,i){const r=t.getCount(),s=t.getLanguageId(i);let o=Math.max(0,e.column-1-n.maxBracketLength);for(let e=i-1;e>=0;e--){const n=t.getEndOffset(e);if(n<=o)break;if(x(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){o=n;break}}let a=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let e=i+1;e=a)break;if(x(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=n;break}}return{searchStartOffset:o,searchEndOffset:a}}_matchBracket(e,t){const n=e.lineNumber,i=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),s=i.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(o&&!x(i.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,s),h=null;while(1){const i=Q.findNextBracketInRange(o.forwardRegex,n,r,a,l);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=r.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),n=this._matchFoundBracket(i,o.textIsBracket[e],o.textIsOpenBracket[e],t);if(n){if(n instanceof Ut)return null;h=n}}a=i.endColumn-1}if(h)return h}if(s>0&&i.getStartOffset(s)===e.column-1){const o=s-1,a=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(o)).brackets;if(a&&!x(i.getStandardTokenType(o))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,a,o),h=Q.findPrevBracketInRange(a.reversedRegex,n,r,s,l);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const e=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),n=this._matchFoundBracket(h,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(n)return n instanceof Ut?null:n}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return r?r instanceof Ut?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const i=e.languageId,r=e.reversedRegex;let s=-1,o=0;const a=(t,i,a,l)=>{while(1){if(n&&++o%100===0&&!n())return Ut.INSTANCE;const h=Q.findPrevBracketInRange(r,t,i,a,l);if(!h)break;const c=i.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return h;l=h.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const n=this.textModel.tokenization.getLineTokens(e),r=n.getCount(),s=this.textModel.getLineContent(e);let o=r-1,l=s.length,h=s.length;e===t.lineNumber&&(o=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1);let c=!0;for(;o>=0;o--){const t=n.getLanguageId(o)===i&&!x(n.getStandardTokenType(o));if(t)c?l=n.getStartOffset(o):(l=n.getStartOffset(o),h=n.getEndOffset(o));else if(c&&l!==h){const t=a(e,s,l,h);if(t)return t}c=t}if(c&&l!==h){const t=a(e,s,l,h);if(t)return t}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageId,r=e.forwardRegex;let s=1,o=0;const a=(t,i,a,l)=>{while(1){if(n&&++o%100===0&&!n())return Ut.INSTANCE;const h=Q.findNextBracketInRange(r,t,i,a,l);if(!h)break;const c=i.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return h;a=h.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const n=this.textModel.tokenization.getLineTokens(e),r=n.getCount(),s=this.textModel.getLineContent(e);let o=0,l=0,h=0;e===t.lineNumber&&(o=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1);let c=!0;for(;o=1;e--){const s=this.textModel.tokenization.getLineTokens(e),o=s.getCount(),a=this.textModel.getLineContent(e);let l=o-1,h=a.length,c=a.length;if(e===t.lineNumber){l=s.findTokenIndexAtOffset(t.column-1),h=t.column-1,c=t.column-1;const e=s.getLanguageId(l);n!==e&&(n=e,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let u=!0;for(;l>=0;l--){const t=s.getLanguageId(l);if(n!==t){if(i&&r&&u&&h!==c){const t=Q.findPrevBracketInRange(i.reversedRegex,e,a,h,c);if(t)return this._toFoundBracket(r,t);u=!1}n=t,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const o=!!i&&!x(s.getStandardTokenType(l));if(o)u?h=s.getStartOffset(l):(h=s.getStartOffset(l),c=s.getEndOffset(l));else if(r&&i&&u&&h!==c){const t=Q.findPrevBracketInRange(i.reversedRegex,e,a,h,c);if(t)return this._toFoundBracket(r,t)}u=o}if(r&&i&&u&&h!==c){const t=Q.findPrevBracketInRange(i.reversedRegex,e,a,h,c);if(t)return this._toFoundBracket(r,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const n=this.textModel.getLineCount();let i=null,r=null,s=null;for(let e=t.lineNumber;e<=n;e++){const n=this.textModel.tokenization.getLineTokens(e),o=n.getCount(),a=this.textModel.getLineContent(e);let l=0,h=0,c=0;if(e===t.lineNumber){l=n.findTokenIndexAtOffset(t.column-1),h=t.column-1,c=t.column-1;const e=n.getLanguageId(l);i!==e&&(i=e,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let u=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const i=Ht(t),r=this.textModel.getLineCount(),s=new Map;let o=[];const a=(e,t)=>{if(!s.has(e)){const n=[];for(let e=0,i=t?t.brackets.length:0;e{while(1){if(i&&++l%100===0&&!i())return Ut.INSTANCE;const a=Q.findNextBracketInRange(e.forwardRegex,t,n,r,s);if(!a)break;const h=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),c=e.textIsBracket[h];if(c&&(c.isOpen(h)?o[c.index]++:c.isClose(h)&&o[c.index]--,-1===o[c.index]))return this._matchFoundBracket(a,c,!1,i);r=a.endColumn-1}return null};let c=null,u=null;for(let e=n.lineNumber;e<=r;e++){const t=this.textModel.tokenization.getLineTokens(e),i=t.getCount(),r=this.textModel.getLineContent(e);let s=0,o=0,l=0;if(e===n.lineNumber){s=t.findTokenIndexAtOffset(n.column-1),o=n.column-1,l=n.column-1;const e=t.getLanguageId(s);c!==e&&(c=e,u=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a(c,u))}let d=!0;for(;st?.dispose()}}function Ht(e){if("undefined"===typeof e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class Ut{static{this.INSTANCE=new Ut}constructor(){this._searchCanceledBrand=void 0}}function jt(e){return e instanceof Ut?null:e}var $t=n(2764),Kt=n(3711);class Gt extends r.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new Qt,this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,i){if(i)return[];if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const r=this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray();return r}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new p.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Qt{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,Kt.zy)(((e,t)=>{const n=[$t.sN,$t.lQ,$t.ss,$t.l5,$t.sH,$t.zp],i=new Qt;t.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${e.getColor($t.s7)}; }`);const r=n.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const n=r[e%r.length];t.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(e)} { color: ${n}; }`)}}));var Yt=n(1337);function Xt(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Zt{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Xt(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Xt(this.oldText)}")`:`(replace@${this.oldPosition} "${Xt(this.oldText)}" with "${Xt(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const i=t.length;E.Sw(e,i,n),n+=4;for(let r=0;r0&&(this.changes=Jt(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(E.Sw(e,t?t.length:0,n),n+=4,t)for(const i of t)E.Sw(e,i.selectionStartLineNumber,n),n+=4,E.Sw(e,i.selectionStartColumn,n),n+=4,E.Sw(e,i.positionLineNumber,n),n+=4,E.Sw(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=E.bb(e,t);t+=4;for(let r=0;re.toString())).join(", ")}matchesResource(e){const t=c.r.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof rn}append(e,t,n,i,r){this._data instanceof rn&&this._data.append(e,t,n,i,r)}close(){this._data instanceof rn&&(this._data=this._data.serialize())}open(){this._data instanceof rn||(this._data=rn.deserialize(this._data))}undo(){if(c.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof rn&&(this._data=this._data.serialize());const e=rn.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(c.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof rn&&(this._data=this._data.serialize());const e=rn.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof rn&&(this._data=this._data.serialize()),this._data.byteLength+168}}class on{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=nn(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=nn(e);return this._editStackElementsMap.has(t)}setModel(e){const t=nn(c.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=nn(e.uri);if(this._editStackElementsMap.has(t)){const n=this._editStackElementsMap.get(t);return n.canAppend(e)}return!1}append(e,t,n,i,r){const s=nn(e.uri),o=this._editStackElementsMap.get(s);o.append(e,t,n,i,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=nn(e);if(this._editStackElementsMap.has(t)){const e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,tn.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function an(e){const t=e.getEOL();return"\n"===t?0:1}function ln(e){return!!e&&(e instanceof sn||e instanceof on)}class hn{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ln(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ln(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const n=this._undoRedoService.getLastElement(this._model.uri);if(ln(n)&&n.canAppend(this._model))return n;const i=new sn(Yt.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i,t),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],an(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,i){const r=this._getOrCreateEditStackElement(e,i),s=this._model.applyEdits(t,!0),o=hn._computeCursorState(n,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),r.append(this._model,a.map((e=>e.textChange)),an(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,l.dz)(e),null}}}var cn,un=n(3654);class dn extends r.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function gn(e,t){let n=0,i=0;const r=e.length;while(ii)throw new l.D7("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide);let o=-2,a=-1,h=-2,c=-1;const u=e=>{if(-1!==o&&(-2===o||o>e-1)){o=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){o=t,a=e;break}}}if(-2===h){h=-1,c=-1;for(let t=e;t=0){h=t,c=e;break}}}};let d=-2,g=-1,f=-2,m=-1;const p=e=>{if(-2===d){d=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){d=t,g=e;break}}}if(-1!==f&&(-2===f||f=0){f=t,m=e;break}}}};let _=0,b=!0,k=0,v=!0,C=0,L=0;for(let r=0;b||v;r++){const o=e-r,l=e+r;r>1&&(o<1||o1&&(l>i||l>n)&&(v=!1),r>5e4&&(b=!1,v=!1);let f=-1;if(b&&o>=1){const e=this._computeIndentLevel(o-1);e>=0?(h=o-1,c=e,f=Math.ceil(e/this.textModel.getOptions().indentSize)):(u(o),f=this._getIndentLevelForWhitespaceLine(s,a,c))}let w=-1;if(v&&l<=i){const e=this._computeIndentLevel(l-1);e>=0?(d=l-1,g=e,w=Math.ceil(e/this.textModel.getOptions().indentSize)):(p(l),w=this._getIndentLevelForWhitespaceLine(s,g,m))}if(0!==r){if(1===r){if(l<=i&&w>=0&&L+1===w){b=!1,_=l,k=l,C=w;continue}if(o>=1&&f>=0&&f-1===L){v=!1,_=o,k=o,C=f;continue}if(_=e,k=e,C=L,0===C)return{startLineNumber:_,endLineNumber:k,indent:C}}b&&(f>=C?_=o:b=!1),v&&(w>=C?k=l:v=!1)}else L=f}return{startLineNumber:_,endLineNumber:k,indent:C}}getLinesBracketGuides(e,t,n,i){const r=[];for(let n=e;n<=t;n++)r.push([]);const s=!0,o=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new p.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let a;if(n&&o.length>0){const i=(e<=n.lineNumber&&n.lineNumber<=t?o:this.textModel.bracketPairs.getBracketPairsInRange(p.Q.fromPositions(n)).toArray()).filter((e=>p.Q.strictContainsPosition(e.range,n)));a=(0,un.Uk)(i,(e=>s||e.range.startLineNumber!==e.range.endLineNumber))?.range}const l=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,c=new _n;for(const n of o){if(!n.closingBracketRange)continue;const o=a&&n.range.equalsRange(a);if(!o&&!i.includeInactive)continue;const u=c.getInlineClassName(n.nestingLevel,n.nestingLevelOfEqualBracketType,l)+(i.highlightActive&&o?" "+c.activeClassName:""),d=n.openingBracketRange.getStartPosition(),g=n.closingBracketRange.getStartPosition(),f=i.horizontalGuides===cn.Enabled||i.horizontalGuides===cn.EnabledForActive&&o;if(n.range.startLineNumber===n.range.endLineNumber){s&&f&&r[n.range.startLineNumber-e].push(new fn(-1,n.openingBracketRange.getEndPosition().column,u,new mn(!1,g.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(g),p=this.getVisibleColumnFromPosition(n.openingBracketRange.getStartPosition()),_=Math.min(p,m,n.minVisibleColumnIndentation+1);let b=!1;const k=h.HG(this.textModel.getLineContent(n.closingBracketRange.startLineNumber)),v=k=e&&p>_&&r[d.lineNumber-e].push(new fn(_,-1,u,new mn(!1,d.column),-1,-1)),g.lineNumber<=t&&m>_&&r[g.lineNumber-e].push(new fn(_,-1,u,new mn(!b,g.column),-1,-1)))}for(const e of r)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return r}getVisibleColumnFromPosition(e){return d.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide),o=new Array(t-e+1);let a=-2,l=-1,h=-2,c=-1;for(let r=e;r<=t;r++){const t=r-e,u=this._computeIndentLevel(r-1);if(u>=0)a=r-1,l=u,o[t]=Math.ceil(u/i.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=r-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==h&&(-2===h||h=0){h=e,c=t;break}}}o[t]=this._getIndentLevelForWhitespaceLine(s,l,c)}}return o}_getIndentLevelForWhitespaceLine(e,t,n){const i=this.textModel.getOptions();return-1===t||-1===n?0:t0&&a>0)return;if(l>0&&h>0)return;const c=Math.abs(a-h),u=Math.abs(o-l);if(0===c)return r.spacesDiff=u,void(u>0&&0<=l-1&&l-10?r++:p>1&&s++,kn(o,a,d,m,u),u.looksLikeAlignment&&(!n||t!==u.spacesDiff))continue;const b=u.spacesDiff;b<=h&&c[b]++,o=d,a=m}let d=n;r!==s&&(d=r{const n=c[t];n>e&&(e=n,g=t)})),4===g&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(g=2)}return{insertSpaces:d,tabSize:g}}function Cn(e){return(1&e.metadata)>>>0}function Ln(e,t){e.metadata=254&e.metadata|t}function wn(e){return(2&e.metadata)>>>1===1}function yn(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function Sn(e){return(4&e.metadata)>>>2===1}function xn(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function En(e){return(64&e.metadata)>>>6===1}function Nn(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function In(e){return(24&e.metadata)>>>3}function Tn(e,t){e.metadata=231&e.metadata|t<<3}function An(e){return(32&e.metadata)>>>5===1}function Dn(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class Mn{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,Ln(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,xn(this,!1),Nn(this,!1),Tn(this,1),Dn(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,yn(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;const t=this.options.className;xn(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Nn(this,null!==this.options.glyphMarginClassName),Tn(this,this.options.stickiness),Dn(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Rn=new Mn(null,0,0);Rn.parent=Rn,Rn.left=Rn,Rn.right=Rn,Ln(Rn,0);class On{constructor(){this.root=Rn,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,r,s){return this.root===Rn?[]:Un(this,e,t,n,i,r,s)}search(e,t,n,i){return this.root===Rn?[]:Hn(this,e,t,n,i)}collectNodesFromOwner(e){return Wn(this,e)}collectNodesPostOrder(){return qn(this)}insert(e){jn(this,e),this._normalizeDeltaIfNecessary()}delete(e){Kn(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;while(e!==this.root)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const r=n.start+i,s=n.end+i;n.setCachedOffsets(r,s,t)}acceptReplace(e,t,n,i){const r=zn(this,e,e+t);for(let e=0,t=r.length;en)&&(1!==i&&(2===i||t))}function Pn(e,t,n,i,r){const s=In(e),o=0===s||2===s,a=1===s||2===s,l=n-t,h=i,c=Math.min(l,h),u=e.start;let d=!1;const g=e.end;let f=!1;t<=u&&g<=n&&An(e)&&(e.start=t,d=!0,e.end=t,f=!0);{const e=r?1:l>0?2:0;!d&&Fn(u,o,t,e)&&(d=!0),!f&&Fn(g,a,t,e)&&(f=!0)}if(c>0&&!r){const e=l>h?2:0;!d&&Fn(u,o,t+c,e)&&(d=!0),!f&&Fn(g,a,t+c,e)&&(f=!0)}{const i=r?1:0;!d&&Fn(u,o,n,i)&&(e.start=t+h,d=!0),!f&&Fn(g,a,n,i)&&(e.end=t+h,f=!0)}const m=h-l;d||(e.start=Math.max(0,u+m)),f||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function zn(e,t,n){let i=e.root,r=0,s=0,o=0,a=0;const l=[];let h=0;while(i!==Rn)if(wn(i))yn(i.left,!1),yn(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else{if(!wn(i.left)){if(s=r+i.maxEnd,sn?yn(i,!0):(a=r+i.end,a>=t&&(i.setCachedOffsets(o,a,0),l[h++]=i),yn(i,!0),i.right===Rn||wn(i.right)||(r+=i.delta,i=i.right))}return yn(e.root,!1),l}function Vn(e,t,n,i){let r=e.root,s=0,o=0,a=0;const l=i-(n-t);while(r!==Rn)if(wn(r))yn(r.left,!1),yn(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),Jn(r),r=r.parent;else{if(!wn(r.left)){if(o=s+r.maxEnd,on?(r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),yn(r,!0)):(yn(r,!0),r.right===Rn||wn(r.right)||(s+=r.delta,r=r.right))}yn(e.root,!1)}function Wn(e,t){let n=e.root;const i=[];let r=0;while(n!==Rn)wn(n)?(yn(n.left,!1),yn(n.right,!1),n=n.parent):n.left===Rn||wn(n.left)?(n.ownerId===t&&(i[r++]=n),yn(n,!0),n.right===Rn||wn(n.right)||(n=n.right)):n=n.left;return yn(e.root,!1),i}function qn(e){let t=e.root;const n=[];let i=0;while(t!==Rn)wn(t)?(yn(t.left,!1),yn(t.right,!1),t=t.parent):t.left===Rn||wn(t.left)?t.right===Rn||wn(t.right)?(n[i++]=t,yn(t,!0)):t=t.right:t=t.left;return yn(e.root,!1),n}function Hn(e,t,n,i,r){let s=e.root,o=0,a=0,l=0;const h=[];let c=0;while(s!==Rn){if(wn(s)){yn(s.left,!1),yn(s.right,!1),s===s.parent.right&&(o-=s.parent.delta),s=s.parent;continue}if(s.left!==Rn&&!wn(s.left)){s=s.left;continue}a=o+s.start,l=o+s.end,s.setCachedOffsets(a,l,i);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),n&&Sn(s)&&(e=!1),r&&!En(s)&&(e=!1),e&&(h[c++]=s),yn(s,!0),s.right===Rn||wn(s.right)||(o+=s.delta,s=s.right)}return yn(e.root,!1),h}function Un(e,t,n,i,r,s,o){let a=e.root,l=0,h=0,c=0,u=0;const d=[];let g=0;while(a!==Rn)if(wn(a))yn(a.left,!1),yn(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!wn(a.left)){if(h=l+a.maxEnd,hn)yn(a,!0);else{if(u=l+a.end,u>=t){a.setCachedOffsets(c,u,s);let e=!0;i&&a.ownerId&&a.ownerId!==i&&(e=!1),r&&Sn(a)&&(e=!1),o&&!En(a)&&(e=!1),e&&(d[g++]=a)}yn(a,!0),a.right===Rn||wn(a.right)||(l+=a.delta,a=a.right)}}return yn(e.root,!1),d}function jn(e,t){if(e.root===Rn)return t.parent=Rn,t.left=Rn,t.right=Rn,Ln(t,0),e.root=t,e.root;$n(e,t),ei(t.parent);let n=t;while(n!==e.root&&1===Cn(n.parent))if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===Cn(t)?(Ln(n.parent,0),Ln(t,0),Ln(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,Yn(e,n)),Ln(n.parent,0),Ln(n.parent.parent,1),Xn(e,n.parent.parent))}else{const t=n.parent.parent.left;1===Cn(t)?(Ln(n.parent,0),Ln(t,0),Ln(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,Xn(e,n)),Ln(n.parent,0),Ln(n.parent.parent,1),Yn(e,n.parent.parent))}return Ln(e.root,0),t}function $n(e,t){let n=0,i=e.root;const r=t.start,s=t.end;while(1){const e=ti(r,s,i.start+n,i.end+n);if(e<0){if(i.left===Rn){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===Rn){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=Rn,t.right=Rn,Ln(t,1)}function Kn(e,t){let n,i;if(t.left===Rn?(n=t.right,i=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===Rn?(n=t.left,i=t):(i=Gn(t.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,Ln(n,0),t.detach(),Qn(),Jn(n),void(e.root.parent=Rn);const r=1===Cn(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,Ln(i,Cn(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==Rn&&(i.left.parent=i),i.right!==Rn&&(i.right.parent=i)),t.detach(),r)return ei(n.parent),i!==t&&(ei(i),ei(i.parent)),void Qn();let s;ei(n),ei(n.parent),i!==t&&(ei(i),ei(i.parent));while(n!==e.root&&0===Cn(n))n===n.parent.left?(s=n.parent.right,1===Cn(s)&&(Ln(s,0),Ln(n.parent,1),Yn(e,n.parent),s=n.parent.right),0===Cn(s.left)&&0===Cn(s.right)?(Ln(s,1),n=n.parent):(0===Cn(s.right)&&(Ln(s.left,0),Ln(s,1),Xn(e,s),s=n.parent.right),Ln(s,Cn(n.parent)),Ln(n.parent,0),Ln(s.right,0),Yn(e,n.parent),n=e.root)):(s=n.parent.left,1===Cn(s)&&(Ln(s,0),Ln(n.parent,1),Xn(e,n.parent),s=n.parent.left),0===Cn(s.left)&&0===Cn(s.right)?(Ln(s,1),n=n.parent):(0===Cn(s.left)&&(Ln(s.right,0),Ln(s,1),Yn(e,s),s=n.parent.left),Ln(s,Cn(n.parent)),Ln(n.parent,0),Ln(s.left,0),Xn(e,n.parent),n=e.root));Ln(n,0),Qn()}function Gn(e){while(e.left!==Rn)e=e.left;return e}function Qn(){Rn.parent=Rn,Rn.delta=0,Rn.start=0,Rn.end=0}function Yn(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==Rn&&(n.left.parent=t),n.parent=t.parent,t.parent===Rn?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,Jn(t),Jn(n)}function Xn(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==Rn&&(n.right.parent=t),n.parent=t.parent,t.parent===Rn?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,Jn(t),Jn(n)}function Zn(e){let t=e.end;if(e.left!==Rn){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==Rn){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function Jn(e){e.maxEnd=Zn(e)}function ei(e){while(e!==Rn){const t=Zn(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function ti(e,t,n,i){return e===n?t-i:e-n}class ni{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==ii)return ri(this.right);let e=this;while(e.parent!==ii){if(e.parent.left===e)break;e=e.parent}return e.parent===ii?ii:e.parent}prev(){if(this.left!==ii)return si(this.left);let e=this;while(e.parent!==ii){if(e.parent.right===e)break;e=e.parent}return e.parent===ii?ii:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const ii=new ni(null,0);function ri(e){while(e.left!==ii)e=e.left;return e}function si(e){while(e.right!==ii)e=e.right;return e}function oi(e){return e===ii?0:e.size_left+e.piece.length+oi(e.right)}function ai(e){return e===ii?0:e.lf_left+e.piece.lineFeedCnt+ai(e.right)}function li(){ii.parent=ii}function hi(e,t){const n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==ii&&(n.left.parent=t),n.parent=t.parent,t.parent===ii?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function ci(e,t){const n=t.left;t.left=n.right,n.right!==ii&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===ii?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function ui(e,t){let n,i;if(t.left===ii?(i=t,n=i.right):t.right===ii?(i=t,n=i.left):(i=ri(t.right),n=i.right),i===e.root)return e.root=n,n.color=0,t.detach(),li(),void(e.root.parent=ii);const r=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,fi(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,fi(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==ii&&(i.left.parent=i),i.right!==ii&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,fi(e,i)),t.detach(),n.parent.left===n){const t=oi(n),i=ai(n);if(t!==n.parent.size_left||i!==n.parent.lf_left){const r=t-n.parent.size_left,s=i-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=i,gi(e,n.parent,r,s)}}if(fi(e,n.parent),r)return void li();let s;while(n!==e.root&&0===n.color)n===n.parent.left?(s=n.parent.right,1===s.color&&(s.color=0,n.parent.color=1,hi(e,n.parent),s=n.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.right.color&&(s.left.color=0,s.color=1,ci(e,s),s=n.parent.right),s.color=n.parent.color,n.parent.color=0,s.right.color=0,hi(e,n.parent),n=e.root)):(s=n.parent.left,1===s.color&&(s.color=0,n.parent.color=1,ci(e,n.parent),s=n.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.left.color&&(s.right.color=0,s.color=1,hi(e,s),s=n.parent.left),s.color=n.parent.color,n.parent.color=0,s.left.color=0,ci(e,n.parent),n=e.root));n.color=0,li()}function di(e,t){fi(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,hi(e,t)),t.parent.color=0,t.parent.parent.color=1,ci(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,ci(e,t)),t.parent.color=0,t.parent.parent.color=1,hi(e,t.parent.parent))}e.root.color=0}function gi(e,t,n,i){while(t!==e.root&&t!==ii)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function fi(e,t){let n=0,i=0;if(t!==e.root){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t!==e.root){t=t.parent,n=oi(t.left)-t.size_left,i=ai(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i;while(t!==e.root&&(0!==n||0!==i))t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}}ii.parent=ii,ii.left=ii,ii.right=ii,ii.color=0;var mi=n(2773);const pi=65535;function _i(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class bi{constructor(e,t,n,i,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=r}}function ki(e,t=!0){const n=[0];let i=1;for(let t=0,r=e.length;t126)&&(o=!1)}const a=new bi(_i(e),i,r,s,o);return e.length=0,a}class Ci{constructor(e,t,n,i,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=r}}class Li{constructor(e,t){this.buffer=e,this.lineStarts=t}}class wi{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==ii&&e.iterate(e.root,(e=>(e!==ii&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class yi{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const n=this._cache;for(let i=0;i=e)&&(n[i]=null,t=!0)}if(t){const e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class Si{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new Li("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ii,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let t=0,n=e.length;t0){e[t].lineStarts||(e[t].lineStarts=ki(e[t].buffer));const n=new Ci(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),i=this.rbInsertRight(i,n)}this._searchCache=new yi(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=pi,n=t-Math.floor(t/3),i=2*n;let r="",s=0;const o=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(s<=n||s+l0){const t=r.replace(/\r\n|\r|\n/g,e);o.push(new Li(t,ki(t)))}this.create(o,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new wi(this,e)}getOffsetAt(e,t){let n=0,i=this.root;while(i!==ii)if(i.left!==ii&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;const r=this.getAccumulatedValue(i,e-i.lf_left-2);return n+(r+t-1)}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const i=e;while(t!==ii)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,0===r.index){const e=this.getOffsetAt(n+1,1),t=i-e;return new m.y(n+1,t+1)}return new m.y(n+1,r.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===ii){const t=this.getOffsetAt(n+1,1),r=i-e-t;return new m.y(n+1,r+1)}t=t.right}return new m.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){const n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(r+e.remainder,r+t.remainder)}let n=e.node;const i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let s=i.substring(r+e.remainder,r+n.piece.length);n=n.next();while(n!==ii){const e=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=e.substring(i,i+t.remainder);break}s+=e.substr(i,n.piece.length),n=n.next()}return s}getLinesContent(){const e=[];let t=0,n="",i=!1;return this.iterate(this.root,(r=>{if(r===ii)return!0;const s=r.piece;let o=s.length;if(0===o)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,h=s.start.line,c=s.end.line;let u=l[h]+s.start.column;if(i&&(10===a.charCodeAt(u)&&(u++,o--),e[t++]=n,n="",i=!1,0===o))return!0;if(h===c)return this._EOLNormalized||13!==a.charCodeAt(u+o-1)?n+=a.substr(u,o):(i=!0,n+=a.substr(u,o-1)),!0;n+=this._EOLNormalized?a.substring(u,Math.max(u,l[h+1]-this._EOLLength)):a.substring(u,l[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let i=h+1;ie+g,t.reset(0)):(b=u.buffer,k=e=>e,t.reset(g));do{if(m=t.next(b),m){if(k(m.index)>=f)return h;this.positionInBuffer(e,k(m.index)-d,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,r,_),s=_.line===r.line?_.column-r.column+i:_.column+1,o=s+m[0].length;if(c[h++]=(0,mi.dr)(new p.Q(n+t,s,n+t,o),m,a),k(m.index)+m[0].length>=f)return h;if(h>=l)return h}}while(m);return h}findMatchesLineByLine(e,t,n,i){const r=[];let s=0;const o=new mi.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let h=this.positionInBuffer(a.node,a.remainder);const c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,o,e.startLineNumber,e.startColumn,h,c,t,n,i,s,r),r;let u=e.startLineNumber,d=a.node;while(d!==l.node){const l=this.getLineFeedCnt(d.piece.bufferIndex,h,d.piece.end);if(l>=1){const a=this._buffers[d.piece.bufferIndex].lineStarts,c=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),g=a[h.line+l],f=u===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(d,o,u,f,h,this.positionInBuffer(d,g-c),t,n,i,s,r),s>=i)return r;u+=l}const c=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const a=this.getLineContent(u).substring(c,e.endColumn-1);return s=this._findMatchesInLine(t,o,a,e.endLineNumber,c,s,r,n,i),r}if(s=this._findMatchesInLine(t,o,this.getLineContent(u).substr(c),u,c,s,r,n,i),s>=i)return r;u++,a=this.nodeAt2(u,1),d=a.node,h=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){const a=u===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(u).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,o,l,e.endLineNumber,a,s,r,n,i),r}const g=u===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,o,u,g,h,c,t,n,i,s,r),r}_findMatchesInLine(e,t,n,i,r,s,o,a,l){const h=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,c=n.length;let u=-a;while(-1!==(u=n.indexOf(t,u+a)))if((!h||(0,mi.wC)(h,n,c,u,a))&&(o[s++]=new Se.Dg(new p.Q(i,u+1+r,i,u+1+a+r),null),s>=l))return s;return s}let c;t.reset(0);do{if(c=t.next(n),c&&(o[s++]=(0,mi.dr)(new p.Q(i,c.index+1+r,i,c.index+1+c[0].length+r),c,a),s>=l))return s}while(c);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==ii){const{node:n,remainder:i,nodeStartOffset:r}=this.nodeAt(e),s=n.piece,o=s.bufferIndex,a=this.positionInBuffer(n,i);if(0===n.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&r+s.length===e&&t.lengthe){const e=[];let r=new Ci(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(o,s.end)-this.offsetInBuffer(o,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){const e=this.nodeCharCodeAt(n,i);if(10===e){const e={line:r.start.line+1,column:0};r=new Ci(r.bufferIndex,e,r.end,this.getLineFeedCnt(r.bufferIndex,e,r.end),r.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){const r=this.nodeCharCodeAt(n,i-1);if(13===r){const r=this.positionInBuffer(n,i-1);this.deleteNodeTail(n,r),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a)}else this.deleteNodeTail(n,a);const l=this.createNewPieces(t);r.length>0&&this.rbInsertRight(n,r);let h=n;for(let e=0;e=0;e--)r=this.rbInsertLeft(r,i[e]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]);let r=i;for(let e=1;e=u))break;l=c+1}}return n?(n.line=c,n.column=a-d,null):{line:c,column:a-d}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;const i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;const r=i[n.line+1],s=i[n.line]+n.column;if(r>s+1)return n.line-t.line;const o=s-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(o)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){const n=this._buffers[e].lineStarts;return n[t.line]+t.column}deleteNodes(e){for(let t=0;tpi){const t=[];while(e.length>pi){const n=e.charCodeAt(pi-1);let i;13===n||n>=55296&&n<=56319?(i=e.substring(0,pi-1),e=e.substring(pi-1)):(i=e.substring(0,pi),e=e.substring(pi));const r=ki(i);t.push(new Ci(this._buffers.length,{line:0,column:0},{line:r.length-1,column:i.length-r[r.length-1]},r.length-1,i.length)),this._buffers.push(new Li(i,r))}const n=ki(e);return t.push(new Ci(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new Li(e,n)),t}let t=this._buffers[0].buffer.length;const n=ki(e,!1);let i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let e=0;e=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const i=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:r,nodeStartLineNumber:s-(e-1-n.lf_left)}),a.substring(l+i,l+o-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(n,e-n.lf_left-2),r=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=r.substring(s+t,s+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right}}n=n.next();while(n!==ii){const e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const r=this.getAccumulatedValue(n,0),s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=e.substring(s,s+r-t),i}{const t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=e.substr(t,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;while(e!==ii)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){const n=e.piece,i=this.positionInBuffer(e,t),r=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(t!==r)return{index:t,remainder:0}}return{index:r,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;const n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[r]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),s=t,o=this.offsetInBuffer(n.bufferIndex,s),a=this.getLineFeedCnt(n.bufferIndex,n.start,s),l=a-i,h=o-r,c=n.length+h;e.piece=new Ci(n.bufferIndex,n.start,s,a,c),gi(this,e,h,l)}deleteNodeHead(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),s=t,o=this.getLineFeedCnt(n.bufferIndex,s,n.end),a=this.offsetInBuffer(n.bufferIndex,s),l=o-i,h=r-a,c=n.length+h;e.piece=new Ci(n.bufferIndex,s,n.end,o,c),gi(this,e,h,l)}shrinkNode(e,t,n){const i=e.piece,r=i.start,s=i.end,o=i.length,a=i.lineFeedCnt,l=t,h=this.getLineFeedCnt(i.bufferIndex,i.start,l),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,r);e.piece=new Ci(i.bufferIndex,i.start,l,h,c),gi(this,e,c-o,h-a);const u=new Ci(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(d)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const r=ki(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;const n={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,i=0;while(n!==ii)if(n.left!==ii&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(r+t-1,s),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:i};t-=n.piece.length-r;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}n=n.next();while(n!==ii){if(n.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(n,0),i=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:i}}if(n.piece.length>=t-1){const e=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:e}}t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===ii||0===e.piece.lineFeedCnt)return!1;const t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,r=n[i]+t.start.column;if(i===n.length-1)return!1;const s=n[i+1];return!(s>r+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(r)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==ii&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const n=[],i=this._buffers[e.piece.bufferIndex].lineStarts;let r;r=0===e.piece.end.column?{line:e.piece.end.line-1,column:i[e.piece.end.line]-i[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,o=e.piece.lineFeedCnt-1;e.piece=new Ci(e.piece.bufferIndex,e.piece.start,r,o,s),gi(this,e,-1,-1),0===e.piece.length&&n.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Ci(t.piece.bufferIndex,a,t.piece.end,h,l),gi(this,t,-1,-1),0===t.piece.length&&n.push(t);const c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;const f=this._doApplyEdits(a);let m=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const n=d[e].oldContent,i=this.getLineContent(t);0!==i.length&&i!==n&&-1===h.HG(i)&&m.push(t)}}return this._onDidChangeContent.fire(),new Se.F4(g,f,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,i=e[e.length-1].range,r=new p.Q(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn);let s=n.startLineNumber,o=n.startColumn;const a=[];for(let n=0,i=e.length;n0&&a.push(i.text),s=r.endLineNumber,o=r.endColumn}const l=a.join(""),[h,c,d]=(0,u.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:l,eolCount:h,firstLineLength:c,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(xi._sortOpsDescending);const t=[];for(let n=0;n0){const e=o.eolCount+1;h=1===e?new p.Q(a,l,a,l+o.firstLineLength):new p.Q(a,l,a+e-1,o.lastLineLength+1)}else h=new p.Q(a,l,a,l);n=h.endLineNumber,i=h.endColumn,t.push(h),r=o}return t}static _sortOpsAscending(e,t){const n=p.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){const n=p.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class Ei{constructor(e,t,n,i,r,s,o,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=r,this._containsRTL=s,this._containsUnusualLineTerminators=o,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,i=n.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=vi(this._tmpLineStarts,e);this.chunks.push(new Li(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=h.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=h.$X(e)))}finish(e=!0){return this._finish(),new Ei(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=ki(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Ii=n(4544),Ti=n(5350),Ai=n(3723),Di=n(4240),Mi=n(371);const Ri=new class{clone(){return this}equals(e){return this===e}};function Oi(e,t){const n=new Uint32Array(2);return n[0]=0,n[1]=(32768|e|2<<24)>>>0,new Ti.rY(n,null===t?Ri:t)}class Bi{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(0===t)return void this.insert(e,n);if(0===n)return void this.delete(e,t);const i=this._store.slice(0,e),r=this._store.slice(e+t),s=Fi(n,this._default);this._store=i.concat(s,r)}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const n=[];for(let e=0;e0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e)return void n.appendLineTokens(t)}this._tokens.push(new Pi(e,[t]))}finalize(){return this._tokens}}class Vi{static{this.defaultTokenMetadata=33587200}static createEmpty(e,t){const n=Vi.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=n,new Vi(i,e,t)}static createFromTextAndMetadata(e,t){let n=0,i="";const r=new Array;for(const{text:t,metadata:s}of e)r.push(n+t.length,s),n+=t.length,i+=t;return new Vi(new Uint32Array(r),i,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=n}equals(e){return e instanceof Vi&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const i=t<<1,r=i+(n<<1);for(let t=i;t0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)],n=gt.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return gt.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return gt.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return gt.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return gt.x.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return gt.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Vi.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new Wi(this,e,t,n)}static convertToEndOffset(e,t){const n=e.length>>>1,i=n-1;for(let t=0;t>>1)-1;while(nt&&(i=r)}return n}withInserted(e){if(0===e.length)return this;let t=0,n=0,i="";const r=new Array;let s=0;while(1){const o=ts){i+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];r.push(i.length,e),s=a.offset}i+=a.text,r.push(i.length,a.tokenMetadata),n++}}return new Vi(new Uint32Array(r),i,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),n=this.getEndOffset(e),i=this._text.substring(t,n);return i}forEach(e){const t=this.getCount();for(let n=0;n=n)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof Wi&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,n=this._source.getStartOffset(t),i=this._source.getEndOffset(t);let r=this._source.getTokenText(t);return nthis._endOffset&&(r=r.substring(0,r.length-(i-this._endOffset))),r}forEach(e){for(let t=0;tt)break;const r=this._textModel.getLineContent(i.lineNumber),s=Ki(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i.startState);e.add(i.lineNumber,s.tokens),this.store.setEndState(i.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const n=this.getStartState(e.lineNumber);if(!n)return 0;const i=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),s=r.substring(0,e.column-1)+t+r.substring(e.column-1),o=Ki(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n),a=new Vi(o.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,n){const i=e.lineNumber,r=e.column,s=this.getStartState(i);if(!s)return null;const o=this._textModel.getLineContent(i),a=o.substring(0,r-1)+n+o.substring(r-1+t),l=this._textModel.getLanguageIdAtPosition(i,0),h=Ki(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s),c=new Vi(h.tokens,a,this._languageIdCodec);return c}hasAccurateTokensForLine(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&r>=1;r--){const e=this._textModel.getLineFirstNonWhitespaceColumn(r);if(0!==e&&(e0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}}class $i{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Mi.L(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Mi.L(n.start,e):this._ranges.splice(t,1,new Mi.L(n.start,e),new Mi.L(e+1,n.endExclusive))}}addRange(e){Mi.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;while(!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive))n++;let i=n;while(!(i>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function Ki(e,t,n,i,r,s){let o=null;if(n)try{o=n.tokenizeEncoded(i,r,s.clone())}catch(e){(0,l.dz)(e)}return o||(o=Oi(e.encodeLanguageId(t),s)),Vi.convertToEndOffset(o.tokens,i.length),o}class Gi{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,Ai.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;const i=this._tokenizeOneInvalidLine(t);if(i>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Ii.M(e,t))}}class Qi{constructor(){this._onDidChangeVisibleRanges=new i.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Yi((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Yi{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const n=e.map((e=>new Ii.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}class Xi extends r.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Ai.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,o.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class Zi extends r.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new i.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class Ji extends Zi{constructor(e,t,n,i){super(t,n,i),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=Ti.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new Vi(n,t,this._languageIdCodec)}return Vi.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLineWithEdit(e,t,n){return null}get hasTokens(){const e=void 0!==this._treeSitterService.getParseResult(this._textModel);return e}}var er=n(5863);const tr=new Uint32Array(0).buffer;class nr{static deleteBeginning(e,t){return null===e||e===tr?e:nr.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===tr)return e;const n=ir(e),i=n[n.length-2];return nr.delete(e,t,i)}static delete(e,t,n){if(null===e||e===tr||t===n)return e;const i=ir(e),r=i.length>>>1;if(0===t&&i[i.length-2]===n)return tr;const s=Vi.findIndexInTokensArray(i,t),o=s>0?i[s-1<<1]:0,a=i[s<<1];if(nh&&(i[l++]=t,i[l++]=i[1+(e<<1)],h=t)}if(l===i.length)return e;const u=new Uint32Array(l);return u.set(i.subarray(0,l),0),u.buffer}static append(e,t){if(t===tr)return e;if(e===tr)return t;if(null===e)return e;if(null===t)return null;const n=ir(e),i=ir(t),r=i.length>>>1,s=new Uint32Array(n.length+i.length);s.set(n,0);let o=n.length;const a=n[n.length-2];for(let e=0;e>>1;let s=Vi.findIndexInTokensArray(i,t);if(s>0){const e=i[s-1<<1];e===t&&s--}for(let e=s;e0}getTokens(e,t,n){let i=null;if(t1&&(t=gt.x.getLanguageId(i[1])!==e),!t)return tr}if(!i||0===i.length){const n=new Uint32Array(2);return n[0]=t,n[1]=sr(e),n.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const n=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=nr.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=nr.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n=this._len||(0!==t?(this._lineTokens[i]=nr.deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=nr.insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[i]=nr.insert(this._lineTokens[i],e.column-1,n))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const n=[];for(let i=0,r=e.length;i>>0}class or{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const i=t[0].getRange(),r=t[t.length-1].getRange();if(!i||!r)return e;n=e.plusRange(i).plusRange(r)}let i=null;for(let e=0,t=this._pieces.length;en.endLineNumber){i=i||{index:e};break}if(r.removeTokens(n),r.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(r.endLineNumbern.endLineNumber){i=i||{index:e};continue}const[s,o]=r.split(n);s.isEmpty()?i=i||{index:e}:o.isEmpty()||(this._pieces.splice(e,1,s,o),e++,t++,i=i||{index:e})}return i=i||{index:this._pieces.length},t.length>0&&(this._pieces=o.nK(this._pieces,i.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const n=this._pieces;if(0===n.length)return t;const i=or._findFirstPieceWithLine(n,e),r=n[i].getLineTokens(e);if(!r)return t;const s=t.getCount(),o=r.getCount();let a=0;const l=[];let h=0,c=0;const u=(e,t)=>{e!==c&&(c=e,l[h++]=e,l[h++]=t)};for(let e=0;e>>0,h=~l>>>0;while(at)){while(r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber)r--;return r}i=r-1}}return n}acceptEdit(e,t,n,i,r){for(const s of this._pieces)s.acceptEdit(e,t,n,i,r)}}var ar,lr=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},hr=function(e,t){return function(n,i){t(n,i,e)}};let cr=ar=class extends dn{constructor(e,t,n,s,o,a,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=s,this._languageService=o,this._languageConfigurationService=a,this._treeSitterService=l,this._semanticTokens=new or(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new i.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new i.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new r.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(i.Jh.filter(Ti.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new ur(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new Ji(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){Ti.OB.get(this._languageId)?this._tokens instanceof Ji||this.createTokens(!0):this._tokens instanceof ur||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,n,i]=(0,u.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,n,i,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new l.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this._tokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),i=this.getLineTokens(t.lineNumber),r=i.findTokenIndexAtOffset(t.column-1),[s,o]=ar._findLanguageBoundaries(i,r),a=(0,C.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(r>0&&s===t.column-1){const[s,o]=ar._findLanguageBoundaries(i,r-1),a=(0,C.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r-1)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let r=t;r>=0&&e.getLanguageId(r)===n;r--)i=e.getStartOffset(r);let r=e.getLineContent().length;for(let i=t,s=e.getCount();i{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(i.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let n=this._attachedViewStates.get(e);n||(n=new Xi((()=>this.refreshRanges(n.lineRanges))),this._attachedViewStates.set(e,n)),n.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new Ui(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Ti.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,l.dz)(e),[null,null]}return[e,t]},[n,i]=t();if(this._tokenizer=n&&i?new Hi(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{if(2===this._backgroundTokenizationState)return;const e=2;this._backgroundTokenizationState=e,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(e,t)=>{if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&this._tokenizer?.store.setEndState(e,t)}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Gi(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),n?.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new rr(this._languageIdCodec),this._debugBackgroundStates=new Ui(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,n]=(0,u.W)(t.text);this._tokens.acceptEdit(t.range,e,n),this._debugBackgroundTokens?.acceptEdit(t.range,e,n)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Ii.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const n=new zi,{heuristicTokens:i}=this._tokenizer.tokenizeHeuristically(n,e,t),r=this.setTokens(n.finalize());if(i)for(const e of r.changes)this._backgroundTokenizer.value?.requestTokens(e.fromLineNumber,e.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new zi;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const i=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(i)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;const i=this._textModel.validatePosition(new m.y(e,t));return this.forceTokenization(i.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(i,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;const i=this._textModel.validatePosition(e);return this.forceTokenization(i.lineNumber),this._tokenizer.tokenizeLineWithEdit(i,t,n)}get hasTokens(){return this._tokens.hasTokens}}class dr{constructor(){this.changeType=1}}class gr{static applyInjectedText(e,t){if(!t||0===t.length)return e;let n="",i=0;for(const r of t)n+=e.substring(i,r.column-1),i=r.column-1,n+=r.options.content;return n+=e.substring(i),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new gr(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new gr(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,n,i,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=i,this.order=r}}class fr{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class mr{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class pr{constructor(e,t,n,i){this.changeType=4,this.injectedTexts=i,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class _r{constructor(){this.changeType=5}}class br{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},xr=function(e,t){return function(n,i){t(n,i,e)}};function Er(e){const t=new Ni;return t.acceptChunk(e),t.finish()}function Nr(e){const t=new Ni;let n;while("string"===typeof(n=e.read()))t.acceptChunk(n);return t.finish()}function Ir(e,t){let n;return n="string"===typeof e?Er(e):Se.nk(e)?Nr(e):e,n.create(t)}let Tr=0;const Ar=999,Dr=1e4;class Mr{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,n=0;do{const i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}while(1)}}const Rr=()=>{throw new Error("Invalid change accessor")};let Or=class extends r.jG{static{yr=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:b.tabSize,indentSize:b.indentSize,insertSpaces:b.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:b.trimAutoWhitespace,largeFileOptimizations:b.largeFileOptimizations,bracketPairColorizationOptions:b.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const n=vn(e,t.tabSize,t.insertSpaces);return new Se.X2({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Se.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,r.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,s=null,o,a,l,u){super(),this._undoRedoService=o,this._languageService=a,this._languageConfigurationService=l,this.instantiationService=u,this._onWillDispose=this._register(new i.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Yr((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new i.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new i.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new i.vl),this._eventEmitter=this._register(new Xr),this._languageSelectionListener=this._register(new r.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new Qi,Tr++,this.id="$model"+Tr,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource="undefined"===typeof s||null===s?c.r.parse("inmemory://model/"+Tr):s,this._attachedEditorCount=0;const{textBuffer:d,disposable:g}=Ir(e,n.defaultEOL);this._buffer=d,this._bufferDisposable=g,this._options=yr.resolveOptions(this._buffer,n);const f="string"===typeof t?t:t.languageId;"string"!==typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new Wt(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new pn(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Gt(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(cr,this,this._bracketPairs,f,this._attachedViews);const m=this._buffer.getLineCount(),_=this._buffer.getValueLengthInRange(new p.Q(1,1,m,this._buffer.getLineLength(m)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=_>yr.LARGE_FILE_SIZE_THRESHOLD||m>yr.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=_>yr.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=_>yr._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=h.tk(Tr),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Vr,this._commandManager=new hn(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new xi([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=r.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new l.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new vr(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e||void 0===e)throw(0,l.Qg)();const{textBuffer:t,disposable:n}=Ir(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,r,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:r,isRedoing:s,isFlush:o}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Vr,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new br([new dr],this._versionId,!1,!1),this._createContentChanged2(new p.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new br([new _r],this._versionId,!1,!1),this._createContentChanged2(new p.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const n=this._buffer.getLineLength(i);n>=Dr?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!==typeof e.indentSize?e.indentSize:this._options.originalIndentSize,i="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,r="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s="undefined"!==typeof e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,o=new Se.X2({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:s});if(this._options.equals(o))return;const a=this._options.createChangeEvent(o);this._options=o,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const n=vn(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),f(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(h._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new Mr(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let r=Math.floor("number"!==typeof n||isNaN(n)?1:n),s=Math.floor("number"!==typeof i||isNaN(i)?1:i);if(r<1)r=1,s=1;else if(r>t)r=t,s=this.getLineMaxColumn(r);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(r);s>=e&&(s=e)}const o=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!==typeof o||isNaN(o)?1:o),h=Math.floor("number"!==typeof a||isNaN(a)?1:a);if(l<1)l=1,h=1;else if(l>t)l=t,h=this.getLineMaxColumn(l);else if(h<=1)h=1;else{const e=this.getLineMaxColumn(l);h>=e&&(h=e)}return n===r&&i===s&&o===l&&a===h&&e instanceof p.Q&&!(e instanceof _.L)?e:new p.Q(r,s,l,h)}_isValidPosition(e,t,n){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const i=this._buffer.getLineCount();if(e>i)return!1;if(1===t)return!0;const r=this.getLineMaxColumn(e);if(t>r)return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(h.pc(n))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor("number"!==typeof e||isNaN(e)?1:e),r=Math.floor("number"!==typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(i<1)return new m.y(1,1);if(i>s)return new m.y(s,this.getLineMaxColumn(s));if(r<=1)return new m.y(i,1);const o=this.getLineMaxColumn(i);if(r>=o)return new m.y(i,o);if(1===n){const e=this._buffer.getLineCharCode(i,r-2);if(h.pc(e))return new m.y(i,r-1)}return new m.y(i,r)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof m.y&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(r,s,0))return!1;if(1===t){const e=i>1?this._buffer.getLineCharCode(n,i-2):0,t=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,o=h.pc(e),a=h.pc(t);return!o&&!a}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof p.Q&&!(e instanceof _.L)&&this._isValidRange(e,t))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,s=n.column,o=i.lineNumber,a=i.column;if(1===t){const e=s>1?this._buffer.getLineCharCode(r,s-2):0,t=a>1&&a<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,a-2):0,n=h.pc(e),i=h.pc(t);return n||i?r===o&&s===a?new p.Q(r,s-1,o,a-1):n&&i?new p.Q(r,s-1,o,a+1):n?new p.Q(r,s-1,o,a):new p.Q(r,s,o,a+1):new p.Q(r,s,o,a)}return new p.Q(r,s,o,a)}modifyPosition(e,t){this._assertNotDisposed();const n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new p.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,r,s,o=Ar){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>p.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let h;if(l.push(a.reduce(((e,t)=>p.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!n&&e.indexOf("\n")<0){const t=new mi.lt(e,n,i,r),a=t.parseSearchRequest();if(!a)return[];h=e=>this.findMatchesLineByLine(e,a,s,o)}else h=t=>mi.hB.findMatches(this,new mi.lt(e,n,i,r),t,s,o);return l.map(h).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new mi.lt(e,n,i,r),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let h=new p.Q(o.lineNumber,o.column,l,this.getLineMaxColumn(l)),c=this.findMatchesLineByLine(h,a,s,1);return mi.hB.findNextMatch(this,new mi.lt(e,n,i,r),o,s),c.length>0?c[0]:(h=new p.Q(1,1,o.lineNumber,this.getLineMaxColumn(o.lineNumber)),c=this.findMatchesLineByLine(h,a,s,1),c.length>0?c[0]:null)}return mi.hB.findNextMatch(this,new mi.lt(e,n,i,r),o,s)}findPreviousMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);return mi.hB.findPreviousMatch(this,new mi.lt(e,n,i,r),o,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Se.Wo?e:new Se.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n({range:this.validateRange(e.range),text:e.text})));let i=!0;if(e)for(let t=0,r=e.length;tr.endLineNumber,o=r.startLineNumber>t.endLineNumber;if(!i&&!o){s=!0;break}}if(!s){i=!1;break}}if(i)for(let e=0,i=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&(!(i===t.startLineNumber&&t.startColumn===r&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(0))&&!(i===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(o.length-1)))){s=!1;break}}if(s){const e=new p.Q(i,1,i,r);t.push(new Se.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,i)}_applyUndo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new p.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}}));this._applyUndoRedoEdits(r,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new p.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}}));this._applyUndoRedoEdits(r,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,r,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e=0;t--){const n=l+t,i=p+t;C.takeFromEndWhile((e=>e.lineNumber>i));const r=C.takeFromEndWhile((e=>e.lineNumber===i));e.push(new fr(n,this.getLineContent(i),r))}if(ge.lineNumbere.lineNumber===t))}e.push(new pr(i+1,l+d,c,h))}t+=f}this._emitContentChangedEvent(new br(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===i.reverseEdits?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e),n=t.map((e=>new fr(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new kr(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(t,n)=>this._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Qr(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)};let i=null;try{i=t(n)}catch(e){(0,l.dz)(e)}return n.addDecoration=Rr,n.changeDecoration=Rr,n.changeDecorationOptions=Rr,n.removeDecoration=Rr,n.deltaDecorations=Rr,i}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,l.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Gr[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),o=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,r),i.setOptions(Gr[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,n=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1,r=!1){const s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),h=this.getLineMaxColumn(l),c=new p.Q(a,1,l,h),u=this._getDecorationsInRange(c,n,i,r);return(0,o.E4)(u,this._decorationProvider.getDecorationsInRange(c,n,i)),u}getDecorationsInRange(e,t=0,n=!1,i=!1,r=!1){const s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,r);return(0,o.E4)(a,this._decorationProvider.getDecorationsInRange(s,t,n,i)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return gr.fromDecorations(i).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,i){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(n.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),s=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!(!n.options.overviewRuler||!n.options.overviewRuler.color),r=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(n.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=i!==r,o=Pr(t)!==zr(n);s||o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,i=!1){const r=this.getVersionId(),s=t.length;let o=0;const a=n.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const h=new Array(a);while(othis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Br(this.getLineContent(e))+1}};function Br(e){let t=0;for(const n of e){if(" "!==n&&"\t"!==n)break;t++}return t}function Fr(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Pr(e){return!!e.after||!!e.before}function zr(e){return!!e.options.after||!!e.options.before}Or=yr=Sr([xr(4,Cr),xr(5,v.L),xr(6,ge),xr(7,ee._Y)],Or);class Vr{constructor(){this._decorationsTree0=new On,this._decorationsTree1=new On,this._injectedTextDecorationsTree=new On}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)null===n.range&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,i,r,s){const o=e.getVersionId(),a=this._intervalSearch(t,n,i,r,o,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,n,i,r,s){const o=this._decorationsTree0.intervalSearch(e,t,n,i,r,s),a=this._decorationsTree1.intervalSearch(e,t,n,i,r,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,n,i,r,s);return o.concat(a).concat(l)}getInjectedTextInInterval(e,t,n,i){const r=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,i,!1,r,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const n=e.getVersionId(),i=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,i).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,n,i,r){const s=e.getVersionId(),o=this._search(t,n,i,s,r);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,i,r){if(n)return this._decorationsTree1.search(e,t,i,r);{const n=this._decorationsTree0.search(e,t,i,r),s=this._decorationsTree1.search(e,t,i,r),o=this._injectedTextDecorationsTree.search(e,t,i,r);return n.concat(s).concat(o)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),i=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){zr(e)?this._injectedTextDecorationsTree.insert(e):Fr(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){zr(e)?this._injectedTextDecorationsTree.delete(e):Fr(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){zr(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Fr(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i),this._injectedTextDecorationsTree.acceptReplace(e,t,n,i)}}function Wr(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class qr{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Hr extends qr{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:Se.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class Ur{constructor(e){this.position=e?.position??Se.ZS.Center,this.persistLane=e?.persistLane}}class jr extends qr{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?a.Q1.fromHex(e):t.getColor(e.id)}}class $r{static from(e){return e instanceof $r?e:new $r(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Kr{static register(e){return new Kr(e)}static createDynamic(e){return new Kr(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?Wr(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Wr(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Hr(e.overviewRuler):null,this.minimap=e.minimap?new jr(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Ur(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?Wr(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Wr(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?Wr(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?h.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Wr(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Wr(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Wr(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Wr(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Wr(e.afterContentClassName):null,this.after=e.after?$r.from(e.after):null,this.before=e.before?$r.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}Kr.EMPTY=Kr.register({description:"empty"});const Gr=[Kr.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Kr.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Kr.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Kr.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Qr(e){return e instanceof Kr?e:Kr.createDynamic(e)}class Yr extends r.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new i.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Xr extends r.jG{constructor(){super(),this._fastEmitter=this._register(new i.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new i.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}var Zr,Jr=n(6151),es=n(5647),ts=n(6657),ns=n(5603),is=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},rs=function(e,t){return function(n,i){t(n,i,e)}};function ss(e){return e.toString()}class os{constructor(e,t,n){this.model=e,this._modelEventListeners=new r.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>n(e,t))))}dispose(){this._modelEventListeners.dispose()}}const as=s.j9||s.zx?1:2;class ls{constructor(e,t,n,i,r,s,o,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=r,this.sha1=s,this.versionId=o,this.alternativeVersionId=a}}let hs=class extends r.jG{static{Zr=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,n,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=r,this._onModelAdded=this._register(new i.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new i.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new i.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let n=b.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let i="tabSize";if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(i=Math.max(t,1))}let r=b.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=as;const o=e.eol;"\r\n"===o?s=2:"\n"===o&&(s=1);let a=b.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let l=b.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let h=b.largeFileOptimizations;e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(h="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let c=b.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"===typeof e.editor.bracketPairColorization&&(c={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:i,insertSpaces:r,detectIndentation:l,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:h,bracketPairColorizationOptions:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"string"===typeof n&&"auto"!==n?n:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}getCreationOptions(e,t,n){const i="string"===typeof e?e:e.languageId;let r=this._modelCreationOptionsByLanguageAndResource[i+t];if(!r){const e=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:t}),s=this._getEOL(t,i);r=Zr._readModelOptions({editor:e,eol:s},n),this._modelCreationOptionsByLanguageAndResource[i+t]=r}return r}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,r=n.length;ie){const t=[];this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));while(t.length>0&&this._disposedModelsHeapSize>e){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const r=this.getCreationOptions(t,n,i),s=this._instantiationService.createInstance(Or,e,t,r,n);if(n&&this._disposedModels.has(ss(n))){const e=this._removeDisposedModel(n),t=this._undoRedoService.getElements(n),i=this._getSHA1Computer(),r=!!i.canComputeSHA1(s)&&i.computeSHA1(s)===e.sha1;if(r||e.sharesUndoRedoStack){for(const e of t.past)ln(e)&&e.matchesResource(n)&&e.setModel(s);for(const e of t.future)ln(e)&&e.matchesResource(n)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,(e=>ln(e)&&e.matchesResource(n))),r&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const o=ss(s.uri);if(this._models[o])throw new Error("ModelService: Cannot add model because it already exists!");const a=new os(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[o]=a,a}createModel(e,t,n,i=!1){let r;return r=t?this._createModelData(e,t,n,i):this._createModelData(e,ie.vH,n,i),this._onModelAdded.fire(r.model),r.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n0||t.future.length>0){for(const n of t.past)ln(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri));for(const n of t.future)ln(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri))}}const o=Zr.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(r)if(i||!(s>o)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(o-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>ln(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new ls(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),i,s,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!i){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,i=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget);Zr._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new cs}};hs=Zr=is([rs(0,te.pG),rs(1,Jr.ITextResourcePropertiesService),rs(2,Cr),rs(3,ee._Y)],hs);class cs{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=cs.MAX_MODEL_SIZE}computeSHA1(e){const t=new es.v7,n=e.createSnapshot();let i;while(i=n.read())t.update(i);return t.digest()}}},4037:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextModelService:()=>r});var i=n(7778);const r=(0,i.u1)("textModelService")},3699:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeSemanticTokensDto:()=>a});var i=n(7885),r=n(5160);function s(e){for(let t=0,n=e.length;t{"use strict";n.r(t),n.d(t,{SemanticTokensProviderStyling:()=>p,toMultilineTokens2:()=>_});var i=n(4577),r=n(3711),s=n(458),o=n(6788),a=n(8690),l=n(6627);class h{static create(e,t){return new h(e,new c(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.Q(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[i,r,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new h(this._startLineNumber,i),new h(this._startLineNumber+s,r)]}applyEdit(e,t){const[n,i,r]=(0,l.W)(t);this.acceptEdit(e,n,i,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,r){this._acceptDeleteRange(e),this._acceptInsertText(new o.y(e.startLineNumber,e.startColumn),t,n,i,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const e=n-t;return void(this._startLineNumber-=e)}const i=this._tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const i=-t;this._startLineNumber-=i,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,r){if(0===t&&0===n)return;const s=e.lineNumber-this._startLineNumber;if(s<0)return void(this._startLineNumber+=t);const o=this._tokens.getMaxDeltaLine();s>=o+1||this._tokens.acceptInsertText(s,e.column-1,t,n,i,r)}}class c{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)){let r=i;while(r>t&&this._getDeltaLine(r-1)===e)r--;let s=i;while(se||c===e&&d>=t)&&(ce||c===e&&g>=t){if(cr?f-=r-n:f=n;else if(d===t&&g===n){if(!(d===i&&f>r)){h=!0;continue}f-=r-n}else if(dr)){h=!0;continue}d=t,g=n,f=g+(f-r)}else if(d>i){if(0===a&&!h){l=o;break}d-=a}else{if(!(d===i&&g>=r))throw new Error("Not possible!");e&&0===d&&(g+=e,f+=e),d-=a,g-=r-n,f-=r-n}const p=4*l;s[p]=d,s[p+1]=g,s[p+2]=f,s[p+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,r,s){const o=0===n&&1===i&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},f=function(e,t){return function(n,i){t(n,i,e)}};const m=!1;let p=class{constructor(e,t,n,i){this._legend=e,this._themeService=t,this._languageService=n,this._logService=i,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new k}getMetadata(e,t,n){const r=this._languageService.languageIdCodec.encodeLanguageId(n),o=this._hashTable.get(e,t,r);let a;if(o)a=o.metadata,m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${i.x.getForeground(a)}, fontStyle ${i.x.getFontStyle(a).toString(2)}`);else{let o=this._legend.tokenTypes[e];const l=[];if(o){let e=t;for(let t=0;e>0&&t>=1;m&&e>0&&this._logService.getLevel()===s.$b.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const i=this._themeService.getColorTheme().getTokenStyleMetadata(o,l,n);if("undefined"===typeof i)a=2147483647;else{if(a=0,"undefined"!==typeof i.italic){const e=(i.italic?1:0)<<11;a|=1|e}if("undefined"!==typeof i.bold){const e=(i.bold?2:0)<<11;a|=2|e}if("undefined"!==typeof i.underline){const e=(i.underline?4:0)<<11;a|=4|e}if("undefined"!==typeof i.strikethrough){const e=(i.strikethrough?8:0)<<11;a|=8|e}if(i.foreground){const e=i.foreground<<15;a|=16|e}0===a&&(a=2147483647)}}else m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,o="not-in-legend";this._hashTable.add(e,t,r,a),m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${l.join(" ")}): foreground ${i.x.getForeground(a)}, fontStyle ${i.x.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,i,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${i} is outside the previous data (length ${r}).`))}};function _(e,t,n){const i=e.data,r=e.data.length/5|0,s=Math.max(Math.ceil(r/1024),400),o=[];let a=0,l=1,c=0;while(ae&&0===i[5*t])t--;if(t-1===e){let e=u;while(e+1h)t.warnOverlappingSemanticTokens(o,h+1);else{const e=t.getMetadata(b,k,n);2147483647!==e&&(0===f&&(f=o),d[g]=o-f,d[g+1]=h,d[g+2]=_,d[g+3]=e,g+=4,m=o,p=_)}l=o,c=h,a++}g!==d.length&&(d=d.subarray(0,g));const _=h.create(f,d);o.push(_)}return o}p=g([f(1,r.Gy),f(2,d.L),f(3,s.rr)],p);class b{constructor(e,t,n,i){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=i,this.next=null}}class k{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=k._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=k._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";n.r(t),n.d(t,{ISemanticTokensStylingService:()=>r});var i=n(7778);const r=(0,i.u1)("semanticTokensStylingService")},2205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SemanticTokensStylingService:()=>d});var i=n(8894),r=n(4573),s=n(3711),o=n(458),a=n(4686),l=n(7284),h=n(4979),c=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},u=function(e,t){return function(n,i){t(n,i,e)}};let d=class extends i.jG{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};d=c([u(0,s.Gy),u(1,o.rr),u(2,r.L)],d),(0,h.v)(l.ISemanticTokensStylingService,d,1)},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MirrorModel:()=>_,STOP_SYNC_MODEL_DELTA_TIME_MS:()=>f,WorkerTextModelSyncClient:()=>m,WorkerTextModelSyncServer:()=>p});var i=n(3723),r=n(8894),s=n(9133),o=n(6788),a=n(8690),l=n(939),h=n(601),c=(n(5053),n(2647));class u{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,c.j)(e);const n=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,c.j)(e),t=(0,c.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,c.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,s=0;while(t<=n)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e=r))break;t=i+1}return new d(i,e-s)}}class d{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class g{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new o.y(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;ithis._checkStopModelSync()),Math.round(f/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,r.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const n of e){const e=n.toString();this._syncedModels[e]||this._beginModelSync(n,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const n in this._syncedModelsLastUsedTime){const i=e-this._syncedModelsLastUsedTime[n];i>f&&t.push(n)}for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n)return;if(!t&&n.isTooLargeForSyncing())return;const i=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const s=new r.Cm;s.add(n.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(i.toString(),e)}))),s.add(n.onWillDispose((()=>{this._stopModelSync(i)}))),s.add((0,r.s)((()=>{this._proxy.$acceptRemovedModel(i)}))),this._syncedModels[i]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,r.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new _(s.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;const n=this._models[e];n.onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class _ extends g{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}},4977:(e,t,n)=>{"use strict";n.r(t)},6151:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextResourceConfigurationService:()=>r,ITextResourcePropertiesService:()=>s});var i=n(7778);const r=(0,i.u1)("textResourceConfigurationService"),s=(0,i.u1)("textResourcePropertiesService")},5863:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeSitterParserService:()=>r});var i=n(7778);const r=(0,i.u1)("treeSitterParserService")},1210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DraggedTreeItemsIdentifier:()=>r,TreeViewsDnDService:()=>i});class i{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class r{constructor(e){this.identifier=e}}},5231:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeViewsDnDService:()=>o});var i=n(4979),r=n(7778),s=n(1210);const o=(0,r.u1)("treeViewsDndService");(0,i.v)(o,s.TreeViewsDnDService,1)},7412:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnicodeTextModelHighlighter:()=>l});var i=n(8690),r=n(2773),s=n(601),o=n(9109),a=n(939);class l{static computeUnicodeHighlights(e,t,n){const l=n?n.startLineNumber:1,u=n?n.endLineNumber:e.getLineCount(),d=new c(t),g=d.getCandidateCodePoints();let f;f="allNonBasicAscii"===g?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(`${h(Array.from(g))}`,"g");const m=new r.W5(null,f),p=[];let _,b=!1,k=0,v=0,C=0;e:for(let t=l,n=u;t<=n;t++){const n=e.getLineContent(t),r=n.length;m.reset(0);do{if(_=m.next(n),_){let e=_.index,l=_.index+_[0].length;if(e>0){const t=n.charCodeAt(e-1);s.pc(t)&&e--}if(l+1=n){b=!0;break e}p.push(new i.Q(t,e+1,t,l+1))}}}while(_)}return{ranges:p,hasMore:b,ambiguousCharacterCount:k,invisibleCharacterCount:v,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(e,t){const n=new c(t),i=n.shouldHighlightNonBasicASCII(e,null);switch(i){case 0:return null;case 2:return{kind:1};case 3:{const i=e.codePointAt(0),r=n.ambiguousCharacters.getPrimaryConfusable(i),o=s.tl.getLocales().filter((e=>!s.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(i)));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function h(e,t){const n=`[${s.bm(e.map((e=>String.fromCodePoint(e))).join(""))}]`;return n}class c{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.y_.codePoints)u(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,r=!1;if(t)for(const e of t){const t=e.codePointAt(0),n=s.aC(e);i=i||n,n||this.ambiguousCharacters.isAmbiguous(t)||s.y_.isInvisibleCharacter(t)||(r=!0)}return!i&&r?0:this.options.invisibleCharacters&&!u(e)&&s.y_.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function u(e){return" "===e||"\n"===e||"\t"===e}},1337:(e,t,n)=>{"use strict";function i(){return globalThis._VSCODE_NLS_MESSAGES}function r(){return globalThis._VSCODE_NLS_LANGUAGE}n.d(t,{i8:()=>r,kg:()=>a});const s="pseudo"===r()||"undefined"!==typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>{const i=n[0],r=t[i];let s=e;return"string"===typeof r?s=r:"number"!==typeof r&&"boolean"!==typeof r&&void 0!==r&&null!==r||(s=String(r)),s})),s&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function a(e,t,...n){return o("number"===typeof e?l(e,t):t,n)}function l(e,t){const n=i()?.[e];if("string"!==typeof n){if("string"===typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}},2828:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>s,pG:()=>r});var i=n(7778);const r=(0,i.u1)("configurationService");function s(e){return e.replace(/[\[\]]/g,"")}},7503:(e,t,n)=>{"use strict";n.d(t,{Fd:()=>c});var i=n(5053),r=n(231),s=n(322),o=n(1337),a=n(2828),l=n(6223),h=n(6374);const c={Configuration:"base.contributions.configuration"},u={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},_="vscode://schemas/settings/resourceLanguage",b=h.O.as(l.F.JSONContribution);class k{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new r.vl,this._onDidUpdateConfiguration=new r.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:o.kg("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},b.registerSchema(_,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=new Set;this.doRegisterConfigurations(e,t,n),b.registerSchema(_,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const n=[];for(const{overrides:i,source:r}of e)for(const e in i){t.add(e);const s=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),o=i[e];if(s.configurationDefaultOverrides.push({value:o,source:r}),w.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,r),n.push(...y(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t;const n=this.configurationProperties[e];n&&(this.updatePropertyDefaultValue(e,n),this.updateSchema(e,n))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,t,n){const i={type:"object",default:t.value,description:o.kg("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,a.Mo)(e)),$ref:_,defaultDefaultValue:t.value,source:n,defaultValueSource:n};this.configurationProperties[e]=i,this.defaultLanguageConfigurationOverridesNode.properties[e]=i}mergeDefaultConfigurationsForOverrideIdentifier(e,t,n,i){const r=i?.value||{},o=i?.source??new Map;if(o instanceof Map){for(const e of Object.keys(t)){const i=t[e],a=s.Gv(i)&&(s.b0(r[e])||s.Gv(r[e]));if(a){if(r[e]={...r[e]??{},...i},n)for(const t in i)o.set(`${e}.${t}`,n)}else r[e]=i,n?o.set(e,n):o.delete(e)}return{value:r,source:o}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,n,i){const r=this.configurationProperties[e],o=i?.value??r?.defaultDefaultValue;let a=n;const l=s.Gv(t)&&(void 0!==r&&"object"===r.type||void 0===r&&(s.b0(o)||s.Gv(o)));if(l){if(a=i?.source??new Map,!(a instanceof Map))return void console.error("defaultValueSource is not a Map");for(const i in t)n&&a.set(`${e}.${i}`,n);t={...s.Gv(o)?o:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,n),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,n,i,r=3,o){r=s.z(e.scope)?r:e.scope;const a=e.properties;if(a)for(const e in a){const l=a[e];t&&E(e,l)?delete a[e]:(l.source=n,l.defaultDefaultValue=a[e].default,this.updatePropertyDefaultValue(e,l),w.test(e)?l.scope=void 0:(l.scope=s.z(l.scope)?r:l.scope,l.restricted=s.z(l.restricted)?!!i?.includes(e):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],a[e].policy?.name&&this.policyConfigurations.set(a[e].policy.name,e),!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),o.add(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e]))}const l=e.allOf;if(l)for(const e of l)this.validateAndRegisterProperties(e,t,n,i,r,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const n=e.properties;if(n)for(const e in n)this.updateSchema(e,n[e]);const i=e.allOf;i?.forEach(t)};t(e)}updateSchema(e,t){switch(u.properties[e]=t,t.scope){case 1:d.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:f.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:p.properties[e]=t;break;case 5:p.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,n),u.properties[t]=n,d.properties[t]=n,g.properties[t]=n,f.properties[t]=n,m.properties[t]=n,p.properties[t]=n}}registerOverridePropertyPatternKey(){const e={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};u.patternProperties[L]=e,d.patternProperties[L]=e,g.patternProperties[L]=e,f.patternProperties[L]=e,m.patternProperties[L]=e,p.patternProperties[L]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let i,r;!n||t.disallowConfigurationDefault&&n.source||(i=n.value,r=n.source),s.b0(i)&&(i=t.defaultDefaultValue,r=void 0),s.b0(i)&&(i=S(t.type)),t.default=i,t.defaultValueSource=r}}const v="\\[([^\\]]+)\\]",C=new RegExp(v,"g"),L=`^(${v})+$`,w=new RegExp(L);function y(e){const t=[];if(w.test(e)){let n=C.exec(e);while(n?.length){const i=n[1].trim();i&&t.push(i),n=C.exec(e)}}return(0,i.dM)(t)}function S(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const x=new k;function E(e,t){return e.trim()?w.test(e)?o.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==x.getConfigurationProperties()[e]?o.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==x.getPolicyConfigurations().get(t.policy?.name)?o.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,x.getPolicyConfigurations().get(t.policy?.name)):null:o.kg("config.property.empty","Cannot register an empty property")}h.O.add(c.Configuration,x)},4979:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});class i{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const r=[];function s(e,t,n){t instanceof i||(t=new i(t,[],Boolean(n))),r.push([e,t])}},7778:(e,t,n)=>{"use strict";var i;n.d(t,{_Y:()=>r,u1:()=>o}),function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t}(i||(i={}));const r=o("instantiationService");function s(e,t,n){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n}],t[i.DI_TARGET]=t)}function o(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(t,e,i)};return t.toString=()=>e,i.serviceIds.set(e,t),t}},6223:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var i=n(231),r=n(6374);const s={JSONContribution:"base.contributions.json"};function o(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class a{constructor(){this._onDidChangeSchema=new i.vl,this.schemasById={}}registerSchema(e,t){this.schemasById[o(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const l=new a;r.O.add(s.JSONContribution,l)},458:(e,t,n)=>{"use strict";n.d(t,{rr:()=>Q,$b:()=>Y});n(231);var i=n(8894),r=n(5160),s=n(601),o=n(4396),a=n(1337);function l(...e){switch(e.length){case 1:return(0,a.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,a.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,a.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const h=(0,a.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),c=(0,a.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class u{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw(0,o.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){while(!this._isAtEnd()){this._start=this._current;const e=this._advance();switch(e){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(l("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(l("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(l("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&(this._input.charCodeAt(this._current)===e&&(this._current++,!0))}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,n=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),n=u._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){while(39!==this._peek()&&!this._isAtEnd())this._advance();this._isAtEnd()?this._error(h):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,n=!1;while(1){if(e>=this._input.length)return this._current=e,void this._error(c);const i=this._input.charCodeAt(e);if(t)t=!1;else{if(47===i&&!n){e++;break}91===i?n=!0:92===i?t=!0:93===i&&(n=!1)}e++}while(e=this._input.length}}var d=n(7778);const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",r.zx),g.set("isLinux",r.j9),g.set("isWindows",r.uF),g.set("isWeb",r.HZ),g.set("isMacNative",r.zx&&!r.HZ),g.set("isEdge",r.UP),g.set("isFirefox",r.gm),g.set("isChrome",r.H8),g.set("isSafari",r.nr);const f=Object.prototype.hasOwnProperty,m={regexParsingWithErrorRecovery:!0},p=(0,a.kg)("contextkey.parser.error.emptyString","Empty context key expression"),_=(0,a.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),b=(0,a.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),k=(0,a.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),v=(0,a.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),C=(0,a.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),L=(0,a.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),w=(0,a.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class y{static{this._parseError=new Error}constructor(e=m){this._config=e,this._scanner=new u,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?C:void 0;throw this._parsingErrors.push({message:v,offset:e.offset,lexeme:u.getLexeme(e),additionalInfo:t}),y._parseError}return e}catch(e){if(e!==y._parseError)throw e;return}}else this._parsingErrors.push({message:p,offset:0,lexeme:"",additionalInfo:_})}_expr(){return this._or()}_or(){const e=[this._and()];while(this._matchOne(16)){const t=this._and();e.push(t)}return 1===e.length?e[0]:S.or(...e)}_and(){const e=[this._term()];while(this._matchOne(15)){const t=this._term();e.push(t)}return 1===e.length?e[0]:S.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),E.INSTANCE;case 12:return this._advance(),N.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,k),e?.negate()}case 17:return this._advance(),R.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),S.true();case 12:return this._advance(),S.false();case 0:{this._advance();const e=this._expr();return this._consume(1,k),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const n=e.lexeme,i=n.lastIndexOf("/"),r=i===n.length-1?void 0:this._removeFlagsGY(n.substring(i+1));let s;try{s=new RegExp(n.substring(1,i),r)}catch(t){throw this._errExpectedButGot("REGEX",e)}return V.create(t,s)}switch(e.type){case 10:case 19:{const n=[e.lexeme];this._advance();let i=this._peek(),r=0;for(let t=0;t=0){const s=n.slice(t+1,r),o="i"===n[r+1]?"i":"";try{i=new RegExp(s,o)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===i)throw this._errExpectedButGot("REGEX",e);return V.create(t,i)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,b);const e=this._value();return S.notIn(t,e)}const n=this._peek().type;switch(n){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return S.equals(t,e);switch(e){case"true":return S.has(t);case"false":return S.not(t);default:return S.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return S.notEquals(t,e);switch(e){case"true":return S.not(t);case"false":return S.has(t);default:return S.notEquals(t,e)}}case 5:return this._advance(),P.create(t,this._value());case 6:return this._advance(),z.create(t,this._value());case 7:return this._advance(),B.create(t,this._value());case 8:return this._advance(),F.create(t,this._value());case 13:return this._advance(),S.in(t,this._value());default:return S.has(t)}}case 20:throw this._parsingErrors.push({message:L,offset:e.offset,lexeme:"",additionalInfo:w}),y._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){const i=(0,a.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,u.getLexeme(t)),r=t.offset,s=u.getLexeme(t);return this._parsingErrors.push({message:i,offset:r,lexeme:s,additionalInfo:n}),y._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class S{static false(){return E.INSTANCE}static true(){return N.INSTANCE}static has(e){return I.create(e)}static equals(e,t){return T.create(e,t)}static notEquals(e,t){return M.create(e,t)}static regex(e,t){return V.create(e,t)}static in(e,t){return A.create(e,t)}static notIn(e,t){return D.create(e,t)}static not(e){return R.create(e)}static and(...e){return H.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static{this._parser=new y({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(void 0===e||null===e)return;const t=this._parser.parse(e);return t}}function x(e,t){return e.cmp(t)}class E{static{this.INSTANCE=new E}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return N.INSTANCE}}class N{static{this.INSTANCE=new N}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}class I{static create(e,t=null){const n=g.get(e);return"boolean"===typeof n?n?N.INSTANCE:E.INSTANCE:new I(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"===typeof e?e?N.INSTANCE:E.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this)),this.negated}}class T{static create(e,t,n=null){if("boolean"===typeof t)return t?I.create(e,n):R.create(e,n);const i=g.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?N.INSTANCE:E.INSTANCE}return new T(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=g.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?N.INSTANCE:E.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class A{static create(e,t){return new A(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):"string"===typeof n&&"object"===typeof t&&null!==t&&f.call(t,n)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=D.create(this.key,this.valueKey)),this.negated}}class D{static create(e,t){return new D(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=A.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class M{static create(e,t,n=null){if("boolean"===typeof t)return t?R.create(e,n):I.create(e,n);const i=g.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?E.INSTANCE:N.INSTANCE}return new M(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=g.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?E.INSTANCE:N.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}class R{static create(e,t=null){const n=g.get(e);return"boolean"===typeof n?n?E.INSTANCE:N.INSTANCE:new R(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"===typeof e?e?E.INSTANCE:N.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this)),this.negated}}function O(e,t){if("string"===typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"===typeof e||"number"===typeof e?t(e):E.INSTANCE}class B{static create(e,t,n=null){return O(t,(t=>new B(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,n=null){return O(t,(t=>new F(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class P{static create(e,t,n=null){return O(t,(t=>new P(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))new z(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class V{static create(e,t){return new V(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this)),this.negated}}class W{static create(e){return new W(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function q(e){let t=null;for(let n=0,i=e.length;ne.expr.length)return 1;for(let t=0,n=this.expr.length;t1){const e=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),r=0===i.length,s=U.create(e.expr.map((e=>H.create([e,t],null,n))),null,r);s&&(i.push(s),i.sort(x))}if(1===i.length)return i[0];if(n){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,n){return U._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());while(e.length>1){const t=e.shift(),n=e.shift(),i=[];for(const e of G(t))for(const t of G(n))i.push(H.create([e,t],null,!1));e.unshift(U.create(i,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class j extends I{static{this._info=[]}static all(){return j._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,"object"===typeof n?j._info.push({...n,key:e}):!0!==n&&j._info.push({key:e,description:n,type:null!==t&&void 0!==t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return T.create(this.key,e)}}(0,d.u1)("contextKeyService");function $(e,t){return et?1:0}function K(e,t,n,i){return en?1:ti?1:0}function G(e){return 9===e.type?e.expr:[e]}const Q=(0,d.u1)("logService");var Y;(function(e){e[e["Off"]=0]="Off",e[e["Trace"]=1]="Trace",e[e["Debug"]=2]="Debug",e[e["Info"]=3]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=5]="Error"})(Y||(Y={}));Y.Info;i.jG;function X(e){switch(e){case Y.Trace:return"trace";case Y.Debug:return"debug";case Y.Info:return"info";case Y.Warning:return"warn";case Y.Error:return"error";case Y.Off:return"off"}}new j("logLevel",X(Y.Info))},6374:(e,t,n)=>{"use strict";n.d(t,{O:()=>o});var i=n(9109),r=n(322);class s{constructor(){this.data=new Map}add(e,t){i.ok(r.Kg(e)),i.ok(r.Gv(t)),i.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const o=new s},7732:(e,t,n)=>{"use strict";n.d(t,{buw:()=>A,b1q:()=>T,YtV:()=>F,Ubg:()=>G,IIb:()=>$,pOz:()=>j,whs:()=>q,Stt:()=>U,Hng:()=>H,yLC:()=>_e,KoI:()=>me,uMG:()=>pe,x1A:()=>m});var i=n(9109),r=n(3723),s=n(5476),o=n(231),a=n(6223),l=n(6374),h=n(1337);function c(e){return null!==e&&"object"===typeof e&&"light"in e&&"dark"in e}const u={ColorContribution:"base.contributions.colors"},d="default";class g{constructor(){this._onDidChangeSchema=new o.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,r){const s={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r};this.colorsById[e]=s;const o={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(o.deprecationMessage=r),i&&(o.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",o.patternErrorMessage=h.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[o,{type:"string",const:d,description:h.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n?.defaults){const e=c(n.defaults)?n.defaults[t.type]:n.defaults;return w(e,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(e,t)=>{const n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}}const f=new g;function m(e,t,n,i,r){return f.registerColor(e,t,n,i,r)}function p(e,t){switch(e.op){case 0:return w(e.value,t)?.darken(e.factor);case 1:return w(e.value,t)?.lighten(e.factor);case 2:return w(e.value,t)?.transparent(e.factor);case 3:{const n=w(e.background,t);return n?w(e.value,t)?.makeOpaque(n):w(e.value,t)}case 4:for(const n of e.values){const e=w(n,t);if(e)return e}return;case 6:return w(t.defines(e.if)?e.then:e.else,t);case 5:{const n=w(e.value,t);if(!n)return;const i=w(e.background,t);return i?n.isDarkerThan(i)?s.Q1.getLighterColor(n,i,e.factor).transparent(e.transparency):s.Q1.getDarkerColor(n,i,e.factor).transparent(e.transparency):n.transparent(e.factor*e.transparency)}default:throw(0,i.xb)(e)}}function _(e,t){return{op:0,value:e,factor:t}}function b(e,t){return{op:1,value:e,factor:t}}function k(e,t){return{op:2,value:e,factor:t}}function v(...e){return{op:4,values:e}}function C(e,t,n){return{op:6,if:e,then:t,else:n}}function L(e,t,n,i){return{op:5,value:e,background:t,factor:n,transparency:i}}function w(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?s.Q1.fromHex(e):t.getColor(e):e instanceof s.Q1?e:"object"===typeof e?p(e,t):void 0}l.O.add(u.ColorContribution,f);const y="vscode://schemas/workbench-colors",S=l.O.as(a.F.JSONContribution);S.registerSchema(y,f.getColorSchema());const x=new r.uC((()=>S.notifySchemaChanged(y)),200);f.onDidChangeSchema((()=>{x.isScheduled()||x.schedule()}));const E=m("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},h.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),N=(m("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},h.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),m("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},h.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),m("descriptionForeground",{light:"#717171",dark:k(E,.7),hcDark:k(E,.7),hcLight:k(E,.7)},h.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),m("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},h.kg("iconForeground","The default color for icons in the workbench."))),I=m("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},h.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),T=m("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},h.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),A=m("contrastActiveBorder",{light:null,dark:null,hcDark:I,hcLight:I},h.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),D=(m("selection.background",null,h.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),m("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},h.kg("textLinkForeground","Foreground color for links in text.")),m("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},h.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),m("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Q1.black,hcLight:"#292929"},h.kg("textSeparatorForeground","Color for text separators.")),m("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},h.kg("textPreformatForeground","Foreground color for preformatted text segments.")),m("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},h.kg("textPreformatBackground","Background color for preformatted text segments.")),m("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},h.kg("textBlockQuoteBackground","Background color for block quotes in text.")),m("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Q1.white,hcLight:"#292929"},h.kg("textBlockQuoteBorder","Border color for block quotes in text.")),m("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Q1.black,hcLight:"#F2F2F2"},h.kg("textCodeBlockBackground","Background color for code blocks in text.")),m("sash.hoverBorder",I,h.kg("sashActiveBorder","Border color of active sashes.")),m("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Q1.black,hcLight:"#0F4A85"},h.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),M=(m("badge.foreground",{dark:s.Q1.white,light:"#333",hcDark:s.Q1.white,hcLight:s.Q1.white},h.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),m("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},h.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled."))),R=m("scrollbarSlider.background",{dark:s.Q1.fromHex("#797979").transparent(.4),light:s.Q1.fromHex("#646464").transparent(.4),hcDark:k(T,.6),hcLight:k(T,.4)},h.kg("scrollbarSliderBackground","Scrollbar slider background color.")),O=m("scrollbarSlider.hoverBackground",{dark:s.Q1.fromHex("#646464").transparent(.7),light:s.Q1.fromHex("#646464").transparent(.7),hcDark:k(T,.8),hcLight:k(T,.8)},h.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),B=m("scrollbarSlider.activeBackground",{dark:s.Q1.fromHex("#BFBFBF").transparent(.4),light:s.Q1.fromHex("#000000").transparent(.6),hcDark:T,hcLight:T},h.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),F=(m("progressBar.background",{dark:s.Q1.fromHex("#0E70C0"),light:s.Q1.fromHex("#0E70C0"),hcDark:T,hcLight:T},h.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),m("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("editorBackground","Editor background color."))),P=(m("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Q1.white,hcLight:E},h.kg("editorForeground","Editor default foreground color.")),m("editorStickyScroll.background",F,h.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),m("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),m("editorStickyScroll.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),m("editorStickyScroll.shadow",M,h.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),m("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Q1.white},h.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),z=m("editorWidget.foreground",E,h.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),V=m("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:T,hcLight:T},h.kg("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),W=(m("editorWidget.resizeBorder",null,h.kg("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),m("editorError.background",null,h.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},h.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),q=(m("editorError.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},h.kg("errorBorder","If set, color of double underlines for errors in the editor.")),m("editorWarning.background",null,h.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0)),H=m("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},h.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),U=m("editorWarning.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#FFCC00").transparent(.8),hcLight:s.Q1.fromHex("#FFCC00").transparent(.8)},h.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),j=(m("editorInfo.background",null,h.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},h.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),$=m("editorInfo.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},h.kg("infoBorder","If set, color of double underlines for infos in the editor.")),K=(m("editorHint.foreground",{dark:s.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},h.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),m("editorHint.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},h.kg("hintBorder","If set, color of double underlines for hints in the editor.")),m("editorLink.activeForeground",{dark:"#4E94CE",light:s.Q1.blue,hcDark:s.Q1.cyan,hcLight:"#292929"},h.kg("activeLinkForeground","Color of active links.")),m("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},h.kg("editorSelectionBackground","Color of the editor selection."))),G=(m("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Q1.white},h.kg("editorSelectionForeground","Color of the selected text for high contrast.")),m("editor.inactiveSelectionBackground",{light:k(K,.5),dark:k(K,.5),hcDark:k(K,.7),hcLight:k(K,.5)},h.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.selectionHighlightBackground",{light:L(K,F,.3,.6),dark:L(K,F,.3,.6),hcDark:null,hcLight:null},h.kg("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:A,hcLight:A},h.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),m("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},h.kg("editorFindMatch","Color of the current search match.")),m("editor.findMatchForeground",null,h.kg("editorFindMatchForeground","Text color of the current search match.")),m("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},h.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),Q=(m("editor.findMatchHighlightForeground",null,h.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),m("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},h.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.findMatchBorder",{light:null,dark:null,hcDark:A,hcLight:A},h.kg("editorFindMatchBorder","Border color of the current search match.")),m("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:A,hcLight:A},h.kg("findMatchHighlightBorder","Border color of the other search matches."))),Y=(m("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:k(A,.4),hcLight:k(A,.4)},h.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},h.kg("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorHoverWidget.background",P,h.kg("hoverBackground","Background color of the editor hover."))),X=(m("editorHoverWidget.foreground",z,h.kg("hoverForeground","Foreground color of the editor hover.")),m("editorHoverWidget.border",V,h.kg("hoverBorder","Border color of the editor hover.")),m("editorHoverWidget.statusBarBackground",{dark:b(Y,.2),light:_(Y,.05),hcDark:P,hcLight:P},h.kg("statusBarBackground","Background color of the editor hover status bar.")),m("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Q1.white,hcLight:s.Q1.black},h.kg("editorInlayHintForeground","Foreground color of inline hints"))),Z=m("editorInlayHint.background",{dark:k(D,.1),light:k(D,.1),hcDark:k(s.Q1.white,.1),hcLight:k(D,.1)},h.kg("editorInlayHintBackground","Background color of inline hints")),J=(m("editorInlayHint.typeForeground",X,h.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),m("editorInlayHint.typeBackground",Z,h.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),m("editorInlayHint.parameterForeground",X,h.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),m("editorInlayHint.parameterBackground",Z,h.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),m("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},h.kg("editorLightBulbForeground","The color used for the lightbulb actions icon."))),ee=(m("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},h.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),m("editorLightBulbAi.foreground",J,h.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),m("editor.snippetTabstopHighlightBackground",{dark:new s.Q1(new s.bU(124,124,124,.3)),light:new s.Q1(new s.bU(10,50,100,.2)),hcDark:new s.Q1(new s.bU(124,124,124,.3)),hcLight:new s.Q1(new s.bU(10,50,100,.2))},h.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),m("editor.snippetTabstopHighlightBorder",null,h.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),m("editor.snippetFinalTabstopHighlightBackground",null,h.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),m("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Q1(new s.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},h.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new s.Q1(new s.bU(155,185,85,.2))),te=new s.Q1(new s.bU(255,0,0,.2)),ne=(m("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},h.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},h.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.insertedLineBackground",{dark:ee,light:ee,hcDark:null,hcLight:null},h.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedLineBackground",{dark:te,light:te,hcDark:null,hcLight:null},h.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditorGutter.insertedLineBackground",null,h.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),m("diffEditorGutter.removedLineBackground",null,h.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),m("diffEditorOverview.insertedForeground",null,h.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),m("diffEditorOverview.removedForeground",null,h.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),m("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},h.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),m("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},h.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),m("diffEditor.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("diffEditorBorder","Border color between the two text editors.")),m("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},h.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),m("diffEditor.unchangedRegionBackground","sideBar.background",h.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedRegionForeground","foreground",h.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},h.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),m("widget.shadow",{dark:k(s.Q1.black,.36),light:k(s.Q1.black,.16),hcDark:null,hcLight:null},h.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),ie=(m("widget.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),m("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},h.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"))),re=(m("toolbar.hoverOutline",{dark:null,light:null,hcDark:A,hcLight:A},h.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),m("toolbar.activeBackground",{dark:b(ie,.1),light:_(ie,.1),hcDark:null,hcLight:null},h.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),m("breadcrumb.foreground",k(E,.8),h.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),m("breadcrumb.background",F,h.kg("breadcrumbsBackground","Background color of breadcrumb items.")),m("breadcrumb.focusForeground",{light:_(E,.2),dark:b(E,.1),hcDark:b(E,.1),hcLight:b(E,.1)},h.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),m("breadcrumb.activeSelectionForeground",{light:_(E,.2),dark:b(E,.1),hcDark:b(E,.1),hcLight:b(E,.1)},h.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),m("breadcrumbPicker.background",P,h.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),.5),se=s.Q1.fromHex("#40C8AE").transparent(re),oe=s.Q1.fromHex("#40A6FF").transparent(re),ae=s.Q1.fromHex("#606060").transparent(.4),le=.4,he=1,ce=m("merge.currentHeaderBackground",{dark:se,light:se,hcDark:null,hcLight:null},h.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),ue=(m("merge.currentContentBackground",k(ce,le),h.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.incomingHeaderBackground",{dark:oe,light:oe,hcDark:null,hcLight:null},h.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),de=(m("merge.incomingContentBackground",k(ue,le),h.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.commonHeaderBackground",{dark:ae,light:ae,hcDark:null,hcLight:null},h.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),ge=(m("merge.commonContentBackground",k(de,le),h.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},h.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),fe=(m("editorOverviewRuler.currentContentForeground",{dark:k(ce,he),light:k(ce,he),hcDark:ge,hcLight:ge},h.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.incomingContentForeground",{dark:k(ue,he),light:k(ue,he),hcDark:ge,hcLight:ge},h.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.commonContentForeground",{dark:k(de,he),light:k(de,he),hcDark:ge,hcLight:ge},h.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},h.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",h.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),m("problemsErrorIcon.foreground",W,h.kg("problemsErrorIconForeground","The color used for the problems error icon.")),m("problemsWarningIcon.foreground",H,h.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),m("problemsInfoIcon.foreground",j,h.kg("problemsInfoIconForeground","The color used for the problems info icon.")),m("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},h.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0)),me=(m("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},h.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),m("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},h.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),m("minimap.infoHighlight",{dark:j,light:j,hcDark:$,hcLight:$},h.kg("minimapInfo","Minimap marker color for infos."))),pe=m("minimap.warningHighlight",{dark:H,light:H,hcDark:U,hcLight:U},h.kg("overviewRuleWarning","Minimap marker color for warnings.")),_e=m("minimap.errorHighlight",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},h.kg("minimapError","Minimap marker color for errors.")),be=(m("minimap.background",null,h.kg("minimapBackground","Minimap background color.")),m("minimap.foregroundOpacity",s.Q1.fromHex("#000f"),h.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),m("minimapSlider.background",k(R,.5),h.kg("minimapSliderBackground","Minimap slider background color.")),m("minimapSlider.hoverBackground",k(O,.5),h.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),m("minimapSlider.activeBackground",k(B,.5),h.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),m("charts.foreground",E,h.kg("chartsForeground","The foreground color used in charts.")),m("charts.lines",k(E,.5),h.kg("chartsLines","The color used for horizontal lines in charts.")),m("charts.red",W,h.kg("chartsRed","The red color used in chart visualizations.")),m("charts.blue",j,h.kg("chartsBlue","The blue color used in chart visualizations.")),m("charts.yellow",H,h.kg("chartsYellow","The yellow color used in chart visualizations.")),m("charts.orange",fe,h.kg("chartsOrange","The orange color used in chart visualizations.")),m("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},h.kg("chartsGreen","The green color used in chart visualizations.")),m("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},h.kg("chartsPurple","The purple color used in chart visualizations.")),m("input.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputBoxBackground","Input box background.")),m("input.foreground",E,h.kg("inputBoxForeground","Input box foreground.")),m("input.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("inputBoxBorder","Input box border.")),m("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:T,hcLight:T},h.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields."))),ke=m("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},h.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),ve=m("inputOption.activeBackground",{dark:k(I,.4),light:k(I,.2),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},h.kg("inputOption.activeBackground","Background hover color of options in input fields.")),Ce=m("inputOption.activeForeground",{dark:s.Q1.white,light:s.Q1.black,hcDark:E,hcLight:E},h.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),Le=(m("input.placeholderForeground",{light:k(E,.5),dark:k(E,.5),hcDark:k(E,.7),hcLight:k(E,.7)},h.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),m("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationInfoBackground","Input validation background color for information severity.")),m("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:E},h.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),m("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:T,hcLight:T},h.kg("inputValidationInfoBorder","Input validation border color for information severity.")),m("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),m("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:E},h.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),m("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:T,hcLight:T},h.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),m("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("inputValidationErrorBackground","Input validation background color for error severity.")),m("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:E},h.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),m("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:T,hcLight:T},h.kg("inputValidationErrorBorder","Input validation border color for error severity.")),m("dropdown.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("dropdownBackground","Dropdown background."))),we=(m("dropdown.listBackground",{dark:null,light:null,hcDark:s.Q1.black,hcLight:s.Q1.white},h.kg("dropdownListBackground","Dropdown list background.")),m("dropdown.foreground",{dark:"#F0F0F0",light:E,hcDark:s.Q1.white,hcLight:E},h.kg("dropdownForeground","Dropdown foreground."))),ye=m("dropdown.border",{dark:Le,light:"#CECECE",hcDark:T,hcLight:T},h.kg("dropdownBorder","Dropdown border.")),Se=m("button.foreground",s.Q1.white,h.kg("buttonForeground","Button foreground color.")),xe=(m("button.separator",k(Se,.4),h.kg("buttonSeparator","Button separator color.")),m("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},h.kg("buttonBackground","Button background color."))),Ee=(m("button.hoverBackground",{dark:b(xe,.2),light:_(xe,.2),hcDark:xe,hcLight:xe},h.kg("buttonHoverBackground","Button background color when hovering.")),m("button.border",T,h.kg("buttonBorder","Button border color.")),m("button.secondaryForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:s.Q1.white,hcLight:E},h.kg("buttonSecondaryForeground","Secondary button foreground color.")),m("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Q1.white},h.kg("buttonSecondaryBackground","Secondary button background color."))),Ne=(m("button.secondaryHoverBackground",{dark:b(Ee,.2),light:_(Ee,.2),hcDark:null,hcLight:null},h.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),m("radio.activeForeground",Ce,h.kg("radioActiveForeground","Foreground color of active radio option."))),Ie=(m("radio.activeBackground",ve,h.kg("radioBackground","Background color of active radio option.")),m("radio.activeBorder",be,h.kg("radioActiveBorder","Border color of the active radio option.")),m("radio.inactiveForeground",null,h.kg("radioInactiveForeground","Foreground color of inactive radio option.")),m("radio.inactiveBackground",null,h.kg("radioInactiveBackground","Background color of inactive radio option.")),m("radio.inactiveBorder",{light:k(Ne,.2),dark:k(Ne,.2),hcDark:k(Ne,.4),hcLight:k(Ne,.2)},h.kg("radioInactiveBorder","Border color of the inactive radio option.")),m("radio.inactiveHoverBackground",ke,h.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),m("checkbox.background",Le,h.kg("checkbox.background","Background color of checkbox widget.")),m("checkbox.selectBackground",P,h.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),m("checkbox.foreground",we,h.kg("checkbox.foreground","Foreground color of checkbox widget.")),m("checkbox.border",ye,h.kg("checkbox.border","Border color of checkbox widget.")),m("checkbox.selectBorder",N,h.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),m("keybindingLabel.background",{dark:new s.Q1(new s.bU(128,128,128,.17)),light:new s.Q1(new s.bU(221,221,221,.4)),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},h.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.foreground",{dark:s.Q1.fromHex("#CCCCCC"),light:s.Q1.fromHex("#555555"),hcDark:s.Q1.white,hcLight:E},h.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.border",{dark:new s.Q1(new s.bU(51,51,51,.6)),light:new s.Q1(new s.bU(204,204,204,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:T},h.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.bottomBorder",{dark:new s.Q1(new s.bU(68,68,68,.6)),light:new s.Q1(new s.bU(187,187,187,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:E},h.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),m("list.focusBackground",null,h.kg("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusForeground",null,h.kg("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusOutline",{dark:I,light:I,hcDark:A,hcLight:A},h.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusAndSelectionOutline",null,h.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),m("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),Te=m("list.activeSelectionForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:null,hcLight:null},h.kg("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ae=m("list.activeSelectionIconForeground",null,h.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),De=(m("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveSelectionForeground",null,h.kg("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveSelectionIconForeground",null,h.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveFocusBackground",null,h.kg("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveFocusOutline",null,h.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Q1.white.transparent(.1),hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},h.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),m("list.hoverForeground",null,h.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),m("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},h.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),m("list.dropBetweenBackground",{dark:N,light:N,hcDark:null,hcLight:null},h.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),m("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:I,hcLight:I},h.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree."))),Me=(m("list.focusHighlightForeground",{dark:De,light:C(Ie,De,"#BBE7FF"),hcDark:De,hcLight:De},h.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),m("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},h.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),m("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},h.kg("listErrorForeground","Foreground color of list items containing errors.")),m("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},h.kg("listWarningForeground","Foreground color of list items containing warnings.")),m("listFilterWidget.background",{light:_(P,0),dark:b(P,0),hcDark:P,hcLight:P},h.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),m("listFilterWidget.outline",{dark:s.Q1.transparent,light:s.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},h.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),m("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:T,hcLight:T},h.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),m("listFilterWidget.shadow",ne,h.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),m("list.filterMatchBackground",{dark:G,light:G,hcDark:null,hcLight:null},h.kg("listFilterMatchHighlight","Background color of the filtered match.")),m("list.filterMatchBorder",{dark:Q,light:Q,hcDark:T,hcLight:A},h.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),m("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},h.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),m("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},h.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),Re=(m("tree.inactiveIndentGuidesStroke",k(Me,.4),h.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),m("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},h.kg("tableColumnsBorder","Table border color between columns.")),m("tree.tableOddRowsBackground",{dark:k(E,.04),light:k(E,.04),hcDark:null,hcLight:null},h.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),m("editorActionList.background",P,h.kg("editorActionListBackground","Action List background color.")),m("editorActionList.foreground",z,h.kg("editorActionListForeground","Action List foreground color.")),m("editorActionList.focusForeground",Te,h.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),m("editorActionList.focusBackground",Ie,h.kg("editorActionListFocusBackground","Action List background color for the focused item.")),m("menu.border",{dark:null,light:null,hcDark:T,hcLight:T},h.kg("menuBorder","Border color of menus.")),m("menu.foreground",we,h.kg("menuForeground","Foreground color of menu items.")),m("menu.background",Le,h.kg("menuBackground","Background color of menu items.")),m("menu.selectionForeground",Te,h.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),m("menu.selectionBackground",Ie,h.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),m("menu.selectionBorder",{dark:null,light:null,hcDark:A,hcLight:A},h.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),m("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:T,hcLight:T},h.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),m("quickInput.background",P,h.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),m("quickInput.foreground",z,h.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),m("quickInputTitle.background",{dark:new s.Q1(new s.bU(255,255,255,.105)),light:new s.Q1(new s.bU(0,0,0,.06)),hcDark:"#000000",hcLight:s.Q1.white},h.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),m("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Q1.white,hcLight:"#0F4A85"},h.kg("pickerGroupForeground","Quick picker color for grouping labels.")),m("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Q1.white,hcLight:"#0F4A85"},h.kg("pickerGroupBorder","Quick picker color for grouping borders.")),m("quickInput.list.focusBackground",null,"",void 0,h.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")));m("quickInputList.focusForeground",Te,h.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),m("quickInputList.focusIconForeground",Ae,h.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),m("quickInputList.focusBackground",{dark:v(Re,Ie),light:v(Re,Ie),hcDark:null,hcLight:null},h.kg("quickInput.listFocusBackground","Quick picker background color for the focused item.")),m("search.resultsInfoForeground",{light:E,dark:k(E,.65),hcDark:E,hcLight:E},h.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),m("searchEditor.findMatchBackground",{light:k(G,.66),dark:k(G,.66),hcDark:G,hcLight:G},h.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),m("searchEditor.findMatchBorder",{light:k(Q,.66),dark:k(Q,.66),hcDark:Q,hcLight:Q},h.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},3711:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>l,zy:()=>g,Yf:()=>h});var i,r=n(231),s=n(8894),o=n(7778),a=n(6374);(function(e){e["DARK"]="dark",e["LIGHT"]="light",e["HIGH_CONTRAST_DARK"]="hcDark",e["HIGH_CONTRAST_LIGHT"]="hcLight"})(i||(i={}));const l=(0,o.u1)("themeService");function h(e){return{id:e}}const c={ThemingContribution:"base.contributions.theming"};class u{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new r.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,s.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}}const d=new u;function g(e){return d.onColorThemeChange(e)}a.O.add(c.ThemingContribution,d);s.jG},5890:(e,t,n)=>{var i={"./simpleWorker":1352,"./simpleWorker.js":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker.js":1352};function r(e){return Promise.resolve().then((()=>{if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var r=i[e];return n(r)}))}r.keys=()=>Object.keys(i),r.id=5890,e.exports=r},9204:(e,t,n)=>{var i={"./editorBaseApi":[215],"./editorBaseApi.js":[215],"./editorSimpleWorker":[5926],"./editorSimpleWorker.js":[5926],"./editorWorker":[4117,792],"./editorWorker.js":[4117,792],"./editorWorkerHost":[2899],"./editorWorkerHost.js":[2899],"./findSectionHeaders":[6198],"./findSectionHeaders.js":[6198],"./getIconClasses":[2340,792],"./getIconClasses.js":[2340,792],"./languageFeatureDebounce":[2454,792],"./languageFeatureDebounce.js":[2454,792],"./languageFeatures":[2847,792],"./languageFeatures.js":[2847,792],"./languageFeaturesService":[1369,792],"./languageFeaturesService.js":[1369,792],"./languageService":[2657,792],"./languageService.js":[2657,792],"./languagesAssociations":[5911,792],"./languagesAssociations.js":[5911,792],"./languagesRegistry":[7024,792],"./languagesRegistry.js":[7024,792],"./markerDecorations":[3637,792],"./markerDecorations.js":[3637,792],"./markerDecorationsService":[9420,792],"./markerDecorationsService.js":[9420,792],"./model":[9361,792],"./model.js":[9361,792],"./modelService":[2713,792],"./modelService.js":[2713,792],"./resolverService":[4037,792],"./resolverService.js":[4037,792],"./semanticTokensDto":[3699,792],"./semanticTokensDto.js":[3699,792],"./semanticTokensProviderStyling":[4686,792],"./semanticTokensProviderStyling.js":[4686,792],"./semanticTokensStyling":[7284,792],"./semanticTokensStyling.js":[7284,792],"./semanticTokensStylingService":[2205,792],"./semanticTokensStylingService.js":[2205,792],"./textModelSync/textModelSync.impl":[6294],"./textModelSync/textModelSync.impl.js":[6294],"./textModelSync/textModelSync.protocol":[4977,792],"./textModelSync/textModelSync.protocol.js":[4977,792],"./textResourceConfiguration":[6151,792],"./textResourceConfiguration.js":[6151,792],"./treeSitterParserService":[5863,792],"./treeSitterParserService.js":[5863,792],"./treeViewsDnd":[1210,792],"./treeViewsDnd.js":[1210,792],"./treeViewsDndService":[5231,792],"./treeViewsDndService.js":[5231,792],"./unicodeTextModelHighlighter":[7412],"./unicodeTextModelHighlighter.js":[7412],"monaco-editor/esm/vs/editor/common/services/editorBaseApi":[215],"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":[215],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":[5926],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":[5926],"monaco-editor/esm/vs/editor/common/services/editorWorker":[4117,792],"monaco-editor/esm/vs/editor/common/services/editorWorker.js":[4117,792],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":[2899],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":[2899],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":[6198],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":[6198],"monaco-editor/esm/vs/editor/common/services/getIconClasses":[2340,792],"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":[2340,792],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":[2454,792],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":[2454,792],"monaco-editor/esm/vs/editor/common/services/languageFeatures":[2847,792],"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":[2847,792],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":[1369,792],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":[1369,792],"monaco-editor/esm/vs/editor/common/services/languageService":[2657,792],"monaco-editor/esm/vs/editor/common/services/languageService.js":[2657,792],"monaco-editor/esm/vs/editor/common/services/languagesAssociations":[5911,792],"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":[5911,792],"monaco-editor/esm/vs/editor/common/services/languagesRegistry":[7024,792],"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":[7024,792],"monaco-editor/esm/vs/editor/common/services/markerDecorations":[3637,792],"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":[3637,792],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":[9420,792],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":[9420,792],"monaco-editor/esm/vs/editor/common/services/model":[9361,792],"monaco-editor/esm/vs/editor/common/services/model.js":[9361,792],"monaco-editor/esm/vs/editor/common/services/modelService":[2713,792],"monaco-editor/esm/vs/editor/common/services/modelService.js":[2713,792],"monaco-editor/esm/vs/editor/common/services/resolverService":[4037,792],"monaco-editor/esm/vs/editor/common/services/resolverService.js":[4037,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":[3699,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":[3699,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":[4686,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":[4686,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":[7284,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":[7284,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":[2205,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":[2205,792],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":[6294],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":[6294],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":[4977,792],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":[4977,792],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":[6151,792],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":[6151,792],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":[5863,792],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":[5863,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":[1210,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":[1210,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":[5231,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":[5231,792],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":[7412],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":[7412]};function r(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(r)))}r.keys=()=>Object.keys(i),r.id=9204,e.exports=r},7614:(e,t,n)=>{var i={"./editorBaseApi":215,"./editorBaseApi.js":215,"./editorSimpleWorker":5926,"./editorSimpleWorker.js":5926,"./editorWorker":4117,"./editorWorker.js":4117,"./editorWorkerHost":2899,"./editorWorkerHost.js":2899,"./findSectionHeaders":6198,"./findSectionHeaders.js":6198,"./getIconClasses":2340,"./getIconClasses.js":2340,"./languageFeatureDebounce":2454,"./languageFeatureDebounce.js":2454,"./languageFeatures":2847,"./languageFeatures.js":2847,"./languageFeaturesService":1369,"./languageFeaturesService.js":1369,"./languageService":2657,"./languageService.js":2657,"./languagesAssociations":5911,"./languagesAssociations.js":5911,"./languagesRegistry":7024,"./languagesRegistry.js":7024,"./markerDecorations":3637,"./markerDecorations.js":3637,"./markerDecorationsService":9420,"./markerDecorationsService.js":9420,"./model":9361,"./model.js":9361,"./modelService":2713,"./modelService.js":2713,"./resolverService":4037,"./resolverService.js":4037,"./semanticTokensDto":3699,"./semanticTokensDto.js":3699,"./semanticTokensProviderStyling":4686,"./semanticTokensProviderStyling.js":4686,"./semanticTokensStyling":7284,"./semanticTokensStyling.js":7284,"./semanticTokensStylingService":2205,"./semanticTokensStylingService.js":2205,"./textModelSync/textModelSync.impl":6294,"./textModelSync/textModelSync.impl.js":6294,"./textModelSync/textModelSync.protocol":4977,"./textModelSync/textModelSync.protocol.js":4977,"./textResourceConfiguration":6151,"./textResourceConfiguration.js":6151,"./treeSitterParserService":5863,"./treeSitterParserService.js":5863,"./treeViewsDnd":1210,"./treeViewsDnd.js":1210,"./treeViewsDndService":5231,"./treeViewsDndService.js":5231,"./unicodeTextModelHighlighter":7412,"./unicodeTextModelHighlighter.js":7412,"monaco-editor/esm/vs/editor/common/services/editorBaseApi":215,"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":215,"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":5926,"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":5926,"monaco-editor/esm/vs/editor/common/services/editorWorker":4117,"monaco-editor/esm/vs/editor/common/services/editorWorker.js":4117,"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":2899,"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":2899,"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":6198,"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":6198,"monaco-editor/esm/vs/editor/common/services/getIconClasses":2340,"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":2340,"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":2454,"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":2454,"monaco-editor/esm/vs/editor/common/services/languageFeatures":2847,"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":2847,"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":1369,"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":1369,"monaco-editor/esm/vs/editor/common/services/languageService":2657,"monaco-editor/esm/vs/editor/common/services/languageService.js":2657,"monaco-editor/esm/vs/editor/common/services/languagesAssociations":5911,"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":5911,"monaco-editor/esm/vs/editor/common/services/languagesRegistry":7024,"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":7024,"monaco-editor/esm/vs/editor/common/services/markerDecorations":3637,"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":3637,"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":9420,"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":9420,"monaco-editor/esm/vs/editor/common/services/model":9361,"monaco-editor/esm/vs/editor/common/services/model.js":9361,"monaco-editor/esm/vs/editor/common/services/modelService":2713,"monaco-editor/esm/vs/editor/common/services/modelService.js":2713,"monaco-editor/esm/vs/editor/common/services/resolverService":4037,"monaco-editor/esm/vs/editor/common/services/resolverService.js":4037,"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":3699,"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":3699,"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":4686,"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":4686,"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":7284,"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":7284,"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":2205,"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":2205,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":6294,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":6294,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":4977,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":4977,"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":6151,"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":6151,"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":5863,"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":5863,"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":1210,"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":1210,"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":5231,"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":5231,"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":7412,"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":7412};function r(e){var t=s(e);return n(t)}function s(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=s,e.exports=r,r.id=7614}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}(()=>{n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{n.e=()=>Promise.resolve()})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();(()=>{"use strict";var e=n(1352),t=n(5926),i=n(2899);let r=!1;function s(n){if(r)return;r=!0;const s=new e.SimpleWorkerServer((e=>{globalThis.postMessage(e)}),(e=>new t.EditorSimpleWorker(i.EditorWorkerHost.getChannel(e),n)));globalThis.onmessage=e=>{s.onmessage(e.data)}}globalThis.onmessage=e=>{r||s(null)}})()})(); \ No newline at end of file diff --git a/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.68bb21d0.woff b/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.68bb21d0.woff deleted file mode 100644 index a815cf8..0000000 Binary files a/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.68bb21d0.woff and /dev/null differ diff --git a/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.fa21e2c7.woff b/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.fa21e2c7.woff new file mode 100644 index 0000000..5a7727f Binary files /dev/null and b/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.fa21e2c7.woff differ diff --git a/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.48af7707.woff b/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.48af7707.woff deleted file mode 100644 index d39bb52..0000000 Binary files a/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.48af7707.woff and /dev/null differ diff --git a/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.4dc33a1e.woff b/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.4dc33a1e.woff new file mode 100644 index 0000000..d3bf564 Binary files /dev/null and b/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.4dc33a1e.woff differ diff --git a/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.7b05c22e.woff b/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.7b05c22e.woff new file mode 100644 index 0000000..0b8d1c3 Binary files /dev/null and b/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.7b05c22e.woff differ diff --git a/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.c2f7ab22.woff b/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.c2f7ab22.woff deleted file mode 100644 index 36979ae..0000000 Binary files a/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.c2f7ab22.woff and /dev/null differ diff --git a/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.77ecb942.woff b/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.77ecb942.woff deleted file mode 100644 index db0012d..0000000 Binary files a/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.77ecb942.woff and /dev/null differ diff --git a/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.87f3a1cb.woff b/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.87f3a1cb.woff new file mode 100644 index 0000000..d5096a0 Binary files /dev/null and b/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.87f3a1cb.woff differ diff --git a/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.f5677eb2.woff b/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.f5677eb2.woff deleted file mode 100644 index 04cbe94..0000000 Binary files a/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.f5677eb2.woff and /dev/null differ diff --git a/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.fe849ef5.woff b/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.fe849ef5.woff new file mode 100644 index 0000000..ce9d3a9 Binary files /dev/null and b/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.fe849ef5.woff differ diff --git a/fonts/KFOmCnqEu92Fr1Mu4mxM.676b7653.woff b/fonts/KFOmCnqEu92Fr1Mu4mxM.676b7653.woff new file mode 100644 index 0000000..df6f861 Binary files /dev/null and b/fonts/KFOmCnqEu92Fr1Mu4mxM.676b7653.woff differ diff --git a/fonts/KFOmCnqEu92Fr1Mu4mxM.f1e2a767.woff b/fonts/KFOmCnqEu92Fr1Mu4mxM.f1e2a767.woff deleted file mode 100644 index 9eaa94f..0000000 Binary files a/fonts/KFOmCnqEu92Fr1Mu4mxM.f1e2a767.woff and /dev/null differ diff --git a/fonts/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWHSSmlN.1553cbe5.woff2 b/fonts/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWHSSmlN.1553cbe5.woff2 deleted file mode 100644 index 58b4c95..0000000 Binary files a/fonts/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWHSSmlN.1553cbe5.woff2 and /dev/null differ diff --git a/fonts/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWHSSmlN.73994b0a.woff2 b/fonts/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWHSSmlN.73994b0a.woff2 new file mode 100644 index 0000000..78d2581 Binary files /dev/null and b/fonts/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWHSSmlN.73994b0a.woff2 differ diff --git a/fonts/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCN.57189e59.woff b/fonts/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCN.57189e59.woff deleted file mode 100644 index 447d99d..0000000 Binary files a/fonts/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCN.57189e59.woff and /dev/null differ diff --git a/fonts/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCN.f928a497.woff b/fonts/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCN.f928a497.woff new file mode 100644 index 0000000..cfbc2fe Binary files /dev/null and b/fonts/gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCN.f928a497.woff differ diff --git a/index.html b/index.html index 4dc6c8c..3497f96 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Typesense-Dashboard
\ No newline at end of file +Typesense-Dashboard
\ No newline at end of file diff --git a/js/110.caa8adf3.js b/js/110.dfba5247.js similarity index 95% rename from js/110.caa8adf3.js rename to js/110.dfba5247.js index cc2b383..936029f 100644 --- a/js/110.caa8adf3.js +++ b/js/110.dfba5247.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[110],{84950:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var o=s(61758),n=s(58790);const i={class:"row justify-between q-mb-md"},r={class:"text-h5"},a={key:0},l={class:"row q-mb-md bg-primary text-white justify-between"},d={class:"row col-auto"},c={key:0},u={key:1};function m(e,t,s,m,h,p){const g=(0,o.g2)("q-icon"),y=(0,o.g2)("q-btn"),v=(0,o.g2)("monaco-editor"),b=(0,o.g2)("q-banner"),f=(0,o.g2)("q-select"),k=(0,o.g2)("q-page");return(0,o.uX)(),(0,o.Wv)(k,{padding:"",class:"column"},{default:(0,o.k6)((()=>{var s;return[(0,o.Lk)("div",i,[(0,o.Lk)("div",r,[(0,o.bF)(g,{size:"md",name:"sym_s_library_add"}),(0,o.eW)(" Add Documents to "+(0,n.v_)(null===(s=e.$store.state.node.currentCollection)||void 0===s?void 0:s.name),1)]),(0,o.bF)(y,{unelevated:"",onClick:t[0]||(t[0]=t=>e.importFile()),disable:!e.$q.platform.is.electron,icon:"sym_s_attach_file"},{default:(0,o.k6)((()=>[t[5]||(t[5]=(0,o.eW)(" Import from file ")),e.$q.platform.is.electron?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("span",a," (only desktop version)"))])),_:1},8,["disable"])]),(0,o.bF)(v,{modelValue:e.documentsJson,"onUpdate:modelValue":t[1]||(t[1]=t=>e.documentsJson=t),style:{"min-height":"200px"}},null,8,["modelValue"]),e.jsonError?((0,o.uX)(),(0,o.Wv)(b,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,o.k6)((()=>[(0,o.eW)(" Invalid Format: "+(0,n.v_)(e.jsonError),1)])),_:1})):(0,o.Q3)("",!0),(0,o.Lk)("div",l,[(0,o.bF)(y,{unelevated:"",size:"md",padding:"sm lg",color:"primary",onClick:t[2]||(t[2]=t=>e.addEmptyDocument())},{default:(0,o.k6)((()=>t[6]||(t[6]=[(0,o.eW)("Add empty Document")]))),_:1}),(0,o.Lk)("div",d,[(0,o.bF)(f,{dark:"",modelValue:e.action,"onUpdate:modelValue":t[3]||(t[3]=t=>e.action=t),"bottom-slots":"",label:"Action mode",filled:"",style:{width:"300px"},options:e.actionOptions},{hint:(0,o.k6)((()=>[(0,o.Lk)("div",null,(0,n.v_)(e.actionDescriptions[e.action]),1)])),_:1},8,["modelValue","options"]),(0,o.bF)(y,{unelevated:"",size:"md",padding:"sm xl",color:"primary",onClick:t[4]||(t[4]=t=>e.importDocuments()),disable:!!e.jsonError},{default:(0,o.k6)((()=>t[7]||(t[7]=[(0,o.eW)("Import")]))),_:1},8,["disable"])])]),(0,o.Lk)("div",null,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.results,((e,t)=>((0,o.uX)(),(0,o.Wv)(b,{key:t,class:(0,n.C4)(["text-white",{"bg-green":e.success,"bg-red":e.error}])},{default:(0,o.k6)((()=>[(0,o.eW)((0,n.v_)(t)+": ",1),e.success?((0,o.uX)(),(0,o.CE)("span",c,(0,n.v_)(e.success),1)):((0,o.uX)(),(0,o.CE)("span",u,(0,n.v_)(e.error),1))])),_:2},1032,["class"])))),128))])]})),_:1})}var h=s(74701),p=function(e,t,s,o){function n(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,i){function r(e){try{l(o.next(e))}catch(t){i(t)}}function a(e){try{l(o["throw"](e))}catch(t){i(t)}}function l(e){e.done?s(e.value):n(e.value).then(r,a)}l((o=o.apply(e,t||[])).next())}))};const g=(0,o.pM)({name:"Document",components:{MonacoEditor:h.A},data(){return{jsonError:null,documents:[],results:[],action:"upsert",actionOptions:["create","upsert","update"],actionDescriptions:{create:"Create a new document. Fails if id exists.",upsert:"Create a new document or update an existing document.",update:"Update an existing document. Partial document allowed."}}},computed:{documentsJson:{get(){return JSON.stringify(this.documents,null,2)},set(e){try{this.documents=JSON.parse(e),this.jsonError=null}catch(t){this.jsonError=t.message}}},currentCollection(){return this.$store.state.node.currentCollection},documentsToEdit(){return this.$store.state.node.documentsToEdit}},methods:{importFile(){var e;return p(this,void 0,void 0,(function*(){this.results=[];try{this.$q.loading.show({message:"Uploading. Please wait...",boxClass:"bg-grey-2 text-grey-9",spinnerColor:"primary"});let t=yield this.$store.getters["node/api"].importFile(null===(e=this.currentCollection)||void 0===e?void 0:e.name,this.action);Array.isArray(t)||(t=[{error:t}]),this.results=t}catch(t){this.results=[{error:t.message}]}this.$q.loading.hide()}))},importDocuments(){return p(this,void 0,void 0,(function*(){this.results=[];try{this.$q.loading.show({message:"Uploading. Please wait...",boxClass:"bg-grey-2 text-grey-9",spinnerColor:"primary"}),this.results=yield this.$store.dispatch("node/importDocuments",{action:this.action,documents:JSON.parse(JSON.stringify(this.documents))})}catch(e){this.results=[{error:e.message}]}this.$q.loading.hide()}))},addEmptyDocument(){let e={};this.currentCollection&&this.currentCollection.fields&&(e=this.currentCollection.fields.reduce(((e,t)=>(e[t.name]=t.type.includes("[]")?[]:t.type.includes("string")?"":!t.type.includes("bool")&&0,e)),{})),this.documents.push(e)}},watch:{currentCollection:{handler(){this.documents=[],this.addEmptyDocument()},immediate:!0},documentsToEdit:{handler(){this.documentsToEdit&&this.documentsToEdit.length>0&&(this.documents=this.$store.state.node.documentsToEdit||[],this.action="upsert",this.$store.commit("node/setDocumentsToEdit",[]))},immediate:!0}}});var y=s(12807),v=s(77716),b=s(50492),f=s(1693),k=s(46868),C=s(75848),w=s(98582),E=s.n(w);const _=(0,y.A)(g,[["render",m]]),x=_;E()(g,"components",{QPage:v.A,QIcon:b.A,QBtn:f.A,QBanner:k.A,QSelect:C.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[110],{84950:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var o=s(61758),n=s(58790);const i={class:"row justify-between q-mb-md"},r={class:"text-h5"},a={key:0},l={class:"row q-mb-md bg-primary text-white justify-between"},d={class:"row col-auto"},c={key:0},u={key:1};function m(e,t,s,m,h,p){const g=(0,o.g2)("q-icon"),y=(0,o.g2)("q-btn"),v=(0,o.g2)("monaco-editor"),b=(0,o.g2)("q-banner"),f=(0,o.g2)("q-select"),k=(0,o.g2)("q-page");return(0,o.uX)(),(0,o.Wv)(k,{padding:"",class:"column"},{default:(0,o.k6)((()=>{var s;return[(0,o.Lk)("div",i,[(0,o.Lk)("div",r,[(0,o.bF)(g,{size:"md",name:"sym_s_library_add"}),(0,o.eW)(" Add Documents to "+(0,n.v_)(null===(s=e.$store.state.node.currentCollection)||void 0===s?void 0:s.name),1)]),(0,o.bF)(y,{unelevated:"",onClick:t[0]||(t[0]=t=>e.importFile()),disable:!e.$q.platform.is.electron,icon:"sym_s_attach_file"},{default:(0,o.k6)((()=>[t[5]||(t[5]=(0,o.eW)(" Import from file ")),e.$q.platform.is.electron?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("span",a," (only desktop version)"))])),_:1},8,["disable"])]),(0,o.bF)(v,{modelValue:e.documentsJson,"onUpdate:modelValue":t[1]||(t[1]=t=>e.documentsJson=t),style:{"min-height":"200px"}},null,8,["modelValue"]),e.jsonError?((0,o.uX)(),(0,o.Wv)(b,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,o.k6)((()=>[(0,o.eW)(" Invalid Format: "+(0,n.v_)(e.jsonError),1)])),_:1})):(0,o.Q3)("",!0),(0,o.Lk)("div",l,[(0,o.bF)(y,{unelevated:"",size:"md",padding:"sm lg",color:"primary",onClick:t[2]||(t[2]=t=>e.addEmptyDocument())},{default:(0,o.k6)((()=>t[6]||(t[6]=[(0,o.eW)("Add empty Document")]))),_:1}),(0,o.Lk)("div",d,[(0,o.bF)(f,{dark:"",modelValue:e.action,"onUpdate:modelValue":t[3]||(t[3]=t=>e.action=t),"bottom-slots":"",label:"Action mode",filled:"",style:{width:"300px"},options:e.actionOptions},{hint:(0,o.k6)((()=>[(0,o.Lk)("div",null,(0,n.v_)(e.actionDescriptions[e.action]),1)])),_:1},8,["modelValue","options"]),(0,o.bF)(y,{unelevated:"",size:"md",padding:"sm xl",color:"primary",onClick:t[4]||(t[4]=t=>e.importDocuments()),disable:!!e.jsonError},{default:(0,o.k6)((()=>t[7]||(t[7]=[(0,o.eW)("Import")]))),_:1},8,["disable"])])]),(0,o.Lk)("div",null,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.results,((e,t)=>((0,o.uX)(),(0,o.Wv)(b,{key:t,class:(0,n.C4)(["text-white",{"bg-green":e.success,"bg-red":e.error}])},{default:(0,o.k6)((()=>[(0,o.eW)((0,n.v_)(t)+": ",1),e.success?((0,o.uX)(),(0,o.CE)("span",c,(0,n.v_)(e.success),1)):((0,o.uX)(),(0,o.CE)("span",u,(0,n.v_)(e.error),1))])),_:2},1032,["class"])))),128))])]})),_:1})}var h=s(74701),p=function(e,t,s,o){function n(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,i){function r(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?s(e.value):n(e.value).then(r,a)}l((o=o.apply(e,t||[])).next())}))};const g=(0,o.pM)({name:"Document",components:{MonacoEditor:h.A},data(){return{jsonError:null,documents:[],results:[],action:"upsert",actionOptions:["create","upsert","update"],actionDescriptions:{create:"Create a new document. Fails if id exists.",upsert:"Create a new document or update an existing document.",update:"Update an existing document. Partial document allowed."}}},computed:{documentsJson:{get(){return JSON.stringify(this.documents,null,2)},set(e){try{this.documents=JSON.parse(e),this.jsonError=null}catch(e){this.jsonError=e.message}}},currentCollection(){return this.$store.state.node.currentCollection},documentsToEdit(){return this.$store.state.node.documentsToEdit}},methods:{importFile(){var e;return p(this,void 0,void 0,(function*(){this.results=[];try{this.$q.loading.show({message:"Uploading. Please wait...",boxClass:"bg-grey-2 text-grey-9",spinnerColor:"primary"});let t=yield this.$store.getters["node/api"].importFile(null===(e=this.currentCollection)||void 0===e?void 0:e.name,this.action);Array.isArray(t)||(t=[{error:t}]),this.results=t}catch(e){this.results=[{error:e.message}]}this.$q.loading.hide()}))},importDocuments(){return p(this,void 0,void 0,(function*(){this.results=[];try{this.$q.loading.show({message:"Uploading. Please wait...",boxClass:"bg-grey-2 text-grey-9",spinnerColor:"primary"}),this.results=yield this.$store.dispatch("node/importDocuments",{action:this.action,documents:JSON.parse(JSON.stringify(this.documents))})}catch(e){this.results=[{error:e.message}]}this.$q.loading.hide()}))},addEmptyDocument(){let e={};this.currentCollection&&this.currentCollection.fields&&(e=this.currentCollection.fields.reduce(((e,t)=>(e[t.name]=t.type.includes("[]")?[]:t.type.includes("string")?"":!t.type.includes("bool")&&0,e)),{})),this.documents.push(e)}},watch:{currentCollection:{handler(){this.documents=[],this.addEmptyDocument()},immediate:!0},documentsToEdit:{handler(){this.documentsToEdit&&this.documentsToEdit.length>0&&(this.documents=this.$store.state.node.documentsToEdit||[],this.action="upsert",this.$store.commit("node/setDocumentsToEdit",[]))},immediate:!0}}});var y=s(12807),v=s(77716),b=s(50492),f=s(1693),k=s(46868),C=s(75848),w=s(98582),E=s.n(w);const _=(0,y.A)(g,[["render",m]]),x=_;E()(g,"components",{QPage:v.A,QIcon:b.A,QBtn:f.A,QBanner:k.A,QSelect:C.A})}}]); \ No newline at end of file diff --git a/js/218.f037e902.js b/js/218.30755518.js similarity index 100% rename from js/218.f037e902.js rename to js/218.30755518.js diff --git a/js/233.d6d19e9f.js b/js/233.1237cbcf.js similarity index 97% rename from js/233.d6d19e9f.js rename to js/233.1237cbcf.js index 22fcbd5..c8ba888 100644 --- a/js/233.d6d19e9f.js +++ b/js/233.1237cbcf.js @@ -1 +1 @@ -(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[233],{8537:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_e});var n=s(61758);function i(e,t,s,i,r,a){const l=(0,n.g2)("q-tab"),o=(0,n.g2)("q-tabs"),c=(0,n.g2)("q-separator"),u=(0,n.g2)("search-instant-search"),d=(0,n.g2)("q-tab-panel"),h=(0,n.g2)("search-json"),m=(0,n.g2)("q-tab-panels"),p=(0,n.g2)("q-page");return(0,n.uX)(),(0,n.Wv)(p,{padding:""},{default:(0,n.k6)((()=>[(0,n.bF)(o,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),dense:"",class:"bg-primary text-white",align:"justify","narrow-indicator":""},{default:(0,n.k6)((()=>[(0,n.bF)(l,{name:"form",label:"InstantSearch Mode"}),(0,n.bF)(l,{name:"json",label:"JSON Mode"})])),_:1},8,["modelValue"]),(0,n.bF)(c),(0,n.bF)(m,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),animated:"","keep-alive":""},{default:(0,n.k6)((()=>[(0,n.bF)(d,{name:"form"},{default:(0,n.k6)((()=>[(0,n.bF)(u)])),_:1}),(0,n.bF)(d,{name:"json",class:"q-pa-none"},{default:(0,n.k6)((()=>[(0,n.bF)(h)])),_:1})])),_:1},8,["modelValue"])])),_:1})}var r=s(58790);const a={class:"row"},l={class:"col-9"},o={class:"col-3"},c={class:"q-mt-md"},u={key:1,class:"ais-Hits q-mt-md"},d={class:"ais-Hits-list"},h={key:2,class:"text-h5 q-mt-md"},m={key:3};function p(e,t,s,i,p,b){const g=(0,n.g2)("monaco-editor"),f=(0,n.g2)("q-item-label"),y=(0,n.g2)("q-item-section"),v=(0,n.g2)("q-item"),k=(0,n.g2)("q-list"),C=(0,n.g2)("q-scroll-area"),_=(0,n.g2)("q-banner"),F=(0,n.g2)("q-btn"),q=(0,n.g2)("search-result-item"),S=(0,n.gN)("ripple");return(0,n.uX)(),(0,n.CE)(n.FK,null,[(0,n.Lk)("div",a,[(0,n.Lk)("div",l,[(0,n.bF)(g,{modelValue:e.searchParametersJson,"onUpdate:modelValue":t[0]||(t[0]=t=>e.searchParametersJson=t),style:{height:"30vh","min-height":"200px"}},null,8,["modelValue"])]),(0,n.Lk)("div",o,[(0,n.bF)(C,{style:{height:"100%"}},{default:(0,n.k6)((()=>[(0,n.bF)(k,{bordered:"",separator:"",dense:""},{default:(0,n.k6)((()=>[(0,n.bF)(f,{header:""},{default:(0,n.k6)((()=>t[4]||(t[4]=[(0,n.eW)("History")]))),_:1}),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.history,(t=>(0,n.bo)(((0,n.uX)(),(0,n.Wv)(v,{clickable:"",key:t,title:t,onClick:s=>e.searchParametersJson=t},{default:(0,n.k6)((()=>[(0,n.bF)(y,null,{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(t.slice(0,60)),1)])),_:2},1024)])),_:2},1032,["title","onClick"])),[[S]]))),128))])),_:1})])),_:1})])]),e.jsonError?((0,n.uX)(),(0,n.Wv)(_,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,n.k6)((()=>[(0,n.eW)(" Invalid Format: "+(0,r.v_)(e.jsonError),1)])),_:1})):(0,n.Q3)("",!0),(0,n.Lk)("div",c,[(0,n.bF)(F,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!!e.jsonError,onClick:t[1]||(t[1]=t=>e.search())},{default:(0,n.k6)((()=>t[5]||(t[5]=[(0,n.eW)("Run Query")]))),_:1},8,["disable"]),(0,n.bF)(F,{size:"md",padding:"sm lg",unelevated:"",color:"accent",class:"q-ml-sm",disable:!e.results||!e.results.hits,onClick:t[2]||(t[2]=t=>e.exportHits())},{default:(0,n.k6)((()=>t[6]||(t[6]=[(0,n.eW)("Export Hits")]))),_:1},8,["disable"]),(0,n.bF)(F,{size:"md",padding:"sm lg",unelevated:"",color:"accent",class:"q-ml-sm",disable:!e.results,onClick:t[3]||(t[3]=t=>e.exportResults())},{default:(0,n.k6)((()=>t[7]||(t[7]=[(0,n.eW)("Export Raw Results")]))),_:1},8,["disable"])]),e.hits?((0,n.uX)(),(0,n.CE)("div",u,[(0,n.Lk)("ol",d,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.hits,(e=>((0,n.uX)(),(0,n.CE)("li",{class:"ais-Hits-item",key:e.id},[(0,n.bF)(q,{item:e},null,8,["item"])])))),128))])])):(0,n.Q3)("",!0),e.results&&e.results.hits&&0===e.results.hits.length?((0,n.uX)(),(0,n.CE)("div",h," No match found ")):(0,n.Q3)("",!0),e.results&&!e.results.hits?((0,n.uX)(),(0,n.CE)("pre",m," "+(0,r.v_)(e.resultsJson)+"\n ",1)):(0,n.Q3)("",!0)],64)}var b=s(74701);const g={key:0,class:"column no-wrap search-result-item"},f={key:0},y={key:0,class:"array-field"},v=["innerHTML"],k={key:1},C={key:0},_={key:0},F={key:1};function q(e,t,s,i,a,l){const o=(0,n.g2)("q-item-label"),c=(0,n.g2)("ais-highlight"),u=(0,n.g2)("q-img"),d=(0,n.g2)("q-item-section"),h=(0,n.g2)("q-btn"),m=(0,n.g2)("q-item"),p=(0,n.g2)("q-separator"),b=(0,n.g2)("q-list"),q=(0,n.g2)("q-space");return e.currentCollection?((0,n.uX)(),(0,n.CE)("div",g,[(0,n.bF)(b,{dense:""},{default:(0,n.k6)((()=>[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.currentCollection.fields,(t=>((0,n.uX)(),(0,n.Wv)(m,{key:t.name},{default:(0,n.k6)((()=>[(0,n.bF)(d,{side:"",class:"q-mt-sm text-body2"},{default:(0,n.k6)((()=>[(0,n.bF)(o,{caption:""},{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(t.name)+" ",1),e.item&&Array.isArray(e.item[t.name])?((0,n.uX)(),(0,n.CE)("span",f,"["+(0,r.v_)(e.item[t.name].length)+"]",1)):(0,n.Q3)("",!0)])),_:2},1024),(0,n.bF)(o,{class:"overflow-hidden text-no-wrap text-ellipsis",title:e.item[t.name]},{default:(0,n.k6)((()=>[e.item&&Array.isArray(e.item._highlightResult[t.name])?((0,n.uX)(),(0,n.CE)("div",y,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.item._highlightResult[t.name],((e,t)=>((0,n.uX)(),(0,n.CE)("div",{innerHTML:e.value,key:t},null,8,v)))),128))])):((0,n.uX)(),(0,n.CE)("div",k,[t.name.includes(".*")?((0,n.uX)(),(0,n.CE)("div",C,[e.item&&Array.isArray(e.item[t.name])?((0,n.uX)(),(0,n.CE)("div",_,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.item[t.name],((e,t)=>((0,n.uX)(),(0,n.CE)("div",{key:t},(0,r.v_)(e),1)))),128))])):((0,n.uX)(),(0,n.CE)("div",F,(0,r.v_)(e.item&&e.item[t.name]),1))])):((0,n.uX)(),(0,n.Wv)(c,{key:1,attribute:t.name,hit:e.item},null,8,["attribute","hit"]))]))])),_:2},1032,["title"]),e.item&&e.isImage(e.item[t.name])?((0,n.uX)(),(0,n.Wv)(o,{key:0,caption:"",class:"img-preview"},{default:(0,n.k6)((()=>[(0,n.bF)(u,{src:e.item[t.name],fit:"contain",class:"img-preview"},null,8,["src"])])),_:2},1024)):(0,n.Q3)("",!0)])),_:2},1024),e.item&&e.isUrl(e.item[t.name])?((0,n.uX)(),(0,n.Wv)(d,{key:0,side:"",top:""},{default:(0,n.k6)((()=>[(0,n.bF)(o,null,{default:(0,n.k6)((()=>[(0,n.bF)(h,{flat:"",href:e.item[t.name],target:"_blank",size:"sm",padding:"sm",icon:"sym_s_open_in_new",title:"open"},null,8,["href"])])),_:2},1024)])),_:2},1024)):(0,n.Q3)("",!0)])),_:2},1024)))),128)),(0,n.bF)(p),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.fieldsNotInSchema,(t=>((0,n.uX)(),(0,n.Wv)(m,{key:t},{default:(0,n.k6)((()=>[(0,n.bF)(d,{side:"",class:"q-mt-sm text-body2"},{default:(0,n.k6)((()=>[(0,n.bF)(o,{caption:""},{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(t),1)])),_:2},1024),(0,n.bF)(o,{class:"overflow-hidden text-no-wrap text-ellipsis",title:JSON.stringify(e.item[t],null,2)},{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(e.item[t]),1)])),_:2},1032,["title"]),e.isImage(e.item[t])?((0,n.uX)(),(0,n.Wv)(o,{key:0,caption:"",class:"img-preview"},{default:(0,n.k6)((()=>[(0,n.bF)(u,{src:e.item[t],fit:"contain",class:"img-preview"},null,8,["src"])])),_:2},1024)):(0,n.Q3)("",!0)])),_:2},1024),e.isUrl(e.item[t])?((0,n.uX)(),(0,n.Wv)(d,{key:0,side:"",top:""},{default:(0,n.k6)((()=>[(0,n.bF)(o,null,{default:(0,n.k6)((()=>[(0,n.bF)(h,{flat:"",href:e.item[t],target:"_blank",size:"sm",padding:"sm",icon:"sym_s_open_in_new",title:"open"},null,8,["href"])])),_:2},1024)])),_:2},1024)):(0,n.Q3)("",!0)])),_:2},1024)))),128))])),_:1}),(0,n.bF)(q),(0,n.bF)(p),(0,n.bF)(m,null,{default:(0,n.k6)((()=>[(0,n.bF)(d,null,{default:(0,n.k6)((()=>[(0,n.bF)(o,null,{default:(0,n.k6)((()=>[(0,n.bF)(h,{flat:"",size:"sm",padding:"sm",onClick:t[0]||(t[0]=t=>e.editDocument()),icon:"sym_s_edit",title:"Edit"})])),_:1})])),_:1}),(0,n.bF)(d,{side:""},{default:(0,n.k6)((()=>[(0,n.bF)(o,null,{default:(0,n.k6)((()=>[(0,n.bF)(h,{flat:"",size:"sm",padding:"sm",onClick:t[1]||(t[1]=t=>e.deleteDocumentById(e.item.id)),icon:"sym_s_delete_forever",title:"Delete"})])),_:1})])),_:1})])),_:1})])):(0,n.Q3)("",!0)}const S=(0,n.pM)({name:"SearchResultItem",props:{item:{type:Object}},computed:{currentCollection(){return this.$store.state.node.currentCollection},fieldsNotInSchema(){if(!this.item||!this.currentCollection||!this.currentCollection.fields)return[];const e=this.currentCollection.fields.map((e=>e.name)).concat(["objectID","text_match"]);return Object.keys(this.item).filter((t=>!t.startsWith("_")&&!e.includes(t)))}},methods:{isUrl(e){return!!e&&(e=String(e),e.startsWith("http://")||e.startsWith("https://"))},isImage(e){var t;if(!e)return!1;e=String(e);const s=["jpg","jpeg","png","gif","bmp","svg","webp"],n=(null===(t=e.split(".").pop())||void 0===t?void 0:t.toLowerCase())||"";return s.includes(n)},editDocument(){const e={};this.item&&(Object.keys(this.item).forEach((t=>{if(!t.startsWith("_")&&!["objectID","text_match"].includes(t)){if(!this.item)return;e[t]=this.item[t]}})),this.$store.dispatch("node/editDocuments",[JSON.parse(JSON.stringify(e))]))},deleteDocumentById(e){this.$q.dialog({title:"Confirm",message:`Delete document with id: ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteDocumentById",e)}))}}});var I=s(12807),A=s(53999),w=s(90124),E=s(25173),x=s(13796),Q=s(15046),X=s(1693),j=s(10386),W=s(93676),$=s(98582),P=s.n($);const L=(0,I.A)(S,[["render",q]]),O=L;P()(S,"components",{QList:A.A,QItem:w.A,QItemSection:E.A,QItemLabel:x.A,QImg:Q.A,QBtn:X.A,QSeparator:j.A,QSpace:W.A});var T=s(71271),J=function(e,t,s,n){function i(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function a(e){try{o(n.next(e))}catch(t){r(t)}}function l(e){try{o(n["throw"](e))}catch(t){r(t)}}function o(e){e.done?s(e.value):i(e.value).then(a,l)}o((n=n.apply(e,t||[])).next())}))};const D="typesense-search-history",H=(0,n.pM)({components:{SearchResultItem:O,MonacoEditor:b.A},name:"Search",data(){return{tab:"form",history:[],searchParameters:{q:"stark",query_by:"company_name",filter_by:"num_employees:>100",sort_by:"num_employees:desc",page:1,per_page:10,exhaustive_search:!0},jsonError:null,results:null}},computed:{currentCollection(){return this.$store.state.node.currentCollection},searchParametersJson:{get(){return JSON.stringify(this.searchParameters,null,2)},set(e){try{this.searchParameters=JSON.parse(e),this.jsonError=null}catch(t){this.jsonError=t.message}}},hits(){return this.results&&this.results.hits?this.results.hits.map((e=>{const t=Object.assign({},e.document);return t._highlightResult=Object.keys(e.document).reduce(((t,s)=>(t[s]={value:String(e.document[s])},t)),{}),e.highlights.forEach((e=>{t._highlightResult[e.field]={value:e.snippet}})),t})):[]},resultsJson(){return JSON.stringify(this.results,null,2)}},methods:{exportResults(){return J(this,void 0,void 0,(function*(){this.results&&(yield this.$store.dispatch("node/exportToJson",this.results))}))},exportHits(){return J(this,void 0,void 0,(function*(){if(this.results&&this.results.hits){const e=this.results.hits.map((e=>e.document));yield this.$store.dispatch("node/exportToJson",e)}}))},search(){return J(this,void 0,void 0,(function*(){this.results=null,this.jsonError=null,this.addToHistory();try{this.results=yield this.$store.dispatch("node/search",this.searchParameters)}catch(e){this.jsonError=e.message}}))},addToHistory(){const e=this.searchParametersJson,t=this.history.indexOf(e);0!==t&&(t>0&&this.history.splice(t,1),this.history.unshift(e),this.saveHistory())},loadHistory(){var e;this.history=T.A.getItem(`${D}-${(null===(e=this.currentCollection)||void 0===e?void 0:e.name)||""}`)||[]},saveHistory(){var e;T.A.set(`${D}-${(null===(e=this.currentCollection)||void 0===e?void 0:e.name)||""}`,this.history.slice(0,20))}},watch:{currentCollection:{handler(){this.loadHistory()},immediate:!0}}});var V=s(48958),N=s(46868),R=s(39626);const B=(0,I.A)(H,[["render",p]]),K=B;P()(H,"components",{QScrollArea:V.A,QList:A.A,QItemLabel:x.A,QItem:w.A,QItemSection:E.A,QBanner:N.A,QBtn:X.A}),P()(H,"directives",{Ripple:R.A});const M={class:"row q-mt-md"},U={class:"col-3 q-pr-sm"},z={class:"text-subtitle2 q-pt-md"},G={class:"text-subtitle2 q-pt-md"},Y={class:"col-9"},Z={key:1};function ee(e,t,s,i,a,l){const o=(0,n.g2)("ais-configure"),c=(0,n.g2)("debounced-search-box"),u=(0,n.g2)("ais-search-box"),d=(0,n.g2)("ais-stats"),h=(0,n.g2)("ais-current-refinements"),m=(0,n.g2)("ais-hits-per-page"),p=(0,n.g2)("q-btn"),b=(0,n.g2)("ais-sort-by"),g=(0,n.g2)("q-select"),f=(0,n.g2)("ais-range-input"),y=(0,n.g2)("ais-refinement-list"),v=(0,n.g2)("ais-pagination"),k=(0,n.g2)("search-result-item"),C=(0,n.g2)("ais-hits"),_=(0,n.g2)("ais-instant-search"),F=(0,n.g2)("q-banner");return e.searchClient&&e.currentCollection?((0,n.uX)(),(0,n.Wv)(_,{key:0,"search-client":e.searchClient,"index-name":e.currentCollection.name,middlewares:e.middlewares},{default:(0,n.k6)((()=>[(0,n.bF)(o,{hitsPerPage:12}),(0,n.bF)(u,{"index-name":"instant_search","search-client":e.searchClient},{default:(0,n.k6)((()=>[(0,n.bF)(c)])),_:1},8,["search-client"]),(0,n.bF)(d),(0,n.bF)(h),(0,n.Lk)("div",M,[(0,n.Lk)("div",U,[(0,n.bF)(m,{items:[{label:"12 hits per page",value:12,default:!0},{label:"48 hits per page",value:48},{label:"100 hits per page",value:100},{label:"250 hits per page",value:250}]}),(0,n.bF)(p,{flat:"",onClick:t[0]||(t[0]=t=>e.exportPage())},{default:(0,n.k6)((()=>t[3]||(t[3]=[(0,n.eW)("export current page")]))),_:1}),t[4]||(t[4]=(0,n.Lk)("div",{class:"text-subtitle2 q-pt-md"},"Sort By",-1)),(0,n.bF)(b,{items:e.sortBy},null,8,["items"]),t[5]||(t[5]=(0,n.Lk)("div",{class:"text-subtitle2 q-pt-md"},"Stopwords",-1)),(0,n.bF)(g,{modelValue:e.currentStopwordsSet,"onUpdate:modelValue":[t[1]||(t[1]=t=>e.currentStopwordsSet=t),t[2]||(t[2]=t=>e.updateTypesenseAdapterConfiguration())],disable:!e.$store.state.node.data.features.stopwords,outlined:"",clearable:"",dense:"","options-dense":"",options:e.stopwords},null,8,["modelValue","disable","options"]),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.facetNumberFields,(e=>((0,n.uX)(),(0,n.CE)("div",{class:"q-mb-sm",key:e},[(0,n.Lk)("div",z,(0,r.v_)(e),1),(0,n.bF)(f,{searchable:!0,attribute:e},null,8,["attribute"])])))),128)),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.facetStringFields,(e=>((0,n.uX)(),(0,n.CE)("div",{class:"q-mb-sm",key:e},[(0,n.Lk)("div",G,(0,r.v_)(e),1),(0,n.bF)(y,{class:"q-mb-sm",searchable:!0,attribute:e},null,8,["attribute"])])))),128))]),(0,n.Lk)("div",Y,[(0,n.bF)(v,{class:"q-mb-md"}),(0,n.bF)(C,null,(0,n.eX)({_:2},[e.currentCollection?{name:"item",fn:(0,n.k6)((({item:e})=>[(0,n.bF)(k,{item:e},null,8,["item"])])),key:"0"}:void 0]),1024),(0,n.bF)(v,{class:"q-my-md"})])])])),_:1},8,["search-client","index-name","middlewares"])):e.searchClientError?((0,n.uX)(),(0,n.CE)("div",Z,[(0,n.bF)(F,{"inline-actions":"",class:"text-white bg-red"},{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(e.searchClientError),1)])),_:1})])):(0,n.Q3)("",!0)}function te(e,t,s,i,r,a){const l=(0,n.g2)("q-icon"),o=(0,n.g2)("q-input");return(0,n.uX)(),(0,n.Wv)(o,{modelValue:a.query,"onUpdate:modelValue":t[0]||(t[0]=e=>a.query=e),onClear:a.clear,dense:"",autofocus:"",outlined:"",type:"search",clearable:"","clear-icon":"close",placeholder:"Search..."},{prepend:(0,n.k6)((()=>[(0,n.bF)(l,{name:"search"})])),_:1},8,["modelValue","onClear"])}var se=s(88941),ne=s(39775);const ie={mixins:[(0,ne.yb)({connector:se.A})],props:{delay:{type:Number,default:200,required:!1}},data(){return{timerId:null,localQuery:""}},unmounted(){this.timerId&&clearTimeout(this.timerId)},methods:{clear(){this.query=""}},computed:{query:{get(){return this.localQuery},set(e){this.localQuery=e,this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((()=>{this.state.refine(this.localQuery)}),this.delay)}}}};var re=s(39270),ae=s(50492);const le=(0,I.A)(ie,[["render",te]]),oe=le;P()(ie,"components",{QInput:re.A,QIcon:ae.A});var ce=s(5286),ue=function(e,t,s,n){function i(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function a(e){try{o(n.next(e))}catch(t){r(t)}}function l(e){try{o(n["throw"](e))}catch(t){r(t)}}function o(e){e.done?s(e.value):i(e.value).then(a,l)}o((n=n.apply(e,t||[])).next())}))};const de=(0,n.pM)({components:{SearchResultItem:O,DebouncedSearchBox:oe},name:"SearchInstantSearch",data(){const e={searchClient:null,typesenseInstantsearchAdapter:null,instantSearchInstance:null,searchClientError:null,currentStopwordsSet:null,middlewares:[({instantSearchInstance:t})=>({subscribe(){e.instantSearchInstance=t},unsubscribe(){e.instantSearchInstance=null}})]};return e},computed:{currentCollection(){return this.$store.state.node.currentCollection},facetNumberFields(){return this.currentCollection&&this.currentCollection.fields?this.currentCollection.fields.filter((e=>e.facet&&["int32","int64","float","int32[]","int64[]","float[]"].includes(e.type)&&!e.name.includes(".*"))).map((e=>e.name)):[]},facetStringFields(){return this.currentCollection&&this.currentCollection.fields?this.currentCollection.fields.filter((e=>e.facet&&["string","string[]"].includes(e.type)&&!e.name.includes(".*"))).map((e=>e.name)):[]},sortBy(){if(!this.currentCollection||!this.currentCollection.fields)return[];const e=[{value:this.currentCollection.name,label:"Default"}];return this.currentCollection.fields.filter((e=>["int32","float"].includes(e.type)||"string"===e.type&&e.sort)).forEach((t=>{this.currentCollection&&(e.push({value:`${this.currentCollection.name}/sort/${t.name}:asc`,label:`${t.name} asc`}),e.push({value:`${this.currentCollection.name}/sort/${t.name}:desc`,label:`${t.name} desc`}))})),e},stopwords(){return this.$store.state.node.data.stopwords.map((e=>e.id))}},methods:{exportPage(){return ue(this,void 0,void 0,(function*(){this.instantSearchInstance&&this.currentCollection&&(yield this.$store.dispatch("node/exportToJson",this.instantSearchInstance.renderState[this.currentCollection.name].hits.results.hits))}))},updateTypesenseAdapterConfiguration(){this.typesenseInstantsearchAdapter&&this.currentCollection&&this.typesenseInstantsearchAdapter.updateConfiguration(Object.assign(Object.assign({},this.typesenseInstantsearchAdapter.configuration),{additionalSearchParameters:Object.assign(Object.assign({},this.typesenseInstantsearchAdapter.configuration.additionalSearchParameters),{stopwords:this.currentStopwordsSet})}))}},watch:{currentCollection:{handler(){this.searchClient=null,this.searchClientError=null,window.setTimeout((()=>{var e;if(!this.$store.state.node.loginData||!this.currentCollection)return;const t=((null===(e=this.currentCollection)||void 0===e?void 0:e.fields)||[]).filter((e=>e.index&&["string","string[]"].includes(e.type)&&!e.name.includes(".*"))).map((e=>e.name)).join(",");try{const e=new ce.A({server:{nodes:[Object.assign({},this.$store.state.node.loginData.node)],apiKey:this.$store.state.node.loginData.apiKey},additionalSearchParameters:{exhaustive_search:!0,query_by:t}});this.typesenseInstantsearchAdapter=e,this.searchClient=e.searchClient}catch(s){this.searchClientError=s.message+"Using query_by: "+t,console.error(s)}}))},immediate:!0}}});var he=s(75848);const me=(0,I.A)(de,[["render",ee]]),pe=me;P()(de,"components",{QBtn:X.A,QSelect:he.A,QBanner:N.A});const be=(0,n.pM)({components:{SearchJson:K,SearchInstantSearch:pe},name:"Search",data(){return{tab:"form"}}});var ge=s(77716),fe=s(42980),ye=s(10327),ve=s(39041),ke=s(71746);const Ce=(0,I.A)(be,[["render",i]]),_e=Ce;P()(be,"components",{QPage:ge.A,QTabs:fe.A,QTab:ye.A,QSeparator:j.A,QTabPanels:ve.A,QTabPanel:ke.A})},34711:()=>{}}]); \ No newline at end of file +(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[233],{8537:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_e});var n=s(61758);function i(e,t,s,i,r,a){const l=(0,n.g2)("q-tab"),o=(0,n.g2)("q-tabs"),c=(0,n.g2)("q-separator"),u=(0,n.g2)("search-instant-search"),d=(0,n.g2)("q-tab-panel"),h=(0,n.g2)("search-json"),m=(0,n.g2)("q-tab-panels"),p=(0,n.g2)("q-page");return(0,n.uX)(),(0,n.Wv)(p,{padding:""},{default:(0,n.k6)((()=>[(0,n.bF)(o,{modelValue:e.tab,"onUpdate:modelValue":t[0]||(t[0]=t=>e.tab=t),dense:"",class:"bg-primary text-white",align:"justify","narrow-indicator":""},{default:(0,n.k6)((()=>[(0,n.bF)(l,{name:"form",label:"InstantSearch Mode"}),(0,n.bF)(l,{name:"json",label:"JSON Mode"})])),_:1},8,["modelValue"]),(0,n.bF)(c),(0,n.bF)(m,{modelValue:e.tab,"onUpdate:modelValue":t[1]||(t[1]=t=>e.tab=t),animated:"","keep-alive":""},{default:(0,n.k6)((()=>[(0,n.bF)(d,{name:"form"},{default:(0,n.k6)((()=>[(0,n.bF)(u)])),_:1}),(0,n.bF)(d,{name:"json",class:"q-pa-none"},{default:(0,n.k6)((()=>[(0,n.bF)(h)])),_:1})])),_:1},8,["modelValue"])])),_:1})}var r=s(58790);const a={class:"row"},l={class:"col-9"},o={class:"col-3"},c={class:"q-mt-md"},u={key:1,class:"ais-Hits q-mt-md"},d={class:"ais-Hits-list"},h={key:2,class:"text-h5 q-mt-md"},m={key:3};function p(e,t,s,i,p,b){const g=(0,n.g2)("monaco-editor"),f=(0,n.g2)("q-item-label"),y=(0,n.g2)("q-item-section"),v=(0,n.g2)("q-item"),k=(0,n.g2)("q-list"),C=(0,n.g2)("q-scroll-area"),_=(0,n.g2)("q-banner"),F=(0,n.g2)("q-btn"),q=(0,n.g2)("search-result-item"),S=(0,n.gN)("ripple");return(0,n.uX)(),(0,n.CE)(n.FK,null,[(0,n.Lk)("div",a,[(0,n.Lk)("div",l,[(0,n.bF)(g,{modelValue:e.searchParametersJson,"onUpdate:modelValue":t[0]||(t[0]=t=>e.searchParametersJson=t),style:{height:"30vh","min-height":"200px"}},null,8,["modelValue"])]),(0,n.Lk)("div",o,[(0,n.bF)(C,{style:{height:"100%"}},{default:(0,n.k6)((()=>[(0,n.bF)(k,{bordered:"",separator:"",dense:""},{default:(0,n.k6)((()=>[(0,n.bF)(f,{header:""},{default:(0,n.k6)((()=>t[4]||(t[4]=[(0,n.eW)("History")]))),_:1}),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.history,(t=>(0,n.bo)(((0,n.uX)(),(0,n.Wv)(v,{clickable:"",key:t,title:t,onClick:s=>e.searchParametersJson=t},{default:(0,n.k6)((()=>[(0,n.bF)(y,null,{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(t.slice(0,60)),1)])),_:2},1024)])),_:2},1032,["title","onClick"])),[[S]]))),128))])),_:1})])),_:1})])]),e.jsonError?((0,n.uX)(),(0,n.Wv)(_,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,n.k6)((()=>[(0,n.eW)(" Invalid Format: "+(0,r.v_)(e.jsonError),1)])),_:1})):(0,n.Q3)("",!0),(0,n.Lk)("div",c,[(0,n.bF)(F,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!!e.jsonError,onClick:t[1]||(t[1]=t=>e.search())},{default:(0,n.k6)((()=>t[5]||(t[5]=[(0,n.eW)("Run Query")]))),_:1},8,["disable"]),(0,n.bF)(F,{size:"md",padding:"sm lg",unelevated:"",color:"accent",class:"q-ml-sm",disable:!e.results||!e.results.hits,onClick:t[2]||(t[2]=t=>e.exportHits())},{default:(0,n.k6)((()=>t[6]||(t[6]=[(0,n.eW)("Export Hits")]))),_:1},8,["disable"]),(0,n.bF)(F,{size:"md",padding:"sm lg",unelevated:"",color:"accent",class:"q-ml-sm",disable:!e.results,onClick:t[3]||(t[3]=t=>e.exportResults())},{default:(0,n.k6)((()=>t[7]||(t[7]=[(0,n.eW)("Export Raw Results")]))),_:1},8,["disable"])]),e.hits?((0,n.uX)(),(0,n.CE)("div",u,[(0,n.Lk)("ol",d,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.hits,(e=>((0,n.uX)(),(0,n.CE)("li",{class:"ais-Hits-item",key:e.id},[(0,n.bF)(q,{item:e},null,8,["item"])])))),128))])])):(0,n.Q3)("",!0),e.results&&e.results.hits&&0===e.results.hits.length?((0,n.uX)(),(0,n.CE)("div",h," No match found ")):(0,n.Q3)("",!0),e.results&&!e.results.hits?((0,n.uX)(),(0,n.CE)("pre",m," "+(0,r.v_)(e.resultsJson)+"\n ",1)):(0,n.Q3)("",!0)],64)}var b=s(74701);const g={key:0,class:"column no-wrap search-result-item"},f={key:0},y={key:0,class:"array-field"},v=["innerHTML"],k={key:1},C={key:0},_={key:0},F={key:1};function q(e,t,s,i,a,l){const o=(0,n.g2)("q-item-label"),c=(0,n.g2)("ais-highlight"),u=(0,n.g2)("q-img"),d=(0,n.g2)("q-item-section"),h=(0,n.g2)("q-btn"),m=(0,n.g2)("q-item"),p=(0,n.g2)("q-separator"),b=(0,n.g2)("q-list"),q=(0,n.g2)("q-space");return e.currentCollection?((0,n.uX)(),(0,n.CE)("div",g,[(0,n.bF)(b,{dense:""},{default:(0,n.k6)((()=>[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.currentCollection.fields,(t=>((0,n.uX)(),(0,n.Wv)(m,{key:t.name},{default:(0,n.k6)((()=>[(0,n.bF)(d,{side:"",class:"q-mt-sm text-body2"},{default:(0,n.k6)((()=>[(0,n.bF)(o,{caption:""},{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(t.name)+" ",1),e.item&&Array.isArray(e.item[t.name])?((0,n.uX)(),(0,n.CE)("span",f,"["+(0,r.v_)(e.item[t.name].length)+"]",1)):(0,n.Q3)("",!0)])),_:2},1024),(0,n.bF)(o,{class:"overflow-hidden text-no-wrap text-ellipsis",title:e.item[t.name]},{default:(0,n.k6)((()=>[e.item&&Array.isArray(e.item._highlightResult[t.name])?((0,n.uX)(),(0,n.CE)("div",y,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.item._highlightResult[t.name],((e,t)=>((0,n.uX)(),(0,n.CE)("div",{innerHTML:e.value,key:t},null,8,v)))),128))])):((0,n.uX)(),(0,n.CE)("div",k,[t.name.includes(".*")?((0,n.uX)(),(0,n.CE)("div",C,[e.item&&Array.isArray(e.item[t.name])?((0,n.uX)(),(0,n.CE)("div",_,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.item[t.name],((e,t)=>((0,n.uX)(),(0,n.CE)("div",{key:t},(0,r.v_)(e),1)))),128))])):((0,n.uX)(),(0,n.CE)("div",F,(0,r.v_)(e.item&&e.item[t.name]),1))])):((0,n.uX)(),(0,n.Wv)(c,{key:1,attribute:t.name,hit:e.item},null,8,["attribute","hit"]))]))])),_:2},1032,["title"]),e.item&&e.isImage(e.item[t.name])?((0,n.uX)(),(0,n.Wv)(o,{key:0,caption:"",class:"img-preview"},{default:(0,n.k6)((()=>[(0,n.bF)(u,{src:e.item[t.name],fit:"contain",class:"img-preview"},null,8,["src"])])),_:2},1024)):(0,n.Q3)("",!0)])),_:2},1024),e.item&&e.isUrl(e.item[t.name])?((0,n.uX)(),(0,n.Wv)(d,{key:0,side:"",top:""},{default:(0,n.k6)((()=>[(0,n.bF)(o,null,{default:(0,n.k6)((()=>[(0,n.bF)(h,{flat:"",href:e.item[t.name],target:"_blank",size:"sm",padding:"sm",icon:"sym_s_open_in_new",title:"open"},null,8,["href"])])),_:2},1024)])),_:2},1024)):(0,n.Q3)("",!0)])),_:2},1024)))),128)),(0,n.bF)(p),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.fieldsNotInSchema,(t=>((0,n.uX)(),(0,n.Wv)(m,{key:t},{default:(0,n.k6)((()=>[(0,n.bF)(d,{side:"",class:"q-mt-sm text-body2"},{default:(0,n.k6)((()=>[(0,n.bF)(o,{caption:""},{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(t),1)])),_:2},1024),(0,n.bF)(o,{class:"overflow-hidden text-no-wrap text-ellipsis",title:JSON.stringify(e.item[t],null,2)},{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(e.item[t]),1)])),_:2},1032,["title"]),e.isImage(e.item[t])?((0,n.uX)(),(0,n.Wv)(o,{key:0,caption:"",class:"img-preview"},{default:(0,n.k6)((()=>[(0,n.bF)(u,{src:e.item[t],fit:"contain",class:"img-preview"},null,8,["src"])])),_:2},1024)):(0,n.Q3)("",!0)])),_:2},1024),e.isUrl(e.item[t])?((0,n.uX)(),(0,n.Wv)(d,{key:0,side:"",top:""},{default:(0,n.k6)((()=>[(0,n.bF)(o,null,{default:(0,n.k6)((()=>[(0,n.bF)(h,{flat:"",href:e.item[t],target:"_blank",size:"sm",padding:"sm",icon:"sym_s_open_in_new",title:"open"},null,8,["href"])])),_:2},1024)])),_:2},1024)):(0,n.Q3)("",!0)])),_:2},1024)))),128))])),_:1}),(0,n.bF)(q),(0,n.bF)(p),(0,n.bF)(m,null,{default:(0,n.k6)((()=>[(0,n.bF)(d,null,{default:(0,n.k6)((()=>[(0,n.bF)(o,null,{default:(0,n.k6)((()=>[(0,n.bF)(h,{flat:"",size:"sm",padding:"sm",onClick:t[0]||(t[0]=t=>e.editDocument()),icon:"sym_s_edit",title:"Edit"})])),_:1})])),_:1}),(0,n.bF)(d,{side:""},{default:(0,n.k6)((()=>[(0,n.bF)(o,null,{default:(0,n.k6)((()=>[(0,n.bF)(h,{flat:"",size:"sm",padding:"sm",onClick:t[1]||(t[1]=t=>e.deleteDocumentById(e.item.id)),icon:"sym_s_delete_forever",title:"Delete"})])),_:1})])),_:1})])),_:1})])):(0,n.Q3)("",!0)}const S=(0,n.pM)({name:"SearchResultItem",props:{item:{type:Object}},computed:{currentCollection(){return this.$store.state.node.currentCollection},fieldsNotInSchema(){if(!this.item||!this.currentCollection||!this.currentCollection.fields)return[];const e=this.currentCollection.fields.map((e=>e.name)).concat(["objectID","text_match"]);return Object.keys(this.item).filter((t=>!t.startsWith("_")&&!e.includes(t)))}},methods:{isUrl(e){return!!e&&(e=String(e),e.startsWith("http://")||e.startsWith("https://"))},isImage(e){var t;if(!e)return!1;e=String(e);const s=["jpg","jpeg","png","gif","bmp","svg","webp"],n=(null===(t=e.split(".").pop())||void 0===t?void 0:t.toLowerCase())||"";return s.includes(n)},editDocument(){const e={};this.item&&(Object.keys(this.item).forEach((t=>{if(!t.startsWith("_")&&!["objectID","text_match"].includes(t)){if(!this.item)return;e[t]=this.item[t]}})),this.$store.dispatch("node/editDocuments",[JSON.parse(JSON.stringify(e))]))},deleteDocumentById(e){this.$q.dialog({title:"Confirm",message:`Delete document with id: ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteDocumentById",e)}))}}});var I=s(12807),A=s(53999),w=s(90124),E=s(25173),x=s(13796),Q=s(15046),X=s(1693),j=s(10386),W=s(93676),$=s(98582),P=s.n($);const L=(0,I.A)(S,[["render",q]]),O=L;P()(S,"components",{QList:A.A,QItem:w.A,QItemSection:E.A,QItemLabel:x.A,QImg:Q.A,QBtn:X.A,QSeparator:j.A,QSpace:W.A});var T=s(71271),J=function(e,t,s,n){function i(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function a(e){try{o(n.next(e))}catch(e){r(e)}}function l(e){try{o(n["throw"](e))}catch(e){r(e)}}function o(e){e.done?s(e.value):i(e.value).then(a,l)}o((n=n.apply(e,t||[])).next())}))};const D="typesense-search-history",H=(0,n.pM)({components:{SearchResultItem:O,MonacoEditor:b.A},name:"Search",data(){return{tab:"form",history:[],searchParameters:{q:"stark",query_by:"company_name",filter_by:"num_employees:>100",sort_by:"num_employees:desc",page:1,per_page:10,exhaustive_search:!0},jsonError:null,results:null}},computed:{currentCollection(){return this.$store.state.node.currentCollection},searchParametersJson:{get(){return JSON.stringify(this.searchParameters,null,2)},set(e){try{this.searchParameters=JSON.parse(e),this.jsonError=null}catch(e){this.jsonError=e.message}}},hits(){return this.results&&this.results.hits?this.results.hits.map((e=>{const t=Object.assign({},e.document);return t._highlightResult=Object.keys(e.document).reduce(((t,s)=>(t[s]={value:String(e.document[s])},t)),{}),e.highlights.forEach((e=>{t._highlightResult[e.field]={value:e.snippet}})),t})):[]},resultsJson(){return JSON.stringify(this.results,null,2)}},methods:{exportResults(){return J(this,void 0,void 0,(function*(){this.results&&(yield this.$store.dispatch("node/exportToJson",this.results))}))},exportHits(){return J(this,void 0,void 0,(function*(){if(this.results&&this.results.hits){const e=this.results.hits.map((e=>e.document));yield this.$store.dispatch("node/exportToJson",e)}}))},search(){return J(this,void 0,void 0,(function*(){this.results=null,this.jsonError=null,this.addToHistory();try{this.results=yield this.$store.dispatch("node/search",this.searchParameters)}catch(e){this.jsonError=e.message}}))},addToHistory(){const e=this.searchParametersJson,t=this.history.indexOf(e);0!==t&&(t>0&&this.history.splice(t,1),this.history.unshift(e),this.saveHistory())},loadHistory(){var e;this.history=T.A.getItem(`${D}-${(null===(e=this.currentCollection)||void 0===e?void 0:e.name)||""}`)||[]},saveHistory(){var e;T.A.set(`${D}-${(null===(e=this.currentCollection)||void 0===e?void 0:e.name)||""}`,this.history.slice(0,20))}},watch:{currentCollection:{handler(){this.loadHistory()},immediate:!0}}});var V=s(48958),N=s(46868),R=s(39626);const B=(0,I.A)(H,[["render",p]]),K=B;P()(H,"components",{QScrollArea:V.A,QList:A.A,QItemLabel:x.A,QItem:w.A,QItemSection:E.A,QBanner:N.A,QBtn:X.A}),P()(H,"directives",{Ripple:R.A});const M={class:"row q-mt-md"},U={class:"col-3 q-pr-sm"},z={class:"text-subtitle2 q-pt-md"},G={class:"text-subtitle2 q-pt-md"},Y={class:"col-9"},Z={key:1};function ee(e,t,s,i,a,l){const o=(0,n.g2)("ais-configure"),c=(0,n.g2)("debounced-search-box"),u=(0,n.g2)("ais-search-box"),d=(0,n.g2)("ais-stats"),h=(0,n.g2)("ais-current-refinements"),m=(0,n.g2)("ais-hits-per-page"),p=(0,n.g2)("q-btn"),b=(0,n.g2)("ais-sort-by"),g=(0,n.g2)("q-select"),f=(0,n.g2)("ais-range-input"),y=(0,n.g2)("ais-refinement-list"),v=(0,n.g2)("ais-pagination"),k=(0,n.g2)("search-result-item"),C=(0,n.g2)("ais-hits"),_=(0,n.g2)("ais-instant-search"),F=(0,n.g2)("q-banner");return e.searchClient&&e.currentCollection?((0,n.uX)(),(0,n.Wv)(_,{key:0,"search-client":e.searchClient,"index-name":e.currentCollection.name,middlewares:e.middlewares},{default:(0,n.k6)((()=>[(0,n.bF)(o,{hitsPerPage:12}),(0,n.bF)(u,{"index-name":"instant_search","search-client":e.searchClient},{default:(0,n.k6)((()=>[(0,n.bF)(c)])),_:1},8,["search-client"]),(0,n.bF)(d),(0,n.bF)(h),(0,n.Lk)("div",M,[(0,n.Lk)("div",U,[(0,n.bF)(m,{items:[{label:"12 hits per page",value:12,default:!0},{label:"48 hits per page",value:48},{label:"100 hits per page",value:100},{label:"250 hits per page",value:250}]}),(0,n.bF)(p,{flat:"",onClick:t[0]||(t[0]=t=>e.exportPage())},{default:(0,n.k6)((()=>t[3]||(t[3]=[(0,n.eW)("export current page")]))),_:1}),t[4]||(t[4]=(0,n.Lk)("div",{class:"text-subtitle2 q-pt-md"},"Sort By",-1)),(0,n.bF)(b,{items:e.sortBy},null,8,["items"]),t[5]||(t[5]=(0,n.Lk)("div",{class:"text-subtitle2 q-pt-md"},"Stopwords",-1)),(0,n.bF)(g,{modelValue:e.currentStopwordsSet,"onUpdate:modelValue":[t[1]||(t[1]=t=>e.currentStopwordsSet=t),t[2]||(t[2]=t=>e.updateTypesenseAdapterConfiguration())],disable:!e.$store.state.node.data.features.stopwords,outlined:"",clearable:"",dense:"","options-dense":"",options:e.stopwords},null,8,["modelValue","disable","options"]),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.facetNumberFields,(e=>((0,n.uX)(),(0,n.CE)("div",{class:"q-mb-sm",key:e},[(0,n.Lk)("div",z,(0,r.v_)(e),1),(0,n.bF)(f,{searchable:!0,attribute:e},null,8,["attribute"])])))),128)),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.facetStringFields,(e=>((0,n.uX)(),(0,n.CE)("div",{class:"q-mb-sm",key:e},[(0,n.Lk)("div",G,(0,r.v_)(e),1),(0,n.bF)(y,{class:"q-mb-sm",searchable:!0,attribute:e},null,8,["attribute"])])))),128))]),(0,n.Lk)("div",Y,[(0,n.bF)(v,{class:"q-mb-md"}),(0,n.bF)(C,null,(0,n.eX)({_:2},[e.currentCollection?{name:"item",fn:(0,n.k6)((({item:e})=>[(0,n.bF)(k,{item:e},null,8,["item"])])),key:"0"}:void 0]),1024),(0,n.bF)(v,{class:"q-my-md"})])])])),_:1},8,["search-client","index-name","middlewares"])):e.searchClientError?((0,n.uX)(),(0,n.CE)("div",Z,[(0,n.bF)(F,{"inline-actions":"",class:"text-white bg-red"},{default:(0,n.k6)((()=>[(0,n.eW)((0,r.v_)(e.searchClientError),1)])),_:1})])):(0,n.Q3)("",!0)}function te(e,t,s,i,r,a){const l=(0,n.g2)("q-icon"),o=(0,n.g2)("q-input");return(0,n.uX)(),(0,n.Wv)(o,{modelValue:a.query,"onUpdate:modelValue":t[0]||(t[0]=e=>a.query=e),onClear:a.clear,dense:"",autofocus:"",outlined:"",type:"search",clearable:"","clear-icon":"close",placeholder:"Search..."},{prepend:(0,n.k6)((()=>[(0,n.bF)(l,{name:"search"})])),_:1},8,["modelValue","onClear"])}var se=s(88941),ne=s(51152);const ie={mixins:[(0,ne.yb)({connector:se.A})],props:{delay:{type:Number,default:200,required:!1}},data(){return{timerId:null,localQuery:""}},unmounted(){this.timerId&&clearTimeout(this.timerId)},methods:{clear(){this.query=""}},computed:{query:{get(){return this.localQuery},set(e){this.localQuery=e,this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((()=>{this.state.refine(this.localQuery)}),this.delay)}}}};var re=s(39270),ae=s(50492);const le=(0,I.A)(ie,[["render",te]]),oe=le;P()(ie,"components",{QInput:re.A,QIcon:ae.A});var ce=s(5286),ue=function(e,t,s,n){function i(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function a(e){try{o(n.next(e))}catch(e){r(e)}}function l(e){try{o(n["throw"](e))}catch(e){r(e)}}function o(e){e.done?s(e.value):i(e.value).then(a,l)}o((n=n.apply(e,t||[])).next())}))};const de=(0,n.pM)({components:{SearchResultItem:O,DebouncedSearchBox:oe},name:"SearchInstantSearch",data(){const e={searchClient:null,typesenseInstantsearchAdapter:null,instantSearchInstance:null,searchClientError:null,currentStopwordsSet:null,middlewares:[({instantSearchInstance:t})=>({subscribe(){e.instantSearchInstance=t},unsubscribe(){e.instantSearchInstance=null}})]};return e},computed:{currentCollection(){return this.$store.state.node.currentCollection},facetNumberFields(){return this.currentCollection&&this.currentCollection.fields?this.currentCollection.fields.filter((e=>e.facet&&["int32","int64","float","int32[]","int64[]","float[]"].includes(e.type)&&!e.name.includes(".*"))).map((e=>e.name)):[]},facetStringFields(){return this.currentCollection&&this.currentCollection.fields?this.currentCollection.fields.filter((e=>e.facet&&["string","string[]"].includes(e.type)&&!e.name.includes(".*"))).map((e=>e.name)):[]},sortBy(){if(!this.currentCollection||!this.currentCollection.fields)return[];const e=[{value:this.currentCollection.name,label:"Default"}];return this.currentCollection.fields.filter((e=>["int32","float"].includes(e.type)||"string"===e.type&&e.sort)).forEach((t=>{this.currentCollection&&(e.push({value:`${this.currentCollection.name}/sort/${t.name}:asc`,label:`${t.name} asc`}),e.push({value:`${this.currentCollection.name}/sort/${t.name}:desc`,label:`${t.name} desc`}))})),e},stopwords(){return this.$store.state.node.data.stopwords.map((e=>e.id))}},methods:{exportPage(){return ue(this,void 0,void 0,(function*(){this.instantSearchInstance&&this.currentCollection&&(yield this.$store.dispatch("node/exportToJson",this.instantSearchInstance.renderState[this.currentCollection.name].hits.results.hits))}))},updateTypesenseAdapterConfiguration(){this.typesenseInstantsearchAdapter&&this.currentCollection&&this.typesenseInstantsearchAdapter.updateConfiguration(Object.assign(Object.assign({},this.typesenseInstantsearchAdapter.configuration),{additionalSearchParameters:Object.assign(Object.assign({},this.typesenseInstantsearchAdapter.configuration.additionalSearchParameters),{stopwords:this.currentStopwordsSet})}))}},watch:{currentCollection:{handler(){this.searchClient=null,this.searchClientError=null,window.setTimeout((()=>{var e;if(!this.$store.state.node.loginData||!this.currentCollection)return;const t=((null===(e=this.currentCollection)||void 0===e?void 0:e.fields)||[]).filter((e=>e.index&&["string","string[]"].includes(e.type)&&!e.name.includes(".*"))).map((e=>e.name)).join(",");try{const e=new ce.A({server:{nodes:[Object.assign({},this.$store.state.node.loginData.node)],apiKey:this.$store.state.node.loginData.apiKey},additionalSearchParameters:{exhaustive_search:!0,query_by:t}});this.typesenseInstantsearchAdapter=e,this.searchClient=e.searchClient}catch(e){this.searchClientError=e.message+"Using query_by: "+t,console.error(e)}}))},immediate:!0}}});var he=s(75848);const me=(0,I.A)(de,[["render",ee]]),pe=me;P()(de,"components",{QBtn:X.A,QSelect:he.A,QBanner:N.A});const be=(0,n.pM)({components:{SearchJson:K,SearchInstantSearch:pe},name:"Search",data(){return{tab:"form"}}});var ge=s(77716),fe=s(42980),ye=s(10327),ve=s(39041),ke=s(71746);const Ce=(0,I.A)(be,[["render",i]]),_e=Ce;P()(be,"components",{QPage:ge.A,QTabs:fe.A,QTab:ye.A,QSeparator:j.A,QTabPanels:ve.A,QTabPanel:ke.A})},34711:()=>{}}]); \ No newline at end of file diff --git a/js/277.dab90dcc.js b/js/277.4b6a12f1.js similarity index 100% rename from js/277.dab90dcc.js rename to js/277.4b6a12f1.js diff --git a/js/301.1821af05.js b/js/301.a5481cc4.js similarity index 96% rename from js/301.1821af05.js rename to js/301.a5481cc4.js index 02e829b..f3201e9 100644 --- a/js/301.1821af05.js +++ b/js/301.a5481cc4.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[301],{54699:(e,t,a)=>{a.r(t),a.d(t,{default:()=>q});var n=a(61758),i=a(58790);const s={class:"text-h6"};function o(e,t,a,o,l,r){const d=(0,n.g2)("q-btn"),c=(0,n.g2)("q-card-section"),p=(0,n.g2)("monaco-editor"),u=(0,n.g2)("q-banner"),y=(0,n.g2)("q-card-actions"),m=(0,n.g2)("q-card"),f=(0,n.g2)("q-expansion-item"),h=(0,n.g2)("q-icon"),g=(0,n.g2)("q-input"),b=(0,n.g2)("q-td"),k=(0,n.g2)("q-table"),_=(0,n.g2)("q-page");return(0,n.uX)(),(0,n.Wv)(_,{padding:""},{default:(0,n.k6)((()=>[(0,n.bF)(f,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:"Create API Key","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":t[4]||(t[4]=t=>e.expanded=t)},{default:(0,n.k6)((()=>[(0,n.bF)(m,{style:{height:"60vh"},class:"bg-surface column"},{default:(0,n.k6)((()=>[(0,n.bF)(c,{class:"q-gutter-md"},{default:(0,n.k6)((()=>[(0,n.bF)(d,{flat:"",onClick:t[0]||(t[0]=t=>e.loadAdminKey())},{default:(0,n.k6)((()=>t[6]||(t[6]=[(0,n.eW)("Admin Key Example")]))),_:1}),(0,n.bF)(d,{flat:"",onClick:t[1]||(t[1]=t=>e.loadSearchKey())},{default:(0,n.k6)((()=>t[7]||(t[7]=[(0,n.eW)("Search Key Example")]))),_:1}),(0,n.bF)(d,{type:"a",icon:"sym_s_help","no-caps":"",color:"info",flat:"",dense:"",href:`https://typesense.org/docs/${e.$store.state.node.data.debug.version}/api/api-keys.html#create-an-api-key`,target:"_blank"},{default:(0,n.k6)((()=>t[8]||(t[8]=[(0,n.eW)("Documentation")]))),_:1},8,["href"])])),_:1}),(0,n.bF)(p,{modelValue:e.keyJson,"onUpdate:modelValue":t[2]||(t[2]=t=>e.keyJson=t)},null,8,["modelValue"]),e.jsonError?((0,n.uX)(),(0,n.Wv)(u,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,n.k6)((()=>[(0,n.eW)(" Invalid Format: "+(0,i.v_)(e.jsonError),1)])),_:1})):(0,n.Q3)("",!0),(0,n.bF)(y,{align:"right",class:"bg-primary"},{default:(0,n.k6)((()=>[(0,n.bF)(d,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!!e.jsonError,onClick:t[3]||(t[3]=t=>e.createApiKey())},{default:(0,n.k6)((()=>t[9]||(t[9]=[(0,n.eW)("Create API Key")]))),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["modelValue"]),(0,n.bF)(k,{class:"q-mt-md",title:"API Keys",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.apiKeys,columns:e.columns,"row-key":"id","visible-columns":["id","value_prefix","description","actions","collections","expires_at","actions_op"]},{"top-left":(0,n.k6)((()=>[(0,n.Lk)("div",s,[(0,n.bF)(h,{size:"md",name:"sym_s_key"}),t[10]||(t[10]=(0,n.eW)(" API Keys"))])])),"top-right":(0,n.k6)((()=>[(0,n.bF)(g,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[5]||(t[5]=t=>e.filter=t),placeholder:"Search"},{append:(0,n.k6)((()=>[(0,n.bF)(h,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions_op":(0,n.k6)((t=>[(0,n.bF)(b,{class:"text-right"},{default:(0,n.k6)((()=>[(0,n.bF)(d,{flat:"",color:"negative",onClick:a=>e.deleteApiKey(t.row.id),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var l=a(74701),r=function(e,t,a,n){function i(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function o(e){try{r(n.next(e))}catch(t){s(t)}}function l(e){try{r(n["throw"](e))}catch(t){s(t)}}function r(e){e.done?a(e.value):i(e.value).then(o,l)}r((n=n.apply(e,t||[])).next())}))};const d={description:"Admin key.",actions:["*"],collections:["*"]},c={description:"Search-only companies key.",actions:["documents:search"],collections:["companies"]},p=(0,n.pM)({name:"ApiKeys",components:{MonacoEditor:l.A},data(){return{jsonError:null,key:JSON.parse(JSON.stringify(d)),expanded:0===this.$store.state.node.data.apiKeys.length,filter:"",columns:[{label:"ID",name:"id",field:"id",sortable:!0},{label:"Key prefix",name:"value_prefix",field:"value_prefix"},{label:"Description",name:"description",field:"description",sortable:!0,align:"left"},{label:"Key Actions",name:"actions",field:e=>JSON.stringify(e.actions),sortable:!0,align:"left"},{label:"Collections",name:"collections",field:e=>JSON.stringify(e.collections),sortable:!0,align:"left"},{label:"Expires at",name:"expires_at",field:e=>e.expires_at?64723363199===e.expires_at?"never":new Date(1e3*e.expires_at).toLocaleString():""},{label:"Actions",name:"actions_op",align:"right"}]}},computed:{keyJson:{get(){return JSON.stringify(this.key,null,2)},set(e){try{this.key=JSON.parse(e),this.jsonError=null}catch(t){this.jsonError=t.message}}}},methods:{loadAdminKey(){this.key=JSON.parse(JSON.stringify(d))},loadSearchKey(){this.key=JSON.parse(JSON.stringify(c))},createApiKey(){return r(this,void 0,void 0,(function*(){const e=yield this.$store.dispatch("node/createApiKey",JSON.parse(JSON.stringify(this.key)));this.$q.dialog({title:"Your API key",message:`This is your API key copy it! It will not be displayed again!\n\n${e.value||""}`,cancel:!1,persistent:!0})}))},deleteApiKey(e){this.$q.dialog({title:"Confirm",message:`Delete key with id: ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteApiKey",e)}))}}});var u=a(12807),y=a(77716),m=a(9459),f=a(23316),h=a(44189),g=a(1693),b=a(46868),k=a(62669),_=a(39942),A=a(50492),x=a(39270),v=a(45262),K=a(98582),S=a.n(K);const F=(0,u.A)(p,[["render",o]]),q=F;S()(p,"components",{QPage:y.A,QExpansionItem:m.A,QCard:f.A,QCardSection:h.A,QBtn:g.A,QBanner:b.A,QCardActions:k.A,QTable:_.A,QIcon:A.A,QInput:x.A,QTd:v.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[301],{54699:(e,t,a)=>{a.r(t),a.d(t,{default:()=>q});var n=a(61758),i=a(58790);const s={class:"text-h6"};function o(e,t,a,o,l,r){const d=(0,n.g2)("q-btn"),c=(0,n.g2)("q-card-section"),p=(0,n.g2)("monaco-editor"),u=(0,n.g2)("q-banner"),y=(0,n.g2)("q-card-actions"),m=(0,n.g2)("q-card"),f=(0,n.g2)("q-expansion-item"),h=(0,n.g2)("q-icon"),g=(0,n.g2)("q-input"),b=(0,n.g2)("q-td"),k=(0,n.g2)("q-table"),_=(0,n.g2)("q-page");return(0,n.uX)(),(0,n.Wv)(_,{padding:""},{default:(0,n.k6)((()=>[(0,n.bF)(f,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:"Create API Key","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":t[4]||(t[4]=t=>e.expanded=t)},{default:(0,n.k6)((()=>[(0,n.bF)(m,{style:{height:"60vh"},class:"bg-surface column"},{default:(0,n.k6)((()=>[(0,n.bF)(c,{class:"q-gutter-md"},{default:(0,n.k6)((()=>[(0,n.bF)(d,{flat:"",onClick:t[0]||(t[0]=t=>e.loadAdminKey())},{default:(0,n.k6)((()=>t[6]||(t[6]=[(0,n.eW)("Admin Key Example")]))),_:1}),(0,n.bF)(d,{flat:"",onClick:t[1]||(t[1]=t=>e.loadSearchKey())},{default:(0,n.k6)((()=>t[7]||(t[7]=[(0,n.eW)("Search Key Example")]))),_:1}),(0,n.bF)(d,{type:"a",icon:"sym_s_help","no-caps":"",color:"info",flat:"",dense:"",href:`https://typesense.org/docs/${e.$store.state.node.data.debug.version}/api/api-keys.html#create-an-api-key`,target:"_blank"},{default:(0,n.k6)((()=>t[8]||(t[8]=[(0,n.eW)("Documentation")]))),_:1},8,["href"])])),_:1}),(0,n.bF)(p,{modelValue:e.keyJson,"onUpdate:modelValue":t[2]||(t[2]=t=>e.keyJson=t)},null,8,["modelValue"]),e.jsonError?((0,n.uX)(),(0,n.Wv)(u,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,n.k6)((()=>[(0,n.eW)(" Invalid Format: "+(0,i.v_)(e.jsonError),1)])),_:1})):(0,n.Q3)("",!0),(0,n.bF)(y,{align:"right",class:"bg-primary"},{default:(0,n.k6)((()=>[(0,n.bF)(d,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!!e.jsonError,onClick:t[3]||(t[3]=t=>e.createApiKey())},{default:(0,n.k6)((()=>t[9]||(t[9]=[(0,n.eW)("Create API Key")]))),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["modelValue"]),(0,n.bF)(k,{class:"q-mt-md",title:"API Keys",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.apiKeys,columns:e.columns,"row-key":"id","visible-columns":["id","value_prefix","description","actions","collections","expires_at","actions_op"]},{"top-left":(0,n.k6)((()=>[(0,n.Lk)("div",s,[(0,n.bF)(h,{size:"md",name:"sym_s_key"}),t[10]||(t[10]=(0,n.eW)(" API Keys"))])])),"top-right":(0,n.k6)((()=>[(0,n.bF)(g,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[5]||(t[5]=t=>e.filter=t),placeholder:"Search"},{append:(0,n.k6)((()=>[(0,n.bF)(h,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions_op":(0,n.k6)((t=>[(0,n.bF)(b,{class:"text-right"},{default:(0,n.k6)((()=>[(0,n.bF)(d,{flat:"",color:"negative",onClick:a=>e.deleteApiKey(t.row.id),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var l=a(74701),r=function(e,t,a,n){function i(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function o(e){try{r(n.next(e))}catch(e){s(e)}}function l(e){try{r(n["throw"](e))}catch(e){s(e)}}function r(e){e.done?a(e.value):i(e.value).then(o,l)}r((n=n.apply(e,t||[])).next())}))};const d={description:"Admin key.",actions:["*"],collections:["*"]},c={description:"Search-only companies key.",actions:["documents:search"],collections:["companies"]},p=(0,n.pM)({name:"ApiKeys",components:{MonacoEditor:l.A},data(){return{jsonError:null,key:JSON.parse(JSON.stringify(d)),expanded:0===this.$store.state.node.data.apiKeys.length,filter:"",columns:[{label:"ID",name:"id",field:"id",sortable:!0},{label:"Key prefix",name:"value_prefix",field:"value_prefix"},{label:"Description",name:"description",field:"description",sortable:!0,align:"left"},{label:"Key Actions",name:"actions",field:e=>JSON.stringify(e.actions),sortable:!0,align:"left"},{label:"Collections",name:"collections",field:e=>JSON.stringify(e.collections),sortable:!0,align:"left"},{label:"Expires at",name:"expires_at",field:e=>e.expires_at?64723363199===e.expires_at?"never":new Date(1e3*e.expires_at).toLocaleString():""},{label:"Actions",name:"actions_op",align:"right"}]}},computed:{keyJson:{get(){return JSON.stringify(this.key,null,2)},set(e){try{this.key=JSON.parse(e),this.jsonError=null}catch(e){this.jsonError=e.message}}}},methods:{loadAdminKey(){this.key=JSON.parse(JSON.stringify(d))},loadSearchKey(){this.key=JSON.parse(JSON.stringify(c))},createApiKey(){return r(this,void 0,void 0,(function*(){const e=yield this.$store.dispatch("node/createApiKey",JSON.parse(JSON.stringify(this.key)));this.$q.dialog({title:"Your API key",message:`This is your API key copy it! It will not be displayed again!\n\n${e.value||""}`,cancel:!1,persistent:!0})}))},deleteApiKey(e){this.$q.dialog({title:"Confirm",message:`Delete key with id: ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteApiKey",e)}))}}});var u=a(12807),y=a(77716),m=a(9459),f=a(23316),h=a(44189),g=a(1693),b=a(46868),k=a(62669),_=a(39942),A=a(50492),x=a(39270),v=a(45262),K=a(98582),S=a.n(K);const F=(0,u.A)(p,[["render",o]]),q=F;S()(p,"components",{QPage:y.A,QExpansionItem:m.A,QCard:f.A,QCardSection:h.A,QBtn:g.A,QBanner:b.A,QCardActions:k.A,QTable:_.A,QIcon:A.A,QInput:x.A,QTd:v.A})}}]); \ No newline at end of file diff --git a/js/306.4c4ca9ac.js b/js/306.8497df5f.js similarity index 97% rename from js/306.4c4ca9ac.js rename to js/306.8497df5f.js index 46f783b..d1ffe60 100644 --- a/js/306.4c4ca9ac.js +++ b/js/306.8497df5f.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[306],{78306:(e,t,o)=>{o.r(t),o.d(t,{default:()=>q});var s=o(61758),l=o(58790);const d={class:"text-h6"};function a(e,t,o,a,n,r){const i=(0,s.g2)("q-input"),c=(0,s.g2)("q-btn"),p=(0,s.g2)("q-select"),u=(0,s.g2)("q-card-section"),m=(0,s.g2)("q-banner"),w=(0,s.g2)("q-card-actions"),b=(0,s.g2)("q-card"),f=(0,s.g2)("q-expansion-item"),h=(0,s.g2)("q-icon"),g=(0,s.g2)("q-chip"),_=(0,s.g2)("q-td"),S=(0,s.g2)("q-table"),k=(0,s.g2)("q-page");return(0,s.uX)(),(0,s.Wv)(k,{padding:""},{default:(0,s.k6)((()=>[(0,s.bF)(f,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Stopwords Set","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":t[4]||(t[4]=t=>e.expanded=t)},{default:(0,s.k6)((()=>[(0,s.bF)(b,{class:"bg-surface column"},{default:(0,s.k6)((()=>[(0,s.bF)(u,{class:"q-col-gutter-md row"},{default:(0,s.k6)((()=>[(0,s.bF)(i,{class:"col-12 col-sm-6",modelValue:e.stopwordsSet.id,"onUpdate:modelValue":t[0]||(t[0]=t=>e.stopwordsSet.id=t),label:"ID",filled:"",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"]),(0,s.bF)(i,{filled:"",label:"Locale",modelValue:e.stopwordsSet.locale,"onUpdate:modelValue":t[1]||(t[1]=t=>e.stopwordsSet.locale=t),class:"col-12 col-sm-4"},null,8,["modelValue"]),(0,s.bF)(c,{type:"a",icon:"sym_s_help","no-caps":"",color:"info",flat:"",dense:"",href:`https://typesense.org/docs/${e.$store.state.node.data.debug.version}/api/stopwords.html`,target:"_blank"},{default:(0,s.k6)((()=>t[6]||(t[6]=[(0,s.eW)(" Documentation ")]))),_:1},8,["href"]),(0,s.bF)(p,{class:"col-12",filled:"",modelValue:e.stopwordsSet.stopwords,"onUpdate:modelValue":t[2]||(t[2]=t=>e.stopwordsSet.stopwords=t),multiple:"","use-chips":"","use-input":"","new-value-mode":"add","stack-label":"","hide-dropdown-icon":"",label:"Stopwords",hint:"Enter a stopword and press enter"},null,8,["modelValue"])])),_:1}),e.jsonError?((0,s.uX)(),(0,s.Wv)(m,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,s.k6)((()=>[(0,s.eW)(" Invalid Format: "+(0,l.v_)(e.jsonError),1)])),_:1})):(0,s.Q3)("",!0),(0,s.bF)(w,{align:"right",class:"bg-primary"},{default:(0,s.k6)((()=>[(0,s.bF)(c,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!!e.jsonError,onClick:t[3]||(t[3]=t=>e.createStopwordsSet())},{default:(0,s.k6)((()=>[(0,s.eW)((0,l.v_)(e.isUpdate?"Update":"Add")+" Set ",1)])),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,s.bF)(S,{class:"q-mt-md",title:"Search Presets",flat:"",bordered:"","wrap-cells":"",filter:e.filter,rows:e.$store.state.node.data.stopwords,columns:e.columns,"row-key":"id"},{"top-left":(0,s.k6)((()=>[(0,s.Lk)("div",d,[(0,s.bF)(h,{size:"md",name:"sym_s_playlist_remove"}),t[7]||(t[7]=(0,s.eW)(" Stopwords Sets "))])])),"top-right":(0,s.k6)((()=>[(0,s.bF)(i,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[5]||(t[5]=t=>e.filter=t),placeholder:"Search"},{append:(0,s.k6)((()=>[(0,s.bF)(h,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-stopwords":(0,s.k6)((e=>[(0,s.bF)(_,null,{default:(0,s.k6)((()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.row.stopwords,(e=>((0,s.uX)(),(0,s.Wv)(g,{key:e},{default:(0,s.k6)((()=>[(0,s.eW)((0,l.v_)(e),1)])),_:2},1024)))),128))])),_:2},1024)])),"body-cell-actions_op":(0,s.k6)((t=>[(0,s.bF)(_,{class:"text-right text-no-wrap"},{default:(0,s.k6)((()=>[(0,s.bF)(c,{flat:"",onClick:o=>e.editStopwordsSet(t.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,s.bF)(c,{flat:"",color:"negative",onClick:o=>e.deleteStopwordsSet(t.row.id),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var n=function(e,t,o,s){function l(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,d){function a(e){try{r(s.next(e))}catch(t){d(t)}}function n(e){try{r(s["throw"](e))}catch(t){d(t)}}function r(e){e.done?o(e.value):l(e.value).then(a,n)}r((s=s.apply(e,t||[])).next())}))};const r=(0,s.pM)({name:"Stopwords",data(){return{jsonError:null,stopwordsSet:{id:"stopword_set1",locale:"en",stopwords:["states","united","france","germany","italy"]},expanded:0===this.$store.state.node.data.stopwords.length,filter:"",columns:[{label:"ID",name:"id",field:"id",sortable:!0,align:"left"},{label:"Locale",name:"locale",field:"locale",sortable:!0,align:"left"},{label:"Stopwords",name:"stopwords",field:"stopwords",sortable:!0,align:"left"},{label:"Actions",name:"actions_op",align:"right"}]}},computed:{isUpdate(){return this.$store.state.node.data.stopwords.map((e=>e.id)).includes(this.stopwordsSet.id)}},mounted(){this.$store.dispatch("node/getStopwords")},methods:{createStopwordsSet(){return n(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/upsertStopwords",JSON.parse(JSON.stringify(this.stopwordsSet)))}))},editStopwordsSet(e){this.stopwordsSet=JSON.parse(JSON.stringify(e)),this.expanded=!0},deleteStopwordsSet(e){this.$q.dialog({title:"Confirm",message:`Delete stopwords set ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteStopwords",e)}))}}});var i=o(12807),c=o(77716),p=o(9459),u=o(23316),m=o(44189),w=o(39270),b=o(1693),f=o(75848),h=o(46868),g=o(62669),_=o(39942),S=o(50492),k=o(45262),y=o(66760),v=o(98582),F=o.n(v);const A=(0,i.A)(r,[["render",a]]),q=A;F()(r,"components",{QPage:c.A,QExpansionItem:p.A,QCard:u.A,QCardSection:m.A,QInput:w.A,QBtn:b.A,QSelect:f.A,QBanner:h.A,QCardActions:g.A,QTable:_.A,QIcon:S.A,QTd:k.A,QChip:y.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[306],{78306:(e,t,o)=>{o.r(t),o.d(t,{default:()=>q});var s=o(61758),l=o(58790);const d={class:"text-h6"};function a(e,t,o,a,n,r){const i=(0,s.g2)("q-input"),c=(0,s.g2)("q-btn"),p=(0,s.g2)("q-select"),u=(0,s.g2)("q-card-section"),m=(0,s.g2)("q-banner"),w=(0,s.g2)("q-card-actions"),b=(0,s.g2)("q-card"),f=(0,s.g2)("q-expansion-item"),h=(0,s.g2)("q-icon"),g=(0,s.g2)("q-chip"),_=(0,s.g2)("q-td"),S=(0,s.g2)("q-table"),k=(0,s.g2)("q-page");return(0,s.uX)(),(0,s.Wv)(k,{padding:""},{default:(0,s.k6)((()=>[(0,s.bF)(f,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Stopwords Set","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":t[4]||(t[4]=t=>e.expanded=t)},{default:(0,s.k6)((()=>[(0,s.bF)(b,{class:"bg-surface column"},{default:(0,s.k6)((()=>[(0,s.bF)(u,{class:"q-col-gutter-md row"},{default:(0,s.k6)((()=>[(0,s.bF)(i,{class:"col-12 col-sm-6",modelValue:e.stopwordsSet.id,"onUpdate:modelValue":t[0]||(t[0]=t=>e.stopwordsSet.id=t),label:"ID",filled:"",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"]),(0,s.bF)(i,{filled:"",label:"Locale",modelValue:e.stopwordsSet.locale,"onUpdate:modelValue":t[1]||(t[1]=t=>e.stopwordsSet.locale=t),class:"col-12 col-sm-4"},null,8,["modelValue"]),(0,s.bF)(c,{type:"a",icon:"sym_s_help","no-caps":"",color:"info",flat:"",dense:"",href:`https://typesense.org/docs/${e.$store.state.node.data.debug.version}/api/stopwords.html`,target:"_blank"},{default:(0,s.k6)((()=>t[6]||(t[6]=[(0,s.eW)(" Documentation ")]))),_:1},8,["href"]),(0,s.bF)(p,{class:"col-12",filled:"",modelValue:e.stopwordsSet.stopwords,"onUpdate:modelValue":t[2]||(t[2]=t=>e.stopwordsSet.stopwords=t),multiple:"","use-chips":"","use-input":"","new-value-mode":"add","stack-label":"","hide-dropdown-icon":"",label:"Stopwords",hint:"Enter a stopword and press enter"},null,8,["modelValue"])])),_:1}),e.jsonError?((0,s.uX)(),(0,s.Wv)(m,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,s.k6)((()=>[(0,s.eW)(" Invalid Format: "+(0,l.v_)(e.jsonError),1)])),_:1})):(0,s.Q3)("",!0),(0,s.bF)(w,{align:"right",class:"bg-primary"},{default:(0,s.k6)((()=>[(0,s.bF)(c,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!!e.jsonError,onClick:t[3]||(t[3]=t=>e.createStopwordsSet())},{default:(0,s.k6)((()=>[(0,s.eW)((0,l.v_)(e.isUpdate?"Update":"Add")+" Set ",1)])),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,s.bF)(S,{class:"q-mt-md",title:"Search Presets",flat:"",bordered:"","wrap-cells":"",filter:e.filter,rows:e.$store.state.node.data.stopwords,columns:e.columns,"row-key":"id"},{"top-left":(0,s.k6)((()=>[(0,s.Lk)("div",d,[(0,s.bF)(h,{size:"md",name:"sym_s_playlist_remove"}),t[7]||(t[7]=(0,s.eW)(" Stopwords Sets "))])])),"top-right":(0,s.k6)((()=>[(0,s.bF)(i,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[5]||(t[5]=t=>e.filter=t),placeholder:"Search"},{append:(0,s.k6)((()=>[(0,s.bF)(h,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-stopwords":(0,s.k6)((e=>[(0,s.bF)(_,null,{default:(0,s.k6)((()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.row.stopwords,(e=>((0,s.uX)(),(0,s.Wv)(g,{key:e},{default:(0,s.k6)((()=>[(0,s.eW)((0,l.v_)(e),1)])),_:2},1024)))),128))])),_:2},1024)])),"body-cell-actions_op":(0,s.k6)((t=>[(0,s.bF)(_,{class:"text-right text-no-wrap"},{default:(0,s.k6)((()=>[(0,s.bF)(c,{flat:"",onClick:o=>e.editStopwordsSet(t.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,s.bF)(c,{flat:"",color:"negative",onClick:o=>e.deleteStopwordsSet(t.row.id),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var n=function(e,t,o,s){function l(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,d){function a(e){try{r(s.next(e))}catch(e){d(e)}}function n(e){try{r(s["throw"](e))}catch(e){d(e)}}function r(e){e.done?o(e.value):l(e.value).then(a,n)}r((s=s.apply(e,t||[])).next())}))};const r=(0,s.pM)({name:"Stopwords",data(){return{jsonError:null,stopwordsSet:{id:"stopword_set1",locale:"en",stopwords:["states","united","france","germany","italy"]},expanded:0===this.$store.state.node.data.stopwords.length,filter:"",columns:[{label:"ID",name:"id",field:"id",sortable:!0,align:"left"},{label:"Locale",name:"locale",field:"locale",sortable:!0,align:"left"},{label:"Stopwords",name:"stopwords",field:"stopwords",sortable:!0,align:"left"},{label:"Actions",name:"actions_op",align:"right"}]}},computed:{isUpdate(){return this.$store.state.node.data.stopwords.map((e=>e.id)).includes(this.stopwordsSet.id)}},mounted(){this.$store.dispatch("node/getStopwords")},methods:{createStopwordsSet(){return n(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/upsertStopwords",JSON.parse(JSON.stringify(this.stopwordsSet)))}))},editStopwordsSet(e){this.stopwordsSet=JSON.parse(JSON.stringify(e)),this.expanded=!0},deleteStopwordsSet(e){this.$q.dialog({title:"Confirm",message:`Delete stopwords set ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteStopwords",e)}))}}});var i=o(12807),c=o(77716),p=o(9459),u=o(23316),m=o(44189),w=o(39270),b=o(1693),f=o(75848),h=o(46868),g=o(62669),_=o(39942),S=o(50492),k=o(45262),y=o(66760),v=o(98582),F=o.n(v);const A=(0,i.A)(r,[["render",a]]),q=A;F()(r,"components",{QPage:c.A,QExpansionItem:p.A,QCard:u.A,QCardSection:m.A,QInput:w.A,QBtn:b.A,QSelect:f.A,QBanner:h.A,QCardActions:g.A,QTable:_.A,QIcon:S.A,QTd:k.A,QChip:y.A})}}]); \ No newline at end of file diff --git a/js/318.47bb3c9e.js b/js/318.ec047357.js similarity index 98% rename from js/318.47bb3c9e.js rename to js/318.ec047357.js index 81e1d9f..1f551f0 100644 --- a/js/318.47bb3c9e.js +++ b/js/318.ec047357.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[318],{75318:(e,a,l)=>{l.r(a),l.d(a,{default:()=>F});var t=l(61758),n=l(58790);const s={class:"text-h6"};function i(e,a,l,i,o,d){const c=(0,t.g2)("q-input"),r=(0,t.g2)("q-select"),m=(0,t.g2)("q-card-section"),u=(0,t.g2)("q-btn"),p=(0,t.g2)("q-card-actions"),b=(0,t.g2)("q-card"),f=(0,t.g2)("q-expansion-item"),_=(0,t.g2)("q-icon"),h=(0,t.g2)("q-td"),g=(0,t.g2)("q-table"),A=(0,t.g2)("q-page");return(0,t.uX)(),(0,t.Wv)(A,{padding:""},{default:(0,t.k6)((()=>[(0,t.bF)(f,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Alias","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":a[3]||(a[3]=a=>e.expanded=a)},{default:(0,t.k6)((()=>[(0,t.bF)(b,{class:"bg-surface column"},{default:(0,t.k6)((()=>[(0,t.bF)(m,null,{default:(0,t.k6)((()=>[(0,t.bF)(c,{modelValue:e.alias.name,"onUpdate:modelValue":a[0]||(a[0]=a=>e.alias.name=a),label:"Alias name",filled:"",rules:[a=>!e.collectionNames.includes(a)||"Must not be a collection name"]},null,8,["modelValue","rules"]),(0,t.bF)(r,{modelValue:e.alias.collection_name,"onUpdate:modelValue":a[1]||(a[1]=a=>e.alias.collection_name=a),label:"Target Collection",filled:"",options:e.collectionNames},null,8,["modelValue","options"])])),_:1}),(0,t.bF)(p,{align:"right",class:"bg-primary"},{default:(0,t.k6)((()=>[(0,t.bF)(u,{size:"md",padding:"sm lg",unelevated:"",color:"primary",onClick:a[2]||(a[2]=a=>e.createAlias())},{default:(0,t.k6)((()=>[(0,t.eW)((0,n.v_)(e.isUpdate?"Update":"Add")+" Alias",1)])),_:1})])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,t.bF)(g,{class:"q-mt-md",title:"Aliases",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.aliases,columns:e.columns,"row-key":"name","visible-columns":["name","collection_name","actions"],pagination:{rowsPerPage:50,sortBy:"name"}},{"top-left":(0,t.k6)((()=>[(0,t.Lk)("div",s,[(0,t.bF)(_,{size:"md",name:"sym_s_call_split"}),a[5]||(a[5]=(0,t.eW)(" Aliases"))])])),"top-right":(0,t.k6)((()=>[(0,t.bF)(c,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":a[4]||(a[4]=a=>e.filter=a),placeholder:"Search"},{append:(0,t.k6)((()=>[(0,t.bF)(_,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions":(0,t.k6)((a=>[(0,t.bF)(h,{class:"text-right"},{default:(0,t.k6)((()=>[(0,t.bF)(u,{flat:"",onClick:l=>e.editAlias(a.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,t.bF)(u,{flat:"",color:"negative",onClick:l=>e.deleteAlias(a.row.name),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var o=function(e,a,l,t){function n(e){return e instanceof l?e:new l((function(a){a(e)}))}return new(l||(l=Promise))((function(l,s){function i(e){try{d(t.next(e))}catch(a){s(a)}}function o(e){try{d(t["throw"](e))}catch(a){s(a)}}function d(e){e.done?l(e.value):n(e.value).then(i,o)}d((t=t.apply(e,a||[])).next())}))};const d=(0,t.pM)({name:"Aliases",data(){return{alias:{name:"",collection_name:""},expanded:0===this.$store.state.node.data.aliases.length,filter:"",columns:[{label:"Alias Name",name:"name",field:"name",align:"left",sortable:!0},{label:"Collection Name",name:"collection_name",field:"collection_name",align:"left",sortable:!0},{label:"Actions",name:"actions",align:"right"}]}},computed:{collectionNames(){return this.$store.state.node.data.collections.map((e=>e.name))},isUpdate(){return this.$store.state.node.data.aliases.map((e=>e.name)).includes(this.alias.name)}},methods:{createAlias(){return o(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/createAlias",{name:this.alias.name,collection_name:this.alias.collection_name}),this.alias={name:"",collection_name:""},this.expanded=!1}))},editAlias(e){this.alias=JSON.parse(JSON.stringify(e)),this.expanded=!0},deleteAlias(e){this.$q.dialog({title:"Confirm",message:`Delete alias ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteAlias",e)}))}}});var c=l(12807),r=l(77716),m=l(9459),u=l(23316),p=l(44189),b=l(39270),f=l(75848),_=l(62669),h=l(1693),g=l(39942),A=l(50492),k=l(45262),y=l(98582),x=l.n(y);const v=(0,c.A)(d,[["render",i]]),F=v;x()(d,"components",{QPage:r.A,QExpansionItem:m.A,QCard:u.A,QCardSection:p.A,QInput:b.A,QSelect:f.A,QCardActions:_.A,QBtn:h.A,QTable:g.A,QIcon:A.A,QTd:k.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[318],{75318:(e,a,l)=>{l.r(a),l.d(a,{default:()=>F});var t=l(61758),n=l(58790);const s={class:"text-h6"};function i(e,a,l,i,o,d){const c=(0,t.g2)("q-input"),r=(0,t.g2)("q-select"),m=(0,t.g2)("q-card-section"),u=(0,t.g2)("q-btn"),p=(0,t.g2)("q-card-actions"),b=(0,t.g2)("q-card"),f=(0,t.g2)("q-expansion-item"),_=(0,t.g2)("q-icon"),h=(0,t.g2)("q-td"),g=(0,t.g2)("q-table"),A=(0,t.g2)("q-page");return(0,t.uX)(),(0,t.Wv)(A,{padding:""},{default:(0,t.k6)((()=>[(0,t.bF)(f,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Alias","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":a[3]||(a[3]=a=>e.expanded=a)},{default:(0,t.k6)((()=>[(0,t.bF)(b,{class:"bg-surface column"},{default:(0,t.k6)((()=>[(0,t.bF)(m,null,{default:(0,t.k6)((()=>[(0,t.bF)(c,{modelValue:e.alias.name,"onUpdate:modelValue":a[0]||(a[0]=a=>e.alias.name=a),label:"Alias name",filled:"",rules:[a=>!e.collectionNames.includes(a)||"Must not be a collection name"]},null,8,["modelValue","rules"]),(0,t.bF)(r,{modelValue:e.alias.collection_name,"onUpdate:modelValue":a[1]||(a[1]=a=>e.alias.collection_name=a),label:"Target Collection",filled:"",options:e.collectionNames},null,8,["modelValue","options"])])),_:1}),(0,t.bF)(p,{align:"right",class:"bg-primary"},{default:(0,t.k6)((()=>[(0,t.bF)(u,{size:"md",padding:"sm lg",unelevated:"",color:"primary",onClick:a[2]||(a[2]=a=>e.createAlias())},{default:(0,t.k6)((()=>[(0,t.eW)((0,n.v_)(e.isUpdate?"Update":"Add")+" Alias",1)])),_:1})])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,t.bF)(g,{class:"q-mt-md",title:"Aliases",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.aliases,columns:e.columns,"row-key":"name","visible-columns":["name","collection_name","actions"],pagination:{rowsPerPage:50,sortBy:"name"}},{"top-left":(0,t.k6)((()=>[(0,t.Lk)("div",s,[(0,t.bF)(_,{size:"md",name:"sym_s_call_split"}),a[5]||(a[5]=(0,t.eW)(" Aliases"))])])),"top-right":(0,t.k6)((()=>[(0,t.bF)(c,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":a[4]||(a[4]=a=>e.filter=a),placeholder:"Search"},{append:(0,t.k6)((()=>[(0,t.bF)(_,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions":(0,t.k6)((a=>[(0,t.bF)(h,{class:"text-right"},{default:(0,t.k6)((()=>[(0,t.bF)(u,{flat:"",onClick:l=>e.editAlias(a.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,t.bF)(u,{flat:"",color:"negative",onClick:l=>e.deleteAlias(a.row.name),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var o=function(e,a,l,t){function n(e){return e instanceof l?e:new l((function(a){a(e)}))}return new(l||(l=Promise))((function(l,s){function i(e){try{d(t.next(e))}catch(e){s(e)}}function o(e){try{d(t["throw"](e))}catch(e){s(e)}}function d(e){e.done?l(e.value):n(e.value).then(i,o)}d((t=t.apply(e,a||[])).next())}))};const d=(0,t.pM)({name:"Aliases",data(){return{alias:{name:"",collection_name:""},expanded:0===this.$store.state.node.data.aliases.length,filter:"",columns:[{label:"Alias Name",name:"name",field:"name",align:"left",sortable:!0},{label:"Collection Name",name:"collection_name",field:"collection_name",align:"left",sortable:!0},{label:"Actions",name:"actions",align:"right"}]}},computed:{collectionNames(){return this.$store.state.node.data.collections.map((e=>e.name))},isUpdate(){return this.$store.state.node.data.aliases.map((e=>e.name)).includes(this.alias.name)}},methods:{createAlias(){return o(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/createAlias",{name:this.alias.name,collection_name:this.alias.collection_name}),this.alias={name:"",collection_name:""},this.expanded=!1}))},editAlias(e){this.alias=JSON.parse(JSON.stringify(e)),this.expanded=!0},deleteAlias(e){this.$q.dialog({title:"Confirm",message:`Delete alias ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteAlias",e)}))}}});var c=l(12807),r=l(77716),m=l(9459),u=l(23316),p=l(44189),b=l(39270),f=l(75848),_=l(62669),h=l(1693),g=l(39942),A=l(50492),k=l(45262),y=l(98582),x=l.n(y);const v=(0,c.A)(d,[["render",i]]),F=v;x()(d,"components",{QPage:r.A,QExpansionItem:m.A,QCard:u.A,QCardSection:p.A,QInput:b.A,QSelect:f.A,QCardActions:_.A,QBtn:h.A,QTable:g.A,QIcon:A.A,QTd:k.A})}}]); \ No newline at end of file diff --git a/js/335.408fd58d.js b/js/335.1ed10d68.js similarity index 100% rename from js/335.408fd58d.js rename to js/335.1ed10d68.js diff --git a/js/40.f71b1fd6.js b/js/40.3afac33f.js similarity index 98% rename from js/40.f71b1fd6.js rename to js/40.3afac33f.js index e30d308..221bcb4 100644 --- a/js/40.f71b1fd6.js +++ b/js/40.3afac33f.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[40],{68040:(e,l,t)=>{t.r(l),t.d(l,{default:()=>q});var a=t(61758),n=t(58790);const s={class:"text-h6"};function o(e,l,t,o,i,d){const c=(0,a.g2)("q-input"),r=(0,a.g2)("q-card-section"),u=(0,a.g2)("q-select"),m=(0,a.g2)("q-btn"),p=(0,a.g2)("q-card-actions"),b=(0,a.g2)("q-card"),f=(0,a.g2)("q-expansion-item"),g=(0,a.g2)("q-icon"),h=(0,a.g2)("q-td"),y=(0,a.g2)("q-table"),_=(0,a.g2)("q-page");return(0,a.uX)(),(0,a.Wv)(_,{padding:""},{default:(0,a.k6)((()=>[(0,a.bF)(f,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Analytics Rule","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":l[6]||(l[6]=l=>e.expanded=l)},{default:(0,a.k6)((()=>[(0,a.bF)(b,{class:"bg-surface column"},{default:(0,a.k6)((()=>[(0,a.bF)(r,{class:"row q-col-gutter-md"},{default:(0,a.k6)((()=>[(0,a.bF)(c,{class:"col-12 col-sm-6",modelValue:e.rule.name,"onUpdate:modelValue":l[0]||(l[0]=l=>e.rule.name=l),label:"Rule Name",filled:"",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"]),(0,a.bF)(c,{class:"col-12 col-sm-6",modelValue:e.rule.type,"onUpdate:modelValue":l[1]||(l[1]=l=>e.rule.type=l),label:"Rule Type",filled:"",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"])])),_:1}),(0,a.bF)(r,{class:"row q-col-gutter-md"},{default:(0,a.k6)((()=>[(0,a.bF)(u,{class:"col-12 col-sm-6",modelValue:e.rule.params.source.collections,"onUpdate:modelValue":l[2]||(l[2]=l=>e.rule.params.source.collections=l),label:"Source Collection(s)",filled:"",options:e.collectionNames,multiple:"",hint:"Track searches sent to these collections"},null,8,["modelValue","options"]),(0,a.bF)(u,{class:"col-12 col-sm-6",modelValue:e.rule.params.destination.collection,"onUpdate:modelValue":l[3]||(l[3]=l=>e.rule.params.destination.collection=l),label:"Destination Collection",filled:"",options:e.collectionNames},null,8,["modelValue","options"])])),_:1}),(0,a.bF)(r,{class:"row q-col-gutter-md"},{default:(0,a.k6)((()=>[(0,a.bF)(c,{class:"col-12 col-sm-6",modelValue:e.rule.params.limit,"onUpdate:modelValue":l[4]||(l[4]=l=>e.rule.params.limit=l),label:"Limit",filled:"",type:"number",min:"0"},null,8,["modelValue"])])),_:1}),(0,a.bF)(p,{align:"right",class:"bg-primary"},{default:(0,a.k6)((()=>[(0,a.bF)(m,{size:"md",padding:"sm lg",unelevated:"",color:"primary",onClick:l[5]||(l[5]=l=>e.createRule())},{default:(0,a.k6)((()=>[(0,a.eW)((0,n.v_)(e.isUpdate?"Update":"Add")+" Rule",1)])),_:1})])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,a.bF)(y,{class:"q-mt-md",title:"Analytics Rules",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.analyticsRules,columns:e.columns,"row-key":"name",pagination:{rowsPerPage:50,sortBy:"name"}},{"top-left":(0,a.k6)((()=>[(0,a.Lk)("div",s,[(0,a.bF)(g,{size:"md",name:"sym_s_query_stats"}),l[8]||(l[8]=(0,a.eW)(" Analytics Rules "))])])),"top-right":(0,a.k6)((()=>[(0,a.bF)(c,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":l[7]||(l[7]=l=>e.filter=l),placeholder:"Search"},{append:(0,a.k6)((()=>[(0,a.bF)(g,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions":(0,a.k6)((l=>[(0,a.bF)(h,{class:"text-right"},{default:(0,a.k6)((()=>[(0,a.bF)(m,{flat:"",onClick:t=>e.editRule(l.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,a.bF)(m,{flat:"",color:"negative",onClick:t=>e.deleteRule(l.row.name),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var i=function(e,l,t,a){function n(e){return e instanceof t?e:new t((function(l){l(e)}))}return new(t||(t=Promise))((function(t,s){function o(e){try{d(a.next(e))}catch(l){s(l)}}function i(e){try{d(a["throw"](e))}catch(l){s(l)}}function d(e){e.done?t(e.value):n(e.value).then(o,i)}d((a=a.apply(e,l||[])).next())}))};function d(){return{name:"",type:"popular_queries",params:{source:{collections:[]},destination:{collection:""},limit:100}}}const c=(0,a.pM)({name:"AnalyticsRules",data(){return{rule:d(),expanded:0===this.$store.state.node.data.analyticsRules.length,filter:"",columns:[{label:"Rule Name",name:"name",field:"name",align:"left",sortable:!0},{label:"Rule Type",name:"type",field:"type",align:"left",sortable:!0},{label:"Source Collection(s)",name:"source",field:e=>e.params.source.collections.join(", "),align:"left",sortable:!0},{label:"Destination Collection",name:"destination",field:e=>e.params.destination.collection,align:"left",sortable:!0},{label:"Limit",name:"limit",field:e=>e.params.limit,align:"right",sortable:!0},{label:"Actions",name:"actions",align:"right"}]}},mounted(){this.$store.dispatch("node/getAnalyticsRules")},computed:{collectionNames(){return this.$store.state.node.data.collections.map((e=>e.name))},isUpdate(){return this.$store.state.node.data.analyticsRules.map((e=>e.name)).includes(this.rule.name)}},methods:{createRule(){return i(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/createAnalyticsRule",this.rule),this.expanded=!1,this.rule=d()}))},editRule(e){this.rule=JSON.parse(JSON.stringify(e)),this.expanded=!0},deleteRule(e){this.$q.dialog({title:"Confirm",message:`Delete analytics rule ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteAnalyticsRule",e)}))}}});var r=t(12807),u=t(77716),m=t(9459),p=t(23316),b=t(44189),f=t(39270),g=t(75848),h=t(62669),y=t(1693),_=t(39942),k=t(50492),A=t(45262),F=t(98582),R=t.n(F);const V=(0,r.A)(c,[["render",o]]),q=V;R()(c,"components",{QPage:u.A,QExpansionItem:m.A,QCard:p.A,QCardSection:b.A,QInput:f.A,QSelect:g.A,QCardActions:h.A,QBtn:y.A,QTable:_.A,QIcon:k.A,QTd:A.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[40],{68040:(e,l,t)=>{t.r(l),t.d(l,{default:()=>q});var a=t(61758),n=t(58790);const s={class:"text-h6"};function o(e,l,t,o,i,d){const c=(0,a.g2)("q-input"),r=(0,a.g2)("q-card-section"),u=(0,a.g2)("q-select"),m=(0,a.g2)("q-btn"),p=(0,a.g2)("q-card-actions"),b=(0,a.g2)("q-card"),f=(0,a.g2)("q-expansion-item"),g=(0,a.g2)("q-icon"),h=(0,a.g2)("q-td"),y=(0,a.g2)("q-table"),_=(0,a.g2)("q-page");return(0,a.uX)(),(0,a.Wv)(_,{padding:""},{default:(0,a.k6)((()=>[(0,a.bF)(f,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Analytics Rule","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":l[6]||(l[6]=l=>e.expanded=l)},{default:(0,a.k6)((()=>[(0,a.bF)(b,{class:"bg-surface column"},{default:(0,a.k6)((()=>[(0,a.bF)(r,{class:"row q-col-gutter-md"},{default:(0,a.k6)((()=>[(0,a.bF)(c,{class:"col-12 col-sm-6",modelValue:e.rule.name,"onUpdate:modelValue":l[0]||(l[0]=l=>e.rule.name=l),label:"Rule Name",filled:"",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"]),(0,a.bF)(c,{class:"col-12 col-sm-6",modelValue:e.rule.type,"onUpdate:modelValue":l[1]||(l[1]=l=>e.rule.type=l),label:"Rule Type",filled:"",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"])])),_:1}),(0,a.bF)(r,{class:"row q-col-gutter-md"},{default:(0,a.k6)((()=>[(0,a.bF)(u,{class:"col-12 col-sm-6",modelValue:e.rule.params.source.collections,"onUpdate:modelValue":l[2]||(l[2]=l=>e.rule.params.source.collections=l),label:"Source Collection(s)",filled:"",options:e.collectionNames,multiple:"",hint:"Track searches sent to these collections"},null,8,["modelValue","options"]),(0,a.bF)(u,{class:"col-12 col-sm-6",modelValue:e.rule.params.destination.collection,"onUpdate:modelValue":l[3]||(l[3]=l=>e.rule.params.destination.collection=l),label:"Destination Collection",filled:"",options:e.collectionNames},null,8,["modelValue","options"])])),_:1}),(0,a.bF)(r,{class:"row q-col-gutter-md"},{default:(0,a.k6)((()=>[(0,a.bF)(c,{class:"col-12 col-sm-6",modelValue:e.rule.params.limit,"onUpdate:modelValue":l[4]||(l[4]=l=>e.rule.params.limit=l),label:"Limit",filled:"",type:"number",min:"0"},null,8,["modelValue"])])),_:1}),(0,a.bF)(p,{align:"right",class:"bg-primary"},{default:(0,a.k6)((()=>[(0,a.bF)(m,{size:"md",padding:"sm lg",unelevated:"",color:"primary",onClick:l[5]||(l[5]=l=>e.createRule())},{default:(0,a.k6)((()=>[(0,a.eW)((0,n.v_)(e.isUpdate?"Update":"Add")+" Rule",1)])),_:1})])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,a.bF)(y,{class:"q-mt-md",title:"Analytics Rules",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.analyticsRules,columns:e.columns,"row-key":"name",pagination:{rowsPerPage:50,sortBy:"name"}},{"top-left":(0,a.k6)((()=>[(0,a.Lk)("div",s,[(0,a.bF)(g,{size:"md",name:"sym_s_query_stats"}),l[8]||(l[8]=(0,a.eW)(" Analytics Rules "))])])),"top-right":(0,a.k6)((()=>[(0,a.bF)(c,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":l[7]||(l[7]=l=>e.filter=l),placeholder:"Search"},{append:(0,a.k6)((()=>[(0,a.bF)(g,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions":(0,a.k6)((l=>[(0,a.bF)(h,{class:"text-right"},{default:(0,a.k6)((()=>[(0,a.bF)(m,{flat:"",onClick:t=>e.editRule(l.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,a.bF)(m,{flat:"",color:"negative",onClick:t=>e.deleteRule(l.row.name),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var i=function(e,l,t,a){function n(e){return e instanceof t?e:new t((function(l){l(e)}))}return new(t||(t=Promise))((function(t,s){function o(e){try{d(a.next(e))}catch(e){s(e)}}function i(e){try{d(a["throw"](e))}catch(e){s(e)}}function d(e){e.done?t(e.value):n(e.value).then(o,i)}d((a=a.apply(e,l||[])).next())}))};function d(){return{name:"",type:"popular_queries",params:{source:{collections:[]},destination:{collection:""},limit:100}}}const c=(0,a.pM)({name:"AnalyticsRules",data(){return{rule:d(),expanded:0===this.$store.state.node.data.analyticsRules.length,filter:"",columns:[{label:"Rule Name",name:"name",field:"name",align:"left",sortable:!0},{label:"Rule Type",name:"type",field:"type",align:"left",sortable:!0},{label:"Source Collection(s)",name:"source",field:e=>e.params.source.collections.join(", "),align:"left",sortable:!0},{label:"Destination Collection",name:"destination",field:e=>e.params.destination.collection,align:"left",sortable:!0},{label:"Limit",name:"limit",field:e=>e.params.limit,align:"right",sortable:!0},{label:"Actions",name:"actions",align:"right"}]}},mounted(){this.$store.dispatch("node/getAnalyticsRules")},computed:{collectionNames(){return this.$store.state.node.data.collections.map((e=>e.name))},isUpdate(){return this.$store.state.node.data.analyticsRules.map((e=>e.name)).includes(this.rule.name)}},methods:{createRule(){return i(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/createAnalyticsRule",this.rule),this.expanded=!1,this.rule=d()}))},editRule(e){this.rule=JSON.parse(JSON.stringify(e)),this.expanded=!0},deleteRule(e){this.$q.dialog({title:"Confirm",message:`Delete analytics rule ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteAnalyticsRule",e)}))}}});var r=t(12807),u=t(77716),m=t(9459),p=t(23316),b=t(44189),f=t(39270),g=t(75848),h=t(62669),y=t(1693),_=t(39942),k=t(50492),A=t(45262),F=t(98582),R=t.n(F);const V=(0,r.A)(c,[["render",o]]),q=V;R()(c,"components",{QPage:u.A,QExpansionItem:m.A,QCard:p.A,QCardSection:b.A,QInput:f.A,QSelect:g.A,QCardActions:h.A,QBtn:y.A,QTable:_.A,QIcon:k.A,QTd:A.A})}}]); \ No newline at end of file diff --git a/js/473.58dd100e.js b/js/473.bf36ce10.js similarity index 100% rename from js/473.58dd100e.js rename to js/473.bf36ce10.js diff --git a/js/536.bd078dcc.js b/js/536.4d551985.js similarity index 99% rename from js/536.bd078dcc.js rename to js/536.4d551985.js index 43be71b..ca44ea0 100644 --- a/js/536.bd078dcc.js +++ b/js/536.4d551985.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[536],{20536:(e,n,l)=>{l.r(n),l.d(n,{default:()=>F});var o=l(61758),t=l(58790);const s={class:"text-h6"};function a(e,n,l,a,i,d){const y=(0,o.g2)("q-input"),m=(0,o.g2)("q-option-group"),r=(0,o.g2)("q-select"),c=(0,o.g2)("q-card-section"),u=(0,o.g2)("q-separator"),p=(0,o.g2)("q-btn"),b=(0,o.g2)("q-card-actions"),h=(0,o.g2)("q-card"),_=(0,o.g2)("q-expansion-item"),f=(0,o.g2)("q-icon"),g=(0,o.g2)("q-td"),k=(0,o.g2)("q-table"),A=(0,o.g2)("q-page");return(0,o.uX)(),(0,o.Wv)(A,{padding:""},{default:(0,o.k6)((()=>[(0,o.bF)(_,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Synonym","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":n[7]||(n[7]=n=>e.expanded=n)},{default:(0,o.k6)((()=>[(0,o.bF)(h,{class:"bg-surface column"},{default:(0,o.k6)((()=>[(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(y,{label:"ID",modelValue:e.id,"onUpdate:modelValue":n[0]||(n[0]=n=>e.id=n),filled:"",class:"q-mb-md"},null,8,["modelValue"]),(0,o.bF)(m,{filled:"",modelValue:e.type,"onUpdate:modelValue":n[1]||(n[1]=n=>e.type=n),options:e.typeOptions,color:"primary",inline:"",class:"q-mb-md"},null,8,["modelValue","options"]),e.type===e.types.ONE_WAY?((0,o.uX)(),(0,o.Wv)(y,{key:0,filled:"","stack-label":"",label:"Root",modelValue:e.synonym.root,"onUpdate:modelValue":n[2]||(n[2]=n=>e.synonym.root=n),class:"q-mb-md"},null,8,["modelValue"])):(0,o.Q3)("",!0),(0,o.bF)(r,{filled:"",modelValue:e.synonym.synonyms,"onUpdate:modelValue":n[3]||(n[3]=n=>e.synonym.synonyms=n),multiple:"","use-chips":"","use-input":"","new-value-mode":"add","stack-label":"","hide-dropdown-icon":"",label:"Synonyms",hint:"Enter a synonym and press enter"},null,8,["modelValue"])])),_:1}),(0,o.bF)(u),(0,o.bF)(c,null,{default:(0,o.k6)((()=>[n[9]||(n[9]=(0,o.Lk)("div",{class:"text-overline"},"Optional",-1)),(0,o.bF)(r,{filled:"",modelValue:e.synonym.symbols_to_index,"onUpdate:modelValue":n[4]||(n[4]=n=>e.synonym.symbols_to_index=n),multiple:"","use-chips":"","use-input":"","new-value-mode":"add","stack-label":"","hide-dropdown-icon":"",label:"Symbols to Index",hint:"Enter a symbol (eg: +, - ) and press enter"},null,8,["modelValue"]),(0,o.bF)(y,{filled:"","stack-label":"",label:"Locale",modelValue:e.synonym.locale,"onUpdate:modelValue":n[5]||(n[5]=n=>e.synonym.locale=n),class:"q-mb-md",hint:"Leave blank to auto-detect"},null,8,["modelValue"])])),_:1}),(0,o.bF)(b,{align:"right",class:"bg-primary"},{default:(0,o.k6)((()=>[(0,o.bF)(p,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!e.isValid,onClick:n[6]||(n[6]=n=>e.createSynonym())},{default:(0,o.k6)((()=>[(0,o.eW)((0,t.v_)(e.isUpdate?"Update":"Add")+" Synonym",1)])),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,o.bF)(k,{class:"q-mt-md",title:"Synonyms",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.synonyms,columns:e.columns,"row-key":"id",pagination:{rowsPerPage:50,sortBy:"name"}},{"top-left":(0,o.k6)((()=>[(0,o.Lk)("div",s,[(0,o.bF)(f,{size:"md",name:"sym_s_dataset_linked"}),n[10]||(n[10]=(0,o.eW)(" Synonyms"))])])),"top-right":(0,o.k6)((()=>[(0,o.bF)(y,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":n[8]||(n[8]=n=>e.filter=n),placeholder:"Search"},{append:(0,o.k6)((()=>[(0,o.bF)(f,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions":(0,o.k6)((n=>[(0,o.bF)(g,{class:"text-right"},{default:(0,o.k6)((()=>[(0,o.bF)(p,{flat:"",onClick:l=>e.editSynonym(n.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,o.bF)(p,{flat:"",color:"negative",onClick:l=>e.deleteSynonym(n.row.id),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var i,d=l(78685),y=function(e,n,l,o){function t(e){return e instanceof l?e:new l((function(n){n(e)}))}return new(l||(l=Promise))((function(l,s){function a(e){try{d(o.next(e))}catch(n){s(n)}}function i(e){try{d(o["throw"](e))}catch(n){s(n)}}function d(e){e.done?l(e.value):t(e.value).then(a,i)}d((o=o.apply(e,n||[])).next())}))};(function(e){e["ONE_WAY"]="one-way",e["MULTI_WAY"]="multi-way"})(i||(i={}));const m=(0,o.pM)({name:"Synonyms",data(){return{expanded:0===this.$store.state.node.data.synonyms.length,filter:"",type:i.MULTI_WAY,types:i,typeOptions:[{label:"Multi-way synonyms",value:i.MULTI_WAY},{label:"One-way synonym",value:i.ONE_WAY}],synonym:{root:"",synonyms:[],locale:"",symbols_to_index:[]},id:(0,d.Ak)(),columns:[{label:"ID",name:"id",field:"id",align:"left"},{label:"Type",name:"type",align:"left",field:e=>e.root?i.ONE_WAY:i.MULTI_WAY,sortable:!0},{label:"Root",name:"root",field:"root",align:"left",sortable:!0},{label:"Synonyms",name:"synonyms",field:e=>e.synonyms.join(", "),align:"left",sortable:!0},{label:"Symbols to Index",name:"symbols_to_index",field:e=>{var n;return null===(n=e.symbols_to_index)||void 0===n?void 0:n.join(", ")},align:"left",sortable:!0},{label:"Locale",name:"locale",field:"locale",align:"left",sortable:!0},{label:"Actions",name:"actions",align:"right"}]}},computed:{isValid(){return this.synonym.synonyms.length>0&&this.id.length>0},isUpdate(){return this.$store.state.node.data.synonyms.map((e=>e.id)).includes(this.id)}},methods:{createSynonym(){return y(this,void 0,void 0,(function*(){const e={synonyms:JSON.parse(JSON.stringify(this.synonym.synonyms))};this.type===this.types.ONE_WAY&&(e.root=this.synonym.root),this.synonym.locale&&(e.locale=this.synonym.locale),this.synonym.symbols_to_index&&this.synonym.symbols_to_index.length>0&&(e.symbols_to_index=this.synonym.symbols_to_index),yield this.$store.dispatch("node/createSynonym",{id:this.id,synonym:e}),this.id=(0,d.Ak)(),this.synonym={root:"",synonyms:[],locale:"",symbols_to_index:[]},this.expanded=!1}))},editSynonym(e){this.id=e.id||(0,d.Ak)(),this.synonym=JSON.parse(JSON.stringify(e)),this.type=this.synonym.root?i.ONE_WAY:i.MULTI_WAY,this.synonym.locale=this.synonym.locale||"",this.synonym.symbols_to_index=this.synonym.symbols_to_index||[],this.expanded=!0},deleteSynonym(e){this.$q.dialog({title:"Confirm",message:`Delete synonym with id: ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteSynonym",e)}))}}});var r=l(12807),c=l(77716),u=l(9459),p=l(23316),b=l(44189),h=l(39270),_=l(26267),f=l(75848),g=l(10386),k=l(62669),A=l(1693),x=l(39942),V=l(50492),S=l(45262),v=l(98582),w=l.n(v);const q=(0,r.A)(m,[["render",a]]),F=q;w()(m,"components",{QPage:c.A,QExpansionItem:u.A,QCard:p.A,QCardSection:b.A,QInput:h.A,QOptionGroup:_.A,QSelect:f.A,QSeparator:g.A,QCardActions:k.A,QBtn:A.A,QTable:x.A,QIcon:V.A,QTd:S.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[536],{20536:(e,n,l)=>{l.r(n),l.d(n,{default:()=>F});var o=l(61758),t=l(58790);const s={class:"text-h6"};function a(e,n,l,a,i,d){const y=(0,o.g2)("q-input"),m=(0,o.g2)("q-option-group"),r=(0,o.g2)("q-select"),c=(0,o.g2)("q-card-section"),u=(0,o.g2)("q-separator"),p=(0,o.g2)("q-btn"),b=(0,o.g2)("q-card-actions"),h=(0,o.g2)("q-card"),_=(0,o.g2)("q-expansion-item"),f=(0,o.g2)("q-icon"),g=(0,o.g2)("q-td"),k=(0,o.g2)("q-table"),A=(0,o.g2)("q-page");return(0,o.uX)(),(0,o.Wv)(A,{padding:""},{default:(0,o.k6)((()=>[(0,o.bF)(_,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Synonym","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":n[7]||(n[7]=n=>e.expanded=n)},{default:(0,o.k6)((()=>[(0,o.bF)(h,{class:"bg-surface column"},{default:(0,o.k6)((()=>[(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(y,{label:"ID",modelValue:e.id,"onUpdate:modelValue":n[0]||(n[0]=n=>e.id=n),filled:"",class:"q-mb-md"},null,8,["modelValue"]),(0,o.bF)(m,{filled:"",modelValue:e.type,"onUpdate:modelValue":n[1]||(n[1]=n=>e.type=n),options:e.typeOptions,color:"primary",inline:"",class:"q-mb-md"},null,8,["modelValue","options"]),e.type===e.types.ONE_WAY?((0,o.uX)(),(0,o.Wv)(y,{key:0,filled:"","stack-label":"",label:"Root",modelValue:e.synonym.root,"onUpdate:modelValue":n[2]||(n[2]=n=>e.synonym.root=n),class:"q-mb-md"},null,8,["modelValue"])):(0,o.Q3)("",!0),(0,o.bF)(r,{filled:"",modelValue:e.synonym.synonyms,"onUpdate:modelValue":n[3]||(n[3]=n=>e.synonym.synonyms=n),multiple:"","use-chips":"","use-input":"","new-value-mode":"add","stack-label":"","hide-dropdown-icon":"",label:"Synonyms",hint:"Enter a synonym and press enter"},null,8,["modelValue"])])),_:1}),(0,o.bF)(u),(0,o.bF)(c,null,{default:(0,o.k6)((()=>[n[9]||(n[9]=(0,o.Lk)("div",{class:"text-overline"},"Optional",-1)),(0,o.bF)(r,{filled:"",modelValue:e.synonym.symbols_to_index,"onUpdate:modelValue":n[4]||(n[4]=n=>e.synonym.symbols_to_index=n),multiple:"","use-chips":"","use-input":"","new-value-mode":"add","stack-label":"","hide-dropdown-icon":"",label:"Symbols to Index",hint:"Enter a symbol (eg: +, - ) and press enter"},null,8,["modelValue"]),(0,o.bF)(y,{filled:"","stack-label":"",label:"Locale",modelValue:e.synonym.locale,"onUpdate:modelValue":n[5]||(n[5]=n=>e.synonym.locale=n),class:"q-mb-md",hint:"Leave blank to auto-detect"},null,8,["modelValue"])])),_:1}),(0,o.bF)(b,{align:"right",class:"bg-primary"},{default:(0,o.k6)((()=>[(0,o.bF)(p,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!e.isValid,onClick:n[6]||(n[6]=n=>e.createSynonym())},{default:(0,o.k6)((()=>[(0,o.eW)((0,t.v_)(e.isUpdate?"Update":"Add")+" Synonym",1)])),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,o.bF)(k,{class:"q-mt-md",title:"Synonyms",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.synonyms,columns:e.columns,"row-key":"id",pagination:{rowsPerPage:50,sortBy:"name"}},{"top-left":(0,o.k6)((()=>[(0,o.Lk)("div",s,[(0,o.bF)(f,{size:"md",name:"sym_s_dataset_linked"}),n[10]||(n[10]=(0,o.eW)(" Synonyms"))])])),"top-right":(0,o.k6)((()=>[(0,o.bF)(y,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":n[8]||(n[8]=n=>e.filter=n),placeholder:"Search"},{append:(0,o.k6)((()=>[(0,o.bF)(f,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions":(0,o.k6)((n=>[(0,o.bF)(g,{class:"text-right"},{default:(0,o.k6)((()=>[(0,o.bF)(p,{flat:"",onClick:l=>e.editSynonym(n.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,o.bF)(p,{flat:"",color:"negative",onClick:l=>e.deleteSynonym(n.row.id),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var i,d=l(78685),y=function(e,n,l,o){function t(e){return e instanceof l?e:new l((function(n){n(e)}))}return new(l||(l=Promise))((function(l,s){function a(e){try{d(o.next(e))}catch(e){s(e)}}function i(e){try{d(o["throw"](e))}catch(e){s(e)}}function d(e){e.done?l(e.value):t(e.value).then(a,i)}d((o=o.apply(e,n||[])).next())}))};(function(e){e["ONE_WAY"]="one-way",e["MULTI_WAY"]="multi-way"})(i||(i={}));const m=(0,o.pM)({name:"Synonyms",data(){return{expanded:0===this.$store.state.node.data.synonyms.length,filter:"",type:i.MULTI_WAY,types:i,typeOptions:[{label:"Multi-way synonyms",value:i.MULTI_WAY},{label:"One-way synonym",value:i.ONE_WAY}],synonym:{root:"",synonyms:[],locale:"",symbols_to_index:[]},id:(0,d.Ak)(),columns:[{label:"ID",name:"id",field:"id",align:"left"},{label:"Type",name:"type",align:"left",field:e=>e.root?i.ONE_WAY:i.MULTI_WAY,sortable:!0},{label:"Root",name:"root",field:"root",align:"left",sortable:!0},{label:"Synonyms",name:"synonyms",field:e=>e.synonyms.join(", "),align:"left",sortable:!0},{label:"Symbols to Index",name:"symbols_to_index",field:e=>{var n;return null===(n=e.symbols_to_index)||void 0===n?void 0:n.join(", ")},align:"left",sortable:!0},{label:"Locale",name:"locale",field:"locale",align:"left",sortable:!0},{label:"Actions",name:"actions",align:"right"}]}},computed:{isValid(){return this.synonym.synonyms.length>0&&this.id.length>0},isUpdate(){return this.$store.state.node.data.synonyms.map((e=>e.id)).includes(this.id)}},methods:{createSynonym(){return y(this,void 0,void 0,(function*(){const e={synonyms:JSON.parse(JSON.stringify(this.synonym.synonyms))};this.type===this.types.ONE_WAY&&(e.root=this.synonym.root),this.synonym.locale&&(e.locale=this.synonym.locale),this.synonym.symbols_to_index&&this.synonym.symbols_to_index.length>0&&(e.symbols_to_index=this.synonym.symbols_to_index),yield this.$store.dispatch("node/createSynonym",{id:this.id,synonym:e}),this.id=(0,d.Ak)(),this.synonym={root:"",synonyms:[],locale:"",symbols_to_index:[]},this.expanded=!1}))},editSynonym(e){this.id=e.id||(0,d.Ak)(),this.synonym=JSON.parse(JSON.stringify(e)),this.type=this.synonym.root?i.ONE_WAY:i.MULTI_WAY,this.synonym.locale=this.synonym.locale||"",this.synonym.symbols_to_index=this.synonym.symbols_to_index||[],this.expanded=!0},deleteSynonym(e){this.$q.dialog({title:"Confirm",message:`Delete synonym with id: ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteSynonym",e)}))}}});var r=l(12807),c=l(77716),u=l(9459),p=l(23316),b=l(44189),h=l(39270),_=l(26267),f=l(75848),g=l(10386),k=l(62669),A=l(1693),x=l(39942),V=l(50492),S=l(45262),v=l(98582),w=l.n(v);const q=(0,r.A)(m,[["render",a]]),F=q;w()(m,"components",{QPage:c.A,QExpansionItem:u.A,QCard:p.A,QCardSection:b.A,QInput:h.A,QOptionGroup:_.A,QSelect:f.A,QSeparator:g.A,QCardActions:k.A,QBtn:A.A,QTable:x.A,QIcon:V.A,QTd:S.A})}}]); \ No newline at end of file diff --git a/js/614.cc7dddb7.js b/js/614.681ae293.js similarity index 100% rename from js/614.cc7dddb7.js rename to js/614.681ae293.js diff --git a/js/642.c5a9600d.js b/js/642.c8fc2245.js similarity index 96% rename from js/642.c5a9600d.js rename to js/642.c8fc2245.js index 06c6237..bceb954 100644 --- a/js/642.c5a9600d.js +++ b/js/642.c8fc2245.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[642],{47090:(e,t,a)=>{a.r(t),a.d(t,{default:()=>F});var s=a(61758),r=a(58790);const n={class:"text-h6"};function l(e,t,a,l,o,d){const i=(0,s.g2)("q-input"),c=(0,s.g2)("q-btn"),u=(0,s.g2)("q-card-section"),p=(0,s.g2)("monaco-editor"),h=(0,s.g2)("q-banner"),m=(0,s.g2)("q-card-actions"),f=(0,s.g2)("q-card"),g=(0,s.g2)("q-expansion-item"),b=(0,s.g2)("q-icon"),_=(0,s.g2)("q-td"),y=(0,s.g2)("q-table"),k=(0,s.g2)("q-page");return(0,s.uX)(),(0,s.Wv)(k,{padding:""},{default:(0,s.k6)((()=>[(0,s.bF)(g,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Search Preset","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":t[3]||(t[3]=t=>e.expanded=t)},{default:(0,s.k6)((()=>[(0,s.bF)(f,{style:{height:"60vh"},class:"bg-surface column"},{default:(0,s.k6)((()=>[(0,s.bF)(u,{class:"q-col-gutter-md row"},{default:(0,s.k6)((()=>[(0,s.bF)(i,{class:"col-12 col-sm-6",modelValue:e.preset.name,"onUpdate:modelValue":t[0]||(t[0]=t=>e.preset.name=t),label:"Name",filled:"",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"]),(0,s.bF)(c,{type:"a",icon:"sym_s_help","no-caps":"",color:"info",flat:"",dense:"",href:`https://typesense.org/docs/${e.$store.state.node.data.debug.version}/api/search.html#presets`,target:"_blank"},{default:(0,s.k6)((()=>t[5]||(t[5]=[(0,s.eW)("Documentation")]))),_:1},8,["href"])])),_:1}),(0,s.bF)(p,{modelValue:e.keyJson,"onUpdate:modelValue":t[1]||(t[1]=t=>e.keyJson=t)},null,8,["modelValue"]),e.jsonError?((0,s.uX)(),(0,s.Wv)(h,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,s.k6)((()=>[(0,s.eW)(" Invalid Format: "+(0,r.v_)(e.jsonError),1)])),_:1})):(0,s.Q3)("",!0),(0,s.bF)(m,{align:"right",class:"bg-primary"},{default:(0,s.k6)((()=>[(0,s.bF)(c,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!!e.jsonError,onClick:t[2]||(t[2]=t=>e.createSearchPreset())},{default:(0,s.k6)((()=>[(0,s.eW)((0,r.v_)(e.isUpdate?"Update":"Add")+" Preset",1)])),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,s.bF)(y,{class:"q-mt-md",title:"Search Presets",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.searchPresets,columns:e.columns,"row-key":"id"},{"top-left":(0,s.k6)((()=>[(0,s.Lk)("div",n,[(0,s.bF)(b,{size:"md",name:"sym_s_manage_search"}),t[6]||(t[6]=(0,s.eW)(" Search Presets"))])])),"top-right":(0,s.k6)((()=>[(0,s.bF)(i,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[4]||(t[4]=t=>e.filter=t),placeholder:"Search"},{append:(0,s.k6)((()=>[(0,s.bF)(b,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions_op":(0,s.k6)((t=>[(0,s.bF)(_,{class:"text-right"},{default:(0,s.k6)((()=>[(0,s.bF)(c,{flat:"",onClick:a=>e.editSearchPreset(t.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,s.bF)(c,{flat:"",color:"negative",onClick:a=>e.deleteSearchPreset(t.row.name),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var o=a(74701),d=function(e,t,a,s){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function l(e){try{d(s.next(e))}catch(t){n(t)}}function o(e){try{d(s["throw"](e))}catch(t){n(t)}}function d(e){e.done?a(e.value):r(e.value).then(l,o)}d((s=s.apply(e,t||[])).next())}))};const i=(0,s.pM)({name:"SearchPresets",components:{MonacoEditor:o.A},data(){return{jsonError:null,preset:{name:"",value:{collection:"products",q:"*",sort_by:"popularity"}},expanded:0===this.$store.state.node.data.searchPresets.length,filter:"",columns:[{label:"Name",name:"name",field:"name",sortable:!0,align:"left"},{label:"Search Parameters",name:"value",field:e=>JSON.stringify(e.value),sortable:!0,align:"left"},{label:"Actions",name:"actions_op",align:"right"}]}},computed:{keyJson:{get(){return JSON.stringify(this.preset.value,null,2)},set(e){try{this.preset.value=JSON.parse(e),this.jsonError=null}catch(t){this.jsonError=t.message}}},isUpdate(){return this.$store.state.node.data.searchPresets.map((e=>e.name)).includes(this.preset.name)}},mounted(){this.$store.dispatch("node/getSearchPresets")},methods:{createSearchPreset(){return d(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/upsertSearchPreset",JSON.parse(JSON.stringify(this.preset)))}))},editSearchPreset(e){this.preset=JSON.parse(JSON.stringify(e)),this.expanded=!0},deleteSearchPreset(e){this.$q.dialog({title:"Confirm",message:`Delete preset ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteSearchPreset",e)}))}}});var c=a(12807),u=a(77716),p=a(9459),h=a(23316),m=a(44189),f=a(39270),g=a(1693),b=a(46868),_=a(62669),y=a(39942),k=a(50492),v=a(45262),S=a(98582),P=a.n(S);const A=(0,c.A)(i,[["render",l]]),F=A;P()(i,"components",{QPage:u.A,QExpansionItem:p.A,QCard:h.A,QCardSection:m.A,QInput:f.A,QBtn:g.A,QBanner:b.A,QCardActions:_.A,QTable:y.A,QIcon:k.A,QTd:v.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[642],{47090:(e,t,a)=>{a.r(t),a.d(t,{default:()=>F});var s=a(61758),r=a(58790);const n={class:"text-h6"};function l(e,t,a,l,o,d){const i=(0,s.g2)("q-input"),c=(0,s.g2)("q-btn"),u=(0,s.g2)("q-card-section"),p=(0,s.g2)("monaco-editor"),h=(0,s.g2)("q-banner"),m=(0,s.g2)("q-card-actions"),f=(0,s.g2)("q-card"),g=(0,s.g2)("q-expansion-item"),b=(0,s.g2)("q-icon"),_=(0,s.g2)("q-td"),y=(0,s.g2)("q-table"),k=(0,s.g2)("q-page");return(0,s.uX)(),(0,s.Wv)(k,{padding:""},{default:(0,s.k6)((()=>[(0,s.bF)(g,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Search Preset","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":t[3]||(t[3]=t=>e.expanded=t)},{default:(0,s.k6)((()=>[(0,s.bF)(f,{style:{height:"60vh"},class:"bg-surface column"},{default:(0,s.k6)((()=>[(0,s.bF)(u,{class:"q-col-gutter-md row"},{default:(0,s.k6)((()=>[(0,s.bF)(i,{class:"col-12 col-sm-6",modelValue:e.preset.name,"onUpdate:modelValue":t[0]||(t[0]=t=>e.preset.name=t),label:"Name",filled:"",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","rules"]),(0,s.bF)(c,{type:"a",icon:"sym_s_help","no-caps":"",color:"info",flat:"",dense:"",href:`https://typesense.org/docs/${e.$store.state.node.data.debug.version}/api/search.html#presets`,target:"_blank"},{default:(0,s.k6)((()=>t[5]||(t[5]=[(0,s.eW)("Documentation")]))),_:1},8,["href"])])),_:1}),(0,s.bF)(p,{modelValue:e.keyJson,"onUpdate:modelValue":t[1]||(t[1]=t=>e.keyJson=t)},null,8,["modelValue"]),e.jsonError?((0,s.uX)(),(0,s.Wv)(h,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,s.k6)((()=>[(0,s.eW)(" Invalid Format: "+(0,r.v_)(e.jsonError),1)])),_:1})):(0,s.Q3)("",!0),(0,s.bF)(m,{align:"right",class:"bg-primary"},{default:(0,s.k6)((()=>[(0,s.bF)(c,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!!e.jsonError,onClick:t[2]||(t[2]=t=>e.createSearchPreset())},{default:(0,s.k6)((()=>[(0,s.eW)((0,r.v_)(e.isUpdate?"Update":"Add")+" Preset",1)])),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,s.bF)(y,{class:"q-mt-md",title:"Search Presets",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.searchPresets,columns:e.columns,"row-key":"id"},{"top-left":(0,s.k6)((()=>[(0,s.Lk)("div",n,[(0,s.bF)(b,{size:"md",name:"sym_s_manage_search"}),t[6]||(t[6]=(0,s.eW)(" Search Presets"))])])),"top-right":(0,s.k6)((()=>[(0,s.bF)(i,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[4]||(t[4]=t=>e.filter=t),placeholder:"Search"},{append:(0,s.k6)((()=>[(0,s.bF)(b,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions_op":(0,s.k6)((t=>[(0,s.bF)(_,{class:"text-right"},{default:(0,s.k6)((()=>[(0,s.bF)(c,{flat:"",onClick:a=>e.editSearchPreset(t.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,s.bF)(c,{flat:"",color:"negative",onClick:a=>e.deleteSearchPreset(t.row.name),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var o=a(74701),d=function(e,t,a,s){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function l(e){try{d(s.next(e))}catch(e){n(e)}}function o(e){try{d(s["throw"](e))}catch(e){n(e)}}function d(e){e.done?a(e.value):r(e.value).then(l,o)}d((s=s.apply(e,t||[])).next())}))};const i=(0,s.pM)({name:"SearchPresets",components:{MonacoEditor:o.A},data(){return{jsonError:null,preset:{name:"",value:{collection:"products",q:"*",sort_by:"popularity"}},expanded:0===this.$store.state.node.data.searchPresets.length,filter:"",columns:[{label:"Name",name:"name",field:"name",sortable:!0,align:"left"},{label:"Search Parameters",name:"value",field:e=>JSON.stringify(e.value),sortable:!0,align:"left"},{label:"Actions",name:"actions_op",align:"right"}]}},computed:{keyJson:{get(){return JSON.stringify(this.preset.value,null,2)},set(e){try{this.preset.value=JSON.parse(e),this.jsonError=null}catch(e){this.jsonError=e.message}}},isUpdate(){return this.$store.state.node.data.searchPresets.map((e=>e.name)).includes(this.preset.name)}},mounted(){this.$store.dispatch("node/getSearchPresets")},methods:{createSearchPreset(){return d(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/upsertSearchPreset",JSON.parse(JSON.stringify(this.preset)))}))},editSearchPreset(e){this.preset=JSON.parse(JSON.stringify(e)),this.expanded=!0},deleteSearchPreset(e){this.$q.dialog({title:"Confirm",message:`Delete preset ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteSearchPreset",e)}))}}});var c=a(12807),u=a(77716),p=a(9459),h=a(23316),m=a(44189),f=a(39270),g=a(1693),b=a(46868),_=a(62669),y=a(39942),k=a(50492),v=a(45262),S=a(98582),P=a.n(S);const A=(0,c.A)(i,[["render",l]]),F=A;P()(i,"components",{QPage:u.A,QExpansionItem:p.A,QCard:h.A,QCardSection:m.A,QInput:f.A,QBtn:g.A,QBanner:b.A,QCardActions:_.A,QTable:y.A,QIcon:k.A,QTd:v.A})}}]); \ No newline at end of file diff --git a/js/704.4b6593f8.js b/js/704.2455e1e8.js similarity index 96% rename from js/704.4b6593f8.js rename to js/704.2455e1e8.js index db43783..247f2e9 100644 --- a/js/704.4b6593f8.js +++ b/js/704.2455e1e8.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[704],{12944:(e,t,i)=>{i.r(t),i.d(t,{default:()=>F});var d=i(61758),r=i(58790);const l={class:"text-h6"};function n(e,t,i,n,a,o){const s=(0,d.g2)("q-input"),c=(0,d.g2)("q-card-section"),u=(0,d.g2)("monaco-editor"),h=(0,d.g2)("q-banner"),m=(0,d.g2)("q-btn"),p=(0,d.g2)("q-card-actions"),b=(0,d.g2)("q-card"),v=(0,d.g2)("q-expansion-item"),f=(0,d.g2)("q-icon"),g=(0,d.g2)("q-td"),_=(0,d.g2)("q-table"),y=(0,d.g2)("q-page");return(0,d.uX)(),(0,d.Wv)(y,{padding:""},{default:(0,d.k6)((()=>[(0,d.bF)(v,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Curation","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":t[3]||(t[3]=t=>e.expanded=t)},{default:(0,d.k6)((()=>[(0,d.bF)(b,{style:{height:"60vh"},class:"bg-surface column"},{default:(0,d.k6)((()=>[(0,d.bF)(c,null,{default:(0,d.k6)((()=>[(0,d.bF)(s,{dense:"",filled:"",label:"ID",modelValue:e.id,"onUpdate:modelValue":t[0]||(t[0]=t=>e.id=t)},null,8,["modelValue"])])),_:1}),(0,d.bF)(u,{modelValue:e.overrideJson,"onUpdate:modelValue":t[1]||(t[1]=t=>e.overrideJson=t)},null,8,["modelValue"]),e.jsonError?((0,d.uX)(),(0,d.Wv)(h,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,d.k6)((()=>[(0,d.eW)(" Invalid Format: "+(0,r.v_)(e.jsonError),1)])),_:1})):(0,d.Q3)("",!0),(0,d.bF)(p,{align:"right",class:"bg-primary"},{default:(0,d.k6)((()=>[(0,d.bF)(m,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!e.isValid,onClick:t[2]||(t[2]=t=>e.createOverride())},{default:(0,d.k6)((()=>[(0,d.eW)((0,r.v_)(e.isUpdate?"Update":"Add")+" Curation",1)])),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,d.bF)(_,{class:"q-mt-md",title:"Curations",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.overrides,columns:e.columns,"row-key":"id","visible-columns":["query","match","includes","excludes","actions"]},{"top-left":(0,d.k6)((()=>[(0,d.Lk)("div",l,[(0,d.bF)(f,{size:"md",name:"sym_s_low_priority"}),t[5]||(t[5]=(0,d.eW)(" Curations"))])])),"top-right":(0,d.k6)((()=>[(0,d.bF)(s,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[4]||(t[4]=t=>e.filter=t),placeholder:"Search"},{append:(0,d.k6)((()=>[(0,d.bF)(f,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions":(0,d.k6)((t=>[(0,d.bF)(g,{class:"text-right"},{default:(0,d.k6)((()=>[(0,d.bF)(m,{flat:"",onClick:i=>e.editOverride(t.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,d.bF)(m,{flat:"",color:"negative",onClick:i=>e.deleteOverride(t.row.id),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var a=i(78685),o=i(74701),s=function(e,t,i,d){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,l){function n(e){try{o(d.next(e))}catch(t){l(t)}}function a(e){try{o(d["throw"](e))}catch(t){l(t)}}function o(e){e.done?i(e.value):r(e.value).then(n,a)}o((d=d.apply(e,t||[])).next())}))};const c={rule:{query:"apple",match:"exact"},includes:[{id:"422",position:1},{id:"54",position:2}],excludes:[{id:"287"}]},u=(0,d.pM)({components:{MonacoEditor:o.A},name:"Overrides",data(){return{id:(0,a.Ak)(),override:c,jsonError:null,expanded:0===this.$store.state.node.data.overrides.length,filter:"",columns:[{label:"ID",name:"id",field:"id"},{label:"Query",name:"query",field:e=>e.rule.query,sortable:!0,align:"left"},{label:"Match",name:"match",field:e=>e.rule.match,sortable:!0,align:"left"},{label:"Includes",name:"includes",field:e=>{var t;return null===(t=e.includes)||void 0===t?void 0:t.length}},{label:"Excludes",name:"excludes",field:e=>{var t;return null===(t=e.excludes)||void 0===t?void 0:t.length}},{label:"Actions",name:"actions",align:"right"}]}},computed:{isValid(){return this.id.length>0&&!this.jsonError},isUpdate(){return this.$store.state.node.data.overrides.map((e=>e.id)).includes(this.id)},overrideJson:{get(){return JSON.stringify(this.override,null,2)},set(e){try{this.override=JSON.parse(e),this.jsonError=null}catch(t){this.jsonError=t.message}}}},methods:{createOverride(){return s(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/createOverride",{id:this.id,override:JSON.parse(JSON.stringify(this.override))}),this.id=(0,a.Ak)(),this.override=c,this.expanded=!1}))},editOverride(e){this.override=JSON.parse(JSON.stringify(e)),this.id=e.id||(0,a.Ak)(),this.expanded=!0},deleteOverride(e){this.$q.dialog({title:"Confirm",message:`Delete curation with id: ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteOverride",e)}))}}});var h=i(12807),m=i(77716),p=i(9459),b=i(23316),v=i(44189),f=i(39270),g=i(46868),_=i(62669),y=i(1693),k=i(39942),x=i(50492),A=i(45262),q=i(98582),O=i.n(q);const C=(0,h.A)(u,[["render",n]]),F=C;O()(u,"components",{QPage:m.A,QExpansionItem:p.A,QCard:b.A,QCardSection:v.A,QInput:f.A,QBanner:g.A,QCardActions:_.A,QBtn:y.A,QTable:k.A,QIcon:x.A,QTd:A.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[704],{12944:(e,t,i)=>{i.r(t),i.d(t,{default:()=>F});var d=i(61758),r=i(58790);const l={class:"text-h6"};function n(e,t,i,n,a,o){const s=(0,d.g2)("q-input"),c=(0,d.g2)("q-card-section"),u=(0,d.g2)("monaco-editor"),h=(0,d.g2)("q-banner"),m=(0,d.g2)("q-btn"),p=(0,d.g2)("q-card-actions"),b=(0,d.g2)("q-card"),v=(0,d.g2)("q-expansion-item"),f=(0,d.g2)("q-icon"),g=(0,d.g2)("q-td"),_=(0,d.g2)("q-table"),y=(0,d.g2)("q-page");return(0,d.uX)(),(0,d.Wv)(y,{padding:""},{default:(0,d.k6)((()=>[(0,d.bF)(v,{"expand-separator":"",icon:"sym_s_add_circle","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:(e.isUpdate?"Update":"Add")+" Curation","header-class":"bg-primary text-white",modelValue:e.expanded,"onUpdate:modelValue":t[3]||(t[3]=t=>e.expanded=t)},{default:(0,d.k6)((()=>[(0,d.bF)(b,{style:{height:"60vh"},class:"bg-surface column"},{default:(0,d.k6)((()=>[(0,d.bF)(c,null,{default:(0,d.k6)((()=>[(0,d.bF)(s,{dense:"",filled:"",label:"ID",modelValue:e.id,"onUpdate:modelValue":t[0]||(t[0]=t=>e.id=t)},null,8,["modelValue"])])),_:1}),(0,d.bF)(u,{modelValue:e.overrideJson,"onUpdate:modelValue":t[1]||(t[1]=t=>e.overrideJson=t)},null,8,["modelValue"]),e.jsonError?((0,d.uX)(),(0,d.Wv)(h,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,d.k6)((()=>[(0,d.eW)(" Invalid Format: "+(0,r.v_)(e.jsonError),1)])),_:1})):(0,d.Q3)("",!0),(0,d.bF)(p,{align:"right",class:"bg-primary"},{default:(0,d.k6)((()=>[(0,d.bF)(m,{size:"md",padding:"sm lg",unelevated:"",color:"primary",disable:!e.isValid,onClick:t[2]||(t[2]=t=>e.createOverride())},{default:(0,d.k6)((()=>[(0,d.eW)((0,r.v_)(e.isUpdate?"Update":"Add")+" Curation",1)])),_:1},8,["disable"])])),_:1})])),_:1})])),_:1},8,["label","modelValue"]),(0,d.bF)(_,{class:"q-mt-md",title:"Curations",flat:"",bordered:"",filter:e.filter,rows:e.$store.state.node.data.overrides,columns:e.columns,"row-key":"id","visible-columns":["query","match","includes","excludes","actions"]},{"top-left":(0,d.k6)((()=>[(0,d.Lk)("div",l,[(0,d.bF)(f,{size:"md",name:"sym_s_low_priority"}),t[5]||(t[5]=(0,d.eW)(" Curations"))])])),"top-right":(0,d.k6)((()=>[(0,d.bF)(s,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[4]||(t[4]=t=>e.filter=t),placeholder:"Search"},{append:(0,d.k6)((()=>[(0,d.bF)(f,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),"body-cell-actions":(0,d.k6)((t=>[(0,d.bF)(g,{class:"text-right"},{default:(0,d.k6)((()=>[(0,d.bF)(m,{flat:"",onClick:i=>e.editOverride(t.row),icon:"sym_s_edit",title:"Edit"},null,8,["onClick"]),(0,d.bF)(m,{flat:"",color:"negative",onClick:i=>e.deleteOverride(t.row.id),icon:"sym_s_delete_forever",title:"Delete"},null,8,["onClick"])])),_:2},1024)])),_:1},8,["filter","rows","columns"])])),_:1})}var a=i(78685),o=i(74701),s=function(e,t,i,d){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,l){function n(e){try{o(d.next(e))}catch(e){l(e)}}function a(e){try{o(d["throw"](e))}catch(e){l(e)}}function o(e){e.done?i(e.value):r(e.value).then(n,a)}o((d=d.apply(e,t||[])).next())}))};const c={rule:{query:"apple",match:"exact"},includes:[{id:"422",position:1},{id:"54",position:2}],excludes:[{id:"287"}]},u=(0,d.pM)({components:{MonacoEditor:o.A},name:"Overrides",data(){return{id:(0,a.Ak)(),override:c,jsonError:null,expanded:0===this.$store.state.node.data.overrides.length,filter:"",columns:[{label:"ID",name:"id",field:"id"},{label:"Query",name:"query",field:e=>e.rule.query,sortable:!0,align:"left"},{label:"Match",name:"match",field:e=>e.rule.match,sortable:!0,align:"left"},{label:"Includes",name:"includes",field:e=>{var t;return null===(t=e.includes)||void 0===t?void 0:t.length}},{label:"Excludes",name:"excludes",field:e=>{var t;return null===(t=e.excludes)||void 0===t?void 0:t.length}},{label:"Actions",name:"actions",align:"right"}]}},computed:{isValid(){return this.id.length>0&&!this.jsonError},isUpdate(){return this.$store.state.node.data.overrides.map((e=>e.id)).includes(this.id)},overrideJson:{get(){return JSON.stringify(this.override,null,2)},set(e){try{this.override=JSON.parse(e),this.jsonError=null}catch(e){this.jsonError=e.message}}}},methods:{createOverride(){return s(this,void 0,void 0,(function*(){yield this.$store.dispatch("node/createOverride",{id:this.id,override:JSON.parse(JSON.stringify(this.override))}),this.id=(0,a.Ak)(),this.override=c,this.expanded=!1}))},editOverride(e){this.override=JSON.parse(JSON.stringify(e)),this.id=e.id||(0,a.Ak)(),this.expanded=!0},deleteOverride(e){this.$q.dialog({title:"Confirm",message:`Delete curation with id: ${e}?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/deleteOverride",e)}))}}});var h=i(12807),m=i(77716),p=i(9459),b=i(23316),v=i(44189),f=i(39270),g=i(46868),_=i(62669),y=i(1693),k=i(39942),x=i(50492),A=i(45262),q=i(98582),O=i.n(q);const C=(0,h.A)(u,[["render",n]]),F=C;O()(u,"components",{QPage:m.A,QExpansionItem:p.A,QCard:b.A,QCardSection:v.A,QInput:f.A,QBanner:g.A,QCardActions:_.A,QBtn:y.A,QTable:k.A,QIcon:x.A,QTd:A.A})}}]); \ No newline at end of file diff --git a/js/729.966cf392.js b/js/729.1a0fac19.js similarity index 96% rename from js/729.966cf392.js rename to js/729.1a0fac19.js index fb2e4c6..0d00259 100644 --- a/js/729.966cf392.js +++ b/js/729.1a0fac19.js @@ -1 +1 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[729],{49463:(e,t,o)=>{o.r(t),o.d(t,{default:()=>W});var n=o(61758),a=o(58790);function l(e,t,o,l,s,i){const r=(0,n.g2)("collection-create"),c=(0,n.g2)("q-btn"),d=(0,n.g2)("q-td"),m=(0,n.g2)("q-item-section"),u=(0,n.g2)("q-avatar"),p=(0,n.g2)("q-item"),_=(0,n.g2)("q-menu"),b=(0,n.g2)("q-icon"),f=(0,n.g2)("q-tr"),h=(0,n.g2)("q-input"),k=(0,n.g2)("q-table"),g=(0,n.g2)("q-page");return(0,n.uX)(),(0,n.Wv)(g,{padding:""},{default:(0,n.k6)((()=>[(0,n.bF)(r),(0,n.bF)(k,{filter:e.filter,columns:e.columns,rows:e.$store.state.node.data.collections,"row-key":"name",pagination:{rowsPerPage:0,sortBy:"name"}},{body:(0,n.k6)((o=>[(0,n.bF)(f,{props:o},{default:(0,n.k6)((()=>[(0,n.bF)(d,{key:"name",props:o},{default:(0,n.k6)((()=>[(0,n.bF)(c,{"no-caps":"",flat:"",to:`/collection/${o.row.name}/search`,size:"1.2em",class:"text-bold"},{default:(0,n.k6)((()=>[(0,n.eW)((0,a.v_)(o.row.name),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,n.bF)(d,{key:"actions",props:o},{default:(0,n.k6)((()=>[(0,n.bF)(c,{flat:"",round:"",icon:"sym_s_more_vert"},{default:(0,n.k6)((()=>[(0,n.bF)(_,null,{default:(0,n.k6)((()=>[(0,n.bF)(p,{dense:"",clickable:"",to:`/collection/${o.row.name}/document`},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[1]||(t[1]=[(0,n.eW)("Import")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_file_upload"})])),_:1})])),_:2},1032,["to"]),(0,n.bF)(p,{dense:"",clickable:"",onClick:t=>e.exportCollection(o.row.name)},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[2]||(t[2]=[(0,n.eW)("Export")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_file_download"})])),_:1})])),_:2},1032,["onClick"]),(0,n.bF)(p,{dense:"",clickable:"",to:`/collection/${o.row.name}/schema`},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[3]||(t[3]=[(0,n.eW)("Edit")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_data_object"})])),_:1})])),_:2},1032,["to"]),(0,n.bF)(p,{dense:"",clickable:"",onClick:t=>e.cloneCollection(o.row.name)},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[4]||(t[4]=[(0,n.eW)("Clone Schema")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_content_copy"})])),_:1})])),_:2},1032,["onClick"]),(0,n.bF)(p,{dense:"",clickable:"",flat:"",style:{color:"#de3b39"},onClick:t=>e.drop(o.row.name)},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[5]||(t[5]=[(0,n.eW)("Delete")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_delete"})])),_:1})])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1032,["props"]),(0,n.bF)(d,{key:"num_documents",props:o},{default:(0,n.k6)((()=>[(0,n.bF)(c,{"no-caps":"",flat:"",to:`/collection/${o.row.name}/search`},{default:(0,n.k6)((()=>[(0,n.eW)((0,a.v_)(o.row.num_documents)+" ",1),(0,n.bF)(b,{name:"sym_s_search",size:"1em",right:""})])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,n.bF)(d,{key:"schema_fields",props:o},{default:(0,n.k6)((()=>[(0,n.bF)(c,{"no-caps":"",flat:"",to:`/collection/${o.row.name}/schema`},{default:(0,n.k6)((()=>[(0,n.eW)((0,a.v_)(o.row.fields.length||0)+" ",1),(0,n.bF)(b,{name:"sym_s_data_object",size:"1em",right:""})])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,n.bF)(d,{key:"created_at",props:o},{default:(0,n.k6)((()=>[(0,n.eW)((0,a.v_)(new Date(1e3*o.row.created_at).toLocaleString()),1)])),_:2},1032,["props"])])),_:2},1032,["props"])])),"top-right":(0,n.k6)((()=>[(0,n.bF)(h,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[0]||(t[0]=t=>e.filter=t),placeholder:"Search"},{append:(0,n.k6)((()=>[(0,n.bF)(b,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),_:1},8,["filter","columns","rows"])])),_:1})}function s(e,t,o,a,l,s){const i=(0,n.g2)("collection-ui"),r=(0,n.g2)("q-expansion-item"),c=(0,n.g2)("q-list");return(0,n.uX)(),(0,n.Wv)(c,{bordered:"",class:"rounded-borders"},{default:(0,n.k6)((()=>[(0,n.bF)(r,{"expand-separator":"",icon:"sym_s_library_add","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:"Add Collection","header-class":"bg-primary text-white"},{default:(0,n.k6)((()=>[(0,n.bF)(i,{"primary-action-label":"Create Collection","create-mode":"",onSubmit:e.createCollection},null,8,["onSubmit"])])),_:1})])),_:1})}var i=o(93930);const r=(0,n.pM)({components:{CollectionUi:i.A},name:"CollectionCreate",methods:{createCollection(e){const t=JSON.parse(JSON.stringify(e));for(const o of t.fields)"float[]"===o.type&&o.num_dim||delete o.num_dim,o.type.startsWith("object")&&(t.enable_nested_fields=!0);this.$store.dispatch("node/createCollection",t)}}});var c=o(12807),d=o(53999),m=o(9459),u=o(98582),p=o.n(u);const _=(0,c.A)(r,[["render",s]]),b=_;p()(r,"components",{QList:d.A,QExpansionItem:m.A});var f=function(e,t,o,n){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,l){function s(e){try{r(n.next(e))}catch(t){l(t)}}function i(e){try{r(n["throw"](e))}catch(t){l(t)}}function r(e){e.done?o(e.value):a(e.value).then(s,i)}r((n=n.apply(e,t||[])).next())}))};const h=(0,n.pM)({components:{CollectionCreate:b},name:"Collections",data(){return{filter:"",columns:[{name:"name",required:!0,label:"Name",field:"name",sortable:!0},{name:"actions",required:!1,label:"Actions",field:"actions",sortable:!1},{name:"num_documents",required:!0,label:"Nb documents",field:"num_documents",sortable:!0},{name:"schema_fields",required:!0,label:"Schema fields",field:"fields",sortable:!0},{name:"created_at",required:!0,label:"Created at",field:"created_at",sortable:!0}]}},mounted(){this.$store.dispatch("node/getCollections")},methods:{exportCollection(e){return f(this,void 0,void 0,(function*(){this.$q.loading.show({message:"Downloading. Please wait...",boxClass:"bg-grey-2 text-grey-9",spinnerColor:"primary"}),yield this.$store.dispatch("node/exportDocuments",e).then((()=>this.$q.loading.hide())).catch((()=>{this.$q.loading.hide(),this.$q.dialog({title:"Export failed",message:"Try desktop version of the app."})}))}))},drop(e){this.$q.dialog({title:"Confirm",message:`Drop ${e} and all documents?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/dropCollection",e)}))},cloneCollection(e){this.$q.dialog({title:"Clone Schema",message:"Provide name for new collection? (documents are not copied!, only schema, currations and synonyms)",prompt:{model:"",type:"text"},cancel:!0,persistent:!0}).onOk((t=>{this.$store.dispatch("node/cloneCollectionSchema",{collectionName:e,destinationName:t})}))}}});var k=o(77716),g=o(39942),y=o(44488),F=o(45262),C=o(1693),w=o(55998),v=o(90124),q=o(25173),A=o(3952),$=o(50492),x=o(39270);const Q=(0,c.A)(h,[["render",l]]),W=Q;p()(h,"components",{QPage:k.A,QTable:g.A,QTr:y.A,QTd:F.A,QBtn:C.A,QMenu:w.A,QItem:v.A,QItemSection:q.A,QAvatar:A.A,QIcon:$.A,QInput:x.A})}}]); \ No newline at end of file +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[729],{49463:(e,t,o)=>{o.r(t),o.d(t,{default:()=>W});var n=o(61758),a=o(58790);function l(e,t,o,l,s,i){const r=(0,n.g2)("collection-create"),c=(0,n.g2)("q-btn"),d=(0,n.g2)("q-td"),m=(0,n.g2)("q-item-section"),u=(0,n.g2)("q-avatar"),p=(0,n.g2)("q-item"),_=(0,n.g2)("q-menu"),b=(0,n.g2)("q-icon"),f=(0,n.g2)("q-tr"),h=(0,n.g2)("q-input"),k=(0,n.g2)("q-table"),g=(0,n.g2)("q-page");return(0,n.uX)(),(0,n.Wv)(g,{padding:""},{default:(0,n.k6)((()=>[(0,n.bF)(r),(0,n.bF)(k,{filter:e.filter,columns:e.columns,rows:e.$store.state.node.data.collections,"row-key":"name",pagination:{rowsPerPage:0,sortBy:"name"}},{body:(0,n.k6)((o=>[(0,n.bF)(f,{props:o},{default:(0,n.k6)((()=>[(0,n.bF)(d,{key:"name",props:o},{default:(0,n.k6)((()=>[(0,n.bF)(c,{"no-caps":"",flat:"",to:`/collection/${o.row.name}/search`,size:"1.2em",class:"text-bold"},{default:(0,n.k6)((()=>[(0,n.eW)((0,a.v_)(o.row.name),1)])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,n.bF)(d,{key:"actions",props:o},{default:(0,n.k6)((()=>[(0,n.bF)(c,{flat:"",round:"",icon:"sym_s_more_vert"},{default:(0,n.k6)((()=>[(0,n.bF)(_,null,{default:(0,n.k6)((()=>[(0,n.bF)(p,{dense:"",clickable:"",to:`/collection/${o.row.name}/document`},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[1]||(t[1]=[(0,n.eW)("Import")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_file_upload"})])),_:1})])),_:2},1032,["to"]),(0,n.bF)(p,{dense:"",clickable:"",onClick:t=>e.exportCollection(o.row.name)},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[2]||(t[2]=[(0,n.eW)("Export")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_file_download"})])),_:1})])),_:2},1032,["onClick"]),(0,n.bF)(p,{dense:"",clickable:"",to:`/collection/${o.row.name}/schema`},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[3]||(t[3]=[(0,n.eW)("Edit")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_data_object"})])),_:1})])),_:2},1032,["to"]),(0,n.bF)(p,{dense:"",clickable:"",onClick:t=>e.cloneCollection(o.row.name)},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[4]||(t[4]=[(0,n.eW)("Clone Schema")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_content_copy"})])),_:1})])),_:2},1032,["onClick"]),(0,n.bF)(p,{dense:"",clickable:"",flat:"",style:{color:"#de3b39"},onClick:t=>e.drop(o.row.name)},{default:(0,n.k6)((()=>[(0,n.bF)(m,null,{default:(0,n.k6)((()=>t[5]||(t[5]=[(0,n.eW)("Delete")]))),_:1}),(0,n.bF)(m,{avatar:""},{default:(0,n.k6)((()=>[(0,n.bF)(u,{icon:"sym_s_delete"})])),_:1})])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1032,["props"]),(0,n.bF)(d,{key:"num_documents",props:o},{default:(0,n.k6)((()=>[(0,n.bF)(c,{"no-caps":"",flat:"",to:`/collection/${o.row.name}/search`},{default:(0,n.k6)((()=>[(0,n.eW)((0,a.v_)(o.row.num_documents)+" ",1),(0,n.bF)(b,{name:"sym_s_search",size:"1em",right:""})])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,n.bF)(d,{key:"schema_fields",props:o},{default:(0,n.k6)((()=>[(0,n.bF)(c,{"no-caps":"",flat:"",to:`/collection/${o.row.name}/schema`},{default:(0,n.k6)((()=>[(0,n.eW)((0,a.v_)(o.row.fields.length||0)+" ",1),(0,n.bF)(b,{name:"sym_s_data_object",size:"1em",right:""})])),_:2},1032,["to"])])),_:2},1032,["props"]),(0,n.bF)(d,{key:"created_at",props:o},{default:(0,n.k6)((()=>[(0,n.eW)((0,a.v_)(new Date(1e3*o.row.created_at).toLocaleString()),1)])),_:2},1032,["props"])])),_:2},1032,["props"])])),"top-right":(0,n.k6)((()=>[(0,n.bF)(h,{borderless:"",dense:"",debounce:"300",modelValue:e.filter,"onUpdate:modelValue":t[0]||(t[0]=t=>e.filter=t),placeholder:"Search"},{append:(0,n.k6)((()=>[(0,n.bF)(b,{name:"sym_s_search"})])),_:1},8,["modelValue"])])),_:1},8,["filter","columns","rows"])])),_:1})}function s(e,t,o,a,l,s){const i=(0,n.g2)("collection-ui"),r=(0,n.g2)("q-expansion-item"),c=(0,n.g2)("q-list");return(0,n.uX)(),(0,n.Wv)(c,{bordered:"",class:"rounded-borders"},{default:(0,n.k6)((()=>[(0,n.bF)(r,{"expand-separator":"",icon:"sym_s_library_add","expand-icon":"sym_s_unfold_more","expanded-icon":"sym_s_unfold_less",label:"Add Collection","header-class":"bg-primary text-white"},{default:(0,n.k6)((()=>[(0,n.bF)(i,{"primary-action-label":"Create Collection","create-mode":"",onSubmit:e.createCollection},null,8,["onSubmit"])])),_:1})])),_:1})}var i=o(93930);const r=(0,n.pM)({components:{CollectionUi:i.A},name:"CollectionCreate",methods:{createCollection(e){const t=JSON.parse(JSON.stringify(e));for(const e of t.fields)"float[]"===e.type&&e.num_dim||delete e.num_dim,e.type.startsWith("object")&&(t.enable_nested_fields=!0);this.$store.dispatch("node/createCollection",t)}}});var c=o(12807),d=o(53999),m=o(9459),u=o(98582),p=o.n(u);const _=(0,c.A)(r,[["render",s]]),b=_;p()(r,"components",{QList:d.A,QExpansionItem:m.A});var f=function(e,t,o,n){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,l){function s(e){try{r(n.next(e))}catch(e){l(e)}}function i(e){try{r(n["throw"](e))}catch(e){l(e)}}function r(e){e.done?o(e.value):a(e.value).then(s,i)}r((n=n.apply(e,t||[])).next())}))};const h=(0,n.pM)({components:{CollectionCreate:b},name:"Collections",data(){return{filter:"",columns:[{name:"name",required:!0,label:"Name",field:"name",sortable:!0},{name:"actions",required:!1,label:"Actions",field:"actions",sortable:!1},{name:"num_documents",required:!0,label:"Nb documents",field:"num_documents",sortable:!0},{name:"schema_fields",required:!0,label:"Schema fields",field:"fields",sortable:!0},{name:"created_at",required:!0,label:"Created at",field:"created_at",sortable:!0}]}},mounted(){this.$store.dispatch("node/getCollections")},methods:{exportCollection(e){return f(this,void 0,void 0,(function*(){this.$q.loading.show({message:"Downloading. Please wait...",boxClass:"bg-grey-2 text-grey-9",spinnerColor:"primary"}),yield this.$store.dispatch("node/exportDocuments",e).then((()=>this.$q.loading.hide())).catch((()=>{this.$q.loading.hide(),this.$q.dialog({title:"Export failed",message:"Try desktop version of the app."})}))}))},drop(e){this.$q.dialog({title:"Confirm",message:`Drop ${e} and all documents?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/dropCollection",e)}))},cloneCollection(e){this.$q.dialog({title:"Clone Schema",message:"Provide name for new collection? (documents are not copied!, only schema, currations and synonyms)",prompt:{model:"",type:"text"},cancel:!0,persistent:!0}).onOk((t=>{this.$store.dispatch("node/cloneCollectionSchema",{collectionName:e,destinationName:t})}))}}});var k=o(77716),g=o(39942),y=o(44488),F=o(45262),C=o(1693),w=o(55998),v=o(90124),q=o(25173),A=o(3952),$=o(50492),x=o(39270);const Q=(0,c.A)(h,[["render",l]]),W=Q;p()(h,"components",{QPage:k.A,QTable:g.A,QTr:y.A,QTd:F.A,QBtn:C.A,QMenu:w.A,QItem:v.A,QItemSection:q.A,QAvatar:A.A,QIcon:$.A,QInput:x.A})}}]); \ No newline at end of file diff --git a/js/932.b901cad7.js b/js/932.b901cad7.js new file mode 100644 index 0000000..bef975a --- /dev/null +++ b/js/932.b901cad7.js @@ -0,0 +1 @@ +"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[932],{5540:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var s=n(61758),a=n(58790);const o={class:"row justify-between q-mb-md"},i={class:"text-h5"};function l(e,t,n,l,c,d){const r=(0,s.g2)("q-icon"),m=(0,s.g2)("q-btn"),u=(0,s.g2)("collection-ui"),h=(0,s.g2)("q-page");return(0,s.uX)(),(0,s.Wv)(h,{padding:"",class:"column"},{default:(0,s.k6)((()=>{var n;return[(0,s.Lk)("div",o,[(0,s.Lk)("div",i,[(0,s.bF)(r,{size:"md",name:"sym_s_data_object"}),(0,s.eW)(" Schema for "+(0,a.v_)(null===(n=e.$store.state.node.currentCollection)||void 0===n?void 0:n.name),1)]),(0,s.bF)(m,{unelevated:"",color:"negative",onClick:t[0]||(t[0]=t=>{var n;return e.drop((null===(n=e.$store.state.node.currentCollection)||void 0===n?void 0:n.name)||"")})},{default:(0,s.k6)((()=>t[1]||(t[1]=[(0,s.eW)("Drop Collection")]))),_:1})]),(0,s.bF)(u,{"initial-schema":e.schema,"primary-action-label":"Update Schema",onSubmit:e.update},null,8,["initial-schema","onSubmit"])]})),_:1})}var c=n(93930);const d=(0,s.pM)({name:"Schema",components:{CollectionUi:c.A},computed:{schema(){const e=this.$store.state.node.currentCollection;if(e){const t={name:e.name,fields:e.fields.map((e=>{const t=["name","type","facet","optional","index","sort","infix","locale"],n=Object.keys(e).filter((e=>!t.includes(e)));return t.concat(n).reduce(((t,n)=>(t[n]=e[n],t)),{})})),default_sorting_field:e.default_sorting_field},n=Object.keys(e).filter((e=>!["name","fields","default_sorting_field","created_at","num_documents"].includes(e)));return n.forEach((n=>{t[n]=e[n]})),t}return{name:"",fields:[],default_sorting_field:"",token_separators:[],symbols_to_index:[],enable_nested_fields:!1}}},methods:{drop(e){this.$q.dialog({title:"Confirm",message:`Drop ${e} and all documents?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/dropCollection",e)}))},update(e){if(!this.schema||!this.schema.name||!this.schema.fields)return;const t={fields:this.schema.fields.map((e=>({name:e.name,drop:!0}))).concat(JSON.parse(JSON.stringify(e.fields)))};this.$store.dispatch("node/updateCollection",{collectionName:this.schema.name,schema:t})}}});var r=n(12807),m=n(77716),u=n(50492),h=n(1693),f=n(98582),p=n.n(f);const _=(0,r.A)(d,[["render",l]]),b=_;p()(d,"components",{QPage:m.A,QIcon:u.A,QBtn:h.A})}}]); \ No newline at end of file diff --git a/js/985.d58d03f2.js b/js/985.d58d03f2.js deleted file mode 100644 index fd90986..0000000 --- a/js/985.d58d03f2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[985],{70303:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var s=n(61758),a=n(58790);const o={class:"row justify-between q-mb-md"},i={class:"text-h5"};function l(e,t,n,l,c,d){const r=(0,s.g2)("q-icon"),m=(0,s.g2)("q-btn"),u=(0,s.g2)("collection-ui"),h=(0,s.g2)("q-page");return(0,s.uX)(),(0,s.Wv)(h,{padding:"",class:"column"},{default:(0,s.k6)((()=>{var n;return[(0,s.Lk)("div",o,[(0,s.Lk)("div",i,[(0,s.bF)(r,{size:"md",name:"sym_s_data_object"}),(0,s.eW)(" Schema for "+(0,a.v_)(null===(n=e.$store.state.node.currentCollection)||void 0===n?void 0:n.name),1)]),(0,s.bF)(m,{unelevated:"",color:"negative",onClick:t[0]||(t[0]=t=>{var n;return e.drop((null===(n=e.$store.state.node.currentCollection)||void 0===n?void 0:n.name)||"")})},{default:(0,s.k6)((()=>t[1]||(t[1]=[(0,s.eW)("Drop Collection")]))),_:1})]),(0,s.bF)(u,{"initial-schema":e.schema,"primary-action-label":"Update Schema",onSubmit:e.update},null,8,["initial-schema","onSubmit"])]})),_:1})}var c=n(93930);const d=(0,s.pM)({name:"Schema",components:{CollectionUi:c.A},computed:{schema(){const e=this.$store.state.node.currentCollection;if(e){const t={name:e.name,fields:e.fields.map((e=>{const t=["name","type","facet","optional","index","sort","infix","locale"],n=Object.keys(e).filter((e=>!t.includes(e)));return t.concat(n).reduce(((t,n)=>(t[n]=e[n],t)),{})})),default_sorting_field:e.default_sorting_field},n=Object.keys(e).filter((e=>!["name","fields","default_sorting_field","created_at","num_documents"].includes(e)));return n.forEach((n=>{t[n]=e[n]})),t}return{name:"",fields:[],default_sorting_field:"",token_separators:[],symbols_to_index:[],enable_nested_fields:!1}}},methods:{drop(e){this.$q.dialog({title:"Confirm",message:`Drop ${e} and all documents?`,cancel:!0,persistent:!0}).onOk((()=>{this.$store.dispatch("node/dropCollection",e)}))},update(e){if(!this.schema||!this.schema.name||!this.schema.fields)return;const t={fields:this.schema.fields.map((e=>({name:e.name,drop:!0}))).concat(e.fields)};this.$store.dispatch("node/updateCollection",{collectionName:this.schema.name,schema:t})}}});var r=n(12807),m=n(77716),u=n(50492),h=n(1693),f=n(98582),p=n.n(f);const _=(0,r.A)(d,[["render",l]]),b=_;p()(d,"components",{QPage:m.A,QIcon:u.A,QBtn:h.A})}}]); \ No newline at end of file diff --git a/js/app.4806cbda.js b/js/app.4806cbda.js deleted file mode 100644 index 0304953..0000000 --- a/js/app.4806cbda.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var e={60340:(e,t,o)=>{"use strict";var r=o(29104),n=o(36501),i=o(38734),s=o(61758);function a(e,t,o,r,n,i){const a=(0,s.g2)("router-view");return(0,s.uX)(),(0,s.Wv)(a)}const l=(0,s.pM)({name:"App"});var c=o(12807);const d=(0,c.A)(l,[["render",a]]),u=d;var p=o(12573),m=o(1573),v=o(60455);const h=[{path:"/",component:()=>Promise.all([o.e(121),o.e(996),o.e(218)]).then(o.bind(o,5218)),children:[{path:"",component:()=>Promise.all([o.e(121),o.e(277)]).then(o.bind(o,49277))},{path:"aliases",component:()=>Promise.all([o.e(121),o.e(318)]).then(o.bind(o,75318))},{path:"apikeys",component:()=>Promise.all([o.e(121),o.e(996),o.e(301)]).then(o.bind(o,54699))},{path:"analyticsrules",component:()=>Promise.all([o.e(121),o.e(40)]).then(o.bind(o,68040))},{path:"searchpresets",component:()=>Promise.all([o.e(121),o.e(996),o.e(642)]).then(o.bind(o,47090))},{path:"stopwords",component:()=>Promise.all([o.e(121),o.e(306)]).then(o.bind(o,78306))},{path:"collections",component:()=>Promise.all([o.e(121),o.e(996),o.e(729)]).then(o.bind(o,49463))},{path:"collection/:name/document",component:()=>Promise.all([o.e(121),o.e(996),o.e(110)]).then(o.bind(o,84950))},{path:"collection/:name/search",component:()=>Promise.all([o.e(121),o.e(996),o.e(233)]).then(o.bind(o,8537))},{path:"collection/:name/schema",component:()=>Promise.all([o.e(121),o.e(996),o.e(985)]).then(o.bind(o,70303))},{path:"collection/:name/synonyms",component:()=>Promise.all([o.e(121),o.e(536)]).then(o.bind(o,20536))},{path:"collection/:name/curations",component:()=>Promise.all([o.e(121),o.e(996),o.e(704)]).then(o.bind(o,12944))}]},{path:"/login",name:"Login",component:()=>Promise.all([o.e(121),o.e(996),o.e(473)]).then(o.bind(o,72473))},{path:"/:catchAll(.*)*",component:()=>Promise.all([o.e(121),o.e(335)]).then(o.bind(o,14335))}],y=h;var g=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const f=(0,m.wE)((function({store:e}){const t=v.Bt,o=(0,v.aE)({scrollBehavior:()=>({left:0,top:0}),routes:y,history:t("/typesense-dashboard/")});return e.dispatch("node/connectionCheck"),o.beforeEach(((t,o,r)=>g(this,void 0,void 0,(function*(){"Login"===t.name||e.state.node.isConnected?t.params.name?(e.state.node.currentCollection&&e.state.node.currentCollection.name===t.params.name||(yield e.dispatch("node/loadCurrentCollectionByName",t.params.name)),r()):r():(e.commit("node/setPreviousRoute",t),r({name:"Login"}))})))),o}));async function C(e,t){const r=e(u);r.use(n.A,t);const s="function"===typeof p.A?await(0,p.A)({}):p.A,{storeKey:a}=await Promise.resolve().then(o.bind(o,12573)),l=(0,i.IG)("function"===typeof f?await f({store:s}):f);return s.$router=l,{app:r,store:s,storeKey:a,router:l}}var b=o(71271),A=o(69610),w=o(36153),S=o(20989);const P={config:{dark:"auto"},plugins:{LocalStorage:b.A,Dialog:A.A,Loading:w.A,Notify:S.A}},E="/typesense-dashboard/",D=/\/\//,O=e=>(E+e).replace(D,"/");async function k({app:e,router:t,store:o,storeKey:r},n){let i=!1;const s=e=>{try{return O(t.resolve(e).href)}catch(o){}return Object(e)===e?null:e},a=e=>{if(i=!0,"string"===typeof e&&/^https?:\/\//.test(e))return void(window.location.href=e);const t=s(e);null!==t&&(window.location.href=t,window.location.reload())},l=window.location.href.replace(window.location.origin,"");for(let d=0;!1===i&&d{const[t,r]=void 0!==Promise.allSettled?["allSettled",e=>e.map((e=>{if("rejected"!==e.status)return e.value.default;console.error("[Quasar] boot error:",e.reason)}))]:["all",e=>e.map((e=>e.default))];return Promise[t]([Promise.resolve().then(o.bind(o,77854)),Promise.resolve().then(o.bind(o,94497)),Promise.resolve().then(o.bind(o,93641)),Promise.resolve().then(o.bind(o,53532))]).then((t=>{const o=r(t).filter((e=>"function"===typeof e));k(e,o)}))}))},77854:(e,t,o)=>{"use strict";o.r(t),o.d(t,{api:()=>i,default:()=>s});var r=o(1573),n=o(82303);const i=n.A.create({baseURL:"https://api.example.com"}),s=(0,r.zj)((({app:e})=>{e.config.globalProperties.$axios=n.A,e.config.globalProperties.$api=i}))},53532:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>s});var r=o(1573),n=o(82303),i=o(41597);const s=(0,r.zj)((({store:e})=>{i.Ay.is.electron||n.A.get("config.json").then((t=>{e.dispatch("node/login",t.data)}))}))},93641:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>l});var r=o(1573),n=o(71271),i=o(50411),s=o(61758);const a="typesense-dark-mode",l=(0,r.zj)((()=>{const e=n.A.getItem(a);null!==e&&i.A.set(e),(0,s.wB)((()=>i.A.isActive),(e=>{n.A.set(a,e)}))}))},94497:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>i});var r=o(1573),n=o(39775);const i=(0,r.zj)((({app:e})=>{e.use(n.Ay)}))},12573:(e,t,o)=>{"use strict";o.d(t,{A:()=>O,storeKey:()=>D});var r=o(1573),n=o(36980),i=o(71271);const s="typesense-logindata",a="typesense-loginhistory";function l(){return{loginData:i.A.getItem(s),loginHistory:i.A.getItem(a)||[],forceHomeRedirect:!1,isConnected:!1,previousRoute:null,error:null,currentCollection:null,documentsToEdit:[],data:{debug:{},metrics:{},stats:{},collections:[],aliases:[],apiKeys:[],analyticsRules:[],searchPresets:[],stopwords:[],overrides:[],synonyms:[],features:{stopwords:!1,analyticsRules:!1,searchPresets:!1,stats:!1}}}}const c=l;var d=o(20989),u=o(7958),p=o.n(u),m=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const v={connectionCheck(e){e.state.loginData?e.getters.api.get("/metrics.json").then((t=>m(this,void 0,void 0,(function*(){e.commit("setData",{metrics:t.data}),yield Promise.all([e.dispatch("getCollections"),e.dispatch("getAliases"),e.dispatch("getApiKeys"),e.dispatch("getDebug")]),e.dispatch("getSearchPresets").then((()=>{e.commit("setFeature",{key:"searchPresets",value:!0})})).catch((()=>{e.commit("setFeature",{key:"searchPresets",value:!1})})),e.dispatch("getAnalyticsRules").then((()=>{e.commit("setFeature",{key:"analyticsRules",value:!0})})).catch((()=>{e.commit("setFeature",{key:"analyticsRules",value:!1})})),e.dispatch("getStopwords").then((()=>{e.commit("setFeature",{key:"stopwords",value:!0})})).catch((()=>{e.commit("setFeature",{key:"stopwords",value:!1})})),e.commit("setIsConnected",!0),e.commit("saveHistory"),e.commit("setError",null)})))).catch((t=>{e.commit("setIsConnected",!1),e.commit("setError",t.message)})):e.commit("setIsConnected",!1)},refreshServerStatus(e){e.getters.api.get("/metrics.json").then((t=>{e.commit("setData",{metrics:t.data})})),e.getters.api.get("/stats.json").then((t=>{e.commit("setData",{stats:t.data}),e.state.data.features.stats||e.commit("setFeature",{key:"stats",value:!0})})).catch((()=>{e.commit("setFeature",{key:"stats",value:!1})}))},getDebug(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getDebug().then((t=>{e.commit("setData",{debug:t})}))}))},getCollections(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getCollections().then((t=>{e.commit("setData",{collections:t})})).catch((t=>{console.log(t),e.dispatch("connectionCheck")}))}))},getAliases(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getAliases().then((t=>{e.commit("setData",{aliases:t.aliases})}))}))},getApiKeys(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getApiKeys().then((t=>{e.commit("setData",{apiKeys:t.keys})}))}))},getAnalyticsRules(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getAnalyticsRules().then((t=>{e.commit("setData",{analyticsRules:t.rules})}))}))},deleteAnalyticsRule(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteAnalyticsRule(t),e.dispatch("getAnalyticsRules")}))},createAnalyticsRule(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertAnalyticsRule(t.name,t),e.dispatch("getAnalyticsRules")}catch(o){e.commit("setError",o.message)}}))},getSearchPresets(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getSearchPresets().then((t=>{e.commit("setData",{searchPresets:t.presets})}))}))},deleteSearchPreset(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteSearchPreset(t),e.dispatch("getSearchPresets")}))},upsertSearchPreset(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertSearchPreset(t.name,t),e.dispatch("getSearchPresets")}catch(o){e.commit("setError",o.message)}}))},getStopwords(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getStopwords().then((t=>{e.commit("setData",{stopwords:t.stopwords})}))}))},upsertStopwords(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertStopwords(t.id,t),e.dispatch("getStopwords")}catch(o){e.commit("setError",o.message)}}))},deleteStopwords(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteStopwords(t),e.dispatch("getStopwords")}))},getSynonyms(e,t){e.getters.api.getSynonyms(t).then((t=>{e.commit("setData",{synonyms:t.synonyms})}))},getOverrides(e,t){e.getters.api.getOverrides(t).then((t=>{e.commit("setData",{overrides:t.overrides})}))},login(e,t){const{apiKey:o,node:r,forceHomeRedirect:n=!1}=t;e.commit("setForceRedirect",n),e.commit("setNodeData",{apiKey:o,node:r}),e.dispatch("connectionCheck")},logout(e){i.A.remove(s),e.commit("setCurrentCollection",null),e.commit("setIsConnected",!1)},loadCurrentCollection(e,t){var o;if(e.commit("setCurrentCollection",t),e.dispatch("getSynonyms",t.name),e.dispatch("getOverrides",t.name),null===(o=this.$router.currentRoute.value.params)||void 0===o?void 0:o.name){const e=Object.assign(Object.assign({},this.$router.currentRoute.value.params),{name:t.name});this.$router.push({name:this.$router.currentRoute.value.name,params:e})}},loadCurrentCollectionByName(e,t){return e.dispatch("loadCurrentCollection",e.state.data.collections.find((e=>e.name===t)))},dropCollection(e,t){return m(this,void 0,void 0,(function*(){e.commit("setCurrentCollection",null),yield e.getters.api.dropCollection(t),e.dispatch("getCollections")}))},createCollection(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const o=yield e.getters.api.createCollection(JSON.parse(JSON.stringify(t)));e.commit("setData",{collections:e.state.data.collections.concat([o])}),e.commit("setCurrentCollection",o),this.$router.push(`/collection/${o.name}/schema`)}catch(o){e.commit("setError",o.message)}}))},updateCollection(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.updateCollection(t.collectionName,t.schema);const o=yield e.getters.api.getCollection(t.collectionName);e.commit("setData",{collections:e.state.data.collections.map((e=>e.name===t.collectionName?o:e))}),e.commit("setCurrentCollection",o)}catch(o){e.commit("setError",o.message)}}))},cloneCollectionSchema(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.post(`/collections?src_name=${t.collectionName}`,{name:t.destinationName});const o=yield e.getters.api.getCollection(t.destinationName);e.commit("setData",{collections:e.state.data.collections.concat([o])}),e.commit("setCurrentCollection",o),this.$router.push(`/collection/${t.destinationName}/schema`)}catch(o){e.commit("setError",o.message)}}))},deleteAlias(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteAlias(t),e.dispatch("getAliases")}))},createAlias(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertAlias(t),e.dispatch("getAliases")}catch(o){e.commit("setError",o.message)}}))},createApiKey(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const o=yield e.getters.api.createApiKey(t);return e.dispatch("getApiKeys"),o}catch(o){throw e.commit("setError",o.message),o}}))},deleteApiKey(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteApiKey(t),e.dispatch("getApiKeys")}))},createSynonym(e,t){var o,r;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertSynonym(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t.id,t.synonym),e.dispatch("getSynonyms",null===(r=e.state.currentCollection)||void 0===r?void 0:r.name)}catch(n){e.commit("setError",n.message)}}))},deleteSynonym(e,t){var o,r;return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteSynonym(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t),e.dispatch("getSynonyms",null===(r=e.state.currentCollection)||void 0===r?void 0:r.name)}))},createOverride(e,t){var o,r;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertOverride(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t.id,t.override),e.dispatch("getOverrides",null===(r=e.state.currentCollection)||void 0===r?void 0:r.name)}catch(n){e.commit("setError",n.message)}}))},deleteOverride(e,t){var o,r;return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteOverride(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t),e.dispatch("getOverrides",null===(r=e.state.currentCollection)||void 0===r?void 0:r.name)}))},deleteDocumentById(e,t){var o;return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteDocumentById(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t)}))},search(e,t){var o;return e.getters.api.search((null===(o=e.state.currentCollection)||void 0===o?void 0:o.name)||"",JSON.parse(JSON.stringify(t)))},importDocuments(e,t){var o;return e.getters.api.importDocuments(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t.documents,t.action)},exportDocuments(e,t){return m(this,void 0,void 0,(function*(){return e.getters.api.exportDocuments(t).then((e=>{const o=new Blob([e],{type:"text/plain;charset=utf-8"});p().saveAs(o,`${t}.ljson`)}))}))},editDocuments(e,t){var o;e.commit("setDocumentsToEdit",t),this.$router.push(`/collection/${(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name)||""}/document`)},exportToJson(e,t){const o=new Blob([JSON.stringify(t,null,2)],{type:"application/json;charset=utf-8"});p().saveAs(o,"export.json")},operationCompactDB(e){var t;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const o=yield e.getters.api.post("/operations/db/compact");(null===(t=o.data)||void 0===t?void 0:t.success)&&d.A.create({position:"top",progress:!0,group:!1,timeout:1e3,color:"positive",message:"Compact DB: Server responded with success"})}catch(o){e.commit("setError",o.message)}}))},clearCache(e){var t;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const o=yield e.getters.api.post("/operations/cache/clear");(null===(t=o.data)||void 0===t?void 0:t.success)&&d.A.create({position:"top",progress:!0,group:!1,timeout:1e3,color:"positive",message:"Clear Cache: Server responded with success"})}catch(o){e.commit("setError",o.message)}}))},slowQueryThreshold(e,t){var o;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const r=yield e.getters.api.post("/config",{"log-slow-requests-time-ms":t});(null===(o=r.data)||void 0===o?void 0:o.success)&&d.A.create({position:"top",progress:!0,group:!1,timeout:1e3,color:"positive",message:`Set Slow Request Threshold to: ${t}`})}catch(r){e.commit("setError",r.message)}}))}},h=v;var y=o(82303),g=o(99180),f=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class C{init({node:e,apiKey:t}){this.axiosClient=y.A.create({baseURL:`${e.protocol}://${e.host}:${e.port}${e.path||""}`,headers:{"x-typesense-api-key":t}}),this.typesenseClient=new g.Client({nodes:[Object.assign({},e)],apiKey:t})}getDebug(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.debug.retrieve()}getCollections(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.collections().retrieve()}createCollection(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections().create(e)}getCollection(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).retrieve()}dropCollection(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).delete()}updateCollection(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).update(t)}getAliases(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.aliases().retrieve()}upsertAlias(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.aliases().upsert(e.name,{collection_name:e.collection_name})}deleteAlias(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.aliases(e).delete()}getApiKeys(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.keys().retrieve()}createApiKey(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.keys().create(e)}deleteApiKey(e){return f(this,void 0,void 0,(function*(){this.typesenseClient&&(yield this.typesenseClient.keys(parseInt(e,10)).delete())}))}getAnalyticsRules(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.analytics.rules().retrieve()}upsertAnalyticsRule(e,t){var o;return(null===(o=this.typesenseClient)||void 0===o?void 0:o.analytics.rules()).upsert(e,t)}deleteAnalyticsRule(e){var t;return(null===(t=this.typesenseClient)||void 0===t?void 0:t.analytics.rules(e)).delete()}getSearchPresets(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.presets().retrieve()}upsertSearchPreset(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.presets().upsert(e,t)}deleteSearchPreset(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.presets(e).delete()}getStopwords(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.stopwords().retrieve()}upsertStopwords(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.stopwords().upsert(e,t)}deleteStopwords(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.stopwords(e).delete()}getSynonyms(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).synonyms().retrieve()}upsertSynonym(e,t,o){var r;return null===(r=this.typesenseClient)||void 0===r?void 0:r.collections(e).synonyms().upsert(t,o)}deleteSynonym(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).synonyms(t).delete()}getOverrides(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).overrides().retrieve()}upsertOverride(e,t,o){var r;return null===(r=this.typesenseClient)||void 0===r?void 0:r.collections(e).overrides().upsert(t,o)}deleteOverride(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).overrides(t).delete()}deleteDocumentById(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).documents(t).delete()}importDocuments(e,t,o){var r;if(this.typesenseClient)return(null===(r=this.typesenseClient.collections(e))||void 0===r?void 0:r.documents()).import(t,{action:o}).catch((e=>e.importResults))}exportDocuments(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).documents().export()}search(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).documents().search(t)}get(e){var t;return null===(t=this.axiosClient)||void 0===t?void 0:t.get(e).then((e=>({data:e.data}))).catch((e=>{var t,o;throw Error((null===(o=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===o?void 0:o.message)||e.message)}))}post(e,t){var o;return null===(o=this.axiosClient)||void 0===o?void 0:o.post(e,t).then((e=>({data:e.data}))).catch((e=>{var t,o;throw Error((null===(o=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===o?void 0:o.message)||e.message)}))}}const b={api(e){if(e.loginData){const t=window.electron;let o=new C;return t&&(o=t,t.rejectTLS(Number(e.loginData.node.tls))),o.init({node:Object.assign({},e.loginData.node),apiKey:e.loginData.apiKey}),o}}},A=b,w={setNodeData(e,t){e.loginData=t,i.A.set(s,t)},setIsConnected(e,t){var o,r,n,i,s;const a=null===(o=this.$router)||void 0===o?void 0:o.currentRoute.value;t&&!e.isConnected&&(e.previousRoute?(null===(r=this.$router)||void 0===r||r.push(e.previousRoute),e.previousRoute=null):null===(n=this.$router)||void 0===n||n.push("/")),t||"Login"===(null===a||void 0===a?void 0:a.name)||null===(i=this.$router)||void 0===i||i.push("/login"),t&&e.forceHomeRedirect&&(null===(s=this.$router)||void 0===s||s.push("/"),d.A.create({position:"top",progress:!0,group:!1,timeout:1e3,color:"positive",message:"Server changed"}),e.forceHomeRedirect=!1,e.currentCollection=null),e.isConnected=t},saveHistory(e){const t=JSON.stringify(e.loginData),o=e.loginHistory.indexOf(t);0!==o&&(o>0&&e.loginHistory.splice(o,1),e.loginHistory.unshift(t),i.A.set(a,e.loginHistory))},clearHistory(e){e.loginHistory=[],i.A.set(a,[])},setForceRedirect(e,t){e.forceHomeRedirect=t},setPreviousRoute(e,t){e.previousRoute=t},setData(e,t){for(const o in t)e.data[o]=t[o]},setFeature(e,t){e.data.features[t.key]=t.value},setError(e,t){e.error=t},setCurrentCollection(e,t){var o;e.currentCollection=t,t||null===(o=this.$router)||void 0===o||o.push("/collections")},setDocumentsToEdit(e,t){e.documentsToEdit=t}},S=w,P={namespaced:!0,actions:h,getters:A,mutations:S,state:c},E=P,D=Symbol("vuex-key"),O=(0,r.M_)((function(){const e=(0,n.y$)({modules:{node:E},strict:!1});return e}))},73529:()=>{}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,o),i.exports}o.m=e,(()=>{o.amdO={}})(),(()=>{var e=[];o.O=(t,r,n,i)=>{if(!r){var s=1/0;for(d=0;d=i)&&Object.keys(o.O).every((e=>o.O[e](r[l])))?r.splice(l--,1):(a=!1,i0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[r,n,i]}})(),(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[]))})(),(()=>{o.u=e=>"js/"+(996===e?"chunk-common":e)+"."+{40:"f71b1fd6",110:"caa8adf3",218:"f037e902",233:"d6d19e9f",277:"dab90dcc",301:"1821af05",306:"4c4ca9ac",318:"47bb3c9e",335:"408fd58d",473:"58dd100e",536:"bd078dcc",614:"cc7dddb7",642:"c5a9600d",704:"4b6593f8",729:"966cf392",985:"d58d03f2",996:"8f2ae4c2"}[e]+".js"})(),(()=>{o.miniCssF=e=>"css/"+e+"."+{110:"954a317a",218:"a4256f29",233:"1a5aed88",301:"954a317a",642:"954a317a",704:"954a317a",729:"954a317a",985:"954a317a"}[e]+".css"})(),(()=>{o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e={},t="typesense-dashboard:";o.l=(r,n,i,s)=>{if(e[r])e[r].push(n);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d{a.onerror=a.onload=null,clearTimeout(m);var n=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((e=>e(o))),t)return t(o)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),(()=>{o.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{o.p="/typesense-dashboard/"})(),(()=>{if("undefined"!==typeof document){var e=(e,t,r,n,i)=>{var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",o.nc&&(s.nonce=o.nc);var a=o=>{if(s.onerror=s.onload=null,"load"===o.type)n();else{var r=o&&o.type,a=o&&o.target&&o.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+r+": "+a+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=r,l.request=a,s.parentNode&&s.parentNode.removeChild(s),i(l)}};return s.onerror=s.onload=a,s.href=t,r?r.parentNode.insertBefore(s,r.nextSibling):document.head.appendChild(s),s},t=(e,t)=>{for(var o=document.getElementsByTagName("link"),r=0;rnew Promise(((n,i)=>{var s=o.miniCssF(r),a=o.p+s;if(t(s,a))return n();e(r,a,null,n,i)})),n={524:0};o.f.miniCss=(e,t)=>{var o={110:1,218:1,233:1,301:1,642:1,704:1,729:1,985:1};n[e]?t.push(n[e]):0!==n[e]&&o[e]&&t.push(n[e]=r(e).then((()=>{n[e]=0}),(t=>{throw delete n[e],t})))}}})(),(()=>{var e={524:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((o,r)=>n=e[t]=[o,r]));r.push(n[2]=i);var s=o.p+o.u(t),a=new Error,l=r=>{if(o.o(e,t)&&(n=e[t],0!==n&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+s+")",a.name="ChunkLoadError",a.type=i,a.request=s,n[1](a)}};o.l(s,l,"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,r)=>{var n,i,[s,a,l]=r,c=0;if(s.some((t=>0!==e[t]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(l)var d=l(o)}for(t&&t(r);co(60340)));r=o.O(r)})(); \ No newline at end of file diff --git a/js/app.d297940b.js b/js/app.d297940b.js new file mode 100644 index 0000000..5d7c80e --- /dev/null +++ b/js/app.d297940b.js @@ -0,0 +1 @@ +(()=>{var e={60340:(e,t,o)=>{"use strict";var r=o(29104),n=o(36501),i=o(38734),s=o(61758);function a(e,t,o,r,n,i){const a=(0,s.g2)("router-view");return(0,s.uX)(),(0,s.Wv)(a)}const l=(0,s.pM)({name:"App"});var c=o(12807);const d=(0,c.A)(l,[["render",a]]),u=d;var p=o(12573),m=o(1573),v=o(60455);const h=[{path:"/",component:()=>Promise.all([o.e(121),o.e(996),o.e(218)]).then(o.bind(o,5218)),children:[{path:"",component:()=>Promise.all([o.e(121),o.e(277)]).then(o.bind(o,49277))},{path:"aliases",component:()=>Promise.all([o.e(121),o.e(318)]).then(o.bind(o,75318))},{path:"apikeys",component:()=>Promise.all([o.e(121),o.e(996),o.e(301)]).then(o.bind(o,54699))},{path:"analyticsrules",component:()=>Promise.all([o.e(121),o.e(40)]).then(o.bind(o,68040))},{path:"searchpresets",component:()=>Promise.all([o.e(121),o.e(996),o.e(642)]).then(o.bind(o,47090))},{path:"stopwords",component:()=>Promise.all([o.e(121),o.e(306)]).then(o.bind(o,78306))},{path:"collections",component:()=>Promise.all([o.e(121),o.e(996),o.e(729)]).then(o.bind(o,49463))},{path:"collection/:name/document",component:()=>Promise.all([o.e(121),o.e(996),o.e(110)]).then(o.bind(o,84950))},{path:"collection/:name/search",component:()=>Promise.all([o.e(121),o.e(996),o.e(233)]).then(o.bind(o,8537))},{path:"collection/:name/schema",component:()=>Promise.all([o.e(121),o.e(996),o.e(932)]).then(o.bind(o,5540))},{path:"collection/:name/synonyms",component:()=>Promise.all([o.e(121),o.e(536)]).then(o.bind(o,20536))},{path:"collection/:name/curations",component:()=>Promise.all([o.e(121),o.e(996),o.e(704)]).then(o.bind(o,12944))}]},{path:"/login",name:"Login",component:()=>Promise.all([o.e(121),o.e(996),o.e(473)]).then(o.bind(o,72473))},{path:"/:catchAll(.*)*",component:()=>Promise.all([o.e(121),o.e(335)]).then(o.bind(o,14335))}],y=h;var g=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const f=(0,m.wE)((function({store:e}){const t=v.Bt,o=(0,v.aE)({scrollBehavior:()=>({left:0,top:0}),routes:y,history:t("/typesense-dashboard/")});return e.dispatch("node/connectionCheck"),o.beforeEach(((t,o,r)=>g(this,void 0,void 0,(function*(){"Login"===t.name||e.state.node.isConnected?t.params.name?(e.state.node.currentCollection&&e.state.node.currentCollection.name===t.params.name||(yield e.dispatch("node/loadCurrentCollectionByName",t.params.name)),r()):r():(e.commit("node/setPreviousRoute",t),r({name:"Login"}))})))),o}));async function C(e,t){const r=e(u);r.use(n.A,t);const s="function"===typeof p.A?await(0,p.A)({}):p.A,{storeKey:a}=await Promise.resolve().then(o.bind(o,12573)),l=(0,i.IG)("function"===typeof f?await f({store:s}):f);return s.$router=l,{app:r,store:s,storeKey:a,router:l}}var b=o(71271),A=o(69610),w=o(36153),S=o(20989);const P={config:{dark:"auto"},plugins:{LocalStorage:b.A,Dialog:A.A,Loading:w.A,Notify:S.A}},E="/typesense-dashboard/",D=/\/\//,O=e=>(E+e).replace(D,"/");async function k({app:e,router:t,store:o,storeKey:r},n){let i=!1;const s=e=>{try{return O(t.resolve(e).href)}catch(e){}return Object(e)===e?null:e},a=e=>{if(i=!0,"string"===typeof e&&/^https?:\/\//.test(e))return void(window.location.href=e);const t=s(e);null!==t&&(window.location.href=t,window.location.reload())},l=window.location.href.replace(window.location.origin,"");for(let r=0;!1===i&&r{const[t,r]=void 0!==Promise.allSettled?["allSettled",e=>e.map((e=>{if("rejected"!==e.status)return e.value.default;console.error("[Quasar] boot error:",e.reason)}))]:["all",e=>e.map((e=>e.default))];return Promise[t]([Promise.resolve().then(o.bind(o,77854)),Promise.resolve().then(o.bind(o,94497)),Promise.resolve().then(o.bind(o,93641)),Promise.resolve().then(o.bind(o,53532))]).then((t=>{const o=r(t).filter((e=>"function"===typeof e));k(e,o)}))}))},77854:(e,t,o)=>{"use strict";o.r(t),o.d(t,{api:()=>i,default:()=>s});var r=o(1573),n=o(82303);const i=n.A.create({baseURL:"https://api.example.com"}),s=(0,r.zj)((({app:e})=>{e.config.globalProperties.$axios=n.A,e.config.globalProperties.$api=i}))},53532:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>s});var r=o(1573),n=o(82303),i=o(41597);const s=(0,r.zj)((({store:e})=>{i.Ay.is.electron||n.A.get("config.json").then((t=>{e.dispatch("node/login",t.data)}))}))},93641:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>l});var r=o(1573),n=o(71271),i=o(50411),s=o(61758);const a="typesense-dark-mode",l=(0,r.zj)((()=>{const e=n.A.getItem(a);null!==e&&i.A.set(e),(0,s.wB)((()=>i.A.isActive),(e=>{n.A.set(a,e)}))}))},94497:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>i});var r=o(1573),n=o(51152);const i=(0,r.zj)((({app:e})=>{e.use(n.Ay)}))},12573:(e,t,o)=>{"use strict";o.d(t,{A:()=>O,storeKey:()=>D});var r=o(1573),n=o(36980),i=o(71271);const s="typesense-logindata",a="typesense-loginhistory";function l(){return{loginData:i.A.getItem(s),loginHistory:i.A.getItem(a)||[],forceHomeRedirect:!1,isConnected:!1,previousRoute:null,error:null,currentCollection:null,documentsToEdit:[],data:{debug:{},metrics:{},stats:{},collections:[],aliases:[],apiKeys:[],analyticsRules:[],searchPresets:[],stopwords:[],overrides:[],synonyms:[],features:{stopwords:!1,analyticsRules:!1,searchPresets:!1,stats:!1}}}}const c=l;var d=o(20989),u=o(7958),p=o.n(u),m=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const v={connectionCheck(e){e.state.loginData?e.getters.api.get("/metrics.json").then((t=>m(this,void 0,void 0,(function*(){e.commit("setData",{metrics:t.data}),yield Promise.all([e.dispatch("getCollections"),e.dispatch("getAliases"),e.dispatch("getApiKeys"),e.dispatch("getDebug")]),e.dispatch("getSearchPresets").then((()=>{e.commit("setFeature",{key:"searchPresets",value:!0})})).catch((()=>{e.commit("setFeature",{key:"searchPresets",value:!1})})),e.dispatch("getAnalyticsRules").then((()=>{e.commit("setFeature",{key:"analyticsRules",value:!0})})).catch((()=>{e.commit("setFeature",{key:"analyticsRules",value:!1})})),e.dispatch("getStopwords").then((()=>{e.commit("setFeature",{key:"stopwords",value:!0})})).catch((()=>{e.commit("setFeature",{key:"stopwords",value:!1})})),e.commit("setIsConnected",!0),e.commit("saveHistory"),e.commit("setError",null)})))).catch((t=>{e.commit("setIsConnected",!1),e.commit("setError",t.message)})):e.commit("setIsConnected",!1)},refreshServerStatus(e){e.getters.api.get("/metrics.json").then((t=>{e.commit("setData",{metrics:t.data})})),e.getters.api.get("/stats.json").then((t=>{e.commit("setData",{stats:t.data}),e.state.data.features.stats||e.commit("setFeature",{key:"stats",value:!0})})).catch((()=>{e.commit("setFeature",{key:"stats",value:!1})}))},getDebug(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getDebug().then((t=>{e.commit("setData",{debug:t})}))}))},getCollections(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getCollections().then((t=>{e.commit("setData",{collections:t})})).catch((t=>{console.log(t),e.dispatch("connectionCheck")}))}))},getAliases(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getAliases().then((t=>{e.commit("setData",{aliases:t.aliases})}))}))},getApiKeys(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getApiKeys().then((t=>{e.commit("setData",{apiKeys:t.keys})}))}))},getAnalyticsRules(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getAnalyticsRules().then((t=>{e.commit("setData",{analyticsRules:t.rules})}))}))},deleteAnalyticsRule(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteAnalyticsRule(t),e.dispatch("getAnalyticsRules")}))},createAnalyticsRule(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertAnalyticsRule(t.name,t),e.dispatch("getAnalyticsRules")}catch(t){e.commit("setError",t.message)}}))},getSearchPresets(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getSearchPresets().then((t=>{e.commit("setData",{searchPresets:t.presets})}))}))},deleteSearchPreset(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteSearchPreset(t),e.dispatch("getSearchPresets")}))},upsertSearchPreset(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertSearchPreset(t.name,t),e.dispatch("getSearchPresets")}catch(t){e.commit("setError",t.message)}}))},getStopwords(e){return m(this,void 0,void 0,(function*(){yield e.getters.api.getStopwords().then((t=>{e.commit("setData",{stopwords:t.stopwords})}))}))},upsertStopwords(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertStopwords(t.id,t),e.dispatch("getStopwords")}catch(t){e.commit("setError",t.message)}}))},deleteStopwords(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteStopwords(t),e.dispatch("getStopwords")}))},getSynonyms(e,t){e.getters.api.getSynonyms(t).then((t=>{e.commit("setData",{synonyms:t.synonyms})}))},getOverrides(e,t){e.getters.api.getOverrides(t).then((t=>{e.commit("setData",{overrides:t.overrides})}))},login(e,t){const{apiKey:o,node:r,forceHomeRedirect:n=!1}=t;e.commit("setForceRedirect",n),e.commit("setNodeData",{apiKey:o,node:r}),e.dispatch("connectionCheck")},logout(e){i.A.remove(s),e.commit("setCurrentCollection",null),e.commit("setIsConnected",!1)},loadCurrentCollection(e,t){var o;if(e.commit("setCurrentCollection",t),e.dispatch("getSynonyms",t.name),e.dispatch("getOverrides",t.name),null===(o=this.$router.currentRoute.value.params)||void 0===o?void 0:o.name){const e=Object.assign(Object.assign({},this.$router.currentRoute.value.params),{name:t.name});this.$router.push({name:this.$router.currentRoute.value.name,params:e})}},loadCurrentCollectionByName(e,t){return e.dispatch("loadCurrentCollection",e.state.data.collections.find((e=>e.name===t)))},dropCollection(e,t){return m(this,void 0,void 0,(function*(){e.commit("setCurrentCollection",null),yield e.getters.api.dropCollection(t),e.dispatch("getCollections")}))},createCollection(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const o=yield e.getters.api.createCollection(JSON.parse(JSON.stringify(t)));e.commit("setData",{collections:e.state.data.collections.concat([o])}),e.commit("setCurrentCollection",o),this.$router.push(`/collection/${o.name}/schema`)}catch(t){e.commit("setError",t.message)}}))},updateCollection(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.updateCollection(t.collectionName,t.schema);const o=yield e.getters.api.getCollection(t.collectionName);e.commit("setData",{collections:e.state.data.collections.map((e=>e.name===t.collectionName?o:e))}),e.commit("setCurrentCollection",o)}catch(t){e.commit("setError",t.message)}}))},cloneCollectionSchema(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.post(`/collections?src_name=${t.collectionName}`,{name:t.destinationName});const o=yield e.getters.api.getCollection(t.destinationName);e.commit("setData",{collections:e.state.data.collections.concat([o])}),e.commit("setCurrentCollection",o),this.$router.push(`/collection/${t.destinationName}/schema`)}catch(t){e.commit("setError",t.message)}}))},deleteAlias(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteAlias(t),e.dispatch("getAliases")}))},createAlias(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertAlias(t),e.dispatch("getAliases")}catch(t){e.commit("setError",t.message)}}))},createApiKey(e,t){return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const o=yield e.getters.api.createApiKey(t);return e.dispatch("getApiKeys"),o}catch(t){throw e.commit("setError",t.message),t}}))},deleteApiKey(e,t){return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteApiKey(t),e.dispatch("getApiKeys")}))},createSynonym(e,t){var o,r;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertSynonym(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t.id,t.synonym),e.dispatch("getSynonyms",null===(r=e.state.currentCollection)||void 0===r?void 0:r.name)}catch(t){e.commit("setError",t.message)}}))},deleteSynonym(e,t){var o,r;return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteSynonym(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t),e.dispatch("getSynonyms",null===(r=e.state.currentCollection)||void 0===r?void 0:r.name)}))},createOverride(e,t){var o,r;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null),yield e.getters.api.upsertOverride(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t.id,t.override),e.dispatch("getOverrides",null===(r=e.state.currentCollection)||void 0===r?void 0:r.name)}catch(t){e.commit("setError",t.message)}}))},deleteOverride(e,t){var o,r;return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteOverride(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t),e.dispatch("getOverrides",null===(r=e.state.currentCollection)||void 0===r?void 0:r.name)}))},deleteDocumentById(e,t){var o;return m(this,void 0,void 0,(function*(){yield e.getters.api.deleteDocumentById(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t)}))},search(e,t){var o;return e.getters.api.search((null===(o=e.state.currentCollection)||void 0===o?void 0:o.name)||"",JSON.parse(JSON.stringify(t)))},importDocuments(e,t){var o;return e.getters.api.importDocuments(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name,t.documents,t.action)},exportDocuments(e,t){return m(this,void 0,void 0,(function*(){return e.getters.api.exportDocuments(t).then((e=>{const o=new Blob([e],{type:"text/plain;charset=utf-8"});p().saveAs(o,`${t}.ljson`)}))}))},editDocuments(e,t){var o;e.commit("setDocumentsToEdit",t),this.$router.push(`/collection/${(null===(o=e.state.currentCollection)||void 0===o?void 0:o.name)||""}/document`)},exportToJson(e,t){const o=new Blob([JSON.stringify(t,null,2)],{type:"application/json;charset=utf-8"});p().saveAs(o,"export.json")},operationCompactDB(e){var t;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const o=yield e.getters.api.post("/operations/db/compact");(null===(t=o.data)||void 0===t?void 0:t.success)&&d.A.create({position:"top",progress:!0,group:!1,timeout:1e3,color:"positive",message:"Compact DB: Server responded with success"})}catch(t){e.commit("setError",t.message)}}))},clearCache(e){var t;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const o=yield e.getters.api.post("/operations/cache/clear");(null===(t=o.data)||void 0===t?void 0:t.success)&&d.A.create({position:"top",progress:!0,group:!1,timeout:1e3,color:"positive",message:"Clear Cache: Server responded with success"})}catch(t){e.commit("setError",t.message)}}))},slowQueryThreshold(e,t){var o;return m(this,void 0,void 0,(function*(){try{e.commit("setError",null);const r=yield e.getters.api.post("/config",{"log-slow-requests-time-ms":t});(null===(o=r.data)||void 0===o?void 0:o.success)&&d.A.create({position:"top",progress:!0,group:!1,timeout:1e3,color:"positive",message:`Set Slow Request Threshold to: ${t}`})}catch(t){e.commit("setError",t.message)}}))}},h=v;var y=o(82303),g=o(99180),f=function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class C{init({node:e,apiKey:t}){this.axiosClient=y.A.create({baseURL:`${e.protocol}://${e.host}:${e.port}${e.path||""}`,headers:{"x-typesense-api-key":t}}),this.typesenseClient=new g.Client({nodes:[Object.assign({},e)],apiKey:t})}getDebug(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.debug.retrieve()}getCollections(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.collections().retrieve()}createCollection(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections().create(e)}getCollection(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).retrieve()}dropCollection(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).delete()}updateCollection(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).update(t)}getAliases(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.aliases().retrieve()}upsertAlias(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.aliases().upsert(e.name,{collection_name:e.collection_name})}deleteAlias(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.aliases(e).delete()}getApiKeys(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.keys().retrieve()}createApiKey(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.keys().create(e)}deleteApiKey(e){return f(this,void 0,void 0,(function*(){this.typesenseClient&&(yield this.typesenseClient.keys(parseInt(e,10)).delete())}))}getAnalyticsRules(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.analytics.rules().retrieve()}upsertAnalyticsRule(e,t){var o;return(null===(o=this.typesenseClient)||void 0===o?void 0:o.analytics.rules()).upsert(e,t)}deleteAnalyticsRule(e){var t;return(null===(t=this.typesenseClient)||void 0===t?void 0:t.analytics.rules(e)).delete()}getSearchPresets(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.presets().retrieve()}upsertSearchPreset(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.presets().upsert(e,t)}deleteSearchPreset(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.presets(e).delete()}getStopwords(){var e;return null===(e=this.typesenseClient)||void 0===e?void 0:e.stopwords().retrieve()}upsertStopwords(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.stopwords().upsert(e,t)}deleteStopwords(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.stopwords(e).delete()}getSynonyms(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).synonyms().retrieve()}upsertSynonym(e,t,o){var r;return null===(r=this.typesenseClient)||void 0===r?void 0:r.collections(e).synonyms().upsert(t,o)}deleteSynonym(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).synonyms(t).delete()}getOverrides(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).overrides().retrieve()}upsertOverride(e,t,o){var r;return null===(r=this.typesenseClient)||void 0===r?void 0:r.collections(e).overrides().upsert(t,o)}deleteOverride(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).overrides(t).delete()}deleteDocumentById(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).documents(t).delete()}importDocuments(e,t,o){var r;if(this.typesenseClient)return(null===(r=this.typesenseClient.collections(e))||void 0===r?void 0:r.documents()).import(t,{action:o}).catch((e=>e.importResults))}exportDocuments(e){var t;return null===(t=this.typesenseClient)||void 0===t?void 0:t.collections(e).documents().export()}search(e,t){var o;return null===(o=this.typesenseClient)||void 0===o?void 0:o.collections(e).documents().search(t)}get(e){var t;return null===(t=this.axiosClient)||void 0===t?void 0:t.get(e).then((e=>({data:e.data}))).catch((e=>{var t,o;throw Error((null===(o=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===o?void 0:o.message)||e.message)}))}post(e,t){var o;return null===(o=this.axiosClient)||void 0===o?void 0:o.post(e,t).then((e=>({data:e.data}))).catch((e=>{var t,o;throw Error((null===(o=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===o?void 0:o.message)||e.message)}))}}const b={api(e){if(e.loginData){const t=window.electron;let o=new C;return t&&(o=t,t.rejectTLS(Number(e.loginData.node.tls))),o.init({node:Object.assign({},e.loginData.node),apiKey:e.loginData.apiKey}),o}}},A=b,w={setNodeData(e,t){e.loginData=t,i.A.set(s,t)},setIsConnected(e,t){var o,r,n,i,s;const a=null===(o=this.$router)||void 0===o?void 0:o.currentRoute.value;t&&!e.isConnected&&(e.previousRoute?(null===(r=this.$router)||void 0===r||r.push(e.previousRoute),e.previousRoute=null):null===(n=this.$router)||void 0===n||n.push("/")),t||"Login"===(null===a||void 0===a?void 0:a.name)||null===(i=this.$router)||void 0===i||i.push("/login"),t&&e.forceHomeRedirect&&(null===(s=this.$router)||void 0===s||s.push("/"),d.A.create({position:"top",progress:!0,group:!1,timeout:1e3,color:"positive",message:"Server changed"}),e.forceHomeRedirect=!1,e.currentCollection=null),e.isConnected=t},saveHistory(e){const t=JSON.stringify(e.loginData),o=e.loginHistory.indexOf(t);0!==o&&(o>0&&e.loginHistory.splice(o,1),e.loginHistory.unshift(t),i.A.set(a,e.loginHistory))},clearHistory(e){e.loginHistory=[],i.A.set(a,[])},setForceRedirect(e,t){e.forceHomeRedirect=t},setPreviousRoute(e,t){e.previousRoute=t},setData(e,t){for(const o in t)e.data[o]=t[o]},setFeature(e,t){e.data.features[t.key]=t.value},setError(e,t){e.error=t},setCurrentCollection(e,t){var o;e.currentCollection=t,t||null===(o=this.$router)||void 0===o||o.push("/collections")},setDocumentsToEdit(e,t){e.documentsToEdit=t}},S=w,P={namespaced:!0,actions:h,getters:A,mutations:S,state:c},E=P,D=Symbol("vuex-key"),O=(0,r.M_)((function(){const e=(0,n.y$)({modules:{node:E},strict:!1});return e}))},73529:()=>{}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,o),i.exports}o.m=e,(()=>{o.amdO={}})(),(()=>{var e=[];o.O=(t,r,n,i)=>{if(!r){var s=1/0;for(d=0;d=i)&&Object.keys(o.O).every((e=>o.O[e](r[l])))?r.splice(l--,1):(a=!1,i0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[r,n,i]}})(),(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[]))})(),(()=>{o.u=e=>"js/"+(996===e?"chunk-common":e)+"."+{40:"3afac33f",110:"dfba5247",218:"30755518",233:"1237cbcf",277:"4b6a12f1",301:"a5481cc4",306:"8497df5f",318:"ec047357",335:"1ed10d68",473:"bf36ce10",536:"4d551985",614:"681ae293",642:"c8fc2245",704:"2455e1e8",729:"1a0fac19",932:"b901cad7",996:"ce810a15"}[e]+".js"})(),(()=>{o.miniCssF=e=>"css/"+e+"."+{110:"954a317a",218:"a4256f29",233:"1a5aed88",301:"954a317a",642:"954a317a",704:"954a317a",729:"954a317a",932:"954a317a"}[e]+".css"})(),(()=>{o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e={},t="typesense-dashboard:";o.l=(r,n,i,s)=>{if(e[r])e[r].push(n);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d{a.onerror=a.onload=null,clearTimeout(m);var n=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((e=>e(o))),t)return t(o)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),(()=>{o.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{o.p="/typesense-dashboard/"})(),(()=>{if("undefined"!==typeof document){var e=(e,t,r,n,i)=>{var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",o.nc&&(s.nonce=o.nc);var a=o=>{if(s.onerror=s.onload=null,"load"===o.type)n();else{var r=o&&o.type,a=o&&o.target&&o.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+r+": "+a+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=r,l.request=a,s.parentNode&&s.parentNode.removeChild(s),i(l)}};return s.onerror=s.onload=a,s.href=t,r?r.parentNode.insertBefore(s,r.nextSibling):document.head.appendChild(s),s},t=(e,t)=>{for(var o=document.getElementsByTagName("link"),r=0;rnew Promise(((n,i)=>{var s=o.miniCssF(r),a=o.p+s;if(t(s,a))return n();e(r,a,null,n,i)})),n={524:0};o.f.miniCss=(e,t)=>{var o={110:1,218:1,233:1,301:1,642:1,704:1,729:1,932:1};n[e]?t.push(n[e]):0!==n[e]&&o[e]&&t.push(n[e]=r(e).then((()=>{n[e]=0}),(t=>{throw delete n[e],t})))}}})(),(()=>{var e={524:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((o,r)=>n=e[t]=[o,r]));r.push(n[2]=i);var s=o.p+o.u(t),a=new Error,l=r=>{if(o.o(e,t)&&(n=e[t],0!==n&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+s+")",a.name="ChunkLoadError",a.type=i,a.request=s,n[1](a)}};o.l(s,l,"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,r)=>{var n,i,[s,a,l]=r,c=0;if(s.some((t=>0!==e[t]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(l)var d=l(o)}for(t&&t(r);co(60340)));r=o.O(r)})(); \ No newline at end of file diff --git a/js/chunk-common.8f2ae4c2.js b/js/chunk-common.ce810a15.js similarity index 99% rename from js/chunk-common.8f2ae4c2.js rename to js/chunk-common.ce810a15.js index 55ef100..effd2ff 100644 --- a/js/chunk-common.8f2ae4c2.js +++ b/js/chunk-common.ce810a15.js @@ -1 +1 @@ -(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[996],{74701:(e,o,s)=>{"use strict";s.d(o,{A:()=>p});var t=s(61758);const i={ref:"editorWrapper",class:"col relative-position overflow-hidden editorWrapper"},r={ref:"editorElement",class:"absolute-top-left"};function l(e,o,s,l,n,a){const d=(0,t.g2)("q-resize-observer");return(0,t.uX)(),(0,t.CE)("div",i,[(0,t.bF)(d,{onResize:e.onResize},null,8,["onResize"]),(0,t.Lk)("div",r,null,512)],512)}var n=s(87380),a=s(38734);const d=(0,t.pM)({name:"MonacoEditor",props:{modelValue:{type:String,default:""},options:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(e,{emit:o}){const s=(0,a.KR)(null),i=(0,a.KR)(null);let r;return(0,t.sV)((()=>{r=n.EN.create(s.value,Object.assign({value:e.modelValue,language:"json",theme:"vs-dark",minimap:{enabled:!1}},e.options)),r.onDidChangeModelContent((()=>{o("update:modelValue",null===r||void 0===r?void 0:r.getValue())}))})),(0,t.hi)((()=>{null===r||void 0===r||r.dispose()})),(0,t.wB)((()=>e.modelValue),(()=>{var o;e.modelValue!==(null===r||void 0===r?void 0:r.getValue())&&(null===(o=null===r||void 0===r?void 0:r.getModel())||void 0===o||o.setValue(e.modelValue),null===r||void 0===r||r.setScrollPosition({scrollTop:0}))})),{editorElement:s,editorWrapper:i,onResize(){null===r||void 0===r||r.layout({height:0,width:0}),window.setTimeout((()=>{null===r||void 0===r||r.layout({height:i.value.offsetHeight,width:i.value.offsetWidth})}))}}}});var m=s(12807),c=s(1096),u=s(98582),v=s.n(u);const g=(0,m.A)(d,[["render",l],["__scopeId","data-v-46f34a38"]]),p=g;v()(d,"components",{QResizeObserver:c.A})},47559:(e,o,s)=>{"use strict";s.d(o,{A:()=>k});var t=s(61758),i=s(58790);function r(e,o,s,r,l,n){const a=(0,t.g2)("q-item-section"),d=(0,t.g2)("q-icon"),m=(0,t.g2)("q-item"),c=(0,t.g2)("q-separator"),u=(0,t.g2)("q-item-label"),v=(0,t.g2)("q-list"),g=(0,t.gN)("close-popup");return(0,t.uX)(),(0,t.Wv)(v,{style:{"min-width":"100px"}},{default:(0,t.k6)((()=>[e.$props.showLogout?(0,t.bo)(((0,t.uX)(),(0,t.Wv)(m,{key:0,clickable:"",onClick:e.logout},{default:(0,t.k6)((()=>[(0,t.bF)(a,null,{default:(0,t.k6)((()=>o[1]||(o[1]=[(0,t.eW)("Logout")]))),_:1}),(0,t.bF)(a,{avatar:""},{default:(0,t.k6)((()=>[(0,t.bF)(d,{name:"sym_s_logout"})])),_:1})])),_:1},8,["onClick"])),[[g]]):(0,t.Q3)("",!0),e.$props.showLogout?((0,t.uX)(),(0,t.Wv)(c,{key:1})):(0,t.Q3)("",!0),(0,t.bo)(((0,t.uX)(),(0,t.Wv)(m,{clickable:"",onClick:o[0]||(o[0]=o=>e.$store.commit("node/clearHistory"))},{default:(0,t.k6)((()=>[(0,t.bF)(a,null,{default:(0,t.k6)((()=>o[2]||(o[2]=[(0,t.eW)("Clear history")]))),_:1}),(0,t.bF)(a,{avatar:""},{default:(0,t.k6)((()=>[(0,t.bF)(d,{name:"sym_s_delete"})])),_:1})])),_:1})),[[g]]),(0,t.bF)(c),0===e.loginHistory.length?((0,t.uX)(),(0,t.Wv)(u,{key:2,header:""},{default:(0,t.k6)((()=>o[3]||(o[3]=[(0,t.eW)("No History")]))),_:1})):(0,t.Q3)("",!0),e.loginHistory.length>0?((0,t.uX)(),(0,t.Wv)(u,{key:3,header:""},{default:(0,t.k6)((()=>o[4]||(o[4]=[(0,t.eW)("Server History")]))),_:1})):(0,t.Q3)("",!0),((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(e.loginHistory,((o,s)=>(0,t.bo)(((0,t.uX)(),(0,t.Wv)(m,{clickable:"",key:s,onClick:s=>e.loginWithHistory(o)},{default:(0,t.k6)((()=>[(0,t.bF)(a,null,{default:(0,t.k6)((()=>[(0,t.eW)((0,i.v_)(o.node.protocol)+"://"+(0,i.v_)(o.node.host)+":"+(0,i.v_)(o.node.port),1)])),_:2},1024)])),_:2},1032,["onClick"])),[[g]]))),128))])),_:1})}const l=(0,t.pM)({name:"ServerHistory",props:{showLogout:{default:!1}},computed:{loginHistory(){return this.$store.state.node.loginHistory.map((e=>JSON.parse(e)))},error(){return this.$store.state.node.error}},methods:{logout(){this.$store.dispatch("node/logout")},loginWithHistory(e){const o=this.$props.showLogout;this.$store.dispatch("node/login",Object.assign(Object.assign({},e),{forceHomeRedirect:o}))}}});var n=s(12807),a=s(53999),d=s(90124),m=s(25173),c=s(50492),u=s(10386),v=s(13796),g=s(88672),p=s(98582),b=s.n(p);const f=(0,n.A)(l,[["render",r]]),k=f;b()(l,"components",{QList:a.A,QItem:d.A,QItemSection:m.A,QIcon:c.A,QSeparator:u.A,QItemLabel:v.A}),b()(l,"directives",{ClosePopup:g.A})},93930:(e,o,s)=>{"use strict";s.d(o,{A:()=>x});var t=s(61758),i=s(58790);const r={class:"row q-gutter-md"};function l(e,o,s,l,n,a){const d=(0,t.g2)("q-tab"),m=(0,t.g2)("q-tabs"),c=(0,t.g2)("q-separator"),u=(0,t.g2)("q-input"),v=(0,t.g2)("q-select"),g=(0,t.g2)("q-card-section"),p=(0,t.g2)("q-checkbox"),b=(0,t.g2)("q-btn"),f=(0,t.g2)("q-card-actions"),k=(0,t.g2)("q-card"),h=(0,t.g2)("q-tab-panel"),y=(0,t.g2)("monaco-editor"),S=(0,t.g2)("q-banner"),j=(0,t.g2)("q-tab-panels");return(0,t.uX)(),(0,t.Wv)(k,null,{default:(0,t.k6)((()=>[(0,t.bF)(m,{modelValue:e.tab,"onUpdate:modelValue":o[0]||(o[0]=o=>e.tab=o),dense:"",class:"text-grey","active-color":"primary","indicator-color":"primary",align:"justify","narrow-indicator":""},{default:(0,t.k6)((()=>[(0,t.bF)(d,{name:"form",label:"Form Mode"}),(0,t.bF)(d,{name:"json",label:"JSON Mode"})])),_:1},8,["modelValue"]),(0,t.bF)(c),(0,t.bF)(j,{modelValue:e.tab,"onUpdate:modelValue":o[4]||(o[4]=o=>e.tab=o),animated:"",style:(0,i.Tr)(e.createMode?"height: 60vh":""),class:"bg-surface"},{default:(0,t.k6)((()=>[(0,t.bF)(h,{name:"form"},{default:(0,t.k6)((()=>[(0,t.bF)(g,null,{default:(0,t.k6)((()=>[(0,t.Lk)("div",r,[(0,t.bF)(u,{class:"col",filled:"",dense:"",modelValue:e.schema.name,"onUpdate:modelValue":o[1]||(o[1]=o=>e.schema.name=o),label:"Collection Name",placeholder:"books",disable:!e.createMode,rules:[e=>!!e||"Field is required"]},null,8,["modelValue","disable","rules"]),(0,t.bF)(v,{filled:"",class:"col",dense:"",modelValue:e.schema.default_sorting_field,"onUpdate:modelValue":o[2]||(o[2]=o=>e.schema.default_sorting_field=o),options:e.availableSortFields,label:"Default sort field optional, but must be int32 or float"},null,8,["modelValue","options"])]),o[8]||(o[8]=(0,t.Lk)("div",{class:"text-subtitle1 q-pt-md"},"Fields",-1)),((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(e.schema.fields,((s,i)=>((0,t.uX)(),(0,t.Wv)(k,{flat:"",bordered:"",key:i,class:"q-mb-md"},{default:(0,t.k6)((()=>[(0,t.bF)(g,{class:"row q-col-gutter-md"},{default:(0,t.k6)((()=>[(0,t.bF)(u,{class:"col-12 col-sm-6",dense:"",outlined:"",modelValue:s.name,"onUpdate:modelValue":e=>s.name=e,label:"Field Name",placeholder:"title",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","onUpdate:modelValue","rules"]),(0,t.bF)(v,{class:"col-12 col-sm-4",dense:"",outlined:"",modelValue:s.type,"onUpdate:modelValue":e=>s.type=e,label:"type",options:e.types,rules:[e=>!!e||"Field is required"]},null,8,["modelValue","onUpdate:modelValue","options","rules"]),"float[]"===s.type?((0,t.uX)(),(0,t.Wv)(u,{key:0,class:"col-12 col-sm-2",dense:"",outlined:"",type:"number",modelValue:s.num_dim,"onUpdate:modelValue":e=>s.num_dim=e,modelModifiers:{number:!0},label:"num_dim",placeholder:""},null,8,["modelValue","onUpdate:modelValue"])):(0,t.Q3)("",!0),s.type.startsWith("string")?((0,t.uX)(),(0,t.Wv)(u,{key:1,class:"col-12 col-sm-2",dense:"",outlined:"",modelValue:s.locale,"onUpdate:modelValue":e=>s.locale=e,label:"locale",placeholder:""},null,8,["modelValue","onUpdate:modelValue"])):(0,t.Q3)("",!0)])),_:2},1024),(0,t.bF)(c),(0,t.bF)(f,{align:"between"},{default:(0,t.k6)((()=>[(0,t.Lk)("div",null,[(0,t.bF)(p,{modelValue:s.optional,"onUpdate:modelValue":e=>s.optional=e,label:"optional"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.facet,"onUpdate:modelValue":e=>s.facet=e,label:"facet"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.index,"onUpdate:modelValue":e=>s.index=e,label:"index"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.sort,"onUpdate:modelValue":e=>s.sort=e,label:"sort"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.infix,"onUpdate:modelValue":e=>s.infix=e,label:"infix"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.stem,"onUpdate:modelValue":e=>s.stem=e,label:"stem"},null,8,["modelValue","onUpdate:modelValue"])]),(0,t.bF)(b,{size:"md",padding:"sm lg",unelevated:"",onClick:o=>e.removeField(s)},{default:(0,t.k6)((()=>o[7]||(o[7]=[(0,t.eW)("Remove Field")]))),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1}),(0,t.bF)(h,{name:"json",class:"q-pa-none"},{default:(0,t.k6)((()=>[(0,t.bF)(y,{modelValue:e.schemaJson,"onUpdate:modelValue":o[3]||(o[3]=o=>e.schemaJson=o),style:{height:"60vh"}},null,8,["modelValue"]),e.jsonError?((0,t.uX)(),(0,t.Wv)(S,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,t.k6)((()=>[(0,t.eW)(" Invalid Format: "+(0,i.v_)(e.jsonError),1)])),_:1})):(0,t.Q3)("",!0)])),_:1})])),_:1},8,["modelValue","style"]),(0,t.bF)(c),(0,t.bF)(f,{align:"between",class:"bg-primary"},{default:(0,t.k6)((()=>[(0,t.bF)(b,{size:"md",padding:"sm lg",unelevated:"",color:"primary",onClick:o[5]||(o[5]=o=>e.addField())},{default:(0,t.k6)((()=>o[9]||(o[9]=[(0,t.eW)("Add field")]))),_:1}),(0,t.bF)(b,{size:"md",padding:"sm lg",unelevated:"",color:"primary",onClick:o[6]||(o[6]=o=>e.$emit("submit",e.schema))},{default:(0,t.k6)((()=>[(0,t.eW)((0,i.v_)(e.primaryActionLabel),1)])),_:1})])),_:1})])),_:1})}var n=s(74701);const a=(0,t.pM)({components:{MonacoEditor:n.A},name:"CollectionUi",emits:["submit"],props:{initialSchema:{type:Object,default:()=>({name:"",fields:[{name:"",type:"string",facet:!1,optional:!1,index:!0,sort:!1,infix:!1,stem:!1,locale:"",num_dim:void 0}],default_sorting_field:"",token_separators:[],symbols_to_index:[],enable_nested_fields:!1})},primaryActionLabel:{type:String,required:!0},createMode:{type:Boolean,default:!1}},data(){return{tab:"form",schema:{name:"",fields:[],default_sorting_field:"",token_separators:[],symbols_to_index:[],enable_nested_fields:!1},types:["string","string[]","int32","int32[]","int64","int64[]","float","float[]","bool","bool[]","geopoint","geopoint[]","object","object[]","string*","auto"],jsonError:null}},computed:{availableSortFields(){const e=(this.schema.fields||[]).filter((e=>["int32","float"].includes(e.type)||"string"===e.type&&e.sort));return[""].concat(e.map((e=>e.name)))},schemaJson:{get(){return JSON.stringify(this.schema,null,2)},set(e){try{this.schema=JSON.parse(e),this.jsonError=null}catch(o){this.jsonError=o.message}}}},watch:{initialSchema:{immediate:!0,handler(e){this.schema=JSON.parse(JSON.stringify(e))}}},methods:{addField(){this.schema.fields&&this.schema.fields.push({name:"",type:"string",facet:!1,optional:!1,index:!0,sort:!1,infix:!1,stem:!1,locale:"",num_dim:void 0})},removeField(e){if(this.schema.fields){const o=this.schema.fields.indexOf(e);o>-1&&this.schema.fields.splice(o,1)}}}});var d=s(12807),m=s(23316),c=s(42980),u=s(10327),v=s(10386),g=s(39041),p=s(71746),b=s(44189),f=s(39270),k=s(75848),h=s(62669),y=s(80460),S=s(1693),j=s(46868),V=s(98582),F=s.n(V);const _=(0,d.A)(a,[["render",l]]),x=_;F()(a,"components",{QCard:m.A,QTabs:c.A,QTab:u.A,QSeparator:v.A,QTabPanels:g.A,QTabPanel:p.A,QCardSection:b.A,QInput:f.A,QSelect:k.A,QCardActions:h.A,QCheckbox:y.A,QBtn:S.A,QBanner:j.A})},5890:(e,o,s)=>{var t={"./simpleWorker":1352,"./simpleWorker.js":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker.js":1352};function i(e){return Promise.resolve().then((()=>{if(!s.o(t,e)){var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}var i=t[e];return s(i)}))}i.keys=()=>Object.keys(t),i.id=5890,e.exports=i},9204:(e,o,s)=>{var t={"./editorBaseApi":[79184],"./editorBaseApi.js":[79184],"./editorSimpleWorker":[92341],"./editorSimpleWorker.js":[92341],"./editorWorker":[4117],"./editorWorker.js":[4117],"./editorWorkerHost":[32899],"./editorWorkerHost.js":[32899],"./findSectionHeaders":[76198],"./findSectionHeaders.js":[76198],"./getIconClasses":[55885],"./getIconClasses.js":[55885],"./languageFeatureDebounce":[85983],"./languageFeatureDebounce.js":[85983],"./languageFeatures":[12847],"./languageFeatures.js":[12847],"./languageFeaturesService":[43207],"./languageFeaturesService.js":[43207],"./languageService":[64189],"./languageService.js":[64189],"./languagesAssociations":[85911],"./languagesAssociations.js":[85911],"./languagesRegistry":[77024],"./languagesRegistry.js":[77024],"./markerDecorations":[63637],"./markerDecorations.js":[63637],"./markerDecorationsService":[23938],"./markerDecorationsService.js":[23938],"./model":[69361],"./model.js":[69361],"./modelService":[96174],"./modelService.js":[96174],"./resolverService":[64037],"./resolverService.js":[64037],"./semanticTokensDto":[33699],"./semanticTokensDto.js":[33699],"./semanticTokensProviderStyling":[4686],"./semanticTokensProviderStyling.js":[4686],"./semanticTokensStyling":[67284],"./semanticTokensStyling.js":[67284],"./semanticTokensStylingService":[12205],"./semanticTokensStylingService.js":[12205],"./textModelSync/textModelSync.impl":[11955],"./textModelSync/textModelSync.impl.js":[11955],"./textModelSync/textModelSync.protocol":[74977,121],"./textModelSync/textModelSync.protocol.js":[74977,121],"./textResourceConfiguration":[56151],"./textResourceConfiguration.js":[56151],"./treeSitterParserService":[15863],"./treeSitterParserService.js":[15863],"./treeViewsDnd":[61210],"./treeViewsDnd.js":[61210],"./treeViewsDndService":[95231],"./treeViewsDndService.js":[95231],"./unicodeTextModelHighlighter":[97412],"./unicodeTextModelHighlighter.js":[97412],"monaco-editor/esm/vs/editor/common/services/editorBaseApi":[79184],"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":[79184],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":[92341],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":[92341],"monaco-editor/esm/vs/editor/common/services/editorWorker":[4117],"monaco-editor/esm/vs/editor/common/services/editorWorker.js":[4117],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":[32899],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":[32899],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":[76198],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":[76198],"monaco-editor/esm/vs/editor/common/services/getIconClasses":[55885],"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":[55885],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":[85983],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":[85983],"monaco-editor/esm/vs/editor/common/services/languageFeatures":[12847],"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":[12847],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":[43207],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":[43207],"monaco-editor/esm/vs/editor/common/services/languageService":[64189],"monaco-editor/esm/vs/editor/common/services/languageService.js":[64189],"monaco-editor/esm/vs/editor/common/services/languagesAssociations":[85911],"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":[85911],"monaco-editor/esm/vs/editor/common/services/languagesRegistry":[77024],"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":[77024],"monaco-editor/esm/vs/editor/common/services/markerDecorations":[63637],"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":[63637],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":[23938],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":[23938],"monaco-editor/esm/vs/editor/common/services/model":[69361],"monaco-editor/esm/vs/editor/common/services/model.js":[69361],"monaco-editor/esm/vs/editor/common/services/modelService":[96174],"monaco-editor/esm/vs/editor/common/services/modelService.js":[96174],"monaco-editor/esm/vs/editor/common/services/resolverService":[64037],"monaco-editor/esm/vs/editor/common/services/resolverService.js":[64037],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":[33699],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":[33699],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":[4686],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":[4686],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":[67284],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":[67284],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":[12205],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":[12205],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":[11955],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":[11955],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":[74977,121],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":[74977,121],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":[56151],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":[56151],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":[15863],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":[15863],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":[61210],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":[61210],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":[95231],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":[95231],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":[97412],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":[97412]};function i(e){if(!s.o(t,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=t[e],i=o[0];return Promise.all(o.slice(1).map(s.e)).then((()=>s(i)))}i.keys=()=>Object.keys(t),i.id=9204,e.exports=i}}]); \ No newline at end of file +(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[996],{74701:(e,o,s)=>{"use strict";s.d(o,{A:()=>p});var t=s(61758);const i={ref:"editorWrapper",class:"col relative-position overflow-hidden editorWrapper"},r={ref:"editorElement",class:"absolute-top-left"};function l(e,o,s,l,n,a){const d=(0,t.g2)("q-resize-observer");return(0,t.uX)(),(0,t.CE)("div",i,[(0,t.bF)(d,{onResize:e.onResize},null,8,["onResize"]),(0,t.Lk)("div",r,null,512)],512)}var n=s(87380),a=s(38734);const d=(0,t.pM)({name:"MonacoEditor",props:{modelValue:{type:String,default:""},options:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(e,{emit:o}){const s=(0,a.KR)(null),i=(0,a.KR)(null);let r;return(0,t.sV)((()=>{r=n.EN.create(s.value,Object.assign({value:e.modelValue,language:"json",theme:"vs-dark",minimap:{enabled:!1}},e.options)),r.onDidChangeModelContent((()=>{o("update:modelValue",null===r||void 0===r?void 0:r.getValue())}))})),(0,t.hi)((()=>{null===r||void 0===r||r.dispose()})),(0,t.wB)((()=>e.modelValue),(()=>{var o;e.modelValue!==(null===r||void 0===r?void 0:r.getValue())&&(null===(o=null===r||void 0===r?void 0:r.getModel())||void 0===o||o.setValue(e.modelValue),null===r||void 0===r||r.setScrollPosition({scrollTop:0}))})),{editorElement:s,editorWrapper:i,onResize(){null===r||void 0===r||r.layout({height:0,width:0}),window.setTimeout((()=>{null===r||void 0===r||r.layout({height:i.value.offsetHeight,width:i.value.offsetWidth})}))}}}});var m=s(12807),c=s(1096),u=s(98582),v=s.n(u);const g=(0,m.A)(d,[["render",l],["__scopeId","data-v-46f34a38"]]),p=g;v()(d,"components",{QResizeObserver:c.A})},47559:(e,o,s)=>{"use strict";s.d(o,{A:()=>k});var t=s(61758),i=s(58790);function r(e,o,s,r,l,n){const a=(0,t.g2)("q-item-section"),d=(0,t.g2)("q-icon"),m=(0,t.g2)("q-item"),c=(0,t.g2)("q-separator"),u=(0,t.g2)("q-item-label"),v=(0,t.g2)("q-list"),g=(0,t.gN)("close-popup");return(0,t.uX)(),(0,t.Wv)(v,{style:{"min-width":"100px"}},{default:(0,t.k6)((()=>[e.$props.showLogout?(0,t.bo)(((0,t.uX)(),(0,t.Wv)(m,{key:0,clickable:"",onClick:e.logout},{default:(0,t.k6)((()=>[(0,t.bF)(a,null,{default:(0,t.k6)((()=>o[1]||(o[1]=[(0,t.eW)("Logout")]))),_:1}),(0,t.bF)(a,{avatar:""},{default:(0,t.k6)((()=>[(0,t.bF)(d,{name:"sym_s_logout"})])),_:1})])),_:1},8,["onClick"])),[[g]]):(0,t.Q3)("",!0),e.$props.showLogout?((0,t.uX)(),(0,t.Wv)(c,{key:1})):(0,t.Q3)("",!0),(0,t.bo)(((0,t.uX)(),(0,t.Wv)(m,{clickable:"",onClick:o[0]||(o[0]=o=>e.$store.commit("node/clearHistory"))},{default:(0,t.k6)((()=>[(0,t.bF)(a,null,{default:(0,t.k6)((()=>o[2]||(o[2]=[(0,t.eW)("Clear history")]))),_:1}),(0,t.bF)(a,{avatar:""},{default:(0,t.k6)((()=>[(0,t.bF)(d,{name:"sym_s_delete"})])),_:1})])),_:1})),[[g]]),(0,t.bF)(c),0===e.loginHistory.length?((0,t.uX)(),(0,t.Wv)(u,{key:2,header:""},{default:(0,t.k6)((()=>o[3]||(o[3]=[(0,t.eW)("No History")]))),_:1})):(0,t.Q3)("",!0),e.loginHistory.length>0?((0,t.uX)(),(0,t.Wv)(u,{key:3,header:""},{default:(0,t.k6)((()=>o[4]||(o[4]=[(0,t.eW)("Server History")]))),_:1})):(0,t.Q3)("",!0),((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(e.loginHistory,((o,s)=>(0,t.bo)(((0,t.uX)(),(0,t.Wv)(m,{clickable:"",key:s,onClick:s=>e.loginWithHistory(o)},{default:(0,t.k6)((()=>[(0,t.bF)(a,null,{default:(0,t.k6)((()=>[(0,t.eW)((0,i.v_)(o.node.protocol)+"://"+(0,i.v_)(o.node.host)+":"+(0,i.v_)(o.node.port),1)])),_:2},1024)])),_:2},1032,["onClick"])),[[g]]))),128))])),_:1})}const l=(0,t.pM)({name:"ServerHistory",props:{showLogout:{default:!1}},computed:{loginHistory(){return this.$store.state.node.loginHistory.map((e=>JSON.parse(e)))},error(){return this.$store.state.node.error}},methods:{logout(){this.$store.dispatch("node/logout")},loginWithHistory(e){const o=this.$props.showLogout;this.$store.dispatch("node/login",Object.assign(Object.assign({},e),{forceHomeRedirect:o}))}}});var n=s(12807),a=s(53999),d=s(90124),m=s(25173),c=s(50492),u=s(10386),v=s(13796),g=s(88672),p=s(98582),b=s.n(p);const f=(0,n.A)(l,[["render",r]]),k=f;b()(l,"components",{QList:a.A,QItem:d.A,QItemSection:m.A,QIcon:c.A,QSeparator:u.A,QItemLabel:v.A}),b()(l,"directives",{ClosePopup:g.A})},93930:(e,o,s)=>{"use strict";s.d(o,{A:()=>x});var t=s(61758),i=s(58790);const r={class:"row q-gutter-md"};function l(e,o,s,l,n,a){const d=(0,t.g2)("q-tab"),m=(0,t.g2)("q-tabs"),c=(0,t.g2)("q-separator"),u=(0,t.g2)("q-input"),v=(0,t.g2)("q-select"),g=(0,t.g2)("q-card-section"),p=(0,t.g2)("q-checkbox"),b=(0,t.g2)("q-btn"),f=(0,t.g2)("q-card-actions"),k=(0,t.g2)("q-card"),h=(0,t.g2)("q-tab-panel"),y=(0,t.g2)("monaco-editor"),S=(0,t.g2)("q-banner"),j=(0,t.g2)("q-tab-panels");return(0,t.uX)(),(0,t.Wv)(k,null,{default:(0,t.k6)((()=>[(0,t.bF)(m,{modelValue:e.tab,"onUpdate:modelValue":o[0]||(o[0]=o=>e.tab=o),dense:"",class:"text-grey","active-color":"primary","indicator-color":"primary",align:"justify","narrow-indicator":""},{default:(0,t.k6)((()=>[(0,t.bF)(d,{name:"form",label:"Form Mode"}),(0,t.bF)(d,{name:"json",label:"JSON Mode"})])),_:1},8,["modelValue"]),(0,t.bF)(c),(0,t.bF)(j,{modelValue:e.tab,"onUpdate:modelValue":o[4]||(o[4]=o=>e.tab=o),animated:"",style:(0,i.Tr)(e.createMode?"height: 60vh":""),class:"bg-surface"},{default:(0,t.k6)((()=>[(0,t.bF)(h,{name:"form"},{default:(0,t.k6)((()=>[(0,t.bF)(g,null,{default:(0,t.k6)((()=>[(0,t.Lk)("div",r,[(0,t.bF)(u,{class:"col",filled:"",dense:"",modelValue:e.schema.name,"onUpdate:modelValue":o[1]||(o[1]=o=>e.schema.name=o),label:"Collection Name",placeholder:"books",disable:!e.createMode,rules:[e=>!!e||"Field is required"]},null,8,["modelValue","disable","rules"]),(0,t.bF)(v,{filled:"",class:"col",dense:"",modelValue:e.schema.default_sorting_field,"onUpdate:modelValue":o[2]||(o[2]=o=>e.schema.default_sorting_field=o),options:e.availableSortFields,label:"Default sort field optional, but must be int32 or float"},null,8,["modelValue","options"])]),o[8]||(o[8]=(0,t.Lk)("div",{class:"text-subtitle1 q-pt-md"},"Fields",-1)),((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(e.schema.fields,((s,i)=>((0,t.uX)(),(0,t.Wv)(k,{flat:"",bordered:"",key:i,class:"q-mb-md"},{default:(0,t.k6)((()=>[(0,t.bF)(g,{class:"row q-col-gutter-md"},{default:(0,t.k6)((()=>[(0,t.bF)(u,{class:"col-12 col-sm-6",dense:"",outlined:"",modelValue:s.name,"onUpdate:modelValue":e=>s.name=e,label:"Field Name",placeholder:"title",rules:[e=>!!e||"Field is required"]},null,8,["modelValue","onUpdate:modelValue","rules"]),(0,t.bF)(v,{class:"col-12 col-sm-4",dense:"",outlined:"",modelValue:s.type,"onUpdate:modelValue":e=>s.type=e,label:"type",options:e.types,rules:[e=>!!e||"Field is required"]},null,8,["modelValue","onUpdate:modelValue","options","rules"]),"float[]"===s.type?((0,t.uX)(),(0,t.Wv)(u,{key:0,class:"col-12 col-sm-2",dense:"",outlined:"",type:"number",modelValue:s.num_dim,"onUpdate:modelValue":e=>s.num_dim=e,modelModifiers:{number:!0},label:"num_dim",placeholder:""},null,8,["modelValue","onUpdate:modelValue"])):(0,t.Q3)("",!0),s.type.startsWith("string")?((0,t.uX)(),(0,t.Wv)(u,{key:1,class:"col-12 col-sm-2",dense:"",outlined:"",modelValue:s.locale,"onUpdate:modelValue":e=>s.locale=e,label:"locale",placeholder:""},null,8,["modelValue","onUpdate:modelValue"])):(0,t.Q3)("",!0)])),_:2},1024),(0,t.bF)(c),(0,t.bF)(f,{align:"between"},{default:(0,t.k6)((()=>[(0,t.Lk)("div",null,[(0,t.bF)(p,{modelValue:s.optional,"onUpdate:modelValue":e=>s.optional=e,label:"optional"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.facet,"onUpdate:modelValue":e=>s.facet=e,label:"facet"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.index,"onUpdate:modelValue":e=>s.index=e,label:"index"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.sort,"onUpdate:modelValue":e=>s.sort=e,label:"sort"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.infix,"onUpdate:modelValue":e=>s.infix=e,label:"infix"},null,8,["modelValue","onUpdate:modelValue"]),(0,t.bF)(p,{modelValue:s.stem,"onUpdate:modelValue":e=>s.stem=e,label:"stem"},null,8,["modelValue","onUpdate:modelValue"])]),(0,t.bF)(b,{size:"md",padding:"sm lg",unelevated:"",onClick:o=>e.removeField(s)},{default:(0,t.k6)((()=>o[7]||(o[7]=[(0,t.eW)("Remove Field")]))),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1}),(0,t.bF)(h,{name:"json",class:"q-pa-none"},{default:(0,t.k6)((()=>[(0,t.bF)(y,{modelValue:e.schemaJson,"onUpdate:modelValue":o[3]||(o[3]=o=>e.schemaJson=o),style:{height:"60vh"}},null,8,["modelValue"]),e.jsonError?((0,t.uX)(),(0,t.Wv)(S,{key:0,"inline-actions":"",class:"text-white bg-red"},{default:(0,t.k6)((()=>[(0,t.eW)(" Invalid Format: "+(0,i.v_)(e.jsonError),1)])),_:1})):(0,t.Q3)("",!0)])),_:1})])),_:1},8,["modelValue","style"]),(0,t.bF)(c),(0,t.bF)(f,{align:"between",class:"bg-primary"},{default:(0,t.k6)((()=>[(0,t.bF)(b,{size:"md",padding:"sm lg",unelevated:"",color:"primary",onClick:o[5]||(o[5]=o=>e.addField())},{default:(0,t.k6)((()=>o[9]||(o[9]=[(0,t.eW)("Add field")]))),_:1}),(0,t.bF)(b,{size:"md",padding:"sm lg",unelevated:"",color:"primary",onClick:o[6]||(o[6]=o=>e.$emit("submit",e.schema))},{default:(0,t.k6)((()=>[(0,t.eW)((0,i.v_)(e.primaryActionLabel),1)])),_:1})])),_:1})])),_:1})}var n=s(74701);const a=(0,t.pM)({components:{MonacoEditor:n.A},name:"CollectionUi",emits:["submit"],props:{initialSchema:{type:Object,default:()=>({name:"",fields:[{name:"",type:"string",facet:!1,optional:!1,index:!0,sort:!1,infix:!1,stem:!1,locale:"",num_dim:void 0}],default_sorting_field:"",token_separators:[],symbols_to_index:[],enable_nested_fields:!1})},primaryActionLabel:{type:String,required:!0},createMode:{type:Boolean,default:!1}},data(){return{tab:"form",schema:{name:"",fields:[],default_sorting_field:"",token_separators:[],symbols_to_index:[],enable_nested_fields:!1},types:["string","string[]","int32","int32[]","int64","int64[]","float","float[]","bool","bool[]","geopoint","geopoint[]","object","object[]","string*","auto"],jsonError:null}},computed:{availableSortFields(){const e=(this.schema.fields||[]).filter((e=>["int32","float"].includes(e.type)||"string"===e.type&&e.sort));return[""].concat(e.map((e=>e.name)))},schemaJson:{get(){return JSON.stringify(this.schema,null,2)},set(e){try{this.schema=JSON.parse(e),this.jsonError=null}catch(e){this.jsonError=e.message}}}},watch:{initialSchema:{immediate:!0,handler(e){this.schema=JSON.parse(JSON.stringify(e))}}},methods:{addField(){this.schema.fields&&this.schema.fields.push({name:"",type:"string",facet:!1,optional:!1,index:!0,sort:!1,infix:!1,stem:!1,locale:"",num_dim:void 0})},removeField(e){if(this.schema.fields){const o=this.schema.fields.indexOf(e);o>-1&&this.schema.fields.splice(o,1)}}}});var d=s(12807),m=s(23316),c=s(42980),u=s(10327),v=s(10386),g=s(39041),p=s(71746),b=s(44189),f=s(39270),k=s(75848),h=s(62669),y=s(80460),S=s(1693),j=s(46868),V=s(98582),F=s.n(V);const _=(0,d.A)(a,[["render",l]]),x=_;F()(a,"components",{QCard:m.A,QTabs:c.A,QTab:u.A,QSeparator:v.A,QTabPanels:g.A,QTabPanel:p.A,QCardSection:b.A,QInput:f.A,QSelect:k.A,QCardActions:h.A,QCheckbox:y.A,QBtn:S.A,QBanner:j.A})},5890:(e,o,s)=>{var t={"./simpleWorker":1352,"./simpleWorker.js":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker.js":1352};function i(e){return Promise.resolve().then((()=>{if(!s.o(t,e)){var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}var i=t[e];return s(i)}))}i.keys=()=>Object.keys(t),i.id=5890,e.exports=i},9204:(e,o,s)=>{var t={"./editorBaseApi":[79184],"./editorBaseApi.js":[79184],"./editorSimpleWorker":[92341],"./editorSimpleWorker.js":[92341],"./editorWorker":[4117],"./editorWorker.js":[4117],"./editorWorkerHost":[32899],"./editorWorkerHost.js":[32899],"./findSectionHeaders":[76198],"./findSectionHeaders.js":[76198],"./getIconClasses":[55885],"./getIconClasses.js":[55885],"./languageFeatureDebounce":[85983],"./languageFeatureDebounce.js":[85983],"./languageFeatures":[12847],"./languageFeatures.js":[12847],"./languageFeaturesService":[43207],"./languageFeaturesService.js":[43207],"./languageService":[64189],"./languageService.js":[64189],"./languagesAssociations":[85911],"./languagesAssociations.js":[85911],"./languagesRegistry":[77024],"./languagesRegistry.js":[77024],"./markerDecorations":[63637],"./markerDecorations.js":[63637],"./markerDecorationsService":[23938],"./markerDecorationsService.js":[23938],"./model":[69361],"./model.js":[69361],"./modelService":[96174],"./modelService.js":[96174],"./resolverService":[64037],"./resolverService.js":[64037],"./semanticTokensDto":[33699],"./semanticTokensDto.js":[33699],"./semanticTokensProviderStyling":[4686],"./semanticTokensProviderStyling.js":[4686],"./semanticTokensStyling":[67284],"./semanticTokensStyling.js":[67284],"./semanticTokensStylingService":[12205],"./semanticTokensStylingService.js":[12205],"./textModelSync/textModelSync.impl":[11955],"./textModelSync/textModelSync.impl.js":[11955],"./textModelSync/textModelSync.protocol":[74977,121],"./textModelSync/textModelSync.protocol.js":[74977,121],"./textResourceConfiguration":[56151],"./textResourceConfiguration.js":[56151],"./treeSitterParserService":[15863],"./treeSitterParserService.js":[15863],"./treeViewsDnd":[61210],"./treeViewsDnd.js":[61210],"./treeViewsDndService":[95231],"./treeViewsDndService.js":[95231],"./unicodeTextModelHighlighter":[97412],"./unicodeTextModelHighlighter.js":[97412],"monaco-editor/esm/vs/editor/common/services/editorBaseApi":[79184],"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":[79184],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":[92341],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":[92341],"monaco-editor/esm/vs/editor/common/services/editorWorker":[4117],"monaco-editor/esm/vs/editor/common/services/editorWorker.js":[4117],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":[32899],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":[32899],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":[76198],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":[76198],"monaco-editor/esm/vs/editor/common/services/getIconClasses":[55885],"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":[55885],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":[85983],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":[85983],"monaco-editor/esm/vs/editor/common/services/languageFeatures":[12847],"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":[12847],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":[43207],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":[43207],"monaco-editor/esm/vs/editor/common/services/languageService":[64189],"monaco-editor/esm/vs/editor/common/services/languageService.js":[64189],"monaco-editor/esm/vs/editor/common/services/languagesAssociations":[85911],"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":[85911],"monaco-editor/esm/vs/editor/common/services/languagesRegistry":[77024],"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":[77024],"monaco-editor/esm/vs/editor/common/services/markerDecorations":[63637],"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":[63637],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":[23938],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":[23938],"monaco-editor/esm/vs/editor/common/services/model":[69361],"monaco-editor/esm/vs/editor/common/services/model.js":[69361],"monaco-editor/esm/vs/editor/common/services/modelService":[96174],"monaco-editor/esm/vs/editor/common/services/modelService.js":[96174],"monaco-editor/esm/vs/editor/common/services/resolverService":[64037],"monaco-editor/esm/vs/editor/common/services/resolverService.js":[64037],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":[33699],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":[33699],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":[4686],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":[4686],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":[67284],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":[67284],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":[12205],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":[12205],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":[11955],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":[11955],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":[74977,121],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":[74977,121],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":[56151],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":[56151],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":[15863],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":[15863],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":[61210],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":[61210],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":[95231],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":[95231],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":[97412],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":[97412]};function i(e){if(!s.o(t,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=t[e],i=o[0];return Promise.all(o.slice(1).map(s.e)).then((()=>s(i)))}i.keys=()=>Object.keys(t),i.id=9204,e.exports=i}}]); \ No newline at end of file diff --git a/js/vendor.4f64d74f.js b/js/vendor.6da7e17a.js similarity index 69% rename from js/vendor.4f64d74f.js rename to js/vendor.6da7e17a.js index 9eed683..c6c0fc7 100644 --- a/js/vendor.4f64d74f.js +++ b/js/vendor.6da7e17a.js @@ -1,26 +1,26 @@ -(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[121],{83480:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"===typeof e}function n(e){return"number"===typeof e}function o(e){return"object"===typeof e&&null!==e}function s(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if(!n(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,n,r,a,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(n=this._events[e],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),c=n.slice(),r=c.length,l=0;l0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"===typeof console.trace&&console.trace())),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function o(){this.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},t.prototype.removeListener=function(e,t){var n,s,r,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],r=n.length,s=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=r;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){s=a;break}if(s<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)while(n.length)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[],t},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},98582:e=>{e.exports=function(e,t,i){const n=void 0!==e.__vccOpts?e.__vccOpts:e,o=n[t];if(void 0===o)n[t]=i;else for(const s in i)void 0===o[s]&&(o[s]=i[s])}},38734:(e,t,i)=>{"use strict";i.d(t,{C4:()=>x,EW:()=>Ye,Gc:()=>Re,IG:()=>Be,IJ:()=>ze,KR:()=>je,Kh:()=>Ie,Pr:()=>Ge,R1:()=>qe,X2:()=>d,bl:()=>E,fE:()=>Pe,g8:()=>Ae,hV:()=>it,hZ:()=>F,i9:()=>Ve,ju:()=>Me,lJ:()=>We,qA:()=>W,u4:()=>M,uY:()=>a,ux:()=>Fe,wB:()=>tt,yC:()=>r});var n=i(58790); +(globalThis["webpackChunktypesense_dashboard"]=globalThis["webpackChunktypesense_dashboard"]||[]).push([[121],{83480:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"===typeof e}function n(e){return"number"===typeof e}function o(e){return"object"===typeof e&&null!==e}function s(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if(!n(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,n,r,a,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(n=this._events[e],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),c=n.slice(),r=c.length,l=0;l0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"===typeof console.trace&&console.trace())),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function o(){this.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},t.prototype.removeListener=function(e,t){var n,s,r,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],r=n.length,s=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=r;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){s=a;break}if(s<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)while(n.length)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[],t},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},98582:e=>{e.exports=function(e,t,i){const n=void 0!==e.__vccOpts?e.__vccOpts:e,o=n[t];if(void 0===o)n[t]=i;else for(const e in i)void 0===o[e]&&(o[e]=i[e])}},38734:(e,t,i)=>{"use strict";i.d(t,{C4:()=>x,EW:()=>Be,Gc:()=>ve,IG:()=>Ee,IJ:()=>Re,KR:()=>De,Kh:()=>_e,Pr:()=>Me,R1:()=>Oe,X2:()=>d,bl:()=>E,fE:()=>Se,g8:()=>we,hV:()=>Ue,hZ:()=>F,i9:()=>Ie,ju:()=>ke,lJ:()=>Le,qA:()=>W,u4:()=>M,uY:()=>a,ux:()=>xe,wB:()=>ze,yC:()=>r});var n=i(58790); /** -* @vue/reactivity v3.5.11 +* @vue/reactivity v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let o,s;class r{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=o,!e&&o&&(this.index=(o.scopes||(o.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)return;if(h){let e=h;h=void 0;while(e){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;while(u){let i=u;u=void 0;while(i){const n=i.next;if(i.next=void 0,i.flags&=-9,1&i.flags)try{i.trigger()}catch(t){e||(e=t)}i=n}}if(e)throw e}function _(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function v(e){let t,i=e.depsTail,n=i;while(n){const e=n.prevDep;-1===n.version?(n===i&&(i=e),w(n),C(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=e}e.deps=t,e.depsTail=i}function b(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(y(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function y(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===T)return;e.globalVersion=T;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!b(e))return void(e.flags&=-3);const i=s,o=S;s=e,S=!0;try{_(e);const i=e.fn(e._value);(0===t.version||(0,n.$H)(i,e._value))&&(e._value=i,t.version++)}catch(r){throw t.version++,r}finally{s=i,S=o,v(e),e.flags&=-3}}function w(e,t=!1){const{dep:i,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),i.subs===e&&(i.subs=n),!i.subs&&i.computed){i.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)w(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}function C(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let S=!0;const k=[];function x(){k.push(S),S=!1}function E(){const e=k.pop();S=void 0===e||e}function L(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=s;s=void 0;try{t()}finally{s=e}}}let T=0;class I{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class R{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!s||!S||s===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==s)t=this.activeLink=new I(s,this),s.deps?(t.prevDep=s.depsTail,s.depsTail.nextDep=t,s.depsTail=t):s.deps=s.depsTail=t,D(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=s.depsTail,t.nextDep=void 0,s.depsTail.nextDep=t,s.depsTail=t,s.deps===t&&(s.deps=e)}return t}trigger(e){this.version++,T++,this.notify(e)}notify(e){f();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{m()}}}function D(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)D(e)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),e.dep.subs=e}}const N=new WeakMap,A=Symbol(""),O=Symbol(""),P=Symbol("");function M(e,t,i){if(S&&s){let t=N.get(e);t||N.set(e,t=new Map);let n=t.get(i);n||(t.set(i,n=new R),n.map=t,n.key=i),n.track()}}function F(e,t,i,o,s,r){const a=N.get(e);if(!a)return void T++;const l=e=>{e&&e.trigger()};if(f(),"clear"===t)a.forEach(l);else{const s=(0,n.cy)(e),r=s&&(0,n.yI)(i);if(s&&"length"===i){const e=Number(o);a.forEach(((t,i)=>{("length"===i||i===P||!(0,n.Bm)(i)&&i>=e)&&l(t)}))}else switch(void 0!==i&&l(a.get(i)),r&&l(a.get(P)),t){case"add":s?r&&l(a.get("length")):(l(a.get(A)),(0,n.CE)(e)&&l(a.get(O)));break;case"delete":s||(l(a.get(A)),(0,n.CE)(e)&&l(a.get(O)));break;case"set":(0,n.CE)(e)&&l(a.get(A));break}}m()}function B(e){const t=Fe(e);return t===e?t:(M(t,"iterate",P),Pe(e)?t:t.map(We))}function W(e){return M(e=Fe(e),"iterate",P),e}const H={__proto__:null,[Symbol.iterator](){return V(this,Symbol.iterator,We)},concat(...e){return B(this).concat(...e.map((e=>(0,n.cy)(e)?B(e):e)))},entries(){return V(this,"entries",(e=>(e[1]=We(e[1]),e)))},every(e,t){return z(this,"every",e,t,void 0,arguments)},filter(e,t){return z(this,"filter",e,t,(e=>e.map(We)),arguments)},find(e,t){return z(this,"find",e,t,We,arguments)},findIndex(e,t){return z(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return z(this,"findLast",e,t,We,arguments)},findLastIndex(e,t){return z(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return z(this,"forEach",e,t,void 0,arguments)},includes(...e){return $(this,"includes",e)},indexOf(...e){return $(this,"indexOf",e)},join(e){return B(this).join(e)},lastIndexOf(...e){return $(this,"lastIndexOf",e)},map(e,t){return z(this,"map",e,t,void 0,arguments)},pop(){return q(this,"pop")},push(...e){return q(this,"push",e)},reduce(e,...t){return U(this,"reduce",e,t)},reduceRight(e,...t){return U(this,"reduceRight",e,t)},shift(){return q(this,"shift")},some(e,t){return z(this,"some",e,t,void 0,arguments)},splice(...e){return q(this,"splice",e)},toReversed(){return B(this).toReversed()},toSorted(e){return B(this).toSorted(e)},toSpliced(...e){return B(this).toSpliced(...e)},unshift(...e){return q(this,"unshift",e)},values(){return V(this,"values",We)}};function V(e,t,i){const n=W(e),o=n[t]();return n===e||Pe(e)||(o._next=o.next,o.next=()=>{const e=o._next();return e.value&&(e.value=i(e.value)),e}),o}const j=Array.prototype;function z(e,t,i,n,o,s){const r=W(e),a=r!==e&&!Pe(e),l=r[t];if(l!==j[t]){const t=l.apply(e,s);return a?We(t):t}let c=i;r!==e&&(a?c=function(t,n){return i.call(this,We(t),n,e)}:i.length>2&&(c=function(t,n){return i.call(this,t,n,e)}));const d=l.call(r,c,n);return a&&o?o(d):d}function U(e,t,i,n){const o=W(e);let s=i;return o!==e&&(Pe(e)?i.length>3&&(s=function(t,n,o){return i.call(this,t,n,o,e)}):s=function(t,n,o){return i.call(this,t,We(n),o,e)}),o[t](s,...n)}function $(e,t,i){const n=Fe(e);M(n,"iterate",P);const o=n[t](...i);return-1!==o&&!1!==o||!Me(i[0])?o:(i[0]=Fe(i[0]),n[t](...i))}function q(e,t,i=[]){x(),f();const n=Fe(e)[t].apply(e,i);return m(),E(),n}const K=(0,n.pD)("__proto__,__v_isRef,__isVue"),G=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(n.Bm));function Q(e){(0,n.Bm)(e)||(e=String(e));const t=Fe(this);return M(t,"has",e),t.hasOwnProperty(e)}class Y{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){const o=this._isReadonly,s=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return s;if("__v_raw"===t)return i===(o?s?Ee:xe:s?ke:Se).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const r=(0,n.cy)(e);if(!o){let e;if(r&&(e=H[t]))return e;if("hasOwnProperty"===t)return Q}const a=Reflect.get(e,t,Ve(e)?e:i);return((0,n.Bm)(t)?G.has(t):K(t))?a:(o||M(e,"get",t),s?a:Ve(a)?r&&(0,n.yI)(t)?a:a.value:(0,n.Gv)(a)?o?De(a):Ie(a):a)}}class Z extends Y{constructor(e=!1){super(!1,e)}set(e,t,i,o){let s=e[t];if(!this._isShallow){const t=Oe(s);if(Pe(i)||Oe(i)||(s=Fe(s),i=Fe(i)),!(0,n.cy)(e)&&Ve(s)&&!Ve(i))return!t&&(s.value=i,!0)}const r=(0,n.cy)(e)&&(0,n.yI)(t)?Number(t)e,ne=e=>Reflect.getPrototypeOf(e);function oe(e,t,i=!1,o=!1){e=e["__v_raw"];const s=Fe(e),r=Fe(t);i||((0,n.$H)(t,r)&&M(s,"get",t),M(s,"get",r));const{has:a}=ne(s),l=o?ie:i?He:We;return a.call(s,t)?l(e.get(t)):a.call(s,r)?l(e.get(r)):void(e!==s&&e.get(t))}function se(e,t=!1){const i=this["__v_raw"],o=Fe(i),s=Fe(e);return t||((0,n.$H)(e,s)&&M(o,"has",e),M(o,"has",s)),e===s?i.has(e):i.has(e)||i.has(s)}function re(e,t=!1){return e=e["__v_raw"],!t&&M(Fe(e),"iterate",A),Reflect.get(e,"size",e)}function ae(e,t=!1){t||Pe(e)||Oe(e)||(e=Fe(e));const i=Fe(this),n=ne(i),o=n.has.call(i,e);return o||(i.add(e),F(i,"add",e,e)),this}function le(e,t,i=!1){i||Pe(t)||Oe(t)||(t=Fe(t));const o=Fe(this),{has:s,get:r}=ne(o);let a=s.call(o,e);a||(e=Fe(e),a=s.call(o,e));const l=r.call(o,e);return o.set(e,t),a?(0,n.$H)(t,l)&&F(o,"set",e,t,l):F(o,"add",e,t),this}function ce(e){const t=Fe(this),{has:i,get:n}=ne(t);let o=i.call(t,e);o||(e=Fe(e),o=i.call(t,e));const s=n?n.call(t,e):void 0,r=t.delete(e);return o&&F(t,"delete",e,void 0,s),r}function de(){const e=Fe(this),t=0!==e.size,i=void 0,n=e.clear();return t&&F(e,"clear",void 0,void 0,i),n}function ue(e,t){return function(i,n){const o=this,s=o["__v_raw"],r=Fe(s),a=t?ie:e?He:We;return!e&&M(r,"iterate",A),s.forEach(((e,t)=>i.call(n,a(e),a(t),o)))}}function he(e,t,i){return function(...o){const s=this["__v_raw"],r=Fe(s),a=(0,n.CE)(r),l="entries"===e||e===Symbol.iterator&&a,c="keys"===e&&a,d=s[e](...o),u=i?ie:t?He:We;return!t&&M(r,"iterate",c?O:A),{next(){const{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function ge(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function pe(){const e={get(e){return oe(this,e)},get size(){return re(this)},has:se,add:ae,set:le,delete:ce,clear:de,forEach:ue(!1,!1)},t={get(e){return oe(this,e,!1,!0)},get size(){return re(this)},has:se,add(e){return ae.call(this,e,!0)},set(e,t){return le.call(this,e,t,!0)},delete:ce,clear:de,forEach:ue(!1,!0)},i={get(e){return oe(this,e,!0)},get size(){return re(this,!0)},has(e){return se.call(this,e,!0)},add:ge("add"),set:ge("set"),delete:ge("delete"),clear:ge("clear"),forEach:ue(!0,!1)},n={get(e){return oe(this,e,!0,!0)},get size(){return re(this,!0)},has(e){return se.call(this,e,!0)},add:ge("add"),set:ge("set"),delete:ge("delete"),clear:ge("clear"),forEach:ue(!0,!0)},o=["keys","values","entries",Symbol.iterator];return o.forEach((o=>{e[o]=he(o,!1,!1),i[o]=he(o,!0,!1),t[o]=he(o,!1,!0),n[o]=he(o,!0,!0)})),[e,i,t,n]}const[fe,me,_e,ve]=pe();function be(e,t){const i=t?e?ve:_e:e?me:fe;return(t,o,s)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get((0,n.$3)(i,o)&&o in t?i:t,o,s)}const ye={get:be(!1,!1)},we={get:be(!1,!0)},Ce={get:be(!0,!1)};const Se=new WeakMap,ke=new WeakMap,xe=new WeakMap,Ee=new WeakMap;function Le(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Te(e){return e["__v_skip"]||!Object.isExtensible(e)?0:Le((0,n.Zf)(e))}function Ie(e){return Oe(e)?e:Ne(e,!1,J,ye,Se)}function Re(e){return Ne(e,!1,te,we,ke)}function De(e){return Ne(e,!0,ee,Ce,xe)}function Ne(e,t,i,o,s){if(!(0,n.Gv)(e))return e;if(e["__v_raw"]&&(!t||!e["__v_isReactive"]))return e;const r=s.get(e);if(r)return r;const a=Te(e);if(0===a)return e;const l=new Proxy(e,2===a?o:i);return s.set(e,l),l}function Ae(e){return Oe(e)?Ae(e["__v_raw"]):!(!e||!e["__v_isReactive"])}function Oe(e){return!(!e||!e["__v_isReadonly"])}function Pe(e){return!(!e||!e["__v_isShallow"])}function Me(e){return!!e&&!!e["__v_raw"]}function Fe(e){const t=e&&e["__v_raw"];return t?Fe(t):e}function Be(e){return!(0,n.$3)(e,"__v_skip")&&Object.isExtensible(e)&&(0,n.yQ)(e,"__v_skip",!0),e}const We=e=>(0,n.Gv)(e)?Ie(e):e,He=e=>(0,n.Gv)(e)?De(e):e;function Ve(e){return!!e&&!0===e["__v_isRef"]}function je(e){return Ue(e,!1)}function ze(e){return Ue(e,!0)}function Ue(e,t){return Ve(e)?e:new $e(e,t)}class $e{constructor(e,t){this.dep=new R,this["__v_isRef"]=!0,this["__v_isShallow"]=!1,this._rawValue=t?e:Fe(e),this._value=t?e:We(e),this["__v_isShallow"]=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this["__v_isShallow"]||Pe(e)||Oe(e);e=i?e:Fe(e),(0,n.$H)(e,t)&&(this._rawValue=e,this._value=i?e:We(e),this.dep.trigger())}}function qe(e){return Ve(e)?e.value:e}const Ke={get:(e,t,i)=>"__v_raw"===t?e:qe(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const o=e[t];return Ve(o)&&!Ve(i)?(o.value=i,!0):Reflect.set(e,t,i,n)}};function Ge(e){return Ae(e)?e:new Proxy(e,Ke)}class Qe{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new R(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=T-1,this.next=void 0,this.effect=this,this["__v_isReadonly"]=!t,this.isSSR=i}notify(){if(this.flags|=16,!(8&this.flags||s===this))return p(this,!0),!0}get value(){const e=this.dep.track();return y(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Ye(e,t,i=!1){let o,s;(0,n.Tn)(e)?o=e:(o=e.get,s=e.set);const r=new Qe(o,s,i);return r}const Ze={},Xe=new WeakMap;let Je;function et(e,t=!1,i=Je){if(i){let t=Xe.get(i);t||Xe.set(i,t=[]),t.push(e)}else 0}function tt(e,t,i=n.MZ){const{immediate:o,deep:s,once:r,scheduler:a,augmentJob:c,call:u}=i,h=e=>s?e:Pe(e)||!1===s||0===s?it(e,1):it(e);let g,p,f,m,_=!1,v=!1;if(Ve(e)?(p=()=>e.value,_=Pe(e)):Ae(e)?(p=()=>h(e),_=!0):(0,n.cy)(e)?(v=!0,_=e.some((e=>Ae(e)||Pe(e))),p=()=>e.map((e=>Ve(e)?e.value:Ae(e)?h(e):(0,n.Tn)(e)?u?u(e,2):e():void 0))):p=(0,n.Tn)(e)?t?u?()=>u(e,2):e:()=>{if(f){x();try{f()}finally{E()}}const t=Je;Je=g;try{return u?u(e,3,[m]):e(m)}finally{Je=t}}:n.tE,t&&s){const e=p,t=!0===s?1/0:s;p=()=>it(e(),t)}const b=l(),y=()=>{g.stop(),b&&(0,n.TF)(b.effects,g)};if(r&&t){const e=t;t=(...t)=>{e(...t),y()}}let w=v?new Array(e.length).fill(Ze):Ze;const C=e=>{if(1&g.flags&&(g.dirty||e))if(t){const e=g.run();if(s||_||(v?e.some(((e,t)=>(0,n.$H)(e,w[t]))):(0,n.$H)(e,w))){f&&f();const i=Je;Je=g;try{const i=[e,w===Ze?void 0:v&&w[0]===Ze?[]:w,m];u?u(t,3,i):t(...i),w=e}finally{Je=i}}}else g.run()};return c&&c(C),g=new d(p),g.scheduler=a?()=>a(C,!1):C,m=e=>et(e,!1,g),f=g.onStop=()=>{const e=Xe.get(g);if(e){if(u)u(e,4);else for(const t of e)t();Xe.delete(g)}},t?o?C(!0):w=g.run():a?a(C.bind(null,!0),!0):g.run(),y.pause=g.pause.bind(g),y.resume=g.resume.bind(g),y.stop=y,y}function it(e,t=1/0,i){if(t<=0||!(0,n.Gv)(e)||e["__v_skip"])return e;if(i=i||new Set,i.has(e))return e;if(i.add(e),t--,Ve(e))it(e.value,t,i);else if((0,n.cy)(e))for(let n=0;n{it(e,t,i)}));else if((0,n.Qd)(e)){for(const n in e)it(e[n],t,i);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&it(e[n],t,i)}return e}},61758:(e,t,i)=>{"use strict";i.d(t,{$u:()=>ke,CE:()=>vi,Df:()=>oe,EW:()=>rn,FK:()=>ai,Fv:()=>Ri,Gt:()=>ht,Gy:()=>q,Ic:()=>Se,Im:()=>V,K9:()=>Ot,KC:()=>we,Lk:()=>ki,MZ:()=>ne,Ng:()=>Li,OW:()=>ee,PR:()=>ue,Q3:()=>Di,QP:()=>G,RG:()=>He,WQ:()=>gt,Wv:()=>bi,Y4:()=>pe,bF:()=>xi,bo:()=>I,dY:()=>m,eW:()=>Ii,eX:()=>We,g2:()=>Ae,gN:()=>Pe,h:()=>an,hi:()=>Ee,k6:()=>T,n:()=>ge,nI:()=>Vi,pI:()=>Be,pM:()=>se,pR:()=>X,qL:()=>r,rE:()=>ln,sV:()=>Ce,uX:()=>gi,v6:()=>Pi,wB:()=>$t,xo:()=>xe});var n=i(38734),o=i(58790);function s(e,t,i,n){try{return n?e(...n):e()}catch(o){a(o,t,i)}}function r(e,t,i,n){if((0,o.Tn)(e)){const r=s(e,t,i,n);return r&&(0,o.yL)(r)&&r.catch((e=>{a(e,t,i)})),r}if((0,o.cy)(e)){const o=[];for(let s=0;s>>1,o=c[n],s=S(o);s=S(i)?c.push(e):c.splice(_(t),0,e),e.flags|=1,b()}}function b(){f||(f=p.then(k))}function y(e){(0,o.cy)(e)?u.push(...e):h&&-1===e.id?h.splice(g+1,0,e):1&e.flags||(u.push(e),e.flags|=1),b()}function w(e,t,i=d+1){for(0;iS(e)-S(t)));if(u.length=0,h)return void h.push(...e);for(h=e,g=0;gnull==e.id?2&e.flags?-1:1/0:e.id;function k(e){o.tE;try{for(d=0;d{n._d&&mi(-1);const o=L(t);let s;try{s=e(...i)}finally{L(o),n._d&&mi(1)}return s};return n._n=!0,n._c=!0,n._d=!0,n}function I(e,t){if(null===x)return e;const i=nn(x),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,A=e=>e&&(e.disabled||""===e.disabled),O=e=>e&&(e.defer||""===e.defer),P=e=>"undefined"!==typeof SVGElement&&e instanceof SVGElement,M=e=>"function"===typeof MathMLElement&&e instanceof MathMLElement,F=(e,t)=>{const i=e&&e.to;if((0,o.Kg)(i)){if(t){const e=t(i);return e}return null}return i},B={name:"Teleport",__isTeleport:!0,process(e,t,i,n,o,s,r,a,l,c){const{mc:d,pc:u,pbc:h,o:{insert:g,querySelector:p,createText:f,createComment:m}}=c,_=A(t.props);let{shapeFlag:v,children:b,dynamicChildren:y}=t;if(null==e){const e=t.el=f(""),c=t.anchor=f("");g(e,i,n),g(c,i,n);const u=(e,t)=>{16&v&&(o&&o.isCE&&(o.ce._teleportTarget=e),d(b,e,t,o,s,r,a,l))},h=()=>{const e=t.target=F(t.props,p),i=z(e,t,f,g);e&&("svg"!==r&&P(e)?r="svg":"mathml"!==r&&M(e)&&(r="mathml"),_||(u(e,i),j(t)))};_&&(u(i,c),j(t)),O(t.props)?At(h,s):h()}else{t.el=e.el,t.targetStart=e.targetStart;const n=t.anchor=e.anchor,d=t.target=e.target,g=t.targetAnchor=e.targetAnchor,f=A(e.props),m=f?i:d,v=f?n:g;if("svg"===r||P(d)?r="svg":("mathml"===r||M(d))&&(r="mathml"),y?(h(e.dynamicChildren,y,m,o,s,r,a),Wt(e,t,!0)):l||u(e,t,m,v,o,s,r,a,!1),_)f?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):W(t,i,n,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=F(t.props,p);e&&W(t,e,null,c,0)}else f&&W(t,d,g,c,1);j(t)}},remove(e,t,i,{um:n,o:{remove:o}},s){const{shapeFlag:r,children:a,anchor:l,targetStart:c,targetAnchor:d,target:u,props:h}=e;if(u&&(o(c),o(d)),s&&o(l),16&r){const e=s||!A(h);for(let o=0;o{e.isMounted=!0})),xe((()=>{e.isUnmounting=!0})),e}const K=[Function,Array],G={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:K,onEnter:K,onAfterEnter:K,onEnterCancelled:K,onBeforeLeave:K,onLeave:K,onAfterLeave:K,onLeaveCancelled:K,onBeforeAppear:K,onAppear:K,onAfterAppear:K,onAppearCancelled:K},Q=e=>{const t=e.subTree;return t.component?Q(t.component):t},Y={name:"BaseTransition",props:G,setup(e,{slots:t}){const i=Vi(),o=q();return()=>{const s=t.default&&oe(t.default(),!0);if(!s||!s.length)return;const r=Z(s),a=(0,n.ux)(e),{mode:l}=a;if(o.isLeaving)return te(r);const c=ie(r);if(!c)return te(r);let d=ee(c,a,o,i,(e=>d=e));c.type!==ci&&ne(c,d);const u=i.subTree,h=u&&ie(u);if(h&&h.type!==ci&&!wi(c,h)&&Q(i).type!==ci){const e=ee(h,a,o,i);if(ne(h,e),"out-in"===l&&c.type!==ci)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,8&i.job.flags||i.update(),delete e.afterLeave},te(r);"in-out"===l&&c.type!==ci&&(e.delayLeave=(e,t,i)=>{const n=J(o,h);n[String(h.key)]=h,e[U]=()=>{t(),e[U]=void 0,delete d.delayedLeave},d.delayedLeave=i})}return r}}};function Z(e){let t=e[0];if(e.length>1){let i=!1;for(const n of e)if(n.type!==ci){0,t=n,i=!0;break}}return t}const X=Y;function J(e,t){const{leavingVNodes:i}=e;let n=i.get(t.type);return n||(n=Object.create(null),i.set(t.type,n)),n}function ee(e,t,i,n,s){const{appear:a,mode:l,persisted:c=!1,onBeforeEnter:d,onEnter:u,onAfterEnter:h,onEnterCancelled:g,onBeforeLeave:p,onLeave:f,onAfterLeave:m,onLeaveCancelled:_,onBeforeAppear:v,onAppear:b,onAfterAppear:y,onAppearCancelled:w}=t,C=String(e.key),S=J(i,e),k=(e,t)=>{e&&r(e,n,9,t)},x=(e,t)=>{const i=t[1];k(e,t),(0,o.cy)(e)?e.every((e=>e.length<=1))&&i():e.length<=1&&i()},E={mode:l,persisted:c,beforeEnter(t){let n=d;if(!i.isMounted){if(!a)return;n=v||d}t[U]&&t[U](!0);const o=S[C];o&&wi(e,o)&&o.el[U]&&o.el[U](),k(n,[t])},enter(e){let t=u,n=h,o=g;if(!i.isMounted){if(!a)return;t=b||u,n=y||h,o=w||g}let s=!1;const r=e[$]=t=>{s||(s=!0,k(t?o:n,[e]),E.delayedLeave&&E.delayedLeave(),e[$]=void 0)};t?x(t,[e,r]):r()},leave(t,n){const o=String(e.key);if(t[$]&&t[$](!0),i.isUnmounting)return n();k(p,[t]);let s=!1;const r=t[U]=i=>{s||(s=!0,n(),k(i?_:m,[t]),t[U]=void 0,S[o]===e&&delete S[o])};S[o]=e,f?x(f,[t,r]):r()},clone(e){const o=ee(e,t,i,n,s);return s&&s(o),o}};return E}function te(e){if(ce(e))return e=Ti(e),e.children=null,e}function ie(e){if(!ce(e))return N(e.type)&&e.children?Z(e.children):e;const{shapeFlag:t,children:i}=e;if(i){if(16&t)return i[0];if(32&t&&(0,o.Tn)(i.default))return i.default()}}function ne(e,t){6&e.shapeFlag&&e.component?(e.transition=t,ne(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oe(e,t=!1,i){let n=[],o=0;for(let s=0;s1)for(let s=0;s(0,o.X$)({name:e.name},t,{setup:e}))():e}function re(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ae(e,t,i,r,a=!1){if((0,o.cy)(e))return void e.forEach(((e,n)=>ae(e,t&&((0,o.cy)(t)?t[n]:t),i,r,a)));if(le(r)&&!a)return;const l=4&r.shapeFlag?nn(r.component):r.el,c=a?null:l,{i:d,r:u}=e;const h=t&&t.r,g=d.refs===o.MZ?d.refs={}:d.refs,p=d.setupState,f=(0,n.ux)(p),m=p===o.MZ?()=>!1:e=>(0,o.$3)(f,e);if(null!=h&&h!==u&&((0,o.Kg)(h)?(g[h]=null,m(h)&&(p[h]=null)):(0,n.i9)(h)&&(h.value=null)),(0,o.Tn)(u))s(u,d,12,[c,g]);else{const t=(0,o.Kg)(u),s=(0,n.i9)(u);if(t||s){const n=()=>{if(e.f){const i=t?m(u)?p[u]:g[u]:u.value;a?(0,o.cy)(i)&&(0,o.TF)(i,l):(0,o.cy)(i)?i.includes(l)||i.push(l):t?(g[u]=[l],m(u)&&(p[u]=g[u])):(u.value=[l],e.k&&(g[e.k]=u.value))}else t?(g[u]=c,m(u)&&(p[u]=c)):s&&(u.value=c,e.k&&(g[e.k]=c))};c?(n.id=-1,At(n,i)):n()}else 0}}const le=e=>!!e.type.__asyncLoader -/*! #__NO_SIDE_EFFECTS__ */;const ce=e=>e.type.__isKeepAlive,de={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const i=Vi(),n=i.ctx;if(!n.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const s=new Map,r=new Set;let a=null;const l=i.suspense,{renderer:{p:c,m:d,um:u,o:{createElement:h}}}=n,g=h("div");function p(e){_e(e),u(e,i,l,!0)}function f(e){s.forEach(((t,i)=>{const n=on(t.type);n&&!e(n)&&m(i)}))}function m(e){const t=s.get(e);!t||a&&wi(t,a)?a&&_e(a):p(t),s.delete(e),r.delete(e)}n.activate=(e,t,i,n,s)=>{const r=e.component;d(e,t,i,0,l),c(r.vnode,e,t,i,r,l,n,e.slotScopeIds,s),At((()=>{r.isDeactivated=!1,r.a&&(0,o.DY)(r.a);const t=e.props&&e.props.onVnodeMounted;t&&Mi(t,r.parent,e)}),l)},n.deactivate=e=>{const t=e.component;jt(t.m),jt(t.a),d(e,g,null,1,l),At((()=>{t.da&&(0,o.DY)(t.da);const i=e.props&&e.props.onVnodeUnmounted;i&&Mi(i,t.parent,e),t.isDeactivated=!0}),l)},$t((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>he(e,t))),t&&f((e=>!he(t,e)))}),{flush:"post",deep:!0});let _=null;const v=()=>{null!=_&&(si(i.subTree.type)?At((()=>{s.set(_,ve(i.subTree))}),i.subTree.suspense):s.set(_,ve(i.subTree)))};return Ce(v),ke(v),xe((()=>{s.forEach((e=>{const{subTree:t,suspense:n}=i,o=ve(t);if(e.type!==o.type||e.key!==o.key)p(e);else{_e(o);const e=o.component.da;e&&At(e,n)}}))})),()=>{if(_=null,!t.default)return a=null;const i=t.default(),n=i[0];if(i.length>1)return a=null,i;if(!yi(n)||!(4&n.shapeFlag)&&!(128&n.shapeFlag))return a=null,n;let o=ve(n);if(o.type===ci)return a=null,o;const l=o.type,c=on(le(o)?o.type.__asyncResolved||{}:l),{include:d,exclude:u,max:h}=e;if(d&&(!c||!he(d,c))||u&&c&&he(u,c))return o.shapeFlag&=-257,a=o,n;const g=null==o.key?l:o.key,p=s.get(g);return o.el&&(o=Ti(o),128&n.shapeFlag&&(n.ssContent=o)),_=g,p?(o.el=p.el,o.component=p.component,o.transition&&ne(o,o.transition),o.shapeFlag|=512,r.delete(g),r.add(g)):(r.add(g),h&&r.size>parseInt(h,10)&&m(r.values().next().value)),o.shapeFlag|=256,a=o,si(n.type)?n:o}}},ue=de;function he(e,t){return(0,o.cy)(e)?e.some((e=>he(e,t))):(0,o.Kg)(e)?e.split(",").includes(t):!!(0,o.gd)(e)&&(e.lastIndex=0,e.test(t))}function ge(e,t){fe(e,"a",t)}function pe(e,t){fe(e,"da",t)}function fe(e,t,i=Hi){const n=e.__wdc||(e.__wdc=()=>{let t=i;while(t){if(t.isDeactivated)return;t=t.parent}return e()});if(be(t,n,i),i){let e=i.parent;while(e&&e.parent)ce(e.parent.vnode)&&me(n,t,i,e),e=e.parent}}function me(e,t,i,n){const s=be(t,e,n,!0);Ee((()=>{(0,o.TF)(n[t],s)}),i)}function _e(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ve(e){return 128&e.shapeFlag?e.ssContent:e}function be(e,t,i=Hi,o=!1){if(i){const s=i[e]||(i[e]=[]),a=t.__weh||(t.__weh=(...o)=>{(0,n.C4)();const s=Ui(i),a=r(t,i,e,o);return s(),(0,n.bl)(),a});return o?s.unshift(a):s.push(a),a}}const ye=e=>(t,i=Hi)=>{Qi&&"sp"!==e||be(e,((...e)=>t(...e)),i)},we=ye("bm"),Ce=ye("m"),Se=ye("bu"),ke=ye("u"),xe=ye("bum"),Ee=ye("um"),Le=ye("sp"),Te=ye("rtg"),Ie=ye("rtc");function Re(e,t=Hi){be("ec",e,t)}const De="components",Ne="directives";function Ae(e,t){return Me(De,e,!0,t)||e}const Oe=Symbol.for("v-ndc");function Pe(e){return Me(Ne,e)}function Me(e,t,i=!0,n=!1){const s=x||Hi;if(s){const i=s.type;if(e===De){const e=on(i,!1);if(e&&(e===t||e===(0,o.PT)(t)||e===(0,o.ZH)((0,o.PT)(t))))return i}const r=Fe(s[e]||i[e],t)||Fe(s.appContext[e],t);return!r&&n?i:r}}function Fe(e,t){return e&&(e[t]||e[(0,o.PT)(t)]||e[(0,o.ZH)((0,o.PT)(t))])}function Be(e,t,i,s){let r;const a=i&&i[s],l=(0,o.cy)(e);if(l||(0,o.Kg)(e)){const i=l&&(0,n.g8)(e);let o=!1;i&&(o=!(0,n.fE)(e),e=(0,n.qA)(e)),r=new Array(e.length);for(let s=0,l=e.length;st(e,i,void 0,a&&a[i])));else{const i=Object.keys(e);r=new Array(i.length);for(let n=0,o=i.length;n{const t=n.fn(...e);return t&&(t.key=n.key),t}:n.fn)}return e}function He(e,t,i={},n,o){if(x.ce||x.parent&&le(x.parent)&&x.parent.ce)return"default"!==t&&(i.name=t),gi(),bi(ai,null,[xi("slot",i,n&&n())],64);let s=e[t];s&&s._c&&(s._d=!1),gi();const r=s&&Ve(s(i)),a=bi(ai,{key:(i.key||r&&r.key||`_${t}`)+(!r&&n?"_fb":"")},r||(n?n():[]),r&&1===e._?64:-2);return!o&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function Ve(e){return e.some((e=>!yi(e)||e.type!==ci&&!(e.type===ai&&!Ve(e.children))))?e:null}const je=e=>e?qi(e)?nn(e):je(e.parent):null,ze=(0,o.X$)(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>je(e.parent),$root:e=>je(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xe(e),$forceUpdate:e=>e.f||(e.f=()=>{v(e.update)}),$nextTick:e=>e.n||(e.n=m.bind(e.proxy)),$watch:e=>Kt.bind(e)}),Ue=(e,t)=>e!==o.MZ&&!e.__isScriptSetup&&(0,o.$3)(e,t),$e={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:i,setupState:s,data:r,props:a,accessCache:l,type:c,appContext:d}=e;let u;if("$"!==t[0]){const n=l[t];if(void 0!==n)switch(n){case 1:return s[t];case 2:return r[t];case 4:return i[t];case 3:return a[t]}else{if(Ue(s,t))return l[t]=1,s[t];if(r!==o.MZ&&(0,o.$3)(r,t))return l[t]=2,r[t];if((u=e.propsOptions[0])&&(0,o.$3)(u,t))return l[t]=3,a[t];if(i!==o.MZ&&(0,o.$3)(i,t))return l[t]=4,i[t];Ke&&(l[t]=0)}}const h=ze[t];let g,p;return h?("$attrs"===t&&(0,n.u4)(e.attrs,"get",""),h(e)):(g=c.__cssModules)&&(g=g[t])?g:i!==o.MZ&&(0,o.$3)(i,t)?(l[t]=4,i[t]):(p=d.config.globalProperties,(0,o.$3)(p,t)?p[t]:void 0)},set({_:e},t,i){const{data:n,setupState:s,ctx:r}=e;return Ue(s,t)?(s[t]=i,!0):n!==o.MZ&&(0,o.$3)(n,t)?(n[t]=i,!0):!(0,o.$3)(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(r[t]=i,!0))},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:s,propsOptions:r}},a){let l;return!!i[a]||e!==o.MZ&&(0,o.$3)(e,a)||Ue(t,a)||(l=r[0])&&(0,o.$3)(l,a)||(0,o.$3)(n,a)||(0,o.$3)(ze,a)||(0,o.$3)(s.config.globalProperties,a)},defineProperty(e,t,i){return null!=i.get?e._.accessCache[t]=0:(0,o.$3)(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};function qe(e){return(0,o.cy)(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Ke=!0;function Ge(e){const t=Xe(e),i=e.proxy,s=e.ctx;Ke=!1,t.beforeCreate&&Ye(t.beforeCreate,e,"bc");const{data:r,computed:a,methods:l,watch:c,provide:d,inject:u,created:h,beforeMount:g,mounted:p,beforeUpdate:f,updated:m,activated:_,deactivated:v,beforeDestroy:b,beforeUnmount:y,destroyed:w,unmounted:C,render:S,renderTracked:k,renderTriggered:x,errorCaptured:E,serverPrefetch:L,expose:T,inheritAttrs:I,components:R,directives:D,filters:N}=t,A=null;if(u&&Qe(u,s,A),l)for(const n in l){const e=l[n];(0,o.Tn)(e)&&(s[n]=e.bind(i))}if(r){0;const t=r.call(i,i);0,(0,o.Gv)(t)&&(e.data=(0,n.Kh)(t))}if(Ke=!0,a)for(const n in a){const e=a[n],t=(0,o.Tn)(e)?e.bind(i,i):(0,o.Tn)(e.get)?e.get.bind(i,i):o.tE;0;const r=!(0,o.Tn)(e)&&(0,o.Tn)(e.set)?e.set.bind(i):o.tE,l=rn({get:t,set:r});Object.defineProperty(s,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const n in c)Ze(c[n],s,i,n);if(d){const e=(0,o.Tn)(d)?d.call(i):d;Reflect.ownKeys(e).forEach((t=>{ht(t,e[t])}))}function O(e,t){(0,o.cy)(t)?t.forEach((t=>e(t.bind(i)))):t&&e(t.bind(i))}if(h&&Ye(h,e,"c"),O(we,g),O(Ce,p),O(Se,f),O(ke,m),O(ge,_),O(pe,v),O(Re,E),O(Ie,k),O(Te,x),O(xe,y),O(Ee,C),O(Le,L),(0,o.cy)(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>i[e],set:t=>i[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===o.tE&&(e.render=S),null!=I&&(e.inheritAttrs=I),R&&(e.components=R),D&&(e.directives=D),L&&re(e)}function Qe(e,t,i=o.tE){(0,o.cy)(e)&&(e=nt(e));for(const s in e){const i=e[s];let r;r=(0,o.Gv)(i)?"default"in i?gt(i.from||s,i.default,!0):gt(i.from||s):gt(i),(0,n.i9)(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[s]=r}}function Ye(e,t,i){r((0,o.cy)(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,i)}function Ze(e,t,i,n){let s=n.includes(".")?Gt(i,n):()=>i[n];if((0,o.Kg)(e)){const i=t[e];(0,o.Tn)(i)&&$t(s,i)}else if((0,o.Tn)(e))$t(s,e.bind(i));else if((0,o.Gv)(e))if((0,o.cy)(e))e.forEach((e=>Ze(e,t,i,n)));else{const n=(0,o.Tn)(e.handler)?e.handler.bind(i):t[e.handler];(0,o.Tn)(n)&&$t(s,n,e)}else 0}function Xe(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:a}}=e.appContext,l=r.get(t);let c;return l?c=l:s.length||i||n?(c={},s.length&&s.forEach((e=>Je(c,e,a,!0))),Je(c,t,a)):c=t,(0,o.Gv)(t)&&r.set(t,c),c}function Je(e,t,i,n=!1){const{mixins:o,extends:s}=t;s&&Je(e,s,i,!0),o&&o.forEach((t=>Je(e,t,i,!0)));for(const r in t)if(n&&"expose"===r);else{const n=et[r]||i&&i[r];e[r]=n?n(e[r],t[r]):t[r]}return e}const et={data:tt,props:rt,emits:rt,methods:st,computed:st,beforeCreate:ot,created:ot,beforeMount:ot,mounted:ot,beforeUpdate:ot,updated:ot,beforeDestroy:ot,beforeUnmount:ot,destroyed:ot,unmounted:ot,activated:ot,deactivated:ot,errorCaptured:ot,serverPrefetch:ot,components:st,directives:st,watch:at,provide:tt,inject:it};function tt(e,t){return t?e?function(){return(0,o.X$)((0,o.Tn)(e)?e.call(this,this):e,(0,o.Tn)(t)?t.call(this,this):t)}:t:e}function it(e,t){return st(nt(e),nt(t))}function nt(e){if((0,o.cy)(e)){const t={};for(let i=0;i1)return i&&(0,o.Tn)(t)?t.call(n&&n.proxy):t}else 0}const pt={},ft=()=>Object.create(pt),mt=e=>Object.getPrototypeOf(e)===pt;function _t(e,t,i,o=!1){const s={},r=ft();e.propsDefaults=Object.create(null),bt(e,t,s,r);for(const n in e.propsOptions[0])n in s||(s[n]=void 0);i?e.props=o?s:(0,n.Gc)(s):e.type.props?e.props=s:e.props=r,e.attrs=r}function vt(e,t,i,s){const{props:r,attrs:a,vnode:{patchFlag:l}}=e,c=(0,n.ux)(r),[d]=e.propsOptions;let u=!1;if(!(s||l>0)||16&l){let n;bt(e,t,r,a)&&(u=!0);for(const s in c)t&&((0,o.$3)(t,s)||(n=(0,o.Tg)(s))!==s&&(0,o.$3)(t,n))||(d?!i||void 0===i[s]&&void 0===i[n]||(r[s]=yt(d,c,s,void 0,e,!0)):delete r[s]);if(a!==c)for(const e in a)t&&(0,o.$3)(t,e)||(delete a[e],u=!0)}else if(8&l){const i=e.vnode.dynamicProps;for(let n=0;n{c=!0;const[i,n]=Ct(e,t,!0);(0,o.X$)(a,i),n&&l.push(...n)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!r&&!c)return(0,o.Gv)(e)&&n.set(e,o.Oj),o.Oj;if((0,o.cy)(r))for(let u=0;u"_"===e[0]||"$stable"===e,xt=e=>(0,o.cy)(e)?e.map(Ni):[Ni(e)],Et=(e,t,i)=>{if(t._n)return t;const n=T(((...e)=>xt(t(...e))),i);return n._c=!1,n},Lt=(e,t,i)=>{const n=e._ctx;for(const s in e){if(kt(s))continue;const i=e[s];if((0,o.Tn)(i))t[s]=Et(s,i,n);else if(null!=i){0;const e=xt(i);t[s]=()=>e}}},Tt=(e,t)=>{const i=xt(t);e.slots.default=()=>i},It=(e,t,i)=>{for(const n in t)(i||"_"!==n)&&(e[n]=t[n])},Rt=(e,t,i)=>{const n=e.slots=ft();if(32&e.vnode.shapeFlag){const e=t._;e?(It(n,t,i),i&&(0,o.yQ)(n,"_",e,!0)):Lt(t,n)}else t&&Tt(e,t)},Dt=(e,t,i)=>{const{vnode:n,slots:s}=e;let r=!0,a=o.MZ;if(32&n.shapeFlag){const e=t._;e?i&&1===e?r=!1:It(s,t,i):(r=!t.$stable,Lt(t,s)),a=t}else t&&(Tt(e,t),a={default:1});if(r)for(const o in s)kt(o)||null!=a[o]||delete s[o]};function Nt(){}const At=ri;function Ot(e){return Pt(e)}function Pt(e,t){Nt();const i=(0,o.We)();i.__VUE__=!0;const{insert:s,remove:r,patchProp:a,createElement:l,createText:c,createComment:d,setText:u,setElementText:h,parentNode:g,nextSibling:p,setScopeId:f=o.tE,insertStaticContent:m}=e,_=(e,t,i,n=null,o=null,s=null,r=void 0,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!wi(e,t)&&(n=Y(e),$(e,o,s,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:d,shapeFlag:u}=t;switch(c){case li:b(e,t,i,n);break;case ci:y(e,t,i,n);break;case di:null==e&&S(t,i,n,r);break;case ai:P(e,t,i,n,o,s,r,a,l);break;default:1&u?E(e,t,i,n,o,s,r,a,l):6&u?M(e,t,i,n,o,s,r,a,l):(64&u||128&u)&&c.process(e,t,i,n,o,s,r,a,l,J)}null!=d&&o&&ae(d,e&&e.ref,s,t||e,!t)},b=(e,t,i,n)=>{if(null==e)s(t.el=c(t.children),i,n);else{const i=t.el=e.el;t.children!==e.children&&u(i,t.children)}},y=(e,t,i,n)=>{null==e?s(t.el=d(t.children||""),i,n):t.el=e.el},S=(e,t,i,n)=>{[e.el,e.anchor]=m(e.children,t,i,n,e.el,e.anchor)},k=({el:e,anchor:t},i,n)=>{let o;while(e&&e!==t)o=p(e),s(e,i,n),e=o;s(t,i,n)},x=({el:e,anchor:t})=>{let i;while(e&&e!==t)i=p(e),r(e),e=i;r(t)},E=(e,t,i,n,o,s,r,a,l)=>{"svg"===t.type?r="svg":"math"===t.type&&(r="mathml"),null==e?L(t,i,n,o,s,r,a,l):N(e,t,o,s,r,a,l)},L=(e,t,i,n,r,c,d,u)=>{let g,p;const{props:f,shapeFlag:m,transition:_,dirs:v}=e;if(g=e.el=l(e.type,c,f&&f.is,f),8&m?h(g,e.children):16&m&&I(e.children,g,null,n,r,Mt(e,c),d,u),v&&R(e,null,n,"created"),T(g,e,e.scopeId,d,n),f){for(const e in f)"value"===e||(0,o.SU)(e)||a(g,e,null,f[e],c,n);"value"in f&&a(g,"value",null,f.value,c),(p=f.onVnodeBeforeMount)&&Mi(p,n,e)}v&&R(e,null,n,"beforeMount");const b=Bt(r,_);b&&_.beforeEnter(g),s(g,t,i),((p=f&&f.onVnodeMounted)||b||v)&&At((()=>{p&&Mi(p,n,e),b&&_.enter(g),v&&R(e,null,n,"mounted")}),r)},T=(e,t,i,n,o)=>{if(i&&f(e,i),n)for(let s=0;s{for(let c=l;c{const c=t.el=e.el;let{patchFlag:d,dynamicChildren:u,dirs:g}=t;d|=16&e.patchFlag;const p=e.props||o.MZ,f=t.props||o.MZ;let m;if(i&&Ft(i,!1),(m=f.onVnodeBeforeUpdate)&&Mi(m,i,t,e),g&&R(t,e,i,"beforeUpdate"),i&&Ft(i,!0),(p.innerHTML&&null==f.innerHTML||p.textContent&&null==f.textContent)&&h(c,""),u?A(e.dynamicChildren,u,c,i,n,Mt(t,s),r):l||V(e,t,c,null,i,n,Mt(t,s),r,!1),d>0){if(16&d)O(c,p,f,i,s);else if(2&d&&p.class!==f.class&&a(c,"class",null,f.class,s),4&d&&a(c,"style",p.style,f.style,s),8&d){const e=t.dynamicProps;for(let t=0;t{m&&Mi(m,i,t,e),g&&R(t,e,i,"updated")}),n)},A=(e,t,i,n,o,s,r)=>{for(let a=0;a{if(t!==i){if(t!==o.MZ)for(const r in t)(0,o.SU)(r)||r in i||a(e,r,t[r],null,s,n);for(const r in i){if((0,o.SU)(r))continue;const l=i[r],c=t[r];l!==c&&"value"!==r&&a(e,r,c,l,s,n)}"value"in i&&a(e,"value",t.value,i.value,s)}},P=(e,t,i,n,o,r,a,l,d)=>{const u=t.el=e?e.el:c(""),h=t.anchor=e?e.anchor:c("");let{patchFlag:g,dynamicChildren:p,slotScopeIds:f}=t;f&&(l=l?l.concat(f):f),null==e?(s(u,i,n),s(h,i,n),I(t.children||[],i,h,o,r,a,l,d)):g>0&&64&g&&p&&e.dynamicChildren?(A(e.dynamicChildren,p,i,o,r,a,l),(null!=t.key||o&&t===o.subTree)&&Wt(e,t,!0)):V(e,t,i,h,o,r,a,l,d)},M=(e,t,i,n,o,s,r,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?o.ctx.activate(t,i,n,r,l):F(t,i,n,o,s,r,l):B(e,t,l)},F=(e,t,i,n,o,s,r)=>{const a=e.component=Wi(e,n,o);if(ce(e)&&(a.ctx.renderer=J),Yi(a,!1,r),a.asyncDep){if(o&&o.registerDep(a,W,r),!e.el){const e=a.subTree=xi(ci);y(null,e,t,i)}}else W(a,e,t,i,o,s,r)},B=(e,t,i)=>{const n=t.component=e.component;if(ii(e,t,i)){if(n.asyncDep&&!n.asyncResolved)return void H(n,t,i);n.next=t,n.update()}else t.el=e.el,n.vnode=t},W=(e,t,i,s,r,a,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:i,u:n,parent:s,vnode:d}=e;{const i=Vt(e);if(i)return t&&(t.el=d.el,H(e,t,l)),void i.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,h=t;0,Ft(e,!1),t?(t.el=d.el,H(e,t,l)):t=d,i&&(0,o.DY)(i),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Mi(u,s,t,d),Ft(e,!0);const p=Jt(e);0;const f=e.subTree;e.subTree=p,_(f,p,g(f.el),Y(f),e,r,a),t.el=p.el,null===h&&oi(e,p.el),n&&At(n,r),(u=t.props&&t.props.onVnodeUpdated)&&At((()=>Mi(u,s,t,d)),r)}else{let n;const{el:l,props:c}=t,{bm:d,m:u,parent:h,root:g,type:p}=e,f=le(t);if(Ft(e,!1),d&&(0,o.DY)(d),!f&&(n=c&&c.onVnodeBeforeMount)&&Mi(n,h,t),Ft(e,!0),l&&te){const t=()=>{e.subTree=Jt(e),te(l,e.subTree,e,r,null)};f&&p.__asyncHydrate?p.__asyncHydrate(l,e,t):t()}else{g.ce&&g.ce._injectChildStyle(p);const n=e.subTree=Jt(e);0,_(null,n,i,s,e,r,a),t.el=n.el}if(u&&At(u,r),!f&&(n=c&&c.onVnodeMounted)){const e=t;At((()=>Mi(n,h,e)),r)}(256&t.shapeFlag||h&&le(h.vnode)&&256&h.vnode.shapeFlag)&&e.a&&At(e.a,r),e.isMounted=!0,t=i=s=null}};e.scope.on();const d=e.effect=new n.X2(c);e.scope.off();const u=e.update=d.run.bind(d),h=e.job=d.runIfDirty.bind(d);h.i=e,h.id=e.uid,d.scheduler=()=>v(h),Ft(e,!0),u()},H=(e,t,i)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,vt(e,t.props,o,i),Dt(e,t.children,i),(0,n.C4)(),w(e),(0,n.bl)()},V=(e,t,i,n,o,s,r,a,l=!1)=>{const c=e&&e.children,d=e?e.shapeFlag:0,u=t.children,{patchFlag:g,shapeFlag:p}=t;if(g>0){if(128&g)return void z(c,u,i,n,o,s,r,a,l);if(256&g)return void j(c,u,i,n,o,s,r,a,l)}8&p?(16&d&&Q(c,o,s),u!==c&&h(i,u)):16&d?16&p?z(c,u,i,n,o,s,r,a,l):Q(c,o,s,!0):(8&d&&h(i,""),16&p&&I(u,i,n,o,s,r,a,l))},j=(e,t,i,n,s,r,a,l,c)=>{e=e||o.Oj,t=t||o.Oj;const d=e.length,u=t.length,h=Math.min(d,u);let g;for(g=0;gu?Q(e,s,r,!0,!1,h):I(t,i,n,s,r,a,l,c,h)},z=(e,t,i,n,s,r,a,l,c)=>{let d=0;const u=t.length;let h=e.length-1,g=u-1;while(d<=h&&d<=g){const n=e[d],o=t[d]=c?Ai(t[d]):Ni(t[d]);if(!wi(n,o))break;_(n,o,i,null,s,r,a,l,c),d++}while(d<=h&&d<=g){const n=e[h],o=t[g]=c?Ai(t[g]):Ni(t[g]);if(!wi(n,o))break;_(n,o,i,null,s,r,a,l,c),h--,g--}if(d>h){if(d<=g){const e=g+1,o=eg)while(d<=h)$(e[d],s,r,!0),d++;else{const p=d,f=d,m=new Map;for(d=f;d<=g;d++){const e=t[d]=c?Ai(t[d]):Ni(t[d]);null!=e.key&&m.set(e.key,d)}let v,b=0;const y=g-f+1;let w=!1,C=0;const S=new Array(y);for(d=0;d=y){$(n,s,r,!0);continue}let o;if(null!=n.key)o=m.get(n.key);else for(v=f;v<=g;v++)if(0===S[v-f]&&wi(n,t[v])){o=v;break}void 0===o?$(n,s,r,!0):(S[o-f]=d+1,o>=C?C=o:w=!0,_(n,t[o],i,null,s,r,a,l,c),b++)}const k=w?Ht(S):o.Oj;for(v=k.length-1,d=y-1;d>=0;d--){const e=f+d,o=t[e],h=e+1{const{el:r,type:a,transition:l,children:c,shapeFlag:d}=e;if(6&d)return void U(e.component.subTree,t,i,n);if(128&d)return void e.suspense.move(t,i,n);if(64&d)return void a.move(e,t,i,J);if(a===ai){s(r,t,i);for(let e=0;el.enter(r)),o);else{const{leave:e,delayLeave:n,afterLeave:o}=l,a=()=>s(r,t,i),c=()=>{e(r,(()=>{a(),o&&o()}))};n?n(r,a,c):c()}else s(r,t,i)},$=(e,t,i,n=!1,o=!1)=>{const{type:s,props:r,ref:a,children:l,dynamicChildren:c,shapeFlag:d,patchFlag:u,dirs:h,cacheIndex:g}=e;if(-2===u&&(o=!1),null!=a&&ae(a,null,i,e,!0),null!=g&&(t.renderCache[g]=void 0),256&d)return void t.ctx.deactivate(e);const p=1&d&&h,f=!le(e);let m;if(f&&(m=r&&r.onVnodeBeforeUnmount)&&Mi(m,t,e),6&d)G(e.component,i,n);else{if(128&d)return void e.suspense.unmount(i,n);p&&R(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,i,J,n):c&&!c.hasOnce&&(s!==ai||u>0&&64&u)?Q(c,t,i,!1,!0):(s===ai&&384&u||!o&&16&d)&&Q(l,t,i),n&&q(e)}(f&&(m=r&&r.onVnodeUnmounted)||p)&&At((()=>{m&&Mi(m,t,e),p&&R(e,null,t,"unmounted")}),i)},q=e=>{const{type:t,el:i,anchor:n,transition:o}=e;if(t===ai)return void K(i,n);if(t===di)return void x(e);const s=()=>{r(i),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:n}=o,r=()=>t(i,s);n?n(e.el,s,r):r()}else s()},K=(e,t)=>{let i;while(e!==t)i=p(e),r(e),e=i;r(t)},G=(e,t,i)=>{const{bum:n,scope:s,job:r,subTree:a,um:l,m:c,a:d}=e;jt(c),jt(d),n&&(0,o.DY)(n),s.stop(),r&&(r.flags|=8,$(a,e,t,i)),l&&At(l,t),At((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,i,n=!1,o=!1,s=0)=>{for(let r=s;r{if(6&e.shapeFlag)return Y(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=p(e.anchor||e.el),i=t&&t[D];return i?p(i):t};let Z=!1;const X=(e,t,i)=>{null==e?t._vnode&&$(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,i),t._vnode=e,Z||(Z=!0,w(),C(),Z=!1)},J={p:_,um:$,m:U,r:q,mt:F,mc:I,pc:V,pbc:A,n:Y,o:e};let ee,te;return t&&([ee,te]=t(J)),{render:X,hydrate:ee,createApp:dt(X,ee)}}function Mt({type:e,props:t},i){return"svg"===i&&"foreignObject"===e||"mathml"===i&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function Ft({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Bt(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wt(e,t,i=!1){const n=e.children,s=t.children;if((0,o.cy)(n)&&(0,o.cy)(s))for(let o=0;o>1,e[i[a]]0&&(t[n]=i[s-1]),i[s]=n)}}s=i.length,r=i[s-1];while(s-- >0)i[s]=r,r=t[r];return i}function Vt(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Vt(t)}function jt(e){if(e)for(let t=0;t{{const e=gt(zt);return e}};function $t(e,t,i){return qt(e,t,i)}function qt(e,t,i=o.MZ){const{immediate:s,deep:a,flush:l,once:c}=i;const d=(0,o.X$)({},i);let u;if(Qi)if("sync"===l){const e=Ut();u=e.__watcherHandles||(e.__watcherHandles=[])}else{if(t&&!s){const e=()=>{};return e.stop=o.tE,e.resume=o.tE,e.pause=o.tE,e}d.once=!0}const h=Hi;d.call=(e,t,i)=>r(e,h,t,i);let g=!1;"post"===l?d.scheduler=e=>{At(e,h&&h.suspense)}:"sync"!==l&&(g=!0,d.scheduler=(e,t)=>{t?e():v(e)}),d.augmentJob=e=>{t&&(e.flags|=4),g&&(e.flags|=2,h&&(e.id=h.uid,e.i=h))};const p=(0,n.wB)(e,t,d);return u&&u.push(p),p}function Kt(e,t,i){const n=this.proxy,s=(0,o.Kg)(e)?e.includes(".")?Gt(n,e):()=>n[e]:e.bind(n,n);let r;(0,o.Tn)(t)?r=t:(r=t.handler,i=t);const a=Ui(this),l=qt(s,r.bind(n),i);return a(),l}function Gt(e,t){const i=t.split(".");return()=>{let t=e;for(let e=0;e"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${(0,o.PT)(t)}Modifiers`]||e[`${(0,o.Tg)(t)}Modifiers`];function Yt(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||o.MZ;let s=i;const a=t.startsWith("update:"),l=a&&Qt(n,t.slice(7));let c;l&&(l.trim&&(s=i.map((e=>(0,o.Kg)(e)?e.trim():e))),l.number&&(s=i.map(o.bB)));let d=n[c=(0,o.rU)(t)]||n[c=(0,o.rU)((0,o.PT)(t))];!d&&a&&(d=n[c=(0,o.rU)((0,o.Tg)(t))]),d&&r(d,e,6,s);const u=n[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,r(u,e,6,s)}}function Zt(e,t,i=!1){const n=t.emitsCache,s=n.get(e);if(void 0!==s)return s;const r=e.emits;let a={},l=!1;if(!(0,o.Tn)(e)){const n=e=>{const i=Zt(e,t,!0);i&&(l=!0,(0,o.X$)(a,i))};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}return r||l?((0,o.cy)(r)?r.forEach((e=>a[e]=null)):(0,o.X$)(a,r),(0,o.Gv)(e)&&n.set(e,a),a):((0,o.Gv)(e)&&n.set(e,null),null)}function Xt(e,t){return!(!e||!(0,o.Mp)(t))&&(t=t.slice(2).replace(/Once$/,""),(0,o.$3)(e,t[0].toLowerCase()+t.slice(1))||(0,o.$3)(e,(0,o.Tg)(t))||(0,o.$3)(e,t))}function Jt(e){const{type:t,vnode:i,proxy:n,withProxy:s,propsOptions:[r],slots:l,attrs:c,emit:d,render:u,renderCache:h,props:g,data:p,setupState:f,ctx:m,inheritAttrs:_}=e,v=L(e);let b,y;try{if(4&i.shapeFlag){const e=s||n,t=e;b=Ni(u.call(t,e,h,g,f,p,m)),y=c}else{const e=t;0,b=Ni(e.length>1?e(g,{attrs:c,slots:l,emit:d}):e(g,null)),y=t.props?c:ei(c)}}catch(C){ui.length=0,a(C,e,1),b=xi(ci)}let w=b;if(y&&!1!==_){const e=Object.keys(y),{shapeFlag:t}=w;e.length&&7&t&&(r&&e.some(o.CP)&&(y=ti(y,r)),w=Ti(w,y,!1,!0))}return i.dirs&&(w=Ti(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(i.dirs):i.dirs),i.transition&&ne(w,i.transition),b=w,L(v),b}const ei=e=>{let t;for(const i in e)("class"===i||"style"===i||(0,o.Mp)(i))&&((t||(t={}))[i]=e[i]);return t},ti=(e,t)=>{const i={};for(const n in e)(0,o.CP)(n)&&n.slice(9)in t||(i[n]=e[n]);return i};function ii(e,t,i){const{props:n,children:o,component:s}=e,{props:r,children:a,patchFlag:l}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(i&&l>=0))return!(!o&&!a||a&&a.$stable)||n!==r&&(n?!r||ni(n,r,c):!!r);if(1024&l)return!0;if(16&l)return n?ni(n,r,c):!!r;if(8&l){const e=t.dynamicProps;for(let t=0;te.__isSuspense;function ri(e,t){t&&t.pendingBranch?(0,o.cy)(e)?t.effects.push(...e):t.effects.push(e):y(e)}const ai=Symbol.for("v-fgt"),li=Symbol.for("v-txt"),ci=Symbol.for("v-cmt"),di=Symbol.for("v-stc"),ui=[];let hi=null;function gi(e=!1){ui.push(hi=e?null:[])}function pi(){ui.pop(),hi=ui[ui.length-1]||null}let fi=1;function mi(e){fi+=e,e<0&&hi&&(hi.hasOnce=!0)}function _i(e){return e.dynamicChildren=fi>0?hi||o.Oj:null,pi(),fi>0&&hi&&hi.push(e),e}function vi(e,t,i,n,o,s){return _i(ki(e,t,i,n,o,s,!0))}function bi(e,t,i,n,o){return _i(xi(e,t,i,n,o,!0))}function yi(e){return!!e&&!0===e.__v_isVNode}function wi(e,t){return e.type===t.type&&e.key===t.key}const Ci=({key:e})=>null!=e?e:null,Si=({ref:e,ref_key:t,ref_for:i})=>("number"===typeof e&&(e=""+e),null!=e?(0,o.Kg)(e)||(0,n.i9)(e)||(0,o.Tn)(e)?{i:x,r:e,k:t,f:!!i}:e:null);function ki(e,t=null,i=null,n=0,s=null,r=(e===ai?0:1),a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ci(t),ref:t&&Si(t),scopeId:E,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:x};return l?(Oi(c,i),128&r&&e.normalize(c)):i&&(c.shapeFlag|=(0,o.Kg)(i)?8:16),fi>0&&!a&&hi&&(c.patchFlag>0||6&r)&&32!==c.patchFlag&&hi.push(c),c}const xi=Ei;function Ei(e,t=null,i=null,s=0,r=null,a=!1){if(e&&e!==Oe||(e=ci),yi(e)){const n=Ti(e,t,!0);return i&&Oi(n,i),fi>0&&!a&&hi&&(6&n.shapeFlag?hi[hi.indexOf(e)]=n:hi.push(n)),n.patchFlag=-2,n}if(sn(e)&&(e=e.__vccOpts),t){t=Li(t);let{class:e,style:i}=t;e&&!(0,o.Kg)(e)&&(t.class=(0,o.C4)(e)),(0,o.Gv)(i)&&((0,n.ju)(i)&&!(0,o.cy)(i)&&(i=(0,o.X$)({},i)),t.style=(0,o.Tr)(i))}const l=(0,o.Kg)(e)?1:si(e)?128:N(e)?64:(0,o.Gv)(e)?4:(0,o.Tn)(e)?2:0;return ki(e,t,i,s,r,l,a,!0)}function Li(e){return e?(0,n.ju)(e)||mt(e)?(0,o.X$)({},e):e:null}function Ti(e,t,i=!1,n=!1){const{props:s,ref:r,patchFlag:a,children:l,transition:c}=e,d=t?Pi(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ci(d),ref:t&&t.ref?i&&r?(0,o.cy)(r)?r.concat(Si(t)):[r,Si(t)]:Si(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ai?-1===a?16:16|a:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ti(e.ssContent),ssFallback:e.ssFallback&&Ti(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&ne(u,c.clone(u)),u}function Ii(e=" ",t=0){return xi(li,null,e,t)}function Ri(e,t){const i=xi(di,null,e);return i.staticCount=t,i}function Di(e="",t=!1){return t?(gi(),bi(ci,null,e)):xi(ci,null,e)}function Ni(e){return null==e||"boolean"===typeof e?xi(ci):(0,o.cy)(e)?xi(ai,null,e.slice()):yi(e)?Ai(e):xi(li,null,String(e))}function Ai(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Ti(e)}function Oi(e,t){let i=0;const{shapeFlag:n}=e;if(null==t)t=null;else if((0,o.cy)(t))i=16;else if("object"===typeof t){if(65&n){const i=t.default;return void(i&&(i._c&&(i._d=!1),Oi(e,i()),i._c&&(i._d=!0)))}{i=32;const n=t._;n||mt(t)?3===n&&x&&(1===x.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=x}}else(0,o.Tn)(t)?(t={default:t,_ctx:x},i=32):(t=String(t),64&n?(i=16,t=[Ii(t)]):i=8);e.children=t,e.shapeFlag|=i}function Pi(...e){const t={};for(let i=0;iHi||x;let ji,zi;{const e=(0,o.We)(),t=(t,i)=>{let n;return(n=e[t])||(n=e[t]=[]),n.push(i),e=>{n.length>1?n.forEach((t=>t(e))):n[0](e)}};ji=t("__VUE_INSTANCE_SETTERS__",(e=>Hi=e)),zi=t("__VUE_SSR_SETTERS__",(e=>Qi=e))}const Ui=e=>{const t=Hi;return ji(e),e.scope.on(),()=>{e.scope.off(),ji(t)}},$i=()=>{Hi&&Hi.scope.off(),ji(null)};function qi(e){return 4&e.vnode.shapeFlag}let Ki,Gi,Qi=!1;function Yi(e,t=!1,i=!1){t&&zi(t);const{props:n,children:o}=e.vnode,s=qi(e);_t(e,n,s,t),Rt(e,o,i);const r=s?Zi(e,t):void 0;return t&&zi(!1),r}function Zi(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,$e);const{setup:r}=i;if(r){const i=e.setupContext=r.length>1?tn(e):null,l=Ui(e);(0,n.C4)();const c=s(r,e,0,[e.props,i]);if((0,n.bl)(),l(),(0,o.yL)(c)){if(le(e)||re(e),c.then($i,$i),t)return c.then((i=>{Xi(e,i,t)})).catch((t=>{a(t,e,0)}));e.asyncDep=c}else Xi(e,c,t)}else Ji(e,t)}function Xi(e,t,i){(0,o.Tn)(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:(0,o.Gv)(t)&&(e.setupState=(0,n.Pr)(t)),Ji(e,i)}function Ji(e,t,i){const s=e.type;if(!e.render){if(!t&&Ki&&!s.render){const t=s.template||Xe(e).template;if(t){0;const{isCustomElement:i,compilerOptions:n}=e.appContext.config,{delimiters:r,compilerOptions:a}=s,l=(0,o.X$)((0,o.X$)({isCustomElement:i,delimiters:r},n),a);s.render=Ki(t,l)}}e.render=s.render||o.tE,Gi&&Gi(e)}{const t=Ui(e);(0,n.C4)();try{Ge(e)}finally{(0,n.bl)(),t()}}}const en={get(e,t){return(0,n.u4)(e,"get",""),e[t]}};function tn(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,en),slots:e.slots,emit:e.emit,expose:t}}function nn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy((0,n.Pr)((0,n.IG)(e.exposed)),{get(t,i){return i in t?t[i]:i in ze?ze[i](e):void 0},has(e,t){return t in e||t in ze}})):e.proxy}function on(e,t=!0){return(0,o.Tn)(e)?e.displayName||e.name:e.name||t&&e.__name}function sn(e){return(0,o.Tn)(e)&&"__vccOpts"in e}const rn=(e,t)=>{const i=(0,n.EW)(e,t,Qi);return i};function an(e,t,i){const n=arguments.length;return 2===n?(0,o.Gv)(t)&&!(0,o.cy)(t)?yi(t)?xi(e,null,[t]):xi(e,t):xi(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):3===n&&yi(i)&&(i=[i]),xi(e,t,i))}const ln="3.5.11"},29104:(e,t,i)=>{"use strict";i.d(t,{D$:()=>ke,Ef:()=>Te,F:()=>_e,aG:()=>B,eB:()=>y});var n=i(61758),o=i(58790),s=i(38734); +**/let o,s;class r{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=o,!e&&o&&(this.index=(o.scopes||(o.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)return;if(h){let e=h;h=void 0;while(e){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;while(u){let t=u;u=void 0;while(t){const i=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(e)throw e}function _(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function v(e){let t,i=e.depsTail,n=i;while(n){const e=n.prevDep;-1===n.version?(n===i&&(i=e),w(n),C(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=e}e.deps=t,e.depsTail=i}function b(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(y(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function y(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===T)return;e.globalVersion=T;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!b(e))return void(e.flags&=-3);const i=s,o=S;s=e,S=!0;try{_(e);const i=e.fn(e._value);(0===t.version||(0,n.$H)(i,e._value))&&(e._value=i,t.version++)}catch(e){throw t.version++,e}finally{s=i,S=o,v(e),e.flags&=-3}}function w(e,t=!1){const{dep:i,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),i.subs===e&&(i.subs=n,!n&&i.computed)){i.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)w(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}function C(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let S=!0;const k=[];function x(){k.push(S),S=!1}function E(){const e=k.pop();S=void 0===e||e}function L(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=s;s=void 0;try{t()}finally{s=e}}}let T=0;class I{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class D{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!s||!S||s===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==s)t=this.activeLink=new I(s,this),s.deps?(t.prevDep=s.depsTail,s.depsTail.nextDep=t,s.depsTail=t):s.deps=s.depsTail=t,R(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=s.depsTail,t.nextDep=void 0,s.depsTail.nextDep=t,s.depsTail=t,s.deps===t&&(s.deps=e)}return t}trigger(e){this.version++,T++,this.notify(e)}notify(e){f();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{m()}}}function R(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)R(e)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),e.dep.subs=e}}const N=new WeakMap,A=Symbol(""),O=Symbol(""),P=Symbol("");function M(e,t,i){if(S&&s){let t=N.get(e);t||N.set(e,t=new Map);let n=t.get(i);n||(t.set(i,n=new D),n.map=t,n.key=i),n.track()}}function F(e,t,i,o,s,r){const a=N.get(e);if(!a)return void T++;const l=e=>{e&&e.trigger()};if(f(),"clear"===t)a.forEach(l);else{const s=(0,n.cy)(e),r=s&&(0,n.yI)(i);if(s&&"length"===i){const e=Number(o);a.forEach(((t,i)=>{("length"===i||i===P||!(0,n.Bm)(i)&&i>=e)&&l(t)}))}else switch((void 0!==i||a.has(void 0))&&l(a.get(i)),r&&l(a.get(P)),t){case"add":s?r&&l(a.get("length")):(l(a.get(A)),(0,n.CE)(e)&&l(a.get(O)));break;case"delete":s||(l(a.get(A)),(0,n.CE)(e)&&l(a.get(O)));break;case"set":(0,n.CE)(e)&&l(a.get(A));break}}m()}function B(e){const t=xe(e);return t===e?t:(M(t,"iterate",P),Se(e)?t:t.map(Le))}function W(e){return M(e=xe(e),"iterate",P),e}const H={__proto__:null,[Symbol.iterator](){return V(this,Symbol.iterator,Le)},concat(...e){return B(this).concat(...e.map((e=>(0,n.cy)(e)?B(e):e)))},entries(){return V(this,"entries",(e=>(e[1]=Le(e[1]),e)))},every(e,t){return z(this,"every",e,t,void 0,arguments)},filter(e,t){return z(this,"filter",e,t,(e=>e.map(Le)),arguments)},find(e,t){return z(this,"find",e,t,Le,arguments)},findIndex(e,t){return z(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return z(this,"findLast",e,t,Le,arguments)},findLastIndex(e,t){return z(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return z(this,"forEach",e,t,void 0,arguments)},includes(...e){return $(this,"includes",e)},indexOf(...e){return $(this,"indexOf",e)},join(e){return B(this).join(e)},lastIndexOf(...e){return $(this,"lastIndexOf",e)},map(e,t){return z(this,"map",e,t,void 0,arguments)},pop(){return q(this,"pop")},push(...e){return q(this,"push",e)},reduce(e,...t){return U(this,"reduce",e,t)},reduceRight(e,...t){return U(this,"reduceRight",e,t)},shift(){return q(this,"shift")},some(e,t){return z(this,"some",e,t,void 0,arguments)},splice(...e){return q(this,"splice",e)},toReversed(){return B(this).toReversed()},toSorted(e){return B(this).toSorted(e)},toSpliced(...e){return B(this).toSpliced(...e)},unshift(...e){return q(this,"unshift",e)},values(){return V(this,"values",Le)}};function V(e,t,i){const n=W(e),o=n[t]();return n===e||Se(e)||(o._next=o.next,o.next=()=>{const e=o._next();return e.value&&(e.value=i(e.value)),e}),o}const j=Array.prototype;function z(e,t,i,n,o,s){const r=W(e),a=r!==e&&!Se(e),l=r[t];if(l!==j[t]){const t=l.apply(e,s);return a?Le(t):t}let c=i;r!==e&&(a?c=function(t,n){return i.call(this,Le(t),n,e)}:i.length>2&&(c=function(t,n){return i.call(this,t,n,e)}));const d=l.call(r,c,n);return a&&o?o(d):d}function U(e,t,i,n){const o=W(e);let s=i;return o!==e&&(Se(e)?i.length>3&&(s=function(t,n,o){return i.call(this,t,n,o,e)}):s=function(t,n,o){return i.call(this,t,Le(n),o,e)}),o[t](s,...n)}function $(e,t,i){const n=xe(e);M(n,"iterate",P);const o=n[t](...i);return-1!==o&&!1!==o||!ke(i[0])?o:(i[0]=xe(i[0]),n[t](...i))}function q(e,t,i=[]){x(),f();const n=xe(e)[t].apply(e,i);return m(),E(),n}const K=(0,n.pD)("__proto__,__v_isRef,__isVue"),G=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(n.Bm));function Q(e){(0,n.Bm)(e)||(e=String(e));const t=xe(this);return M(t,"has",e),t.hasOwnProperty(e)}class Y{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){const o=this._isReadonly,s=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return s;if("__v_raw"===t)return i===(o?s?pe:ge:s?he:ue).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const r=(0,n.cy)(e);if(!o){let e;if(r&&(e=H[t]))return e;if("hasOwnProperty"===t)return Q}const a=Reflect.get(e,t,Ie(e)?e:i);return((0,n.Bm)(t)?G.has(t):K(t))?a:(o||M(e,"get",t),s?a:Ie(a)?r&&(0,n.yI)(t)?a:a.value:(0,n.Gv)(a)?o?be(a):_e(a):a)}}class Z extends Y{constructor(e=!1){super(!1,e)}set(e,t,i,o){let s=e[t];if(!this._isShallow){const t=Ce(s);if(Se(i)||Ce(i)||(s=xe(s),i=xe(i)),!(0,n.cy)(e)&&Ie(s)&&!Ie(i))return!t&&(s.value=i,!0)}const r=(0,n.cy)(e)&&(0,n.yI)(t)?Number(t)e,ne=e=>Reflect.getPrototypeOf(e);function oe(e,t,i){return function(...o){const s=this["__v_raw"],r=xe(s),a=(0,n.CE)(r),l="entries"===e||e===Symbol.iterator&&a,c="keys"===e&&a,d=s[e](...o),u=i?ie:t?Te:Le;return!t&&M(r,"iterate",c?O:A),{next(){const{value:e,done:t}=d.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function se(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function re(e,t){const i={get(i){const o=this["__v_raw"],s=xe(o),r=xe(i);e||((0,n.$H)(i,r)&&M(s,"get",i),M(s,"get",r));const{has:a}=ne(s),l=t?ie:e?Te:Le;return a.call(s,i)?l(o.get(i)):a.call(s,r)?l(o.get(r)):void(o!==s&&o.get(i))},get size(){const t=this["__v_raw"];return!e&&M(xe(t),"iterate",A),Reflect.get(t,"size",t)},has(t){const i=this["__v_raw"],o=xe(i),s=xe(t);return e||((0,n.$H)(t,s)&&M(o,"has",t),M(o,"has",s)),t===s?i.has(t):i.has(t)||i.has(s)},forEach(i,n){const o=this,s=o["__v_raw"],r=xe(s),a=t?ie:e?Te:Le;return!e&&M(r,"iterate",A),s.forEach(((e,t)=>i.call(n,a(e),a(t),o)))}};(0,n.X$)(i,e?{add:se("add"),set:se("set"),delete:se("delete"),clear:se("clear")}:{add(e){t||Se(e)||Ce(e)||(e=xe(e));const i=xe(this),n=ne(i),o=n.has.call(i,e);return o||(i.add(e),F(i,"add",e,e)),this},set(e,i){t||Se(i)||Ce(i)||(i=xe(i));const o=xe(this),{has:s,get:r}=ne(o);let a=s.call(o,e);a||(e=xe(e),a=s.call(o,e));const l=r.call(o,e);return o.set(e,i),a?(0,n.$H)(i,l)&&F(o,"set",e,i,l):F(o,"add",e,i),this},delete(e){const t=xe(this),{has:i,get:n}=ne(t);let o=i.call(t,e);o||(e=xe(e),o=i.call(t,e));const s=n?n.call(t,e):void 0,r=t.delete(e);return o&&F(t,"delete",e,void 0,s),r},clear(){const e=xe(this),t=0!==e.size,i=void 0,n=e.clear();return t&&F(e,"clear",void 0,void 0,i),n}});const o=["keys","values","entries",Symbol.iterator];return o.forEach((n=>{i[n]=oe(n,e,t)})),i}function ae(e,t){const i=re(e,t);return(t,o,s)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get((0,n.$3)(i,o)&&o in t?i:t,o,s)}const le={get:ae(!1,!1)},ce={get:ae(!1,!0)},de={get:ae(!0,!1)};const ue=new WeakMap,he=new WeakMap,ge=new WeakMap,pe=new WeakMap;function fe(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function me(e){return e["__v_skip"]||!Object.isExtensible(e)?0:fe((0,n.Zf)(e))}function _e(e){return Ce(e)?e:ye(e,!1,J,le,ue)}function ve(e){return ye(e,!1,te,ce,he)}function be(e){return ye(e,!0,ee,de,ge)}function ye(e,t,i,o,s){if(!(0,n.Gv)(e))return e;if(e["__v_raw"]&&(!t||!e["__v_isReactive"]))return e;const r=s.get(e);if(r)return r;const a=me(e);if(0===a)return e;const l=new Proxy(e,2===a?o:i);return s.set(e,l),l}function we(e){return Ce(e)?we(e["__v_raw"]):!(!e||!e["__v_isReactive"])}function Ce(e){return!(!e||!e["__v_isReadonly"])}function Se(e){return!(!e||!e["__v_isShallow"])}function ke(e){return!!e&&!!e["__v_raw"]}function xe(e){const t=e&&e["__v_raw"];return t?xe(t):e}function Ee(e){return!(0,n.$3)(e,"__v_skip")&&Object.isExtensible(e)&&(0,n.yQ)(e,"__v_skip",!0),e}const Le=e=>(0,n.Gv)(e)?_e(e):e,Te=e=>(0,n.Gv)(e)?be(e):e;function Ie(e){return!!e&&!0===e["__v_isRef"]}function De(e){return Ne(e,!1)}function Re(e){return Ne(e,!0)}function Ne(e,t){return Ie(e)?e:new Ae(e,t)}class Ae{constructor(e,t){this.dep=new D,this["__v_isRef"]=!0,this["__v_isShallow"]=!1,this._rawValue=t?e:xe(e),this._value=t?e:Le(e),this["__v_isShallow"]=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this["__v_isShallow"]||Se(e)||Ce(e);e=i?e:xe(e),(0,n.$H)(e,t)&&(this._rawValue=e,this._value=i?e:Le(e),this.dep.trigger())}}function Oe(e){return Ie(e)?e.value:e}const Pe={get:(e,t,i)=>"__v_raw"===t?e:Oe(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const o=e[t];return Ie(o)&&!Ie(i)?(o.value=i,!0):Reflect.set(e,t,i,n)}};function Me(e){return we(e)?e:new Proxy(e,Pe)}class Fe{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new D(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=T-1,this.next=void 0,this.effect=this,this["__v_isReadonly"]=!t,this.isSSR=i}notify(){if(this.flags|=16,!(8&this.flags||s===this))return p(this,!0),!0}get value(){const e=this.dep.track();return y(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Be(e,t,i=!1){let o,s;(0,n.Tn)(e)?o=e:(o=e.get,s=e.set);const r=new Fe(o,s,i);return r}const We={},He=new WeakMap;let Ve;function je(e,t=!1,i=Ve){if(i){let t=He.get(i);t||He.set(i,t=[]),t.push(e)}else 0}function ze(e,t,i=n.MZ){const{immediate:o,deep:s,once:r,scheduler:a,augmentJob:c,call:u}=i,h=e=>s?e:Se(e)||!1===s||0===s?Ue(e,1):Ue(e);let g,p,f,m,_=!1,v=!1;if(Ie(e)?(p=()=>e.value,_=Se(e)):we(e)?(p=()=>h(e),_=!0):(0,n.cy)(e)?(v=!0,_=e.some((e=>we(e)||Se(e))),p=()=>e.map((e=>Ie(e)?e.value:we(e)?h(e):(0,n.Tn)(e)?u?u(e,2):e():void 0))):p=(0,n.Tn)(e)?t?u?()=>u(e,2):e:()=>{if(f){x();try{f()}finally{E()}}const t=Ve;Ve=g;try{return u?u(e,3,[m]):e(m)}finally{Ve=t}}:n.tE,t&&s){const e=p,t=!0===s?1/0:s;p=()=>Ue(e(),t)}const b=l(),y=()=>{g.stop(),b&&(0,n.TF)(b.effects,g)};if(r&&t){const e=t;t=(...t)=>{e(...t),y()}}let w=v?new Array(e.length).fill(We):We;const C=e=>{if(1&g.flags&&(g.dirty||e))if(t){const e=g.run();if(s||_||(v?e.some(((e,t)=>(0,n.$H)(e,w[t]))):(0,n.$H)(e,w))){f&&f();const i=Ve;Ve=g;try{const i=[e,w===We?void 0:v&&w[0]===We?[]:w,m];u?u(t,3,i):t(...i),w=e}finally{Ve=i}}}else g.run()};return c&&c(C),g=new d(p),g.scheduler=a?()=>a(C,!1):C,m=e=>je(e,!1,g),f=g.onStop=()=>{const e=He.get(g);if(e){if(u)u(e,4);else for(const t of e)t();He.delete(g)}},t?o?C(!0):w=g.run():a?a(C.bind(null,!0),!0):g.run(),y.pause=g.pause.bind(g),y.resume=g.resume.bind(g),y.stop=y,y}function Ue(e,t=1/0,i){if(t<=0||!(0,n.Gv)(e)||e["__v_skip"])return e;if(i=i||new Set,i.has(e))return e;if(i.add(e),t--,Ie(e))Ue(e.value,t,i);else if((0,n.cy)(e))for(let n=0;n{Ue(e,t,i)}));else if((0,n.Qd)(e)){for(const n in e)Ue(e[n],t,i);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Ue(e[n],t,i)}return e}},61758:(e,t,i)=>{"use strict";i.d(t,{$u:()=>ke,CE:()=>vi,Df:()=>oe,EW:()=>rn,FK:()=>ai,Fv:()=>Di,Gt:()=>ht,Gy:()=>q,Ic:()=>Se,Im:()=>V,K9:()=>Ot,KC:()=>we,Lk:()=>ki,MZ:()=>ne,Ng:()=>Li,OW:()=>ee,PR:()=>ue,Q3:()=>Ri,QP:()=>G,RG:()=>He,WQ:()=>gt,Wv:()=>bi,Y4:()=>pe,bF:()=>xi,bo:()=>I,dY:()=>m,eW:()=>Ii,eX:()=>We,g2:()=>Ae,gN:()=>Pe,h:()=>an,hi:()=>Ee,k6:()=>T,n:()=>ge,nI:()=>Vi,pI:()=>Be,pM:()=>se,pR:()=>X,qL:()=>r,rE:()=>ln,sV:()=>Ce,uX:()=>gi,v6:()=>Pi,wB:()=>$t,xo:()=>xe});var n=i(38734),o=i(58790);function s(e,t,i,n){try{return n?e(...n):e()}catch(e){a(e,t,i)}}function r(e,t,i,n){if((0,o.Tn)(e)){const r=s(e,t,i,n);return r&&(0,o.yL)(r)&&r.catch((e=>{a(e,t,i)})),r}if((0,o.cy)(e)){const o=[];for(let s=0;s>>1,o=c[n],s=S(o);s=S(i)?c.push(e):c.splice(_(t),0,e),e.flags|=1,b()}}function b(){f||(f=p.then(k))}function y(e){(0,o.cy)(e)?u.push(...e):h&&-1===e.id?h.splice(g+1,0,e):1&e.flags||(u.push(e),e.flags|=1),b()}function w(e,t,i=d+1){for(0;iS(e)-S(t)));if(u.length=0,h)return void h.push(...e);for(h=e,g=0;gnull==e.id?2&e.flags?-1:1/0:e.id;function k(e){o.tE;try{for(d=0;d{n._d&&mi(-1);const o=L(t);let s;try{s=e(...i)}finally{L(o),n._d&&mi(1)}return s};return n._n=!0,n._c=!0,n._d=!0,n}function I(e,t){if(null===x)return e;const i=nn(x),s=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,A=e=>e&&(e.disabled||""===e.disabled),O=e=>e&&(e.defer||""===e.defer),P=e=>"undefined"!==typeof SVGElement&&e instanceof SVGElement,M=e=>"function"===typeof MathMLElement&&e instanceof MathMLElement,F=(e,t)=>{const i=e&&e.to;if((0,o.Kg)(i)){if(t){const e=t(i);return e}return null}return i},B={name:"Teleport",__isTeleport:!0,process(e,t,i,n,o,s,r,a,l,c){const{mc:d,pc:u,pbc:h,o:{insert:g,querySelector:p,createText:f,createComment:m}}=c,_=A(t.props);let{shapeFlag:v,children:b,dynamicChildren:y}=t;if(null==e){const e=t.el=f(""),c=t.anchor=f("");g(e,i,n),g(c,i,n);const u=(e,t)=>{16&v&&(o&&o.isCE&&(o.ce._teleportTarget=e),d(b,e,t,o,s,r,a,l))},h=()=>{const e=t.target=F(t.props,p),i=z(e,t,f,g);e&&("svg"!==r&&P(e)?r="svg":"mathml"!==r&&M(e)&&(r="mathml"),_||(u(e,i),j(t,!1)))};_&&(u(i,c),j(t,!0)),O(t.props)?At(h,s):h()}else{t.el=e.el,t.targetStart=e.targetStart;const n=t.anchor=e.anchor,d=t.target=e.target,g=t.targetAnchor=e.targetAnchor,f=A(e.props),m=f?i:d,v=f?n:g;if("svg"===r||P(d)?r="svg":("mathml"===r||M(d))&&(r="mathml"),y?(h(e.dynamicChildren,y,m,o,s,r,a),Wt(e,t,!0)):l||u(e,t,m,v,o,s,r,a,!1),_)f?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):W(t,i,n,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=F(t.props,p);e&&W(t,e,null,c,0)}else f&&W(t,d,g,c,1);j(t,_)}},remove(e,t,i,{um:n,o:{remove:o}},s){const{shapeFlag:r,children:a,anchor:l,targetStart:c,targetAnchor:d,target:u,props:h}=e;if(u&&(o(c),o(d)),s&&o(l),16&r){const e=s||!A(h);for(let o=0;o{e.isMounted=!0})),xe((()=>{e.isUnmounting=!0})),e}const K=[Function,Array],G={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:K,onEnter:K,onAfterEnter:K,onEnterCancelled:K,onBeforeLeave:K,onLeave:K,onAfterLeave:K,onLeaveCancelled:K,onBeforeAppear:K,onAppear:K,onAfterAppear:K,onAppearCancelled:K},Q=e=>{const t=e.subTree;return t.component?Q(t.component):t},Y={name:"BaseTransition",props:G,setup(e,{slots:t}){const i=Vi(),o=q();return()=>{const s=t.default&&oe(t.default(),!0);if(!s||!s.length)return;const r=Z(s),a=(0,n.ux)(e),{mode:l}=a;if(o.isLeaving)return te(r);const c=ie(r);if(!c)return te(r);let d=ee(c,a,o,i,(e=>d=e));c.type!==ci&&ne(c,d);const u=i.subTree,h=u&&ie(u);if(h&&h.type!==ci&&!wi(c,h)&&Q(i).type!==ci){const e=ee(h,a,o,i);if(ne(h,e),"out-in"===l&&c.type!==ci)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,8&i.job.flags||i.update(),delete e.afterLeave},te(r);"in-out"===l&&c.type!==ci&&(e.delayLeave=(e,t,i)=>{const n=J(o,h);n[String(h.key)]=h,e[U]=()=>{t(),e[U]=void 0,delete d.delayedLeave},d.delayedLeave=i})}return r}}};function Z(e){let t=e[0];if(e.length>1){let i=!1;for(const n of e)if(n.type!==ci){0,t=n,i=!0;break}}return t}const X=Y;function J(e,t){const{leavingVNodes:i}=e;let n=i.get(t.type);return n||(n=Object.create(null),i.set(t.type,n)),n}function ee(e,t,i,n,s){const{appear:a,mode:l,persisted:c=!1,onBeforeEnter:d,onEnter:u,onAfterEnter:h,onEnterCancelled:g,onBeforeLeave:p,onLeave:f,onAfterLeave:m,onLeaveCancelled:_,onBeforeAppear:v,onAppear:b,onAfterAppear:y,onAppearCancelled:w}=t,C=String(e.key),S=J(i,e),k=(e,t)=>{e&&r(e,n,9,t)},x=(e,t)=>{const i=t[1];k(e,t),(0,o.cy)(e)?e.every((e=>e.length<=1))&&i():e.length<=1&&i()},E={mode:l,persisted:c,beforeEnter(t){let n=d;if(!i.isMounted){if(!a)return;n=v||d}t[U]&&t[U](!0);const o=S[C];o&&wi(e,o)&&o.el[U]&&o.el[U](),k(n,[t])},enter(e){let t=u,n=h,o=g;if(!i.isMounted){if(!a)return;t=b||u,n=y||h,o=w||g}let s=!1;const r=e[$]=t=>{s||(s=!0,k(t?o:n,[e]),E.delayedLeave&&E.delayedLeave(),e[$]=void 0)};t?x(t,[e,r]):r()},leave(t,n){const o=String(e.key);if(t[$]&&t[$](!0),i.isUnmounting)return n();k(p,[t]);let s=!1;const r=t[U]=i=>{s||(s=!0,n(),k(i?_:m,[t]),t[U]=void 0,S[o]===e&&delete S[o])};S[o]=e,f?x(f,[t,r]):r()},clone(e){const o=ee(e,t,i,n,s);return s&&s(o),o}};return E}function te(e){if(ce(e))return e=Ti(e),e.children=null,e}function ie(e){if(!ce(e))return N(e.type)&&e.children?Z(e.children):e;const{shapeFlag:t,children:i}=e;if(i){if(16&t)return i[0];if(32&t&&(0,o.Tn)(i.default))return i.default()}}function ne(e,t){6&e.shapeFlag&&e.component?(e.transition=t,ne(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oe(e,t=!1,i){let n=[],o=0;for(let s=0;s1)for(let e=0;e(0,o.X$)({name:e.name},t,{setup:e}))():e}function re(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ae(e,t,i,r,a=!1){if((0,o.cy)(e))return void e.forEach(((e,n)=>ae(e,t&&((0,o.cy)(t)?t[n]:t),i,r,a)));if(le(r)&&!a)return;const l=4&r.shapeFlag?nn(r.component):r.el,c=a?null:l,{i:d,r:u}=e;const h=t&&t.r,g=d.refs===o.MZ?d.refs={}:d.refs,p=d.setupState,f=(0,n.ux)(p),m=p===o.MZ?()=>!1:e=>(0,o.$3)(f,e);if(null!=h&&h!==u&&((0,o.Kg)(h)?(g[h]=null,m(h)&&(p[h]=null)):(0,n.i9)(h)&&(h.value=null)),(0,o.Tn)(u))s(u,d,12,[c,g]);else{const t=(0,o.Kg)(u),s=(0,n.i9)(u);if(t||s){const n=()=>{if(e.f){const i=t?m(u)?p[u]:g[u]:u.value;a?(0,o.cy)(i)&&(0,o.TF)(i,l):(0,o.cy)(i)?i.includes(l)||i.push(l):t?(g[u]=[l],m(u)&&(p[u]=g[u])):(u.value=[l],e.k&&(g[e.k]=u.value))}else t?(g[u]=c,m(u)&&(p[u]=c)):s&&(u.value=c,e.k&&(g[e.k]=c))};c?(n.id=-1,At(n,i)):n()}else 0}}(0,o.We)().requestIdleCallback,(0,o.We)().cancelIdleCallback;const le=e=>!!e.type.__asyncLoader +/*! #__NO_SIDE_EFFECTS__ */;const ce=e=>e.type.__isKeepAlive,de={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const i=Vi(),n=i.ctx;if(!n.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const s=new Map,r=new Set;let a=null;const l=i.suspense,{renderer:{p:c,m:d,um:u,o:{createElement:h}}}=n,g=h("div");function p(e){_e(e),u(e,i,l,!0)}function f(e){s.forEach(((t,i)=>{const n=on(t.type);n&&!e(n)&&m(i)}))}function m(e){const t=s.get(e);!t||a&&wi(t,a)?a&&_e(a):p(t),s.delete(e),r.delete(e)}n.activate=(e,t,i,n,s)=>{const r=e.component;d(e,t,i,0,l),c(r.vnode,e,t,i,r,l,n,e.slotScopeIds,s),At((()=>{r.isDeactivated=!1,r.a&&(0,o.DY)(r.a);const t=e.props&&e.props.onVnodeMounted;t&&Mi(t,r.parent,e)}),l)},n.deactivate=e=>{const t=e.component;jt(t.m),jt(t.a),d(e,g,null,1,l),At((()=>{t.da&&(0,o.DY)(t.da);const i=e.props&&e.props.onVnodeUnmounted;i&&Mi(i,t.parent,e),t.isDeactivated=!0}),l)},$t((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>he(e,t))),t&&f((e=>!he(t,e)))}),{flush:"post",deep:!0});let _=null;const v=()=>{null!=_&&(si(i.subTree.type)?At((()=>{s.set(_,ve(i.subTree))}),i.subTree.suspense):s.set(_,ve(i.subTree)))};return Ce(v),ke(v),xe((()=>{s.forEach((e=>{const{subTree:t,suspense:n}=i,o=ve(t);if(e.type!==o.type||e.key!==o.key)p(e);else{_e(o);const e=o.component.da;e&&At(e,n)}}))})),()=>{if(_=null,!t.default)return a=null;const i=t.default(),n=i[0];if(i.length>1)return a=null,i;if(!yi(n)||!(4&n.shapeFlag)&&!(128&n.shapeFlag))return a=null,n;let o=ve(n);if(o.type===ci)return a=null,o;const l=o.type,c=on(le(o)?o.type.__asyncResolved||{}:l),{include:d,exclude:u,max:h}=e;if(d&&(!c||!he(d,c))||u&&c&&he(u,c))return o.shapeFlag&=-257,a=o,n;const g=null==o.key?l:o.key,p=s.get(g);return o.el&&(o=Ti(o),128&n.shapeFlag&&(n.ssContent=o)),_=g,p?(o.el=p.el,o.component=p.component,o.transition&&ne(o,o.transition),o.shapeFlag|=512,r.delete(g),r.add(g)):(r.add(g),h&&r.size>parseInt(h,10)&&m(r.values().next().value)),o.shapeFlag|=256,a=o,si(n.type)?n:o}}},ue=de;function he(e,t){return(0,o.cy)(e)?e.some((e=>he(e,t))):(0,o.Kg)(e)?e.split(",").includes(t):!!(0,o.gd)(e)&&(e.lastIndex=0,e.test(t))}function ge(e,t){fe(e,"a",t)}function pe(e,t){fe(e,"da",t)}function fe(e,t,i=Hi){const n=e.__wdc||(e.__wdc=()=>{let t=i;while(t){if(t.isDeactivated)return;t=t.parent}return e()});if(be(t,n,i),i){let e=i.parent;while(e&&e.parent)ce(e.parent.vnode)&&me(n,t,i,e),e=e.parent}}function me(e,t,i,n){const s=be(t,e,n,!0);Ee((()=>{(0,o.TF)(n[t],s)}),i)}function _e(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ve(e){return 128&e.shapeFlag?e.ssContent:e}function be(e,t,i=Hi,o=!1){if(i){const s=i[e]||(i[e]=[]),a=t.__weh||(t.__weh=(...o)=>{(0,n.C4)();const s=Ui(i),a=r(t,i,e,o);return s(),(0,n.bl)(),a});return o?s.unshift(a):s.push(a),a}}const ye=e=>(t,i=Hi)=>{Qi&&"sp"!==e||be(e,((...e)=>t(...e)),i)},we=ye("bm"),Ce=ye("m"),Se=ye("bu"),ke=ye("u"),xe=ye("bum"),Ee=ye("um"),Le=ye("sp"),Te=ye("rtg"),Ie=ye("rtc");function De(e,t=Hi){be("ec",e,t)}const Re="components",Ne="directives";function Ae(e,t){return Me(Re,e,!0,t)||e}const Oe=Symbol.for("v-ndc");function Pe(e){return Me(Ne,e)}function Me(e,t,i=!0,n=!1){const s=x||Hi;if(s){const i=s.type;if(e===Re){const e=on(i,!1);if(e&&(e===t||e===(0,o.PT)(t)||e===(0,o.ZH)((0,o.PT)(t))))return i}const r=Fe(s[e]||i[e],t)||Fe(s.appContext[e],t);return!r&&n?i:r}}function Fe(e,t){return e&&(e[t]||e[(0,o.PT)(t)]||e[(0,o.ZH)((0,o.PT)(t))])}function Be(e,t,i,s){let r;const a=i&&i[s],l=(0,o.cy)(e);if(l||(0,o.Kg)(e)){const i=l&&(0,n.g8)(e);let o=!1;i&&(o=!(0,n.fE)(e),e=(0,n.qA)(e)),r=new Array(e.length);for(let i=0,s=e.length;it(e,i,void 0,a&&a[i])));else{const i=Object.keys(e);r=new Array(i.length);for(let n=0,o=i.length;n{const t=n.fn(...e);return t&&(t.key=n.key),t}:n.fn)}return e}function He(e,t,i={},n,s){if(x.ce||x.parent&&le(x.parent)&&x.parent.ce)return"default"!==t&&(i.name=t),gi(),bi(ai,null,[xi("slot",i,n&&n())],64);let r=e[t];r&&r._c&&(r._d=!1),gi();const a=r&&Ve(r(i)),l=i.key||a&&a.key,c=bi(ai,{key:(l&&!(0,o.Bm)(l)?l:`_${t}`)+(!a&&n?"_fb":"")},a||(n?n():[]),a&&1===e._?64:-2);return!s&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),r&&r._c&&(r._d=!0),c}function Ve(e){return e.some((e=>!yi(e)||e.type!==ci&&!(e.type===ai&&!Ve(e.children))))?e:null}const je=e=>e?qi(e)?nn(e):je(e.parent):null,ze=(0,o.X$)(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>je(e.parent),$root:e=>je(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xe(e),$forceUpdate:e=>e.f||(e.f=()=>{v(e.update)}),$nextTick:e=>e.n||(e.n=m.bind(e.proxy)),$watch:e=>Kt.bind(e)}),Ue=(e,t)=>e!==o.MZ&&!e.__isScriptSetup&&(0,o.$3)(e,t),$e={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:i,setupState:s,data:r,props:a,accessCache:l,type:c,appContext:d}=e;let u;if("$"!==t[0]){const n=l[t];if(void 0!==n)switch(n){case 1:return s[t];case 2:return r[t];case 4:return i[t];case 3:return a[t]}else{if(Ue(s,t))return l[t]=1,s[t];if(r!==o.MZ&&(0,o.$3)(r,t))return l[t]=2,r[t];if((u=e.propsOptions[0])&&(0,o.$3)(u,t))return l[t]=3,a[t];if(i!==o.MZ&&(0,o.$3)(i,t))return l[t]=4,i[t];Ke&&(l[t]=0)}}const h=ze[t];let g,p;return h?("$attrs"===t&&(0,n.u4)(e.attrs,"get",""),h(e)):(g=c.__cssModules)&&(g=g[t])?g:i!==o.MZ&&(0,o.$3)(i,t)?(l[t]=4,i[t]):(p=d.config.globalProperties,(0,o.$3)(p,t)?p[t]:void 0)},set({_:e},t,i){const{data:n,setupState:s,ctx:r}=e;return Ue(s,t)?(s[t]=i,!0):n!==o.MZ&&(0,o.$3)(n,t)?(n[t]=i,!0):!(0,o.$3)(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(r[t]=i,!0))},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:s,propsOptions:r}},a){let l;return!!i[a]||e!==o.MZ&&(0,o.$3)(e,a)||Ue(t,a)||(l=r[0])&&(0,o.$3)(l,a)||(0,o.$3)(n,a)||(0,o.$3)(ze,a)||(0,o.$3)(s.config.globalProperties,a)},defineProperty(e,t,i){return null!=i.get?e._.accessCache[t]=0:(0,o.$3)(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};function qe(e){return(0,o.cy)(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Ke=!0;function Ge(e){const t=Xe(e),i=e.proxy,s=e.ctx;Ke=!1,t.beforeCreate&&Ye(t.beforeCreate,e,"bc");const{data:r,computed:a,methods:l,watch:c,provide:d,inject:u,created:h,beforeMount:g,mounted:p,beforeUpdate:f,updated:m,activated:_,deactivated:v,beforeDestroy:b,beforeUnmount:y,destroyed:w,unmounted:C,render:S,renderTracked:k,renderTriggered:x,errorCaptured:E,serverPrefetch:L,expose:T,inheritAttrs:I,components:D,directives:R,filters:N}=t,A=null;if(u&&Qe(u,s,A),l)for(const e in l){const t=l[e];(0,o.Tn)(t)&&(s[e]=t.bind(i))}if(r){0;const t=r.call(i,i);0,(0,o.Gv)(t)&&(e.data=(0,n.Kh)(t))}if(Ke=!0,a)for(const e in a){const t=a[e],n=(0,o.Tn)(t)?t.bind(i,i):(0,o.Tn)(t.get)?t.get.bind(i,i):o.tE;0;const r=!(0,o.Tn)(t)&&(0,o.Tn)(t.set)?t.set.bind(i):o.tE,l=rn({get:n,set:r});Object.defineProperty(s,e,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const e in c)Ze(c[e],s,i,e);if(d){const e=(0,o.Tn)(d)?d.call(i):d;Reflect.ownKeys(e).forEach((t=>{ht(t,e[t])}))}function O(e,t){(0,o.cy)(t)?t.forEach((t=>e(t.bind(i)))):t&&e(t.bind(i))}if(h&&Ye(h,e,"c"),O(we,g),O(Ce,p),O(Se,f),O(ke,m),O(ge,_),O(pe,v),O(De,E),O(Ie,k),O(Te,x),O(xe,y),O(Ee,C),O(Le,L),(0,o.cy)(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>i[e],set:t=>i[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===o.tE&&(e.render=S),null!=I&&(e.inheritAttrs=I),D&&(e.components=D),R&&(e.directives=R),L&&re(e)}function Qe(e,t,i=o.tE){(0,o.cy)(e)&&(e=nt(e));for(const i in e){const s=e[i];let r;r=(0,o.Gv)(s)?"default"in s?gt(s.from||i,s.default,!0):gt(s.from||i):gt(s),(0,n.i9)(r)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[i]=r}}function Ye(e,t,i){r((0,o.cy)(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,i)}function Ze(e,t,i,n){let s=n.includes(".")?Gt(i,n):()=>i[n];if((0,o.Kg)(e)){const i=t[e];(0,o.Tn)(i)&&$t(s,i)}else if((0,o.Tn)(e))$t(s,e.bind(i));else if((0,o.Gv)(e))if((0,o.cy)(e))e.forEach((e=>Ze(e,t,i,n)));else{const n=(0,o.Tn)(e.handler)?e.handler.bind(i):t[e.handler];(0,o.Tn)(n)&&$t(s,n,e)}else 0}function Xe(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:a}}=e.appContext,l=r.get(t);let c;return l?c=l:s.length||i||n?(c={},s.length&&s.forEach((e=>Je(c,e,a,!0))),Je(c,t,a)):c=t,(0,o.Gv)(t)&&r.set(t,c),c}function Je(e,t,i,n=!1){const{mixins:o,extends:s}=t;s&&Je(e,s,i,!0),o&&o.forEach((t=>Je(e,t,i,!0)));for(const o in t)if(n&&"expose"===o);else{const n=et[o]||i&&i[o];e[o]=n?n(e[o],t[o]):t[o]}return e}const et={data:tt,props:rt,emits:rt,methods:st,computed:st,beforeCreate:ot,created:ot,beforeMount:ot,mounted:ot,beforeUpdate:ot,updated:ot,beforeDestroy:ot,beforeUnmount:ot,destroyed:ot,unmounted:ot,activated:ot,deactivated:ot,errorCaptured:ot,serverPrefetch:ot,components:st,directives:st,watch:at,provide:tt,inject:it};function tt(e,t){return t?e?function(){return(0,o.X$)((0,o.Tn)(e)?e.call(this,this):e,(0,o.Tn)(t)?t.call(this,this):t)}:t:e}function it(e,t){return st(nt(e),nt(t))}function nt(e){if((0,o.cy)(e)){const t={};for(let i=0;i1)return i&&(0,o.Tn)(t)?t.call(n&&n.proxy):t}else 0}const pt={},ft=()=>Object.create(pt),mt=e=>Object.getPrototypeOf(e)===pt;function _t(e,t,i,o=!1){const s={},r=ft();e.propsDefaults=Object.create(null),bt(e,t,s,r);for(const t in e.propsOptions[0])t in s||(s[t]=void 0);i?e.props=o?s:(0,n.Gc)(s):e.type.props?e.props=s:e.props=r,e.attrs=r}function vt(e,t,i,s){const{props:r,attrs:a,vnode:{patchFlag:l}}=e,c=(0,n.ux)(r),[d]=e.propsOptions;let u=!1;if(!(s||l>0)||16&l){let n;bt(e,t,r,a)&&(u=!0);for(const s in c)t&&((0,o.$3)(t,s)||(n=(0,o.Tg)(s))!==s&&(0,o.$3)(t,n))||(d?!i||void 0===i[s]&&void 0===i[n]||(r[s]=yt(d,c,s,void 0,e,!0)):delete r[s]);if(a!==c)for(const e in a)t&&(0,o.$3)(t,e)||(delete a[e],u=!0)}else if(8&l){const i=e.vnode.dynamicProps;for(let n=0;n{c=!0;const[i,n]=Ct(e,t,!0);(0,o.X$)(a,i),n&&l.push(...n)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!r&&!c)return(0,o.Gv)(e)&&n.set(e,o.Oj),o.Oj;if((0,o.cy)(r))for(let e=0;e"_"===e[0]||"$stable"===e,xt=e=>(0,o.cy)(e)?e.map(Ni):[Ni(e)],Et=(e,t,i)=>{if(t._n)return t;const n=T(((...e)=>xt(t(...e))),i);return n._c=!1,n},Lt=(e,t,i)=>{const n=e._ctx;for(const i in e){if(kt(i))continue;const s=e[i];if((0,o.Tn)(s))t[i]=Et(i,s,n);else if(null!=s){0;const e=xt(s);t[i]=()=>e}}},Tt=(e,t)=>{const i=xt(t);e.slots.default=()=>i},It=(e,t,i)=>{for(const n in t)(i||"_"!==n)&&(e[n]=t[n])},Dt=(e,t,i)=>{const n=e.slots=ft();if(32&e.vnode.shapeFlag){const e=t._;e?(It(n,t,i),i&&(0,o.yQ)(n,"_",e,!0)):Lt(t,n)}else t&&Tt(e,t)},Rt=(e,t,i)=>{const{vnode:n,slots:s}=e;let r=!0,a=o.MZ;if(32&n.shapeFlag){const e=t._;e?i&&1===e?r=!1:It(s,t,i):(r=!t.$stable,Lt(t,s)),a=t}else t&&(Tt(e,t),a={default:1});if(r)for(const e in s)kt(e)||null!=a[e]||delete s[e]};function Nt(){}const At=ri;function Ot(e){return Pt(e)}function Pt(e,t){Nt();const i=(0,o.We)();i.__VUE__=!0;const{insert:s,remove:r,patchProp:a,createElement:l,createText:c,createComment:d,setText:u,setElementText:h,parentNode:g,nextSibling:p,setScopeId:f=o.tE,insertStaticContent:m}=e,_=(e,t,i,n=null,o=null,s=null,r=void 0,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!wi(e,t)&&(n=Y(e),$(e,o,s,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:d,shapeFlag:u}=t;switch(c){case li:b(e,t,i,n);break;case ci:y(e,t,i,n);break;case di:null==e&&S(t,i,n,r);break;case ai:P(e,t,i,n,o,s,r,a,l);break;default:1&u?E(e,t,i,n,o,s,r,a,l):6&u?M(e,t,i,n,o,s,r,a,l):(64&u||128&u)&&c.process(e,t,i,n,o,s,r,a,l,J)}null!=d&&o&&ae(d,e&&e.ref,s,t||e,!t)},b=(e,t,i,n)=>{if(null==e)s(t.el=c(t.children),i,n);else{const i=t.el=e.el;t.children!==e.children&&u(i,t.children)}},y=(e,t,i,n)=>{null==e?s(t.el=d(t.children||""),i,n):t.el=e.el},S=(e,t,i,n)=>{[e.el,e.anchor]=m(e.children,t,i,n,e.el,e.anchor)},k=({el:e,anchor:t},i,n)=>{let o;while(e&&e!==t)o=p(e),s(e,i,n),e=o;s(t,i,n)},x=({el:e,anchor:t})=>{let i;while(e&&e!==t)i=p(e),r(e),e=i;r(t)},E=(e,t,i,n,o,s,r,a,l)=>{"svg"===t.type?r="svg":"math"===t.type&&(r="mathml"),null==e?L(t,i,n,o,s,r,a,l):N(e,t,o,s,r,a,l)},L=(e,t,i,n,r,c,d,u)=>{let g,p;const{props:f,shapeFlag:m,transition:_,dirs:v}=e;if(g=e.el=l(e.type,c,f&&f.is,f),8&m?h(g,e.children):16&m&&I(e.children,g,null,n,r,Mt(e,c),d,u),v&&D(e,null,n,"created"),T(g,e,e.scopeId,d,n),f){for(const e in f)"value"===e||(0,o.SU)(e)||a(g,e,null,f[e],c,n);"value"in f&&a(g,"value",null,f.value,c),(p=f.onVnodeBeforeMount)&&Mi(p,n,e)}v&&D(e,null,n,"beforeMount");const b=Bt(r,_);b&&_.beforeEnter(g),s(g,t,i),((p=f&&f.onVnodeMounted)||b||v)&&At((()=>{p&&Mi(p,n,e),b&&_.enter(g),v&&D(e,null,n,"mounted")}),r)},T=(e,t,i,n,o)=>{if(i&&f(e,i),n)for(let t=0;t{for(let c=l;c{const c=t.el=e.el;let{patchFlag:d,dynamicChildren:u,dirs:g}=t;d|=16&e.patchFlag;const p=e.props||o.MZ,f=t.props||o.MZ;let m;if(i&&Ft(i,!1),(m=f.onVnodeBeforeUpdate)&&Mi(m,i,t,e),g&&D(t,e,i,"beforeUpdate"),i&&Ft(i,!0),(p.innerHTML&&null==f.innerHTML||p.textContent&&null==f.textContent)&&h(c,""),u?A(e.dynamicChildren,u,c,i,n,Mt(t,s),r):l||V(e,t,c,null,i,n,Mt(t,s),r,!1),d>0){if(16&d)O(c,p,f,i,s);else if(2&d&&p.class!==f.class&&a(c,"class",null,f.class,s),4&d&&a(c,"style",p.style,f.style,s),8&d){const e=t.dynamicProps;for(let t=0;t{m&&Mi(m,i,t,e),g&&D(t,e,i,"updated")}),n)},A=(e,t,i,n,o,s,r)=>{for(let a=0;a{if(t!==i){if(t!==o.MZ)for(const r in t)(0,o.SU)(r)||r in i||a(e,r,t[r],null,s,n);for(const r in i){if((0,o.SU)(r))continue;const l=i[r],c=t[r];l!==c&&"value"!==r&&a(e,r,c,l,s,n)}"value"in i&&a(e,"value",t.value,i.value,s)}},P=(e,t,i,n,o,r,a,l,d)=>{const u=t.el=e?e.el:c(""),h=t.anchor=e?e.anchor:c("");let{patchFlag:g,dynamicChildren:p,slotScopeIds:f}=t;f&&(l=l?l.concat(f):f),null==e?(s(u,i,n),s(h,i,n),I(t.children||[],i,h,o,r,a,l,d)):g>0&&64&g&&p&&e.dynamicChildren?(A(e.dynamicChildren,p,i,o,r,a,l),(null!=t.key||o&&t===o.subTree)&&Wt(e,t,!0)):V(e,t,i,h,o,r,a,l,d)},M=(e,t,i,n,o,s,r,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?o.ctx.activate(t,i,n,r,l):F(t,i,n,o,s,r,l):B(e,t,l)},F=(e,t,i,n,o,s,r)=>{const a=e.component=Wi(e,n,o);if(ce(e)&&(a.ctx.renderer=J),Yi(a,!1,r),a.asyncDep){if(o&&o.registerDep(a,W,r),!e.el){const e=a.subTree=xi(ci);y(null,e,t,i)}}else W(a,e,t,i,o,s,r)},B=(e,t,i)=>{const n=t.component=e.component;if(ii(e,t,i)){if(n.asyncDep&&!n.asyncResolved)return void H(n,t,i);n.next=t,n.update()}else t.el=e.el,n.vnode=t},W=(e,t,i,s,r,a,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:i,u:n,parent:s,vnode:d}=e;{const i=Vt(e);if(i)return t&&(t.el=d.el,H(e,t,l)),void i.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,h=t;0,Ft(e,!1),t?(t.el=d.el,H(e,t,l)):t=d,i&&(0,o.DY)(i),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Mi(u,s,t,d),Ft(e,!0);const p=Jt(e);0;const f=e.subTree;e.subTree=p,_(f,p,g(f.el),Y(f),e,r,a),t.el=p.el,null===h&&oi(e,p.el),n&&At(n,r),(u=t.props&&t.props.onVnodeUpdated)&&At((()=>Mi(u,s,t,d)),r)}else{let n;const{el:l,props:c}=t,{bm:d,m:u,parent:h,root:g,type:p}=e,f=le(t);if(Ft(e,!1),d&&(0,o.DY)(d),!f&&(n=c&&c.onVnodeBeforeMount)&&Mi(n,h,t),Ft(e,!0),l&&te){const t=()=>{e.subTree=Jt(e),te(l,e.subTree,e,r,null)};f&&p.__asyncHydrate?p.__asyncHydrate(l,e,t):t()}else{g.ce&&g.ce._injectChildStyle(p);const n=e.subTree=Jt(e);0,_(null,n,i,s,e,r,a),t.el=n.el}if(u&&At(u,r),!f&&(n=c&&c.onVnodeMounted)){const e=t;At((()=>Mi(n,h,e)),r)}(256&t.shapeFlag||h&&le(h.vnode)&&256&h.vnode.shapeFlag)&&e.a&&At(e.a,r),e.isMounted=!0,t=i=s=null}};e.scope.on();const d=e.effect=new n.X2(c);e.scope.off();const u=e.update=d.run.bind(d),h=e.job=d.runIfDirty.bind(d);h.i=e,h.id=e.uid,d.scheduler=()=>v(h),Ft(e,!0),u()},H=(e,t,i)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,vt(e,t.props,o,i),Rt(e,t.children,i),(0,n.C4)(),w(e),(0,n.bl)()},V=(e,t,i,n,o,s,r,a,l=!1)=>{const c=e&&e.children,d=e?e.shapeFlag:0,u=t.children,{patchFlag:g,shapeFlag:p}=t;if(g>0){if(128&g)return void z(c,u,i,n,o,s,r,a,l);if(256&g)return void j(c,u,i,n,o,s,r,a,l)}8&p?(16&d&&Q(c,o,s),u!==c&&h(i,u)):16&d?16&p?z(c,u,i,n,o,s,r,a,l):Q(c,o,s,!0):(8&d&&h(i,""),16&p&&I(u,i,n,o,s,r,a,l))},j=(e,t,i,n,s,r,a,l,c)=>{e=e||o.Oj,t=t||o.Oj;const d=e.length,u=t.length,h=Math.min(d,u);let g;for(g=0;gu?Q(e,s,r,!0,!1,h):I(t,i,n,s,r,a,l,c,h)},z=(e,t,i,n,s,r,a,l,c)=>{let d=0;const u=t.length;let h=e.length-1,g=u-1;while(d<=h&&d<=g){const n=e[d],o=t[d]=c?Ai(t[d]):Ni(t[d]);if(!wi(n,o))break;_(n,o,i,null,s,r,a,l,c),d++}while(d<=h&&d<=g){const n=e[h],o=t[g]=c?Ai(t[g]):Ni(t[g]);if(!wi(n,o))break;_(n,o,i,null,s,r,a,l,c),h--,g--}if(d>h){if(d<=g){const e=g+1,o=eg)while(d<=h)$(e[d],s,r,!0),d++;else{const p=d,f=d,m=new Map;for(d=f;d<=g;d++){const e=t[d]=c?Ai(t[d]):Ni(t[d]);null!=e.key&&m.set(e.key,d)}let v,b=0;const y=g-f+1;let w=!1,C=0;const S=new Array(y);for(d=0;d=y){$(n,s,r,!0);continue}let o;if(null!=n.key)o=m.get(n.key);else for(v=f;v<=g;v++)if(0===S[v-f]&&wi(n,t[v])){o=v;break}void 0===o?$(n,s,r,!0):(S[o-f]=d+1,o>=C?C=o:w=!0,_(n,t[o],i,null,s,r,a,l,c),b++)}const k=w?Ht(S):o.Oj;for(v=k.length-1,d=y-1;d>=0;d--){const e=f+d,o=t[e],h=e+1{const{el:r,type:a,transition:l,children:c,shapeFlag:d}=e;if(6&d)return void U(e.component.subTree,t,i,n);if(128&d)return void e.suspense.move(t,i,n);if(64&d)return void a.move(e,t,i,J);if(a===ai){s(r,t,i);for(let e=0;el.enter(r)),o);else{const{leave:e,delayLeave:n,afterLeave:o}=l,a=()=>s(r,t,i),c=()=>{e(r,(()=>{a(),o&&o()}))};n?n(r,a,c):c()}else s(r,t,i)},$=(e,t,i,n=!1,o=!1)=>{const{type:s,props:r,ref:a,children:l,dynamicChildren:c,shapeFlag:d,patchFlag:u,dirs:h,cacheIndex:g}=e;if(-2===u&&(o=!1),null!=a&&ae(a,null,i,e,!0),null!=g&&(t.renderCache[g]=void 0),256&d)return void t.ctx.deactivate(e);const p=1&d&&h,f=!le(e);let m;if(f&&(m=r&&r.onVnodeBeforeUnmount)&&Mi(m,t,e),6&d)G(e.component,i,n);else{if(128&d)return void e.suspense.unmount(i,n);p&&D(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,i,J,n):c&&!c.hasOnce&&(s!==ai||u>0&&64&u)?Q(c,t,i,!1,!0):(s===ai&&384&u||!o&&16&d)&&Q(l,t,i),n&&q(e)}(f&&(m=r&&r.onVnodeUnmounted)||p)&&At((()=>{m&&Mi(m,t,e),p&&D(e,null,t,"unmounted")}),i)},q=e=>{const{type:t,el:i,anchor:n,transition:o}=e;if(t===ai)return void K(i,n);if(t===di)return void x(e);const s=()=>{r(i),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:n}=o,r=()=>t(i,s);n?n(e.el,s,r):r()}else s()},K=(e,t)=>{let i;while(e!==t)i=p(e),r(e),e=i;r(t)},G=(e,t,i)=>{const{bum:n,scope:s,job:r,subTree:a,um:l,m:c,a:d}=e;jt(c),jt(d),n&&(0,o.DY)(n),s.stop(),r&&(r.flags|=8,$(a,e,t,i)),l&&At(l,t),At((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,i,n=!1,o=!1,s=0)=>{for(let r=s;r{if(6&e.shapeFlag)return Y(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=p(e.anchor||e.el),i=t&&t[R];return i?p(i):t};let Z=!1;const X=(e,t,i)=>{null==e?t._vnode&&$(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,i),t._vnode=e,Z||(Z=!0,w(),C(),Z=!1)},J={p:_,um:$,m:U,r:q,mt:F,mc:I,pc:V,pbc:A,n:Y,o:e};let ee,te;return t&&([ee,te]=t(J)),{render:X,hydrate:ee,createApp:dt(X,ee)}}function Mt({type:e,props:t},i){return"svg"===i&&"foreignObject"===e||"mathml"===i&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function Ft({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Bt(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wt(e,t,i=!1){const n=e.children,s=t.children;if((0,o.cy)(n)&&(0,o.cy)(s))for(let e=0;e>1,e[i[a]]0&&(t[n]=i[s-1]),i[s]=n)}}s=i.length,r=i[s-1];while(s-- >0)i[s]=r,r=t[r];return i}function Vt(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Vt(t)}function jt(e){if(e)for(let t=0;t{{const e=gt(zt);return e}};function $t(e,t,i){return qt(e,t,i)}function qt(e,t,i=o.MZ){const{immediate:s,deep:a,flush:l,once:c}=i;const d=(0,o.X$)({},i);const u=t&&s||!t&&"post"!==l;let h;if(Qi)if("sync"===l){const e=Ut();h=e.__watcherHandles||(e.__watcherHandles=[])}else if(!u){const e=()=>{};return e.stop=o.tE,e.resume=o.tE,e.pause=o.tE,e}const g=Hi;d.call=(e,t,i)=>r(e,g,t,i);let p=!1;"post"===l?d.scheduler=e=>{At(e,g&&g.suspense)}:"sync"!==l&&(p=!0,d.scheduler=(e,t)=>{t?e():v(e)}),d.augmentJob=e=>{t&&(e.flags|=4),p&&(e.flags|=2,g&&(e.id=g.uid,e.i=g))};const f=(0,n.wB)(e,t,d);return Qi&&(h?h.push(f):u&&f()),f}function Kt(e,t,i){const n=this.proxy,s=(0,o.Kg)(e)?e.includes(".")?Gt(n,e):()=>n[e]:e.bind(n,n);let r;(0,o.Tn)(t)?r=t:(r=t.handler,i=t);const a=Ui(this),l=qt(s,r.bind(n),i);return a(),l}function Gt(e,t){const i=t.split(".");return()=>{let t=e;for(let e=0;e"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${(0,o.PT)(t)}Modifiers`]||e[`${(0,o.Tg)(t)}Modifiers`];function Yt(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||o.MZ;let s=i;const a=t.startsWith("update:"),l=a&&Qt(n,t.slice(7));let c;l&&(l.trim&&(s=i.map((e=>(0,o.Kg)(e)?e.trim():e))),l.number&&(s=i.map(o.bB)));let d=n[c=(0,o.rU)(t)]||n[c=(0,o.rU)((0,o.PT)(t))];!d&&a&&(d=n[c=(0,o.rU)((0,o.Tg)(t))]),d&&r(d,e,6,s);const u=n[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,r(u,e,6,s)}}function Zt(e,t,i=!1){const n=t.emitsCache,s=n.get(e);if(void 0!==s)return s;const r=e.emits;let a={},l=!1;if(!(0,o.Tn)(e)){const n=e=>{const i=Zt(e,t,!0);i&&(l=!0,(0,o.X$)(a,i))};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}return r||l?((0,o.cy)(r)?r.forEach((e=>a[e]=null)):(0,o.X$)(a,r),(0,o.Gv)(e)&&n.set(e,a),a):((0,o.Gv)(e)&&n.set(e,null),null)}function Xt(e,t){return!(!e||!(0,o.Mp)(t))&&(t=t.slice(2).replace(/Once$/,""),(0,o.$3)(e,t[0].toLowerCase()+t.slice(1))||(0,o.$3)(e,(0,o.Tg)(t))||(0,o.$3)(e,t))}function Jt(e){const{type:t,vnode:i,proxy:n,withProxy:s,propsOptions:[r],slots:l,attrs:c,emit:d,render:u,renderCache:h,props:g,data:p,setupState:f,ctx:m,inheritAttrs:_}=e,v=L(e);let b,y;try{if(4&i.shapeFlag){const e=s||n,t=e;b=Ni(u.call(t,e,h,g,f,p,m)),y=c}else{const e=t;0,b=Ni(e.length>1?e(g,{attrs:c,slots:l,emit:d}):e(g,null)),y=t.props?c:ei(c)}}catch(t){ui.length=0,a(t,e,1),b=xi(ci)}let w=b;if(y&&!1!==_){const e=Object.keys(y),{shapeFlag:t}=w;e.length&&7&t&&(r&&e.some(o.CP)&&(y=ti(y,r)),w=Ti(w,y,!1,!0))}return i.dirs&&(w=Ti(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(i.dirs):i.dirs),i.transition&&ne(w,i.transition),b=w,L(v),b}const ei=e=>{let t;for(const i in e)("class"===i||"style"===i||(0,o.Mp)(i))&&((t||(t={}))[i]=e[i]);return t},ti=(e,t)=>{const i={};for(const n in e)(0,o.CP)(n)&&n.slice(9)in t||(i[n]=e[n]);return i};function ii(e,t,i){const{props:n,children:o,component:s}=e,{props:r,children:a,patchFlag:l}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(i&&l>=0))return!(!o&&!a||a&&a.$stable)||n!==r&&(n?!r||ni(n,r,c):!!r);if(1024&l)return!0;if(16&l)return n?ni(n,r,c):!!r;if(8&l){const e=t.dynamicProps;for(let t=0;te.__isSuspense;function ri(e,t){t&&t.pendingBranch?(0,o.cy)(e)?t.effects.push(...e):t.effects.push(e):y(e)}const ai=Symbol.for("v-fgt"),li=Symbol.for("v-txt"),ci=Symbol.for("v-cmt"),di=Symbol.for("v-stc"),ui=[];let hi=null;function gi(e=!1){ui.push(hi=e?null:[])}function pi(){ui.pop(),hi=ui[ui.length-1]||null}let fi=1;function mi(e){fi+=e,e<0&&hi&&(hi.hasOnce=!0)}function _i(e){return e.dynamicChildren=fi>0?hi||o.Oj:null,pi(),fi>0&&hi&&hi.push(e),e}function vi(e,t,i,n,o,s){return _i(ki(e,t,i,n,o,s,!0))}function bi(e,t,i,n,o){return _i(xi(e,t,i,n,o,!0))}function yi(e){return!!e&&!0===e.__v_isVNode}function wi(e,t){return e.type===t.type&&e.key===t.key}const Ci=({key:e})=>null!=e?e:null,Si=({ref:e,ref_key:t,ref_for:i})=>("number"===typeof e&&(e=""+e),null!=e?(0,o.Kg)(e)||(0,n.i9)(e)||(0,o.Tn)(e)?{i:x,r:e,k:t,f:!!i}:e:null);function ki(e,t=null,i=null,n=0,s=null,r=(e===ai?0:1),a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ci(t),ref:t&&Si(t),scopeId:E,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:x};return l?(Oi(c,i),128&r&&e.normalize(c)):i&&(c.shapeFlag|=(0,o.Kg)(i)?8:16),fi>0&&!a&&hi&&(c.patchFlag>0||6&r)&&32!==c.patchFlag&&hi.push(c),c}const xi=Ei;function Ei(e,t=null,i=null,s=0,r=null,a=!1){if(e&&e!==Oe||(e=ci),yi(e)){const n=Ti(e,t,!0);return i&&Oi(n,i),fi>0&&!a&&hi&&(6&n.shapeFlag?hi[hi.indexOf(e)]=n:hi.push(n)),n.patchFlag=-2,n}if(sn(e)&&(e=e.__vccOpts),t){t=Li(t);let{class:e,style:i}=t;e&&!(0,o.Kg)(e)&&(t.class=(0,o.C4)(e)),(0,o.Gv)(i)&&((0,n.ju)(i)&&!(0,o.cy)(i)&&(i=(0,o.X$)({},i)),t.style=(0,o.Tr)(i))}const l=(0,o.Kg)(e)?1:si(e)?128:N(e)?64:(0,o.Gv)(e)?4:(0,o.Tn)(e)?2:0;return ki(e,t,i,s,r,l,a,!0)}function Li(e){return e?(0,n.ju)(e)||mt(e)?(0,o.X$)({},e):e:null}function Ti(e,t,i=!1,n=!1){const{props:s,ref:r,patchFlag:a,children:l,transition:c}=e,d=t?Pi(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ci(d),ref:t&&t.ref?i&&r?(0,o.cy)(r)?r.concat(Si(t)):[r,Si(t)]:Si(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ai?-1===a?16:16|a:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ti(e.ssContent),ssFallback:e.ssFallback&&Ti(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&ne(u,c.clone(u)),u}function Ii(e=" ",t=0){return xi(li,null,e,t)}function Di(e,t){const i=xi(di,null,e);return i.staticCount=t,i}function Ri(e="",t=!1){return t?(gi(),bi(ci,null,e)):xi(ci,null,e)}function Ni(e){return null==e||"boolean"===typeof e?xi(ci):(0,o.cy)(e)?xi(ai,null,e.slice()):yi(e)?Ai(e):xi(li,null,String(e))}function Ai(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Ti(e)}function Oi(e,t){let i=0;const{shapeFlag:n}=e;if(null==t)t=null;else if((0,o.cy)(t))i=16;else if("object"===typeof t){if(65&n){const i=t.default;return void(i&&(i._c&&(i._d=!1),Oi(e,i()),i._c&&(i._d=!0)))}{i=32;const n=t._;n||mt(t)?3===n&&x&&(1===x.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=x}}else(0,o.Tn)(t)?(t={default:t,_ctx:x},i=32):(t=String(t),64&n?(i=16,t=[Ii(t)]):i=8);e.children=t,e.shapeFlag|=i}function Pi(...e){const t={};for(let i=0;iHi||x;let ji,zi;{const e=(0,o.We)(),t=(t,i)=>{let n;return(n=e[t])||(n=e[t]=[]),n.push(i),e=>{n.length>1?n.forEach((t=>t(e))):n[0](e)}};ji=t("__VUE_INSTANCE_SETTERS__",(e=>Hi=e)),zi=t("__VUE_SSR_SETTERS__",(e=>Qi=e))}const Ui=e=>{const t=Hi;return ji(e),e.scope.on(),()=>{e.scope.off(),ji(t)}},$i=()=>{Hi&&Hi.scope.off(),ji(null)};function qi(e){return 4&e.vnode.shapeFlag}let Ki,Gi,Qi=!1;function Yi(e,t=!1,i=!1){t&&zi(t);const{props:n,children:o}=e.vnode,s=qi(e);_t(e,n,s,t),Dt(e,o,i);const r=s?Zi(e,t):void 0;return t&&zi(!1),r}function Zi(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,$e);const{setup:r}=i;if(r){(0,n.C4)();const i=e.setupContext=r.length>1?tn(e):null,l=Ui(e),c=s(r,e,0,[e.props,i]),d=(0,o.yL)(c);if((0,n.bl)(),l(),!d&&!e.sp||le(e)||re(e),d){if(c.then($i,$i),t)return c.then((i=>{Xi(e,i,t)})).catch((t=>{a(t,e,0)}));e.asyncDep=c}else Xi(e,c,t)}else Ji(e,t)}function Xi(e,t,i){(0,o.Tn)(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:(0,o.Gv)(t)&&(e.setupState=(0,n.Pr)(t)),Ji(e,i)}function Ji(e,t,i){const s=e.type;if(!e.render){if(!t&&Ki&&!s.render){const t=s.template||Xe(e).template;if(t){0;const{isCustomElement:i,compilerOptions:n}=e.appContext.config,{delimiters:r,compilerOptions:a}=s,l=(0,o.X$)((0,o.X$)({isCustomElement:i,delimiters:r},n),a);s.render=Ki(t,l)}}e.render=s.render||o.tE,Gi&&Gi(e)}{const t=Ui(e);(0,n.C4)();try{Ge(e)}finally{(0,n.bl)(),t()}}}const en={get(e,t){return(0,n.u4)(e,"get",""),e[t]}};function tn(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,en),slots:e.slots,emit:e.emit,expose:t}}function nn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy((0,n.Pr)((0,n.IG)(e.exposed)),{get(t,i){return i in t?t[i]:i in ze?ze[i](e):void 0},has(e,t){return t in e||t in ze}})):e.proxy}function on(e,t=!0){return(0,o.Tn)(e)?e.displayName||e.name:e.name||t&&e.__name}function sn(e){return(0,o.Tn)(e)&&"__vccOpts"in e}const rn=(e,t)=>{const i=(0,n.EW)(e,t,Qi);return i};function an(e,t,i){const n=arguments.length;return 2===n?(0,o.Gv)(t)&&!(0,o.cy)(t)?yi(t)?xi(e,null,[t]):xi(e,t):xi(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):3===n&&yi(i)&&(i=[i]),xi(e,t,i))}const ln="3.5.12"},29104:(e,t,i)=>{"use strict";i.d(t,{D$:()=>ke,Ef:()=>Te,F:()=>_e,aG:()=>B,eB:()=>y});var n=i(61758),o=i(58790),s=i(38734); /** -* @vue/runtime-dom v3.5.11 +* @vue/runtime-dom v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ -let r;const a="undefined"!==typeof window&&window.trustedTypes;if(a)try{r=a.createPolicy("vue",{createHTML:e=>e})}catch(De){}const l=r?e=>r.createHTML(e):e=>e,c="http://www.w3.org/2000/svg",d="http://www.w3.org/1998/Math/MathML",u="undefined"!==typeof document?document:null,h=u&&u.createElement("template"),g={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const o="svg"===t?u.createElementNS(c,e):"mathml"===t?u.createElementNS(d,e):i?u.createElement(e,{is:i}):u.createElement(e);return"select"===e&&n&&null!=n.multiple&&o.setAttribute("multiple",n.multiple),o},createText:e=>u.createTextNode(e),createComment:e=>u.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>u.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,n,o,s){const r=i?i.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling)){while(1)if(t.insertBefore(o.cloneNode(!0),i),o===s||!(o=o.nextSibling))break}else{h.innerHTML=l("svg"===n?`${e}`:"mathml"===n?`${e}`:e);const o=h.content;if("svg"===n||"mathml"===n){const e=o.firstChild;while(e.firstChild)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,i)}return[r?r.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},p="transition",f="animation",m=Symbol("_vtc"),_={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},v=(0,o.X$)({},n.QP,_),b=e=>(e.displayName="Transition",e.props=v,e),y=b(((e,{slots:t})=>(0,n.h)(n.pR,S(e),t))),w=(e,t=[])=>{(0,o.cy)(e)?e.forEach((e=>e(...t))):e&&e(...t)},C=e=>!!e&&((0,o.cy)(e)?e.some((e=>e.length>1)):e.length>1);function S(e){const t={};for(const o in e)o in _||(t[o]=e[o]);if(!1===e.css)return t;const{name:i="v",type:n,duration:s,enterFromClass:r=`${i}-enter-from`,enterActiveClass:a=`${i}-enter-active`,enterToClass:l=`${i}-enter-to`,appearFromClass:c=r,appearActiveClass:d=a,appearToClass:u=l,leaveFromClass:h=`${i}-leave-from`,leaveActiveClass:g=`${i}-leave-active`,leaveToClass:p=`${i}-leave-to`}=e,f=k(s),m=f&&f[0],v=f&&f[1],{onBeforeEnter:b,onEnter:y,onEnterCancelled:S,onLeave:x,onLeaveCancelled:I,onBeforeAppear:D=b,onAppear:N=y,onAppearCancelled:A=S}=t,P=(e,t,i)=>{L(e,t?u:l),L(e,t?d:a),i&&i()},M=(e,t)=>{e._isLeaving=!1,L(e,h),L(e,p),L(e,g),t&&t()},F=e=>(t,i)=>{const o=e?N:y,s=()=>P(t,e,i);w(o,[t,s]),T((()=>{L(t,e?c:r),E(t,e?u:l),C(o)||R(t,n,m,s)}))};return(0,o.X$)(t,{onBeforeEnter(e){w(b,[e]),E(e,r),E(e,a)},onBeforeAppear(e){w(D,[e]),E(e,c),E(e,d)},onEnter:F(!1),onAppear:F(!0),onLeave(e,t){e._isLeaving=!0;const i=()=>M(e,t);E(e,h),E(e,g),O(),T((()=>{e._isLeaving&&(L(e,h),E(e,p),C(x)||R(e,n,v,i))})),w(x,[e,i])},onEnterCancelled(e){P(e,!1),w(S,[e])},onAppearCancelled(e){P(e,!0),w(A,[e])},onLeaveCancelled(e){M(e),w(I,[e])}})}function k(e){if(null==e)return null;if((0,o.Gv)(e))return[x(e.enter),x(e.leave)];{const t=x(e);return[t,t]}}function x(e){const t=(0,o.Ro)(e);return t}function E(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[m]||(e[m]=new Set)).add(t)}function L(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const i=e[m];i&&(i.delete(t),i.size||(e[m]=void 0))}function T(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let I=0;function R(e,t,i,n){const o=e._endId=++I,s=()=>{o===e._endId&&n()};if(null!=i)return setTimeout(s,i);const{type:r,timeout:a,propCount:l}=D(e,t);if(!r)return n();const c=r+"end";let d=0;const u=()=>{e.removeEventListener(c,h),s()},h=t=>{t.target===e&&++d>=l&&u()};setTimeout((()=>{d(i[e]||"").split(", "),o=n(`${p}Delay`),s=n(`${p}Duration`),r=N(o,s),a=n(`${f}Delay`),l=n(`${f}Duration`),c=N(a,l);let d=null,u=0,h=0;t===p?r>0&&(d=p,u=r,h=s.length):t===f?c>0&&(d=f,u=c,h=l.length):(u=Math.max(r,c),d=u>0?r>c?p:f:null,h=d?d===p?s.length:l.length:0);const g=d===p&&/\b(transform|all)(,|$)/.test(n(`${p}Property`).toString());return{type:d,timeout:u,propCount:h,hasTransform:g}}function N(e,t){while(e.lengthA(t)+A(e[i]))))}function A(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function O(){return document.body.offsetHeight}function P(e,t,i){const n=e[m];n&&(t=(t?[t,...n]:[...n]).join(" ")),null==t?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const M=Symbol("_vod"),F=Symbol("_vsh"),B={beforeMount(e,{value:t},{transition:i}){e[M]="none"===e.style.display?"":e.style.display,i&&t?i.beforeEnter(e):W(e,t)},mounted(e,{value:t},{transition:i}){i&&t&&i.enter(e)},updated(e,{value:t,oldValue:i},{transition:n}){!t!==!i&&(n?t?(n.beforeEnter(e),W(e,!0),n.enter(e)):n.leave(e,(()=>{W(e,!1)})):W(e,t))},beforeUnmount(e,{value:t}){W(e,t)}};function W(e,t){e.style.display=t?e[M]:"none",e[F]=!t}const H=Symbol("");const V=/(^|;)\s*display\s*:/;function j(e,t,i){const n=e.style,s=(0,o.Kg)(i);let r=!1;if(i&&!s){if(t)if((0,o.Kg)(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==i[t]&&U(n,t,"")}else for(const e in t)null==i[e]&&U(n,e,"");for(const e in i)"display"===e&&(r=!0),U(n,e,i[e])}else if(s){if(t!==i){const e=n[H];e&&(i+=";"+e),n.cssText=i,r=V.test(i)}}else t&&e.removeAttribute("style");M in e&&(e[M]=r?n.display:"",e[F]&&(n.display="none"))}const z=/\s*!important$/;function U(e,t,i){if((0,o.cy)(i))i.forEach((i=>U(e,t,i)));else if(null==i&&(i=""),t.startsWith("--"))e.setProperty(t,i);else{const n=K(e,t);z.test(i)?e.setProperty((0,o.Tg)(n),i.replace(z,""),"important"):e[n]=i}}const $=["Webkit","Moz","ms"],q={};function K(e,t){const i=q[t];if(i)return i;let n=(0,o.PT)(t);if("filter"!==n&&n in e)return q[t]=n;n=(0,o.ZH)(n);for(let o=0;o<$.length;o++){const i=$[o]+n;if(i in e)return q[t]=i}return t}const G="http://www.w3.org/1999/xlink";function Q(e,t,i,n,s,r=(0,o.J$)(t)){n&&t.startsWith("xlink:")?null==i?e.removeAttributeNS(G,t.slice(6,t.length)):e.setAttributeNS(G,t,i):null==i||r&&!(0,o.Y2)(i)?e.removeAttribute(t):e.setAttribute(t,r?"":(0,o.Bm)(i)?String(i):i)}function Y(e,t,i,n){if("innerHTML"===t||"textContent"===t)return void(null!=i&&(e[t]="innerHTML"===t?l(i):i));const s=e.tagName;if("value"===t&&"PROGRESS"!==s&&!s.includes("-")){const n="OPTION"===s?e.getAttribute("value")||"":e.value,o=null==i?"checkbox"===e.type?"on":"":String(i);return n===o&&"_value"in e||(e.value=o),null==i&&e.removeAttribute(t),void(e._value=i)}let r=!1;if(""===i||null==i){const n=typeof e[t];"boolean"===n?i=(0,o.Y2)(i):null==i&&"string"===n?(i="",r=!0):"number"===n&&(i=0,r=!0)}try{e[t]=i}catch(De){0}r&&e.removeAttribute(t)}function Z(e,t,i,n){e.addEventListener(t,i,n)}function X(e,t,i,n){e.removeEventListener(t,i,n)}const J=Symbol("_vei");function ee(e,t,i,n,o=null){const s=e[J]||(e[J]={}),r=s[t];if(n&&r)r.value=n;else{const[i,a]=ie(t);if(n){const r=s[t]=re(n,o);Z(e,i,r,a)}else r&&(X(e,i,r,a),s[t]=void 0)}}const te=/(?:Once|Passive|Capture)$/;function ie(e){let t;if(te.test(e)){let i;t={};while(i=e.match(te))e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}const i=":"===e[2]?e.slice(3):(0,o.Tg)(e.slice(2));return[i,t]}let ne=0;const oe=Promise.resolve(),se=()=>ne||(oe.then((()=>ne=0)),ne=Date.now());function re(e,t){const i=e=>{if(e._vts){if(e._vts<=i.attached)return}else e._vts=Date.now();(0,n.qL)(ae(e,i.value),t,5,[e])};return i.value=e,i.attached=se(),i}function ae(e,t){if((0,o.cy)(t)){const i=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{i.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}const le=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ce=(e,t,i,n,s,r)=>{const a="svg"===s;"class"===t?P(e,n,a):"style"===t?j(e,i,n):(0,o.Mp)(t)?(0,o.CP)(t)||ee(e,t,i,n,r):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):de(e,t,n,a))?(Y(e,t,n),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Q(e,t,n,a,r,"value"!==t)):!e._isVueCE||!/[A-Z]/.test(t)&&(0,o.Kg)(n)?("true-value"===t?e._trueValue=n:"false-value"===t&&(e._falseValue=n),Q(e,t,n,a)):Y(e,(0,o.PT)(t),n)};function de(e,t,i,n){if(n)return"innerHTML"===t||"textContent"===t||!!(t in e&&le(t)&&(0,o.Tn)(i));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!le(t)||!(0,o.Kg)(i))&&t in e} +let r;const a="undefined"!==typeof window&&window.trustedTypes;if(a)try{r=a.createPolicy("vue",{createHTML:e=>e})}catch(e){}const l=r?e=>r.createHTML(e):e=>e,c="http://www.w3.org/2000/svg",d="http://www.w3.org/1998/Math/MathML",u="undefined"!==typeof document?document:null,h=u&&u.createElement("template"),g={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const o="svg"===t?u.createElementNS(c,e):"mathml"===t?u.createElementNS(d,e):i?u.createElement(e,{is:i}):u.createElement(e);return"select"===e&&n&&null!=n.multiple&&o.setAttribute("multiple",n.multiple),o},createText:e=>u.createTextNode(e),createComment:e=>u.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>u.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,n,o,s){const r=i?i.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling)){while(1)if(t.insertBefore(o.cloneNode(!0),i),o===s||!(o=o.nextSibling))break}else{h.innerHTML=l("svg"===n?`${e}`:"mathml"===n?`${e}`:e);const o=h.content;if("svg"===n||"mathml"===n){const e=o.firstChild;while(e.firstChild)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,i)}return[r?r.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},p="transition",f="animation",m=Symbol("_vtc"),_={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},v=(0,o.X$)({},n.QP,_),b=e=>(e.displayName="Transition",e.props=v,e),y=b(((e,{slots:t})=>(0,n.h)(n.pR,S(e),t))),w=(e,t=[])=>{(0,o.cy)(e)?e.forEach((e=>e(...t))):e&&e(...t)},C=e=>!!e&&((0,o.cy)(e)?e.some((e=>e.length>1)):e.length>1);function S(e){const t={};for(const i in e)i in _||(t[i]=e[i]);if(!1===e.css)return t;const{name:i="v",type:n,duration:s,enterFromClass:r=`${i}-enter-from`,enterActiveClass:a=`${i}-enter-active`,enterToClass:l=`${i}-enter-to`,appearFromClass:c=r,appearActiveClass:d=a,appearToClass:u=l,leaveFromClass:h=`${i}-leave-from`,leaveActiveClass:g=`${i}-leave-active`,leaveToClass:p=`${i}-leave-to`}=e,f=k(s),m=f&&f[0],v=f&&f[1],{onBeforeEnter:b,onEnter:y,onEnterCancelled:S,onLeave:x,onLeaveCancelled:I,onBeforeAppear:R=b,onAppear:N=y,onAppearCancelled:A=S}=t,P=(e,t,i)=>{L(e,t?u:l),L(e,t?d:a),i&&i()},M=(e,t)=>{e._isLeaving=!1,L(e,h),L(e,p),L(e,g),t&&t()},F=e=>(t,i)=>{const o=e?N:y,s=()=>P(t,e,i);w(o,[t,s]),T((()=>{L(t,e?c:r),E(t,e?u:l),C(o)||D(t,n,m,s)}))};return(0,o.X$)(t,{onBeforeEnter(e){w(b,[e]),E(e,r),E(e,a)},onBeforeAppear(e){w(R,[e]),E(e,c),E(e,d)},onEnter:F(!1),onAppear:F(!0),onLeave(e,t){e._isLeaving=!0;const i=()=>M(e,t);E(e,h),E(e,g),O(),T((()=>{e._isLeaving&&(L(e,h),E(e,p),C(x)||D(e,n,v,i))})),w(x,[e,i])},onEnterCancelled(e){P(e,!1),w(S,[e])},onAppearCancelled(e){P(e,!0),w(A,[e])},onLeaveCancelled(e){M(e),w(I,[e])}})}function k(e){if(null==e)return null;if((0,o.Gv)(e))return[x(e.enter),x(e.leave)];{const t=x(e);return[t,t]}}function x(e){const t=(0,o.Ro)(e);return t}function E(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[m]||(e[m]=new Set)).add(t)}function L(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const i=e[m];i&&(i.delete(t),i.size||(e[m]=void 0))}function T(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let I=0;function D(e,t,i,n){const o=e._endId=++I,s=()=>{o===e._endId&&n()};if(null!=i)return setTimeout(s,i);const{type:r,timeout:a,propCount:l}=R(e,t);if(!r)return n();const c=r+"end";let d=0;const u=()=>{e.removeEventListener(c,h),s()},h=t=>{t.target===e&&++d>=l&&u()};setTimeout((()=>{d(i[e]||"").split(", "),o=n(`${p}Delay`),s=n(`${p}Duration`),r=N(o,s),a=n(`${f}Delay`),l=n(`${f}Duration`),c=N(a,l);let d=null,u=0,h=0;t===p?r>0&&(d=p,u=r,h=s.length):t===f?c>0&&(d=f,u=c,h=l.length):(u=Math.max(r,c),d=u>0?r>c?p:f:null,h=d?d===p?s.length:l.length:0);const g=d===p&&/\b(transform|all)(,|$)/.test(n(`${p}Property`).toString());return{type:d,timeout:u,propCount:h,hasTransform:g}}function N(e,t){while(e.lengthA(t)+A(e[i]))))}function A(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function O(){return document.body.offsetHeight}function P(e,t,i){const n=e[m];n&&(t=(t?[t,...n]:[...n]).join(" ")),null==t?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const M=Symbol("_vod"),F=Symbol("_vsh"),B={beforeMount(e,{value:t},{transition:i}){e[M]="none"===e.style.display?"":e.style.display,i&&t?i.beforeEnter(e):W(e,t)},mounted(e,{value:t},{transition:i}){i&&t&&i.enter(e)},updated(e,{value:t,oldValue:i},{transition:n}){!t!==!i&&(n?t?(n.beforeEnter(e),W(e,!0),n.enter(e)):n.leave(e,(()=>{W(e,!1)})):W(e,t))},beforeUnmount(e,{value:t}){W(e,t)}};function W(e,t){e.style.display=t?e[M]:"none",e[F]=!t}const H=Symbol("");const V=/(^|;)\s*display\s*:/;function j(e,t,i){const n=e.style,s=(0,o.Kg)(i);let r=!1;if(i&&!s){if(t)if((0,o.Kg)(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==i[t]&&U(n,t,"")}else for(const e in t)null==i[e]&&U(n,e,"");for(const e in i)"display"===e&&(r=!0),U(n,e,i[e])}else if(s){if(t!==i){const e=n[H];e&&(i+=";"+e),n.cssText=i,r=V.test(i)}}else t&&e.removeAttribute("style");M in e&&(e[M]=r?n.display:"",e[F]&&(n.display="none"))}const z=/\s*!important$/;function U(e,t,i){if((0,o.cy)(i))i.forEach((i=>U(e,t,i)));else if(null==i&&(i=""),t.startsWith("--"))e.setProperty(t,i);else{const n=K(e,t);z.test(i)?e.setProperty((0,o.Tg)(n),i.replace(z,""),"important"):e[n]=i}}const $=["Webkit","Moz","ms"],q={};function K(e,t){const i=q[t];if(i)return i;let n=(0,o.PT)(t);if("filter"!==n&&n in e)return q[t]=n;n=(0,o.ZH)(n);for(let i=0;i<$.length;i++){const o=$[i]+n;if(o in e)return q[t]=o}return t}const G="http://www.w3.org/1999/xlink";function Q(e,t,i,n,s,r=(0,o.J$)(t)){n&&t.startsWith("xlink:")?null==i?e.removeAttributeNS(G,t.slice(6,t.length)):e.setAttributeNS(G,t,i):null==i||r&&!(0,o.Y2)(i)?e.removeAttribute(t):e.setAttribute(t,r?"":(0,o.Bm)(i)?String(i):i)}function Y(e,t,i,n,s){if("innerHTML"===t||"textContent"===t)return void(null!=i&&(e[t]="innerHTML"===t?l(i):i));const r=e.tagName;if("value"===t&&"PROGRESS"!==r&&!r.includes("-")){const n="OPTION"===r?e.getAttribute("value")||"":e.value,o=null==i?"checkbox"===e.type?"on":"":String(i);return n===o&&"_value"in e||(e.value=o),null==i&&e.removeAttribute(t),void(e._value=i)}let a=!1;if(""===i||null==i){const n=typeof e[t];"boolean"===n?i=(0,o.Y2)(i):null==i&&"string"===n?(i="",a=!0):"number"===n&&(i=0,a=!0)}try{e[t]=i}catch(e){0}a&&e.removeAttribute(s||t)}function Z(e,t,i,n){e.addEventListener(t,i,n)}function X(e,t,i,n){e.removeEventListener(t,i,n)}const J=Symbol("_vei");function ee(e,t,i,n,o=null){const s=e[J]||(e[J]={}),r=s[t];if(n&&r)r.value=n;else{const[i,a]=ie(t);if(n){const r=s[t]=re(n,o);Z(e,i,r,a)}else r&&(X(e,i,r,a),s[t]=void 0)}}const te=/(?:Once|Passive|Capture)$/;function ie(e){let t;if(te.test(e)){let i;t={};while(i=e.match(te))e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}const i=":"===e[2]?e.slice(3):(0,o.Tg)(e.slice(2));return[i,t]}let ne=0;const oe=Promise.resolve(),se=()=>ne||(oe.then((()=>ne=0)),ne=Date.now());function re(e,t){const i=e=>{if(e._vts){if(e._vts<=i.attached)return}else e._vts=Date.now();(0,n.qL)(ae(e,i.value),t,5,[e])};return i.value=e,i.attached=se(),i}function ae(e,t){if((0,o.cy)(t)){const i=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{i.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}const le=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ce=(e,t,i,n,s,r)=>{const a="svg"===s;"class"===t?P(e,n,a):"style"===t?j(e,i,n):(0,o.Mp)(t)?(0,o.CP)(t)||ee(e,t,i,n,r):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):de(e,t,n,a))?(Y(e,t,n),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Q(e,t,n,a,r,"value"!==t)):!e._isVueCE||!/[A-Z]/.test(t)&&(0,o.Kg)(n)?("true-value"===t?e._trueValue=n:"false-value"===t&&(e._falseValue=n),Q(e,t,n,a)):Y(e,(0,o.PT)(t),n,r,t)};function de(e,t,i,n){if(n)return"innerHTML"===t||"textContent"===t||!!(t in e&&le(t)&&(0,o.Tn)(i));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!le(t)||!(0,o.Kg)(i))&&t in e} /*! #__NO_SIDE_EFFECTS__ */ -"undefined"!==typeof HTMLElement&&HTMLElement;const ue=new WeakMap,he=new WeakMap,ge=Symbol("_moveCb"),pe=Symbol("_enterCb"),fe=e=>(delete e.props.mode,e),me=fe({name:"TransitionGroup",props:(0,o.X$)({},v,{tag:String,moveClass:String}),setup(e,{slots:t}){const i=(0,n.nI)(),o=(0,n.Gy)();let r,a;return(0,n.$u)((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!we(r[0].el,i.vnode.el,t))return;r.forEach(ve),r.forEach(be);const n=r.filter(ye);O(),n.forEach((e=>{const i=e.el,n=i.style;E(i,t),n.transform=n.webkitTransform=n.transitionDuration="";const o=i[ge]=e=>{e&&e.target!==i||e&&!/transform$/.test(e.propertyName)||(i.removeEventListener("transitionend",o),i[ge]=null,L(i,t))};i.addEventListener("transitionend",o)}))})),()=>{const l=(0,s.ux)(e),c=S(l);let d=l.tag||n.FK;if(r=[],a)for(let e=0;e{e.split(/\s+/).forEach((e=>e&&n.classList.remove(e)))})),i.split(/\s+/).forEach((e=>e&&n.classList.add(e))),n.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(n);const{hasTransform:r}=D(n);return s.removeChild(n),r}Symbol("_assign");const Ce=["ctrl","shift","alt","meta"],Se={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ce.some((i=>e[`${i}Key`]&&!t.includes(i)))},ke=(e,t)=>{const i=e._withMods||(e._withMods={}),n=t.join(".");return i[n]||(i[n]=(i,...n)=>{for(let e=0;e{const t=Le().createApp(...e);const{mount:i}=t;return t.mount=e=>{const n=Re(e);if(!n)return;const s=t._component;(0,o.Tn)(s)||s.render||s.template||(s.template=n.innerHTML),1===n.nodeType&&(n.textContent="");const r=i(n,!1,Ie(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),r},t};function Ie(e){return e instanceof SVGElement?"svg":"function"===typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Re(e){if((0,o.Kg)(e)){const t=document.querySelector(e);return t}return e}},58790:(e,t,i)=>{"use strict"; +"undefined"!==typeof HTMLElement&&HTMLElement;const ue=new WeakMap,he=new WeakMap,ge=Symbol("_moveCb"),pe=Symbol("_enterCb"),fe=e=>(delete e.props.mode,e),me=fe({name:"TransitionGroup",props:(0,o.X$)({},v,{tag:String,moveClass:String}),setup(e,{slots:t}){const i=(0,n.nI)(),o=(0,n.Gy)();let r,a;return(0,n.$u)((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!we(r[0].el,i.vnode.el,t))return;r.forEach(ve),r.forEach(be);const n=r.filter(ye);O(),n.forEach((e=>{const i=e.el,n=i.style;E(i,t),n.transform=n.webkitTransform=n.transitionDuration="";const o=i[ge]=e=>{e&&e.target!==i||e&&!/transform$/.test(e.propertyName)||(i.removeEventListener("transitionend",o),i[ge]=null,L(i,t))};i.addEventListener("transitionend",o)}))})),()=>{const l=(0,s.ux)(e),c=S(l);let d=l.tag||n.FK;if(r=[],a)for(let e=0;e{e.split(/\s+/).forEach((e=>e&&n.classList.remove(e)))})),i.split(/\s+/).forEach((e=>e&&n.classList.add(e))),n.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(n);const{hasTransform:r}=R(n);return s.removeChild(n),r}Symbol("_assign");const Ce=["ctrl","shift","alt","meta"],Se={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ce.some((i=>e[`${i}Key`]&&!t.includes(i)))},ke=(e,t)=>{const i=e._withMods||(e._withMods={}),n=t.join(".");return i[n]||(i[n]=(i,...n)=>{for(let e=0;e{const t=Le().createApp(...e);const{mount:i}=t;return t.mount=e=>{const n=De(e);if(!n)return;const s=t._component;(0,o.Tn)(s)||s.render||s.template||(s.template=n.innerHTML),1===n.nodeType&&(n.textContent="");const r=i(n,!1,Ie(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),r},t};function Ie(e){return e instanceof SVGElement?"svg":"function"===typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function De(e){if((0,o.Kg)(e)){const t=document.querySelector(e);return t}return e}},58790:(e,t,i)=>{"use strict"; /** -* @vue/shared v3.5.11 +* @vue/shared v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ /*! #__NO_SIDE_EFFECTS__ */ -function n(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return e=>e in t}i.d(t,{$3:()=>g,$H:()=>F,BH:()=>$,BX:()=>ne,Bm:()=>w,C4:()=>Z,CE:()=>f,CP:()=>c,DY:()=>B,Gv:()=>C,J$:()=>ee,Kg:()=>y,MZ:()=>o,Mp:()=>l,NO:()=>a,Oj:()=>s,PT:()=>N,Qd:()=>L,Ro:()=>V,SU:()=>I,TF:()=>u,Tg:()=>O,Tn:()=>b,Tr:()=>q,We:()=>z,X$:()=>d,Y2:()=>te,ZH:()=>P,Zf:()=>E,_B:()=>X,bB:()=>H,cy:()=>p,gd:()=>v,pD:()=>n,rU:()=>M,tE:()=>r,u3:()=>oe,vM:()=>m,v_:()=>re,yI:()=>T,yL:()=>S,yQ:()=>W});const o={},s=[],r=()=>{},a=()=>!1,l=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith("onUpdate:"),d=Object.assign,u=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},h=Object.prototype.hasOwnProperty,g=(e,t)=>h.call(e,t),p=Array.isArray,f=e=>"[object Map]"===x(e),m=e=>"[object Set]"===x(e),_=e=>"[object Date]"===x(e),v=e=>"[object RegExp]"===x(e),b=e=>"function"===typeof e,y=e=>"string"===typeof e,w=e=>"symbol"===typeof e,C=e=>null!==e&&"object"===typeof e,S=e=>(C(e)||b(e))&&b(e.then)&&b(e.catch),k=Object.prototype.toString,x=e=>k.call(e),E=e=>x(e).slice(8,-1),L=e=>"[object Object]"===x(e),T=e=>y(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,I=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),R=e=>{const t=Object.create(null);return i=>{const n=t[i];return n||(t[i]=e(i))}},D=/-(\w)/g,N=R((e=>e.replace(D,((e,t)=>t?t.toUpperCase():"")))),A=/\B([A-Z])/g,O=R((e=>e.replace(A,"-$1").toLowerCase())),P=R((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=R((e=>{const t=e?`on${P(e)}`:"";return t})),F=(e,t)=>!Object.is(e,t),B=(e,...t)=>{for(let i=0;i{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:i})},H=e=>{const t=parseFloat(e);return isNaN(t)?e:t},V=e=>{const t=y(e)?Number(e):NaN;return isNaN(t)?e:t};let j;const z=()=>j||(j="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof i.g?i.g:{});const U="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",$=n(U);function q(e){if(p(e)){const t={};for(let i=0;i{if(e){const i=e.split(G);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}function Z(e){let t="";if(y(e))t=e;else if(p(e))for(let i=0;ine(e,t)))}const se=e=>!(!e||!0!==e["__v_isRef"]),re=e=>y(e)?e:null==e?"":p(e)||C(e)&&(e.toString===k||!b(e.toString))?se(e)?re(e.value):JSON.stringify(e,ae,2):String(e),ae=(e,t)=>se(t)?ae(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,i],n)=>(e[le(t,n)+" =>"]=i,e)),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>le(e)))}:w(t)?le(t):!C(t)||p(t)||L(t)?t:String(t),le=(e,t="")=>{var i;return w(e)?`Symbol(${null!=(i=e.description)?i:t})`:e}},1450:(e,t,i)=>{"use strict";var n=i(16820),o=i(44486),s=i(29328),r=i(55264),a=i(36350);function l(e,t,i,o){return new n(e,t,i,o)}l.version=i(20107),l.AlgoliaSearchHelper=n,l.SearchParameters=r,l.RecommendParameters=o,l.SearchResults=a,l.RecommendResults=s,e.exports=l},24609:(e,t,i)=>{"use strict";var n=i(83480),o=i(91937);function s(e,t,i){this.main=e,this.fn=t,this.recommendFn=i,this.lastResults=null,this.lastRecommendResults=null}o(s,n),s.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},s.prototype.getModifiedState=function(e){return this.fn(e)},s.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=s},44486:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var i=this.params.slice();return i.push(e),new t({params:i})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var i=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete i.$$id,i}))}},e.exports=t},29328:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var i=this;e.params.forEach((function(e){var n=e.$$id;i[n]=t[n],i._rawResults[n]=t[n]}))}t.prototype={constructor:t},e.exports=t},7179:(e,t,i)=>{"use strict";var n=i(20525),o=i(43284),s=i(39600),r={addRefinement:function(e,t,i){if(r.isRefined(e,t,i))return e;var o=""+i,s=e[t]?e[t].concat(o):[o],a={};return a[t]=s,n({},a,e)},removeRefinement:function(e,t,i){if(void 0===i)return r.clearRefinement(e,(function(e,i){return t===i}));var n=""+i;return r.clearRefinement(e,(function(e,i){return t===i&&n===e}))},toggleRefinement:function(e,t,i){if(void 0===i)throw new Error("toggleRefinement should be used with a value");return r.isRefined(e,t,i)?r.removeRefinement(e,t,i):r.addRefinement(e,t,i)},clearRefinement:function(e,t,i){if(void 0===t)return o(e)?{}:e;if("string"===typeof t)return s(e,[t]);if("function"===typeof t){var n=!1,r=Object.keys(e).reduce((function(o,s){var r=e[s]||[],a=r.filter((function(e){return!t(e,s,i)}));return a.length!==r.length&&(n=!0),o[s]=a,o}),{});return n?r:e}},isRefined:function(e,t,i){var n=Boolean(e[t])&&e[t].length>0;if(void 0===i||!n)return n;var o=""+i;return-1!==e[t].indexOf(o)}};e.exports=r},55264:(e,t,i)=>{"use strict";var n=i(20525),o=i(52718),s=i(3092),r=i(96853),a=i(43284),l=i(39600),c=i(52482),d=i(5555),u=i(7179);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,i){return h(t[i],e)})):e===t}function g(e,t){return o(e,(function(e){return h(e,t)}))}function p(e){var t=e?p._parseNumbers(e):{};void 0===t.userToken||d(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var i=this;Object.keys(t).forEach((function(e){var n=-1!==p.PARAMETERS.indexOf(e),o=void 0!==t[e];!n&&o&&(i[e]=t[e])}))}p.PARAMETERS=Object.keys(new p),p._parseNumbers=function(e){if(e instanceof p)return e;var t={},i=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(i.forEach((function(i){var n=e[i];if("string"===typeof n){var o=parseFloat(n);t[i]=isNaN(o)?n:o}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var n={};Object.keys(e.numericRefinements).forEach((function(t){var i=e.numericRefinements[t]||{};n[t]={},Object.keys(i).forEach((function(e){var o=i[e],s=o.map((function(e){return Array.isArray(e)?e.map((function(e){return"string"===typeof e?parseFloat(e):e})):"string"===typeof e?parseFloat(e):e}));n[t][e]=s}))})),t.numericRefinements=n}return r(e,t)},p.make=function(e){var t=new p(e),i=e.hierarchicalFacets||[];return i.forEach((function(e){if(e.rootPath){var i=t.getHierarchicalRefinement(e.name);i.length>0&&0!==i[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),i=t.getHierarchicalRefinement(e.name),0===i.length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},p.validate=function(e,t){var i=t||{};return e.tagFilters&&i.tagRefinements&&i.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&i.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&i.numericRefinements&&a(i.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):a(e.numericRefinements)&&i.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},p.prototype={constructor:p,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:u.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:u.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:u.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:u.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,i){var n=c(i);if(this.isNumericRefined(e,t,n))return this;var o=r({},this.numericRefinements);return o[e]=r({},o[e]),o[e][t]?(o[e][t]=o[e][t].slice(),o[e][t].push(n)):o[e][t]=[n],this.setQueryParameters({numericRefinements:o})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,i){var n=i;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(i,o){return o===e&&i.op===t&&h(i.val,c(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(i,n){return n===e&&i.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,i){return i===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return a(this.numericRefinements)?{}:this.numericRefinements;if("string"===typeof e)return l(this.numericRefinements,[e]);if("function"===typeof e){var t=!1,i=this.numericRefinements,n=Object.keys(i).reduce((function(n,o){var s=i[o],r={};return s=s||{},Object.keys(s).forEach((function(i){var n=s[i]||[],a=[];n.forEach((function(t){var n=e({val:t,op:i},o,"numeric");n||a.push(t)})),a.length!==n.length&&(t=!0),r[i]=a})),n[o]=r,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return u.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:u.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return u.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:u.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return u.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:u.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return u.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:u.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return u.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:u.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return u.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:u.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:u.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:u.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:u.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var i=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),o={},s=void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+i));return s?-1===t.indexOf(i)?o[e]=[]:o[e]=[t.slice(0,t.lastIndexOf(i))]:o[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},o,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var i={};return i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&u.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&u.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&u.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var i=this.getHierarchicalRefinement(e);return t?-1!==i.indexOf(t):i.length>0},isNumericRefined:function(e,t,i){if(void 0===i&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===i||!n)return n;var o=c(i),s=void 0!==g(this.numericRefinements[e][t],o);return n&&s},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},i=this;return Object.keys(this).forEach((function(n){var o=i[n];-1===e.indexOf(n)&&void 0!==o&&(t[n]=o)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var i={};return i[e]=t,this.setQueryParameters(i)},setQueryParameters:function(e){if(!e)return this;var t=p.validate(this,e);if(t)throw t;var i=this,n=p._parseNumbers(e),o=Object.keys(this).reduce((function(e,t){return e[t]=i[t],e}),{}),s=Object.keys(n).reduce((function(e,t){var i=void 0!==e[t],o=void 0!==n[t];return i&&!o?l(e,[t]):(o&&(e[t]=n[t]),e)}),o);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!==typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return o(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var i=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n=t.split(i);return n.map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=p},40746:(e,t,i)=>{"use strict";e.exports=c;var n=i(80634),o=i(52718),s=i(73566),r=i(3352),a=n.escapeFacetValue,l=n.unescapeFacetValue;function c(e){return function(t,i){var n=e.hierarchicalFacets[i],o=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",r=e._getHierarchicalFacetSeparator(n),a=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),c=s(e._getHierarchicalFacetSortBy(n)),u=t.every((function(e){return e.exhaustive})),h=d(c,r,a,l,o),g=t;return a&&(g=t.slice(a.split(r).length)),g.reduce(h,{name:e.hierarchicalFacets[i].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:u,data:null})}}function d(e,t,i,n,s){return function(a,c,d){var g=a;if(d>0){var p=0;g=a;while(p{"use strict";var n=i(74996),o=i(20525),s=i(80634),r=i(52718),a=i(74920),l=i(73566),c=i(96853),d=i(3352),u=s.escapeFacetValue,h=s.unescapeFacetValue,g=i(40746);function p(e){var t={};return e.forEach((function(e,i){t[e]=i})),t}function f(e,t,i){t&&t[i]&&(e.stats=t[i])}function m(e,t){return r(e,(function(e){var i=e.attributes||[];return i.indexOf(t)>-1}))}function _(e,t,i){var s=t[0]||{};this._rawResults=t;var r=this;Object.keys(s).forEach((function(e){r[e]=s[e]}));var l=c({persistHierarchicalRootCount:!1},i);Object.keys(l).forEach((function(e){r[e]=l[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var d=e.getRefinedDisjunctiveFacets(),u=p(e.facets),_=p(e.disjunctiveFacets),v=1,b=s.facets||{};Object.keys(b).forEach((function(t){var i=b[t],n=m(e.hierarchicalFacets,t);if(n){var o=n.attributes.indexOf(t),l=a(e.hierarchicalFacets,(function(e){return e.name===n.name}));r.hierarchicalFacets[l][o]={attribute:t,data:i,exhaustive:s.exhaustiveFacetsCount}}else{var c,d=-1!==e.disjunctiveFacets.indexOf(t),h=-1!==e.facets.indexOf(t);d&&(c=_[t],r.disjunctiveFacets[c]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},f(r.disjunctiveFacets[c],s.facets_stats,t)),h&&(c=u[t],r.facets[c]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},f(r.facets[c],s.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),d.forEach((function(i){var n=t[v],l=n&&n.facets?n.facets:{},d=e.getHierarchicalFacetByName(i);Object.keys(l).forEach((function(t){var i,u=l[t];if(d){i=a(e.hierarchicalFacets,(function(e){return e.name===d.name}));var g=a(r.hierarchicalFacets[i],(function(e){return e.attribute===t}));if(-1===g)return;r.hierarchicalFacets[i][g].data=c({},r.hierarchicalFacets[i][g].data,u)}else{i=_[t];var p=s.facets&&s.facets[t]||{};r.disjunctiveFacets[i]={name:t,data:o({},u,p),exhaustive:n.exhaustiveFacetsCount},f(r.disjunctiveFacets[i],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!r.disjunctiveFacets[i].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(h(n))>-1&&(r.disjunctiveFacets[i].data[n]=0)}))}})),v++})),e.getRefinedHierarchicalFacets().forEach((function(i){var n=e.getHierarchicalFacetByName(i),s=e._getHierarchicalFacetSeparator(n),l=e.getHierarchicalRefinement(i);0===l.length||l[0].split(s).length<2||t.slice(v).forEach((function(t){var i=t&&t.facets?t.facets:{};Object.keys(i).forEach((function(t){var c=i[t],d=a(e.hierarchicalFacets,(function(e){return e.name===n.name})),u=a(r.hierarchicalFacets[d],(function(e){return e.attribute===t}));if(-1!==u){var h={};if(l.length>0&&!r.persistHierarchicalRootCount){var g=l[0].split(s)[0];h[g]=r.hierarchicalFacets[d][u].data[g]}r.hierarchicalFacets[d][u].data=o(h,c,r.hierarchicalFacets[d][u].data)}})),v++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var i=e.facetsExcludes[t],n=u[t];r.facets[n]={name:t,data:b[t],exhaustive:s.exhaustiveFacetsCount},i.forEach((function(e){r.facets[n]=r.facets[n]||{name:t},r.facets[n].data=r.facets[n].data||{},r.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(g(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function i(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=r(e.facets,i);return n?Object.keys(n.data).map((function(i){var o=u(i);return{name:i,escapedValue:o,count:n.data[i],isRefined:e._state.isFacetRefined(t,o),isExcluded:e._state.isExcludeRefined(t,i)}})):[]}if(e._state.isDisjunctiveFacet(t)){var o=r(e.disjunctiveFacets,i);return o?Object.keys(o.data).map((function(i){var n=u(i);return{name:i,escapedValue:n,count:o.data[i],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=r(e.hierarchicalFacets,i);if(!s)return s;var a=e._state.getHierarchicalFacetByName(t),l=e._state._getHierarchicalFacetSeparator(a),c=h(e._state.getHierarchicalRefinement(t)[0]||"");0===c.indexOf(a.rootPath)&&(c=c.replace(a.rootPath+l,""));var d=c.split(l);return d.unshift(t),b(s,d,0),s}}function b(e,t,i){e.isRefined=e.name===(t[i]&&t[i].trim()),e.data&&e.data.forEach((function(e){b(e,t,i+1)}))}function y(e,t,i,n){if(n=n||0,Array.isArray(t))return e(t,i[n]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return y(e,t,i,n+1)})),r=e(s,i[n]),a=o({data:r},t);return a}function w(e,t){return t.sort(e)}function C(e,t){var i=[],n=[],o=t.hide||[],s=t.order||[],r=s.reduce((function(e,t,i){return e[t]=i,e}),{});e.forEach((function(e){var t=e.path||e.name,s=o.indexOf(t)>-1;s||void 0===r[t]?s||n.push(e):i[r[t]]=e})),i=i.filter((function(e){return e}));var a,l=t.sortRemainingBy;return"hidden"===l?i:(a="alpha"===l?[["path","name"],["asc","asc"]]:[["count"],["desc"]],i.concat(d(n,a[0],a[1])))}function S(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}function k(e,t){var i=r(e,(function(e){return e.name===t}));return i&&i.stats}function x(e,t,i,n,o){var s=r(o,(function(e){return e.name===i})),a=s&&s.data&&s.data[n]?s.data[n]:0,l=s&&s.exhaustive||!1;return{type:t,attributeName:i,name:n,count:a,exhaustive:l}}function E(e,t,i,n){var o=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(o),a=i.split(s),l=r(n,(function(e){return e.name===t})),c=a.reduce((function(e,t){var i=e&&r(e.data,(function(e){return e.name===t}));return void 0!==i?i:e}),l),d=c&&c.count||0,u=c&&c.exhaustive||!1,h=c&&c.path||"";return{type:"hierarchical",attributeName:t,name:h,count:d,exhaustive:u}}_.prototype.getFacetByName=function(e){function t(t){return t.name===e}return r(this.facets,t)||r(this.disjunctiveFacets,t)||r(this.hierarchicalFacets,t)},_.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],_.prototype.getFacetValues=function(e,t){var i=v(this,e);if(i){var n,s=o({},t,{sortBy:_.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),r=this;if(Array.isArray(i))n=[e];else{var a=r._state.getHierarchicalFacetByName(i.name);n=a.attributes}return y((function(e,t){if(s.facetOrdering){var i=S(r,t);if(i)return C(e,i)}if(Array.isArray(s.sortBy)){var n=l(s.sortBy,_.DEFAULT_SORT);return d(e,n[0],n[1])}if("function"===typeof s.sortBy)return w(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),i,n)}},_.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?k(this.facets,e):this._state.isDisjunctiveFacet(e)?k(this.disjunctiveFacets,e):void 0},_.prototype.getRefinements=function(){var e=this._state,t=this,i=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(o){i.push(x(e,"facet",n,o,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(o){i.push(x(e,"exclude",n,o,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(o){i.push(x(e,"disjunctive",n,o,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(o){i.push(E(e,n,o,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){i.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){i.push({type:"tag",attributeName:"_tags",name:e})})),i},e.exports=_},16820:(e,t,i)=>{"use strict";var n=i(83480),o=i(24609),s=i(80634).escapeFacetValue,r=i(91937),a=i(96853),l=i(43284),c=i(39600),d=i(44486),u=i(29328),h=i(78747),g=i(55264),p=i(36350),f=i(54652),m=i(20107);function _(e,t,i,n){"function"===typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.setClient(e);var o=i||{};o.index=t,this.state=g.make(o),this.recommendState=new d({params:o.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function v(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function b(){return this.state.page}r(_,n),_.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},_.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},_.prototype.recommend=function(){return this._recommend(),this},_.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},_.prototype.searchOnce=function(e,t){var i=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(i.index,i),o=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:i}),!t)return this.client.search(n).then((function(e){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),{content:new p(i,e.results),state:i,_originalResponse:e}}),(function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),t(null,new p(i,e.results),i)})).catch((function(e){o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),t(e,null,i)}))},_.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,i=this.derivedHelpers[0];if(!i)return Promise.resolve([]);var n=i.getModifiedState(t),o=a({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:c(h._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!==typeof this.client.initIndex)throw new Error(s);var r=this.client.initIndex(n.index);if("function"!==typeof r.findAnswers)throw new Error(s);return r.findAnswers(n.query,e.queryLanguages,o)},_.prototype.searchForFacetValues=function(e,t,i,n){var o="function"===typeof this.client.searchForFacetValues&&"function"!==typeof this.client.searchForFacets,r="function"===typeof this.client.initIndex;if(!o&&!r&&"function"!==typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var a=this.state.setQueryParameters(n||{}),l=a.isDisjunctiveFacet(e),c=h.getSearchForFacetQuery(e,t,i,a);this._currentNbQueries++;var d,u=this;return o?d=this.client.searchForFacetValues([{indexName:a.index,params:c}]):r?d=this.client.initIndex(a.index).searchForFacetValues(c):(delete c.facetName,d=this.client.search([{type:"facet",facet:e,indexName:a.index,params:c}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:a,facet:e,query:t}),d.then((function(t){return u._currentNbQueries--,0===u._currentNbQueries&&u.emit("searchQueueEmpty"),t=Array.isArray(t)?t[0]:t,t.facetHits.forEach((function(t){t.escapedValue=s(t.value),t.isRefined=l?a.isDisjunctiveFacetRefined(e,t.escapedValue):a.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw u._currentNbQueries--,0===u._currentNbQueries&&u.emit("searchQueueEmpty"),e}))},_.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},_.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},_.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},_.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},_.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.addNumericRefinement=function(e,t,i){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,i),isPageReset:!0}),this},_.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},_.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},_.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},_.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},_.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},_.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},_.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},_.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},_.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},_.prototype.removeNumericRefinement=function(e,t,i){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,i),isPageReset:!0}),this},_.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},_.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},_.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},_.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},_.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},_.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},_.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},_.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},_.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},_.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},_.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},_.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},_.prototype.setCurrentPage=v,_.prototype.setPage=v,_.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},_.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},_.prototype.setState=function(e){return this._change({state:g.make(e),isPageReset:!1}),this},_.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new g(e),this},_.prototype.hasRefinements=function(e){return!!l(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},_.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},_.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},_.prototype.hasTag=function(e){return this.state.isTagRefined(e)},_.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},_.prototype.getIndex=function(){return this.state.index},_.prototype.getCurrentPage=b,_.prototype.getPage=b,_.prototype.getTags=function(){return this.state.tagRefinements},_.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e)){var i=this.state.getConjunctiveRefinements(e);i.forEach((function(e){t.push({value:e,type:"conjunctive"})}));var n=this.state.getExcludeRefinements(e);n.forEach((function(e){t.push({value:e,type:"exclude"})}))}else if(this.state.isDisjunctiveFacet(e)){var o=this.state.getDisjunctiveRefinements(e);o.forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var s=this.state.getNumericRefinements(e);return Object.keys(s).forEach((function(e){var i=s[e];t.push({value:i,operator:e,type:"numeric"})})),t},_.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},_.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},_.prototype._search=function(e){var t=this.state,i=[],n=[];e.onlyWithDerivedHelpers||(n=h._getQueries(t.index,t),i.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var o=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),o=n.index?h._getQueries(n.index,n):[];return i.push({state:n,queriesCount:o.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),o})),s=Array.prototype.concat.apply(n,o),r=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,i,r));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,i,r)).catch(this._dispatchAlgoliaError.bind(this,r))}catch(a){this.emit("error",{error:a})}},_.prototype._recommend=function(){var e=this.state,t=this.recommendState,i=this.getIndex(),n=[{state:t,index:i,helper:this}],o=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var s=this._recommendCache,r=this.derivedHelpers.map((function(t){var i=t.getModifiedState(e).index;if(!i)return[];var r=t.getModifiedRecommendState(new d);return n.push({state:r,index:i,helper:t}),o=Array.prototype.concat.apply(o,r.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:r,results:t.lastRecommendResults}}),r._buildQueries(i,s)})),a=Array.prototype.concat.apply(this.recommendState._buildQueries(i,s),r);if(0!==a.length)if(a.length>0&&"undefined"===typeof this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var l=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(a).then(this._dispatchRecommendResponse.bind(this,l,n,o)).catch(this._dispatchRecommendError.bind(this,l))}catch(c){this.emit("error",{error:c})}}},_.prototype._dispatchAlgoliaResponse=function(e,t,i){var n=this;if(!(t0},_.prototype._change=function(e){var t=e.state,i=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:i}))},_.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},_.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},_.prototype.setClient=function(e){return this.client===e||("function"===typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.client=e),this},_.prototype.getClient=function(){return this.client},_.prototype.derive=function(e,t){var i=new o(this,e,t);return this.derivedHelpers.push(i),i},_.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},_.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=_},74996:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},20525:e=>{"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(i){void 0!==t[i]&&(void 0!==e[i]&&delete e[i],e[i]=t[i])})),e}),{})}},80634:e=>{"use strict";function t(e){return"string"!==typeof e?e:String(e).replace(/^-/,"\\-")}function i(e){return"string"!==typeof e?e:e.replace(/^\\-/,"-")}e.exports={escapeFacetValue:t,unescapeFacetValue:i}},52718:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var i=0;i{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var i=0;i{e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},73566:(e,t,i)=>{"use strict";var n=i(52718);e.exports=function(e,t){var i=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var o=t.split(":"),s=n(i,(function(e){return e[0]===o[0]}));return o.length>1||!s?(e[0].push(o[0]),e[1].push(o[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},91937:e=>{"use strict";function t(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}e.exports=t},3092:e=>{"use strict";function t(e,t){return e.filter((function(i,n){return t.indexOf(i)>-1&&e.indexOf(i)===n}))}e.exports=t},96853:e=>{"use strict";function t(e){return"object"===typeof e&&null!==e?n(Array.isArray(e)?[]:{},e):e}function i(e){return"function"===typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function n(e,o){if(e===o)return e;for(var s in o)if(Object.prototype.hasOwnProperty.call(o,s)&&"__proto__"!==s&&"constructor"!==s){var r=o[s],a=e[s];"undefined"!==typeof a&&"undefined"===typeof r||(i(a)&&i(r)?e[s]=n(a,r):e[s]=t(r))}return e}function o(e){i(e)||(e={});for(var t=1,o=arguments.length;t{"use strict";function t(e){return e&&Object.keys(e).length>0}e.exports=t},39600:e=>{"use strict";function t(e,t){if(null===e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}e.exports=t},3352:e=>{"use strict";function t(e,t){if(e!==t){var i=void 0!==e,n=null===e,o=void 0!==t,s=null===t;if(!s&&e>t||n&&o||!i)return 1;if(!n&&e=n.length?s:"desc"===n[o]?-s:s}return e.index-i.index})),o.map((function(e){return e.value}))}e.exports=i},52482:e=>{"use strict";function t(e){if("number"===typeof e)return e;if("string"===typeof e)return parseFloat(e);if(Array.isArray(e))return e.map(t);throw new Error("The value should be a number, a parsable string or an array of those.")}e.exports=t},78747:(e,t,i)=>{"use strict";var n=i(96853);function o(e){return Object.keys(e).sort().reduce((function(t,i){return t[i]=e[i],t}),{})}var s={_getQueries:function(e,t){var i=[];return i.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){i.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var o=t.getHierarchicalFacetByName(n),r=t.getHierarchicalRefinement(n),a=t._getHierarchicalFacetSeparator(o);if(r.length>0&&r[0].split(a).length>1){var l=r[0].split(a).slice(0,-1).reduce((function(e,t,i){return e.concat({attribute:o.attributes[i],value:0===i?t:[e[e.length-1].value,t].join(a)})}),[]);l.forEach((function(n,r){var a=s._getDisjunctiveFacetSearchParams(t,n.attribute,0===r);function c(e){return o.attributes.some((function(t){return t===e.split(":")[0]}))}var d=(a.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var i=t.filter((function(e){return!c(e)}));i.length>0&&e.push(i)}return"string"!==typeof t||c(t)||e.push(t),e}),[]),u=l[r-1];r>0?a.facetFilters=d.concat(u.attribute+":"+u.value):d.length>0?a.facetFilters=d:delete a.facetFilters,i.push({indexName:e,params:a})}))}})),i},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),i=s._getFacetFilters(e),r=s._getNumericFilters(e),a=s._getTagFilters(e),l={};return t.length>0&&(l.facets=t.indexOf("*")>-1?["*"]:t),a.length>0&&(l.tagFilters=a),i.length>0&&(l.facetFilters=i),r.length>0&&(l.numericFilters=r),o(n({},e.getQueryParams(),l))},_getDisjunctiveFacetSearchParams:function(e,t,i){var r=s._getFacetFilters(e,t,i),a=s._getNumericFilters(e,t),l=s._getTagFilters(e),c={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};l.length>0&&(c.tagFilters=l);var d=e.getHierarchicalFacetByName(t);return c.facets=d?s._getDisjunctiveHierarchicalFacetAttribute(e,d,i):t,a.length>0&&(c.numericFilters=a),r.length>0&&(c.facetFilters=r),o(n({},e.getQueryParams(),c))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var i=[];return Object.keys(e.numericRefinements).forEach((function(n){var o=e.numericRefinements[n]||{};Object.keys(o).forEach((function(e){var s=o[e]||[];t!==n&&s.forEach((function(t){if(Array.isArray(t)){var o=t.map((function(t){return n+e+t}));i.push(o)}else i.push(n+e+t)}))}))})),i},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,i){var n=[],o=e.facetsRefinements||{};Object.keys(o).sort().forEach((function(e){var t=o[e]||[];t.slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).sort().forEach((function(e){var t=s[e]||[];t.sort().forEach((function(t){n.push(e+":-"+t)}))}));var r=e.disjunctiveFacetsRefinements||{};Object.keys(r).sort().forEach((function(e){var i=r[e]||[];if(e!==t&&i&&0!==i.length){var o=[];i.slice().sort().forEach((function(t){o.push(e+":"+t)})),n.push(o)}}));var a=e.hierarchicalFacetsRefinements||{};return Object.keys(a).sort().forEach((function(o){var s=a[o]||[],r=s[0];if(void 0!==r){var l,c,d=e.getHierarchicalFacetByName(o),u=e._getHierarchicalFacetSeparator(d),h=e._getHierarchicalRootPath(d);if(t===o){if(-1===r.indexOf(u)||!h&&!0===i||h&&h.split(u).length===r.split(u).length)return;h?(c=h.split(u).length-1,r=h):(c=r.split(u).length-2,r=r.slice(0,r.lastIndexOf(u))),l=d.attributes[c]}else c=r.split(u).length-1,l=d.attributes[c];l&&n.push([l+":"+r])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return e.hierarchicalFacets.reduce((function(t,i){var n=e.getHierarchicalRefinement(i.name)[0];if(!n)return t.push(i.attributes[0]),t;var o=e._getHierarchicalFacetSeparator(i),s=n.split(o).length,r=i.attributes.slice(0,s+1);return t.concat(r)}),t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,i){var n=e._getHierarchicalFacetSeparator(t);if(!0===i){var o=e._getHierarchicalRootPath(t),s=0;return o&&(s=o.split(n).length),[t.attributes[s]]}var r=e.getHierarchicalRefinement(t.name)[0]||"",a=r.split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,i,r){var a=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,l={facetQuery:t,facetName:e};return"number"===typeof i&&(l.maxFacetHits=i),o(n({},s._getHitsSearchParams(a),l))}};e.exports=s},5555:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},54652:(e,t,i)=>{"use strict";var n=i(52718),o=i(62862);function s(e,t){var i=[];return Object.keys(e).forEach((function(n){e[n].count<2&&(e[n].indexSum+=100),i.push({objectID:n,avgOfIndices:e[n].indexSum/t})})),i.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}function r(e){var t={};e.forEach((function(e){e.forEach((function(e,i){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+i,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:i,count:1}}))}));var i=s(t,e.length),r=i.reduce((function(t,i){var s=n(o(e),(function(e){return e.objectID===i.objectID}));return s?t.concat(s):t}),[]);return r}e.exports=r},20107:e=>{"use strict";e.exports="3.22.5"},7958:function(e,t,i){var n,o,s;(function(i,r){o=[],n=r,s="function"===typeof n?n.apply(t,o):n,void 0===s||(e.exports=s)})(0,(function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function n(e,t,i){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){l(n.response,t,i)},n.onerror=function(){console.error("could not download file")},n.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof i.g&&i.g.global===i.g?i.g:void 0,a=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,i){var a=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?s(l):o(l.href)?n(e,t,i):s(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){s(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,i,r){if(i=i||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,r),i);else if(o(e))n(e,i,r);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){s(a)}))}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,i);var s="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&l||a)&&"undefined"!=typeof FileReader){var d=new FileReader;d.onloadend=function(){var e=d.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},d.readAsDataURL(e)}else{var u=r.URL||r.webkitURL,h=u.createObjectURL(e);o?o.location=h:location.href=h,o=null,setTimeout((function(){u.revokeObjectURL(h)}),4e4)}});r.saveAs=l.saveAs=l,e.exports=l}))},55098:e=>{"use strict";var t=String.prototype.replace,i=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports={default:n.RFC3986,formatters:{RFC1738:function(e){return t.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986}},96734:(e,t,i)=>{"use strict";var n=i(7299),o=i(90029),s=i(55098);e.exports={formats:s,parse:o,stringify:n}},90029:(e,t,i)=>{"use strict";var n=i(64207),o=Object.prototype.hasOwnProperty,s=Array.isArray,r={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c="utf8=%26%2310003%3B",d="utf8=%E2%9C%93",u=function(e,t){var i,u={},h=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,g=t.parameterLimit===1/0?void 0:t.parameterLimit,p=h.split(t.delimiter,g),f=-1,m=t.charset;if(t.charsetSentinel)for(i=0;i-1&&(v=s(v)?[v]:v),o.call(u,_)?u[_]=n.combine(u[_],v):u[_]=v}return u},h=function(e,t,i,n){for(var o=n?t:l(t,i),s=e.length-1;s>=0;--s){var r,a=e[s];if("[]"===a&&i.parseArrays)r=[].concat(o);else{r=i.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,d=parseInt(c,10);i.parseArrays||""!==c?!isNaN(d)&&a!==c&&String(d)===c&&d>=0&&i.parseArrays&&d<=i.arrayLimit?(r=[],r[d]=o):"__proto__"!==c&&(r[c]=o):r={0:o}}o=r}return o},g=function(e,t,i,n){if(e){var s=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,r=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=i.depth>0&&r.exec(s),c=l?s.slice(0,l.index):s,d=[];if(c){if(!i.plainObjects&&o.call(Object.prototype,c)&&!i.allowPrototypes)return;d.push(c)}var u=0;while(i.depth>0&&null!==(l=a.exec(s))&&u{"use strict";var n=i(64207),o=i(55098),s=Object.prototype.hasOwnProperty,r={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Array.isArray,l=String.prototype.split,c=Array.prototype.push,d=function(e,t){c.apply(e,a(t)?t:[t])},u=Date.prototype.toISOString,h=o["default"],g={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return"string"===typeof e||"number"===typeof e||"boolean"===typeof e||"symbol"===typeof e||"bigint"===typeof e},f=function e(t,i,o,s,r,c,u,h,f,m,_,v,b,y){var w=t;if("function"===typeof u?w=u(i,w):w instanceof Date?w=m(w):"comma"===o&&a(w)&&(w=n.maybeMap(w,(function(e){return e instanceof Date?m(e):e}))),null===w){if(s)return c&&!b?c(i,g.encoder,y,"key",_):i;w=""}if(p(w)||n.isBuffer(w)){if(c){var C=b?i:c(i,g.encoder,y,"key",_);if("comma"===o&&b){for(var S=l.call(String(w),","),k="",x=0;x0?w.join(",")||null:void 0}];else if(a(u))E=u;else{var T=Object.keys(w);E=h?T.sort(h):T}for(var I=0;I0?_+p:""}},64207:(e,t,i)=>{"use strict";var n=i(55098),o=Object.prototype.hasOwnProperty,s=Array.isArray,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e){while(e.length>1){var t=e.pop(),i=t.obj[t.prop];if(s(i)){for(var n=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||s===n.RFC1738&&(40===d||41===d)?l+=a.charAt(c):d<128?l+=r[d]:d<2048?l+=r[192|d>>6]+r[128|63&d]:d<55296||d>=57344?l+=r[224|d>>12]+r[128|d>>6&63]+r[128|63&d]:(c+=1,d=65536+((1023&d)<<10|1023&a.charCodeAt(c)),l+=r[240|d>>18]+r[128|d>>12&63]+r[128|d>>6&63]+r[128|63&d])}return l},g=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"===typeof e?h+=":"+e:"symbol"===typeof e&&(h=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=i||u,d.getLevel=function(){return null!=l?l:null!=a?a:r},d.setLevel=function(e,t){return l=m(e),!1!==t&&g(l),c.call(d)},d.setDefaultLevel=function(e){a=m(e),p()||d.setLevel(e,!1)},d.resetLevel=function(){l=null,f(),c.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(s!==d&&(r=m(s.getLevel())),c.call(d),s===d)for(var e in o)o[e].rebuild()},r=m(s?s.getLevel():"WARN");var _=p();null!=_&&(l=m(_)),c.call(d)}s=new h,s.getLogger=function(e){if("symbol"!==typeof e&&"string"!==typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new h(e,s.methodFactory)),t};var g=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=g),s},s.getLoggers=function(){return o},s["default"]=s,s}))},26732:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CancellationTokenSource:()=>Tc,Emitter:()=>Ic,KeyCode:()=>Rc,KeyMod:()=>Dc,MarkerSeverity:()=>Mc,MarkerTag:()=>Fc,Position:()=>Nc,Range:()=>Ac,Selection:()=>Oc,SelectionDirection:()=>Pc,Token:()=>Wc,Uri:()=>Bc,default:()=>zc,editor:()=>Hc,languages:()=>Vc});var n={};i.r(n),i.d(n,{CancellationTokenSource:()=>Tc,Emitter:()=>Ic,KeyCode:()=>Rc,KeyMod:()=>Dc,MarkerSeverity:()=>Mc,MarkerTag:()=>Fc,Position:()=>Nc,Range:()=>Ac,Selection:()=>Oc,SelectionDirection:()=>Pc,Token:()=>Wc,Uri:()=>Bc,editor:()=>Hc,languages:()=>Vc});i(90141),i(92919),i(32378),i(80786),i(50877),i(14291),i(65340);var o=i(10113),s=(i(34588),i(29886),i(24655),i(26271),i(10111),i(15943),i(40147),i(32865),i(6132),i(23631),i(50416),i(8454),i(28369),i(23358),i(50239),i(15342),i(13977),i(86853),i(3815),i(39405),i(92048),i(87715),i(29754),i(54289),i(41699),i(97798),i(26642),i(12842),i(31903),i(54357),i(25135),i(70732),i(41439),i(35245),i(72239),i(27471),i(47414),i(26044),i(70151),i(98232),i(2845),i(92910),i(31252),i(90709),i(56673),i(48758),i(90445),i(52335),i(82397),i(71406),i(79266),i(21095),i(47883),i(29587),i(47641),i(92461),i(11501),i(95168),i(23479),i(18469),i(35011)),r=i(79184),a=i(62484),l=i(5091),c=i(20601),d=i(29133),u=i(74753),h=i(16259),g=i(94728),p=i(85603),f=i(9659),m=i(1352),_=i(21776),v=i(14396),b=i(6657),y=i(85053),w=i(41337);const C=!0;let S;function k(e,t){const i=globalThis.MonacoEnvironment;if(i){if("function"===typeof i.getWorker)return i.getWorker("workerMain.js",t);if("function"===typeof i.getWorkerUrl){const e=i.getWorkerUrl("workerMain.js",t);return new Worker(S?S.createScriptURL(e):e,{name:t,type:C?"module":void 0})}}if(e){const i=x(t,e.toString(!0)),n=new Worker(S?S.createScriptURL(i):i,{name:t,type:C?"module":void 0});return C?E(n):n}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function x(e,t,i){const n=/^((http:)|(https:)|(file:)|(vscode-file:))/.test(t);if(n&&t.substring(0,globalThis.origin.length)!==globalThis.origin);else{const i=t.lastIndexOf("?"),n=t.lastIndexOf("#",i),o=i>0?new URLSearchParams(t.substring(i+1,~n?n:void 0)):new URLSearchParams;b.SJ.addSearchParam(o,!0,!0);const s=o.toString();t=s?`${t}?${o.toString()}#${e}`:`${t}#${e}`}C||n||(t=new URL(t,globalThis.origin).toString());const o=new Blob([(0,y.Yc)([`/*${e}*/`,i?`globalThis.MonacoEnvironment = { baseUrl: '${i}' };`:void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify((0,w.Ec)())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify((0,w.i8)())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",C?`await import(ttPolicy?.createScriptURL('${t}') ?? '${t}');`:`importScripts(ttPolicy?.createScriptURL('${t}') ?? '${t}');`,C?"globalThis.postMessage({ type: 'vscode-worker-ready' });":void 0,`/*${e}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(o)}function E(e){return new Promise(((t,i)=>{e.onmessage=function(i){"vscode-worker-ready"===i.data.type&&(e.onmessage=null,t(e))},e.onerror=i}))}function L(e){return"function"===typeof e.then}S="object"===typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name&&void 0!==globalThis.workerttPolicy?globalThis.workerttPolicy:(0,_.H)("defaultWorkerFactory",{createScriptURL:e=>e});class T extends l.jG{constructor(e,t,i,n,o,s){super(),this.id=i,this.label=n;const r=k(e,n);L(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(t,[]),this.worker.then((e=>{e.onmessage=function(e){o(e.data)},e.onmessageerror=s,"function"===typeof e.addEventListener&&e.addEventListener("error",s)})),this._register((0,l.s)((()=>{this.worker?.then((e=>{e.onmessage=null,e.onmessageerror=null,e.removeEventListener("error",s),e.terminate()})),this.worker=null})))}getId(){return this.id}postMessage(e,t){this.worker?.then((i=>{try{i.postMessage(e,t)}catch(n){(0,v.dz)(n),(0,v.dz)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:n}))}}))}}class I{constructor(e,t){this.amdModuleId=e,this.label=t,this.esmModuleLocation=C?b.zl.asBrowserUri(`${e}.esm.js`):void 0}}class R{static{this.LAST_WORKER_ID=0}constructor(){this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++R.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new T(e.esmModuleLocation,e.amdModuleId,n,e.label||"anonymous"+n,t,(e=>{(0,m.logOnceWebWorkerWarning)(e),this._webWorkerFailedBeforeError=e,i(e)}))}}function D(e,t){const i="string"===typeof e?new I(e,t):e;return new m.SimpleWorkerClient(new R,i)}var N=i(8690),A=i(50395),O=i(92341),P=i(69361),M=i(56151),F=i(12660),B=i(84240),W=i(12847),H=i(42198),V=i(93866),j=i(44544),z=i(2150),U=i(11955),$=i(32899),q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},K=function(e,t){return function(i,n){t(i,n,e)}};const G=3e5;function Q(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let Y=class extends l.jG{constructor(e,t,i,n,o,s){super(),this._languageConfigurationService=o,this._modelService=t,this._workerManager=this._register(new X(e,this._modelService)),this._logService=n,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:async(e,t)=>{if(!Q(this._modelService,e.uri))return Promise.resolve({links:[]});const i=await this._workerWithResources([e.uri]),n=await i.$computeLinks(e.uri.toString());return n&&{links:n}}})),this._register(s.completionProvider.register("*",new Z(this._workerManager,i,this._modelService,this._languageConfigurationService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Q(this._modelService,e)}async computedUnicodeHighlights(e,t,i){const n=await this._workerWithResources([e]);return n.$computeUnicodeHighlights(e.toString(),t,i)}async computeDiff(e,t,i,n){const o=await this._workerWithResources([e,t],!0),s=await o.$computeDiff(e.toString(),t.toString(),i,n);if(!s)return null;const r={identical:s.identical,quitEarly:s.quitEarly,changes:a(s.changes),moves:s.moves.map((e=>new H.t(new V.WL(new j.M(e[0],e[1]),new j.M(e[2],e[3])),a(e[4]))))};return r;function a(e){return e.map((e=>new V.wm(new j.M(e[0],e[1]),new j.M(e[2],e[3]),e[4]?.map((e=>new V.q6(new N.Q(e[0],e[1],e[2],e[3]),new N.Q(e[4],e[5],e[6],e[7])))))))}}async computeMoreMinimalEdits(e,t,i=!1){if((0,y.EI)(t)){if(!Q(this._modelService,e))return Promise.resolve(t);const n=B.W.create(),o=this._workerWithResources([e]).then((n=>n.$computeMoreMinimalEdits(e.toString(),t,i)));return o.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed()))),Promise.race([o,(0,f.wR)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Q(this._modelService,e)}async navigateValueSet(e,t,i){const n=this._modelService.getModel(e);if(!n)return null;const o=this._languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),s=o.source,r=o.flags,a=await this._workerWithResources([e]);return a.$navigateValueSet(e.toString(),t,i,s,r)}canComputeWordRanges(e){return Q(this._modelService,e)}async computeWordRanges(e,t){const i=this._modelService.getModel(e);if(!i)return Promise.resolve(null);const n=this._languageConfigurationService.getLanguageConfiguration(i.getLanguageId()).getWordDefinition(),o=n.source,s=n.flags,r=await this._workerWithResources([e]);return r.$computeWordRanges(e.toString(),t,o,s)}async findSectionHeaders(e,t){const i=await this._workerWithResources([e]);return i.$findSectionHeaders(e.toString(),t)}async computeDefaultDocumentColors(e){const t=await this._workerWithResources([e]);return t.$computeDefaultDocumentColors(e.toString())}async _workerWithResources(e,t=!1){const i=await this._workerManager.withWorker();return await i.workerWithSyncedResources(e,t)}};Y=q([K(1,P.IModelService),K(2,M.ITextResourceConfigurationService),K(3,F.rr),K(4,A.JZ),K(5,W.ILanguageFeaturesService)],Y);class Z{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}async provideCompletionItems(e,t){const i=this._configurationService.getValue(e.uri,t,"editor");if("off"===i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestions)Q(this._modelService,e.uri)&&n.push(e.uri);else for(const d of this._modelService.getModels())Q(this._modelService,d.uri)&&(d===e?n.unshift(d.uri):"allDocuments"!==i.wordBasedSuggestions&&d.getLanguageId()!==e.getLanguageId()||n.push(d.uri));if(0===n.length)return;const o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),r=s?new N.Q(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):N.Q.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=await this._workerManager.withWorker(),c=await l.textualSuggest(n,s?.word,o);return c?{duration:c.duration,suggestions:c.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}}let X=class extends l.jG{constructor(e,t){super(),this._workerDescriptor=e,this._modelService=t,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();const i=this._register(new z.Be);i.cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(G/2),a.G),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;const e=this._modelService.getModels();0===e.length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;const e=(new Date).getTime()-this._lastWorkerUsedTime;e>G&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new ee(this._workerDescriptor,!1,this._modelService)),Promise.resolve(this._editorWorkerClient)}};X=q([K(1,P.IModelService)],X);class J{constructor(e){this._instance=e,this.proxy=this._instance}dispose(){this._instance.dispose()}setChannel(e,t){throw new Error("Not supported")}}let ee=class extends l.jG{constructor(e,t,i){super(),this._workerDescriptor=e,this._disposed=!1,this._modelService=i,this._keepIdleModels=t,this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(D(this._workerDescriptor)),$.EditorWorkerHost.setChannel(this._worker,this._createEditorWorkerHost())}catch(e){(0,m.logOnceWebWorkerWarning)(e),this._worker=this._createFallbackLocalWorker()}return this._worker}async _getProxy(){try{const e=this._getOrCreateWorker().proxy;return await e.$ping(),e}catch(e){return(0,m.logOnceWebWorkerWarning)(e),this._worker=this._createFallbackLocalWorker(),this._worker.proxy}}_createFallbackLocalWorker(){return new J(new O.EditorSimpleWorker(this._createEditorWorkerHost(),null))}_createEditorWorkerHost(){return{$fhr:(e,t)=>this.fhr(e,t)}}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new U.WorkerTextModelSyncClient(e,this._modelService,this._keepIdleModels))),this._modelManager}async workerWithSyncedResources(e,t=!1){if(this._disposed)return Promise.reject((0,v.aD)());const i=await this._getProxy();return this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i}async textualSuggest(e,t,i){const n=await this.workerWithSyncedResources(e),o=i.source,s=i.flags;return n.$textualSuggest(e.map((e=>e.toString())),t,o,s)}dispose(){super.dispose(),this._disposed=!0}};ee=q([K(2,P.IModelService)],ee);var te=i(40231),ie=i(67806),ne=i(15911),oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},se=function(e,t){return function(i,n){t(i,n,e)}};let re=class extends l.jG{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new te.vl),this._onCodeEditorAdd=this._register(new te.vl),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new te.vl),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new te.vl),this._onDiffEditorAdd=this._register(new te.vl),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new te.vl),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new ie.w,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i)){const e=this._modelProperties.get(i);return e.get(t)}}async openCodeEditor(e,t,i){for(const n of this._codeEditorOpenHandlers){const o=await n(e,t,i);if(null!==o)return o}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return(0,l.s)(t)}};re=oe([se(0,ne.Gy)],re);var ae=i(18904),le=i(59857),ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},de=function(e,t){return function(i,n){t(i,n,e)}};let ue=class extends re{constructor(e,t){super(t),this._register(this.onCodeEditorAdd((()=>this._checkContextKey()))),this._register(this.onCodeEditorRemove((()=>this._checkContextKey()))),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler((async(e,t,i)=>t?this.doOpenEditor(t,e):null)))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){const i=this.findModel(e,t.resource);if(!i){if(t.resource){const i=t.resource.scheme;if(i===b.ny.http||i===b.ny.https)return(0,z.CE)(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if("number"===typeof n.endLineNumber&&"number"===typeof n.endColumn)e.setSelection(n),e.revealRangeInCenter(n,1);else{const t={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};ue=ce([de(0,ae.fN),de(1,ne.Gy)],ue),(0,le.v)(g.T,ue,0);var he=i(87778);const ge=(0,he.u1)("layoutService");var pe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},fe=function(e,t){return function(i,n){t(i,n,e)}};let me=class{get mainContainer(){return(0,y.Fy)(this._codeEditorService.listCodeEditors())?.getContainerDomNode()??a.G.document.body}get activeContainer(){const e=this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor();return e?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return z.tG(this.mainContainer)}get activeContainerDimension(){return z.tG(this.activeContainer)}get containers(){return(0,y.Yc)(this._codeEditorService.listCodeEditors().map((e=>e.getContainerDomNode())))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=te.Jh.None,this.onDidLayoutActiveContainer=te.Jh.None,this.onDidLayoutContainer=te.Jh.None,this.onDidChangeActiveContainer=te.Jh.None,this.onDidAddContainer=te.Jh.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};me=pe([fe(0,g.T)],me);let _e=class extends me{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};_e=pe([fe(1,g.T)],_e),(0,le.v)(ge,me,1);var ve=i(73124),be=i(63466),ye=i(95062),we=i(57642),Ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Se=function(e,t){return function(i,n){t(i,n,e)}};const ke=!1;function xe(e){return e.scheme===b.ny.file?e.fsPath:e.path}let Ee=0;class Le{constructor(e,t,i,n,o,s,r){this.id=++Ee,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Te{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Ie{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements){const i=0===n.reason?e:t;i.push(n.resourceLabel)}const i=[];return e.length>0&&i.push(w.kg({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(w.kg({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Re{constructor(e,t,i,n,o,s,r){this.id=++Ee,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"===typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new Ie),this.removedResources.has(t)||this.removedResources.set(t,new Te(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Ie),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Te(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class De{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)1===t.type&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i=0;i--)t.push(this._future[i].id);return new we.To(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let r=0,a=this._past.length;r=t||s.id!==e.elements[n])&&(i=!1,o=0),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let r=this._future.length-1;r>=0;r--,n++){const o=this._future[r];i&&(n>=t||o.id!==e.elements[n])&&(i=!1,s=r),i||1!==o.type||o.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class Ne{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;tt.sourceOrder)&&(t=s,i=n))}return[t,i]}canUndo(e){if(e instanceof we.Ym){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.hasPastElements()}return!1}_onError(e,t){(0,v.dz)(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(a){return s(),n.dispose(),this._onError(a,e)}return r?r.then((()=>(s(),n.dispose(),o())),(t=>(s(),n.dispose(),this._onError(t,e)))):(s(),n.dispose(),o())}async _invokeWorkspacePrepare(e){if("undefined"===typeof e.actual.prepareUndoRedo)return l.jG.None;const t=e.actual.prepareUndoRedo();return"undefined"===typeof t?l.jG.None:t}_invokeResourcePrepare(e,t){if(1!==e.actual.type||"undefined"===typeof e.actual.prepareUndoRedo)return t(l.jG.None);const i=e.actual.prepareUndoRedo();return i?(0,l.Xm)(i)?t(i):i.then((e=>t(e))):t(l.jG.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Ae);return new Ne(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Pe(this._undo(e,0,!0));for(const o of t.strResources)this.removeElements(o);return this._notificationService.warn(n),new Pe}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,w.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,w.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const r of i.editStacks)r.getClosestPastElement()!==t&&o.push(r.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,w.kg({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const r of i.editStacks)r.locked&&s.push(r.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,w.kg({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,w.kg({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let o;(function(e){e[e["All"]=0]="All",e[e["This"]=1]="This",e[e["Cancel"]=2]="Cancel"})(o||(o={}));const{result:s}=await this._dialogService.prompt({type:ve.A.Info,message:w.kg("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:w.kg({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",i.editStacks.length),run:()=>o.All},{label:w.kg({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>o.This}],cancelButton:{run:()=>o.Cancel}});if(s===o.Cancel)return;if(s===o.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let o;try{o=await this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const s=this._checkWorkspaceUndo(e,t,i,!0);if(s)return o.dispose(),s.returnValue;for(const a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new Ne([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=w.kg({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&(s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n))}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof we.Ym){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"===typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(!o)return;if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}const s=o.sourceId!==t||o.confirmBeforeUndo;if(s&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{ke&&this._print("undo")}}async _confirmAndContinueUndo(e,t,i){const n=await this._dialogService.confirm({message:w.kg("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:w.kg({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:w.kg("confirmDifferentSource.no","No")});if(n.confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&(s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,w.kg({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const r of i.editStacks)r.locked&&s.push(r.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,w.kg({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,w.kg({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(s){return this._onError(s,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const r of i.editStacks)r.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new Ne([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=w.kg({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&(s.groupId===e&&(!t||s.groupOrder=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ye=function(e,t){return function(i,n){t(i,n,e)}};const Ze=z.$;let Xe=class extends je.x{get _targetWindow(){return z.zk(this._target.targetElements[0])}get _targetDocumentElement(){return z.zk(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return 2===this._hoverPosition?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,i,n,o,r){super(),this._keybindingService=t,this._configurationService=i,this._openerService=n,this._instantiationService=o,this._accessibilityService=r,this._messageListeners=new l.Cm,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new te.vl),this._onRequestLayout=this._register(new te.vl),this._linkHandler=e.linkHandler||(t=>(0,Ue.i)(this._openerService,t,(0,$e.VS)(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new et(e.target),this._hoverPointer=e.appearance?.showPointer?Ze("div.workbench-hover-pointer"):void 0,this._hover=this._register(new Ve.N4),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),e.appearance?.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=e.position?.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,(e=>e.stopPropagation())),this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.dispose()})),this._register(z.ko(this._targetWindow,"blur",(()=>this.dispose())));const a=Ze("div.hover-row.markdown-hover"),c=Ze("div.hover-contents");if("string"===typeof e.content)c.textContent=e.content,c.style.whiteSpace="pre-wrap";else if(z.sb(e.content))c.appendChild(e.content),c.classList.add("html-hover-contents");else{const t=e.content,i=this._instantiationService.createInstance(Ue.T,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||s.jU.fontFamily}),{element:n}=i.render(t,{actionHandler:{callback:e=>this._linkHandler(e),disposables:this._messageListeners},asyncRenderCallback:()=>{c.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});c.appendChild(n)}if(a.appendChild(c),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){const t=Ze("div.hover-row.status-bar"),i=Ze("div.actions");e.actions.forEach((e=>{const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;Ve.jQ.render(i,{label:e.label,commandId:e.commandId,run:t=>{e.run(t),this.dispose()},iconClass:e.iconClass},n)})),t.appendChild(i),this._hover.containerDomNode.appendChild(t)}let d;if(this._hoverContainer=Ze("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode),d=!(e.actions&&e.actions.length>0)&&(void 0===e.persistence?.hideOnHover?"string"===typeof e.content||(0,$e.VS)(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):e.persistence.hideOnHover),e.appearance?.showHoverHint){const e=Ze("div.hover-row.status-bar"),t=Ze("div.info");t.textContent=(0,w.kg)("hoverhint","Hold {0} key to mouse over",qe.zx?"Option":"Alt"),e.appendChild(t),this._hover.containerDomNode.appendChild(e)}const u=[...this._target.targetElements];d||u.push(this._hoverContainer);const h=this._register(new Je(u));if(this._register(h.onMouseOut((()=>{this._isLocked||this.dispose()}))),d){const e=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new Je(e)),this._register(this._lockMouseTracker.onMouseOut((()=>{this._isLocked||this.dispose()})))}else this._lockMouseTracker=h}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){const i=z.Hs(this._hoverContainer,Ze("div")),n=z.BC(this._hoverContainer,Ze("div"));i.tabIndex=0,n.tabIndex=0,this._register(z.ko(n,"focus",(t=>{e.focus(),t.preventDefault()}))),this._register(z.ko(i,"focus",(e=>{t.focus(),e.preventDefault()})))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return e}const n=this.findLastFocusableChild(i);if(n)return n}}render(e){e.appendChild(this._hoverContainer);const t=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement),i=t&&(0,Ve.vr)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());i&&(0,Ge.h5)(i),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=e=>{const t=z.mU(e),i=e.getBoundingClientRect();return{top:i.top*t,bottom:i.bottom*t,right:i.right*t,left:i.left*t}},t=this._target.targetElements.map((t=>e(t))),{top:i,right:n,bottom:o,left:s}=t[0],r=n-s,a=o-i,l={top:i,right:n,bottom:o,left:s,width:r,height:a,center:{x:s+r/2,y:i+a/2}};if(this.adjustHorizontalHoverPosition(l),this.adjustVerticalHoverPosition(l),this.adjustHoverMaxHeight(l),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:l.left+=3,l.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:l.left-=3,l.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:l.top+=3,l.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:l.top-=3,l.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}l.center.x=l.left+r/2,l.center.y=l.top+a/2}this.computeXCordinate(l),this.computeYCordinate(l),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(l)),this._hover.onContentsChanged()}computeXCordinate(e){const t=this._hover.containerDomNode.clientWidth+2;void 0!==this._target.x?this._x=this._target.x:1===this._hoverPosition?this._x=e.right:0===this._hoverPosition?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(void 0!==this._target.x)return;const t=this._hoverPointer?3:0;if(this._forcePosition){const i=t+2;1===this._hoverPosition?this._hover.containerDomNode.style.maxWidth=this._targetDocumentElement.clientWidth-e.right-i+"px":0===this._hoverPosition&&(this._hover.containerDomNode.style.maxWidth=e.left-i+"px")}else if(1===this._hoverPosition){const i=this._targetDocumentElement.clientWidth-e.right;if(i=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2}}else if(0===this._hoverPosition){const i=e.left;if(i=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2}e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1)}}adjustVerticalHoverPosition(e){if(void 0!==this._target.y||this._forcePosition)return;const t=this._hoverPointer?3:0;3===this._hoverPosition?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):2===this._hoverPosition&&e.bottom+this._hover.containerDomNode.clientHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){const i=2+(this._hoverPointer?3:0);3===this._hoverPosition?t=Math.min(t,e.top-i):2===this._hoverPosition&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-i))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=e.center.y-(this._y-t)-3+"px":this._hoverPointer.style.top=Math.round(t/2)-3+"px";break}case 3:case 2:{this._hoverPointer.classList.add(3===this._hoverPosition?"bottom":"top");const t=this._hover.containerDomNode.clientWidth;let i=Math.round(t/2)-3;const n=this._x+i;(ne.right)&&(i=e.center.x-this._x-3),this._hoverPointer.style.left=`${i}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};Xe=Qe([Ye(1,We.b),Ye(2,He.pG),Ye(3,ze.C),Ye(4,he._Y),Ye(5,Ke.j)],Xe);class Je extends je.x{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new te.vl),this._elements.forEach((e=>this.onmouseover(e,(()=>this._onTargetMouseOver(e))))),this._elements.forEach((e=>this.onmouseleave(e,(()=>this._onTargetMouseLeave(e)))))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=z.zk(e).setTimeout((()=>this._fireIfMouseOutside()),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(z.zk(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class et{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var tt,it=i(68389),nt=i(12402),ot=i(21542);function st(e){const t=e;return!!t&&"number"===typeof t.x&&"number"===typeof t.y}function rt(e,t,i){const n=i.mode===tt.ALIGN?i.offset:i.offset+i.size,o=i.mode===tt.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}(function(e){e[e["AVOID"]=0]="AVOID",e[e["ALIGN"]=1]="ALIGN"})(tt||(tt={}));class at extends l.jG{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=l.jG.None,this.toDisposeOnSetContainer=l.jG.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=z.$(".context-view"),z.jD(this.view),this.setContainer(e,t),this._register((0,l.s)((()=>this.setContainer(null,1))))}setContainer(e,t){this.useFixedPosition=1!==t;const i=this.useShadowDOM;if(this.useShadowDOM=3===t,(e!==this.container||i!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=z.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=lt,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(z.$("slot"))}else this.container.appendChild(this.view);const t=new l.Cm;at.BUBBLE_UP_EVENTS.forEach((e=>{t.add(z.b2(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),at.BUBBLE_DOWN_EVENTS.forEach((e=>{t.add(z.b2(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=t}}show(e){this.isVisible()&&this.hide(),z.w_(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",z.WU(this.view),this.toDisposeOnClean=e.render(this.view)||l.jG.None,this.delegate=e,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||qe.un&&nt.e.pointerEvents?(this.delegate?.layout?.(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(z.sb(e)){const i=z.BK(e),n=z.mU(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=st(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=z.Tr(this.view),n=z.OK(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,r=this.delegate.anchorAxisAlignment||0;let a,l;const c=z.fz();if(0===r){const e={offset:t.top-c.pageYOffset,size:t.height,position:0===o?0:1},r={offset:t.left,size:t.width,position:0===s?0:1,mode:tt.ALIGN};a=rt(c.innerHeight,n,e)+c.pageYOffset,ot.Q.intersects({start:a,end:a+n},{start:e.offset,end:e.offset+e.size})&&(r.mode=tt.AVOID),l=rt(c.innerWidth,i,r)}else{const e={offset:t.left,size:t.width,position:0===s?0:1},r={offset:t.top,size:t.height,position:0===o?0:1,mode:tt.ALIGN};l=rt(c.innerWidth,i,e),ot.Q.intersects({start:l,end:l+i},{start:e.offset,end:e.offset+e.size})&&(r.mode=tt.AVOID),a=rt(c.innerHeight,n,r)+c.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===s?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=z.BK(this.container);this.view.style.top=a-(this.useFixedPosition?z.BK(this.view).top:d.top)+"px",this.view.style.left=l-(this.useFixedPosition?z.BK(this.view).left:d.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),z.jD(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,z.zk(e).document.activeElement):t&&!z.QX(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}const lt='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var ct=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},dt=function(e,t){return function(i,n){t(i,n,e)}};let ut=class extends l.jG{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new at(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer((()=>this.layout())))}showContextView(e,t,i){let n;n=t?t===this.layoutService.getContainer((0,z.zk)(t))?1:i?3:2:1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);const o={close:()=>{this.openContextView===o&&this.hideContextView()}};return this.openContextView=o,o}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};ut=ct([dt(0,ge)],ut);class ht extends ut{getContextViewElement(){return this.contextView.getViewElement()}}var gt=i(67792),pt=i(50322);class ft{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(void 0===e||(0,pt.Kg)(e)||(0,z.sb)(e))n=e;else if((0,pt.Tn)(e.markdown)){this._hoverWidget||this.show((0,w.kg)("iconLabel.loading","Loading..."),t,i),this._cancellationTokenSource=new gt.Qi;const o=this._cancellationTokenSource.token;if(n=await e.markdown(o),void 0===n&&(n=e.markdownNotSupportedFallback),this.isDisposed||o.isCancellationRequested)return}else n=e.markdown??e.markdownNotSupportedFallback;this.show(n,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const o={content:e,target:this.target,actions:i?.actions,linkHandler:i?.linkHandler,trapFocus:i?.trapFocus,appearance:{showPointer:"element"===this.hoverDelegate.placement,skipFadeInAnimation:!this.fadeInAnimation||!!n,showHoverHint:i?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(o,t)}n?.dispose()}hasContent(e){return!!e&&(!(0,$e.VS)(e)||!!e.value)}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}var mt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_t=function(e,t){return function(i,n){t(i,n,e)}};let vt=class extends l.jG{constructor(e,t,i,n,o){super(),this._instantiationService=e,this._keybindingService=i,this._layoutService=n,this._accessibilityService=o,this._managedHovers=new Map,t.onDidShowContextMenu((()=>this.hideHover())),this._contextViewHandler=this._register(new ut(this._layoutService))}showHover(e,t,i){if(bt(this._currentHoverOptions)===bt(e))return;if(this._currentHover&&this._currentHoverOptions?.persistence?.sticky)return;this._currentHoverOptions=e,this._lastHoverOptions=e;const n=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),o=(0,z.bq)();i||(n&&o?o.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=o):this._lastFocusedElementBeforeOpen=void 0);const s=new l.Cm,r=this._instantiationService.createInstance(Xe,e);if(e.persistence?.sticky&&(r.isLocked=!0),r.onDispose((()=>{const t=this._currentHover?.domNode&&(0,z.nR)(this._currentHover.domNode);t&&this._lastFocusedElementBeforeOpen?.focus(),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),s.dispose()}),void 0,s),!e.container){const t=(0,z.sb)(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer((0,z.zk)(t))}if(this._contextViewHandler.showContextView(new yt(r,t),e.container),r.onRequestLayout((()=>this._contextViewHandler.layout()),void 0,s),e.persistence?.sticky)s.add((0,z.ko)((0,z.zk)(e.container).document,z.Bx.MOUSE_DOWN,(e=>{(0,z.QX)(e.target,r.domNode)||this.doHideHover()})));else{if("targetElements"in e.target)for(const i of e.target.targetElements)s.add((0,z.ko)(i,z.Bx.CLICK,(()=>this.hideHover())));else s.add((0,z.ko)(e.target,z.Bx.CLICK,(()=>this.hideHover())));const t=(0,z.bq)();if(t){const i=(0,z.zk)(t).document;s.add((0,z.ko)(t,z.Bx.KEY_DOWN,(t=>this._keyDown(t,r,!!e.persistence?.hideOnKeyDown)))),s.add((0,z.ko)(i,z.Bx.KEY_DOWN,(t=>this._keyDown(t,r,!!e.persistence?.hideOnKeyDown)))),s.add((0,z.ko)(t,z.Bx.KEY_UP,(e=>this._keyUp(e,r)))),s.add((0,z.ko)(i,z.Bx.KEY_UP,(e=>this._keyUp(e,r))))}}if("IntersectionObserver"in a.G){const t=new IntersectionObserver((e=>this._intersectionChange(e,r)),{threshold:0}),i="targetElements"in e.target?e.target.targetElements[0]:e.target;t.observe(i),s.add((0,l.s)((()=>t.disconnect())))}return this._currentHover=r,r}hideHover(){!this._currentHover?.isLocked&&this._currentHoverOptions&&this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,t){const i=e[e.length-1];i.isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,t,i){if("Alt"===e.key)return void(t.isLocked=!0);const n=new it.Z(e),o=this._keybindingService.resolveKeyboardEvent(n);o.getSingleModifierDispatchChords().some((e=>!!e))||0!==this._keybindingService.softDispatch(n,n.target).kind||!i||this._currentHoverOptions?.trapFocus&&"Tab"===e.key||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus())}_keyUp(e,t){"Alt"===e.key&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus()))}setupManagedHover(e,t,i,n){let o,s;t.setAttribute("custom-hover","true"),""!==t.title&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",t.title),t.title="");const r=(t,i)=>{const n=void 0!==s;t&&(s?.dispose(),s=void 0),i&&(o?.dispose(),o=void 0),n&&(e.onDidHideHover?.(),s=void 0)},a=(o,r,a,l)=>new f.pc((async()=>{s&&!s.isDisposed||(s=new ft(e,a||t,o>0),await s.update("function"===typeof i?i():i,r,{...n,trapFocus:l}))}),o);let c=!1;const d=(0,z.ko)(t,z.Bx.MOUSE_DOWN,(()=>{c=!0,r(!0,!0)}),!0),u=(0,z.ko)(t,z.Bx.MOUSE_UP,(()=>{c=!1}),!0),h=(0,z.ko)(t,z.Bx.MOUSE_LEAVE,(e=>{c=!1,r(!1,e.fromElement===t)}),!0),g=i=>{if(o)return;const n=new l.Cm,s={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{s.x=e.x+10,(0,z.sb)(e.target)&&wt(e.target,t)!==t&&r(!0,!0)};n.add((0,z.ko)(t,z.Bx.MOUSE_MOVE,e,!0))}o=n,(0,z.sb)(i.target)&&wt(i.target,t)!==t||n.add(a(e.delay,!1,s))},p=(0,z.ko)(t,z.Bx.MOUSE_OVER,g,!0),m=()=>{if(c||o)return;const i={targetElements:[t],dispose:()=>{}},n=new l.Cm,s=()=>r(!0,!0);n.add((0,z.ko)(t,z.Bx.BLUR,s,!0)),n.add(a(e.delay,!1,i)),o=n};let _;const v=t.tagName.toLowerCase();"input"!==v&&"textarea"!==v&&(_=(0,z.ko)(t,z.Bx.FOCUS,m,!0));const b={show:e=>{r(!1,!0),a(0,e,void 0,e)},hide:()=>{r(!0,!0)},update:async(e,t)=>{i=e,await(s?.update(i,void 0,t))},dispose:()=>{this._managedHovers.delete(t),p.dispose(),h.dispose(),d.dispose(),u.dispose(),_?.dispose(),r(!0,!0)}};return this._managedHovers.set(t,b),b}showManagedHover(e){const t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach((e=>e.dispose())),super.dispose()}};function bt(e){if(void 0!==e)return e?.id??e}vt=mt([_t(0,he._Y),_t(1,Be.Z),_t(2,We.b),_t(3,ge),_t(4,Ke.j)],vt);class yt{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function wt(e,t){t=t??(0,z.zk)(e).document.body;while(!e.hasAttribute("custom-hover")&&e!==t)e=e.parentElement;return e}(0,le.v)(Fe.TN,vt,1),(0,ne.zy)(((e,t)=>{const i=e.getColor(Me.oZ8);i&&(t.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`))}));var Ct=i(48770),St=i(3176),kt=i(97744),xt=i(28346),Et=i(36788),Lt=i(64037),Tt=i(72786),It=i(21553),Rt=i(27503),Dt=i(16374);function Nt(e){return Object.isFrozen(e)?e:p.ol(e)}class At{static createEmptyModel(e){return new At({},[],[],void 0,e)}constructor(e,t,i,n,o){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.logService=o,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const e=this.raw.map((e=>{if(e instanceof At)return e;const t=new Ot("",this.logService);return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,He.gD)(this.contents,e):this.contents}inspect(e,t){const i=this;return{get value(){return Nt(i.rawConfiguration.getValue(e))},get override(){return t?Nt(i.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return Nt(t?i.rawConfiguration.override(t).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){const t=[];for(const{contents:n,identifiers:o,keys:s}of i.rawConfiguration.overrides){const r=new At(n,s,[],void 0,i.logService).getValue(e);void 0!==r&&t.push({identifiers:o,value:r})}return t.length?Nt(t):void 0}}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?(0,He.gD)(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=p.Go(this.contents),i=p.Go(this.overrides),n=[...this.keys],o=this.raw?.length?[...this.raw]:[this];for(const s of e)if(o.push(...s.raw?.length?s.raw:[s]),!s.isEmpty()){this.mergeContents(t,s.contents);for(const e of s.overrides){const[t]=i.filter((t=>y.aI(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=y.dM(t.keys)):i.push(p.Go(e))}for(const e of s.keys)-1===n.indexOf(e)&&n.push(e)}return new At(t,n,i,o.every((e=>e instanceof At))?void 0:o,this.logService)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!==typeof t||!Object.keys(t).length)return this;const i={};for(const n of y.dM([...Object.keys(this.contents),...Object.keys(t)])){let e=this.contents[n];const o=t[n];o&&("object"===typeof e&&"object"===typeof o?(e=p.Go(e),this.mergeContents(e,o)):e=o),i[n]=e}return new At(i,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&pt.Gv(e[i])&&pt.Gv(t[i])?this.mergeContents(e[i],t[i]):e[i]=p.Go(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=p.Go(e))};for(const o of this.overrides)1===o.identifiers.length&&o.identifiers[0]===e?t=o.contents:o.identifiers.includes(e)&&n(o.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),(0,He.iB)(this.contents,e),Rt.rC.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>y.aI(t.identifiers,(0,Rt.Gv)(e)))),1))}updateValue(e,t,i){if((0,He.kW)(this.contents,e,t,(e=>this.logService.error(e))),i=i||-1===this.keys.indexOf(e),i&&this.keys.push(e),Rt.rC.test(e)){const t=(0,Rt.Gv)(e),i={identifiers:t,keys:Object.keys(this.contents[e]),contents:(0,He.ad)(this.contents[e],(e=>this.logService.error(e)))},n=this.overrides.findIndex((e=>y.aI(e.identifiers,t)));-1!==n?this.overrides[n]=i:this.overrides.push(i)}}}class Ot{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||At.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:o,restricted:s,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new At(i,n,o,r?[e]:void 0,this.logService),this._restrictedConfigurations=s||[]}doParseRaw(e,t){const i=Dt.O.as(Rt.Fd.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);e=n.raw;const o=(0,He.ad)(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`))),s=Object.keys(e),r=this.toOverrides(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`)));return{contents:o,keys:s,overrides:r,restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){let o=!1;if(!n?.scopes&&!n?.skipRestricted&&!n?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:o};const s={},r=[];for(const a in e)if(Rt.rC.test(a)&&i){const i=this.filter(e[a],t,!1,n);s[a]=i.raw,o=o||i.hasExcludedProperties,r.push(...i.restricted)}else{const i=t[a],l=i?"undefined"!==typeof i.scope?i.scope:3:void 0;i?.restricted&&r.push(a),n.exclude?.includes(a)||!n.include?.includes(a)&&(void 0!==l&&void 0!==n.scopes&&!n.scopes.includes(l)||n.skipRestricted&&i?.restricted)?o=!0:s[a]=e[a]}return{raw:s,restricted:r,hasExcludedProperties:o}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(Rt.rC.test(n)){const o={};for(const t in e[n])o[t]=e[n][t];i.push({identifiers:(0,Rt.Gv)(n),keys:Object.keys(o),contents:(0,He.ad)(o,t)})}return i}}class Pt{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=o,this.policyConfiguration=s,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=c,this.workspaceConfiguration=d,this.folderConfigurationModel=u,this.memoryConfigurationModel=h}toInspectValue(e){return void 0!==e?.value||void 0!==e?.override||void 0!==e?.overrides?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class Mt{constructor(e,t,i,n,o,s,r,a,l,c){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=o,this._workspaceConfiguration=s,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this.logService=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new It.fT,this._userConfiguration=null}getValue(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i);return n.getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=At.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),o=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const a of n.overrides)for(const t of a.identifiers)void 0!==n.getOverrideValue(e,t)&&r.add(t);return new Pt(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,o||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e,t){const i=this.parseConfigurationModel(e.defaults,t),n=this.parseConfigurationModel(e.policy,t),o=this.parseConfigurationModel(e.application,t),s=this.parseConfigurationModel(e.user,t),r=this.parseConfigurationModel(e.workspace,t),a=e.folders.reduce(((e,i)=>(e.set(d.r.revive(i[0]),this.parseConfigurationModel(i[1],t)),e)),new It.fT);return new Mt(i,n,o,s,At.createEmptyModel(t),r,a,At.createEmptyModel(t),new It.fT,t)}static parseConfigurationModel(e,t){return new At(e.contents,e.keys,e.overrides,void 0,t)}}class Ft{constructor(e,t,i,n,o){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this.logService=o,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const s of e.keys)this.affectedKeys.add(s);for(const[,s]of e.overrides)for(const e of s)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Mt.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){const i=this._marker+e,n=this._affectsConfigStr.indexOf(i);if(n<0)return!1;const o=n+i.length;if(o>=this._affectsConfigStr.length)return!1;const s=this._affectsConfigStr.charCodeAt(o);if(s!==this._markerCode1&&s!==this._markerCode2)return!1;if(t){const i=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,n=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!p.aI(i,n)}return!0}}var Bt=i(53790);const Wt={kind:0},Ht={kind:1};function Vt(e,t,i){return{kind:2,commandId:e,commandArgs:t,isBubble:i}}class jt{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const n of e){const e=n.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=jt.handleRemovals([].concat(e).concat(t));for(let n=0,o=this._keybindings.length;n=0;n--){const e=i[n];if(e.command===t.command)continue;let o=!0;for(let i=1;i=0;n--){const e=i[n];if(t.contextMatchesRules(e.when))return e}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const o=this._map.get(n[0]);if(void 0===o)return this._log("\\ No keybinding entries."),Wt;let s=null;if(n.length<2)s=o;else{s=[];for(let e=0,t=o.length;et.chords.length)continue;let i=!0;for(let e=1;e=0;i--){const n=t[i];if(jt._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function zt(e){return e?`${e.serialize()}`:"no when condition"}function Ut(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const $t=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class qt extends l.jG{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:te.Jh.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new te.vl),this._currentChords=[],this._currentChordChecker=new f.vb,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Kt.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new f.pc,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),Wt;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),Wt;const o=this._contextKeyService.getContext(t),s=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(o,s,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw(0,v.iH)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(w.kg("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(w.kg("next.chord","({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),Bt.M.enabled&&Bt.M.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],Bt.M.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Kt.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Kt.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=i.getChords();return this._ignoreSingleModifiers=new Kt(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let o=null,s=null;if(i){const[t]=e.getSingleModifierDispatchChords();o=t,s=t?[t]:[]}else[o]=e.getDispatchChords(),s=this._currentChords.map((({keypress:e})=>e));if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(r,s,o);switch(l.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",a,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${a}".`),this._notificationService.status(w.kg("missing.chord","The key combination ({0}, {1}) is not a command.",e,a),{hideAfter:1e4}),this._leaveChordMode(),n=!0}return n;case 1:return this._logService.trace("KeybindingService#dispatch",a,"[ Several keybindings match - more chords needed ]"),n=!0,this._expectAnotherChord(o,a),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),n;case 2:if(this._logService.trace("KeybindingService#dispatch",a,`[ Will dispatch command ${l.commandId} ]`),null===l.commandId||""===l.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${a}".`),this._notificationService.status(w.kg("missing.chord","The key combination ({0}, {1}) is not a command.",e,a),{hideAfter:1e4}),this._leaveChordMode(),n=!0}}else{this.inChordMode&&this._leaveChordMode(),l.isBubble||(n=!0),this._log(`+ Invoking command ${l.commandId}.`),this._currentlyDispatchingCommandId=l.commandId;try{"undefined"===typeof l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e)))}finally{this._currentlyDispatchingCommandId=null}$t.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return n}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class Kt{static{this.EMPTY=new Kt(null)}constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}var Gt=i(78386);class Qt{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Yt(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=Yt(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=r}}function Yt(e){const t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return Xt.r0.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Xt.rr.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return Xt.G$.toLabel(this._os,this._chords,(e=>this._getUserSettingsLabel(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new Ct.FW(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class ei extends Jt{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Zt.YM.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Zt.YM.toString(e.keyCode)}_getElectronAccelerator(e){return Zt.YM.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=Zt.YM.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return ei.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=Zt.YM.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=Zt.Fo[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof Ct.dG)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new Ct.dG(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=Yt(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new ei(i,t)]:[]}}var ti=i(48056),ii=i(44838),ni=i(11086),oi=i(81714),si=i(340),ri=i(84366),ai=i(17602),li=i(64189),ci=i(55664),di=i(85141),ui=i(6330),hi=i(46274),gi=i(88758),pi=i(25201),fi=i(48038),mi=i(64236),_i=i(37800),vi=i(25923),bi=i(79855),yi=i(23740),wi=i(74529);const Ci=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Si=/(&)?(&)([^\s&])/g;var ki,xi;(function(e){e[e["Right"]=0]="Right",e[e["Left"]=1]="Left"})(ki||(ki={})),function(e){e[e["Above"]=0]="Above",e[e["Below"]=1]="Below"}(xi||(xi={}));class Ei extends fi.E{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const o=document.createElement("div");o.classList.add("monaco-menu"),o.setAttribute("role","presentation"),super(o,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...qe.zx||qe.j9?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=o,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(pi.q.addTarget(o)),this._register((0,z.ko)(o,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e);t.equals(2)&&e.preventDefault()}))),i.enableMnemonics&&this._register((0,z.ko)(o,z.Bx.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){z.fs.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Ti&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),qe.j9&&this._register((0,z.ko)(o,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),z.fs.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),z.fs.stop(e,!0))}))),this._register((0,z.ko)(this.domNode,z.Bx.MOUSE_OUT,(e=>{const t=e.relatedTarget;(0,z.QX)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,z.ko)(this.actionsList,z.Bx.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,z.QX)(t,this.actionsList)&&t!==this.actionsList){while(t.parentElement!==this.actionsList&&null!==t.parentElement)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(pi.q.addTarget(this.actionsList)),this._register((0,z.ko)(this.actionsList,pi.B.Tap,(e=>{let t=e.initialTarget;if(t&&(0,z.QX)(t,this.actionsList)&&t!==this.actionsList){while(t.parentElement!==this.actionsList&&null!==t.parentElement)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new _i.MU(o,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register((0,z.ko)(o,pi.B.Change,(e=>{z.fs.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register((0,z.ko)(r,z.Bx.MOUSE_UP,(e=>{e.preventDefault()})));const a=(0,z.zk)(e);o.style.maxHeight=`${Math.max(10,a.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(((e,n)=>{if(i.submenuIds?.has(e.id))return console.warn(`Found submenu cycle: ${e.id}`),!1;if(e instanceof ci.wv){if(n===t.length-1||0===n)return!1;const e=t[n-1];if(e instanceof ci.wv)return!1}return!0})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof Ii))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||((0,z.Cl)(e)?this.styleSheet=(0,z.li)(e):(Ei.globalStyleSheet||(Ei.globalStyleSheet=(0,z.li)()),this.styleSheet=Ei.globalStyleSheet)),this.styleSheet.textContent=Ni(t,(0,z.Cl)(e))}styleScrollElement(e,t){const i=t.foregroundColor??"",n=t.backgroundColor??"",o=t.borderColor?`1px solid ${t.borderColor}`:"",s="5px",r=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=o,e.style.borderRadius=s,e.style.color=i,e.style.backgroundColor=n,e.style.boxShadow=r}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register((0,z.ko)(this.element,z.Bx.MOUSE_UP,(e=>{if(z.fs.stop(e,!0),gi.gm){const t=new hi.P((0,z.zk)(this.element),e);if(t.rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,z.ko)(this.element,z.Bx.CONTEXT_MENU,(e=>{z.fs.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,z.BC)(this.element,(0,z.$)("a.action-menu-item")),this._action.id===ci.wv.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,z.BC)(this.item,(0,z.$)("span.menu-item-check"+yi.L.asCSSSelector(vi.W.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,z.BC)(this.item,(0,z.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,z.BC)(this.item,(0,z.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){(0,z.w_)(this.label);let e=(0,wi.pS)(this.action.label);if(e){const t=Ri(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=Ci.exec(e);if(i){e=c.ih(e),Si.lastIndex=0;let t=Si.exec(e);while(t&&t[1])t=Si.exec(e);const n=e=>e.replace(/&&/g,"&");t?this.label.append(c.NB(n(e.substr(0,t.index))," "),(0,z.$)("u",{"aria-hidden":"true"},t[3]),c.BO(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item?.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",o=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=i??"",this.item.style.outline=n,this.item.style.outlineOffset=o),this.check&&(this.check.style.color=t??"")}}class Ti extends Li{constructor(e,t,i,n,o){super(e,e,n,o),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new l.Cm),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:{horizontal:ki.Right,vertical:xi.Below},this.showScheduler=new f.uC((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new f.uC((()=>{this.element&&!(0,z.QX)((0,z.bq)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,z.BC)(this.item,(0,z.$)("span.submenu-indicator"+yi.L.asCSSSelector(vi.W.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,z.ko)(this.element,z.Bx.KEY_UP,(e=>{const t=new it.Z(e);(t.equals(17)||t.equals(3))&&(z.fs.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,z.ko)(this.element,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e);(0,z.bq)()===this.item&&(t.equals(17)||t.equals(3))&&z.fs.stop(e,!0)}))),this._register((0,z.ko)(this.element,z.Bx.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,z.ko)(this.element,z.Bx.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,z.ko)(this.element,z.Bx.FOCUS_OUT,(e=>{this.element&&!(0,z.QX)((0,z.bq)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){z.fs.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=rt(e.width,t.width,{position:n.horizontal===ki.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{const t=new it.Z(e);t.equals(15)&&(z.fs.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,z.ko)(this.submenuContainer,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e);t.equals(15)&&z.fs.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){this.item&&this.item?.setAttribute("aria-expanded",e)}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Ii extends mi.Z4{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function Ri(e){const t=Ci,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}function Di(e){const t=(0,bi.J)()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}function Ni(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${Di(vi.W.menuSelection)}\n${Di(vi.W.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n\tmax-height: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderHoverBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderActiveBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`)}return i}var Ai=i(13153);class Oi{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=(0,z.bq)();const n=(0,z.sb)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{this.lastContainer=n;const o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild((0,z.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=(0,z.ko)(this.block,z.Bx.MOUSE_DOWN,(e=>e.stopPropagation())));const s=new l.Cm,r=e.actionRunner||new ci.LN;r.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,s),r.onDidRun(this.onDidActionRun,this,s),i=new Ei(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:r,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},Ai.XS),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,s),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,s);const a=(0,z.zk)(n);return s.add((0,z.ko)(a,z.Bx.BLUR,(()=>this.contextViewService.hideContextView(!0)))),s.add((0,z.ko)(a,z.Bx.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new hi.P(a,e);let i=t.target;if(!t.rightButton){while(i){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,l.qE)(s,i)},focus:()=>{i?.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide?.(!!t),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&((0,z.bq)()===this.lastContainer||(0,z.QX)((0,z.bq)(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!(0,v.MB)(e.error)&&this.notificationService.error(e.error)}}var Pi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Mi=function(e,t){return function(i,n){t(i,n,e)}};let Fi=class extends l.jG{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Oi(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,o,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=o,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new te.vl),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new te.vl)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Bi.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),z.Di.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var Bi;Fi=Pi([Mi(0,ni.k),Mi(1,ye.Ot),Mi(2,Be.l),Mi(3,We.b),Mi(4,ui.ez),Mi(5,ae.fN)],Fi),function(e){function t(e){return e&&e.menuId instanceof ui.D8}function i(e,i,n){if(!t(e))return e;const{menuId:o,menuActionOptions:s,contextKeyService:r}=e;return{...e,getActions:()=>{const t=[];if(o){const e=i.getMenuActions(o,r??n,s);(0,di.$u)(e,t)}return e.getActions?ci.wv.join(e.getActions(),t):t}}}e.transform=i}(Bi||(Bi={}));var Wi,Hi=i(61565);(function(e){e[e["API"]=0]="API",e[e["USER"]=1]="USER"})(Wi||(Wi={}));var Vi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ji=function(e,t){return function(i,n){t(i,n,e)}};let zi=class{constructor(e){this._commandService=e}async open(e,t){if(!(0,b.v$)(e,b.ny.command))return!1;if(!t?.allowCommands)return!0;if("string"===typeof e&&(e=d.r.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=(0,Hi.qg)(decodeURIComponent(e.query))}catch{try{i=(0,Hi.qg)(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};zi=Vi([ji(0,Tt.d)],zi);let Ui=class{constructor(e){this._editorService=e}async open(e,t){"string"===typeof e&&(e=d.r.parse(e));const{selection:i,uri:n}=(0,ze.e)(e);return e=n,e.scheme===b.ny.file&&(e=(0,ri.Fd)(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:t?.fromUserGesture?Wi.USER:Wi.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};Ui=Vi([ji(0,g.T)],Ui);let $i=class{constructor(e,t){this._openers=new ie.w,this._validators=new ie.w,this._resolvers=new ie.w,this._resolvedUriTargets=new It.fT((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new ie.w,this._defaultExternalOpener={openExternal:async e=>((0,b.fV)(e,b.ny.http,b.ny.https)?z.CE(e):a.G.location.href=e,!0)},this._openers.push({open:async(e,t)=>!(!t?.openExternal&&!(0,b.fV)(e,b.ny.mailto,b.ny.http,b.ny.https,b.ny.vsls))&&(await this._doOpenExternal(e,t),!0)}),this._openers.push(new zi(t)),this._openers.push(new Ui(e))}registerOpener(e){const t=this._openers.unshift(e);return{dispose:t}}async open(e,t){const i="string"===typeof e?d.r.parse(e):e,n=this._resolvedUriTargets.get(i)??e;for(const o of this._validators)if(!await o.shouldOpen(n,t))return!1;for(const o of this._openers){const i=await o.open(e,t);if(i)return!0}return!1}async resolveExternalUri(e,t){for(const i of this._resolvers)try{const n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i="string"===typeof e?d.r.parse(e):e;let n,o;try{n=(await this.resolveExternalUri(i,t)).resolved}catch{n=i}if(o="string"===typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),t?.allowContributedOpeners){const e="string"===typeof t?.allowContributedOpeners?t?.allowContributedOpeners:void 0;for(const t of this._externalOpeners){const n=await t.openExternal(o,{sourceUri:i,preferredOpenerId:e},gt.XO.None);if(n)return!0}}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},gt.XO.None)}dispose(){this._validators.clear()}};$i=Vi([ji(0,g.T),ji(1,Tt.d)],$i);var qi=i(4117),Ki=i(14573),Gi=i(23938),Qi=i(63637),Yi=i(96174),Zi=i(60018),Xi=i(3874),Ji=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},en=function(e,t){return function(i,n){t(i,n,e)}};let tn=class extends l.jG{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Dt.O.as(Zi.Fd.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){const[n,o]=this.getOrInstantiateProvider(e,i?.enabledProviderPrefixes),s=this.visibleQuickAccess,r=s?.descriptor;if(s&&o&&r===o)return e===o.prefix||i?.preserveValue||(s.picker.value=e),void this.adjustValueSelection(s.picker,o,i);if(o&&!i?.preserveValue){let t;if(s&&r&&r!==o){const e=s.value.substr(r.prefix.length);e&&(t=`${o.prefix}${e}`)}if(!t){const e=n?.defaultFilterValue;e===Zi.aJ.LAST?t=this.lastAcceptedPickerValues.get(o):"string"===typeof e&&(t=`${o.prefix}${e}`)}"string"===typeof t&&(e=t)}const a=s?.picker?.valueSelection,c=s?.picker?.value,d=new l.Cm,u=d.add(this.quickInputService.createQuickPick({useSeparators:!0}));let h;u.value=e,this.adjustValueSelection(u,o,i),u.placeholder=i?.placeholder??o?.placeholder,u.quickNavigate=i?.quickNavigateConfiguration,u.hideInput=!!u.quickNavigate&&!s,("number"===typeof i?.itemActivation||i?.quickNavigateConfiguration)&&(u.itemActivation=i?.itemActivation??Xi.C1.SECOND),u.contextKey=o?.contextKey,u.filterValue=e=>e.substring(o?o.prefix.length:0),t&&(h=new f.Zv,d.add(te.Jh.once(u.onWillAccept)((e=>{e.veto(),u.hide()})))),d.add(this.registerPickerListeners(u,n,o,e,i));const g=d.add(new gt.Qi);return n&&d.add(n.provide(u,g.token,i?.providerOptions)),te.Jh.once(u.onDidHide)((()=>{0===u.selectedItems.length&&g.cancel(),d.dispose(),h?.complete(u.selectedItems.slice(0))})),u.show(),a&&c===e&&(u.valueSelection=a),t?h?.p:void 0}adjustValueSelection(e,t,i){let n;n=i?.preserveValue?[e.value.length,e.value.length]:[t?.prefix.length??0,e.value.length],e.valueSelection=n}registerPickerListeners(e,t,i,n,o){const s=new l.Cm,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add((0,l.s)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),s.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e,o?.enabledProviderPrefixes);i!==t?this.show(e,{enabledProviderPrefixes:o?.enabledProviderPrefixes,preserveValue:!0,providerOptions:o?.providerOptions}):r.value=e}))),i&&s.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),s}getOrInstantiateProvider(e,t){const i=this.registry.getQuickAccessProvider(e);if(!i||t&&!t?.includes(i.prefix))return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};tn=Ji([en(0,Xi.GK),en(1,he._Y)],tn);var nn=i(83092),on=i(49822),sn=i(84653),rn=i(23453),an=i(34125),ln=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class cn{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"===typeof e?e:e.label)).join("")}}ln([an.B],cn.prototype,"toString",null);const dn=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function un(e){const t=[];let i,n=0;while(i=dn.exec(e)){i.index-n>0&&t.push(e.substring(n,i.index));const[,o,s,,r]=i;r?t.push({label:o,href:s,title:r}):t.push({label:o,href:s}),n=i.index+i[0].length}return n{z.sd(e)&&z.fs.stop(e,!0),i.callback(s.href)},a=i.disposables.add(new on.f(n,z.Bx.CLICK)).event,l=i.disposables.add(new on.f(n,z.Bx.KEY_DOWN)).event,c=te.Jh.chain(l,(e=>e.filter((e=>{const t=new it.Z(e);return t.equals(10)||t.equals(3)}))));i.disposables.add(pi.q.addTarget(n));const d=i.disposables.add(new on.f(n,pi.B.Tap)).event;te.Jh.any(a,d,c)(r,null,i.disposables),t.appendChild(n)}}var _n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},vn=function(e,t){return function(i,n){t(i,n,e)}};const bn="inQuickInput",yn=new ae.N1(bn,!1,(0,w.kg)("inQuickInput","Whether keyboard focus is inside the quick input control")),wn=ae.M$.has(bn),Cn="quickInputType",Sn=new ae.N1(Cn,void 0,(0,w.kg)("quickInputType","The type of the currently visible quick input")),kn="cursorAtEndOfQuickInputBox",xn=new ae.N1(kn,!1,(0,w.kg)("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),En=ae.M$.has(kn),Ln={iconClass:yi.L.asClassName(vi.W.quickInputBack),tooltip:(0,w.kg)("quickInput.back","Back"),handle:-1};class Tn extends l.jG{static{this.noPromptMessage=(0,w.kg)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel")}constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=Tn.noPromptMessage,this._severity=ve.A.Ignore,this.onDidTriggerButtonEmitter=this._register(new te.vl),this.onDidHideEmitter=this._register(new te.vl),this.onWillHideEmitter=this._register(new te.vl),this.onDisposeEmitter=this._register(new te.vl),this.visibleDisposables=this._register(new l.Cm),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!qe.un;this._ignoreFocusOut=e&&!qe.un,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter((e=>e===Ln)),this._rightButtons=e.filter((e=>e!==Ln&&e.location!==Xi.dH.Inline)),this._inlineButtons=e.filter((e=>e.location===Xi.dH.Inline)),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Xi.kF.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=Xi.kF.Other){this.onWillHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?z.Ln(this.ui.widget,this._widget):z.Ln(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new f.pc,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this._leftButtons.map(((e,t)=>fn(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.leftActionBar.push(e,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this._rightButtons.map(((e,t)=>fn(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.rightActionBar.push(t,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();const i=this._inlineButtons.map(((e,t)=>fn(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.inlineActionBar.push(i,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const e=this.toggles?.filter((e=>e instanceof nn.l))??[];this.ui.inputBox.toggles=e}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,z.Ln(this.ui.message),mn(i,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,w.kg)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==ve.A.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class In extends Tn{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new te.vl),this.onWillAcceptEmitter=this._register(new te.vl),this.onDidAcceptEmitter=this._register(new te.vl),this.onDidCustomEmitter=this._register(new te.vl),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=Xi.C1.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new te.vl),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new te.vl),this.onDidTriggerItemButtonEmitter=this._register(new te.vl),this.onDidTriggerSeparatorButtonEmitter=this._register(new te.vl),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new te.at,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}static{this.DEFAULT_ARIA_LABEL=(0,w.kg)("quickInputBox.ariaLabel","Type to narrow down results.")}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){if(this._value!==e){if(this._value=e,t||this.update(),this.visible){const e=this.ui.list.filter(this.filterValue(this._value));e&&this.trySelectFirst()}this.onDidChangeValueEmitter.fire(this._value)}}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Xi.Ym:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(Xi.Fp.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,((e,t)=>t))((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,y.aI)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,y.aI)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(z.Er(t)&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&this.visible&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,y.aI)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return z.ko(this.ui.container,z.Bx.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new it.Z(e),i=t.keyCode,n=this._quickNavigate.keybindings,o=n.some((e=>{const n=e.getChords();return!(n.length>1)&&(n[0].shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n[0].altKey||6!==i)||(!(!n[0].ctrlKey||5!==i)||!(!n[0].metaKey||57!==i)))}));o&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;!n&&i.inputBox&&(n=this.placeholder||In.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=n??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents((()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case Xi.C1.NONE:this._itemActivation=Xi.C1.FIRST;break;case Xi.C1.SECOND:this.ui.list.focus(Xi.Fp.Second),this._itemActivation=Xi.C1.FIRST;break;case Xi.C1.LAST:this.ui.list.focus(Xi.Fp.Last),this._itemActivation=Xi.C1.FIRST;break;default:this.trySelectFirst();break}}))),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Xi.Fp.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}}class Rn extends Tn{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new te.vl),this.onDidAcceptEmitter=this._register(new te.vl),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}let Dn=class extends Fe.fO{constructor(e,t){super("element",!1,(e=>this.getOverrideOptions(e)),e,t)}getOverrideOptions(e){const t=(z.sb(e.content)?e.content.textContent??"":"string"===typeof e.content?e.content:e.content.value).includes("\n");return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};Dn=_n([vn(0,He.pG),vn(1,Fe.TN)],Dn);var Nn=i(42312),An=i(70604);const On="done",Pn="active",Mn="infinite",Fn="infinite-long-running",Bn="discrete";class Wn extends l.jG{static{this.LONG_RUNNING_INFINITE_THRESHOLD=1e4}constructor(e,t){super(),this.progressSignal=this._register(new l.HE),this.workedVal=0,this.showDelayedScheduler=this._register(new f.uC((()=>(0,z.WU)(this.element)),0)),this.longRunningScheduler=this._register(new f.uC((()=>this.infiniteLongRunning()),Wn.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Pn,Mn,Fn,Bn),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(On),this.element.classList.contains(Mn)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Bn,On,Fn),this.element.classList.add(Pn,Mn),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Fn)}getContainer(){return this.element}}var Hn=i(95994);const Vn=z.$;class jn extends l.jG{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>z.b2(this.findInput.inputBox.inputElement,z.Bx.KEY_DOWN,e),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=z.BC(this.parent,Vn(".quick-input-box")),this.findInput=this._register(new Hn.c(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===ve.A.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===ve.A.Info?1:e===ve.A.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===ve.A.Info?1:e===ve.A.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}var zn=i(72033),Un=i(50278),$n=i(92678),qn=i(1474),Kn=i(85661);const Gn=new Kn.d((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new Kn.d((()=>{const e=new Intl.Collator(void 0,{numeric:!0});return{collator:e}})),new Kn.d((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"});return{collator:e}}));function Qn(e,t,i=!1){const n=e||"",o=t||"",s=Gn.value.collator.compare(n,o);return Gn.value.collatorIsNumeric&&0===s&&n!==o?no.length)return 1}return 0}var Xn,Jn=i(55798),eo=i(39751),to=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},io=function(e,t){return function(i,n){t(i,n,e)}};const no=z.$;class oo{constructor(e,t,i){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new Kn.d((()=>{const e=i.label??"",t=(0,wi._k)(e).text.trim(),n=i.ariaLabel||[e,this.saneDescription,this.saneDetail].map((e=>(0,wi.R$)(e))).filter((e=>!!e)).join(", ");return{saneLabel:e,saneSortLabel:t,saneAriaLabel:n}})),this._saneDescription=i.description,this._saneTooltip=i.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class so extends oo{constructor(e,t,i,n,o,s){super(e,t,o),this.fireButtonTriggered=i,this._onChecked=n,this.item=o,this._separator=s,this._checked=!1,this.onChecked=t?te.Jh.map(te.Jh.filter(this._onChecked.event,(e=>e.element===this)),(e=>e.checked)):te.Jh.None,this._saneDetail=o.detail,this._labelHighlights=o.highlights?.label,this._descriptionHighlights=o.highlights?.description,this._detailHighlights=o.highlights?.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var ro;(function(e){e[e["NONE"]=0]="NONE",e[e["MOUSE_HOVER"]=1]="MOUSE_HOVER",e[e["ACTIVE_ITEM"]=2]="ACTIVE_ITEM"})(ro||(ro={}));class ao extends oo{constructor(e,t,i){super(e,!1,i),this.fireSeparatorButtonTriggered=t,this.separator=i,this.children=new Array,this.focusInsideSeparator=ro.NONE}}class lo{getHeight(e){return e instanceof ao?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof so?ho.ID:go.ID}}class co{getWidgetAriaLabel(){return(0,w.kg)("quickInput","Quick Input")}getAriaLabel(e){return e.separator?.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox&&e instanceof so)return{get value(){return e.checked},onDidChange:t=>e.onChecked((()=>t()))}}}class uo{constructor(e){this.hoverDelegate=e}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=new l.Cm,t.toDisposeTemplate=new l.Cm,t.entry=z.BC(e,no(".quick-input-list-entry"));const i=z.BC(t.entry,no("label.quick-input-list-label"));t.toDisposeTemplate.add(z.b2(i,z.Bx.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=z.BC(i,no("input.quick-input-list-checkbox")),t.checkbox.type="checkbox";const n=z.BC(i,no(".quick-input-list-rows")),o=z.BC(n,no(".quick-input-list-row")),s=z.BC(n,no(".quick-input-list-row"));t.label=new Un.s(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=z.Hs(t.label.element,no(".quick-input-list-icon"));const r=z.BC(o,no(".quick-input-list-entry-keybinding"));t.keybinding=new $n.x(r,qe.OS),t.toDisposeTemplate.add(t.keybinding);const a=z.BC(s,no(".quick-input-list-label-meta"));return t.detail=new Un.s(a,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=z.BC(t.entry,no(".quick-input-list-separator")),t.actionBar=new fi.E(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.actionBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,i){i.toDisposeElement.clear(),i.actionBar.clear()}}let ho=class extends uo{static{Xn=this}static{this.ID="quickpickitem"}constructor(e,t){super(e),this.themeService=t,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return Xn.ID}renderTemplate(e){const t=super.renderTemplate(e);return t.toDisposeTemplate.add(z.b2(t.checkbox,z.Bx.CHANGE,(e=>{t.element.checked=t.checkbox.checked}))),t}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0;const o=n.item;i.checkbox.checked=n.checked,i.toDisposeElement.add(n.onChecked((e=>i.checkbox.checked=e))),i.checkbox.disabled=n.checkboxDisabled;const{labelHighlights:s,descriptionHighlights:r,detailHighlights:a}=n;if(o.iconPath){const e=(0,qn.HD)(this.themeService.getColorTheme().type)?o.iconPath.dark:o.iconPath.light??o.iconPath.dark,t=d.r.revive(e);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=z.Tf(t)}else i.icon.style.backgroundImage="",i.icon.className=o.iconClass?`quick-input-list-icon ${o.iconClass}`:"";let l;!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:n.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const c={matches:s||[],descriptionTitle:l,descriptionMatches:r||[],labelEscapeNewLines:!0};if(c.extraClasses=o.iconClasses,c.italic=o.italic,c.strikethrough=o.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),i.keybinding.set(o.keybinding),n.saneDetail){let e;n.saneTooltip||(e={markdown:{value:n.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:a,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";n.separator?.label?(i.separator.textContent=n.separator.label,i.separator.style.display="",this.addItemWithSeparator(n)):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!n.separator);const u=o.buttons;u&&u.length?(i.actionBar.push(u.map(((e,t)=>fn(e,`id-${t}`,(()=>n.fireButtonTriggered({button:e,item:n.item}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,i)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}};ho=Xn=to([io(1,ne.Gy)],ho);class go extends uo{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}static{this.ID="quickpickseparator"}get templateId(){return go.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderTemplate(e){const t=super.renderTemplate(e);return t.checkbox.style.display="none",t}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0,n.element.classList.toggle("focus-inside",!!n.focusInsideSeparator);const o=n.separator,{labelHighlights:s,descriptionHighlights:r,detailHighlights:a}=n;let l;i.icon.style.backgroundImage="",i.icon.className="",!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:n.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const c={matches:s||[],descriptionTitle:l,descriptionMatches:r||[],labelEscapeNewLines:!0};if(i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),n.saneDetail){let e;n.saneTooltip||(e={markdown:{value:n.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:a,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";i.separator.style.display="none",i.entry.classList.add("quick-input-list-separator-border");const d=o.buttons;d&&d.length?(i.actionBar.push(d.map(((e,t)=>fn(e,`id-${t}`,(()=>n.fireSeparatorButtonTriggered({button:e,separator:n.separator}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions"),this.addSeparator(n)}disposeElement(e,t,i){this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||e.element.element?.classList.remove("focus-inside"),super.disposeElement(e,t,i)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}}let po=class extends l.jG{constructor(e,t,i,n,o,s){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=i,this.accessibilityService=s,this._onKeyDown=new te.vl,this._onLeave=new te.vl,this.onLeave=this._onLeave.event,this._visibleCountObservable=(0,eo.FY)("VisibleCount",0),this.onChangedVisibleCount=te.Jh.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=(0,eo.FY)("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=te.Jh.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=(0,eo.FY)("CheckedCount",0),this.onChangedCheckedCount=te.Jh.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=(0,eo.Zh)({equalsFn:y.aI},new Array),this.onChangedCheckedElements=te.Jh.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new te.vl,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new te.vl,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new te.vl,this._elementCheckedEventBufferer=new te.at,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new l.Cm),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=z.BC(this.parent,no(".quick-input-list")),this._separatorRenderer=new go(t),this._itemRenderer=o.createInstance(ho,t),this._tree=this._register(o.createInstance(zn.zL,"QuickInput",this._container,new lo,[this._itemRenderer,this._separatorRenderer],{filter:{filter(e){return e.hidden?0:e instanceof ao?2:1}},sorter:{compare:(e,t)=>{if(!this.sortByLabel||!this._lastQueryString)return 0;const i=this._lastQueryString.toLowerCase();return _o(e,t,i)}},accessibilityProvider:new co,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:Jn.KP.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=n,this._registerListeners()}get onDidChangeFocus(){return te.Jh.map(this._tree.onDidChangeFocus,(e=>e.elements.filter((e=>e instanceof so)).map((e=>e.item))),this._store)}get onDidChangeSelection(){return te.Jh.map(this._tree.onDidChangeSelection,(e=>({items:e.elements.filter((e=>e instanceof so)).map((e=>e.item)),event:e.browserEvent})),this._store)}get displayed(){return"none"!==this._container.style.display}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown((e=>{const t=new it.Z(e);switch(t.keyCode){case 10:this.toggleCheckbox();break}this._onKeyDown.fire(t)})))}_registerOnContainerClick(){this._register(z.ko(this._container,z.Bx.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()})))}_registerOnMouseMiddleClick(){this._register(z.ko(this._container,z.Bx.AUXCLICK,(e=>{1===e.button&&this._onLeave.fire()})))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel((()=>{const e=this._itemElements.filter((e=>!e.hidden)).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()})))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,((e,t)=>t))((e=>this._updateCheckedObservables())))}_registerOnContextMenu(){this._register(this._tree.onContextMenu((e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))})))}_registerHoverListeners(){const e=this._register(new f.Th(this.hoverDelegate.delay));this._register(this._tree.onMouseOver((async t=>{if(z.nY(t.browserEvent.target))e.cancel();else if(z.nY(t.browserEvent.relatedTarget)||!z.QX(t.browserEvent.relatedTarget,t.element?.element))try{await e.trigger((async()=>{t.element instanceof so&&this.showHover(t.element)}))}catch(t){if(!(0,v.MB)(t))throw t}}))),this._register(this._tree.onMouseOut((t=>{z.QX(t.browserEvent.relatedTarget,t.element?.element)||e.cancel()})))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus((e=>{const t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const i of this._separatorRenderer.visibleSeparators){const e=i===t,n=!!(i.focusInsideSeparator&ro.ACTIVE_ITEM);n!==e&&(e?i.focusInsideSeparator|=ro.ACTIVE_ITEM:i.focusInsideSeparator&=~ro.ACTIVE_ITEM,this._tree.rerender(i))}}))),this._register(this._tree.onMouseOver((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const i of this._separatorRenderer.visibleSeparators){if(i!==t)continue;const e=!!(i.focusInsideSeparator&ro.MOUSE_HOVER);e||(i.focusInsideSeparator|=ro.MOUSE_HOVER,this._tree.rerender(i))}}))),this._register(this._tree.onMouseOut((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const i of this._separatorRenderer.visibleSeparators){if(i!==t)continue;const e=!!(i.focusInsideSeparator&ro.MOUSE_HOVER);e&&(i.focusInsideSeparator&=~ro.MOUSE_HOVER,this._tree.rerender(i))}})))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection((e=>{const t=e.elements.filter((e=>e instanceof so));t.length!==e.elements.length&&(1===e.elements.length&&e.elements[0]instanceof ao&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))})))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents((()=>{this._itemElements.forEach((t=>{t.hidden||t.checkboxDisabled||(t.checked=e)}))}))}setElements(e){let t;this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes"),this._itemElements=new Array,this._elementTree=e.reduce(((i,n,o)=>{let s;if("separator"===n.type){if(!n.buttons)return i;t=new ao(o,(e=>this._onSeparatorButtonTriggered.fire(e)),n),s=t}else{const r=o>0?e[o-1]:void 0;let a;r&&"separator"===r.type&&!r.buttons&&(t=void 0,a=r);const l=new so(o,this._hasCheckboxes,(e=>this._onButtonTriggered.fire(e)),this._elementChecked,n,a);if(this._itemElements.push(l),t)return t.children.push(l),i;s=l}return i.push(s),i}),new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout((()=>{const e=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),t=e?.parentNode;if(e&&t){const i=e.nextSibling;e.remove(),t.insertBefore(e,i)}}),0)}setFocusedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e)).filter((e=>!e.hidden));if(this._tree.setFocus(t),e.length>0){const e=this._tree.getFocus()[0];e&&this._tree.reveal(e)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e));this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents((()=>{const t=new Set;for(const i of e)t.add(i);for(const e of this._itemElements)e.checked=t.has(e.item)}))}focus(e){if(this._itemElements.length)switch(e===Xi.Fp.Second&&this._itemElements.length<2&&(e=Xi.Fp.First),e){case Xi.Fp.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,(e=>e.element instanceof so));break;case Xi.Fp.Second:{this._tree.scrollTop=0;let e=!1;this._tree.focusFirst(void 0,(t=>t.element instanceof so&&(!!e||(e=!e,!1))));break}case Xi.Fp.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,(e=>e.element instanceof so));break;case Xi.Fp.Next:{const e=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,(e=>e.element instanceof so&&(this._tree.reveal(e.element),!0)));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case Xi.Fp.Previous:{const e=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,(e=>{if(!(e.element instanceof so))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[0]&&this._onLeave.fire();break}case Xi.Fp.NextPage:this._tree.focusNextPage(void 0,(e=>e.element instanceof so&&(this._tree.reveal(e.element),!0)));break;case Xi.Fp.PreviousPage:this._tree.focusPreviousPage(void 0,(e=>{if(!(e.element instanceof so))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));break;case Xi.Fp.NextSeparator:{let e=!1;const t=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,(t=>{if(e)return!0;if(t.element instanceof ao)e=!0,this._separatorRenderer.isSeparatorVisible(t.element)?this._tree.reveal(t.element.children[0]):this._tree.reveal(t.element,0);else if(t.element instanceof so){if(t.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(t.element)?this._tree.reveal(t.element):this._tree.reveal(t.element,0),!0;if(t.element===this._elementTree[0])return this._tree.reveal(t.element,0),!0}return!1}));const i=this._tree.getFocus()[0];t===i&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,(e=>e.element instanceof so)));break}case Xi.Fp.PreviousSeparator:{let e,t=!!this._tree.getFocus()[0]?.separator;this._tree.focusPrevious(void 0,!0,void 0,(i=>{if(i.element instanceof ao)t?e||(this._separatorRenderer.isSeparatorVisible(i.element)?this._tree.reveal(i.element):this._tree.reveal(i.element,0),e=i.element.children[0]):t=!0;else if(i.element instanceof so&&!e)if(i.element.separator)this._itemRenderer.isItemWithSeparatorVisible(i.element)?this._tree.reveal(i.element):this._tree.reveal(i.element,0),e=i.element;else if(i.element===this._elementTree[0])return this._tree.reveal(i.element,0),!0;return!1})),e&&this._tree.setFocus([e]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const t=e;if(e=e.trim(),e&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this._itemElements.forEach((n=>{let o;o="fuzzy"===this.matchOnLabelMode?this.matchOnLabel?(0,wi.pz)(e,(0,wi._k)(n.saneLabel))??void 0:void 0:this.matchOnLabel?fo(t,(0,wi._k)(n.saneLabel))??void 0:void 0;const s=this.matchOnDescription?(0,wi.pz)(e,(0,wi._k)(n.saneDescription||""))??void 0:void 0,r=this.matchOnDetail?(0,wi.pz)(e,(0,wi._k)(n.saneDetail||""))??void 0:void 0;if(o||s||r?(n.labelHighlights=o,n.descriptionHighlights=s,n.detailHighlights=r,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this._inputElements[n.index-1]||void 0;"separator"!==e?.type||e.buttons||(i=e),i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this._itemElements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this._inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents((()=>{const e=this._tree.getFocus().filter((e=>e instanceof so)),t=this._allVisibleChecked(e);for(const i of e)i.checkboxDisabled||(i.checked=!t)}))}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!e?.saneTooltip||!(e instanceof so))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();this.showHover(e);const t=new l.Cm;t.add(this._tree.onDidChangeFocus((e=>{e.elements[0]instanceof so&&this.showHover(e.elements[0])}))),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){const t=new Array;for(const i of e)i instanceof ao?t.push({element:i,collapsible:!1,collapsed:!1,children:i.children.map((e=>({element:e,collapsible:!1,collapsed:!1})))}):t.push({element:i,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);const t=this._itemElements.filter((e=>e.checked)).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)}))}showHover(e){this._lastHover&&!this._lastHover.isDisposed&&(this.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),e.element&&e.saneTooltip&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:e=>{this.linkOpenerDelegate(e)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};function fo(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return mo(e,i);const o=(0,c.NB)(i," "),s=i.length-o.length,r=mo(e,o);if(r)for(const a of r){const e=n[a.start+s]+s;a.start+=e,a.end+=e}return r}function mo(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}function _o(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:Yn(e.saneSortLabel,t.saneSortLabel,i)}to([an.B],po.prototype,"onDidChangeFocus",null),to([an.B],po.prototype,"onDidChangeSelection",null),po=to([io(4,he._Y),io(5,Ke.j)],po);var vo=i(5045);const bo={weight:200,when:ae.M$.and(ae.M$.equals(Cn,"quickPick"),wn),metadata:{description:(0,w.kg)("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function yo(e,t={}){Gt.f.registerCommandAndKeybindingRule({...bo,...e,secondary:Co(e.primary,e.secondary??[],t)})}const wo=qe.zx?256:2048;function Co(e,t,i={}){return i.withAltMod&&t.push(512+e),i.withCtrlMod&&(t.push(wo+e),i.withAltMod&&t.push(512+wo+e)),i.withCmdMod&&qe.zx&&(t.push(2048+e),i.withCtrlMod&&t.push(2304+e),i.withAltMod&&(t.push(2560+e),i.withCtrlMod&&t.push(2816+e))),t}function So(e,t){return i=>{const n=i.get(Xi.GK).currentQuickInput;if(n)return t&&n.quickNavigate?n.focus(t):n.focus(e)}}yo({id:"quickInput.pageNext",primary:12,handler:So(Xi.Fp.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),yo({id:"quickInput.pagePrevious",primary:11,handler:So(Xi.Fp.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),yo({id:"quickInput.first",primary:wo+14,handler:So(Xi.Fp.First)},{withAltMod:!0,withCmdMod:!0}),yo({id:"quickInput.last",primary:wo+13,handler:So(Xi.Fp.Last)},{withAltMod:!0,withCmdMod:!0}),yo({id:"quickInput.next",primary:18,handler:So(Xi.Fp.Next)},{withCtrlMod:!0}),yo({id:"quickInput.previous",primary:16,handler:So(Xi.Fp.Previous)},{withCtrlMod:!0});const ko=(0,w.kg)("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),xo=(0,w.kg)("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");qe.zx?(yo({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:So(Xi.Fp.NextSeparator,Xi.Fp.Next),metadata:{description:ko}}),yo({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:So(Xi.Fp.NextSeparator)},{withCtrlMod:!0}),yo({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:So(Xi.Fp.PreviousSeparator,Xi.Fp.Previous),metadata:{description:xo}}),yo({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:So(Xi.Fp.PreviousSeparator)},{withCtrlMod:!0})):(yo({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:So(Xi.Fp.NextSeparator,Xi.Fp.Next),metadata:{description:ko}}),yo({id:"quickInput.nextSeparator",primary:2578,handler:So(Xi.Fp.NextSeparator)}),yo({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:So(Xi.Fp.PreviousSeparator,Xi.Fp.Previous),metadata:{description:xo}}),yo({id:"quickInput.previousSeparator",primary:2576,handler:So(Xi.Fp.PreviousSeparator)})),yo({id:"quickInput.acceptInBackground",when:ae.M$.and(bo.when,ae.M$.or(vo.J7.negate(),En)),primary:17,weight:250,handler:e=>{const t=e.get(Xi.GK).currentQuickInput;t?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});var Eo,Lo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},To=function(e,t){return function(i,n){t(i,n,e)}};const Io=z.$;let Ro=class extends l.jG{static{Eo=this}static{this.MAX_WIDTH=600}get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,i,n){super(),this.options=e,this.layoutService=t,this.instantiationService=i,this.contextKeyService=n,this.enabled=!0,this.onDidAcceptEmitter=this._register(new te.vl),this.onDidCustomEmitter=this._register(new te.vl),this.onDidTriggerButtonEmitter=this._register(new te.vl),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new te.vl),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new te.vl),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=yn.bindTo(this.contextKeyService),this.quickInputTypeContext=Sn.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=xn.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(te.Jh.runAndSubscribe(z.Iv,(({window:e,disposables:t})=>this.registerKeyModsListeners(e,t)),{window:a.G,disposables:this._store})),this._register(z.q3((e=>{this.ui&&z.zk(this.ui.container)===e&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})))}registerKeyModsListeners(e,t){const i=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};for(const n of[z.Bx.KEY_DOWN,z.Bx.KEY_UP,z.Bx.MOUSE_DOWN])t.add(z.ko(e,n,i,!0))}getUI(e){if(this.ui)return e&&z.zk(this._container)!==z.zk(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const t=z.BC(this._container,Io(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=z.li(t),n=z.BC(t,Io(".quick-input-titlebar")),o=this._register(new fi.E(n,{hoverDelegate:this.options.hoverDelegate}));o.domNode.classList.add("quick-input-left-action-bar");const s=z.BC(n,Io(".quick-input-title")),r=this._register(new fi.E(n,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-right-action-bar");const a=z.BC(t,Io(".quick-input-header")),l=z.BC(a,Io("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",(0,w.kg)("quickInput.checkAll","Toggle all checkboxes")),this._register(z.b2(l,z.Bx.CHANGE,(e=>{const t=l.checked;T.setAllVisibleChecked(t)}))),this._register(z.ko(l,z.Bx.CLICK,(e=>{(e.x||e.y)&&h.setFocus()})));const c=z.BC(a,Io(".quick-input-description")),d=z.BC(a,Io(".quick-input-and-message")),u=z.BC(d,Io(".quick-input-filter")),h=this._register(new jn(u,this.styles.inputBox,this.styles.toggle));h.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=z.BC(u,Io(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new An.x(g,{countFormat:(0,w.kg)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),f=z.BC(u,Io(".quick-input-count"));f.setAttribute("aria-live","polite");const m=new An.x(f,{countFormat:(0,w.kg)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),_=this._register(new fi.E(a,{hoverDelegate:this.options.hoverDelegate}));_.domNode.classList.add("quick-input-inline-action-bar");const v=z.BC(a,Io(".quick-input-action")),b=this._register(new Nn.$(v,this.styles.button));b.label=(0,w.kg)("ok","OK"),this._register(b.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const y=z.BC(a,Io(".quick-input-action")),C=this._register(new Nn.$(y,{...this.styles.button,supportIcons:!0}));C.label=(0,w.kg)("custom","Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const S=z.BC(d,Io(`#${this.idPrefix}message.quick-input-message`)),k=this._register(new Wn(t,this.styles.progressBar));k.getContainer().classList.add("quick-input-progress");const x=z.BC(t,Io(".quick-input-html-widget"));x.tabIndex=-1;const E=z.BC(t,Io(".quick-input-description")),L=this.idPrefix+"list",T=this._register(this.instantiationService.createInstance(po,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,L));h.setAttribute("aria-controls",L),this._register(T.onDidChangeFocus((()=>{h.setAttribute("aria-activedescendant",T.getActiveDescendant()??"")}))),this._register(T.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(T.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(T.onChangedCheckedCount((e=>{m.setCount(e)}))),this._register(T.onLeave((()=>{setTimeout((()=>{this.controller&&(h.setFocus(),this.controller instanceof In&&this.controller.canSelectMany&&T.clearFocus())}),0)})));const I=z.w5(t);return this._register(I),this._register(z.ko(t,z.Bx.FOCUS,(e=>{const t=this.getUI();if(z.QX(e.relatedTarget,t.inputContainer)){const e=t.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==e&&this.endOfQuickInputBoxContext.set(e)}z.QX(e.relatedTarget,t.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=z.sb(e.relatedTarget)?e.relatedTarget:void 0)}),!0)),this._register(I.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Xi.kF.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0}))),this._register(h.onKeyDown((e=>{const t=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==t&&this.endOfQuickInputBoxContext.set(t)}))),this._register(z.ko(t,z.Bx.FOCUS,(e=>{h.setFocus()}))),this._register(z.b2(t,z.Bx.KEY_DOWN,(e=>{if(!z.QX(e.target,x))switch(e.keyCode){case 3:z.fs.stop(e,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:z.fs.stop(e,!0),this.hide(Xi.kF.Gesture);break;case 2:if(!e.altKey&&!e.ctrlKey&&!e.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.displayed&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(z.QX(e.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=t.querySelectorAll(i.join(", "));e.shiftKey&&e.target===n[0]?(z.fs.stop(e,!0),T.clearFocus()):!e.shiftKey&&z.QX(e.target,n[n.length-1])&&(z.fs.stop(e,!0),n[0].focus())}break;case 10:e.ctrlKey&&(z.fs.stop(e,!0),this.getUI().list.toggleHover());break}}))),this.ui={container:t,styleSheet:i,leftActionBar:o,titleBar:n,title:s,description1:E,description2:c,widget:x,rightActionBar:r,inlineActionBar:_,checkAll:l,inputContainer:d,filterContainer:u,inputBox:h,visibleCountContainer:g,visibleCount:p,countContainer:f,count:m,okContainer:v,ok:b,message:S,customButtonContainer:y,customButton:C,list:T,progressBar:k,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,z.BC(this._container,this.ui.container))}pick(e,t={},i=gt.XO.None){return new Promise(((n,o)=>{let s=e=>{s=n,t.onKeyMods?.(r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick({useSeparators:!0});let a;const c=[r,r.onDidAccept((()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...e,removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),o=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=o}}}))),r.onDidTriggerSeparatorButton((e=>t.onDidTriggerSeparatorButton?.(e))),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{(0,l.AS)(c),s(void 0)}))];r.title=t.title,t.value&&(r.value=t.value),r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{o(e),r.hide()}))}))}createQuickPick(e={useSeparators:!1}){const t=this.getUI(!0);return new In(t)}createInputBox(){const e=this.getUI(!0);return new Rn(e)}show(e){const t=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,i?.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",z.Ln(t.widget),t.rightActionBar.clear(),t.inlineActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(ve.A.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),z.Ln(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();Ln.tooltip=n?(0,w.kg)("quickInput.backWithKeybinding","Back ({0})",n):(0,w.kg)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&"none"!==this.ui.container.style.display}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){const t=this.controller;if(!t)return;t.willHide(e);const i=this.ui?.container,n=i&&!z.nR(i);if(this.controller=null,this.onHideEmitter.fire(),i&&(i.style.display="none"),!n){let e=this.previousFocusElement;while(e&&!e.offsetParent)e=e.parentElement??void 0;e?.offsetParent?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}t.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,Eo.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=i??"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.list.style(this.styles.list);const s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const r=s.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}};Ro=Eo=Lo([To(1,ge),To(2,he._Y),To(3,ae.fN)],Ro);var Do=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},No=function(e,t){return function(i,n){t(i,n,e)}};let Ao=class extends ne.lR{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(tn))),this._quickAccess}constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=o,this._onShow=this._register(new te.vl),this._onHide=this._register(new te.vl),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{const i=t.get(ze.C);i.open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(Dn))},n=this._register(this.instantiationService.createInstance(Ro,{...i,...t}));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer((t=>{(0,z.zk)(e.activeContainer)===(0,z.zk)(n.container)&&n.layout(t,e.activeContainerOffset.quickPickTop)}))),this._register(e.onDidChangeActiveContainer((()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)}))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new ae.N1(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t,i=gt.XO.None){return this.controller.pick(e,t,i)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,Me.GuP)(Me.ELA),quickInputForeground:(0,Me.GuP)(Me.HJZ),quickInputTitleBackground:(0,Me.GuP)(Me.er1),widgetBorder:(0,Me.GuP)(Me.DSL),widgetShadow:(0,Me.GuP)(Me.f9l)},inputBox:Ai.ho,toggle:Ai.mk,countBadge:Ai.m$,button:Ai.cv,progressBar:Ai.oJ,keybindingLabel:Ai.ir,list:(0,Ai.t8)({listBackground:Me.ELA,listFocusBackground:Me.AlL,listFocusForeground:Me.nH,listInactiveFocusForeground:Me.nH,listInactiveSelectionIconForeground:Me.c7i,listInactiveFocusBackground:Me.AlL,listFocusOutline:Me.buw,listInactiveFocusOutline:Me.buw}),pickerGroup:{pickerGroupBorder:(0,Me.GuP)(Me.iwL),pickerGroupForeground:(0,Me.GuP)(Me.NBf)}}}};Ao=Do([No(0,he._Y),No(1,ae.fN),No(2,ne.Gy),No(3,ge),No(4,He.pG)],Ao);var Oo=i(90702),Po=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Mo=function(e,t){return function(i,n){t(i,n,e)}};let Fo=class extends Ao{constructor(e,t,i,n,o,s){super(t,i,n,new _e(e.getContainerDomNode(),o),s),this.host=void 0;const r=Wo.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get mainContainer(){return t.getDomNode()},getContainer(){return t.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[t.getDomNode()]},get activeContainer(){return t.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return te.Jh.map(e.onDidLayoutChange,(e=>({container:t.getDomNode(),dimension:e})))},get onDidChangeActiveContainer(){return te.Jh.None},get onDidAddContainer(){return te.Jh.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};Fo=Po([Mo(1,he._Y),Mo(2,ae.fN),Mo(3,ne.Gy),Mo(4,g.T),Mo(5,He.pG)],Fo);let Bo=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(Fo,e);this.mapEditorToService.set(e,t),(0,Oo.P)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,i=gt.XO.None){return this.activeService.pick(e,t,i)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}};Bo=Po([Mo(0,he._Y),Mo(1,g.T)],Bo);class Wo{static{this.ID="editor.controller.quickInput"}static get(e){return e.getContribution(Wo.ID)}constructor(e){this.editor=e,this.widget=new Ho(this.editor)}dispose(){this.widget.dispose()}}class Ho{static{this.ID="editor.contrib.quickInputWidget"}constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Ho.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}(0,h.HW)(Wo.ID,Wo,4);var Vo=i(40611),jo=i(55643),zo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Uo=function(e,t){return function(i,n){t(i,n,e)}};let $o=class extends l.jG{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new te.vl,this._onDidChangeReducedMotion=new te.vl,this._onDidChangeLinkUnderline=new te.vl,this._accessibilityModeEnabledContext=Ke.f.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const o=a.G.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(o),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register((0,z.ko)(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",e),this._layoutService.mainContainer.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration("accessibility.underlineLinks")){const e=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=e,this._onDidChangeLinkUnderline.fire()}})));const e=()=>{const e=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",e)};e(),this._register(this.onDidChangeLinkUnderlines((()=>e())))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};$o=zo([Uo(0,ae.fN),Uo(1,ge),Uo(2,He.pG)],$o);var qo,Ko=i(17219),Go=i(65647),Qo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Yo=function(e,t){return function(i,n){t(i,n,e)}};const Zo="application/vnd.code.resources";let Xo=class extends l.jG{static{qo=this}constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(gi.nr||gi.c8)&&this.installWebKitWriteTextWorkaround(),this._register(te.Jh.runAndSubscribe(z.Iv,(({window:e,disposables:t})=>{t.add((0,z.ko)(e.document,"copy",(()=>this.clearResourcesState())))}),{window:a.G,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const e=new f.Zv;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,(0,z.fz)().navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((async t=>{t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))};this._register(te.Jh.runAndSubscribe(this.layoutService.onDidAddContainer,(({container:t,disposables:i})=>{i.add((0,z.ko)(t,"click",e)),i.add((0,z.ko)(t,"keydown",e))}),{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.clearResourcesState(),t)this.mapTextToType.set(t,e);else{if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await(0,z.fz)().navigator.clipboard.writeText(e)}catch(i){console.error(i)}this.fallbackWriteText(e)}}fallbackWriteText(e){const t=(0,z.a)(),i=t.activeElement,n=t.body.appendChild((0,z.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),t.execCommand("copy"),(0,z.sb)(i)&&i.focus(),n.remove()}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await(0,z.fz)().navigator.clipboard.readText()}catch(t){console.error(t)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}static{this.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3}async readResources(){try{const e=await(0,z.fz)().navigator.clipboard.read();for(const t of e)if(t.types.includes(`web ${Zo}`)){const e=await t.getType(`web ${Zo}`),i=JSON.parse(await e.text()).map((e=>d.r.from(e)));return i}}catch(t){}const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(0===this.resources.length)return;const e=await this.readText();return(0,Go.tW)(e.substring(0,qo.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}};Xo=qo=Qo([Yo(0,ge),Yo(1,F.rr)],Xo);var Jo=i(28753),es=i(5837),ts=i(71268),is=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ns=function(e,t){return function(i,n){t(i,n,e)}};const os="data-keybinding-context";class ss{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value["_contextId"]=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return"undefined"===typeof t&&this._parent?this._parent.getValue(e):t}}class rs extends ss{static{this.INSTANCE=new rs}constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}class as extends ss{static{this._keyPrefix="config."}constructor(e,t,i){super(e,null),this._configurationService=t,this._values=ts.cB.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new ds(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...es.f.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new ds(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(as._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(as._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}class ls{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){"undefined"===typeof this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class cs{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class ds{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class us{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}function hs(e,t){return e.allKeysContainedIn(new Set(Object.keys(t)))}class gs extends l.jG{constructor(e){super(),this._onDidChangeContext=this._register(new te.fV({merge:e=>new us(e)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new ls(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new fs(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId),i=!e||e.evaluate(t);return i}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new cs(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new cs(e))}getContext(e){return this._isDisposed?rs.INSTANCE:this.getContextValuesContainer(ms(e))}dispose(){super.dispose(),this._isDisposed=!0}}let ps=class extends gs{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new as(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?rs.INSTANCE:this._contexts.get(e)||rs.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new ss(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};ps=is([ns(0,He.pG)],ps);class fs extends gs{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new l.HE),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(os)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(os,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{const t=this._parent.getContextValuesContainer(this._myContextId),i=t.value;hs(e,i)||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(os),super.dispose())}getContextValuesContainer(e){return this._isDisposed?rs.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function ms(e){while(e){if(e.hasAttribute(os)){const t=e.getAttribute(os);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}function _s(e,t,i){const n=e.get(ae.fN);n.createKey(String(t),vs(i))}function vs(e){return(0,p.PI)(e,(e=>"object"===typeof e&&1===e.$mid?d.r.revive(e).toString():e instanceof d.r?e.toString():void 0))}Tt.w.registerCommand("_setContext",_s),Tt.w.registerCommand({id:"getContextKeyInfo",handler(){return[...ae.N1.all()].sort(((e,t)=>e.key.localeCompare(t.key)))},metadata:{description:(0,w.kg)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),Tt.w.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of ae.N1.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var bs=i(4629);class ys{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class ws{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new ys(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}var Cs=i(48836);const Ss=!1;class ks extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class xs{constructor(e=new Cs.a,t=!1,i,n=Ss){this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(he._Y,this),this._globalGraph=n?i?._globalGraph??new ws((e=>e)):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,(0,l.AS)(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)(0,l.Xm)(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const i=this,n=new class extends xs{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),t?.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();const i=Es.traceInvocation(this._enableTracing,e);let n=!1;try{const o={get:e=>{if(n)throw(0,v.iH)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}};return e(o,...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return this._throwIfDisposed(),e instanceof bs.d?(i=Es.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Es.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=he._$.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const r of n){const t=this._getOrCreateServiceInstance(r.id,i);t||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${r.id}.`,!1),o.push(t)}const s=n.length>0?n[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);const i=s-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,s)}return Reflect.construct(e,t.concat(o))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof bs.d)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setCreatedServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof bs.d?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new ws((e=>e.id.toString()));let o=0;const s=[{id:e,desc:t,_trace:i}],r=new Set;while(s.length){const t=s.pop();if(!r.has(String(t.id))){if(r.add(String(t.id)),n.lookupOrInsertNode(t),o++>1e3)throw new ks(n);for(const i of he._$.getServiceDependencies(t.desc.ctor)){const o=this._getServiceInstanceOrDescriptor(i.id);if(o||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(t.id),String(i.id)),o instanceof bs.d){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),s.push(e)}}}}while(1){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new ks(n);break}for(const{data:t}of e){const e=this._getServiceInstanceOrDescriptor(t.id);if(e instanceof bs.d){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setCreatedServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof bs.d)return this._createServiceInstance(e,t,i,n,o,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,o,s){if(n){const n=new xs(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const r=new Map,a=new f.F6((()=>{const e=n._createInstance(t,i,o);for(const[t,i]of r){const n=e[t];if("function"===typeof n)for(const t of i)t.disposable=n.apply(e,t.listener)}return r.clear(),s.add(e),e}));return new Proxy(Object.create(null),{get(e,t){if(!a.isInitialized&&"string"===typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=r.get(t);e||(e=new ie.w,r.set(t,e));const i=(i,n,o)=>{if(a.isInitialized)return a.value[t](i,n,o);{const t={listener:[i,n,o],disposable:void 0},s=e.push(t),r=(0,l.s)((()=>{s(),t.disposable?.dispose()}));return r}};return i}if(t in e)return e[t];const i=a.value;let n=i[t];return"function"!==typeof n||(n=n.bind(i),e[t]=n),n},set(e,t,i){return a.value[t]=i,!0},getPrototypeOf(e){return t.prototype}})}{const e=this._createInstance(t,i,o);return s.add(e),e}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Es{static{this.all=new Set}static{this._None=new class extends Es{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,t){return e?new Es(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Es._None}static traceCreation(e,t){return e?new Es(1,t.name):Es._None}static{this._totals=0}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Es(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Es._totals+=e;let t=!1;function i(e,n){const o=[],s=new Array(e+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);const n=i(e+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}const n=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Es._totals.toFixed(2)}ms)`];(e>2||t)&&Es.all.add(n.join("\n"))}}var Ls=i(45658);const Ts=new Set([b.ny.inMemory,b.ny.vscodeSourceControl,b.ny.walkThrough,b.ny.walkThroughSnippet,b.ny.vscodeChatCodeBlock]);class Is{constructor(){this._byResource=new It.fT,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new It.fT,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){const i=this._byResource.get(e);return i?.get(t)}delete(e,t){let i=!1,n=!1;const o=this._byResource.get(e);o&&(i=o.delete(t));const s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){return"string"===typeof e?this._byOwner.get(e)?.values()??es.f.empty():d.r.isUri(e)?this._byResource.get(e)?.values()??es.f.empty():es.f.map(es.f.concat(...this._byOwner.values()),(e=>e[1]))}}class Rs{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new It.fT,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Ts.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Ls.cj.Error?t.errors+=1:i===Ls.cj.Warning?t.warnings+=1:i===Ls.cj.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class Ds{constructor(){this._onMarkerChanged=new te.uI({delay:0,merge:Ds._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Is,this._stats=new Rs(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,y.Ct)(i)){const i=this._data.delete(t,e);i&&this._onMarkerChanged.fire([t])}else{const n=[];for(const o of i){const i=Ds._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:u,tags:h}=i;if(s)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,d=d>0?d:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:u,tags:h}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const o of n){const t=es.f.first(o);t&&(i.push(t.resource),this._data.delete(t.resource,e))}if((0,y.EI)(t)){const n=new It.fT;for(const{resource:o,marker:s}of t){const t=Ds._toMarker(e,o,s);if(!t)continue;const r=n.get(o);r?r.push(t):(n.set(o,[t]),i.push(o))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(Ds._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(i??t),s=[];for(const t of e)for(const e of t)if(Ds._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(const t of this._data.values())for(const i of t)if(Ds._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new It.fT;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}var Ns=i(94216);class As extends l.jG{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=At.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=At.createEmptyModel(this.logService);const e=Dt.O.as(Rt.Fd.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],o=t[n];void 0!==e?this._configurationModel.setValue(n,e):o?this._configurationModel.setValue(n,o.default):this._configurationModel.removeValue(n)}}}var Os=i(4380);class Ps extends l.jG{constructor(e,t=[]){super(),this.logger=new F.Dk([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}var Ms=i(36285),Fs=i(31554),Bs=i(15863);class Ws{getParseResult(e){}}var Hs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Vs=function(e,t){return function(i,n){t(i,n,e)}};class js{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new te.vl}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let zs=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new l.BO(new js(t))):Promise.reject(new Error("Model not found"))}};zs=Hs([Vs(0,P.IModelService)],zs);class Us{static{this.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}}}show(){return Us.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}}class $s{withProgress(e,t,i){return t({report:()=>{}})}}class qs{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class Ks{async confirm(e){const t=this.doConfirm(e.message,e.detail);return{confirmed:t,checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),a.G.confirm(i)}async prompt(e){let t;const i=this.doConfirm(e.message,e.detail);if(i){const i=[...e.buttons??[]];e.cancelButton&&"string"!==typeof e.cancelButton&&"boolean"!==typeof e.cancelButton&&i.push(e.cancelButton),t=await(i[0]?.run({checkboxChecked:!1}))}return{result:t}}async error(e,t){await this.prompt({type:ve.A.Error,message:e,detail:t})}}class Gs{static{this.NO_OP=new ye.Kz}info(e){return this.notify({severity:ve.A.Info,message:e})}warn(e){return this.notify({severity:ve.A.Warning,message:e})}error(e){return this.notify({severity:ve.A.Error,message:e})}notify(e){switch(e.severity){case ve.A.Error:console.error(e.message);break;case ve.A.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Gs.NO_OP}prompt(e,t,i,n){return Gs.NO_OP}status(e,t){return l.jG.None}}let Qs=class{constructor(e){this._onWillExecuteCommand=new te.vl,this._onDidExecuteCommand=new te.vl,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Tt.w.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};Qs=Hs([Vs(0,he._Y)],Qs);let Ys=class extends qt{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new l.Cm;t.add(z.ko(e,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e),i=this._dispatch(t,t.target);i&&(t.preventDefault(),t.stopPropagation())}))),t.add(z.ko(e,z.Bx.KEY_UP,(e=>{const t=new it.Z(e),i=this._singleModifierDispatch(t,t.target);i&&t.preventDefault()}))),this._domNodeListeners.push(new Zs(e,t))},a=e=>{for(let t=0;t{e.getOption(61)||r(e.getContainerDomNode())},d=e=>{e.getOption(61)||a(e.getContainerDomNode())};this._register(s.onCodeEditorAdd(c)),this._register(s.onCodeEditorRemove(d)),s.listCodeEditors().forEach(c);const u=e=>{r(e.getContainerDomNode())},h=e=>{a(e.getContainerDomNode())};this._register(s.onDiffEditorAdd(u)),this._register(s.onDiffEditorRemove(h)),s.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,i,n){return(0,l.qE)(Tt.w.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>{const t=(0,Ct.Zv)(e.keybinding,qe.OS);return{keybinding:t,command:e.command??null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),(0,l.s)((()=>{for(let e=0;ethis._log(e)))}return this._cachedResolver}_documentHasFocus(){return a.G.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const e=o.when||void 0,s=o.keybinding;if(s){const r=ei.resolveKeybinding(s,qe.OS);for(const s of r)i[n++]=new Qt(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new Qt(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new Ct.dG(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new ei([t],qe.OS)}};Ys=Hs([Vs(0,ae.fN),Vs(1,Tt.d),Vs(2,ni.k),Vs(3,ye.Ot),Vs(4,F.rr),Vs(5,g.T)],Ys);class Zs extends l.jG{constructor(e,t){super(),this.domNode=e,this._register(t)}}function Xs(e){return e&&"object"===typeof e&&(!e.overrideIdentifier||"string"===typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof d.r)}let Js=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new te.vl,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new As(e);this._configuration=new Mt(t.reload(),At.createEmptyModel(e),At.createEmptyModel(e),At.createEmptyModel(e),At.createEmptyModel(e),At.createEmptyModel(e),new It.fT,At.createEmptyModel(e),new It.fT,e),t.dispose()}getValue(e,t){const i="string"===typeof e?e:void 0,n=Xs(e)?e:Xs(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[e,t]=n;this.getValue(e)!==t&&(this._configuration.updateValue(e,t),i.push(e))}if(i.length>0){const e=new Ft({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);e.source=8,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};Js=Hs([Vs(0,F.rr)],Js);let er=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new te.vl,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=Et.y.isIPosition(t)?t:null,o=n?"string"===typeof i?i:void 0:"string"===typeof t?t:void 0,s=e?this.getLanguage(e,n):void 0;return"undefined"===typeof o?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:s})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};er=Hs([Vs(0,He.pG),Vs(1,P.IModelService),Vs(2,Ki.L)],er);let tr=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"===typeof i&&"auto"!==i?i:qe.j9||qe.zx?"\n":"\r\n"}};tr=Hs([Vs(0,He.pG)],tr);class ir{publicLog2(){}}class nr{static{this.SCHEME="inmemory"}constructor(){const e=d.r.from({scheme:nr.SCHEME,authority:"model",path:"/"});this.workspace={id:oi.cn,folders:[new oi.mX({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===nr.SCHEME?this.workspace.folders[0]:null}}function or(e,t,i){if(!t)return;if(!(e instanceof Js))return;const n=[];Object.keys(t).forEach((e=>{(0,kt.vf)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,kt.Gn)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}let sr=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:St.jN.convert(e),n=new Map;for(const r of i){if(!(r instanceof St.cw))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(r.resource);if(!e)throw new Error("bad edit - model not found");if("number"===typeof r.versionId&&e.getVersionId()!==r.versionId)throw new Error("bad state - model changed in the meantime");let t=n.get(e);t||(t=[],n.set(e,t)),t.push(xt.k.replaceMove(N.Q.lift(r.textEdit.range),r.textEdit.text))}let o=0,s=0;for(const[r,a]of n)r.pushStackElement(),r.pushEditOperations([],a,(()=>[])),r.pushStackElement(),s+=1,o+=a.length;return{ariaSummary:c.GP(si.tu.bulkEditServiceSummary,o,s),isApplied:o>0}}};sr=Hs([Vs(0,P.IModelService)],sr);class rr{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return(0,ri.P8)(e)}}let ar=class extends ht{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};ar=Hs([Vs(0,ge),Vs(1,g.T)],ar);class lr{constructor(){this._neverEmitter=new te.vl,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class cr extends li.LanguageService{constructor(){super()}}class dr extends Ps{constructor(){super(new F.Cr)}}let ur=class extends Fi{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s),this.configure({blockMouse:!1})}};ur=Hs([Vs(0,ni.k),Vs(1,ye.Ot),Vs(2,Be.l),Vs(3,We.b),Vs(4,ui.ez),Vs(5,ae.fN)],ur);const hr={amdModuleId:"vs/editor/common/services/editorSimpleWorker",esmModuleLocation:void 0,label:"editorWorkerService"};let gr=class extends Y{constructor(e,t,i,n,o){super(hr,e,t,i,n,o)}};gr=Hs([Vs(0,P.IModelService),Vs(1,M.ITextResourceConfigurationService),Vs(2,F.rr),Vs(3,A.JZ),Vs(4,W.ILanguageFeaturesService)],gr);class pr{async playSignal(e,t){}}var fr;function mr(e,t){return new _r(e,t)}(0,le.v)(F.rr,dr,0),(0,le.v)(He.pG,Js,0),(0,le.v)(M.ITextResourceConfigurationService,er,0),(0,le.v)(M.ITextResourcePropertiesService,tr,0),(0,le.v)(oi.VR,nr,0),(0,le.v)(ti.L,rr,0),(0,le.v)(ni.k,ir,0),(0,le.v)(be.X,Ks,0),(0,le.v)(Fs.k,qs,0),(0,le.v)(ye.Ot,Gs,0),(0,le.v)(Ls.DR,Ds,0),(0,le.v)(Ki.L,cr,0),(0,le.v)(jo.L,Vo.Sx,0),(0,le.v)(P.IModelService,Yi.ModelService,0),(0,le.v)(Qi.IMarkerDecorationsService,Gi.MarkerDecorationsService,0),(0,le.v)(ae.fN,ps,0),(0,le.v)(ii.G5,$s,0),(0,le.v)(ii.N8,Us,0),(0,le.v)(Ns.CS,Ns.pc,0),(0,le.v)(qi.IEditorWorkerService,gr,0),(0,le.v)(St.nu,sr,0),(0,le.v)(ai.L,lr,0),(0,le.v)(Lt.ITextModelService,zs,0),(0,le.v)(Ke.j,$o,0),(0,le.v)(zn.PE,zn.aG,0),(0,le.v)(Tt.d,Qs,0),(0,le.v)(We.b,Ys,0),(0,le.v)(Xi.GK,Bo,0),(0,le.v)(Be.l,ar,0),(0,le.v)(ze.C,$i,0),(0,le.v)(Jo.h,Xo,0),(0,le.v)(Be.Z,ur,0),(0,le.v)(ui.ez,Ko.$,0),(0,le.v)(Os.Nt,pr,0),(0,le.v)(Bs.ITreeSitterParserService,Ws,0),function(e){const t=new Cs.a;for(const[l,c]of(0,le.N)())t.set(l,c);const i=new xs(t,!0);function n(e){o||r({});const n=t.get(e);if(!n)throw new Error("Missing service "+e);return n instanceof bs.d?i.invokeFunction((t=>t.get(e))):n}t.set(he._Y,i),e.get=n;let o=!1;const s=new te.vl;function r(e){if(o)return i;o=!0;for(const[i,o]of(0,le.N)())t.get(i)||t.set(i,o);for(const i in e)if(e.hasOwnProperty(i)){const n=(0,he.u1)(i),o=t.get(n);o instanceof bs.d&&t.set(n,e[i])}const n=(0,Ms.T)();for(const t of n)try{i.createInstance(t)}catch(r){(0,v.dz)(r)}return s.fire(),i}function a(e){if(o)return e();const t=new l.Cm,i=t.add(s.event((()=>{i.dispose(),t.add(e())})));return t}e.initialize=r,e.withServices=a}(fr||(fr={}));class _r extends ee{constructor(e,t){const i={amdModuleId:hr.amdModuleId,esmModuleLocation:hr.esmModuleLocation,label:t.label};super(i,t.keepIdleModels||!1,e),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!==typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?(0,p.V0)(this._foreignModuleHost):[];return e.$loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.$fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this.workerWithSyncedResources(e).then((e=>this.getProxy()))}}var vr=i(17522),br=i(86817),yr=i(69483),wr=i(35350),Cr=i(65764),Sr=i(58403),kr=i(9322),xr=i(84296),Er=i(70164),Lr=i(20529),Tr=i(90765);function Ir(e){return Array.isArray(e)}function Rr(e){return!Ir(e)}function Dr(e){return"string"===typeof e}function Nr(e){return!Dr(e)}function Ar(e){return!e}function Or(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Pr(e){return e.replace(/[&<>'"_]/g,"-")}function Mr(e,t){console.log(`${e.languageId}: ${t}`)}function Fr(e,t){return new Error(`${e.languageId}: ${t}`)}function Br(e,t,i,n,o){const s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let r=null;return t.replace(s,(function(t,s,a,l,c,d,u,h,g){return Ar(a)?Ar(l)?!Ar(c)&&c0){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}function Vr(e,t){let i=t;while(i&&i.length>0){const t=e.stateNames[i];if(t)return!0;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return!1}var jr,zr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ur=function(e,t){return function(i,n){t(i,n,e)}};const $r=5;class qr{static{this._INSTANCE=new qr($r)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new Kr(e,t);let i=Kr.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new Kr(e,t),this._entries[i]=n,n)}}class Kr{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";while(null!==e)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){while(null!==e&&null!==t){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return Kr._equals(this,e)}push(e){return qr.create(this,e)}pop(){return this.parent}popall(){let e=this;while(e.parent)e=e.parent;return e}switchTo(e){return qr.create(this.parent,e)}}class Gr{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){const e=this.state.clone();return e===this.state?this:new Gr(this.languageId,this.state)}}class Qr{static{this._INSTANCE=new Qr($r)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new Yr(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new Yr(e,t);const i=Kr.getStackElementId(e);let n=this._entries[i];return n||(n=new Yr(e,null),this._entries[i]=n,n)}}class Yr{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){const e=this.embeddedLanguageData?this.embeddedLanguageData.clone():null;return e===this.embeddedLanguageData?this:Qr.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof Yr&&(!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData)))}}class Zr{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new wr.ou(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=wr.dG.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenize(e,t,s);if(0!==n)for(const l of a.tokens)this._tokens.push(new wr.ou(l.offset+n,l.type,l.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new wr.$M(this._tokens,e)}}class Xr{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,o=t.length,s=null!==i?i.length:0;if(0===n&&0===o&&0===s)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===s)return e;const r=new Uint32Array(n+o+s);null!==e&&r.set(e);for(let a=0;a{if(s)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=wr.dG.get(t);if(i){if(i instanceof jr){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else wr.dG.isResolved(t)||e.push(wr.dG.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=qr.create(null,this._lexer.start);return Qr.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,Sr.$H)(this._languageId,i);const n=new Zr,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,Sr.Lh)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new Xr(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n);return n.finalize(o)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Hr(this._lexer,t.stack.state),!i))throw Fr(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const s of i){if(!Nr(s.action)||"@pop"!==s.action.nextEmbedded)continue;o=!0;let i=s.resolveRegex(t.stack.state);const r=i.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(r.substr(4,r.length-5),e)}const a=e.search(i);-1===a||0!==a&&s.matchOnlyAtLineStart||(-1===n||a0&&o.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(s);return this._myTokenize(a,t,i,n+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterLanguage(this._languageId);const s=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,c=i.stack,d=0,u=null,h=!0;while(h||d=a)break;h=!1;let e=this._lexer.tokenizer[f];if(!e&&(e=Hr(this._lexer,f),!e))throw Fr(this._lexer,"tokenizer state is not defined: "+f);const t=r.substr(d);for(const i of e)if((0===d||!i.matchOnlyAtLineStart)&&(m=t.match(i.resolveRegex(f)),m)){_=m[0],v=i.action;break}}if(m||(m=[""],_=""),v||(d=this._lexer.maxStack)throw Fr(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(f)}else if("@pop"===v.next){if(c.depth<=1)throw Fr(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(b));c=c.pop()}else if("@popall"===v.next)c=c.popall();else{let e=Br(this._lexer,v.next,_,m,f);if("@"===e[0]&&(e=e.substr(1)),!Hr(this._lexer,e))throw Fr(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(b));c=c.push(e)}}v.log&&"string"===typeof v.log&&Mr(this._lexer,this._lexer.languageId+": "+Br(this._lexer,v.log,_,m,f))}if(null===w)throw Fr(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(b));const C=i=>{const s=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(s);if(d0)throw Fr(this._lexer,"groups cannot be nested: "+this._safeRuleName(b));if(m.length!==w.length+1)throw Fr(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(b));let e=0;for(let t=1;te});class ia{static colorizeElement(e,t,i,n){n=n||{};const o=n.theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+o;const l=e=>{const t=ta?.createHTML(e)??e;i.innerHTML=t};return this.colorize(t,a||"",r,n).then(l,(e=>console.error(e)))}static async colorize(e,t,i,n){const o=e.languageIdCodec;let s=4;n&&"number"===typeof n.tabSize&&(s=n.tabSize),c.LU(t)&&(t=t.substr(1));const r=c.uz(t);if(!e.isRegisteredLanguageId(i))return oa(r,s,o);const a=await wr.dG.getOrCreate(i);return a?na(r,s,a,o):oa(r,s,o)}static colorizeLine(e,t,i,n,o=4){const s=Tr.qL.isBasicASCII(e,t),r=Tr.qL.containsRTL(e,s,i),a=(0,Lr.Md)(new Lr.zL(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null));return a.html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const o=e.tokenization.getLineTokens(t),s=o.inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,i)}}function na(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=sa(e,t,i,n);if(i instanceof Jr){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}function oa(e,t,i){let n=[];const o=33587200,s=new Uint32Array(2);s[0]=0,s[1]=o;for(let r=0,a=e.length;r")}return n.join("")}function sa(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r"),s=l.endState}return o.join("")}var ra=i(5868),aa=i(12032),la=i(96371),ca=i(50799),da=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ua=function(e,t){return function(i,n){t(i,n,e)}};let ha=0,ga=!1;function pa(e){if(!e){if(ga)return;ga=!0}Ge.vr(e||a.G.document.body)}let fa=class extends o.x{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h){const g={...t};g.ariaLabel=g.ariaLabel||si.vp.editorViewAccessibleLabel,super(e,g,{},i,n,o,s,l,c,d,u,h),this._standaloneKeybindingService=a instanceof Ys?a:null,pa(g.ariaContainerElement),(0,la.MW)(((e,t)=>i.createInstance(Fe.fO,e,t,{}))),(0,ca.e)(r)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++ha,o=ae.M$.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!==typeof e.id||"string"!==typeof e.label||"function"!==typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.jG.None;const t=e.id,i=e.label,n=ae.M$.and(ae.M$.equals("editorId",this.getId()),ae.M$.deserialize(e.precondition)),o=e.keybindings,s=ae.M$.and(n,ae.M$.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,c=(t,...i)=>Promise.resolve(e.run(this,...i)),d=new l.Cm,u=this.getId()+":"+t;if(d.add(Tt.w.registerCommand(u,c)),r){const e={command:{id:u,title:i},when:n,group:r,order:a};d.add(ui.ZG.appendMenuItem(ui.D8.EditorContext,e))}if(Array.isArray(o))for(const l of o)d.add(this._standaloneKeybindingService.addDynamicKeybinding(u,l,c,s));const h=new ra.f(u,i,i,void 0,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,h),d.add((0,l.s)((()=>{this._actions.delete(t)}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof ue)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};fa=da([ua(2,he._Y),ua(3,g.T),ua(4,Tt.d),ua(5,ae.fN),ua(6,Fe.TN),ua(7,We.b),ua(8,ne.Gy),ua(9,ye.Ot),ua(10,Ke.j),ua(11,A.JZ),ua(12,W.ILanguageFeaturesService)],fa);let ma=class extends fa{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h,g,p,f){const m={...t};or(d,m,!1);const _=l.registerEditorContainer(e);"string"===typeof m.theme&&l.setTheme(m.theme),"undefined"!==typeof m.autoDetectHighContrast&&l.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const v=m.model;let b;if(delete m.model,super(e,m,i,n,o,s,r,a,l,c,u,p,f),this._configurationService=d,this._standaloneThemeService=l,this._register(_),"undefined"===typeof v){const e=g.getLanguageIdByMimeType(m.language)||m.language||Cr.vH;b=va(h,g,m.value||"",e,void 0),this._ownsModel=!0}else b=v,this._ownsModel=!1;if(this._attachModel(b),b){const e={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){or(this._configurationService,e,!1),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),"undefined"!==typeof e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};ma=da([ua(2,he._Y),ua(3,g.T),ua(4,Tt.d),ua(5,ae.fN),ua(6,Fe.TN),ua(7,We.b),ua(8,jo.L),ua(9,ye.Ot),ua(10,He.pG),ua(11,Ke.j),ua(12,P.IModelService),ua(13,Ki.L),ua(14,A.JZ),ua(15,W.ILanguageFeaturesService)],ma);let _a=class extends aa.T{constructor(e,t,i,n,o,s,r,a,l,c,d,u){const h={...t};or(a,h,!0);const g=s.registerEditorContainer(e);"string"===typeof h.theme&&s.setTheme(h.theme),"undefined"!==typeof h.autoDetectHighContrast&&s.setAutoDetectHighContrast(Boolean(h.autoDetectHighContrast)),super(e,h,{},n,i,o,u,c),this._configurationService=a,this._standaloneThemeService=s,this._register(g)}dispose(){super.dispose()}updateOptions(e){or(this._configurationService,e,!0),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),"undefined"!==typeof e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(fa,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function va(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let s=i;return-1!==n&&(s=i.substring(0,n)),ba(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return ba(e,i,t.createById(n),o)}function ba(e,t,i,n){return e.createModel(t,i,n)}_a=da([ua(2,he._Y),ua(3,ae.fN),ua(4,g.T),ua(5,jo.L),ua(6,ye.Ot),ua(7,He.pG),ua(8,Be.Z),ua(9,ii.N8),ua(10,Jo.h),ua(11,Os.Nt)],_a);var ya=i(34956),wa=i(43654),Ca=i(81275),Sa=i(52210),ka=i(78787),xa=i(50371),Ea=i(98581),La=i(57479),Ta=i(55745),Ia=i(64164),Ra=i(24878),Da=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Na=function(e,t){return function(i,n){t(i,n,e)}};class Aa{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let Oa=class extends l.jG{constructor(e,t,i,n,o){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=(0,Ca.FY)(this,void 0),this._collapsed=(0,eo.un)(this,(e=>this._viewModel.read(e)?.collapsed.read(e))),this._editorContentHeight=(0,Ca.FY)(this,500),this.contentHeight=(0,eo.un)(this,(e=>{const t=this._collapsed.read(e)?0:this._editorContentHeight.read(e);return t+this._outerEditorHeight})),this._modifiedContentWidth=(0,Ca.FY)(this,0),this._modifiedWidth=(0,Ca.FY)(this,0),this._originalContentWidth=(0,Ca.FY)(this,0),this._originalWidth=(0,Ca.FY)(this,0),this.maxScroll=(0,eo.un)(this,(e=>{const t=this._modifiedContentWidth.read(e)-this._modifiedWidth.read(e),i=this._originalContentWidth.read(e)-this._originalWidth.read(e);return t>i?{maxScroll:t,width:this._modifiedWidth.read(e)}:{maxScroll:i,width:this._originalWidth.read(e)}})),this._elements=(0,z.h)("div.multiDiffEntry",[(0,z.h)("div.header@header",[(0,z.h)("div.header-content",[(0,z.h)("div.collapse-button@collapseButton"),(0,z.h)("div.file-path",[(0,z.h)("div.title.modified.show-file-icons@primaryPath",[]),(0,z.h)("div.status.deleted@status",["R"]),(0,z.h)("div.title.original.show-file-icons@secondaryPath",[])]),(0,z.h)("div.actions@actions")])]),(0,z.h)("div.editorParent",[(0,z.h)("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(aa.T,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=(0,Ta.Ud)(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=(0,Ta.Ud)(this.editor.getOriginalEditor()).isFocused,this.isFocused=(0,eo.un)(this,(e=>this.isModifedFocused.read(e)||this.isOriginalFocused.read(e))),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new l.Cm),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const s=new Nn.$(this._elements.collapseButton,{});this._register((0,eo.fm)((e=>{s.element.className="",s.icon=this._collapsed.read(e)?vi.W.chevronRight:vi.W.chevronDown}))),this._register(s.onDidClick((()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)}))),this._register((0,eo.fm)((e=>{this._elements.editor.style.display=this._collapsed.read(e)?"none":"block"}))),this._register(this.editor.getModifiedEditor().onDidLayoutChange((e=>{const t=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(t,void 0)}))),this._register(this.editor.getOriginalEditor().onDidLayoutChange((e=>{const t=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(t,void 0)}))),this._register(this.editor.onDidContentSizeChange((e=>{(0,Ca.YY)((t=>{this._editorContentHeight.set(e.contentHeight,t),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),t),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),t)}))}))),this._register(this.editor.getOriginalEditor().onDidScrollChange((e=>{if(this._isSettingScrollTop)return;if(!e.scrollTopChanged||!this._data)return;const t=e.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(t)}))),this._register((0,eo.fm)((e=>{const t=this._viewModel.read(e)?.isActive.read(e);this._elements.root.classList.toggle("active",t)}))),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(o.createScoped(this._elements.actions));const r=this._register(this._instantiationService.createChild(new Cs.a([ae.fN,this._contextKeyService])));this._register(r.createInstance(Ia.m,this._elements.actions,ui.D8.MultiDiffEditorFileToolbar,{actionRunner:this._register(new Ra.I((()=>this._viewModel.get()?.modifiedUri))),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("navigation")},actionViewItemProvider:(e,t)=>(0,di.rN)(r,e,t)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(e){return{...e,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(this._data=e,!e)return void(0,Ca.YY)((e=>{this._viewModel.set(void 0,e),this.editor.setDiffModel(null,e),this._dataStore.clear()}));const i=e.viewModel.documentDiffItem;if((0,Ca.YY)((n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:void 0===e.viewModel.modifiedUri});let o=!1,s=!1,r=!1,a="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(a="R",o=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(a="A",r=!0):(a="D",s=!0),this._elements.status.classList.toggle("renamed",o),this._elements.status.classList.toggle("deleted",s),this._elements.status.classList.toggle("added",r),this._elements.status.innerText=a,this._resourceLabel2?.setUri(o?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))})),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange((()=>{this.editor.updateOptions(t(i.options??{}))}))),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,(e=>{e||this.setData(void 0)})),e.viewModel.documentDiffItem.contextKeys)for(const[n,o]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(n,o)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const o=e.length-this._headerHeight,s=Math.max(0,Math.min(n.start-e.start,o));this._elements.header.style.transform=`translateY(${s}px)`,(0,Ca.YY)((i=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})}));try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",s>0||i>0),this._elements.header.classList.toggle("collapsed",s===o)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};Oa=Da([Na(3,he._Y),Na(4,ae.fN)],Oa);class Pa{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(0===this._unused.size)t=this._create(e),this._itemData.set(t,e);else{const i=[...this._unused.values()];t=i.find((t=>this._itemData.get(t).getId()===e.getId()))??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var Ma=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Fa=function(e,t){return function(i,n){t(i,n,e)}};let Ba=class extends l.jG{constructor(e,t,i,n,o,s){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=o,this._parentInstantiationService=s,this._scrollableElements=(0,z.h)("div.scrollContent",[(0,z.h)("div@content",{style:{overflow:"hidden"}}),(0,z.h)("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new Sa.yE({forceIntegerValues:!1,scheduleAtNextAnimationFrame:e=>(0,z.PG)((0,z.zk)(this._element),e),smoothScrollDuration:100})),this._scrollableElement=this._register(new _i.oO(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=(0,z.h)("div.monaco-component.multiDiffEditor",{},[(0,z.h)("div",{},[this._scrollableElement.getDomNode()]),(0,z.h)("div.placeholder@placeholder",{},[(0,z.h)("div",[(0,w.kg)("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new ka.pN(this._element,void 0)),this._objectPool=this._register(new Pa((e=>{const t=this._instantiationService.createInstance(Oa,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return t.setData(e),t}))),this.scrollTop=(0,eo.y0)(this,this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollTop)),this.scrollLeft=(0,eo.y0)(this,this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollLeft)),this._viewItemsInfo=(0,eo.rm)(this,((e,t)=>{const i=this._viewModel.read(e);if(!i)return{items:[],getItem:e=>{throw new v.D7}};const n=i.items.read(e),o=new Map,s=n.map((e=>{const i=t.add(new Wa(e,this._objectPool,this.scrollLeft,(e=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+e})}))),n=this._lastDocStates?.[i.getKey()];return n&&(0,Ca.Rn)((e=>{i.setViewState(n,e)})),o.set(e,i),i}));return{items:s,getItem:e=>o.get(e)}})),this._viewItems=this._viewItemsInfo.map(this,(e=>e.items)),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,((e,t)=>e.reduce(((e,i)=>e+i.contentHeight.read(t)+this._spaceBetweenPx),0))),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new Cs.a([ae.fN,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(La.R.inMultiDiffEditor.key,!0),this._register((0,eo.yC)(((e,t)=>{const i=this._viewModel.read(e);if(i&&i.contextKeys)for(const[n,o]of Object.entries(i.contextKeys)){const e=this._contextKeyService.createKey(n,void 0);e.set(o),t.add((0,l.s)((()=>e.reset())))}})));const r=this._parentContextKeyService.createKey(La.R.multiDiffEditorAllCollapsed.key,!1);this._register((0,eo.fm)((e=>{const t=this._viewModel.read(e);if(t){const i=t.items.read(e).every((t=>t.collapsed.read(e)));r.set(i)}}))),this._register((0,eo.fm)((e=>{const t=this._dimension.read(e);this._sizeObserver.observe(t)}))),this._register((0,eo.fm)((e=>{const t=this._viewItems.read(e);this._elements.placeholder.classList.toggle("visible",0===t.length)}))),this._scrollableElements.content.style.position="relative",this._register((0,eo.fm)((e=>{const t=this._sizeObserver.height.read(e);this._scrollableElements.root.style.height=`${t}px`;const i=this._totalHeight.read(e);this._scrollableElements.content.style.height=`${i}px`;const n=this._sizeObserver.width.read(e);let o=n;const s=this._viewItems.read(e),r=(0,wa.Cn)(s,(0,y.VE)((t=>t.maxScroll.read(e).maxScroll),y.U9));if(r){const t=r.maxScroll.read(e);o=n+t.maxScroll}this._scrollableElement.setScrollDimensions({width:n,height:t,scrollHeight:i,scrollWidth:o})}))),e.replaceChildren(this._elements.root),this._register((0,l.s)((()=>{e.replaceChildren()}))),this._register(this._register((0,eo.fm)((e=>{(0,Ca.YY)((t=>{this.render(e)}))}))))}render(e){const t=this.scrollTop.read(e);let i=0,n=0,o=0;const s=this._sizeObserver.height.read(e),r=xa.L.ofStartAndLength(t,s),a=this._sizeObserver.width.read(e);for(const l of this._viewItems.read(e)){const c=l.contentHeight.read(e),d=Math.min(c,s),u=xa.L.ofStartAndLength(n,d),h=xa.L.ofStartAndLength(o,c);if(h.isBefore(r))i-=c-d,l.hide();else if(h.isAfter(r))l.hide();else{const e=Math.max(0,Math.min(r.start-h.start,c-d));i-=e;const n=xa.L.ofStartAndLength(t+i,s);l.render(u,e,a,n)}n+=d+this._spaceBetweenPx,o+=c+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};Ba=Ma([Fa(4,ae.fN),Fa(5,he._Y)],Ba);class Wa extends l.jG{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register((0,Ca.X2)(this,void 0)),this.contentHeight=(0,eo.un)(this,(e=>this._templateRef.read(e)?.object.contentHeight?.read(e)??this.viewModel.lastTemplateData.read(e).contentHeight)),this.maxScroll=(0,eo.un)(this,(e=>this._templateRef.read(e)?.object.maxScroll.read(e)??{maxScroll:0,scrollWidth:0})),this.template=(0,eo.un)(this,(e=>this._templateRef.read(e)?.object)),this._isHidden=(0,eo.FY)(this,!1),this._isFocused=(0,eo.un)(this,(e=>this.template.read(e)?.isFocused.read(e)??!1)),this.viewModel.setIsFocused(this._isFocused,void 0),this._register((0,eo.fm)((e=>{const t=this._scrollLeft.read(e);this._templateRef.read(e)?.object.setScrollLeft(t)}))),this._register((0,eo.fm)((e=>{const t=this._templateRef.read(e);if(!t)return;const i=this._isHidden.read(e);if(!i)return;const n=t.object.isFocused.read(e);n||this._clear()})))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(Ea.L.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);const o=this._templateRef.get();o&&n&&o.object.editor.setSelections(n)}_updateTemplateData(e){const t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&(0,Ca.Rn)((t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)}))}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let o=this._templateRef.get();if(!o){o=this._objectPool.getUnusedObj(new Aa(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(o,void 0);const e=this.viewModel.lastTemplateData.get().selections;e&&o.object.editor.setSelections(e)}o.object.render(e,i,t,n)}}(0,Me.x1A)("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},(0,w.kg)("multiDiffEditor.headerBackground","The background color of the diff editor's header")),(0,Me.x1A)("multiDiffEditor.background",Me.YtV,(0,w.kg)("multiDiffEditor.background","The background color of the multi file diff editor")),(0,Me.x1A)("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},(0,w.kg)("multiDiffEditor.border","The border color of the multi file diff editor"));var Ha=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Va=function(e,t){return function(i,n){t(i,n,e)}};let ja=class extends l.jG{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=(0,eo.FY)(this,void 0),this._viewModel=(0,eo.FY)(this,void 0),this._widgetImpl=(0,eo.rm)(this,((e,t)=>((0,ya.b)(Oa,e),t.add(this._instantiationService.createInstance((0,ya.b)(Ba,e),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))))),this._register((0,eo.OI)(this._widgetImpl))}};function za(e,t,i){const n=fr.initialize(i||{});return n.createInstance(ma,e,t)}function Ua(e){const t=fr.get(g.T);return t.onCodeEditorAdd((t=>{e(t)}))}function $a(e){const t=fr.get(g.T);return t.onDiffEditorAdd((t=>{e(t)}))}function qa(){const e=fr.get(g.T);return e.listCodeEditors()}function Ka(){const e=fr.get(g.T);return e.listDiffEditors()}function Ga(e,t,i){const n=fr.initialize(i||{});return n.createInstance(_a,e,t)}function Qa(e,t){const i=fr.initialize(t||{});return new ja(e,{},i)}function Ya(e){if("string"!==typeof e.id||"function"!==typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Tt.w.registerCommand(e.id,e.run)}function Za(e){if("string"!==typeof e.id||"string"!==typeof e.label||"function"!==typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=ae.M$.deserialize(e.precondition),i=(i,...n)=>h.DX.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n)))),n=new l.Cm;if(n.add(Tt.w.registerCommand(e.id,i)),e.contextMenuGroupId){const i={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};n.add(ui.ZG.appendMenuItem(ui.D8.EditorContext,i))}if(Array.isArray(e.keybindings)){const i=fr.get(We.b);if(i instanceof Ys){const o=ae.M$.and(t,ae.M$.deserialize(e.keybindingContext));n.add(i.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:o})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return n}function Xa(e){return Ja([e])}function Ja(e){const t=fr.get(We.b);return t instanceof Ys?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:ae.M$.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.jG.None)}function el(e,t,i){const n=fr.get(Ki.L),o=n.getLanguageIdByMimeType(t)||t;return va(fr.get(P.IModelService),n,e,o,i)}function tl(e,t){const i=fr.get(Ki.L),n=i.getLanguageIdByMimeType(t)||t||Cr.vH;e.setLanguage(i.createById(n))}function il(e,t,i){if(e){const n=fr.get(Ls.DR);n.changeOne(t,e.uri,i)}}function nl(e){const t=fr.get(Ls.DR);t.changeAll(e,[])}function ol(e){const t=fr.get(Ls.DR);return t.read(e)}function sl(e){const t=fr.get(Ls.DR);return t.onMarkerChanged(e)}function rl(e){const t=fr.get(P.IModelService);return t.getModel(e)}function al(){const e=fr.get(P.IModelService);return e.getModels()}function ll(e){const t=fr.get(P.IModelService);return t.onModelAdded(e)}function cl(e){const t=fr.get(P.IModelService);return t.onModelRemoved(e)}function dl(e){const t=fr.get(P.IModelService);return t.onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))}function ul(e){return mr(fr.get(P.IModelService),e)}function hl(e,t){const i=fr.get(Ki.L),n=fr.get(jo.L);return ia.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))}function gl(e,t,i){const n=fr.get(Ki.L),o=fr.get(jo.L);return o.registerEditorContainer(a.G.document.body),ia.colorize(n,e,t,i)}function pl(e,t,i=4){const n=fr.get(jo.L);return n.registerEditorContainer(a.G.document.body),ia.colorizeModelLine(e,t,i)}function fl(e){const t=wr.dG.get(e);return t||{getInitialState:()=>Sr.r3,tokenize:(t,i,n)=>(0,Sr.$H)(e,n)}}function ml(e,t){wr.dG.getOrCreate(t);const i=fl(t),n=(0,c.uz)(e),o=[];let s=i.getInitialState();for(let r=0,a=n.length;r{if(!i)return null;const o=t.options?.selection;let s;return o&&"number"===typeof o.endLineNumber&&"number"===typeof o.endColumn?s=o:o&&(s={lineNumber:o.startLineNumber,column:o.startColumn}),await e.openCodeEditor(i,t.resource,s)?i:null}))}function Sl(){return{create:za,getEditors:qa,getDiffEditors:Ka,onDidCreateEditor:Ua,onDidCreateDiffEditor:$a,createDiffEditor:Ga,addCommand:Ya,addEditorAction:Za,addKeybindingRule:Xa,addKeybindingRules:Ja,createModel:el,setModelLanguage:tl,setModelMarkers:il,getModelMarkers:ol,removeAllMarkers:nl,onDidChangeMarkers:sl,getModels:al,getModel:rl,onDidCreateModel:ll,onWillDisposeModel:cl,onDidChangeModelLanguage:dl,createWebWorker:ul,colorizeElement:hl,colorize:gl,colorizeModelLine:pl,tokenize:ml,defineTheme:_l,setTheme:vl,remeasureFonts:bl,registerCommand:yl,registerLinkOpener:wl,registerEditorOpener:Cl,AccessibilitySupport:xr.Gn,ContentWidgetPositionPreference:xr.Qj,CursorChangeReason:xr.h5,DefaultEndOfLine:xr.of,EditorAutoIndentStrategy:xr.e0,EditorOption:xr.p2,EndOfLinePreference:xr.kf,EndOfLineSequence:xr.WU,MinimapPosition:xr.R3,MinimapSectionHeaderStyle:xr.VX,MouseTargetType:xr.hS,OverlayWidgetPositionPreference:xr.dE,OverviewRulerLane:xr.A5,GlyphMarginLane:xr.ZS,RenderLineNumbersType:xr.DO,RenderMinimap:xr.hW,ScrollbarVisibility:xr.XR,ScrollType:xr.ov,TextEditorCursorBlinkingStyle:xr.U7,TextEditorCursorStyle:xr.m9,TrackedRangeStickiness:xr.kK,WrappingIndent:xr.tJ,InjectedTextCursorStops:xr.VW,PositionAffinity:xr.Ic,ShowLightbulbIconMode:xr.jT,ConfigurationChangedEvent:s.lw,BareFontInfo:br._8,FontInfo:br.YJ,TextModelResolvedOptions:kr.X2,FindMatch:kr.Dg,ApplyUpdateResult:s.hZ,EditorZoom:vr.D,createMultiFileDiffEditor:Qa,EditorType:yr._,EditorOptions:s.qB}}ja=Ha([Va(2,he._Y)],ja);var kl=i(85476);function xl(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const i of t)if(!e(i))return!1;return!0}function El(e,t){return"boolean"===typeof e?e:t}function Ll(e,t){return"string"===typeof e?e:t}function Tl(e){const t={};for(const i of e)t[i]=!0;return t}function Il(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=Tl(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function Rl(e,t,i){t=t.replace(/@@/g,"");let n,o=0;do{n=!1,t=t.replace(/@(\w+)/g,(function(i,o){n=!0;let s="";if("string"===typeof e[o])s=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?Fr(e,"language definition does not contain attribute '"+o+"', used at: "+t):Fr(e,"attribute reference '"+o+"' must be a string, used at: "+t);s=e[o].source}return Ar(s)?"":"(?:"+s+")"})),o++}while(n&&o<5);t=t.replace(/\x01/g,"@");const s=(e.ignoreCase?"i":"")+(e.unicode?"u":"");if(i){const i=t.match(/\$[sS](\d\d?)/g);if(i){let i=null,n=null;return o=>(n&&i===o||(i=o,n=new RegExp(Wr(e,t,o),s)),n)}}return new RegExp(t,s)}function Dl(e,t,i,n){if(n<0)return e;if(n=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"===typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Fr(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!==typeof i.next)throw Fr(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!Vr(e,Br(e,o,"",[],""))))throw Fr(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"===typeof i.goBack&&(n.goBack=i.goBack),"string"===typeof i.switchTo&&(n.switchTo=i.switchTo),"string"===typeof i.log&&(n.log=i.log),"string"===typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let o=0,s=i.length;o0&&"^"===i[0],this.name=this.name+": "+i,this.regex=Rl(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=Al(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function Pl(e,t){if(!t||"object"!==typeof t)throw new Error("Monarch: expecting a language definition object");const i={languageId:e,includeLF:El(t.includeLF,!1),noThrow:!1,maxStack:100,start:"string"===typeof t.start?t.start:null,ignoreCase:El(t.ignoreCase,!1),unicode:El(t.unicode,!1),tokenPostfix:Ll(t.tokenPostfix,"."+e),defaultToken:Ll(t.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!==typeof r)throw Fr(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw Fr(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new Ol(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"===typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!==typeof a[1])throw Fr(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Fr(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"===typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=El(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}s.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!==typeof t.tokenizer)throw Fr(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const r in t.tokenizer)if(t.tokenizer.hasOwnProperty(r)){i.start||(i.start=r);const e=t.tokenizer[r];i.tokenizer[r]=new Array,o("tokenizer."+r,i.tokenizer[r],e)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Fr(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const r of t.brackets){let e=r;if(e&&Array.isArray(e)&&3===e.length&&(e={token:e[2],open:e[0],close:e[1]}),e.open===e.close)throw Fr(i,"open and close brackets in a 'brackets' attribute must be different: "+e.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!==typeof e.open||"string"!==typeof e.token||"string"!==typeof e.close)throw Fr(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:e.token+i.tokenPostfix,open:Or(i,e.open),close:Or(i,e.close)})}return i.brackets=s,i.noThrow=!0,i}function Ml(e){Cr.W6.registerLanguage(e)}function Fl(){let e=[];return e=e.concat(Cr.W6.getLanguages()),e}function Bl(e){const t=fr.get(Ki.L);return t.languageIdCodec.encodeLanguageId(e)}function Wl(e,t){return fr.withServices((()=>{const i=fr.get(Ki.L),n=i.onDidRequestRichLanguageFeatures((i=>{i===e&&(n.dispose(),t())}));return n}))}function Hl(e,t){return fr.withServices((()=>{const i=fr.get(Ki.L),n=i.onDidRequestBasicLanguageFeatures((i=>{i===e&&(n.dispose(),t())}));return n}))}function Vl(e,t){const i=fr.get(Ki.L);if(!i.isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);const n=fr.get(A.JZ);return n.register(e,t,100)}class jl{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"===typeof this._actual.tokenize)return zl.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new wr.rY(n.tokens,n.endState)}}class zl{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let o=0,s=e.length;o0&&o[s-1]===a)continue;let c=e.startIndex;0===l?c=0:c{const i=await Promise.resolve(t.create());return i?Ul(i)?Gl(e,i):new Jr(fr.get(Ki.L),fr.get(jo.L),e,Pl(e,i),fr.get(He.pG)):null}));return wr.dG.registerFactory(e,i)}function Yl(e,t){const i=fr.get(Ki.L);if(!i.isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return ql(t)?Ql(e,{create:()=>t}):wr.dG.register(e,Gl(e,t))}function Zl(e,t){const i=t=>new Jr(fr.get(Ki.L),fr.get(jo.L),e,Pl(e,t),fr.get(He.pG));return ql(t)?Ql(e,{create:()=>t}):wr.dG.register(e,i(t))}function Xl(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.referenceProvider.register(e,t)}function Jl(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.renameProvider.register(e,t)}function ec(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.newSymbolNamesProvider.register(e,t)}function tc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.signatureHelpProvider.register(e,t)}function ic(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.hoverProvider.register(e,{provideHover:async(e,i,n,o)=>{const s=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n,o)).then((e=>{if(e)return!e.range&&s&&(e.range=new N.Q(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)),e.range||(e.range=new N.Q(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})}function nc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentSymbolProvider.register(e,t)}function oc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentHighlightProvider.register(e,t)}function sc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.linkedEditingRangeProvider.register(e,t)}function rc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.definitionProvider.register(e,t)}function ac(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.implementationProvider.register(e,t)}function lc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.typeDefinitionProvider.register(e,t)}function cc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.codeLensProvider.register(e,t)}function dc(e,t,i){const n=fr.get(W.ILanguageFeaturesService);return n.codeActionProvider.register(e,{providedCodeActionKinds:i?.providedCodeActionKinds,documentation:i?.documentation,provideCodeActions:(e,i,n,o)=>{const s=fr.get(Ls.DR),r=s.read({resource:e.uri}).filter((e=>N.Q.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:r,only:n.only,trigger:n.trigger},o)},resolveCodeAction:t.resolveCodeAction})}function uc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentFormattingEditProvider.register(e,t)}function hc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentRangeFormattingEditProvider.register(e,t)}function gc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.onTypeFormattingEditProvider.register(e,t)}function pc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.linkProvider.register(e,t)}function fc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.completionProvider.register(e,t)}function mc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.colorProvider.register(e,t)}function _c(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.foldingRangeProvider.register(e,t)}function vc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.declarationProvider.register(e,t)}function bc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.selectionRangeProvider.register(e,t)}function yc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentSemanticTokensProvider.register(e,t)}function wc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentRangeSemanticTokensProvider.register(e,t)}function Cc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.inlineCompletionsProvider.register(e,t)}function Sc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.inlineEditProvider.register(e,t)}function kc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.inlayHintsProvider.register(e,t)}function xc(){return{register:Ml,getLanguages:Fl,onLanguage:Wl,onLanguageEncountered:Hl,getEncodedLanguageId:Bl,setLanguageConfiguration:Vl,setColorMap:Kl,registerTokensProviderFactory:Ql,setTokensProvider:Yl,setMonarchTokensProvider:Zl,registerReferenceProvider:Xl,registerRenameProvider:Jl,registerNewSymbolNameProvider:ec,registerCompletionItemProvider:fc,registerSignatureHelpProvider:tc,registerHoverProvider:ic,registerDocumentSymbolProvider:nc,registerDocumentHighlightProvider:oc,registerLinkedEditingRangeProvider:sc,registerDefinitionProvider:rc,registerImplementationProvider:ac,registerTypeDefinitionProvider:lc,registerCodeLensProvider:cc,registerCodeActionProvider:dc,registerDocumentFormattingEditProvider:uc,registerDocumentRangeFormattingEditProvider:hc,registerOnTypeFormattingEditProvider:gc,registerLinkProvider:pc,registerColorProvider:mc,registerFoldingRangeProvider:_c,registerDeclarationProvider:vc,registerSelectionRangeProvider:bc,registerDocumentSemanticTokensProvider:yc,registerDocumentRangeSemanticTokensProvider:wc,registerInlineCompletionsProvider:Cc,registerInlineEditProvider:Sc,registerInlayHintsProvider:kc,DocumentHighlightKind:xr.Kb,CompletionItemKind:xr.Io,CompletionItemTag:xr.QP,CompletionItemInsertTextRule:xr._E,SymbolKind:xr.v0,SymbolTag:xr.H_,IndentAction:xr.l,CompletionTriggerKind:xr.t7,SignatureHelpTriggerKind:xr.WA,InlayHintKind:xr.r4,InlineCompletionTriggerKind:xr.qw,InlineEditTriggerKind:xr.sm,CodeActionTriggerType:xr.ok,NewSymbolNameTag:xr.OV,NewSymbolNameTriggerKind:xr.YT,PartialAcceptTriggerKind:xr.Ah,HoverVerbosityAction:xr.M$,FoldingRangeKind:wr.lO,SelectedSuggestionInfo:wr.GE}}var Ec=i(88996);s.qB.wrappingIndent.defaultValue=0,s.qB.glyphMargin.defaultValue=!1,s.qB.autoIndent.defaultValue=3,s.qB.overviewRulerLanes.defaultValue=2,Ec.Pj.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const Lc=(0,r.createMonacoBaseAPI)();Lc.editor=Sl(),Lc.languages=xc();const Tc=Lc.CancellationTokenSource,Ic=Lc.Emitter,Rc=Lc.KeyCode,Dc=Lc.KeyMod,Nc=Lc.Position,Ac=Lc.Range,Oc=Lc.Selection,Pc=Lc.SelectionDirection,Mc=Lc.MarkerSeverity,Fc=Lc.MarkerTag,Bc=Lc.Uri,Wc=Lc.Token,Hc=Lc.editor,Vc=Lc.languages,jc=globalThis.MonacoEnvironment;(jc?.globalAPI||"function"===typeof define&&i.amdO)&&(globalThis.monaco=Lc),"undefined"!==typeof globalThis.require&&"function"===typeof globalThis.require.config&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});i(63259),i(49556);self["MonacoEnvironment"]=function(e){function t(e){return e.replace(/\/$/,"")}return{globalAPI:!1,getWorkerUrl:function(n,o){var s=i.p,r=(s?t(s)+"/":"")+e[o];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var a=String(window.location),l=a.substr(0,a.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,l.length)!==l){/^(\/\/)/.test(r)&&(r=window.location.protocol+r);var c="/*"+o+'*/importScripts("'+r+'");',d=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(d)}}return r}}}({editorWorkerService:"editor.worker.js",json:"json.worker.js"});const zc=n},87380:(e,t,i)=>{"use strict";i.d(t,{EN:()=>n.editor});i(90141),i(92919),i(32378),i(80786),i(50877),i(14291),i(65340),i(10113),i(34588),i(29886),i(24655),i(26271),i(10111),i(15943),i(40147),i(32865),i(6132),i(23631),i(50416),i(8454),i(28369),i(23358),i(50239),i(15342),i(13977),i(86853),i(3815),i(39405),i(92048),i(87715),i(29754),i(54289),i(41699),i(97798),i(26642),i(12842),i(31903),i(54357),i(25135),i(70732),i(41439),i(35245),i(72239),i(27471),i(47414),i(26044),i(70151),i(98232),i(2845),i(92910),i(31252),i(90709),i(56673),i(48758),i(90445),i(52335),i(82397),i(71406),i(79266),i(21095),i(47883),i(29587),i(47641),i(92461),i(11501),i(95168),i(23479),i(18469);var n=i(26732),o=i(34417); +function n(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return e=>e in t}i.d(t,{$3:()=>g,$H:()=>F,BH:()=>$,BX:()=>ne,Bm:()=>w,C4:()=>Z,CE:()=>f,CP:()=>c,DY:()=>B,Gv:()=>C,J$:()=>ee,Kg:()=>y,MZ:()=>o,Mp:()=>l,NO:()=>a,Oj:()=>s,PT:()=>N,Qd:()=>L,Ro:()=>V,SU:()=>I,TF:()=>u,Tg:()=>O,Tn:()=>b,Tr:()=>q,We:()=>z,X$:()=>d,Y2:()=>te,ZH:()=>P,Zf:()=>E,_B:()=>X,bB:()=>H,cy:()=>p,gd:()=>v,pD:()=>n,rU:()=>M,tE:()=>r,u3:()=>oe,vM:()=>m,v_:()=>re,yI:()=>T,yL:()=>S,yQ:()=>W});const o={},s=[],r=()=>{},a=()=>!1,l=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith("onUpdate:"),d=Object.assign,u=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},h=Object.prototype.hasOwnProperty,g=(e,t)=>h.call(e,t),p=Array.isArray,f=e=>"[object Map]"===x(e),m=e=>"[object Set]"===x(e),_=e=>"[object Date]"===x(e),v=e=>"[object RegExp]"===x(e),b=e=>"function"===typeof e,y=e=>"string"===typeof e,w=e=>"symbol"===typeof e,C=e=>null!==e&&"object"===typeof e,S=e=>(C(e)||b(e))&&b(e.then)&&b(e.catch),k=Object.prototype.toString,x=e=>k.call(e),E=e=>x(e).slice(8,-1),L=e=>"[object Object]"===x(e),T=e=>y(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,I=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),D=e=>{const t=Object.create(null);return i=>{const n=t[i];return n||(t[i]=e(i))}},R=/-(\w)/g,N=D((e=>e.replace(R,((e,t)=>t?t.toUpperCase():"")))),A=/\B([A-Z])/g,O=D((e=>e.replace(A,"-$1").toLowerCase())),P=D((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=D((e=>{const t=e?`on${P(e)}`:"";return t})),F=(e,t)=>!Object.is(e,t),B=(e,...t)=>{for(let i=0;i{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:i})},H=e=>{const t=parseFloat(e);return isNaN(t)?e:t},V=e=>{const t=y(e)?Number(e):NaN;return isNaN(t)?e:t};let j;const z=()=>j||(j="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof i.g?i.g:{});const U="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",$=n(U);function q(e){if(p(e)){const t={};for(let i=0;i{if(e){const i=e.split(G);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}function Z(e){let t="";if(y(e))t=e;else if(p(e))for(let i=0;ine(e,t)))}const se=e=>!(!e||!0!==e["__v_isRef"]),re=e=>y(e)?e:null==e?"":p(e)||C(e)&&(e.toString===k||!b(e.toString))?se(e)?re(e.value):JSON.stringify(e,ae,2):String(e),ae=(e,t)=>se(t)?ae(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,i],n)=>(e[le(t,n)+" =>"]=i,e)),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>le(e)))}:w(t)?le(t):!C(t)||p(t)||L(t)?t:String(t),le=(e,t="")=>{var i;return w(e)?`Symbol(${null!=(i=e.description)?i:t})`:e}},1450:(e,t,i)=>{"use strict";var n=i(16820),o=i(44486),s=i(29328),r=i(55264),a=i(36350);function l(e,t,i,o){return new n(e,t,i,o)}l.version=i(20107),l.AlgoliaSearchHelper=n,l.SearchParameters=r,l.RecommendParameters=o,l.SearchResults=a,l.RecommendResults=s,e.exports=l},24609:(e,t,i)=>{"use strict";var n=i(83480),o=i(91937);function s(e,t,i){this.main=e,this.fn=t,this.recommendFn=i,this.lastResults=null,this.lastRecommendResults=null}o(s,n),s.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},s.prototype.getModifiedState=function(e){return this.fn(e)},s.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=s},44486:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var i=this.params.slice();return i.push(e),new t({params:i})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var i=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete i.$$id,i}))}},e.exports=t},29328:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var i=this;e.params.forEach((function(e){var n=e.$$id;i[n]=t[n],i._rawResults[n]=t[n]}))}t.prototype={constructor:t},e.exports=t},7179:(e,t,i)=>{"use strict";var n=i(20525),o=i(43284),s=i(39600),r={addRefinement:function(e,t,i){if(r.isRefined(e,t,i))return e;var o=""+i,s=e[t]?e[t].concat(o):[o],a={};return a[t]=s,n({},a,e)},removeRefinement:function(e,t,i){if(void 0===i)return r.clearRefinement(e,(function(e,i){return t===i}));var n=""+i;return r.clearRefinement(e,(function(e,i){return t===i&&n===e}))},toggleRefinement:function(e,t,i){if(void 0===i)throw new Error("toggleRefinement should be used with a value");return r.isRefined(e,t,i)?r.removeRefinement(e,t,i):r.addRefinement(e,t,i)},clearRefinement:function(e,t,i){if(void 0===t)return o(e)?{}:e;if("string"===typeof t)return s(e,[t]);if("function"===typeof t){var n=!1,r=Object.keys(e).reduce((function(o,s){var r=e[s]||[],a=r.filter((function(e){return!t(e,s,i)}));return a.length!==r.length&&(n=!0),o[s]=a,o}),{});return n?r:e}},isRefined:function(e,t,i){var n=Boolean(e[t])&&e[t].length>0;if(void 0===i||!n)return n;var o=""+i;return-1!==e[t].indexOf(o)}};e.exports=r},55264:(e,t,i)=>{"use strict";var n=i(20525),o=i(52718),s=i(3092),r=i(96853),a=i(43284),l=i(39600),c=i(52482),d=i(5555),u=i(7179);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,i){return h(t[i],e)})):e===t}function g(e,t){return o(e,(function(e){return h(e,t)}))}function p(e){var t=e?p._parseNumbers(e):{};void 0===t.userToken||d(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var i=this;Object.keys(t).forEach((function(e){var n=-1!==p.PARAMETERS.indexOf(e),o=void 0!==t[e];!n&&o&&(i[e]=t[e])}))}p.PARAMETERS=Object.keys(new p),p._parseNumbers=function(e){if(e instanceof p)return e;var t={},i=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(i.forEach((function(i){var n=e[i];if("string"===typeof n){var o=parseFloat(n);t[i]=isNaN(o)?n:o}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var n={};Object.keys(e.numericRefinements).forEach((function(t){var i=e.numericRefinements[t]||{};n[t]={},Object.keys(i).forEach((function(e){var o=i[e],s=o.map((function(e){return Array.isArray(e)?e.map((function(e){return"string"===typeof e?parseFloat(e):e})):"string"===typeof e?parseFloat(e):e}));n[t][e]=s}))})),t.numericRefinements=n}return r(e,t)},p.make=function(e){var t=new p(e),i=e.hierarchicalFacets||[];return i.forEach((function(e){if(e.rootPath){var i=t.getHierarchicalRefinement(e.name);i.length>0&&0!==i[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),i=t.getHierarchicalRefinement(e.name),0===i.length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},p.validate=function(e,t){var i=t||{};return e.tagFilters&&i.tagRefinements&&i.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&i.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&i.numericRefinements&&a(i.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):a(e.numericRefinements)&&i.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},p.prototype={constructor:p,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:u.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:u.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:u.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:u.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,i){var n=c(i);if(this.isNumericRefined(e,t,n))return this;var o=r({},this.numericRefinements);return o[e]=r({},o[e]),o[e][t]?(o[e][t]=o[e][t].slice(),o[e][t].push(n)):o[e][t]=[n],this.setQueryParameters({numericRefinements:o})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,i){var n=i;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(i,o){return o===e&&i.op===t&&h(i.val,c(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(i,n){return n===e&&i.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,i){return i===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return a(this.numericRefinements)?{}:this.numericRefinements;if("string"===typeof e)return l(this.numericRefinements,[e]);if("function"===typeof e){var t=!1,i=this.numericRefinements,n=Object.keys(i).reduce((function(n,o){var s=i[o],r={};return s=s||{},Object.keys(s).forEach((function(i){var n=s[i]||[],a=[];n.forEach((function(t){var n=e({val:t,op:i},o,"numeric");n||a.push(t)})),a.length!==n.length&&(t=!0),r[i]=a})),n[o]=r,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return u.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:u.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return u.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:u.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return u.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:u.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return u.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:u.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return u.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:u.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return u.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:u.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:u.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:u.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:u.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var i=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),o={},s=void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+i));return s?-1===t.indexOf(i)?o[e]=[]:o[e]=[t.slice(0,t.lastIndexOf(i))]:o[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},o,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var i={};return i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&u.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&u.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&u.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var i=this.getHierarchicalRefinement(e);return t?-1!==i.indexOf(t):i.length>0},isNumericRefined:function(e,t,i){if(void 0===i&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===i||!n)return n;var o=c(i),s=void 0!==g(this.numericRefinements[e][t],o);return n&&s},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},i=this;return Object.keys(this).forEach((function(n){var o=i[n];-1===e.indexOf(n)&&void 0!==o&&(t[n]=o)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var i={};return i[e]=t,this.setQueryParameters(i)},setQueryParameters:function(e){if(!e)return this;var t=p.validate(this,e);if(t)throw t;var i=this,n=p._parseNumbers(e),o=Object.keys(this).reduce((function(e,t){return e[t]=i[t],e}),{}),s=Object.keys(n).reduce((function(e,t){var i=void 0!==e[t],o=void 0!==n[t];return i&&!o?l(e,[t]):(o&&(e[t]=n[t]),e)}),o);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!==typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return o(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var i=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n=t.split(i);return n.map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=p},40746:(e,t,i)=>{"use strict";e.exports=c;var n=i(80634),o=i(52718),s=i(73566),r=i(3352),a=n.escapeFacetValue,l=n.unescapeFacetValue;function c(e){return function(t,i){var n=e.hierarchicalFacets[i],o=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",r=e._getHierarchicalFacetSeparator(n),a=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),c=s(e._getHierarchicalFacetSortBy(n)),u=t.every((function(e){return e.exhaustive})),h=d(c,r,a,l,o),g=t;return a&&(g=t.slice(a.split(r).length)),g.reduce(h,{name:e.hierarchicalFacets[i].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:u,data:null})}}function d(e,t,i,n,s){return function(a,c,d){var g=a;if(d>0){var p=0;g=a;while(p{"use strict";var n=i(74996),o=i(20525),s=i(80634),r=i(52718),a=i(74920),l=i(73566),c=i(96853),d=i(3352),u=s.escapeFacetValue,h=s.unescapeFacetValue,g=i(40746);function p(e){var t={};return e.forEach((function(e,i){t[e]=i})),t}function f(e,t,i){t&&t[i]&&(e.stats=t[i])}function m(e,t){return r(e,(function(e){var i=e.attributes||[];return i.indexOf(t)>-1}))}function _(e,t,i){var s=t[0]||{};this._rawResults=t;var r=this;Object.keys(s).forEach((function(e){r[e]=s[e]}));var l=c({persistHierarchicalRootCount:!1},i);Object.keys(l).forEach((function(e){r[e]=l[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var d=e.getRefinedDisjunctiveFacets(),u=p(e.facets),_=p(e.disjunctiveFacets),v=1,b=s.facets||{};Object.keys(b).forEach((function(t){var i=b[t],n=m(e.hierarchicalFacets,t);if(n){var o=n.attributes.indexOf(t),l=a(e.hierarchicalFacets,(function(e){return e.name===n.name}));r.hierarchicalFacets[l][o]={attribute:t,data:i,exhaustive:s.exhaustiveFacetsCount}}else{var c,d=-1!==e.disjunctiveFacets.indexOf(t),h=-1!==e.facets.indexOf(t);d&&(c=_[t],r.disjunctiveFacets[c]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},f(r.disjunctiveFacets[c],s.facets_stats,t)),h&&(c=u[t],r.facets[c]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},f(r.facets[c],s.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),d.forEach((function(i){var n=t[v],l=n&&n.facets?n.facets:{},d=e.getHierarchicalFacetByName(i);Object.keys(l).forEach((function(t){var i,u=l[t];if(d){i=a(e.hierarchicalFacets,(function(e){return e.name===d.name}));var g=a(r.hierarchicalFacets[i],(function(e){return e.attribute===t}));if(-1===g)return;r.hierarchicalFacets[i][g].data=c({},r.hierarchicalFacets[i][g].data,u)}else{i=_[t];var p=s.facets&&s.facets[t]||{};r.disjunctiveFacets[i]={name:t,data:o({},u,p),exhaustive:n.exhaustiveFacetsCount},f(r.disjunctiveFacets[i],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!r.disjunctiveFacets[i].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(h(n))>-1&&(r.disjunctiveFacets[i].data[n]=0)}))}})),v++})),e.getRefinedHierarchicalFacets().forEach((function(i){var n=e.getHierarchicalFacetByName(i),s=e._getHierarchicalFacetSeparator(n),l=e.getHierarchicalRefinement(i);0===l.length||l[0].split(s).length<2||t.slice(v).forEach((function(t){var i=t&&t.facets?t.facets:{};Object.keys(i).forEach((function(t){var c=i[t],d=a(e.hierarchicalFacets,(function(e){return e.name===n.name})),u=a(r.hierarchicalFacets[d],(function(e){return e.attribute===t}));if(-1!==u){var h={};if(l.length>0&&!r.persistHierarchicalRootCount){var g=l[0].split(s)[0];h[g]=r.hierarchicalFacets[d][u].data[g]}r.hierarchicalFacets[d][u].data=o(h,c,r.hierarchicalFacets[d][u].data)}})),v++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var i=e.facetsExcludes[t],n=u[t];r.facets[n]={name:t,data:b[t],exhaustive:s.exhaustiveFacetsCount},i.forEach((function(e){r.facets[n]=r.facets[n]||{name:t},r.facets[n].data=r.facets[n].data||{},r.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(g(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function i(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=r(e.facets,i);return n?Object.keys(n.data).map((function(i){var o=u(i);return{name:i,escapedValue:o,count:n.data[i],isRefined:e._state.isFacetRefined(t,o),isExcluded:e._state.isExcludeRefined(t,i)}})):[]}if(e._state.isDisjunctiveFacet(t)){var o=r(e.disjunctiveFacets,i);return o?Object.keys(o.data).map((function(i){var n=u(i);return{name:i,escapedValue:n,count:o.data[i],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=r(e.hierarchicalFacets,i);if(!s)return s;var a=e._state.getHierarchicalFacetByName(t),l=e._state._getHierarchicalFacetSeparator(a),c=h(e._state.getHierarchicalRefinement(t)[0]||"");0===c.indexOf(a.rootPath)&&(c=c.replace(a.rootPath+l,""));var d=c.split(l);return d.unshift(t),b(s,d,0),s}}function b(e,t,i){e.isRefined=e.name===(t[i]&&t[i].trim()),e.data&&e.data.forEach((function(e){b(e,t,i+1)}))}function y(e,t,i,n){if(n=n||0,Array.isArray(t))return e(t,i[n]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return y(e,t,i,n+1)})),r=e(s,i[n]),a=o({data:r},t);return a}function w(e,t){return t.sort(e)}function C(e,t){var i=[],n=[],o=t.hide||[],s=t.order||[],r=s.reduce((function(e,t,i){return e[t]=i,e}),{});e.forEach((function(e){var t=e.path||e.name,s=o.indexOf(t)>-1;s||void 0===r[t]?s||n.push(e):i[r[t]]=e})),i=i.filter((function(e){return e}));var a,l=t.sortRemainingBy;return"hidden"===l?i:(a="alpha"===l?[["path","name"],["asc","asc"]]:[["count"],["desc"]],i.concat(d(n,a[0],a[1])))}function S(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}function k(e,t){var i=r(e,(function(e){return e.name===t}));return i&&i.stats}function x(e,t,i,n,o){var s=r(o,(function(e){return e.name===i})),a=s&&s.data&&s.data[n]?s.data[n]:0,l=s&&s.exhaustive||!1;return{type:t,attributeName:i,name:n,count:a,exhaustive:l}}function E(e,t,i,n){var o=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(o),a=i.split(s),l=r(n,(function(e){return e.name===t})),c=a.reduce((function(e,t){var i=e&&r(e.data,(function(e){return e.name===t}));return void 0!==i?i:e}),l),d=c&&c.count||0,u=c&&c.exhaustive||!1,h=c&&c.path||"";return{type:"hierarchical",attributeName:t,name:h,count:d,exhaustive:u}}_.prototype.getFacetByName=function(e){function t(t){return t.name===e}return r(this.facets,t)||r(this.disjunctiveFacets,t)||r(this.hierarchicalFacets,t)},_.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],_.prototype.getFacetValues=function(e,t){var i=v(this,e);if(i){var n,s=o({},t,{sortBy:_.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),r=this;if(Array.isArray(i))n=[e];else{var a=r._state.getHierarchicalFacetByName(i.name);n=a.attributes}return y((function(e,t){if(s.facetOrdering){var i=S(r,t);if(i)return C(e,i)}if(Array.isArray(s.sortBy)){var n=l(s.sortBy,_.DEFAULT_SORT);return d(e,n[0],n[1])}if("function"===typeof s.sortBy)return w(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),i,n)}},_.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?k(this.facets,e):this._state.isDisjunctiveFacet(e)?k(this.disjunctiveFacets,e):void 0},_.prototype.getRefinements=function(){var e=this._state,t=this,i=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(o){i.push(x(e,"facet",n,o,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(o){i.push(x(e,"exclude",n,o,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(o){i.push(x(e,"disjunctive",n,o,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(o){i.push(E(e,n,o,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){i.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){i.push({type:"tag",attributeName:"_tags",name:e})})),i},e.exports=_},16820:(e,t,i)=>{"use strict";var n=i(83480),o=i(24609),s=i(80634).escapeFacetValue,r=i(91937),a=i(96853),l=i(43284),c=i(39600),d=i(44486),u=i(29328),h=i(78747),g=i(55264),p=i(36350),f=i(54652),m=i(20107);function _(e,t,i,n){"function"===typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.setClient(e);var o=i||{};o.index=t,this.state=g.make(o),this.recommendState=new d({params:o.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function v(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function b(){return this.state.page}r(_,n),_.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},_.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},_.prototype.recommend=function(){return this._recommend(),this},_.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},_.prototype.searchOnce=function(e,t){var i=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(i.index,i),o=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:i}),!t)return this.client.search(n).then((function(e){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),{content:new p(i,e.results),state:i,_originalResponse:e}}),(function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),t(null,new p(i,e.results),i)})).catch((function(e){o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),t(e,null,i)}))},_.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,i=this.derivedHelpers[0];if(!i)return Promise.resolve([]);var n=i.getModifiedState(t),o=a({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:c(h._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!==typeof this.client.initIndex)throw new Error(s);var r=this.client.initIndex(n.index);if("function"!==typeof r.findAnswers)throw new Error(s);return r.findAnswers(n.query,e.queryLanguages,o)},_.prototype.searchForFacetValues=function(e,t,i,n){var o="function"===typeof this.client.searchForFacetValues&&"function"!==typeof this.client.searchForFacets,r="function"===typeof this.client.initIndex;if(!o&&!r&&"function"!==typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var a=this.state.setQueryParameters(n||{}),l=a.isDisjunctiveFacet(e),c=h.getSearchForFacetQuery(e,t,i,a);this._currentNbQueries++;var d,u=this;return o?d=this.client.searchForFacetValues([{indexName:a.index,params:c}]):r?d=this.client.initIndex(a.index).searchForFacetValues(c):(delete c.facetName,d=this.client.search([{type:"facet",facet:e,indexName:a.index,params:c}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:a,facet:e,query:t}),d.then((function(t){return u._currentNbQueries--,0===u._currentNbQueries&&u.emit("searchQueueEmpty"),t=Array.isArray(t)?t[0]:t,t.facetHits.forEach((function(t){t.escapedValue=s(t.value),t.isRefined=l?a.isDisjunctiveFacetRefined(e,t.escapedValue):a.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw u._currentNbQueries--,0===u._currentNbQueries&&u.emit("searchQueueEmpty"),e}))},_.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},_.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},_.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},_.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},_.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.addNumericRefinement=function(e,t,i){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,i),isPageReset:!0}),this},_.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},_.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},_.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},_.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},_.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},_.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},_.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},_.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},_.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},_.prototype.removeNumericRefinement=function(e,t,i){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,i),isPageReset:!0}),this},_.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},_.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},_.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},_.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},_.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},_.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},_.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},_.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},_.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},_.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},_.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},_.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},_.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},_.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},_.prototype.setCurrentPage=v,_.prototype.setPage=v,_.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},_.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},_.prototype.setState=function(e){return this._change({state:g.make(e),isPageReset:!1}),this},_.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new g(e),this},_.prototype.hasRefinements=function(e){return!!l(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},_.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},_.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},_.prototype.hasTag=function(e){return this.state.isTagRefined(e)},_.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},_.prototype.getIndex=function(){return this.state.index},_.prototype.getCurrentPage=b,_.prototype.getPage=b,_.prototype.getTags=function(){return this.state.tagRefinements},_.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e)){var i=this.state.getConjunctiveRefinements(e);i.forEach((function(e){t.push({value:e,type:"conjunctive"})}));var n=this.state.getExcludeRefinements(e);n.forEach((function(e){t.push({value:e,type:"exclude"})}))}else if(this.state.isDisjunctiveFacet(e)){var o=this.state.getDisjunctiveRefinements(e);o.forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var s=this.state.getNumericRefinements(e);return Object.keys(s).forEach((function(e){var i=s[e];t.push({value:i,operator:e,type:"numeric"})})),t},_.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},_.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},_.prototype._search=function(e){var t=this.state,i=[],n=[];e.onlyWithDerivedHelpers||(n=h._getQueries(t.index,t),i.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var o=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),o=n.index?h._getQueries(n.index,n):[];return i.push({state:n,queriesCount:o.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),o})),s=Array.prototype.concat.apply(n,o),r=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,i,r));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,i,r)).catch(this._dispatchAlgoliaError.bind(this,r))}catch(e){this.emit("error",{error:e})}},_.prototype._recommend=function(){var e=this.state,t=this.recommendState,i=this.getIndex(),n=[{state:t,index:i,helper:this}],o=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var s=this._recommendCache,r=this.derivedHelpers.map((function(t){var i=t.getModifiedState(e).index;if(!i)return[];var r=t.getModifiedRecommendState(new d);return n.push({state:r,index:i,helper:t}),o=Array.prototype.concat.apply(o,r.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:r,results:t.lastRecommendResults}}),r._buildQueries(i,s)})),a=Array.prototype.concat.apply(this.recommendState._buildQueries(i,s),r);if(0!==a.length)if(a.length>0&&"undefined"===typeof this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var l=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(a).then(this._dispatchRecommendResponse.bind(this,l,n,o)).catch(this._dispatchRecommendError.bind(this,l))}catch(e){this.emit("error",{error:e})}}},_.prototype._dispatchAlgoliaResponse=function(e,t,i){var n=this;if(!(t0},_.prototype._change=function(e){var t=e.state,i=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:i}))},_.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},_.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},_.prototype.setClient=function(e){return this.client===e||("function"===typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.client=e),this},_.prototype.getClient=function(){return this.client},_.prototype.derive=function(e,t){var i=new o(this,e,t);return this.derivedHelpers.push(i),i},_.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},_.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=_},74996:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},20525:e=>{"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(i){void 0!==t[i]&&(void 0!==e[i]&&delete e[i],e[i]=t[i])})),e}),{})}},80634:e=>{"use strict";function t(e){return"string"!==typeof e?e:String(e).replace(/^-/,"\\-")}function i(e){return"string"!==typeof e?e:e.replace(/^\\-/,"-")}e.exports={escapeFacetValue:t,unescapeFacetValue:i}},52718:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var i=0;i{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var i=0;i{e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},73566:(e,t,i)=>{"use strict";var n=i(52718);e.exports=function(e,t){var i=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var o=t.split(":"),s=n(i,(function(e){return e[0]===o[0]}));return o.length>1||!s?(e[0].push(o[0]),e[1].push(o[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},91937:e=>{"use strict";function t(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}e.exports=t},3092:e=>{"use strict";function t(e,t){return e.filter((function(i,n){return t.indexOf(i)>-1&&e.indexOf(i)===n}))}e.exports=t},96853:e=>{"use strict";function t(e){return"object"===typeof e&&null!==e?n(Array.isArray(e)?[]:{},e):e}function i(e){return"function"===typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function n(e,o){if(e===o)return e;for(var s in o)if(Object.prototype.hasOwnProperty.call(o,s)&&"__proto__"!==s&&"constructor"!==s){var r=o[s],a=e[s];"undefined"!==typeof a&&"undefined"===typeof r||(i(a)&&i(r)?e[s]=n(a,r):e[s]=t(r))}return e}function o(e){i(e)||(e={});for(var t=1,o=arguments.length;t{"use strict";function t(e){return e&&Object.keys(e).length>0}e.exports=t},39600:e=>{"use strict";function t(e,t){if(null===e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}e.exports=t},3352:e=>{"use strict";function t(e,t){if(e!==t){var i=void 0!==e,n=null===e,o=void 0!==t,s=null===t;if(!s&&e>t||n&&o||!i)return 1;if(!n&&e=n.length?s:"desc"===n[o]?-s:s}return e.index-i.index})),o.map((function(e){return e.value}))}e.exports=i},52482:e=>{"use strict";function t(e){if("number"===typeof e)return e;if("string"===typeof e)return parseFloat(e);if(Array.isArray(e))return e.map(t);throw new Error("The value should be a number, a parsable string or an array of those.")}e.exports=t},78747:(e,t,i)=>{"use strict";var n=i(96853);function o(e){return Object.keys(e).sort().reduce((function(t,i){return t[i]=e[i],t}),{})}var s={_getQueries:function(e,t){var i=[];return i.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){i.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var o=t.getHierarchicalFacetByName(n),r=t.getHierarchicalRefinement(n),a=t._getHierarchicalFacetSeparator(o);if(r.length>0&&r[0].split(a).length>1){var l=r[0].split(a).slice(0,-1).reduce((function(e,t,i){return e.concat({attribute:o.attributes[i],value:0===i?t:[e[e.length-1].value,t].join(a)})}),[]);l.forEach((function(n,r){var a=s._getDisjunctiveFacetSearchParams(t,n.attribute,0===r);function c(e){return o.attributes.some((function(t){return t===e.split(":")[0]}))}var d=(a.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var i=t.filter((function(e){return!c(e)}));i.length>0&&e.push(i)}return"string"!==typeof t||c(t)||e.push(t),e}),[]),u=l[r-1];r>0?a.facetFilters=d.concat(u.attribute+":"+u.value):d.length>0?a.facetFilters=d:delete a.facetFilters,i.push({indexName:e,params:a})}))}})),i},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),i=s._getFacetFilters(e),r=s._getNumericFilters(e),a=s._getTagFilters(e),l={};return t.length>0&&(l.facets=t.indexOf("*")>-1?["*"]:t),a.length>0&&(l.tagFilters=a),i.length>0&&(l.facetFilters=i),r.length>0&&(l.numericFilters=r),o(n({},e.getQueryParams(),l))},_getDisjunctiveFacetSearchParams:function(e,t,i){var r=s._getFacetFilters(e,t,i),a=s._getNumericFilters(e,t),l=s._getTagFilters(e),c={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};l.length>0&&(c.tagFilters=l);var d=e.getHierarchicalFacetByName(t);return c.facets=d?s._getDisjunctiveHierarchicalFacetAttribute(e,d,i):t,a.length>0&&(c.numericFilters=a),r.length>0&&(c.facetFilters=r),o(n({},e.getQueryParams(),c))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var i=[];return Object.keys(e.numericRefinements).forEach((function(n){var o=e.numericRefinements[n]||{};Object.keys(o).forEach((function(e){var s=o[e]||[];t!==n&&s.forEach((function(t){if(Array.isArray(t)){var o=t.map((function(t){return n+e+t}));i.push(o)}else i.push(n+e+t)}))}))})),i},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,i){var n=[],o=e.facetsRefinements||{};Object.keys(o).sort().forEach((function(e){var t=o[e]||[];t.slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).sort().forEach((function(e){var t=s[e]||[];t.sort().forEach((function(t){n.push(e+":-"+t)}))}));var r=e.disjunctiveFacetsRefinements||{};Object.keys(r).sort().forEach((function(e){var i=r[e]||[];if(e!==t&&i&&0!==i.length){var o=[];i.slice().sort().forEach((function(t){o.push(e+":"+t)})),n.push(o)}}));var a=e.hierarchicalFacetsRefinements||{};return Object.keys(a).sort().forEach((function(o){var s=a[o]||[],r=s[0];if(void 0!==r){var l,c,d=e.getHierarchicalFacetByName(o),u=e._getHierarchicalFacetSeparator(d),h=e._getHierarchicalRootPath(d);if(t===o){if(-1===r.indexOf(u)||!h&&!0===i||h&&h.split(u).length===r.split(u).length)return;h?(c=h.split(u).length-1,r=h):(c=r.split(u).length-2,r=r.slice(0,r.lastIndexOf(u))),l=d.attributes[c]}else c=r.split(u).length-1,l=d.attributes[c];l&&n.push([l+":"+r])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return e.hierarchicalFacets.reduce((function(t,i){var n=e.getHierarchicalRefinement(i.name)[0];if(!n)return t.push(i.attributes[0]),t;var o=e._getHierarchicalFacetSeparator(i),s=n.split(o).length,r=i.attributes.slice(0,s+1);return t.concat(r)}),t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,i){var n=e._getHierarchicalFacetSeparator(t);if(!0===i){var o=e._getHierarchicalRootPath(t),s=0;return o&&(s=o.split(n).length),[t.attributes[s]]}var r=e.getHierarchicalRefinement(t.name)[0]||"",a=r.split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,i,r){var a=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,l={facetQuery:t,facetName:e};return"number"===typeof i&&(l.maxFacetHits=i),o(n({},s._getHitsSearchParams(a),l))}};e.exports=s},5555:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},54652:(e,t,i)=>{"use strict";var n=i(52718),o=i(62862);function s(e,t){var i=[];return Object.keys(e).forEach((function(n){e[n].count<2&&(e[n].indexSum+=100),i.push({objectID:n,avgOfIndices:e[n].indexSum/t})})),i.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}function r(e){var t={};e.forEach((function(e){e.forEach((function(e,i){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+i,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:i,count:1}}))}));var i=s(t,e.length),r=i.reduce((function(t,i){var s=n(o(e),(function(e){return e.objectID===i.objectID}));return s?t.concat(s):t}),[]);return r}e.exports=r},20107:e=>{"use strict";e.exports="3.22.5"},7958:function(e,t,i){var n,o,s;(function(i,r){o=[],n=r,s="function"===typeof n?n.apply(t,o):n,void 0===s||(e.exports=s)})(0,(function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function n(e,t,i){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){l(n.response,t,i)},n.onerror=function(){console.error("could not download file")},n.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof i.g&&i.g.global===i.g?i.g:void 0,a=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,i){var a=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?s(l):o(l.href)?n(e,t,i):s(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){s(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,i,r){if(i=i||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,r),i);else if(o(e))n(e,i,r);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){s(a)}))}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,i);var s="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&l||a)&&"undefined"!=typeof FileReader){var d=new FileReader;d.onloadend=function(){var e=d.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},d.readAsDataURL(e)}else{var u=r.URL||r.webkitURL,h=u.createObjectURL(e);o?o.location=h:location.href=h,o=null,setTimeout((function(){u.revokeObjectURL(h)}),4e4)}});r.saveAs=l.saveAs=l,e.exports=l}))},55098:e=>{"use strict";var t=String.prototype.replace,i=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports={default:n.RFC3986,formatters:{RFC1738:function(e){return t.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986}},96734:(e,t,i)=>{"use strict";var n=i(7299),o=i(90029),s=i(55098);e.exports={formats:s,parse:o,stringify:n}},90029:(e,t,i)=>{"use strict";var n=i(64207),o=Object.prototype.hasOwnProperty,s=Array.isArray,r={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c="utf8=%26%2310003%3B",d="utf8=%E2%9C%93",u=function(e,t){var i,u={},h=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,g=t.parameterLimit===1/0?void 0:t.parameterLimit,p=h.split(t.delimiter,g),f=-1,m=t.charset;if(t.charsetSentinel)for(i=0;i-1&&(v=s(v)?[v]:v),o.call(u,_)?u[_]=n.combine(u[_],v):u[_]=v}return u},h=function(e,t,i,n){for(var o=n?t:l(t,i),s=e.length-1;s>=0;--s){var r,a=e[s];if("[]"===a&&i.parseArrays)r=[].concat(o);else{r=i.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,d=parseInt(c,10);i.parseArrays||""!==c?!isNaN(d)&&a!==c&&String(d)===c&&d>=0&&i.parseArrays&&d<=i.arrayLimit?(r=[],r[d]=o):"__proto__"!==c&&(r[c]=o):r={0:o}}o=r}return o},g=function(e,t,i,n){if(e){var s=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,r=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=i.depth>0&&r.exec(s),c=l?s.slice(0,l.index):s,d=[];if(c){if(!i.plainObjects&&o.call(Object.prototype,c)&&!i.allowPrototypes)return;d.push(c)}var u=0;while(i.depth>0&&null!==(l=a.exec(s))&&u{"use strict";var n=i(64207),o=i(55098),s=Object.prototype.hasOwnProperty,r={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Array.isArray,l=String.prototype.split,c=Array.prototype.push,d=function(e,t){c.apply(e,a(t)?t:[t])},u=Date.prototype.toISOString,h=o["default"],g={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return"string"===typeof e||"number"===typeof e||"boolean"===typeof e||"symbol"===typeof e||"bigint"===typeof e},f=function e(t,i,o,s,r,c,u,h,f,m,_,v,b,y){var w=t;if("function"===typeof u?w=u(i,w):w instanceof Date?w=m(w):"comma"===o&&a(w)&&(w=n.maybeMap(w,(function(e){return e instanceof Date?m(e):e}))),null===w){if(s)return c&&!b?c(i,g.encoder,y,"key",_):i;w=""}if(p(w)||n.isBuffer(w)){if(c){var C=b?i:c(i,g.encoder,y,"key",_);if("comma"===o&&b){for(var S=l.call(String(w),","),k="",x=0;x0?w.join(",")||null:void 0}];else if(a(u))E=u;else{var T=Object.keys(w);E=h?T.sort(h):T}for(var I=0;I0?_+p:""}},64207:(e,t,i)=>{"use strict";var n=i(55098),o=Object.prototype.hasOwnProperty,s=Array.isArray,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e){while(e.length>1){var t=e.pop(),i=t.obj[t.prop];if(s(i)){for(var n=[],o=0;o=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||s===n.RFC1738&&(40===d||41===d)?l+=a.charAt(c):d<128?l+=r[d]:d<2048?l+=r[192|d>>6]+r[128|63&d]:d<55296||d>=57344?l+=r[224|d>>12]+r[128|d>>6&63]+r[128|63&d]:(c+=1,d=65536+((1023&d)<<10|1023&a.charCodeAt(c)),l+=r[240|d>>18]+r[128|d>>12&63]+r[128|d>>6&63]+r[128|63&d])}return l},g=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"===typeof e?h+=":"+e:"symbol"===typeof e&&(h=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=i||u,d.getLevel=function(){return null!=l?l:null!=a?a:r},d.setLevel=function(e,t){return l=m(e),!1!==t&&g(l),c.call(d)},d.setDefaultLevel=function(e){a=m(e),p()||d.setLevel(e,!1)},d.resetLevel=function(){l=null,f(),c.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(s!==d&&(r=m(s.getLevel())),c.call(d),s===d)for(var e in o)o[e].rebuild()},r=m(s?s.getLevel():"WARN");var _=p();null!=_&&(l=m(_)),c.call(d)}s=new h,s.getLogger=function(e){if("symbol"!==typeof e&&"string"!==typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new h(e,s.methodFactory)),t};var g=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=g),s},s.getLoggers=function(){return o},s["default"]=s,s}))},26732:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CancellationTokenSource:()=>Tc,Emitter:()=>Ic,KeyCode:()=>Dc,KeyMod:()=>Rc,MarkerSeverity:()=>Mc,MarkerTag:()=>Fc,Position:()=>Nc,Range:()=>Ac,Selection:()=>Oc,SelectionDirection:()=>Pc,Token:()=>Wc,Uri:()=>Bc,default:()=>zc,editor:()=>Hc,languages:()=>Vc});var n={};i.r(n),i.d(n,{CancellationTokenSource:()=>Tc,Emitter:()=>Ic,KeyCode:()=>Dc,KeyMod:()=>Rc,MarkerSeverity:()=>Mc,MarkerTag:()=>Fc,Position:()=>Nc,Range:()=>Ac,Selection:()=>Oc,SelectionDirection:()=>Pc,Token:()=>Wc,Uri:()=>Bc,editor:()=>Hc,languages:()=>Vc});i(90141),i(92919),i(32378),i(80786),i(50877),i(14291),i(65340);var o=i(10113),s=(i(34588),i(29886),i(24655),i(26271),i(10111),i(15943),i(40147),i(32865),i(6132),i(23631),i(50416),i(8454),i(28369),i(23358),i(50239),i(15342),i(13977),i(86853),i(3815),i(39405),i(92048),i(87715),i(29754),i(54289),i(41699),i(97798),i(26642),i(12842),i(31903),i(54357),i(25135),i(70732),i(41439),i(35245),i(72239),i(27471),i(47414),i(26044),i(70151),i(98232),i(2845),i(92910),i(31252),i(90709),i(56673),i(48758),i(90445),i(52335),i(82397),i(71406),i(79266),i(21095),i(47883),i(29587),i(47641),i(92461),i(11501),i(95168),i(23479),i(18469),i(35011)),r=i(79184),a=i(62484),l=i(5091),c=i(20601),d=i(29133),u=i(74753),h=i(16259),g=i(94728),p=i(85603),f=i(9659),m=i(1352),_=i(21776),v=i(14396),b=i(6657),y=i(85053),w=i(41337);const C=!0;let S;function k(e,t){const i=globalThis.MonacoEnvironment;if(i){if("function"===typeof i.getWorker)return i.getWorker("workerMain.js",t);if("function"===typeof i.getWorkerUrl){const e=i.getWorkerUrl("workerMain.js",t);return new Worker(S?S.createScriptURL(e):e,{name:t,type:C?"module":void 0})}}if(e){const i=x(t,e.toString(!0)),n=new Worker(S?S.createScriptURL(i):i,{name:t,type:C?"module":void 0});return C?E(n):n}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function x(e,t,i){const n=/^((http:)|(https:)|(file:)|(vscode-file:))/.test(t);if(n&&t.substring(0,globalThis.origin.length)!==globalThis.origin);else{const i=t.lastIndexOf("?"),n=t.lastIndexOf("#",i),o=i>0?new URLSearchParams(t.substring(i+1,~n?n:void 0)):new URLSearchParams;b.SJ.addSearchParam(o,!0,!0);const s=o.toString();t=s?`${t}?${o.toString()}#${e}`:`${t}#${e}`}C||n||(t=new URL(t,globalThis.origin).toString());const o=new Blob([(0,y.Yc)([`/*${e}*/`,i?`globalThis.MonacoEnvironment = { baseUrl: '${i}' };`:void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify((0,w.Ec)())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify((0,w.i8)())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",C?`await import(ttPolicy?.createScriptURL('${t}') ?? '${t}');`:`importScripts(ttPolicy?.createScriptURL('${t}') ?? '${t}');`,C?"globalThis.postMessage({ type: 'vscode-worker-ready' });":void 0,`/*${e}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(o)}function E(e){return new Promise(((t,i)=>{e.onmessage=function(i){"vscode-worker-ready"===i.data.type&&(e.onmessage=null,t(e))},e.onerror=i}))}function L(e){return"function"===typeof e.then}S="object"===typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name&&void 0!==globalThis.workerttPolicy?globalThis.workerttPolicy:(0,_.H)("defaultWorkerFactory",{createScriptURL:e=>e});class T extends l.jG{constructor(e,t,i,n,o,s){super(),this.id=i,this.label=n;const r=k(e,n);L(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(t,[]),this.worker.then((e=>{e.onmessage=function(e){o(e.data)},e.onmessageerror=s,"function"===typeof e.addEventListener&&e.addEventListener("error",s)})),this._register((0,l.s)((()=>{this.worker?.then((e=>{e.onmessage=null,e.onmessageerror=null,e.removeEventListener("error",s),e.terminate()})),this.worker=null})))}getId(){return this.id}postMessage(e,t){this.worker?.then((i=>{try{i.postMessage(e,t)}catch(e){(0,v.dz)(e),(0,v.dz)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:e}))}}))}}class I{constructor(e,t){this.amdModuleId=e,this.label=t,this.esmModuleLocation=C?b.zl.asBrowserUri(`${e}.esm.js`):void 0}}class D{static{this.LAST_WORKER_ID=0}constructor(){this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++D.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new T(e.esmModuleLocation,e.amdModuleId,n,e.label||"anonymous"+n,t,(e=>{(0,m.logOnceWebWorkerWarning)(e),this._webWorkerFailedBeforeError=e,i(e)}))}}function R(e,t){const i="string"===typeof e?new I(e,t):e;return new m.SimpleWorkerClient(new D,i)}var N=i(8690),A=i(50395),O=i(92341),P=i(69361),M=i(56151),F=i(12660),B=i(84240),W=i(12847),H=i(42198),V=i(93866),j=i(44544),z=i(2150),U=i(11955),$=i(32899),q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},K=function(e,t){return function(i,n){t(i,n,e)}};const G=3e5;function Q(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let Y=class extends l.jG{constructor(e,t,i,n,o,s){super(),this._languageConfigurationService=o,this._modelService=t,this._workerManager=this._register(new X(e,this._modelService)),this._logService=n,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:async(e,t)=>{if(!Q(this._modelService,e.uri))return Promise.resolve({links:[]});const i=await this._workerWithResources([e.uri]),n=await i.$computeLinks(e.uri.toString());return n&&{links:n}}})),this._register(s.completionProvider.register("*",new Z(this._workerManager,i,this._modelService,this._languageConfigurationService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Q(this._modelService,e)}async computedUnicodeHighlights(e,t,i){const n=await this._workerWithResources([e]);return n.$computeUnicodeHighlights(e.toString(),t,i)}async computeDiff(e,t,i,n){const o=await this._workerWithResources([e,t],!0),s=await o.$computeDiff(e.toString(),t.toString(),i,n);if(!s)return null;const r={identical:s.identical,quitEarly:s.quitEarly,changes:a(s.changes),moves:s.moves.map((e=>new H.t(new V.WL(new j.M(e[0],e[1]),new j.M(e[2],e[3])),a(e[4]))))};return r;function a(e){return e.map((e=>new V.wm(new j.M(e[0],e[1]),new j.M(e[2],e[3]),e[4]?.map((e=>new V.q6(new N.Q(e[0],e[1],e[2],e[3]),new N.Q(e[4],e[5],e[6],e[7])))))))}}async computeMoreMinimalEdits(e,t,i=!1){if((0,y.EI)(t)){if(!Q(this._modelService,e))return Promise.resolve(t);const n=B.W.create(),o=this._workerWithResources([e]).then((n=>n.$computeMoreMinimalEdits(e.toString(),t,i)));return o.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed()))),Promise.race([o,(0,f.wR)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Q(this._modelService,e)}async navigateValueSet(e,t,i){const n=this._modelService.getModel(e);if(!n)return null;const o=this._languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),s=o.source,r=o.flags,a=await this._workerWithResources([e]);return a.$navigateValueSet(e.toString(),t,i,s,r)}canComputeWordRanges(e){return Q(this._modelService,e)}async computeWordRanges(e,t){const i=this._modelService.getModel(e);if(!i)return Promise.resolve(null);const n=this._languageConfigurationService.getLanguageConfiguration(i.getLanguageId()).getWordDefinition(),o=n.source,s=n.flags,r=await this._workerWithResources([e]);return r.$computeWordRanges(e.toString(),t,o,s)}async findSectionHeaders(e,t){const i=await this._workerWithResources([e]);return i.$findSectionHeaders(e.toString(),t)}async computeDefaultDocumentColors(e){const t=await this._workerWithResources([e]);return t.$computeDefaultDocumentColors(e.toString())}async _workerWithResources(e,t=!1){const i=await this._workerManager.withWorker();return await i.workerWithSyncedResources(e,t)}};Y=q([K(1,P.IModelService),K(2,M.ITextResourceConfigurationService),K(3,F.rr),K(4,A.JZ),K(5,W.ILanguageFeaturesService)],Y);class Z{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}async provideCompletionItems(e,t){const i=this._configurationService.getValue(e.uri,t,"editor");if("off"===i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestions)Q(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())Q(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestions&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),r=s?new N.Q(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):N.Q.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=await this._workerManager.withWorker(),c=await l.textualSuggest(n,s?.word,o);return c?{duration:c.duration,suggestions:c.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}}let X=class extends l.jG{constructor(e,t){super(),this._workerDescriptor=e,this._modelService=t,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();const i=this._register(new z.Be);i.cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(G/2),a.G),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;const e=this._modelService.getModels();0===e.length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;const e=(new Date).getTime()-this._lastWorkerUsedTime;e>G&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new ee(this._workerDescriptor,!1,this._modelService)),Promise.resolve(this._editorWorkerClient)}};X=q([K(1,P.IModelService)],X);class J{constructor(e){this._instance=e,this.proxy=this._instance}dispose(){this._instance.dispose()}setChannel(e,t){throw new Error("Not supported")}}let ee=class extends l.jG{constructor(e,t,i){super(),this._workerDescriptor=e,this._disposed=!1,this._modelService=i,this._keepIdleModels=t,this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(R(this._workerDescriptor)),$.EditorWorkerHost.setChannel(this._worker,this._createEditorWorkerHost())}catch(e){(0,m.logOnceWebWorkerWarning)(e),this._worker=this._createFallbackLocalWorker()}return this._worker}async _getProxy(){try{const e=this._getOrCreateWorker().proxy;return await e.$ping(),e}catch(e){return(0,m.logOnceWebWorkerWarning)(e),this._worker=this._createFallbackLocalWorker(),this._worker.proxy}}_createFallbackLocalWorker(){return new J(new O.EditorSimpleWorker(this._createEditorWorkerHost(),null))}_createEditorWorkerHost(){return{$fhr:(e,t)=>this.fhr(e,t)}}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new U.WorkerTextModelSyncClient(e,this._modelService,this._keepIdleModels))),this._modelManager}async workerWithSyncedResources(e,t=!1){if(this._disposed)return Promise.reject((0,v.aD)());const i=await this._getProxy();return this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i}async textualSuggest(e,t,i){const n=await this.workerWithSyncedResources(e),o=i.source,s=i.flags;return n.$textualSuggest(e.map((e=>e.toString())),t,o,s)}dispose(){super.dispose(),this._disposed=!0}};ee=q([K(2,P.IModelService)],ee);var te=i(40231),ie=i(67806),ne=i(15911),oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},se=function(e,t){return function(i,n){t(i,n,e)}};let re=class extends l.jG{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new te.vl),this._onCodeEditorAdd=this._register(new te.vl),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new te.vl),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new te.vl),this._onDiffEditorAdd=this._register(new te.vl),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new te.vl),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new ie.w,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i)){const e=this._modelProperties.get(i);return e.get(t)}}async openCodeEditor(e,t,i){for(const n of this._codeEditorOpenHandlers){const o=await n(e,t,i);if(null!==o)return o}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return(0,l.s)(t)}};re=oe([se(0,ne.Gy)],re);var ae=i(18904),le=i(59857),ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},de=function(e,t){return function(i,n){t(i,n,e)}};let ue=class extends re{constructor(e,t){super(t),this._register(this.onCodeEditorAdd((()=>this._checkContextKey()))),this._register(this.onCodeEditorRemove((()=>this._checkContextKey()))),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler((async(e,t,i)=>t?this.doOpenEditor(t,e):null)))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){const i=this.findModel(e,t.resource);if(!i){if(t.resource){const i=t.resource.scheme;if(i===b.ny.http||i===b.ny.https)return(0,z.CE)(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if("number"===typeof n.endLineNumber&&"number"===typeof n.endColumn)e.setSelection(n),e.revealRangeInCenter(n,1);else{const t={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};ue=ce([de(0,ae.fN),de(1,ne.Gy)],ue),(0,le.v)(g.T,ue,0);var he=i(87778);const ge=(0,he.u1)("layoutService");var pe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},fe=function(e,t){return function(i,n){t(i,n,e)}};let me=class{get mainContainer(){return(0,y.Fy)(this._codeEditorService.listCodeEditors())?.getContainerDomNode()??a.G.document.body}get activeContainer(){const e=this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor();return e?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return z.tG(this.mainContainer)}get activeContainerDimension(){return z.tG(this.activeContainer)}get containers(){return(0,y.Yc)(this._codeEditorService.listCodeEditors().map((e=>e.getContainerDomNode())))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=te.Jh.None,this.onDidLayoutActiveContainer=te.Jh.None,this.onDidLayoutContainer=te.Jh.None,this.onDidChangeActiveContainer=te.Jh.None,this.onDidAddContainer=te.Jh.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};me=pe([fe(0,g.T)],me);let _e=class extends me{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};_e=pe([fe(1,g.T)],_e),(0,le.v)(ge,me,1);var ve=i(73124),be=i(63466),ye=i(95062),we=i(57642),Ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Se=function(e,t){return function(i,n){t(i,n,e)}};const ke=!1;function xe(e){return e.scheme===b.ny.file?e.fsPath:e.path}let Ee=0;class Le{constructor(e,t,i,n,o,s,r){this.id=++Ee,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Te{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Ie{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements){const n=0===i.reason?e:t;n.push(i.resourceLabel)}const i=[];return e.length>0&&i.push(w.kg({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(w.kg({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class De{constructor(e,t,i,n,o,s,r){this.id=++Ee,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"===typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new Ie),this.removedResources.has(t)||this.removedResources.set(t,new Te(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Ie),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Te(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Re{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new we.To(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,r=this._past.length;s=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let o=this._future.length-1;o>=0;o--,n++){const r=this._future[o];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,s=o),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class Ne{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=s,i=n))}return[t,i]}canUndo(e){if(e instanceof we.Ym){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.hasPastElements()}return!1}_onError(e,t){(0,v.dz)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(t){return s(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(s(),n.dispose(),o())),(t=>(s(),n.dispose(),this._onError(t,e)))):(s(),n.dispose(),o())}async _invokeWorkspacePrepare(e){if("undefined"===typeof e.actual.prepareUndoRedo)return l.jG.None;const t=e.actual.prepareUndoRedo();return"undefined"===typeof t?l.jG.None:t}_invokeResourcePrepare(e,t){if(1!==e.actual.type||"undefined"===typeof e.actual.prepareUndoRedo)return t(l.jG.None);const i=e.actual.prepareUndoRedo();return i?(0,l.Xm)(i)?t(i):i.then((e=>t(e))):t(l.jG.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Ae);return new Ne(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Pe(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new Pe}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,w.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,w.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,w.kg({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,w.kg({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,w.kg({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let o;(function(e){e[e["All"]=0]="All",e[e["This"]=1]="This",e[e["Cancel"]=2]="Cancel"})(o||(o={}));const{result:s}=await this._dialogService.prompt({type:ve.A.Info,message:w.kg("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:w.kg({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",i.editStacks.length),run:()=>o.All},{label:w.kg({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>o.This}],cancelButton:{run:()=>o.Cancel}});if(s===o.Cancel)return;if(s===o.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let o;try{o=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceUndo(e,t,i,!0);if(s)return o.dispose(),s.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new Ne([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=w.kg({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&(s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n))}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof we.Ym){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"===typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(!o)return;if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}const s=o.sourceId!==t||o.confirmBeforeUndo;if(s&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{ke&&this._print("undo")}}async _confirmAndContinueUndo(e,t,i){const n=await this._dialogService.confirm({message:w.kg("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:w.kg({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:w.kg("confirmDifferentSource.no","No")});if(n.confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&(s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,w.kg({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,w.kg({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,w.kg({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new Ne([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=w.kg({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&(s.groupId===e&&(!t||s.groupOrder=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ye=function(e,t){return function(i,n){t(i,n,e)}};const Ze=z.$;let Xe=class extends je.x{get _targetWindow(){return z.zk(this._target.targetElements[0])}get _targetDocumentElement(){return z.zk(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return 2===this._hoverPosition?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,i,n,o,r){super(),this._keybindingService=t,this._configurationService=i,this._openerService=n,this._instantiationService=o,this._accessibilityService=r,this._messageListeners=new l.Cm,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new te.vl),this._onRequestLayout=this._register(new te.vl),this._linkHandler=e.linkHandler||(t=>(0,Ue.i)(this._openerService,t,(0,$e.VS)(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new et(e.target),this._hoverPointer=e.appearance?.showPointer?Ze("div.workbench-hover-pointer"):void 0,this._hover=this._register(new Ve.N4),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),e.appearance?.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=e.position?.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,(e=>e.stopPropagation())),this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.dispose()})),this._register(z.ko(this._targetWindow,"blur",(()=>this.dispose())));const a=Ze("div.hover-row.markdown-hover"),c=Ze("div.hover-contents");if("string"===typeof e.content)c.textContent=e.content,c.style.whiteSpace="pre-wrap";else if(z.sb(e.content))c.appendChild(e.content),c.classList.add("html-hover-contents");else{const t=e.content,i=this._instantiationService.createInstance(Ue.T,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||s.jU.fontFamily}),{element:n}=i.render(t,{actionHandler:{callback:e=>this._linkHandler(e),disposables:this._messageListeners},asyncRenderCallback:()=>{c.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});c.appendChild(n)}if(a.appendChild(c),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){const t=Ze("div.hover-row.status-bar"),i=Ze("div.actions");e.actions.forEach((e=>{const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;Ve.jQ.render(i,{label:e.label,commandId:e.commandId,run:t=>{e.run(t),this.dispose()},iconClass:e.iconClass},n)})),t.appendChild(i),this._hover.containerDomNode.appendChild(t)}let d;if(this._hoverContainer=Ze("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode),d=!(e.actions&&e.actions.length>0)&&(void 0===e.persistence?.hideOnHover?"string"===typeof e.content||(0,$e.VS)(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):e.persistence.hideOnHover),e.appearance?.showHoverHint){const e=Ze("div.hover-row.status-bar"),t=Ze("div.info");t.textContent=(0,w.kg)("hoverhint","Hold {0} key to mouse over",qe.zx?"Option":"Alt"),e.appendChild(t),this._hover.containerDomNode.appendChild(e)}const u=[...this._target.targetElements];d||u.push(this._hoverContainer);const h=this._register(new Je(u));if(this._register(h.onMouseOut((()=>{this._isLocked||this.dispose()}))),d){const e=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new Je(e)),this._register(this._lockMouseTracker.onMouseOut((()=>{this._isLocked||this.dispose()})))}else this._lockMouseTracker=h}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){const i=z.Hs(this._hoverContainer,Ze("div")),n=z.BC(this._hoverContainer,Ze("div"));i.tabIndex=0,n.tabIndex=0,this._register(z.ko(n,"focus",(t=>{e.focus(),t.preventDefault()}))),this._register(z.ko(i,"focus",(e=>{t.focus(),e.preventDefault()})))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return e}const n=this.findLastFocusableChild(i);if(n)return n}}render(e){e.appendChild(this._hoverContainer);const t=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement),i=t&&(0,Ve.vr)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());i&&(0,Ge.h5)(i),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=e=>{const t=z.mU(e),i=e.getBoundingClientRect();return{top:i.top*t,bottom:i.bottom*t,right:i.right*t,left:i.left*t}},t=this._target.targetElements.map((t=>e(t))),{top:i,right:n,bottom:o,left:s}=t[0],r=n-s,a=o-i,l={top:i,right:n,bottom:o,left:s,width:r,height:a,center:{x:s+r/2,y:i+a/2}};if(this.adjustHorizontalHoverPosition(l),this.adjustVerticalHoverPosition(l),this.adjustHoverMaxHeight(l),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:l.left+=3,l.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:l.left-=3,l.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:l.top+=3,l.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:l.top-=3,l.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}l.center.x=l.left+r/2,l.center.y=l.top+a/2}this.computeXCordinate(l),this.computeYCordinate(l),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(l)),this._hover.onContentsChanged()}computeXCordinate(e){const t=this._hover.containerDomNode.clientWidth+2;void 0!==this._target.x?this._x=this._target.x:1===this._hoverPosition?this._x=e.right:0===this._hoverPosition?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(void 0!==this._target.x)return;const t=this._hoverPointer?3:0;if(this._forcePosition){const i=t+2;1===this._hoverPosition?this._hover.containerDomNode.style.maxWidth=this._targetDocumentElement.clientWidth-e.right-i+"px":0===this._hoverPosition&&(this._hover.containerDomNode.style.maxWidth=e.left-i+"px")}else if(1===this._hoverPosition){const i=this._targetDocumentElement.clientWidth-e.right;if(i=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2}}else if(0===this._hoverPosition){const i=e.left;if(i=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2}e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1)}}adjustVerticalHoverPosition(e){if(void 0!==this._target.y||this._forcePosition)return;const t=this._hoverPointer?3:0;3===this._hoverPosition?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):2===this._hoverPosition&&e.bottom+this._hover.containerDomNode.clientHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){const i=2+(this._hoverPointer?3:0);3===this._hoverPosition?t=Math.min(t,e.top-i):2===this._hoverPosition&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-i))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=e.center.y-(this._y-t)-3+"px":this._hoverPointer.style.top=Math.round(t/2)-3+"px";break}case 3:case 2:{this._hoverPointer.classList.add(3===this._hoverPosition?"bottom":"top");const t=this._hover.containerDomNode.clientWidth;let i=Math.round(t/2)-3;const n=this._x+i;(ne.right)&&(i=e.center.x-this._x-3),this._hoverPointer.style.left=`${i}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};Xe=Qe([Ye(1,We.b),Ye(2,He.pG),Ye(3,ze.C),Ye(4,he._Y),Ye(5,Ke.j)],Xe);class Je extends je.x{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new te.vl),this._elements.forEach((e=>this.onmouseover(e,(()=>this._onTargetMouseOver(e))))),this._elements.forEach((e=>this.onmouseleave(e,(()=>this._onTargetMouseLeave(e)))))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=z.zk(e).setTimeout((()=>this._fireIfMouseOutside()),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(z.zk(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class et{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var tt,it=i(68389),nt=i(12402),ot=i(21542);function st(e){const t=e;return!!t&&"number"===typeof t.x&&"number"===typeof t.y}function rt(e,t,i){const n=i.mode===tt.ALIGN?i.offset:i.offset+i.size,o=i.mode===tt.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}(function(e){e[e["AVOID"]=0]="AVOID",e[e["ALIGN"]=1]="ALIGN"})(tt||(tt={}));class at extends l.jG{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=l.jG.None,this.toDisposeOnSetContainer=l.jG.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=z.$(".context-view"),z.jD(this.view),this.setContainer(e,t),this._register((0,l.s)((()=>this.setContainer(null,1))))}setContainer(e,t){this.useFixedPosition=1!==t;const i=this.useShadowDOM;if(this.useShadowDOM=3===t,(e!==this.container||i!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=z.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=lt,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(z.$("slot"))}else this.container.appendChild(this.view);const t=new l.Cm;at.BUBBLE_UP_EVENTS.forEach((e=>{t.add(z.b2(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),at.BUBBLE_DOWN_EVENTS.forEach((e=>{t.add(z.b2(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=t}}show(e){this.isVisible()&&this.hide(),z.w_(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",z.WU(this.view),this.toDisposeOnClean=e.render(this.view)||l.jG.None,this.delegate=e,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||qe.un&&nt.e.pointerEvents?(this.delegate?.layout?.(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(z.sb(e)){const i=z.BK(e),n=z.mU(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=st(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=z.Tr(this.view),n=z.OK(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,r=this.delegate.anchorAxisAlignment||0;let a,l;const c=z.fz();if(0===r){const e={offset:t.top-c.pageYOffset,size:t.height,position:0===o?0:1},r={offset:t.left,size:t.width,position:0===s?0:1,mode:tt.ALIGN};a=rt(c.innerHeight,n,e)+c.pageYOffset,ot.Q.intersects({start:a,end:a+n},{start:e.offset,end:e.offset+e.size})&&(r.mode=tt.AVOID),l=rt(c.innerWidth,i,r)}else{const e={offset:t.left,size:t.width,position:0===s?0:1},r={offset:t.top,size:t.height,position:0===o?0:1,mode:tt.ALIGN};l=rt(c.innerWidth,i,e),ot.Q.intersects({start:l,end:l+i},{start:e.offset,end:e.offset+e.size})&&(r.mode=tt.AVOID),a=rt(c.innerHeight,n,r)+c.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===s?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=z.BK(this.container);this.view.style.top=a-(this.useFixedPosition?z.BK(this.view).top:d.top)+"px",this.view.style.left=l-(this.useFixedPosition?z.BK(this.view).left:d.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),z.jD(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,z.zk(e).document.activeElement):t&&!z.QX(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}const lt='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var ct=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},dt=function(e,t){return function(i,n){t(i,n,e)}};let ut=class extends l.jG{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new at(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer((()=>this.layout())))}showContextView(e,t,i){let n;n=t?t===this.layoutService.getContainer((0,z.zk)(t))?1:i?3:2:1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);const o={close:()=>{this.openContextView===o&&this.hideContextView()}};return this.openContextView=o,o}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};ut=ct([dt(0,ge)],ut);class ht extends ut{getContextViewElement(){return this.contextView.getViewElement()}}var gt=i(67792),pt=i(50322);class ft{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(void 0===e||(0,pt.Kg)(e)||(0,z.sb)(e))n=e;else if((0,pt.Tn)(e.markdown)){this._hoverWidget||this.show((0,w.kg)("iconLabel.loading","Loading..."),t,i),this._cancellationTokenSource=new gt.Qi;const o=this._cancellationTokenSource.token;if(n=await e.markdown(o),void 0===n&&(n=e.markdownNotSupportedFallback),this.isDisposed||o.isCancellationRequested)return}else n=e.markdown??e.markdownNotSupportedFallback;this.show(n,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const o={content:e,target:this.target,actions:i?.actions,linkHandler:i?.linkHandler,trapFocus:i?.trapFocus,appearance:{showPointer:"element"===this.hoverDelegate.placement,skipFadeInAnimation:!this.fadeInAnimation||!!n,showHoverHint:i?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(o,t)}n?.dispose()}hasContent(e){return!!e&&(!(0,$e.VS)(e)||!!e.value)}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}var mt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_t=function(e,t){return function(i,n){t(i,n,e)}};let vt=class extends l.jG{constructor(e,t,i,n,o){super(),this._instantiationService=e,this._keybindingService=i,this._layoutService=n,this._accessibilityService=o,this._managedHovers=new Map,t.onDidShowContextMenu((()=>this.hideHover())),this._contextViewHandler=this._register(new ut(this._layoutService))}showHover(e,t,i){if(bt(this._currentHoverOptions)===bt(e))return;if(this._currentHover&&this._currentHoverOptions?.persistence?.sticky)return;this._currentHoverOptions=e,this._lastHoverOptions=e;const n=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),o=(0,z.bq)();i||(n&&o?o.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=o):this._lastFocusedElementBeforeOpen=void 0);const s=new l.Cm,r=this._instantiationService.createInstance(Xe,e);if(e.persistence?.sticky&&(r.isLocked=!0),r.onDispose((()=>{const t=this._currentHover?.domNode&&(0,z.nR)(this._currentHover.domNode);t&&this._lastFocusedElementBeforeOpen?.focus(),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),s.dispose()}),void 0,s),!e.container){const t=(0,z.sb)(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer((0,z.zk)(t))}if(this._contextViewHandler.showContextView(new yt(r,t),e.container),r.onRequestLayout((()=>this._contextViewHandler.layout()),void 0,s),e.persistence?.sticky)s.add((0,z.ko)((0,z.zk)(e.container).document,z.Bx.MOUSE_DOWN,(e=>{(0,z.QX)(e.target,r.domNode)||this.doHideHover()})));else{if("targetElements"in e.target)for(const t of e.target.targetElements)s.add((0,z.ko)(t,z.Bx.CLICK,(()=>this.hideHover())));else s.add((0,z.ko)(e.target,z.Bx.CLICK,(()=>this.hideHover())));const t=(0,z.bq)();if(t){const i=(0,z.zk)(t).document;s.add((0,z.ko)(t,z.Bx.KEY_DOWN,(t=>this._keyDown(t,r,!!e.persistence?.hideOnKeyDown)))),s.add((0,z.ko)(i,z.Bx.KEY_DOWN,(t=>this._keyDown(t,r,!!e.persistence?.hideOnKeyDown)))),s.add((0,z.ko)(t,z.Bx.KEY_UP,(e=>this._keyUp(e,r)))),s.add((0,z.ko)(i,z.Bx.KEY_UP,(e=>this._keyUp(e,r))))}}if("IntersectionObserver"in a.G){const t=new IntersectionObserver((e=>this._intersectionChange(e,r)),{threshold:0}),i="targetElements"in e.target?e.target.targetElements[0]:e.target;t.observe(i),s.add((0,l.s)((()=>t.disconnect())))}return this._currentHover=r,r}hideHover(){!this._currentHover?.isLocked&&this._currentHoverOptions&&this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,t){const i=e[e.length-1];i.isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,t,i){if("Alt"===e.key)return void(t.isLocked=!0);const n=new it.Z(e),o=this._keybindingService.resolveKeyboardEvent(n);o.getSingleModifierDispatchChords().some((e=>!!e))||0!==this._keybindingService.softDispatch(n,n.target).kind||!i||this._currentHoverOptions?.trapFocus&&"Tab"===e.key||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus())}_keyUp(e,t){"Alt"===e.key&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus()))}setupManagedHover(e,t,i,n){let o,s;t.setAttribute("custom-hover","true"),""!==t.title&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",t.title),t.title="");const r=(t,i)=>{const n=void 0!==s;t&&(s?.dispose(),s=void 0),i&&(o?.dispose(),o=void 0),n&&(e.onDidHideHover?.(),s=void 0)},a=(o,r,a,l)=>new f.pc((async()=>{s&&!s.isDisposed||(s=new ft(e,a||t,o>0),await s.update("function"===typeof i?i():i,r,{...n,trapFocus:l}))}),o);let c=!1;const d=(0,z.ko)(t,z.Bx.MOUSE_DOWN,(()=>{c=!0,r(!0,!0)}),!0),u=(0,z.ko)(t,z.Bx.MOUSE_UP,(()=>{c=!1}),!0),h=(0,z.ko)(t,z.Bx.MOUSE_LEAVE,(e=>{c=!1,r(!1,e.fromElement===t)}),!0),g=i=>{if(o)return;const n=new l.Cm,s={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{s.x=e.x+10,(0,z.sb)(e.target)&&wt(e.target,t)!==t&&r(!0,!0)};n.add((0,z.ko)(t,z.Bx.MOUSE_MOVE,e,!0))}o=n,(0,z.sb)(i.target)&&wt(i.target,t)!==t||n.add(a(e.delay,!1,s))},p=(0,z.ko)(t,z.Bx.MOUSE_OVER,g,!0),m=()=>{if(c||o)return;const i={targetElements:[t],dispose:()=>{}},n=new l.Cm,s=()=>r(!0,!0);n.add((0,z.ko)(t,z.Bx.BLUR,s,!0)),n.add(a(e.delay,!1,i)),o=n};let _;const v=t.tagName.toLowerCase();"input"!==v&&"textarea"!==v&&(_=(0,z.ko)(t,z.Bx.FOCUS,m,!0));const b={show:e=>{r(!1,!0),a(0,e,void 0,e)},hide:()=>{r(!0,!0)},update:async(e,t)=>{i=e,await(s?.update(i,void 0,t))},dispose:()=>{this._managedHovers.delete(t),p.dispose(),h.dispose(),d.dispose(),u.dispose(),_?.dispose(),r(!0,!0)}};return this._managedHovers.set(t,b),b}showManagedHover(e){const t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach((e=>e.dispose())),super.dispose()}};function bt(e){if(void 0!==e)return e?.id??e}vt=mt([_t(0,he._Y),_t(1,Be.Z),_t(2,We.b),_t(3,ge),_t(4,Ke.j)],vt);class yt{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function wt(e,t){t=t??(0,z.zk)(e).document.body;while(!e.hasAttribute("custom-hover")&&e!==t)e=e.parentElement;return e}(0,le.v)(Fe.TN,vt,1),(0,ne.zy)(((e,t)=>{const i=e.getColor(Me.oZ8);i&&(t.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`))}));var Ct=i(48770),St=i(3176),kt=i(97744),xt=i(28346),Et=i(36788),Lt=i(64037),Tt=i(72786),It=i(21553),Dt=i(27503),Rt=i(16374);function Nt(e){return Object.isFrozen(e)?e:p.ol(e)}class At{static createEmptyModel(e){return new At({},[],[],void 0,e)}constructor(e,t,i,n,o){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.logService=o,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const e=this.raw.map((e=>{if(e instanceof At)return e;const t=new Ot("",this.logService);return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,He.gD)(this.contents,e):this.contents}inspect(e,t){const i=this;return{get value(){return Nt(i.rawConfiguration.getValue(e))},get override(){return t?Nt(i.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return Nt(t?i.rawConfiguration.override(t).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){const t=[];for(const{contents:n,identifiers:o,keys:s}of i.rawConfiguration.overrides){const r=new At(n,s,[],void 0,i.logService).getValue(e);void 0!==r&&t.push({identifiers:o,value:r})}return t.length?Nt(t):void 0}}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?(0,He.gD)(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=p.Go(this.contents),i=p.Go(this.overrides),n=[...this.keys],o=this.raw?.length?[...this.raw]:[this];for(const s of e)if(o.push(...s.raw?.length?s.raw:[s]),!s.isEmpty()){this.mergeContents(t,s.contents);for(const e of s.overrides){const[t]=i.filter((t=>y.aI(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=y.dM(t.keys)):i.push(p.Go(e))}for(const e of s.keys)-1===n.indexOf(e)&&n.push(e)}return new At(t,n,i,o.every((e=>e instanceof At))?void 0:o,this.logService)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!==typeof t||!Object.keys(t).length)return this;const i={};for(const e of y.dM([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e];const o=t[e];o&&("object"===typeof n&&"object"===typeof o?(n=p.Go(n),this.mergeContents(n,o)):n=o),i[e]=n}return new At(i,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&pt.Gv(e[i])&&pt.Gv(t[i])?this.mergeContents(e[i],t[i]):e[i]=p.Go(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=p.Go(e))};for(const i of this.overrides)1===i.identifiers.length&&i.identifiers[0]===e?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),(0,He.iB)(this.contents,e),Dt.rC.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>y.aI(t.identifiers,(0,Dt.Gv)(e)))),1))}updateValue(e,t,i){if((0,He.kW)(this.contents,e,t,(e=>this.logService.error(e))),i=i||-1===this.keys.indexOf(e),i&&this.keys.push(e),Dt.rC.test(e)){const t=(0,Dt.Gv)(e),i={identifiers:t,keys:Object.keys(this.contents[e]),contents:(0,He.ad)(this.contents[e],(e=>this.logService.error(e)))},n=this.overrides.findIndex((e=>y.aI(e.identifiers,t)));-1!==n?this.overrides[n]=i:this.overrides.push(i)}}}class Ot{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||At.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:o,restricted:s,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new At(i,n,o,r?[e]:void 0,this.logService),this._restrictedConfigurations=s||[]}doParseRaw(e,t){const i=Rt.O.as(Dt.Fd.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);e=n.raw;const o=(0,He.ad)(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`))),s=Object.keys(e),r=this.toOverrides(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`)));return{contents:o,keys:s,overrides:r,restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){let o=!1;if(!n?.scopes&&!n?.skipRestricted&&!n?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:o};const s={},r=[];for(const a in e)if(Dt.rC.test(a)&&i){const i=this.filter(e[a],t,!1,n);s[a]=i.raw,o=o||i.hasExcludedProperties,r.push(...i.restricted)}else{const i=t[a],l=i?"undefined"!==typeof i.scope?i.scope:3:void 0;i?.restricted&&r.push(a),n.exclude?.includes(a)||!n.include?.includes(a)&&(void 0!==l&&void 0!==n.scopes&&!n.scopes.includes(l)||n.skipRestricted&&i?.restricted)?o=!0:s[a]=e[a]}return{raw:s,restricted:r,hasExcludedProperties:o}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(Dt.rC.test(n)){const o={};for(const t in e[n])o[t]=e[n][t];i.push({identifiers:(0,Dt.Gv)(n),keys:Object.keys(o),contents:(0,He.ad)(o,t)})}return i}}class Pt{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=o,this.policyConfiguration=s,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=c,this.workspaceConfiguration=d,this.folderConfigurationModel=u,this.memoryConfigurationModel=h}toInspectValue(e){return void 0!==e?.value||void 0!==e?.override||void 0!==e?.overrides?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class Mt{constructor(e,t,i,n,o,s,r,a,l,c){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=o,this._workspaceConfiguration=s,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this.logService=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new It.fT,this._userConfiguration=null}getValue(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i);return n.getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=At.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),o=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const t of n.overrides)for(const i of t.identifiers)void 0!==n.getOverrideValue(e,i)&&r.add(i);return new Pt(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,o||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e,t){const i=this.parseConfigurationModel(e.defaults,t),n=this.parseConfigurationModel(e.policy,t),o=this.parseConfigurationModel(e.application,t),s=this.parseConfigurationModel(e.user,t),r=this.parseConfigurationModel(e.workspace,t),a=e.folders.reduce(((e,i)=>(e.set(d.r.revive(i[0]),this.parseConfigurationModel(i[1],t)),e)),new It.fT);return new Mt(i,n,o,s,At.createEmptyModel(t),r,a,At.createEmptyModel(t),new It.fT,t)}static parseConfigurationModel(e,t){return new At(e.contents,e.keys,e.overrides,void 0,t)}}class Ft{constructor(e,t,i,n,o){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this.logService=o,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const t of e.keys)this.affectedKeys.add(t);for(const[,t]of e.overrides)for(const e of t)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const e of this.affectedKeys)this._affectsConfigStr+=e+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Mt.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){const i=this._marker+e,n=this._affectsConfigStr.indexOf(i);if(n<0)return!1;const o=n+i.length;if(o>=this._affectsConfigStr.length)return!1;const s=this._affectsConfigStr.charCodeAt(o);if(s!==this._markerCode1&&s!==this._markerCode2)return!1;if(t){const i=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,n=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!p.aI(i,n)}return!0}}var Bt=i(53790);const Wt={kind:0},Ht={kind:1};function Vt(e,t,i){return{kind:2,commandId:e,commandArgs:t,isBubble:i}}class jt{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=jt.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e=0;e--){const n=i[e];if(n.command===t.command)continue;let o=!0;for(let e=1;e=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const o=this._map.get(n[0]);if(void 0===o)return this._log("\\ No keybinding entries."),Wt;let s=null;if(n.length<2)s=o;else{s=[];for(let e=0,t=o.length;et.chords.length)continue;let i=!0;for(let e=1;e=0;i--){const n=t[i];if(jt._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function zt(e){return e?`${e.serialize()}`:"no when condition"}function Ut(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const $t=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class qt extends l.jG{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:te.Jh.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new te.vl),this._currentChords=[],this._currentChordChecker=new f.vb,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Kt.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new f.pc,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),Wt;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),Wt;const o=this._contextKeyService.getContext(t),s=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(o,s,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw(0,v.iH)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(w.kg("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(w.kg("next.chord","({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),Bt.M.enabled&&Bt.M.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],Bt.M.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Kt.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Kt.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=i.getChords();return this._ignoreSingleModifiers=new Kt(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let o=null,s=null;if(i){const[t]=e.getSingleModifierDispatchChords();o=t,s=t?[t]:[]}else[o]=e.getDispatchChords(),s=this._currentChords.map((({keypress:e})=>e));if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(r,s,o);switch(l.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",a,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${a}".`),this._notificationService.status(w.kg("missing.chord","The key combination ({0}, {1}) is not a command.",e,a),{hideAfter:1e4}),this._leaveChordMode(),n=!0}return n;case 1:return this._logService.trace("KeybindingService#dispatch",a,"[ Several keybindings match - more chords needed ]"),n=!0,this._expectAnotherChord(o,a),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),n;case 2:if(this._logService.trace("KeybindingService#dispatch",a,`[ Will dispatch command ${l.commandId} ]`),null===l.commandId||""===l.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${a}".`),this._notificationService.status(w.kg("missing.chord","The key combination ({0}, {1}) is not a command.",e,a),{hideAfter:1e4}),this._leaveChordMode(),n=!0}}else{this.inChordMode&&this._leaveChordMode(),l.isBubble||(n=!0),this._log(`+ Invoking command ${l.commandId}.`),this._currentlyDispatchingCommandId=l.commandId;try{"undefined"===typeof l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e)))}finally{this._currentlyDispatchingCommandId=null}$t.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return n}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class Kt{static{this.EMPTY=new Kt(null)}constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}var Gt=i(78386);class Qt{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Yt(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=Yt(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=r}}function Yt(e){const t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return Xt.r0.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Xt.rr.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return Xt.G$.toLabel(this._os,this._chords,(e=>this._getUserSettingsLabel(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new Ct.FW(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class ei extends Jt{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Zt.YM.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Zt.YM.toString(e.keyCode)}_getElectronAccelerator(e){return Zt.YM.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=Zt.YM.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return ei.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=Zt.YM.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=Zt.Fo[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof Ct.dG)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new Ct.dG(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=Yt(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new ei(i,t)]:[]}}var ti=i(48056),ii=i(44838),ni=i(11086),oi=i(81714),si=i(340),ri=i(84366),ai=i(17602),li=i(64189),ci=i(55664),di=i(85141),ui=i(6330),hi=i(46274),gi=i(88758),pi=i(25201),fi=i(48038),mi=i(64236),_i=i(37800),vi=i(25923),bi=i(79855),yi=i(23740),wi=i(74529);const Ci=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Si=/(&)?(&)([^\s&])/g;var ki,xi;(function(e){e[e["Right"]=0]="Right",e[e["Left"]=1]="Left"})(ki||(ki={})),function(e){e[e["Above"]=0]="Above",e[e["Below"]=1]="Below"}(xi||(xi={}));class Ei extends fi.E{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const o=document.createElement("div");o.classList.add("monaco-menu"),o.setAttribute("role","presentation"),super(o,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...qe.zx||qe.j9?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=o,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(pi.q.addTarget(o)),this._register((0,z.ko)(o,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e);t.equals(2)&&e.preventDefault()}))),i.enableMnemonics&&this._register((0,z.ko)(o,z.Bx.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){z.fs.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Ti&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),qe.j9&&this._register((0,z.ko)(o,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),z.fs.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),z.fs.stop(e,!0))}))),this._register((0,z.ko)(this.domNode,z.Bx.MOUSE_OUT,(e=>{const t=e.relatedTarget;(0,z.QX)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,z.ko)(this.actionsList,z.Bx.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,z.QX)(t,this.actionsList)&&t!==this.actionsList){while(t.parentElement!==this.actionsList&&null!==t.parentElement)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(pi.q.addTarget(this.actionsList)),this._register((0,z.ko)(this.actionsList,pi.B.Tap,(e=>{let t=e.initialTarget;if(t&&(0,z.QX)(t,this.actionsList)&&t!==this.actionsList){while(t.parentElement!==this.actionsList&&null!==t.parentElement)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new _i.MU(o,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register((0,z.ko)(o,pi.B.Change,(e=>{z.fs.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register((0,z.ko)(r,z.Bx.MOUSE_UP,(e=>{e.preventDefault()})));const a=(0,z.zk)(e);o.style.maxHeight=`${Math.max(10,a.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(((e,n)=>{if(i.submenuIds?.has(e.id))return console.warn(`Found submenu cycle: ${e.id}`),!1;if(e instanceof ci.wv){if(n===t.length-1||0===n)return!1;const e=t[n-1];if(e instanceof ci.wv)return!1}return!0})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof Ii))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||((0,z.Cl)(e)?this.styleSheet=(0,z.li)(e):(Ei.globalStyleSheet||(Ei.globalStyleSheet=(0,z.li)()),this.styleSheet=Ei.globalStyleSheet)),this.styleSheet.textContent=Ni(t,(0,z.Cl)(e))}styleScrollElement(e,t){const i=t.foregroundColor??"",n=t.backgroundColor??"",o=t.borderColor?`1px solid ${t.borderColor}`:"",s="5px",r=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=o,e.style.borderRadius=s,e.style.color=i,e.style.backgroundColor=n,e.style.boxShadow=r}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register((0,z.ko)(this.element,z.Bx.MOUSE_UP,(e=>{if(z.fs.stop(e,!0),gi.gm){const t=new hi.P((0,z.zk)(this.element),e);if(t.rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,z.ko)(this.element,z.Bx.CONTEXT_MENU,(e=>{z.fs.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,z.BC)(this.element,(0,z.$)("a.action-menu-item")),this._action.id===ci.wv.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,z.BC)(this.item,(0,z.$)("span.menu-item-check"+yi.L.asCSSSelector(vi.W.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,z.BC)(this.item,(0,z.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,z.BC)(this.item,(0,z.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){(0,z.w_)(this.label);let e=(0,wi.pS)(this.action.label);if(e){const t=Di(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=Ci.exec(e);if(i){e=c.ih(e),Si.lastIndex=0;let t=Si.exec(e);while(t&&t[1])t=Si.exec(e);const n=e=>e.replace(/&&/g,"&");t?this.label.append(c.NB(n(e.substr(0,t.index))," "),(0,z.$)("u",{"aria-hidden":"true"},t[3]),c.BO(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item?.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",o=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=i??"",this.item.style.outline=n,this.item.style.outlineOffset=o),this.check&&(this.check.style.color=t??"")}}class Ti extends Li{constructor(e,t,i,n,o){super(e,e,n,o),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new l.Cm),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:{horizontal:ki.Right,vertical:xi.Below},this.showScheduler=new f.uC((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new f.uC((()=>{this.element&&!(0,z.QX)((0,z.bq)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,z.BC)(this.item,(0,z.$)("span.submenu-indicator"+yi.L.asCSSSelector(vi.W.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,z.ko)(this.element,z.Bx.KEY_UP,(e=>{const t=new it.Z(e);(t.equals(17)||t.equals(3))&&(z.fs.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,z.ko)(this.element,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e);(0,z.bq)()===this.item&&(t.equals(17)||t.equals(3))&&z.fs.stop(e,!0)}))),this._register((0,z.ko)(this.element,z.Bx.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,z.ko)(this.element,z.Bx.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,z.ko)(this.element,z.Bx.FOCUS_OUT,(e=>{this.element&&!(0,z.QX)((0,z.bq)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){z.fs.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=rt(e.width,t.width,{position:n.horizontal===ki.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{const t=new it.Z(e);t.equals(15)&&(z.fs.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,z.ko)(this.submenuContainer,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e);t.equals(15)&&z.fs.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){this.item&&this.item?.setAttribute("aria-expanded",e)}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Ii extends mi.Z4{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function Di(e){const t=Ci,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}function Ri(e){const t=(0,bi.J)()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}function Ni(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${Ri(vi.W.menuSelection)}\n${Ri(vi.W.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n\tmax-height: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderHoverBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderActiveBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`)}return i}var Ai=i(13153);class Oi{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=(0,z.bq)();const n=(0,z.sb)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{this.lastContainer=n;const o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild((0,z.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=(0,z.ko)(this.block,z.Bx.MOUSE_DOWN,(e=>e.stopPropagation())));const s=new l.Cm,r=e.actionRunner||new ci.LN;r.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,s),r.onDidRun(this.onDidActionRun,this,s),i=new Ei(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:r,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},Ai.XS),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,s),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,s);const a=(0,z.zk)(n);return s.add((0,z.ko)(a,z.Bx.BLUR,(()=>this.contextViewService.hideContextView(!0)))),s.add((0,z.ko)(a,z.Bx.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new hi.P(a,e);let i=t.target;if(!t.rightButton){while(i){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,l.qE)(s,i)},focus:()=>{i?.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide?.(!!t),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&((0,z.bq)()===this.lastContainer||(0,z.QX)((0,z.bq)(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!(0,v.MB)(e.error)&&this.notificationService.error(e.error)}}var Pi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Mi=function(e,t){return function(i,n){t(i,n,e)}};let Fi=class extends l.jG{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Oi(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,o,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=o,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new te.vl),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new te.vl)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Bi.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),z.Di.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var Bi;Fi=Pi([Mi(0,ni.k),Mi(1,ye.Ot),Mi(2,Be.l),Mi(3,We.b),Mi(4,ui.ez),Mi(5,ae.fN)],Fi),function(e){function t(e){return e&&e.menuId instanceof ui.D8}function i(e,i,n){if(!t(e))return e;const{menuId:o,menuActionOptions:s,contextKeyService:r}=e;return{...e,getActions:()=>{const t=[];if(o){const e=i.getMenuActions(o,r??n,s);(0,di.$u)(e,t)}return e.getActions?ci.wv.join(e.getActions(),t):t}}}e.transform=i}(Bi||(Bi={}));var Wi,Hi=i(61565);(function(e){e[e["API"]=0]="API",e[e["USER"]=1]="USER"})(Wi||(Wi={}));var Vi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ji=function(e,t){return function(i,n){t(i,n,e)}};let zi=class{constructor(e){this._commandService=e}async open(e,t){if(!(0,b.v$)(e,b.ny.command))return!1;if(!t?.allowCommands)return!0;if("string"===typeof e&&(e=d.r.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=(0,Hi.qg)(decodeURIComponent(e.query))}catch{try{i=(0,Hi.qg)(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};zi=Vi([ji(0,Tt.d)],zi);let Ui=class{constructor(e){this._editorService=e}async open(e,t){"string"===typeof e&&(e=d.r.parse(e));const{selection:i,uri:n}=(0,ze.e)(e);return e=n,e.scheme===b.ny.file&&(e=(0,ri.Fd)(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:t?.fromUserGesture?Wi.USER:Wi.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};Ui=Vi([ji(0,g.T)],Ui);let $i=class{constructor(e,t){this._openers=new ie.w,this._validators=new ie.w,this._resolvers=new ie.w,this._resolvedUriTargets=new It.fT((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new ie.w,this._defaultExternalOpener={openExternal:async e=>((0,b.fV)(e,b.ny.http,b.ny.https)?z.CE(e):a.G.location.href=e,!0)},this._openers.push({open:async(e,t)=>!(!t?.openExternal&&!(0,b.fV)(e,b.ny.mailto,b.ny.http,b.ny.https,b.ny.vsls))&&(await this._doOpenExternal(e,t),!0)}),this._openers.push(new zi(t)),this._openers.push(new Ui(e))}registerOpener(e){const t=this._openers.unshift(e);return{dispose:t}}async open(e,t){const i="string"===typeof e?d.r.parse(e):e,n=this._resolvedUriTargets.get(i)??e;for(const e of this._validators)if(!await e.shouldOpen(n,t))return!1;for(const i of this._openers){const n=await i.open(e,t);if(n)return!0}return!1}async resolveExternalUri(e,t){for(const i of this._resolvers)try{const n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i="string"===typeof e?d.r.parse(e):e;let n,o;try{n=(await this.resolveExternalUri(i,t)).resolved}catch{n=i}if(o="string"===typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),t?.allowContributedOpeners){const e="string"===typeof t?.allowContributedOpeners?t?.allowContributedOpeners:void 0;for(const t of this._externalOpeners){const n=await t.openExternal(o,{sourceUri:i,preferredOpenerId:e},gt.XO.None);if(n)return!0}}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},gt.XO.None)}dispose(){this._validators.clear()}};$i=Vi([ji(0,g.T),ji(1,Tt.d)],$i);var qi=i(4117),Ki=i(14573),Gi=i(23938),Qi=i(63637),Yi=i(96174),Zi=i(60018),Xi=i(3874),Ji=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},en=function(e,t){return function(i,n){t(i,n,e)}};let tn=class extends l.jG{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Rt.O.as(Zi.Fd.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){const[n,o]=this.getOrInstantiateProvider(e,i?.enabledProviderPrefixes),s=this.visibleQuickAccess,r=s?.descriptor;if(s&&o&&r===o)return e===o.prefix||i?.preserveValue||(s.picker.value=e),void this.adjustValueSelection(s.picker,o,i);if(o&&!i?.preserveValue){let t;if(s&&r&&r!==o){const e=s.value.substr(r.prefix.length);e&&(t=`${o.prefix}${e}`)}if(!t){const e=n?.defaultFilterValue;e===Zi.aJ.LAST?t=this.lastAcceptedPickerValues.get(o):"string"===typeof e&&(t=`${o.prefix}${e}`)}"string"===typeof t&&(e=t)}const a=s?.picker?.valueSelection,c=s?.picker?.value,d=new l.Cm,u=d.add(this.quickInputService.createQuickPick({useSeparators:!0}));let h;u.value=e,this.adjustValueSelection(u,o,i),u.placeholder=i?.placeholder??o?.placeholder,u.quickNavigate=i?.quickNavigateConfiguration,u.hideInput=!!u.quickNavigate&&!s,("number"===typeof i?.itemActivation||i?.quickNavigateConfiguration)&&(u.itemActivation=i?.itemActivation??Xi.C1.SECOND),u.contextKey=o?.contextKey,u.filterValue=e=>e.substring(o?o.prefix.length:0),t&&(h=new f.Zv,d.add(te.Jh.once(u.onWillAccept)((e=>{e.veto(),u.hide()})))),d.add(this.registerPickerListeners(u,n,o,e,i));const g=d.add(new gt.Qi);return n&&d.add(n.provide(u,g.token,i?.providerOptions)),te.Jh.once(u.onDidHide)((()=>{0===u.selectedItems.length&&g.cancel(),d.dispose(),h?.complete(u.selectedItems.slice(0))})),u.show(),a&&c===e&&(u.valueSelection=a),t?h?.p:void 0}adjustValueSelection(e,t,i){let n;n=i?.preserveValue?[e.value.length,e.value.length]:[t?.prefix.length??0,e.value.length],e.valueSelection=n}registerPickerListeners(e,t,i,n,o){const s=new l.Cm,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add((0,l.s)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),s.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e,o?.enabledProviderPrefixes);i!==t?this.show(e,{enabledProviderPrefixes:o?.enabledProviderPrefixes,preserveValue:!0,providerOptions:o?.providerOptions}):r.value=e}))),i&&s.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),s}getOrInstantiateProvider(e,t){const i=this.registry.getQuickAccessProvider(e);if(!i||t&&!t?.includes(i.prefix))return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};tn=Ji([en(0,Xi.GK),en(1,he._Y)],tn);var nn=i(83092),on=i(49822),sn=i(84653),rn=i(23453),an=i(34125),ln=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class cn{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"===typeof e?e:e.label)).join("")}}ln([an.B],cn.prototype,"toString",null);const dn=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function un(e){const t=[];let i,n=0;while(i=dn.exec(e)){i.index-n>0&&t.push(e.substring(n,i.index));const[,o,s,,r]=i;r?t.push({label:o,href:s,title:r}):t.push({label:o,href:s}),n=i.index+i[0].length}return n{z.sd(t)&&z.fs.stop(t,!0),i.callback(e.href)},a=i.disposables.add(new on.f(s,z.Bx.CLICK)).event,l=i.disposables.add(new on.f(s,z.Bx.KEY_DOWN)).event,c=te.Jh.chain(l,(e=>e.filter((e=>{const t=new it.Z(e);return t.equals(10)||t.equals(3)}))));i.disposables.add(pi.q.addTarget(s));const d=i.disposables.add(new on.f(s,pi.B.Tap)).event;te.Jh.any(a,d,c)(r,null,i.disposables),t.appendChild(s)}}var _n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},vn=function(e,t){return function(i,n){t(i,n,e)}};const bn="inQuickInput",yn=new ae.N1(bn,!1,(0,w.kg)("inQuickInput","Whether keyboard focus is inside the quick input control")),wn=ae.M$.has(bn),Cn="quickInputType",Sn=new ae.N1(Cn,void 0,(0,w.kg)("quickInputType","The type of the currently visible quick input")),kn="cursorAtEndOfQuickInputBox",xn=new ae.N1(kn,!1,(0,w.kg)("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),En=ae.M$.has(kn),Ln={iconClass:yi.L.asClassName(vi.W.quickInputBack),tooltip:(0,w.kg)("quickInput.back","Back"),handle:-1};class Tn extends l.jG{static{this.noPromptMessage=(0,w.kg)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel")}constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=Tn.noPromptMessage,this._severity=ve.A.Ignore,this.onDidTriggerButtonEmitter=this._register(new te.vl),this.onDidHideEmitter=this._register(new te.vl),this.onWillHideEmitter=this._register(new te.vl),this.onDisposeEmitter=this._register(new te.vl),this.visibleDisposables=this._register(new l.Cm),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!qe.un;this._ignoreFocusOut=e&&!qe.un,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter((e=>e===Ln)),this._rightButtons=e.filter((e=>e!==Ln&&e.location!==Xi.dH.Inline)),this._inlineButtons=e.filter((e=>e.location===Xi.dH.Inline)),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Xi.kF.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=Xi.kF.Other){this.onWillHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?z.Ln(this.ui.widget,this._widget):z.Ln(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new f.pc,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this._leftButtons.map(((e,t)=>fn(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.leftActionBar.push(e,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this._rightButtons.map(((e,t)=>fn(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.rightActionBar.push(t,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();const i=this._inlineButtons.map(((e,t)=>fn(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.inlineActionBar.push(i,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const e=this.toggles?.filter((e=>e instanceof nn.l))??[];this.ui.inputBox.toggles=e}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,z.Ln(this.ui.message),mn(i,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,w.kg)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==ve.A.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class In extends Tn{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new te.vl),this.onWillAcceptEmitter=this._register(new te.vl),this.onDidAcceptEmitter=this._register(new te.vl),this.onDidCustomEmitter=this._register(new te.vl),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=Xi.C1.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new te.vl),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new te.vl),this.onDidTriggerItemButtonEmitter=this._register(new te.vl),this.onDidTriggerSeparatorButtonEmitter=this._register(new te.vl),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new te.at,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}static{this.DEFAULT_ARIA_LABEL=(0,w.kg)("quickInputBox.ariaLabel","Type to narrow down results.")}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){if(this._value!==e){if(this._value=e,t||this.update(),this.visible){const e=this.ui.list.filter(this.filterValue(this._value));e&&this.trySelectFirst()}this.onDidChangeValueEmitter.fire(this._value)}}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Xi.Ym:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(Xi.Fp.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,((e,t)=>t))((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,y.aI)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,y.aI)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(z.Er(t)&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&this.visible&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,y.aI)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return z.ko(this.ui.container,z.Bx.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new it.Z(e),i=t.keyCode,n=this._quickNavigate.keybindings,o=n.some((e=>{const n=e.getChords();return!(n.length>1)&&(n[0].shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n[0].altKey||6!==i)||(!(!n[0].ctrlKey||5!==i)||!(!n[0].metaKey||57!==i)))}));o&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;!n&&i.inputBox&&(n=this.placeholder||In.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=n??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents((()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case Xi.C1.NONE:this._itemActivation=Xi.C1.FIRST;break;case Xi.C1.SECOND:this.ui.list.focus(Xi.Fp.Second),this._itemActivation=Xi.C1.FIRST;break;case Xi.C1.LAST:this.ui.list.focus(Xi.Fp.Last),this._itemActivation=Xi.C1.FIRST;break;default:this.trySelectFirst();break}}))),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Xi.Fp.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}}class Dn extends Tn{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new te.vl),this.onDidAcceptEmitter=this._register(new te.vl),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}let Rn=class extends Fe.fO{constructor(e,t){super("element",!1,(e=>this.getOverrideOptions(e)),e,t)}getOverrideOptions(e){const t=(z.sb(e.content)?e.content.textContent??"":"string"===typeof e.content?e.content:e.content.value).includes("\n");return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};Rn=_n([vn(0,He.pG),vn(1,Fe.TN)],Rn);var Nn=i(42312),An=i(70604);const On="done",Pn="active",Mn="infinite",Fn="infinite-long-running",Bn="discrete";class Wn extends l.jG{static{this.LONG_RUNNING_INFINITE_THRESHOLD=1e4}constructor(e,t){super(),this.progressSignal=this._register(new l.HE),this.workedVal=0,this.showDelayedScheduler=this._register(new f.uC((()=>(0,z.WU)(this.element)),0)),this.longRunningScheduler=this._register(new f.uC((()=>this.infiniteLongRunning()),Wn.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Pn,Mn,Fn,Bn),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(On),this.element.classList.contains(Mn)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Bn,On,Fn),this.element.classList.add(Pn,Mn),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Fn)}getContainer(){return this.element}}var Hn=i(95994);const Vn=z.$;class jn extends l.jG{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>z.b2(this.findInput.inputBox.inputElement,z.Bx.KEY_DOWN,e),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=z.BC(this.parent,Vn(".quick-input-box")),this.findInput=this._register(new Hn.c(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===ve.A.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===ve.A.Info?1:e===ve.A.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===ve.A.Info?1:e===ve.A.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}var zn=i(72033),Un=i(50278),$n=i(92678),qn=i(1474),Kn=i(85661);const Gn=new Kn.d((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new Kn.d((()=>{const e=new Intl.Collator(void 0,{numeric:!0});return{collator:e}})),new Kn.d((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"});return{collator:e}}));function Qn(e,t,i=!1){const n=e||"",o=t||"",s=Gn.value.collator.compare(n,o);return Gn.value.collatorIsNumeric&&0===s&&n!==o?no.length)return 1}return 0}var Xn,Jn=i(55798),eo=i(39751),to=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},io=function(e,t){return function(i,n){t(i,n,e)}};const no=z.$;class oo{constructor(e,t,i){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new Kn.d((()=>{const e=i.label??"",t=(0,wi._k)(e).text.trim(),n=i.ariaLabel||[e,this.saneDescription,this.saneDetail].map((e=>(0,wi.R$)(e))).filter((e=>!!e)).join(", ");return{saneLabel:e,saneSortLabel:t,saneAriaLabel:n}})),this._saneDescription=i.description,this._saneTooltip=i.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class so extends oo{constructor(e,t,i,n,o,s){super(e,t,o),this.fireButtonTriggered=i,this._onChecked=n,this.item=o,this._separator=s,this._checked=!1,this.onChecked=t?te.Jh.map(te.Jh.filter(this._onChecked.event,(e=>e.element===this)),(e=>e.checked)):te.Jh.None,this._saneDetail=o.detail,this._labelHighlights=o.highlights?.label,this._descriptionHighlights=o.highlights?.description,this._detailHighlights=o.highlights?.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var ro;(function(e){e[e["NONE"]=0]="NONE",e[e["MOUSE_HOVER"]=1]="MOUSE_HOVER",e[e["ACTIVE_ITEM"]=2]="ACTIVE_ITEM"})(ro||(ro={}));class ao extends oo{constructor(e,t,i){super(e,!1,i),this.fireSeparatorButtonTriggered=t,this.separator=i,this.children=new Array,this.focusInsideSeparator=ro.NONE}}class lo{getHeight(e){return e instanceof ao?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof so?ho.ID:go.ID}}class co{getWidgetAriaLabel(){return(0,w.kg)("quickInput","Quick Input")}getAriaLabel(e){return e.separator?.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox&&e instanceof so)return{get value(){return e.checked},onDidChange:t=>e.onChecked((()=>t()))}}}class uo{constructor(e){this.hoverDelegate=e}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=new l.Cm,t.toDisposeTemplate=new l.Cm,t.entry=z.BC(e,no(".quick-input-list-entry"));const i=z.BC(t.entry,no("label.quick-input-list-label"));t.toDisposeTemplate.add(z.b2(i,z.Bx.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=z.BC(i,no("input.quick-input-list-checkbox")),t.checkbox.type="checkbox";const n=z.BC(i,no(".quick-input-list-rows")),o=z.BC(n,no(".quick-input-list-row")),s=z.BC(n,no(".quick-input-list-row"));t.label=new Un.s(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=z.Hs(t.label.element,no(".quick-input-list-icon"));const r=z.BC(o,no(".quick-input-list-entry-keybinding"));t.keybinding=new $n.x(r,qe.OS),t.toDisposeTemplate.add(t.keybinding);const a=z.BC(s,no(".quick-input-list-label-meta"));return t.detail=new Un.s(a,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=z.BC(t.entry,no(".quick-input-list-separator")),t.actionBar=new fi.E(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.actionBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,i){i.toDisposeElement.clear(),i.actionBar.clear()}}let ho=class extends uo{static{Xn=this}static{this.ID="quickpickitem"}constructor(e,t){super(e),this.themeService=t,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return Xn.ID}renderTemplate(e){const t=super.renderTemplate(e);return t.toDisposeTemplate.add(z.b2(t.checkbox,z.Bx.CHANGE,(e=>{t.element.checked=t.checkbox.checked}))),t}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0;const o=n.item;i.checkbox.checked=n.checked,i.toDisposeElement.add(n.onChecked((e=>i.checkbox.checked=e))),i.checkbox.disabled=n.checkboxDisabled;const{labelHighlights:s,descriptionHighlights:r,detailHighlights:a}=n;if(o.iconPath){const e=(0,qn.HD)(this.themeService.getColorTheme().type)?o.iconPath.dark:o.iconPath.light??o.iconPath.dark,t=d.r.revive(e);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=z.Tf(t)}else i.icon.style.backgroundImage="",i.icon.className=o.iconClass?`quick-input-list-icon ${o.iconClass}`:"";let l;!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:n.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const c={matches:s||[],descriptionTitle:l,descriptionMatches:r||[],labelEscapeNewLines:!0};if(c.extraClasses=o.iconClasses,c.italic=o.italic,c.strikethrough=o.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),i.keybinding.set(o.keybinding),n.saneDetail){let e;n.saneTooltip||(e={markdown:{value:n.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:a,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";n.separator?.label?(i.separator.textContent=n.separator.label,i.separator.style.display="",this.addItemWithSeparator(n)):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!n.separator);const u=o.buttons;u&&u.length?(i.actionBar.push(u.map(((e,t)=>fn(e,`id-${t}`,(()=>n.fireButtonTriggered({button:e,item:n.item}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,i)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}};ho=Xn=to([io(1,ne.Gy)],ho);class go extends uo{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}static{this.ID="quickpickseparator"}get templateId(){return go.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderTemplate(e){const t=super.renderTemplate(e);return t.checkbox.style.display="none",t}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0,n.element.classList.toggle("focus-inside",!!n.focusInsideSeparator);const o=n.separator,{labelHighlights:s,descriptionHighlights:r,detailHighlights:a}=n;let l;i.icon.style.backgroundImage="",i.icon.className="",!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:n.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const c={matches:s||[],descriptionTitle:l,descriptionMatches:r||[],labelEscapeNewLines:!0};if(i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),n.saneDetail){let e;n.saneTooltip||(e={markdown:{value:n.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:a,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";i.separator.style.display="none",i.entry.classList.add("quick-input-list-separator-border");const d=o.buttons;d&&d.length?(i.actionBar.push(d.map(((e,t)=>fn(e,`id-${t}`,(()=>n.fireSeparatorButtonTriggered({button:e,separator:n.separator}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions"),this.addSeparator(n)}disposeElement(e,t,i){this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||e.element.element?.classList.remove("focus-inside"),super.disposeElement(e,t,i)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}}let po=class extends l.jG{constructor(e,t,i,n,o,s){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=i,this.accessibilityService=s,this._onKeyDown=new te.vl,this._onLeave=new te.vl,this.onLeave=this._onLeave.event,this._visibleCountObservable=(0,eo.FY)("VisibleCount",0),this.onChangedVisibleCount=te.Jh.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=(0,eo.FY)("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=te.Jh.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=(0,eo.FY)("CheckedCount",0),this.onChangedCheckedCount=te.Jh.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=(0,eo.Zh)({equalsFn:y.aI},new Array),this.onChangedCheckedElements=te.Jh.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new te.vl,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new te.vl,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new te.vl,this._elementCheckedEventBufferer=new te.at,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new l.Cm),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=z.BC(this.parent,no(".quick-input-list")),this._separatorRenderer=new go(t),this._itemRenderer=o.createInstance(ho,t),this._tree=this._register(o.createInstance(zn.zL,"QuickInput",this._container,new lo,[this._itemRenderer,this._separatorRenderer],{filter:{filter(e){return e.hidden?0:e instanceof ao?2:1}},sorter:{compare:(e,t)=>{if(!this.sortByLabel||!this._lastQueryString)return 0;const i=this._lastQueryString.toLowerCase();return _o(e,t,i)}},accessibilityProvider:new co,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:Jn.KP.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=n,this._registerListeners()}get onDidChangeFocus(){return te.Jh.map(this._tree.onDidChangeFocus,(e=>e.elements.filter((e=>e instanceof so)).map((e=>e.item))),this._store)}get onDidChangeSelection(){return te.Jh.map(this._tree.onDidChangeSelection,(e=>({items:e.elements.filter((e=>e instanceof so)).map((e=>e.item)),event:e.browserEvent})),this._store)}get displayed(){return"none"!==this._container.style.display}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown((e=>{const t=new it.Z(e);switch(t.keyCode){case 10:this.toggleCheckbox();break}this._onKeyDown.fire(t)})))}_registerOnContainerClick(){this._register(z.ko(this._container,z.Bx.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()})))}_registerOnMouseMiddleClick(){this._register(z.ko(this._container,z.Bx.AUXCLICK,(e=>{1===e.button&&this._onLeave.fire()})))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel((()=>{const e=this._itemElements.filter((e=>!e.hidden)).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()})))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,((e,t)=>t))((e=>this._updateCheckedObservables())))}_registerOnContextMenu(){this._register(this._tree.onContextMenu((e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))})))}_registerHoverListeners(){const e=this._register(new f.Th(this.hoverDelegate.delay));this._register(this._tree.onMouseOver((async t=>{if(z.nY(t.browserEvent.target))e.cancel();else if(z.nY(t.browserEvent.relatedTarget)||!z.QX(t.browserEvent.relatedTarget,t.element?.element))try{await e.trigger((async()=>{t.element instanceof so&&this.showHover(t.element)}))}catch(t){if(!(0,v.MB)(t))throw t}}))),this._register(this._tree.onMouseOut((t=>{z.QX(t.browserEvent.relatedTarget,t.element?.element)||e.cancel()})))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus((e=>{const t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const e of this._separatorRenderer.visibleSeparators){const i=e===t,n=!!(e.focusInsideSeparator&ro.ACTIVE_ITEM);n!==i&&(i?e.focusInsideSeparator|=ro.ACTIVE_ITEM:e.focusInsideSeparator&=~ro.ACTIVE_ITEM,this._tree.rerender(e))}}))),this._register(this._tree.onMouseOver((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const e of this._separatorRenderer.visibleSeparators){if(e!==t)continue;const i=!!(e.focusInsideSeparator&ro.MOUSE_HOVER);i||(e.focusInsideSeparator|=ro.MOUSE_HOVER,this._tree.rerender(e))}}))),this._register(this._tree.onMouseOut((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const e of this._separatorRenderer.visibleSeparators){if(e!==t)continue;const i=!!(e.focusInsideSeparator&ro.MOUSE_HOVER);i&&(e.focusInsideSeparator&=~ro.MOUSE_HOVER,this._tree.rerender(e))}})))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection((e=>{const t=e.elements.filter((e=>e instanceof so));t.length!==e.elements.length&&(1===e.elements.length&&e.elements[0]instanceof ao&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))})))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents((()=>{this._itemElements.forEach((t=>{t.hidden||t.checkboxDisabled||(t.checked=e)}))}))}setElements(e){let t;this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes"),this._itemElements=new Array,this._elementTree=e.reduce(((i,n,o)=>{let s;if("separator"===n.type){if(!n.buttons)return i;t=new ao(o,(e=>this._onSeparatorButtonTriggered.fire(e)),n),s=t}else{const r=o>0?e[o-1]:void 0;let a;r&&"separator"===r.type&&!r.buttons&&(t=void 0,a=r);const l=new so(o,this._hasCheckboxes,(e=>this._onButtonTriggered.fire(e)),this._elementChecked,n,a);if(this._itemElements.push(l),t)return t.children.push(l),i;s=l}return i.push(s),i}),new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout((()=>{const e=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),t=e?.parentNode;if(e&&t){const i=e.nextSibling;e.remove(),t.insertBefore(e,i)}}),0)}setFocusedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e)).filter((e=>!e.hidden));if(this._tree.setFocus(t),e.length>0){const e=this._tree.getFocus()[0];e&&this._tree.reveal(e)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e));this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents((()=>{const t=new Set;for(const i of e)t.add(i);for(const e of this._itemElements)e.checked=t.has(e.item)}))}focus(e){if(this._itemElements.length)switch(e===Xi.Fp.Second&&this._itemElements.length<2&&(e=Xi.Fp.First),e){case Xi.Fp.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,(e=>e.element instanceof so));break;case Xi.Fp.Second:{this._tree.scrollTop=0;let e=!1;this._tree.focusFirst(void 0,(t=>t.element instanceof so&&(!!e||(e=!e,!1))));break}case Xi.Fp.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,(e=>e.element instanceof so));break;case Xi.Fp.Next:{const e=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,(e=>e.element instanceof so&&(this._tree.reveal(e.element),!0)));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case Xi.Fp.Previous:{const e=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,(e=>{if(!(e.element instanceof so))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[0]&&this._onLeave.fire();break}case Xi.Fp.NextPage:this._tree.focusNextPage(void 0,(e=>e.element instanceof so&&(this._tree.reveal(e.element),!0)));break;case Xi.Fp.PreviousPage:this._tree.focusPreviousPage(void 0,(e=>{if(!(e.element instanceof so))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));break;case Xi.Fp.NextSeparator:{let e=!1;const t=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,(t=>{if(e)return!0;if(t.element instanceof ao)e=!0,this._separatorRenderer.isSeparatorVisible(t.element)?this._tree.reveal(t.element.children[0]):this._tree.reveal(t.element,0);else if(t.element instanceof so){if(t.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(t.element)?this._tree.reveal(t.element):this._tree.reveal(t.element,0),!0;if(t.element===this._elementTree[0])return this._tree.reveal(t.element,0),!0}return!1}));const i=this._tree.getFocus()[0];t===i&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,(e=>e.element instanceof so)));break}case Xi.Fp.PreviousSeparator:{let e,t=!!this._tree.getFocus()[0]?.separator;this._tree.focusPrevious(void 0,!0,void 0,(i=>{if(i.element instanceof ao)t?e||(this._separatorRenderer.isSeparatorVisible(i.element)?this._tree.reveal(i.element):this._tree.reveal(i.element,0),e=i.element.children[0]):t=!0;else if(i.element instanceof so&&!e)if(i.element.separator)this._itemRenderer.isItemWithSeparatorVisible(i.element)?this._tree.reveal(i.element):this._tree.reveal(i.element,0),e=i.element;else if(i.element===this._elementTree[0])return this._tree.reveal(i.element,0),!0;return!1})),e&&this._tree.setFocus([e]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const t=e;if(e=e.trim(),e&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this._itemElements.forEach((n=>{let o;o="fuzzy"===this.matchOnLabelMode?this.matchOnLabel?(0,wi.pz)(e,(0,wi._k)(n.saneLabel))??void 0:void 0:this.matchOnLabel?fo(t,(0,wi._k)(n.saneLabel))??void 0:void 0;const s=this.matchOnDescription?(0,wi.pz)(e,(0,wi._k)(n.saneDescription||""))??void 0:void 0,r=this.matchOnDetail?(0,wi.pz)(e,(0,wi._k)(n.saneDetail||""))??void 0:void 0;if(o||s||r?(n.labelHighlights=o,n.descriptionHighlights=s,n.detailHighlights=r,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this._inputElements[n.index-1]||void 0;"separator"!==e?.type||e.buttons||(i=e),i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this._itemElements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this._inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents((()=>{const e=this._tree.getFocus().filter((e=>e instanceof so)),t=this._allVisibleChecked(e);for(const i of e)i.checkboxDisabled||(i.checked=!t)}))}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!e?.saneTooltip||!(e instanceof so))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();this.showHover(e);const t=new l.Cm;t.add(this._tree.onDidChangeFocus((e=>{e.elements[0]instanceof so&&this.showHover(e.elements[0])}))),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){const t=new Array;for(const i of e)i instanceof ao?t.push({element:i,collapsible:!1,collapsed:!1,children:i.children.map((e=>({element:e,collapsible:!1,collapsed:!1})))}):t.push({element:i,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);const t=this._itemElements.filter((e=>e.checked)).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)}))}showHover(e){this._lastHover&&!this._lastHover.isDisposed&&(this.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),e.element&&e.saneTooltip&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:e=>{this.linkOpenerDelegate(e)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};function fo(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return mo(e,i);const o=(0,c.NB)(i," "),s=i.length-o.length,r=mo(e,o);if(r)for(const e of r){const t=n[e.start+s]+s;e.start+=t,e.end+=t}return r}function mo(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}function _o(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:Yn(e.saneSortLabel,t.saneSortLabel,i)}to([an.B],po.prototype,"onDidChangeFocus",null),to([an.B],po.prototype,"onDidChangeSelection",null),po=to([io(4,he._Y),io(5,Ke.j)],po);var vo=i(5045);const bo={weight:200,when:ae.M$.and(ae.M$.equals(Cn,"quickPick"),wn),metadata:{description:(0,w.kg)("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function yo(e,t={}){Gt.f.registerCommandAndKeybindingRule({...bo,...e,secondary:Co(e.primary,e.secondary??[],t)})}const wo=qe.zx?256:2048;function Co(e,t,i={}){return i.withAltMod&&t.push(512+e),i.withCtrlMod&&(t.push(wo+e),i.withAltMod&&t.push(512+wo+e)),i.withCmdMod&&qe.zx&&(t.push(2048+e),i.withCtrlMod&&t.push(2304+e),i.withAltMod&&(t.push(2560+e),i.withCtrlMod&&t.push(2816+e))),t}function So(e,t){return i=>{const n=i.get(Xi.GK).currentQuickInput;if(n)return t&&n.quickNavigate?n.focus(t):n.focus(e)}}yo({id:"quickInput.pageNext",primary:12,handler:So(Xi.Fp.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),yo({id:"quickInput.pagePrevious",primary:11,handler:So(Xi.Fp.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),yo({id:"quickInput.first",primary:wo+14,handler:So(Xi.Fp.First)},{withAltMod:!0,withCmdMod:!0}),yo({id:"quickInput.last",primary:wo+13,handler:So(Xi.Fp.Last)},{withAltMod:!0,withCmdMod:!0}),yo({id:"quickInput.next",primary:18,handler:So(Xi.Fp.Next)},{withCtrlMod:!0}),yo({id:"quickInput.previous",primary:16,handler:So(Xi.Fp.Previous)},{withCtrlMod:!0});const ko=(0,w.kg)("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),xo=(0,w.kg)("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");qe.zx?(yo({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:So(Xi.Fp.NextSeparator,Xi.Fp.Next),metadata:{description:ko}}),yo({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:So(Xi.Fp.NextSeparator)},{withCtrlMod:!0}),yo({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:So(Xi.Fp.PreviousSeparator,Xi.Fp.Previous),metadata:{description:xo}}),yo({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:So(Xi.Fp.PreviousSeparator)},{withCtrlMod:!0})):(yo({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:So(Xi.Fp.NextSeparator,Xi.Fp.Next),metadata:{description:ko}}),yo({id:"quickInput.nextSeparator",primary:2578,handler:So(Xi.Fp.NextSeparator)}),yo({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:So(Xi.Fp.PreviousSeparator,Xi.Fp.Previous),metadata:{description:xo}}),yo({id:"quickInput.previousSeparator",primary:2576,handler:So(Xi.Fp.PreviousSeparator)})),yo({id:"quickInput.acceptInBackground",when:ae.M$.and(bo.when,ae.M$.or(vo.J7.negate(),En)),primary:17,weight:250,handler:e=>{const t=e.get(Xi.GK).currentQuickInput;t?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});var Eo,Lo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},To=function(e,t){return function(i,n){t(i,n,e)}};const Io=z.$;let Do=class extends l.jG{static{Eo=this}static{this.MAX_WIDTH=600}get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,i,n){super(),this.options=e,this.layoutService=t,this.instantiationService=i,this.contextKeyService=n,this.enabled=!0,this.onDidAcceptEmitter=this._register(new te.vl),this.onDidCustomEmitter=this._register(new te.vl),this.onDidTriggerButtonEmitter=this._register(new te.vl),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new te.vl),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new te.vl),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=yn.bindTo(this.contextKeyService),this.quickInputTypeContext=Sn.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=xn.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(te.Jh.runAndSubscribe(z.Iv,(({window:e,disposables:t})=>this.registerKeyModsListeners(e,t)),{window:a.G,disposables:this._store})),this._register(z.q3((e=>{this.ui&&z.zk(this.ui.container)===e&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})))}registerKeyModsListeners(e,t){const i=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};for(const n of[z.Bx.KEY_DOWN,z.Bx.KEY_UP,z.Bx.MOUSE_DOWN])t.add(z.ko(e,n,i,!0))}getUI(e){if(this.ui)return e&&z.zk(this._container)!==z.zk(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const t=z.BC(this._container,Io(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=z.li(t),n=z.BC(t,Io(".quick-input-titlebar")),o=this._register(new fi.E(n,{hoverDelegate:this.options.hoverDelegate}));o.domNode.classList.add("quick-input-left-action-bar");const s=z.BC(n,Io(".quick-input-title")),r=this._register(new fi.E(n,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-right-action-bar");const a=z.BC(t,Io(".quick-input-header")),l=z.BC(a,Io("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",(0,w.kg)("quickInput.checkAll","Toggle all checkboxes")),this._register(z.b2(l,z.Bx.CHANGE,(e=>{const t=l.checked;T.setAllVisibleChecked(t)}))),this._register(z.ko(l,z.Bx.CLICK,(e=>{(e.x||e.y)&&h.setFocus()})));const c=z.BC(a,Io(".quick-input-description")),d=z.BC(a,Io(".quick-input-and-message")),u=z.BC(d,Io(".quick-input-filter")),h=this._register(new jn(u,this.styles.inputBox,this.styles.toggle));h.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=z.BC(u,Io(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new An.x(g,{countFormat:(0,w.kg)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),f=z.BC(u,Io(".quick-input-count"));f.setAttribute("aria-live","polite");const m=new An.x(f,{countFormat:(0,w.kg)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),_=this._register(new fi.E(a,{hoverDelegate:this.options.hoverDelegate}));_.domNode.classList.add("quick-input-inline-action-bar");const v=z.BC(a,Io(".quick-input-action")),b=this._register(new Nn.$(v,this.styles.button));b.label=(0,w.kg)("ok","OK"),this._register(b.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const y=z.BC(a,Io(".quick-input-action")),C=this._register(new Nn.$(y,{...this.styles.button,supportIcons:!0}));C.label=(0,w.kg)("custom","Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const S=z.BC(d,Io(`#${this.idPrefix}message.quick-input-message`)),k=this._register(new Wn(t,this.styles.progressBar));k.getContainer().classList.add("quick-input-progress");const x=z.BC(t,Io(".quick-input-html-widget"));x.tabIndex=-1;const E=z.BC(t,Io(".quick-input-description")),L=this.idPrefix+"list",T=this._register(this.instantiationService.createInstance(po,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,L));h.setAttribute("aria-controls",L),this._register(T.onDidChangeFocus((()=>{h.setAttribute("aria-activedescendant",T.getActiveDescendant()??"")}))),this._register(T.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(T.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(T.onChangedCheckedCount((e=>{m.setCount(e)}))),this._register(T.onLeave((()=>{setTimeout((()=>{this.controller&&(h.setFocus(),this.controller instanceof In&&this.controller.canSelectMany&&T.clearFocus())}),0)})));const I=z.w5(t);return this._register(I),this._register(z.ko(t,z.Bx.FOCUS,(e=>{const t=this.getUI();if(z.QX(e.relatedTarget,t.inputContainer)){const e=t.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==e&&this.endOfQuickInputBoxContext.set(e)}z.QX(e.relatedTarget,t.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=z.sb(e.relatedTarget)?e.relatedTarget:void 0)}),!0)),this._register(I.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Xi.kF.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0}))),this._register(h.onKeyDown((e=>{const t=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==t&&this.endOfQuickInputBoxContext.set(t)}))),this._register(z.ko(t,z.Bx.FOCUS,(e=>{h.setFocus()}))),this._register(z.b2(t,z.Bx.KEY_DOWN,(e=>{if(!z.QX(e.target,x))switch(e.keyCode){case 3:z.fs.stop(e,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:z.fs.stop(e,!0),this.hide(Xi.kF.Gesture);break;case 2:if(!e.altKey&&!e.ctrlKey&&!e.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.displayed&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(z.QX(e.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=t.querySelectorAll(i.join(", "));e.shiftKey&&e.target===n[0]?(z.fs.stop(e,!0),T.clearFocus()):!e.shiftKey&&z.QX(e.target,n[n.length-1])&&(z.fs.stop(e,!0),n[0].focus())}break;case 10:e.ctrlKey&&(z.fs.stop(e,!0),this.getUI().list.toggleHover());break}}))),this.ui={container:t,styleSheet:i,leftActionBar:o,titleBar:n,title:s,description1:E,description2:c,widget:x,rightActionBar:r,inlineActionBar:_,checkAll:l,inputContainer:d,filterContainer:u,inputBox:h,visibleCountContainer:g,visibleCount:p,countContainer:f,count:m,okContainer:v,ok:b,message:S,customButtonContainer:y,customButton:C,list:T,progressBar:k,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,z.BC(this._container,this.ui.container))}pick(e,t={},i=gt.XO.None){return new Promise(((n,o)=>{let s=e=>{s=n,t.onKeyMods?.(r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick({useSeparators:!0});let a;const c=[r,r.onDidAccept((()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...e,removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),o=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=o}}}))),r.onDidTriggerSeparatorButton((e=>t.onDidTriggerSeparatorButton?.(e))),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{(0,l.AS)(c),s(void 0)}))];r.title=t.title,t.value&&(r.value=t.value),r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{o(e),r.hide()}))}))}createQuickPick(e={useSeparators:!1}){const t=this.getUI(!0);return new In(t)}createInputBox(){const e=this.getUI(!0);return new Dn(e)}show(e){const t=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,i?.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",z.Ln(t.widget),t.rightActionBar.clear(),t.inlineActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(ve.A.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),z.Ln(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();Ln.tooltip=n?(0,w.kg)("quickInput.backWithKeybinding","Back ({0})",n):(0,w.kg)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&"none"!==this.ui.container.style.display}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){const t=this.controller;if(!t)return;t.willHide(e);const i=this.ui?.container,n=i&&!z.nR(i);if(this.controller=null,this.onHideEmitter.fire(),i&&(i.style.display="none"),!n){let e=this.previousFocusElement;while(e&&!e.offsetParent)e=e.parentElement??void 0;e?.offsetParent?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}t.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,Eo.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=i??"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.list.style(this.styles.list);const s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const r=s.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}};Do=Eo=Lo([To(1,ge),To(2,he._Y),To(3,ae.fN)],Do);var Ro=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},No=function(e,t){return function(i,n){t(i,n,e)}};let Ao=class extends ne.lR{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(tn))),this._quickAccess}constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=o,this._onShow=this._register(new te.vl),this._onHide=this._register(new te.vl),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{const i=t.get(ze.C);i.open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(Rn))},n=this._register(this.instantiationService.createInstance(Do,{...i,...t}));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer((t=>{(0,z.zk)(e.activeContainer)===(0,z.zk)(n.container)&&n.layout(t,e.activeContainerOffset.quickPickTop)}))),this._register(e.onDidChangeActiveContainer((()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)}))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new ae.N1(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t,i=gt.XO.None){return this.controller.pick(e,t,i)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,Me.GuP)(Me.ELA),quickInputForeground:(0,Me.GuP)(Me.HJZ),quickInputTitleBackground:(0,Me.GuP)(Me.er1),widgetBorder:(0,Me.GuP)(Me.DSL),widgetShadow:(0,Me.GuP)(Me.f9l)},inputBox:Ai.ho,toggle:Ai.mk,countBadge:Ai.m$,button:Ai.cv,progressBar:Ai.oJ,keybindingLabel:Ai.ir,list:(0,Ai.t8)({listBackground:Me.ELA,listFocusBackground:Me.AlL,listFocusForeground:Me.nH,listInactiveFocusForeground:Me.nH,listInactiveSelectionIconForeground:Me.c7i,listInactiveFocusBackground:Me.AlL,listFocusOutline:Me.buw,listInactiveFocusOutline:Me.buw}),pickerGroup:{pickerGroupBorder:(0,Me.GuP)(Me.iwL),pickerGroupForeground:(0,Me.GuP)(Me.NBf)}}}};Ao=Ro([No(0,he._Y),No(1,ae.fN),No(2,ne.Gy),No(3,ge),No(4,He.pG)],Ao);var Oo=i(90702),Po=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Mo=function(e,t){return function(i,n){t(i,n,e)}};let Fo=class extends Ao{constructor(e,t,i,n,o,s){super(t,i,n,new _e(e.getContainerDomNode(),o),s),this.host=void 0;const r=Wo.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get mainContainer(){return t.getDomNode()},getContainer(){return t.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[t.getDomNode()]},get activeContainer(){return t.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return te.Jh.map(e.onDidLayoutChange,(e=>({container:t.getDomNode(),dimension:e})))},get onDidChangeActiveContainer(){return te.Jh.None},get onDidAddContainer(){return te.Jh.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};Fo=Po([Mo(1,he._Y),Mo(2,ae.fN),Mo(3,ne.Gy),Mo(4,g.T),Mo(5,He.pG)],Fo);let Bo=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(Fo,e);this.mapEditorToService.set(e,t),(0,Oo.P)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,i=gt.XO.None){return this.activeService.pick(e,t,i)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}};Bo=Po([Mo(0,he._Y),Mo(1,g.T)],Bo);class Wo{static{this.ID="editor.controller.quickInput"}static get(e){return e.getContribution(Wo.ID)}constructor(e){this.editor=e,this.widget=new Ho(this.editor)}dispose(){this.widget.dispose()}}class Ho{static{this.ID="editor.contrib.quickInputWidget"}constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Ho.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}(0,h.HW)(Wo.ID,Wo,4);var Vo=i(40611),jo=i(55643),zo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Uo=function(e,t){return function(i,n){t(i,n,e)}};let $o=class extends l.jG{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new te.vl,this._onDidChangeReducedMotion=new te.vl,this._onDidChangeLinkUnderline=new te.vl,this._accessibilityModeEnabledContext=Ke.f.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const o=a.G.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(o),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register((0,z.ko)(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",e),this._layoutService.mainContainer.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration("accessibility.underlineLinks")){const e=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=e,this._onDidChangeLinkUnderline.fire()}})));const e=()=>{const e=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",e)};e(),this._register(this.onDidChangeLinkUnderlines((()=>e())))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};$o=zo([Uo(0,ae.fN),Uo(1,ge),Uo(2,He.pG)],$o);var qo,Ko=i(17219),Go=i(65647),Qo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Yo=function(e,t){return function(i,n){t(i,n,e)}};const Zo="application/vnd.code.resources";let Xo=class extends l.jG{static{qo=this}constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(gi.nr||gi.c8)&&this.installWebKitWriteTextWorkaround(),this._register(te.Jh.runAndSubscribe(z.Iv,(({window:e,disposables:t})=>{t.add((0,z.ko)(e.document,"copy",(()=>this.clearResourcesState())))}),{window:a.G,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const e=new f.Zv;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,(0,z.fz)().navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((async t=>{t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))};this._register(te.Jh.runAndSubscribe(this.layoutService.onDidAddContainer,(({container:t,disposables:i})=>{i.add((0,z.ko)(t,"click",e)),i.add((0,z.ko)(t,"keydown",e))}),{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.clearResourcesState(),t)this.mapTextToType.set(t,e);else{if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await(0,z.fz)().navigator.clipboard.writeText(e)}catch(e){console.error(e)}this.fallbackWriteText(e)}}fallbackWriteText(e){const t=(0,z.a)(),i=t.activeElement,n=t.body.appendChild((0,z.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),t.execCommand("copy"),(0,z.sb)(i)&&i.focus(),n.remove()}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await(0,z.fz)().navigator.clipboard.readText()}catch(e){console.error(e)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}static{this.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3}async readResources(){try{const e=await(0,z.fz)().navigator.clipboard.read();for(const t of e)if(t.types.includes(`web ${Zo}`)){const e=await t.getType(`web ${Zo}`),i=JSON.parse(await e.text()).map((e=>d.r.from(e)));return i}}catch(e){}const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(0===this.resources.length)return;const e=await this.readText();return(0,Go.tW)(e.substring(0,qo.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}};Xo=qo=Qo([Yo(0,ge),Yo(1,F.rr)],Xo);var Jo=i(28753),es=i(5837),ts=i(71268),is=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ns=function(e,t){return function(i,n){t(i,n,e)}};const os="data-keybinding-context";class ss{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value["_contextId"]=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return"undefined"===typeof t&&this._parent?this._parent.getValue(e):t}}class rs extends ss{static{this.INSTANCE=new rs}constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}class as extends ss{static{this._keyPrefix="config."}constructor(e,t,i){super(e,null),this._configurationService=t,this._values=ts.cB.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new ds(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...es.f.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new ds(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(as._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(as._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}class ls{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){"undefined"===typeof this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class cs{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class ds{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class us{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}function hs(e,t){return e.allKeysContainedIn(new Set(Object.keys(t)))}class gs extends l.jG{constructor(e){super(),this._onDidChangeContext=this._register(new te.fV({merge:e=>new us(e)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new ls(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new fs(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId),i=!e||e.evaluate(t);return i}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new cs(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new cs(e))}getContext(e){return this._isDisposed?rs.INSTANCE:this.getContextValuesContainer(ms(e))}dispose(){super.dispose(),this._isDisposed=!0}}let ps=class extends gs{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new as(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?rs.INSTANCE:this._contexts.get(e)||rs.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new ss(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};ps=is([ns(0,He.pG)],ps);class fs extends gs{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new l.HE),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(os)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(os,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{const t=this._parent.getContextValuesContainer(this._myContextId),i=t.value;hs(e,i)||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(os),super.dispose())}getContextValuesContainer(e){return this._isDisposed?rs.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function ms(e){while(e){if(e.hasAttribute(os)){const t=e.getAttribute(os);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}function _s(e,t,i){const n=e.get(ae.fN);n.createKey(String(t),vs(i))}function vs(e){return(0,p.PI)(e,(e=>"object"===typeof e&&1===e.$mid?d.r.revive(e).toString():e instanceof d.r?e.toString():void 0))}Tt.w.registerCommand("_setContext",_s),Tt.w.registerCommand({id:"getContextKeyInfo",handler(){return[...ae.N1.all()].sort(((e,t)=>e.key.localeCompare(t.key)))},metadata:{description:(0,w.kg)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),Tt.w.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of ae.N1.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var bs=i(4629);class ys{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class ws{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new ys(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}var Cs=i(48836);const Ss=!1;class ks extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class xs{constructor(e=new Cs.a,t=!1,i,n=Ss){this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(he._Y,this),this._globalGraph=n?i?._globalGraph??new ws((e=>e)):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,(0,l.AS)(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)(0,l.Xm)(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const i=this,n=new class extends xs{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),t?.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();const i=Es.traceInvocation(this._enableTracing,e);let n=!1;try{const o={get:e=>{if(n)throw(0,v.iH)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}};return e(o,...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return this._throwIfDisposed(),e instanceof bs.d?(i=Es.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Es.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=he._$.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){const n=this._getOrCreateServiceInstance(t.id,i);n||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`,!1),o.push(n)}const s=n.length>0?n[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);const i=s-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,s)}return Reflect.construct(e,t.concat(o))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof bs.d)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setCreatedServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof bs.d?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new ws((e=>e.id.toString()));let o=0;const s=[{id:e,desc:t,_trace:i}],r=new Set;while(s.length){const t=s.pop();if(!r.has(String(t.id))){if(r.add(String(t.id)),n.lookupOrInsertNode(t),o++>1e3)throw new ks(n);for(const i of he._$.getServiceDependencies(t.desc.ctor)){const o=this._getServiceInstanceOrDescriptor(i.id);if(o||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(t.id),String(i.id)),o instanceof bs.d){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),s.push(e)}}}}while(1){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new ks(n);break}for(const{data:t}of e){const e=this._getServiceInstanceOrDescriptor(t.id);if(e instanceof bs.d){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setCreatedServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof bs.d)return this._createServiceInstance(e,t,i,n,o,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,o,s){if(n){const n=new xs(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const r=new Map,a=new f.F6((()=>{const e=n._createInstance(t,i,o);for(const[t,i]of r){const n=e[t];if("function"===typeof n)for(const t of i)t.disposable=n.apply(e,t.listener)}return r.clear(),s.add(e),e}));return new Proxy(Object.create(null),{get(e,t){if(!a.isInitialized&&"string"===typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=r.get(t);e||(e=new ie.w,r.set(t,e));const i=(i,n,o)=>{if(a.isInitialized)return a.value[t](i,n,o);{const t={listener:[i,n,o],disposable:void 0},s=e.push(t),r=(0,l.s)((()=>{s(),t.disposable?.dispose()}));return r}};return i}if(t in e)return e[t];const i=a.value;let n=i[t];return"function"!==typeof n||(n=n.bind(i),e[t]=n),n},set(e,t,i){return a.value[t]=i,!0},getPrototypeOf(e){return t.prototype}})}{const e=this._createInstance(t,i,o);return s.add(e),e}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Es{static{this.all=new Set}static{this._None=new class extends Es{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,t){return e?new Es(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Es._None}static traceCreation(e,t){return e?new Es(1,t.name):Es._None}static{this._totals=0}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Es(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Es._totals+=e;let t=!1;function i(e,n){const o=[],s=new Array(e+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);const n=i(e+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}const n=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Es._totals.toFixed(2)}ms)`];(e>2||t)&&Es.all.add(n.join("\n"))}}var Ls=i(45658);const Ts=new Set([b.ny.inMemory,b.ny.vscodeSourceControl,b.ny.walkThrough,b.ny.walkThroughSnippet,b.ny.vscodeChatCodeBlock]);class Is{constructor(){this._byResource=new It.fT,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new It.fT,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){const i=this._byResource.get(e);return i?.get(t)}delete(e,t){let i=!1,n=!1;const o=this._byResource.get(e);o&&(i=o.delete(t));const s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){return"string"===typeof e?this._byOwner.get(e)?.values()??es.f.empty():d.r.isUri(e)?this._byResource.get(e)?.values()??es.f.empty():es.f.map(es.f.concat(...this._byOwner.values()),(e=>e[1]))}}class Ds{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new It.fT,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Ts.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Ls.cj.Error?t.errors+=1:i===Ls.cj.Warning?t.warnings+=1:i===Ls.cj.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class Rs{constructor(){this._onMarkerChanged=new te.uI({delay:0,merge:Rs._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Is,this._stats=new Ds(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,y.Ct)(i)){const i=this._data.delete(t,e);i&&this._onMarkerChanged.fire([t])}else{const n=[];for(const o of i){const i=Rs._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:u,tags:h}=i;if(s)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,d=d>0?d:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:u,tags:h}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const t of n){const n=es.f.first(t);n&&(i.push(n.resource),this._data.delete(n.resource,e))}if((0,y.EI)(t)){const n=new It.fT;for(const{resource:o,marker:s}of t){const t=Rs._toMarker(e,o,s);if(!t)continue;const r=n.get(o);r?r.push(t):(n.set(o,[t]),i.push(o))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(Rs._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(i??t),s=[];for(const t of e)for(const e of t)if(Rs._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(const t of this._data.values())for(const i of t)if(Rs._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new It.fT;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}var Ns=i(94216);class As extends l.jG{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=At.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=At.createEmptyModel(this.logService);const e=Rt.O.as(Dt.Fd.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],o=t[n];void 0!==e?this._configurationModel.setValue(n,e):o?this._configurationModel.setValue(n,o.default):this._configurationModel.removeValue(n)}}}var Os=i(4380);class Ps extends l.jG{constructor(e,t=[]){super(),this.logger=new F.Dk([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}var Ms=i(36285),Fs=i(31554),Bs=i(15863);class Ws{getParseResult(e){}}var Hs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Vs=function(e,t){return function(i,n){t(i,n,e)}};class js{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new te.vl}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let zs=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new l.BO(new js(t))):Promise.reject(new Error("Model not found"))}};zs=Hs([Vs(0,P.IModelService)],zs);class Us{static{this.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}}}show(){return Us.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}}class $s{withProgress(e,t,i){return t({report:()=>{}})}}class qs{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class Ks{async confirm(e){const t=this.doConfirm(e.message,e.detail);return{confirmed:t,checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),a.G.confirm(i)}async prompt(e){let t;const i=this.doConfirm(e.message,e.detail);if(i){const i=[...e.buttons??[]];e.cancelButton&&"string"!==typeof e.cancelButton&&"boolean"!==typeof e.cancelButton&&i.push(e.cancelButton),t=await(i[0]?.run({checkboxChecked:!1}))}return{result:t}}async error(e,t){await this.prompt({type:ve.A.Error,message:e,detail:t})}}class Gs{static{this.NO_OP=new ye.Kz}info(e){return this.notify({severity:ve.A.Info,message:e})}warn(e){return this.notify({severity:ve.A.Warning,message:e})}error(e){return this.notify({severity:ve.A.Error,message:e})}notify(e){switch(e.severity){case ve.A.Error:console.error(e.message);break;case ve.A.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Gs.NO_OP}prompt(e,t,i,n){return Gs.NO_OP}status(e,t){return l.jG.None}}let Qs=class{constructor(e){this._onWillExecuteCommand=new te.vl,this._onDidExecuteCommand=new te.vl,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Tt.w.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}};Qs=Hs([Vs(0,he._Y)],Qs);let Ys=class extends qt{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new l.Cm;t.add(z.ko(e,z.Bx.KEY_DOWN,(e=>{const t=new it.Z(e),i=this._dispatch(t,t.target);i&&(t.preventDefault(),t.stopPropagation())}))),t.add(z.ko(e,z.Bx.KEY_UP,(e=>{const t=new it.Z(e),i=this._singleModifierDispatch(t,t.target);i&&t.preventDefault()}))),this._domNodeListeners.push(new Zs(e,t))},a=e=>{for(let t=0;t{e.getOption(61)||r(e.getContainerDomNode())},d=e=>{e.getOption(61)||a(e.getContainerDomNode())};this._register(s.onCodeEditorAdd(c)),this._register(s.onCodeEditorRemove(d)),s.listCodeEditors().forEach(c);const u=e=>{r(e.getContainerDomNode())},h=e=>{a(e.getContainerDomNode())};this._register(s.onDiffEditorAdd(u)),this._register(s.onDiffEditorRemove(h)),s.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,i,n){return(0,l.qE)(Tt.w.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>{const t=(0,Ct.Zv)(e.keybinding,qe.OS);return{keybinding:t,command:e.command??null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),(0,l.s)((()=>{for(let e=0;ethis._log(e)))}return this._cachedResolver}_documentHasFocus(){return a.G.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const e=o.when||void 0,s=o.keybinding;if(s){const r=ei.resolveKeybinding(s,qe.OS);for(const s of r)i[n++]=new Qt(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new Qt(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new Ct.dG(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new ei([t],qe.OS)}};Ys=Hs([Vs(0,ae.fN),Vs(1,Tt.d),Vs(2,ni.k),Vs(3,ye.Ot),Vs(4,F.rr),Vs(5,g.T)],Ys);class Zs extends l.jG{constructor(e,t){super(),this.domNode=e,this._register(t)}}function Xs(e){return e&&"object"===typeof e&&(!e.overrideIdentifier||"string"===typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof d.r)}let Js=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new te.vl,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new As(e);this._configuration=new Mt(t.reload(),At.createEmptyModel(e),At.createEmptyModel(e),At.createEmptyModel(e),At.createEmptyModel(e),At.createEmptyModel(e),new It.fT,At.createEmptyModel(e),new It.fT,e),t.dispose()}getValue(e,t){const i="string"===typeof e?e:void 0,n=Xs(e)?e:Xs(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new Ft({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);e.source=8,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};Js=Hs([Vs(0,F.rr)],Js);let er=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new te.vl,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=Et.y.isIPosition(t)?t:null,o=n?"string"===typeof i?i:void 0:"string"===typeof t?t:void 0,s=e?this.getLanguage(e,n):void 0;return"undefined"===typeof o?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:s})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};er=Hs([Vs(0,He.pG),Vs(1,P.IModelService),Vs(2,Ki.L)],er);let tr=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"===typeof i&&"auto"!==i?i:qe.j9||qe.zx?"\n":"\r\n"}};tr=Hs([Vs(0,He.pG)],tr);class ir{publicLog2(){}}class nr{static{this.SCHEME="inmemory"}constructor(){const e=d.r.from({scheme:nr.SCHEME,authority:"model",path:"/"});this.workspace={id:oi.cn,folders:[new oi.mX({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===nr.SCHEME?this.workspace.folders[0]:null}}function or(e,t,i){if(!t)return;if(!(e instanceof Js))return;const n=[];Object.keys(t).forEach((e=>{(0,kt.vf)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,kt.Gn)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}let sr=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:St.jN.convert(e),n=new Map;for(const e of i){if(!(e instanceof St.cw))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"===typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let i=n.get(t);i||(i=[],n.set(t,i)),i.push(xt.k.replaceMove(N.Q.lift(e.textEdit.range),e.textEdit.text))}let o=0,s=0;for(const[e,t]of n)e.pushStackElement(),e.pushEditOperations([],t,(()=>[])),e.pushStackElement(),s+=1,o+=t.length;return{ariaSummary:c.GP(si.tu.bulkEditServiceSummary,o,s),isApplied:o>0}}};sr=Hs([Vs(0,P.IModelService)],sr);class rr{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return(0,ri.P8)(e)}}let ar=class extends ht{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};ar=Hs([Vs(0,ge),Vs(1,g.T)],ar);class lr{constructor(){this._neverEmitter=new te.vl,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class cr extends li.LanguageService{constructor(){super()}}class dr extends Ps{constructor(){super(new F.Cr)}}let ur=class extends Fi{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s),this.configure({blockMouse:!1})}};ur=Hs([Vs(0,ni.k),Vs(1,ye.Ot),Vs(2,Be.l),Vs(3,We.b),Vs(4,ui.ez),Vs(5,ae.fN)],ur);const hr={amdModuleId:"vs/editor/common/services/editorSimpleWorker",esmModuleLocation:void 0,label:"editorWorkerService"};let gr=class extends Y{constructor(e,t,i,n,o){super(hr,e,t,i,n,o)}};gr=Hs([Vs(0,P.IModelService),Vs(1,M.ITextResourceConfigurationService),Vs(2,F.rr),Vs(3,A.JZ),Vs(4,W.ILanguageFeaturesService)],gr);class pr{async playSignal(e,t){}}var fr;function mr(e,t){return new _r(e,t)}(0,le.v)(F.rr,dr,0),(0,le.v)(He.pG,Js,0),(0,le.v)(M.ITextResourceConfigurationService,er,0),(0,le.v)(M.ITextResourcePropertiesService,tr,0),(0,le.v)(oi.VR,nr,0),(0,le.v)(ti.L,rr,0),(0,le.v)(ni.k,ir,0),(0,le.v)(be.X,Ks,0),(0,le.v)(Fs.k,qs,0),(0,le.v)(ye.Ot,Gs,0),(0,le.v)(Ls.DR,Rs,0),(0,le.v)(Ki.L,cr,0),(0,le.v)(jo.L,Vo.Sx,0),(0,le.v)(P.IModelService,Yi.ModelService,0),(0,le.v)(Qi.IMarkerDecorationsService,Gi.MarkerDecorationsService,0),(0,le.v)(ae.fN,ps,0),(0,le.v)(ii.G5,$s,0),(0,le.v)(ii.N8,Us,0),(0,le.v)(Ns.CS,Ns.pc,0),(0,le.v)(qi.IEditorWorkerService,gr,0),(0,le.v)(St.nu,sr,0),(0,le.v)(ai.L,lr,0),(0,le.v)(Lt.ITextModelService,zs,0),(0,le.v)(Ke.j,$o,0),(0,le.v)(zn.PE,zn.aG,0),(0,le.v)(Tt.d,Qs,0),(0,le.v)(We.b,Ys,0),(0,le.v)(Xi.GK,Bo,0),(0,le.v)(Be.l,ar,0),(0,le.v)(ze.C,$i,0),(0,le.v)(Jo.h,Xo,0),(0,le.v)(Be.Z,ur,0),(0,le.v)(ui.ez,Ko.$,0),(0,le.v)(Os.Nt,pr,0),(0,le.v)(Bs.ITreeSitterParserService,Ws,0),function(e){const t=new Cs.a;for(const[e,i]of(0,le.N)())t.set(e,i);const i=new xs(t,!0);function n(e){o||r({});const n=t.get(e);if(!n)throw new Error("Missing service "+e);return n instanceof bs.d?i.invokeFunction((t=>t.get(e))):n}t.set(he._Y,i),e.get=n;let o=!1;const s=new te.vl;function r(e){if(o)return i;o=!0;for(const[e,i]of(0,le.N)())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=(0,he.u1)(i),o=t.get(n);o instanceof bs.d&&t.set(n,e[i])}const n=(0,Ms.T)();for(const e of n)try{i.createInstance(e)}catch(e){(0,v.dz)(e)}return s.fire(),i}function a(e){if(o)return e();const t=new l.Cm,i=t.add(s.event((()=>{i.dispose(),t.add(e())})));return t}e.initialize=r,e.withServices=a}(fr||(fr={}));class _r extends ee{constructor(e,t){const i={amdModuleId:hr.amdModuleId,esmModuleLocation:hr.esmModuleLocation,label:t.label};super(i,t.keepIdleModels||!1,e),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!==typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?(0,p.V0)(this._foreignModuleHost):[];return e.$loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.$fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this.workerWithSyncedResources(e).then((e=>this.getProxy()))}}var vr=i(17522),br=i(86817),yr=i(69483),wr=i(35350),Cr=i(65764),Sr=i(58403),kr=i(9322),xr=i(84296),Er=i(70164),Lr=i(20529),Tr=i(90765);function Ir(e){return Array.isArray(e)}function Dr(e){return!Ir(e)}function Rr(e){return"string"===typeof e}function Nr(e){return!Rr(e)}function Ar(e){return!e}function Or(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Pr(e){return e.replace(/[&<>'"_]/g,"-")}function Mr(e,t){console.log(`${e.languageId}: ${t}`)}function Fr(e,t){return new Error(`${e.languageId}: ${t}`)}function Br(e,t,i,n,o){const s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let r=null;return t.replace(s,(function(t,s,a,l,c,d,u,h,g){return Ar(a)?Ar(l)?!Ar(c)&&c0){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}function Vr(e,t){let i=t;while(i&&i.length>0){const t=e.stateNames[i];if(t)return!0;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return!1}var jr,zr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ur=function(e,t){return function(i,n){t(i,n,e)}};const $r=5;class qr{static{this._INSTANCE=new qr($r)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new Kr(e,t);let i=Kr.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new Kr(e,t),this._entries[i]=n,n)}}class Kr{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";while(null!==e)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){while(null!==e&&null!==t){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return Kr._equals(this,e)}push(e){return qr.create(this,e)}pop(){return this.parent}popall(){let e=this;while(e.parent)e=e.parent;return e}switchTo(e){return qr.create(this.parent,e)}}class Gr{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){const e=this.state.clone();return e===this.state?this:new Gr(this.languageId,this.state)}}class Qr{static{this._INSTANCE=new Qr($r)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new Yr(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new Yr(e,t);const i=Kr.getStackElementId(e);let n=this._entries[i];return n||(n=new Yr(e,null),this._entries[i]=n,n)}}class Yr{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){const e=this.embeddedLanguageData?this.embeddedLanguageData.clone():null;return e===this.embeddedLanguageData?this:Qr.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof Yr&&(!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData)))}}class Zr{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new wr.ou(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=wr.dG.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenize(e,t,s);if(0!==n)for(const e of a.tokens)this._tokens.push(new wr.ou(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new wr.$M(this._tokens,e)}}class Xr{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,o=t.length,s=null!==i?i.length:0;if(0===n&&0===o&&0===s)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===s)return e;const r=new Uint32Array(n+o+s);null!==e&&r.set(e);for(let e=0;e{if(s)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=wr.dG.get(t);if(i){if(i instanceof jr){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else wr.dG.isResolved(t)||e.push(wr.dG.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=qr.create(null,this._lexer.start);return Qr.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,Sr.$H)(this._languageId,i);const n=new Zr,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,Sr.Lh)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new Xr(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n);return n.finalize(o)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Hr(this._lexer,t.stack.state),!i))throw Fr(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const s of i){if(!Nr(s.action)||"@pop"!==s.action.nextEmbedded)continue;o=!0;let i=s.resolveRegex(t.stack.state);const r=i.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(r.substr(4,r.length-5),e)}const a=e.search(i);-1===a||0!==a&&s.matchOnlyAtLineStart||(-1===n||a0&&o.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(s);return this._myTokenize(a,t,i,n+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterLanguage(this._languageId);const s=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,c=i.stack,d=0,u=null,h=!0;while(h||d=a)break;h=!1;let e=this._lexer.tokenizer[f];if(!e&&(e=Hr(this._lexer,f),!e))throw Fr(this._lexer,"tokenizer state is not defined: "+f);const t=r.substr(d);for(const i of e)if((0===d||!i.matchOnlyAtLineStart)&&(m=t.match(i.resolveRegex(f)),m)){_=m[0],v=i.action;break}}if(m||(m=[""],_=""),v||(d=this._lexer.maxStack)throw Fr(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(f)}else if("@pop"===v.next){if(c.depth<=1)throw Fr(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(b));c=c.pop()}else if("@popall"===v.next)c=c.popall();else{let e=Br(this._lexer,v.next,_,m,f);if("@"===e[0]&&(e=e.substr(1)),!Hr(this._lexer,e))throw Fr(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(b));c=c.push(e)}}v.log&&"string"===typeof v.log&&Mr(this._lexer,this._lexer.languageId+": "+Br(this._lexer,v.log,_,m,f))}if(null===w)throw Fr(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(b));const C=i=>{const s=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(s);if(d0)throw Fr(this._lexer,"groups cannot be nested: "+this._safeRuleName(b));if(m.length!==w.length+1)throw Fr(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(b));let e=0;for(let t=1;te});class ia{static colorizeElement(e,t,i,n){n=n||{};const o=n.theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+o;const l=e=>{const t=ta?.createHTML(e)??e;i.innerHTML=t};return this.colorize(t,a||"",r,n).then(l,(e=>console.error(e)))}static async colorize(e,t,i,n){const o=e.languageIdCodec;let s=4;n&&"number"===typeof n.tabSize&&(s=n.tabSize),c.LU(t)&&(t=t.substr(1));const r=c.uz(t);if(!e.isRegisteredLanguageId(i))return oa(r,s,o);const a=await wr.dG.getOrCreate(i);return a?na(r,s,a,o):oa(r,s,o)}static colorizeLine(e,t,i,n,o=4){const s=Tr.qL.isBasicASCII(e,t),r=Tr.qL.containsRTL(e,s,i),a=(0,Lr.Md)(new Lr.zL(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null));return a.html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const o=e.tokenization.getLineTokens(t),s=o.inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,i)}}function na(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=sa(e,t,i,n);if(i instanceof Jr){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}function oa(e,t,i){let n=[];const o=33587200,s=new Uint32Array(2);s[0]=0,s[1]=o;for(let o=0,r=e.length;o")}return n.join("")}function sa(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r"),s=l.endState}return o.join("")}var ra=i(5868),aa=i(12032),la=i(96371),ca=i(50799),da=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ua=function(e,t){return function(i,n){t(i,n,e)}};let ha=0,ga=!1;function pa(e){if(!e){if(ga)return;ga=!0}Ge.vr(e||a.G.document.body)}let fa=class extends o.x{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h){const g={...t};g.ariaLabel=g.ariaLabel||si.vp.editorViewAccessibleLabel,super(e,g,{},i,n,o,s,l,c,d,u,h),this._standaloneKeybindingService=a instanceof Ys?a:null,pa(g.ariaContainerElement),(0,la.MW)(((e,t)=>i.createInstance(Fe.fO,e,t,{}))),(0,ca.e)(r)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++ha,o=ae.M$.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!==typeof e.id||"string"!==typeof e.label||"function"!==typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.jG.None;const t=e.id,i=e.label,n=ae.M$.and(ae.M$.equals("editorId",this.getId()),ae.M$.deserialize(e.precondition)),o=e.keybindings,s=ae.M$.and(n,ae.M$.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,c=(t,...i)=>Promise.resolve(e.run(this,...i)),d=new l.Cm,u=this.getId()+":"+t;if(d.add(Tt.w.registerCommand(u,c)),r){const e={command:{id:u,title:i},when:n,group:r,order:a};d.add(ui.ZG.appendMenuItem(ui.D8.EditorContext,e))}if(Array.isArray(o))for(const e of o)d.add(this._standaloneKeybindingService.addDynamicKeybinding(u,e,c,s));const h=new ra.f(u,i,i,void 0,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,h),d.add((0,l.s)((()=>{this._actions.delete(t)}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof ue)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};fa=da([ua(2,he._Y),ua(3,g.T),ua(4,Tt.d),ua(5,ae.fN),ua(6,Fe.TN),ua(7,We.b),ua(8,ne.Gy),ua(9,ye.Ot),ua(10,Ke.j),ua(11,A.JZ),ua(12,W.ILanguageFeaturesService)],fa);let ma=class extends fa{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h,g,p,f){const m={...t};or(d,m,!1);const _=l.registerEditorContainer(e);"string"===typeof m.theme&&l.setTheme(m.theme),"undefined"!==typeof m.autoDetectHighContrast&&l.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const v=m.model;let b;if(delete m.model,super(e,m,i,n,o,s,r,a,l,c,u,p,f),this._configurationService=d,this._standaloneThemeService=l,this._register(_),"undefined"===typeof v){const e=g.getLanguageIdByMimeType(m.language)||m.language||Cr.vH;b=va(h,g,m.value||"",e,void 0),this._ownsModel=!0}else b=v,this._ownsModel=!1;if(this._attachModel(b),b){const e={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){or(this._configurationService,e,!1),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),"undefined"!==typeof e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};ma=da([ua(2,he._Y),ua(3,g.T),ua(4,Tt.d),ua(5,ae.fN),ua(6,Fe.TN),ua(7,We.b),ua(8,jo.L),ua(9,ye.Ot),ua(10,He.pG),ua(11,Ke.j),ua(12,P.IModelService),ua(13,Ki.L),ua(14,A.JZ),ua(15,W.ILanguageFeaturesService)],ma);let _a=class extends aa.T{constructor(e,t,i,n,o,s,r,a,l,c,d,u){const h={...t};or(a,h,!0);const g=s.registerEditorContainer(e);"string"===typeof h.theme&&s.setTheme(h.theme),"undefined"!==typeof h.autoDetectHighContrast&&s.setAutoDetectHighContrast(Boolean(h.autoDetectHighContrast)),super(e,h,{},n,i,o,u,c),this._configurationService=a,this._standaloneThemeService=s,this._register(g)}dispose(){super.dispose()}updateOptions(e){or(this._configurationService,e,!0),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),"undefined"!==typeof e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(fa,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function va(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let s=i;return-1!==n&&(s=i.substring(0,n)),ba(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return ba(e,i,t.createById(n),o)}function ba(e,t,i,n){return e.createModel(t,i,n)}_a=da([ua(2,he._Y),ua(3,ae.fN),ua(4,g.T),ua(5,jo.L),ua(6,ye.Ot),ua(7,He.pG),ua(8,Be.Z),ua(9,ii.N8),ua(10,Jo.h),ua(11,Os.Nt)],_a);var ya=i(34956),wa=i(43654),Ca=i(81275),Sa=i(52210),ka=i(78787),xa=i(50371),Ea=i(98581),La=i(57479),Ta=i(55745),Ia=i(64164),Da=i(24878),Ra=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Na=function(e,t){return function(i,n){t(i,n,e)}};class Aa{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let Oa=class extends l.jG{constructor(e,t,i,n,o){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=(0,Ca.FY)(this,void 0),this._collapsed=(0,eo.un)(this,(e=>this._viewModel.read(e)?.collapsed.read(e))),this._editorContentHeight=(0,Ca.FY)(this,500),this.contentHeight=(0,eo.un)(this,(e=>{const t=this._collapsed.read(e)?0:this._editorContentHeight.read(e);return t+this._outerEditorHeight})),this._modifiedContentWidth=(0,Ca.FY)(this,0),this._modifiedWidth=(0,Ca.FY)(this,0),this._originalContentWidth=(0,Ca.FY)(this,0),this._originalWidth=(0,Ca.FY)(this,0),this.maxScroll=(0,eo.un)(this,(e=>{const t=this._modifiedContentWidth.read(e)-this._modifiedWidth.read(e),i=this._originalContentWidth.read(e)-this._originalWidth.read(e);return t>i?{maxScroll:t,width:this._modifiedWidth.read(e)}:{maxScroll:i,width:this._originalWidth.read(e)}})),this._elements=(0,z.h)("div.multiDiffEntry",[(0,z.h)("div.header@header",[(0,z.h)("div.header-content",[(0,z.h)("div.collapse-button@collapseButton"),(0,z.h)("div.file-path",[(0,z.h)("div.title.modified.show-file-icons@primaryPath",[]),(0,z.h)("div.status.deleted@status",["R"]),(0,z.h)("div.title.original.show-file-icons@secondaryPath",[])]),(0,z.h)("div.actions@actions")])]),(0,z.h)("div.editorParent",[(0,z.h)("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(aa.T,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=(0,Ta.Ud)(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=(0,Ta.Ud)(this.editor.getOriginalEditor()).isFocused,this.isFocused=(0,eo.un)(this,(e=>this.isModifedFocused.read(e)||this.isOriginalFocused.read(e))),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new l.Cm),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const s=new Nn.$(this._elements.collapseButton,{});this._register((0,eo.fm)((e=>{s.element.className="",s.icon=this._collapsed.read(e)?vi.W.chevronRight:vi.W.chevronDown}))),this._register(s.onDidClick((()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)}))),this._register((0,eo.fm)((e=>{this._elements.editor.style.display=this._collapsed.read(e)?"none":"block"}))),this._register(this.editor.getModifiedEditor().onDidLayoutChange((e=>{const t=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(t,void 0)}))),this._register(this.editor.getOriginalEditor().onDidLayoutChange((e=>{const t=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(t,void 0)}))),this._register(this.editor.onDidContentSizeChange((e=>{(0,Ca.YY)((t=>{this._editorContentHeight.set(e.contentHeight,t),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),t),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),t)}))}))),this._register(this.editor.getOriginalEditor().onDidScrollChange((e=>{if(this._isSettingScrollTop)return;if(!e.scrollTopChanged||!this._data)return;const t=e.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(t)}))),this._register((0,eo.fm)((e=>{const t=this._viewModel.read(e)?.isActive.read(e);this._elements.root.classList.toggle("active",t)}))),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(o.createScoped(this._elements.actions));const r=this._register(this._instantiationService.createChild(new Cs.a([ae.fN,this._contextKeyService])));this._register(r.createInstance(Ia.m,this._elements.actions,ui.D8.MultiDiffEditorFileToolbar,{actionRunner:this._register(new Da.I((()=>this._viewModel.get()?.modifiedUri))),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("navigation")},actionViewItemProvider:(e,t)=>(0,di.rN)(r,e,t)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(e){return{...e,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(this._data=e,!e)return void(0,Ca.YY)((e=>{this._viewModel.set(void 0,e),this.editor.setDiffModel(null,e),this._dataStore.clear()}));const i=e.viewModel.documentDiffItem;if((0,Ca.YY)((n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:void 0===e.viewModel.modifiedUri});let o=!1,s=!1,r=!1,a="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(a="R",o=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(a="A",r=!0):(a="D",s=!0),this._elements.status.classList.toggle("renamed",o),this._elements.status.classList.toggle("deleted",s),this._elements.status.classList.toggle("added",r),this._elements.status.innerText=a,this._resourceLabel2?.setUri(o?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))})),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange((()=>{this.editor.updateOptions(t(i.options??{}))}))),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,(e=>{e||this.setData(void 0)})),e.viewModel.documentDiffItem.contextKeys)for(const[t,i]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(t,i)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const o=e.length-this._headerHeight,s=Math.max(0,Math.min(n.start-e.start,o));this._elements.header.style.transform=`translateY(${s}px)`,(0,Ca.YY)((i=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})}));try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",s>0||i>0),this._elements.header.classList.toggle("collapsed",s===o)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};Oa=Ra([Na(3,he._Y),Na(4,ae.fN)],Oa);class Pa{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(0===this._unused.size)t=this._create(e),this._itemData.set(t,e);else{const i=[...this._unused.values()];t=i.find((t=>this._itemData.get(t).getId()===e.getId()))??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var Ma=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Fa=function(e,t){return function(i,n){t(i,n,e)}};let Ba=class extends l.jG{constructor(e,t,i,n,o,s){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=o,this._parentInstantiationService=s,this._scrollableElements=(0,z.h)("div.scrollContent",[(0,z.h)("div@content",{style:{overflow:"hidden"}}),(0,z.h)("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new Sa.yE({forceIntegerValues:!1,scheduleAtNextAnimationFrame:e=>(0,z.PG)((0,z.zk)(this._element),e),smoothScrollDuration:100})),this._scrollableElement=this._register(new _i.oO(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=(0,z.h)("div.monaco-component.multiDiffEditor",{},[(0,z.h)("div",{},[this._scrollableElement.getDomNode()]),(0,z.h)("div.placeholder@placeholder",{},[(0,z.h)("div",[(0,w.kg)("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new ka.pN(this._element,void 0)),this._objectPool=this._register(new Pa((e=>{const t=this._instantiationService.createInstance(Oa,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return t.setData(e),t}))),this.scrollTop=(0,eo.y0)(this,this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollTop)),this.scrollLeft=(0,eo.y0)(this,this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollLeft)),this._viewItemsInfo=(0,eo.rm)(this,((e,t)=>{const i=this._viewModel.read(e);if(!i)return{items:[],getItem:e=>{throw new v.D7}};const n=i.items.read(e),o=new Map,s=n.map((e=>{const i=t.add(new Wa(e,this._objectPool,this.scrollLeft,(e=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+e})}))),n=this._lastDocStates?.[i.getKey()];return n&&(0,Ca.Rn)((e=>{i.setViewState(n,e)})),o.set(e,i),i}));return{items:s,getItem:e=>o.get(e)}})),this._viewItems=this._viewItemsInfo.map(this,(e=>e.items)),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,((e,t)=>e.reduce(((e,i)=>e+i.contentHeight.read(t)+this._spaceBetweenPx),0))),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new Cs.a([ae.fN,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(La.R.inMultiDiffEditor.key,!0),this._register((0,eo.yC)(((e,t)=>{const i=this._viewModel.read(e);if(i&&i.contextKeys)for(const[e,n]of Object.entries(i.contextKeys)){const i=this._contextKeyService.createKey(e,void 0);i.set(n),t.add((0,l.s)((()=>i.reset())))}})));const r=this._parentContextKeyService.createKey(La.R.multiDiffEditorAllCollapsed.key,!1);this._register((0,eo.fm)((e=>{const t=this._viewModel.read(e);if(t){const i=t.items.read(e).every((t=>t.collapsed.read(e)));r.set(i)}}))),this._register((0,eo.fm)((e=>{const t=this._dimension.read(e);this._sizeObserver.observe(t)}))),this._register((0,eo.fm)((e=>{const t=this._viewItems.read(e);this._elements.placeholder.classList.toggle("visible",0===t.length)}))),this._scrollableElements.content.style.position="relative",this._register((0,eo.fm)((e=>{const t=this._sizeObserver.height.read(e);this._scrollableElements.root.style.height=`${t}px`;const i=this._totalHeight.read(e);this._scrollableElements.content.style.height=`${i}px`;const n=this._sizeObserver.width.read(e);let o=n;const s=this._viewItems.read(e),r=(0,wa.Cn)(s,(0,y.VE)((t=>t.maxScroll.read(e).maxScroll),y.U9));if(r){const t=r.maxScroll.read(e);o=n+t.maxScroll}this._scrollableElement.setScrollDimensions({width:n,height:t,scrollHeight:i,scrollWidth:o})}))),e.replaceChildren(this._elements.root),this._register((0,l.s)((()=>{e.replaceChildren()}))),this._register(this._register((0,eo.fm)((e=>{(0,Ca.YY)((t=>{this.render(e)}))}))))}render(e){const t=this.scrollTop.read(e);let i=0,n=0,o=0;const s=this._sizeObserver.height.read(e),r=xa.L.ofStartAndLength(t,s),a=this._sizeObserver.width.read(e);for(const l of this._viewItems.read(e)){const c=l.contentHeight.read(e),d=Math.min(c,s),u=xa.L.ofStartAndLength(n,d),h=xa.L.ofStartAndLength(o,c);if(h.isBefore(r))i-=c-d,l.hide();else if(h.isAfter(r))l.hide();else{const e=Math.max(0,Math.min(r.start-h.start,c-d));i-=e;const n=xa.L.ofStartAndLength(t+i,s);l.render(u,e,a,n)}n+=d+this._spaceBetweenPx,o+=c+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};Ba=Ma([Fa(4,ae.fN),Fa(5,he._Y)],Ba);class Wa extends l.jG{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register((0,Ca.X2)(this,void 0)),this.contentHeight=(0,eo.un)(this,(e=>this._templateRef.read(e)?.object.contentHeight?.read(e)??this.viewModel.lastTemplateData.read(e).contentHeight)),this.maxScroll=(0,eo.un)(this,(e=>this._templateRef.read(e)?.object.maxScroll.read(e)??{maxScroll:0,scrollWidth:0})),this.template=(0,eo.un)(this,(e=>this._templateRef.read(e)?.object)),this._isHidden=(0,eo.FY)(this,!1),this._isFocused=(0,eo.un)(this,(e=>this.template.read(e)?.isFocused.read(e)??!1)),this.viewModel.setIsFocused(this._isFocused,void 0),this._register((0,eo.fm)((e=>{const t=this._scrollLeft.read(e);this._templateRef.read(e)?.object.setScrollLeft(t)}))),this._register((0,eo.fm)((e=>{const t=this._templateRef.read(e);if(!t)return;const i=this._isHidden.read(e);if(!i)return;const n=t.object.isFocused.read(e);n||this._clear()})))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(Ea.L.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);const o=this._templateRef.get();o&&n&&o.object.editor.setSelections(n)}_updateTemplateData(e){const t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&(0,Ca.Rn)((t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)}))}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let o=this._templateRef.get();if(!o){o=this._objectPool.getUnusedObj(new Aa(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(o,void 0);const e=this.viewModel.lastTemplateData.get().selections;e&&o.object.editor.setSelections(e)}o.object.render(e,i,t,n)}}(0,Me.x1A)("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},(0,w.kg)("multiDiffEditor.headerBackground","The background color of the diff editor's header")),(0,Me.x1A)("multiDiffEditor.background",Me.YtV,(0,w.kg)("multiDiffEditor.background","The background color of the multi file diff editor")),(0,Me.x1A)("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},(0,w.kg)("multiDiffEditor.border","The border color of the multi file diff editor"));var Ha=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Va=function(e,t){return function(i,n){t(i,n,e)}};let ja=class extends l.jG{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=(0,eo.FY)(this,void 0),this._viewModel=(0,eo.FY)(this,void 0),this._widgetImpl=(0,eo.rm)(this,((e,t)=>((0,ya.b)(Oa,e),t.add(this._instantiationService.createInstance((0,ya.b)(Ba,e),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))))),this._register((0,eo.OI)(this._widgetImpl))}};function za(e,t,i){const n=fr.initialize(i||{});return n.createInstance(ma,e,t)}function Ua(e){const t=fr.get(g.T);return t.onCodeEditorAdd((t=>{e(t)}))}function $a(e){const t=fr.get(g.T);return t.onDiffEditorAdd((t=>{e(t)}))}function qa(){const e=fr.get(g.T);return e.listCodeEditors()}function Ka(){const e=fr.get(g.T);return e.listDiffEditors()}function Ga(e,t,i){const n=fr.initialize(i||{});return n.createInstance(_a,e,t)}function Qa(e,t){const i=fr.initialize(t||{});return new ja(e,{},i)}function Ya(e){if("string"!==typeof e.id||"function"!==typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Tt.w.registerCommand(e.id,e.run)}function Za(e){if("string"!==typeof e.id||"string"!==typeof e.label||"function"!==typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=ae.M$.deserialize(e.precondition),i=(i,...n)=>h.DX.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n)))),n=new l.Cm;if(n.add(Tt.w.registerCommand(e.id,i)),e.contextMenuGroupId){const i={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};n.add(ui.ZG.appendMenuItem(ui.D8.EditorContext,i))}if(Array.isArray(e.keybindings)){const i=fr.get(We.b);if(i instanceof Ys){const o=ae.M$.and(t,ae.M$.deserialize(e.keybindingContext));n.add(i.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:o})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return n}function Xa(e){return Ja([e])}function Ja(e){const t=fr.get(We.b);return t instanceof Ys?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:ae.M$.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.jG.None)}function el(e,t,i){const n=fr.get(Ki.L),o=n.getLanguageIdByMimeType(t)||t;return va(fr.get(P.IModelService),n,e,o,i)}function tl(e,t){const i=fr.get(Ki.L),n=i.getLanguageIdByMimeType(t)||t||Cr.vH;e.setLanguage(i.createById(n))}function il(e,t,i){if(e){const n=fr.get(Ls.DR);n.changeOne(t,e.uri,i)}}function nl(e){const t=fr.get(Ls.DR);t.changeAll(e,[])}function ol(e){const t=fr.get(Ls.DR);return t.read(e)}function sl(e){const t=fr.get(Ls.DR);return t.onMarkerChanged(e)}function rl(e){const t=fr.get(P.IModelService);return t.getModel(e)}function al(){const e=fr.get(P.IModelService);return e.getModels()}function ll(e){const t=fr.get(P.IModelService);return t.onModelAdded(e)}function cl(e){const t=fr.get(P.IModelService);return t.onModelRemoved(e)}function dl(e){const t=fr.get(P.IModelService);return t.onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))}function ul(e){return mr(fr.get(P.IModelService),e)}function hl(e,t){const i=fr.get(Ki.L),n=fr.get(jo.L);return ia.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))}function gl(e,t,i){const n=fr.get(Ki.L),o=fr.get(jo.L);return o.registerEditorContainer(a.G.document.body),ia.colorize(n,e,t,i)}function pl(e,t,i=4){const n=fr.get(jo.L);return n.registerEditorContainer(a.G.document.body),ia.colorizeModelLine(e,t,i)}function fl(e){const t=wr.dG.get(e);return t||{getInitialState:()=>Sr.r3,tokenize:(t,i,n)=>(0,Sr.$H)(e,n)}}function ml(e,t){wr.dG.getOrCreate(t);const i=fl(t),n=(0,c.uz)(e),o=[];let s=i.getInitialState();for(let e=0,t=n.length;e{if(!i)return null;const o=t.options?.selection;let s;return o&&"number"===typeof o.endLineNumber&&"number"===typeof o.endColumn?s=o:o&&(s={lineNumber:o.startLineNumber,column:o.startColumn}),await e.openCodeEditor(i,t.resource,s)?i:null}))}function Sl(){return{create:za,getEditors:qa,getDiffEditors:Ka,onDidCreateEditor:Ua,onDidCreateDiffEditor:$a,createDiffEditor:Ga,addCommand:Ya,addEditorAction:Za,addKeybindingRule:Xa,addKeybindingRules:Ja,createModel:el,setModelLanguage:tl,setModelMarkers:il,getModelMarkers:ol,removeAllMarkers:nl,onDidChangeMarkers:sl,getModels:al,getModel:rl,onDidCreateModel:ll,onWillDisposeModel:cl,onDidChangeModelLanguage:dl,createWebWorker:ul,colorizeElement:hl,colorize:gl,colorizeModelLine:pl,tokenize:ml,defineTheme:_l,setTheme:vl,remeasureFonts:bl,registerCommand:yl,registerLinkOpener:wl,registerEditorOpener:Cl,AccessibilitySupport:xr.Gn,ContentWidgetPositionPreference:xr.Qj,CursorChangeReason:xr.h5,DefaultEndOfLine:xr.of,EditorAutoIndentStrategy:xr.e0,EditorOption:xr.p2,EndOfLinePreference:xr.kf,EndOfLineSequence:xr.WU,MinimapPosition:xr.R3,MinimapSectionHeaderStyle:xr.VX,MouseTargetType:xr.hS,OverlayWidgetPositionPreference:xr.dE,OverviewRulerLane:xr.A5,GlyphMarginLane:xr.ZS,RenderLineNumbersType:xr.DO,RenderMinimap:xr.hW,ScrollbarVisibility:xr.XR,ScrollType:xr.ov,TextEditorCursorBlinkingStyle:xr.U7,TextEditorCursorStyle:xr.m9,TrackedRangeStickiness:xr.kK,WrappingIndent:xr.tJ,InjectedTextCursorStops:xr.VW,PositionAffinity:xr.Ic,ShowLightbulbIconMode:xr.jT,ConfigurationChangedEvent:s.lw,BareFontInfo:br._8,FontInfo:br.YJ,TextModelResolvedOptions:kr.X2,FindMatch:kr.Dg,ApplyUpdateResult:s.hZ,EditorZoom:vr.D,createMultiFileDiffEditor:Qa,EditorType:yr._,EditorOptions:s.qB}}ja=Ha([Va(2,he._Y)],ja);var kl=i(85476);function xl(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const i of t)if(!e(i))return!1;return!0}function El(e,t){return"boolean"===typeof e?e:t}function Ll(e,t){return"string"===typeof e?e:t}function Tl(e){const t={};for(const i of e)t[i]=!0;return t}function Il(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=Tl(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function Dl(e,t,i){t=t.replace(/@@/g,"");let n,o=0;do{n=!1,t=t.replace(/@(\w+)/g,(function(i,o){n=!0;let s="";if("string"===typeof e[o])s=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?Fr(e,"language definition does not contain attribute '"+o+"', used at: "+t):Fr(e,"attribute reference '"+o+"' must be a string, used at: "+t);s=e[o].source}return Ar(s)?"":"(?:"+s+")"})),o++}while(n&&o<5);t=t.replace(/\x01/g,"@");const s=(e.ignoreCase?"i":"")+(e.unicode?"u":"");if(i){const i=t.match(/\$[sS](\d\d?)/g);if(i){let i=null,n=null;return o=>(n&&i===o||(i=o,n=new RegExp(Wr(e,t,o),s)),n)}}return new RegExp(t,s)}function Rl(e,t,i,n){if(n<0)return e;if(n=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"===typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Fr(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!==typeof i.next)throw Fr(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!Vr(e,Br(e,o,"",[],""))))throw Fr(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"===typeof i.goBack&&(n.goBack=i.goBack),"string"===typeof i.switchTo&&(n.switchTo=i.switchTo),"string"===typeof i.log&&(n.log=i.log),"string"===typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let o=0,s=i.length;o0&&"^"===i[0],this.name=this.name+": "+i,this.regex=Dl(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=Al(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function Pl(e,t){if(!t||"object"!==typeof t)throw new Error("Monarch: expecting a language definition object");const i={languageId:e,includeLF:El(t.includeLF,!1),noThrow:!1,maxStack:100,start:"string"===typeof t.start?t.start:null,ignoreCase:El(t.ignoreCase,!1),unicode:El(t.unicode,!1),tokenPostfix:Ll(t.tokenPostfix,"."+e),defaultToken:Ll(t.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!==typeof r)throw Fr(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw Fr(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new Ol(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"===typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!==typeof a[1])throw Fr(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Fr(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"===typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=El(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}s.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!==typeof t.tokenizer)throw Fr(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Fr(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Fr(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!==typeof t.open||"string"!==typeof t.token||"string"!==typeof t.close)throw Fr(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:t.token+i.tokenPostfix,open:Or(i,t.open),close:Or(i,t.close)})}return i.brackets=s,i.noThrow=!0,i}function Ml(e){Cr.W6.registerLanguage(e)}function Fl(){let e=[];return e=e.concat(Cr.W6.getLanguages()),e}function Bl(e){const t=fr.get(Ki.L);return t.languageIdCodec.encodeLanguageId(e)}function Wl(e,t){return fr.withServices((()=>{const i=fr.get(Ki.L),n=i.onDidRequestRichLanguageFeatures((i=>{i===e&&(n.dispose(),t())}));return n}))}function Hl(e,t){return fr.withServices((()=>{const i=fr.get(Ki.L),n=i.onDidRequestBasicLanguageFeatures((i=>{i===e&&(n.dispose(),t())}));return n}))}function Vl(e,t){const i=fr.get(Ki.L);if(!i.isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);const n=fr.get(A.JZ);return n.register(e,t,100)}class jl{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"===typeof this._actual.tokenize)return zl.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new wr.rY(n.tokens,n.endState)}}class zl{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let o=0,s=e.length;o0&&o[s-1]===l)continue;let c=a.startIndex;0===e?c=0:c{const i=await Promise.resolve(t.create());return i?Ul(i)?Gl(e,i):new Jr(fr.get(Ki.L),fr.get(jo.L),e,Pl(e,i),fr.get(He.pG)):null}));return wr.dG.registerFactory(e,i)}function Yl(e,t){const i=fr.get(Ki.L);if(!i.isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return ql(t)?Ql(e,{create:()=>t}):wr.dG.register(e,Gl(e,t))}function Zl(e,t){const i=t=>new Jr(fr.get(Ki.L),fr.get(jo.L),e,Pl(e,t),fr.get(He.pG));return ql(t)?Ql(e,{create:()=>t}):wr.dG.register(e,i(t))}function Xl(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.referenceProvider.register(e,t)}function Jl(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.renameProvider.register(e,t)}function ec(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.newSymbolNamesProvider.register(e,t)}function tc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.signatureHelpProvider.register(e,t)}function ic(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.hoverProvider.register(e,{provideHover:async(e,i,n,o)=>{const s=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n,o)).then((e=>{if(e)return!e.range&&s&&(e.range=new N.Q(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)),e.range||(e.range=new N.Q(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})}function nc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentSymbolProvider.register(e,t)}function oc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentHighlightProvider.register(e,t)}function sc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.linkedEditingRangeProvider.register(e,t)}function rc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.definitionProvider.register(e,t)}function ac(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.implementationProvider.register(e,t)}function lc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.typeDefinitionProvider.register(e,t)}function cc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.codeLensProvider.register(e,t)}function dc(e,t,i){const n=fr.get(W.ILanguageFeaturesService);return n.codeActionProvider.register(e,{providedCodeActionKinds:i?.providedCodeActionKinds,documentation:i?.documentation,provideCodeActions:(e,i,n,o)=>{const s=fr.get(Ls.DR),r=s.read({resource:e.uri}).filter((e=>N.Q.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:r,only:n.only,trigger:n.trigger},o)},resolveCodeAction:t.resolveCodeAction})}function uc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentFormattingEditProvider.register(e,t)}function hc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentRangeFormattingEditProvider.register(e,t)}function gc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.onTypeFormattingEditProvider.register(e,t)}function pc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.linkProvider.register(e,t)}function fc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.completionProvider.register(e,t)}function mc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.colorProvider.register(e,t)}function _c(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.foldingRangeProvider.register(e,t)}function vc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.declarationProvider.register(e,t)}function bc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.selectionRangeProvider.register(e,t)}function yc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentSemanticTokensProvider.register(e,t)}function wc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.documentRangeSemanticTokensProvider.register(e,t)}function Cc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.inlineCompletionsProvider.register(e,t)}function Sc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.inlineEditProvider.register(e,t)}function kc(e,t){const i=fr.get(W.ILanguageFeaturesService);return i.inlayHintsProvider.register(e,t)}function xc(){return{register:Ml,getLanguages:Fl,onLanguage:Wl,onLanguageEncountered:Hl,getEncodedLanguageId:Bl,setLanguageConfiguration:Vl,setColorMap:Kl,registerTokensProviderFactory:Ql,setTokensProvider:Yl,setMonarchTokensProvider:Zl,registerReferenceProvider:Xl,registerRenameProvider:Jl,registerNewSymbolNameProvider:ec,registerCompletionItemProvider:fc,registerSignatureHelpProvider:tc,registerHoverProvider:ic,registerDocumentSymbolProvider:nc,registerDocumentHighlightProvider:oc,registerLinkedEditingRangeProvider:sc,registerDefinitionProvider:rc,registerImplementationProvider:ac,registerTypeDefinitionProvider:lc,registerCodeLensProvider:cc,registerCodeActionProvider:dc,registerDocumentFormattingEditProvider:uc,registerDocumentRangeFormattingEditProvider:hc,registerOnTypeFormattingEditProvider:gc,registerLinkProvider:pc,registerColorProvider:mc,registerFoldingRangeProvider:_c,registerDeclarationProvider:vc,registerSelectionRangeProvider:bc,registerDocumentSemanticTokensProvider:yc,registerDocumentRangeSemanticTokensProvider:wc,registerInlineCompletionsProvider:Cc,registerInlineEditProvider:Sc,registerInlayHintsProvider:kc,DocumentHighlightKind:xr.Kb,CompletionItemKind:xr.Io,CompletionItemTag:xr.QP,CompletionItemInsertTextRule:xr._E,SymbolKind:xr.v0,SymbolTag:xr.H_,IndentAction:xr.l,CompletionTriggerKind:xr.t7,SignatureHelpTriggerKind:xr.WA,InlayHintKind:xr.r4,InlineCompletionTriggerKind:xr.qw,InlineEditTriggerKind:xr.sm,CodeActionTriggerType:xr.ok,NewSymbolNameTag:xr.OV,NewSymbolNameTriggerKind:xr.YT,PartialAcceptTriggerKind:xr.Ah,HoverVerbosityAction:xr.M$,FoldingRangeKind:wr.lO,SelectedSuggestionInfo:wr.GE}}var Ec=i(88996);s.qB.wrappingIndent.defaultValue=0,s.qB.glyphMargin.defaultValue=!1,s.qB.autoIndent.defaultValue=3,s.qB.overviewRulerLanes.defaultValue=2,Ec.Pj.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const Lc=(0,r.createMonacoBaseAPI)();Lc.editor=Sl(),Lc.languages=xc();const Tc=Lc.CancellationTokenSource,Ic=Lc.Emitter,Dc=Lc.KeyCode,Rc=Lc.KeyMod,Nc=Lc.Position,Ac=Lc.Range,Oc=Lc.Selection,Pc=Lc.SelectionDirection,Mc=Lc.MarkerSeverity,Fc=Lc.MarkerTag,Bc=Lc.Uri,Wc=Lc.Token,Hc=Lc.editor,Vc=Lc.languages,jc=globalThis.MonacoEnvironment;(jc?.globalAPI||"function"===typeof define&&i.amdO)&&(globalThis.monaco=Lc),"undefined"!==typeof globalThis.require&&"function"===typeof globalThis.require.config&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});i(63259),i(49556);self["MonacoEnvironment"]=function(e){function t(e){return e.replace(/\/$/,"")}return{globalAPI:!1,getWorkerUrl:function(n,o){var s=i.p,r=(s?t(s)+"/":"")+e[o];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var a=String(window.location),l=a.substr(0,a.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,l.length)!==l){/^(\/\/)/.test(r)&&(r=window.location.protocol+r);var c="/*"+o+'*/importScripts("'+r+'");',d=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(d)}}return r}}}({editorWorkerService:"editor.worker.js",json:"json.worker.js"});const zc=n},87380:(e,t,i)=>{"use strict";i.d(t,{EN:()=>n.editor});i(90141),i(92919),i(32378),i(80786),i(50877),i(14291),i(65340),i(10113),i(34588),i(29886),i(24655),i(26271),i(10111),i(15943),i(40147),i(32865),i(6132),i(23631),i(50416),i(8454),i(28369),i(23358),i(50239),i(15342),i(13977),i(86853),i(3815),i(39405),i(92048),i(87715),i(29754),i(54289),i(41699),i(97798),i(26642),i(12842),i(31903),i(54357),i(25135),i(70732),i(41439),i(35245),i(72239),i(27471),i(47414),i(26044),i(70151),i(98232),i(2845),i(92910),i(31252),i(90709),i(56673),i(48758),i(90445),i(52335),i(82397),i(71406),i(79266),i(21095),i(47883),i(29587),i(47641),i(92461),i(11501),i(95168),i(23479),i(18469);var n=i(26732),o=i(34417); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) @@ -1074,9 +1074,9 @@ var s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPro * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ -var b=Object.defineProperty,y=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,C=Object.prototype.hasOwnProperty,S=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let o of w(t))C.call(e,o)||o===i||b(e,o,{get:()=>t[o],enumerable:!(n=y(t,o))||n.enumerable});return e},k=(e,t,i)=>(S(e,t,"default"),i&&S(i,t,"default")),x={};k(x,n);var E=class{constructor(e,t,i){this._onDidChange=new x.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},L={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},T={format:L,suggest:{},data:{useDefaultDataProvider:!0}};function I(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===R,documentFormattingEdits:e===R,documentRangeFormattingEdits:e===R}}var R="html",D="handlebars",N="razor",A=H(R,T,I(R)),O=A.defaults,P=H(D,T,I(D)),M=P.defaults,F=H(N,T,I(N)),B=F.defaults;function W(){return i.e(121).then(i.bind(i,24010))}function H(e,t=T,i=I(e)){const n=new E(e,t,i);let o;const s=x.languages.onLanguage(e,(async()=>{o=(await W()).setupMode(n)}));return{defaults:n,dispose(){s.dispose(),o?.dispose(),o=void 0}}}x.languages.html={htmlDefaults:O,razorDefaults:B,handlebarDefaults:M,htmlLanguageService:A,handlebarLanguageService:P,razorLanguageService:F,registerHTMLLanguageService:H};i(49556),i(78481),i(340);self["MonacoEnvironment"]=function(e){function t(e){return e.replace(/\/$/,"")}return{globalAPI:!1,getWorkerUrl:function(n,o){var s=i.p,r=(s?t(s)+"/":"")+e[o];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var a=String(window.location),l=a.substr(0,a.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,l.length)!==l){/^(\/\/)/.test(r)&&(r=window.location.protocol+r);var c="/*"+o+'*/importScripts("'+r+'");',d=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(d)}}return r}}}({editorWorkerService:"editor.worker.js",json:"json.worker.js"})},88758:(e,t,i)=>{"use strict";i.d(t,{Dy:()=>s,H8:()=>d,Qu:()=>f,Tc:()=>c,c8:()=>h,gm:()=>l,m0:()=>g,nr:()=>u,pR:()=>r});var n=i(62484);class o{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new o}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function s(e,t,i){"string"===typeof t&&(t=e.matchMedia(t)),t.addEventListener("change",i)}function r(e){return o.INSTANCE.getZoomFactor(e)}const a=navigator.userAgent,l=a.indexOf("Firefox")>=0,c=a.indexOf("AppleWebKit")>=0,d=a.indexOf("Chrome")>=0,u=!d&&a.indexOf("Safari")>=0,h=!d&&!u&&c,g=(a.indexOf("Electron/"),a.indexOf("Android")>=0);let p=!1;if("function"===typeof n.G.matchMedia){const e=n.G.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=n.G.matchMedia("(display-mode: fullscreen)");p=e.matches,s(n.G,e,(({matches:e})=>{p&&t.matches||(p=e)}))}function f(){return p}},12402:(e,t,i)=>{"use strict";i.d(t,{e:()=>r});var n=i(88758),o=i(62484),s=i(25160);const r={clipboard:{writeText:s.ib||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:s.ib||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>s.ib||n.Qu()?0:navigator.keyboard||n.nr?1:2)(),touch:"ontouchstart"in o.G||navigator.maxTouchPoints>0,pointerEvents:o.G.PointerEvent&&("ontouchstart"in o.G||navigator.maxTouchPoints>0)}},63872:(e,t,i)=>{"use strict";i.d(t,{t:()=>o});var n=i(33911);const o={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:n.K.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},2150:(e,t,i)=>{"use strict";i.d(t,{$:()=>Ve,BC:()=>Pe,BK:()=>K,Be:()=>W,Bx:()=>Le,CE:()=>qe,Cl:()=>ne,Di:()=>Je,Ej:()=>q,Er:()=>xe,Fv:()=>E,H4:()=>Z,Hs:()=>Me,Ij:()=>M,Iv:()=>k,L9:()=>V,Ln:()=>Fe,Mc:()=>nt,OK:()=>X,Oq:()=>F,PG:()=>B,Pl:()=>Oe,Q2:()=>w,QX:()=>J,TT:()=>Xe,Tf:()=>Ge,Tr:()=>Q,U2:()=>ye,U3:()=>P,WU:()=>ze,Wt:()=>be,X7:()=>re,XD:()=>te,Xc:()=>A,ZF:()=>C,a:()=>le,a4:()=>Ze,b2:()=>N,bo:()=>je,bq:()=>se,cL:()=>$,fg:()=>U,fs:()=>Ie,fz:()=>ce,gI:()=>Ye,h:()=>it,i0:()=>Ke,jD:()=>Ue,jG:()=>oe,jh:()=>ue,ko:()=>I,kx:()=>Ee,li:()=>ge,mU:()=>G,nR:()=>ae,nY:()=>Se,pN:()=>et,q3:()=>x,sb:()=>Ce,sd:()=>Te,tG:()=>j,vT:()=>$e,w5:()=>Ae,w_:()=>L,wk:()=>De,xZ:()=>ke,y6:()=>Y,yt:()=>Qe,zK:()=>Re,zk:()=>_});var n=i(88758),o=i(12402),s=i(68389),r=i(46274),a=i(9659),l=i(14396),c=i(40231),d=i(86501),u=i(5091),h=i(6657),g=i(25160),p=i(65647),f=i(62484);const{registerWindow:m,getWindow:_,getDocument:v,getWindows:b,getWindowsCount:y,getWindowId:w,getWindowById:C,hasWindow:S,onDidRegisterWindow:k,onWillUnregisterWindow:x,onDidUnregisterWindow:E}=function(){const e=new Map;(0,f.y)(f.G,1);const t={window:f.G,disposables:new u.Cm};e.set(f.G.vscodeWindowId,t);const i=new c.vl,n=new c.vl,o=new c.vl;function s(i,n){const o="number"===typeof i?e.get(i):void 0;return o??(n?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(t){if(e.has(t.vscodeWindowId))return u.jG.None;const s=new u.Cm,r={window:t,disposables:s.add(new u.Cm)};return e.set(t.vscodeWindowId,r),s.add((0,u.s)((()=>{e.delete(t.vscodeWindowId),n.fire(t)}))),s.add(I(t,Le.BEFORE_UNLOAD,(()=>{o.fire(t)}))),i.fire(r),s},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:s,getWindow(e){const t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;const i=e;return i?.view?i.view.window:f.G},getDocument(e){const t=e;return _(t).document}}}();function L(e){while(e.firstChild)e.firstChild.remove()}class T{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function I(e,t,i,n){return new T(e,t,i,n)}function R(e,t){return function(i){return t(new r.P(e,i))}}function D(e){return function(t){return e(new s.Z(t))}}const N=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t||"contextmenu"===t?o=R(_(e),i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=D(i)),I(e,t,o,n)},A=function(e,t,i){const n=R(_(e),t);return O(e,n,i)};function O(e,t,i){return I(e,g.un&&o.e.pointerEvents?Le.POINTER_DOWN:Le.MOUSE_DOWN,t,i)}function P(e,t,i){return(0,a.b7)(e,t,i)}class M extends a.A0{constructor(e,t){super(e,t)}}let F,B;class W extends a.vb{constructor(e){super(),this.defaultTarget=e&&_(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}}class H{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dz)(e)}}static sort(e,t){return t.priority-e.priority}}function V(e){return _(e).getComputedStyle(e,null)}function j(e,t){const i=_(e),n=i.document;if(e!==n.body)return new U(e.clientWidth,e.clientHeight);if(g.un&&i?.visualViewport)return new U(i.visualViewport.width,i.visualViewport.height);if(i?.innerWidth&&i.innerHeight)return new U(i.innerWidth,i.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new U(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new U(n.documentElement.clientWidth,n.documentElement.clientHeight);if(t)return j(t);throw new Error("Unable to figure out browser width and height")}(function(){const e=new Map,t=new Map,i=new Map,n=new Map,o=o=>{i.set(o,!1);const s=e.get(o)??[];t.set(o,s),e.set(o,[]),n.set(o,!0);while(s.length>0){s.sort(H.sort);const e=s.shift();e.execute()}n.set(o,!1)};B=(t,n,s=0)=>{const r=w(t),a=new H(n,s);let l=e.get(r);return l||(l=[],e.set(r,l)),l.push(a),i.get(r)||(i.set(r,!0),t.requestAnimationFrame((()=>o(r)))),a},F=(e,i,o)=>{const s=w(e);if(n.get(s)){const e=new H(i,o);let n=t.get(s);return n||(n=[],t.set(s,n)),n.push(e),e}return B(e,i,o)}})();class z{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=V(e),o=n?n.getPropertyValue(t):"0";return z.convertToPixels(e,o)}static getBorderLeftWidth(e){return z.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return z.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return z.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return z.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return z.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return z.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return z.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return z.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return z.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return z.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return z.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return z.getDimension(e,"margin-bottom","marginBottom")}}class U{static{this.None=new U(0,0)}constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new U(e,t):this}static is(e){return"object"===typeof e&&"number"===typeof e.height&&"number"===typeof e.width}static lift(e){return e instanceof U?e:new U(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}}function $(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;while(null!==(e=e.parentNode)&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement){i-=e.scrollTop;const o=ie(e)?null:V(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=z.getBorderLeftWidth(e),i+=z.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function q(e,t,i){"number"===typeof t&&(e.style.width=`${t}px`),"number"===typeof i&&(e.style.height=`${i}px`)}function K(e){const t=e.getBoundingClientRect(),i=_(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}function G(e){let t=e,i=1;do{const e=V(t).zoom;null!==e&&void 0!==e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==t.ownerDocument.documentElement);return i}function Q(e){const t=z.getMarginLeft(e)+z.getMarginRight(e);return e.offsetWidth+t}function Y(e){const t=z.getBorderLeftWidth(e)+z.getBorderRightWidth(e),i=z.getPaddingLeft(e)+z.getPaddingRight(e);return e.offsetWidth-t-i}function Z(e){const t=z.getBorderTopWidth(e)+z.getBorderBottomWidth(e),i=z.getPaddingTop(e)+z.getPaddingBottom(e);return e.offsetHeight-t-i}function X(e){const t=z.getMarginTop(e)+z.getMarginBottom(e);return e.offsetHeight+t}function J(e,t){return Boolean(t?.contains(e))}function ee(e,t,i){while(e&&e.nodeType===e.ELEMENT_NODE){if(e.classList.contains(t))return e;if(i)if("string"===typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function te(e,t,i){return!!ee(e,t,i)}function ie(e){return e&&!!e.host&&!!e.mode}function ne(e){return!!oe(e)}function oe(e){while(e.parentNode){if(e===e.ownerDocument?.body)return null;e=e.parentNode}return ie(e)?e:null}function se(){let e=le().activeElement;while(e?.shadowRoot)e=e.shadowRoot.activeElement;return e}function re(e){return se()===e}function ae(e){return J(se(),e)}function le(){if(y()<=1)return f.G.document;const e=Array.from(b()).map((({window:e})=>e.document));return e.find((e=>e.hasFocus()))??f.G.document}function ce(){const e=le();return e.defaultView?.window??f.G}const de=new Map;function ue(){return new he}class he{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=ge(f.G.document.head,(t=>t.innerText=e)))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function ge(e=f.G.document.head,t,i){const n=document.createElement("style");if(n.type="text/css",n.media="screen",t?.(n),e.appendChild(n),i&&i.add((0,u.s)((()=>n.remove()))),e===f.G.document.head){const e=new Set;de.set(n,e);for(const{window:t,disposables:o}of b()){if(t===f.G)continue;const s=o.add(pe(n,e,t));i?.add(s)}}return n}function pe(e,t,i){const n=new u.Cm,o=e.cloneNode(!0);i.document.head.appendChild(o),n.add((0,u.s)((()=>o.remove())));for(const s of ve(e))o.sheet?.insertRule(s.cssText,o.sheet?.cssRules.length);return n.add(fe.observe(e,n,{childList:!0})((()=>{o.textContent=e.textContent}))),t.add(o),n.add((0,u.s)((()=>t.delete(o)))),n}const fe=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));const o=(0,p.tW)(i);let s=n.get(o);if(s)s.users+=1;else{const r=new c.vl,a=new MutationObserver((e=>r.fire(e)));a.observe(e,i);const l=s={users:1,observer:a,onDidMutate:r.event};t.add((0,u.s)((()=>{l.users-=1,0===l.users&&(r.dispose(),a.disconnect(),n?.delete(o),0===n?.size&&this.mutationObservers.delete(e))}))),n.set(o,s)}return s.onDidMutate}};let me=null;function _e(){return me||(me=ge()),me}function ve(e){return e?.sheet?.rules?e.sheet.rules:e?.sheet?.cssRules?e.sheet.cssRules:[]}function be(e,t,i=_e()){if(i&&t){i.sheet?.insertRule(`${e} {${t}}`,0);for(const n of de.get(i)??[])be(e,t,n)}}function ye(e,t=_e()){if(!t)return;const i=ve(t),n=[];for(let o=0;o=0;o--)t.sheet?.deleteRule(n[o]);for(const o of de.get(t)??[])ye(e,o)}function we(e){return"string"===typeof e.selectorText}function Ce(e){return e instanceof HTMLElement||e instanceof _(e).HTMLElement}function Se(e){return e instanceof HTMLAnchorElement||e instanceof _(e).HTMLAnchorElement}function ke(e){return e instanceof SVGElement||e instanceof _(e).SVGElement}function xe(e){return e instanceof MouseEvent||e instanceof _(e).MouseEvent}function Ee(e){return e instanceof KeyboardEvent||e instanceof _(e).KeyboardEvent}const Le={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Tc?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Tc?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Tc?"webkitAnimationIteration":"animationiteration"};function Te(e){const t=e;return!(!t||"function"!==typeof t.preventDefault||"function"!==typeof t.stopPropagation)}const Ie={stop:(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e)};function Re(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function De(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class Ne extends u.jG{static hasFocusWithin(e){if(Ce(e)){const t=oe(e),i=t?t.activeElement:e.ownerDocument.activeElement;return J(i,e)}{const t=e;return J(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new c.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.vl),this.onDidBlur=this._onDidBlur.event;let t=Ne.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,(Ce(e)?_(e):e).setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{const i=Ne.hasFocusWithin(e);i!==t&&(t?o():n())},this._register(I(e,Le.FOCUS,n,!0)),this._register(I(e,Le.BLUR,o,!0)),Ce(e)&&(this._register(I(e,Le.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(I(e,Le.FOCUS_OUT,(()=>this._refreshStateHandler()))))}}function Ae(e){return new Ne(e)}function Oe(e,t){return e.after(t),t}function Pe(e,...t){if(e.append(...t),1===t.length&&"string"!==typeof t[0])return t[0]}function Me(e,t){return e.insertBefore(t,e.firstChild),t}function Fe(e,...t){e.innerText="",Pe(e,...t)}const Be=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var We;function He(e,t,i,...n){const o=Be.exec(t);if(!o)throw new Error("Bad use of emmet");const s=o[1]||"div";let r;return r=e!==We.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{"undefined"!==typeof t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function Ve(e,t,...i){return He(We.HTML,e,t,...i)}function je(e,...t){e?ze(...t):Ue(...t)}function ze(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function Ue(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function $e(e,t){const i=e.devicePixelRatio*t;return Math.max(1,Math.floor(i))/e.devicePixelRatio}function qe(e){f.G.open(e,"_blank","noopener")}function Ke(e,t){const i=()=>{t(),n=B(e,i)};let n=B(e,i);return(0,u.s)((()=>n.dispose()))}function Ge(e){return e?`url('${h.zl.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Qe(e){return`'${e.replace(/'/g,"%27")}'`}function Ye(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=Ye(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}function Ze(e,t=!1){const i=document.createElement("a");return d.$w("afterSanitizeAttributes",(n=>{for(const o of["href","src"])if(n.hasAttribute(o)){const s=n.getAttribute(o);if("href"===o&&s.startsWith("#"))continue;if(i.href=s,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===o&&i.href.startsWith("data:"))continue;n.removeAttribute(o)}}})),(0,u.s)((()=>{d.SV("afterSanitizeAttributes")}))}(function(e){e["HTML"]="http://www.w3.org/1999/xhtml",e["SVG"]="http://www.w3.org/2000/svg"})(We||(We={})),Ve.SVG=function(e,t,...i){return He(We.SVG,e,t,...i)},h.Ez.setPreferredWebSchema(/^https:/.test(f.G.location.href)?"https":"http");const Xe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class Je extends c.vl{constructor(){super(),this._subscriptions=new u.Cm,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(c.Jh.runAndSubscribe(k,(({window:e,disposables:t})=>this.registerListeners(e,t)),{window:f.G,disposables:this._subscriptions}))}registerListeners(e,t){t.add(I(e,"keydown",(e=>{if(e.defaultPrevented)return;const t=new s.Z(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),t.add(I(e,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),t.add(I(e.document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(I(e.document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(I(e.document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),t.add(I(e,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Je.instance||(Je.instance=new Je),Je.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class et extends u.jG{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(I(this.element,Le.DRAG_START,(e=>{this.callbacks.onDragStart?.(e)}))),this.callbacks.onDrag&&this._register(I(this.element,Le.DRAG,(e=>{this.callbacks.onDrag?.(e)}))),this._register(I(this.element,Le.DRAG_ENTER,(e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter?.(e)}))),this._register(I(this.element,Le.DRAG_OVER,(e=>{e.preventDefault(),this.callbacks.onDragOver?.(e,e.timeStamp-this.dragStartTime)}))),this._register(I(this.element,Le.DRAG_LEAVE,(e=>{this.counter--,0===this.counter&&(this.dragStartTime=0,this.callbacks.onDragLeave?.(e))}))),this._register(I(this.element,Le.DRAG_END,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd?.(e)}))),this._register(I(this.element,Le.DROP,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop?.(e)})))}}const tt=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function it(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const o=tt.exec(e);if(!o||!o.groups)throw new Error("Bad use of h");const s=o.groups["tag"]||"div",r=document.createElement(s);o.groups["id"]&&(r.id=o.groups["id"]);const a=[];if(o.groups["class"])for(const c of o.groups["class"].split("."))""!==c&&a.push(c);if(void 0!==i.className)for(const c of i.className.split("."))""!==c&&a.push(c);a.length>0&&(r.className=a.join(" "));const l={};if(o.groups["name"]&&(l[o.groups["name"]]=r),n)for(const c of n)Ce(c)?r.appendChild(c):"string"===typeof c?r.append(c):"root"in c&&(Object.assign(l,c),r.appendChild(c.root));for(const[c,d]of Object.entries(i))if("className"!==c)if("style"===c)for(const[e,t]of Object.entries(d))r.style.setProperty(ot(e),"number"===typeof t?t+"px":""+t);else"tabIndex"===c?r.tabIndex=d:r.setAttribute(ot(c),d.toString());return l["root"]=r,l}function nt(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const o=tt.exec(e);if(!o||!o.groups)throw new Error("Bad use of h");const s=o.groups["tag"]||"div",r=document.createElementNS("http://www.w3.org/2000/svg",s);o.groups["id"]&&(r.id=o.groups["id"]);const a=[];if(o.groups["class"])for(const c of o.groups["class"].split("."))""!==c&&a.push(c);if(void 0!==i.className)for(const c of i.className.split("."))""!==c&&a.push(c);a.length>0&&(r.className=a.join(" "));const l={};if(o.groups["name"]&&(l[o.groups["name"]]=r),n)for(const c of n)Ce(c)?r.appendChild(c):"string"===typeof c?r.append(c):"root"in c&&(Object.assign(l,c),r.appendChild(c.root));for(const[c,d]of Object.entries(i))if("className"!==c)if("style"===c)for(const[e,t]of Object.entries(d))r.style.setProperty(ot(e),"number"===typeof t?t+"px":""+t);else"tabIndex"===c?r.tabIndex=d:r.setAttribute(ot(c),d.toString());return l["root"]=r,l}function ot(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},86501:(e,t,i)=>{"use strict";i.d(t,{$w:()=>te,SV:()=>ie,aj:()=>ee}); +var b=Object.defineProperty,y=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,C=Object.prototype.hasOwnProperty,S=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let o of w(t))C.call(e,o)||o===i||b(e,o,{get:()=>t[o],enumerable:!(n=y(t,o))||n.enumerable});return e},k=(e,t,i)=>(S(e,t,"default"),i&&S(i,t,"default")),x={};k(x,n);var E=class{constructor(e,t,i){this._onDidChange=new x.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},L={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},T={format:L,suggest:{},data:{useDefaultDataProvider:!0}};function I(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===D,documentFormattingEdits:e===D,documentRangeFormattingEdits:e===D}}var D="html",R="handlebars",N="razor",A=H(D,T,I(D)),O=A.defaults,P=H(R,T,I(R)),M=P.defaults,F=H(N,T,I(N)),B=F.defaults;function W(){return i.e(121).then(i.bind(i,24010))}function H(e,t=T,i=I(e)){const n=new E(e,t,i);let o;const s=x.languages.onLanguage(e,(async()=>{o=(await W()).setupMode(n)}));return{defaults:n,dispose(){s.dispose(),o?.dispose(),o=void 0}}}x.languages.html={htmlDefaults:O,razorDefaults:B,handlebarDefaults:M,htmlLanguageService:A,handlebarLanguageService:P,razorLanguageService:F,registerHTMLLanguageService:H};i(49556),i(78481),i(340);self["MonacoEnvironment"]=function(e){function t(e){return e.replace(/\/$/,"")}return{globalAPI:!1,getWorkerUrl:function(n,o){var s=i.p,r=(s?t(s)+"/":"")+e[o];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var a=String(window.location),l=a.substr(0,a.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,l.length)!==l){/^(\/\/)/.test(r)&&(r=window.location.protocol+r);var c="/*"+o+'*/importScripts("'+r+'");',d=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(d)}}return r}}}({editorWorkerService:"editor.worker.js",json:"json.worker.js"})},88758:(e,t,i)=>{"use strict";i.d(t,{Dy:()=>s,H8:()=>d,Qu:()=>f,Tc:()=>c,c8:()=>h,gm:()=>l,m0:()=>g,nr:()=>u,pR:()=>r});var n=i(62484);class o{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new o}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function s(e,t,i){"string"===typeof t&&(t=e.matchMedia(t)),t.addEventListener("change",i)}function r(e){return o.INSTANCE.getZoomFactor(e)}const a=navigator.userAgent,l=a.indexOf("Firefox")>=0,c=a.indexOf("AppleWebKit")>=0,d=a.indexOf("Chrome")>=0,u=!d&&a.indexOf("Safari")>=0,h=!d&&!u&&c,g=(a.indexOf("Electron/"),a.indexOf("Android")>=0);let p=!1;if("function"===typeof n.G.matchMedia){const e=n.G.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=n.G.matchMedia("(display-mode: fullscreen)");p=e.matches,s(n.G,e,(({matches:e})=>{p&&t.matches||(p=e)}))}function f(){return p}},12402:(e,t,i)=>{"use strict";i.d(t,{e:()=>r});var n=i(88758),o=i(62484),s=i(25160);const r={clipboard:{writeText:s.ib||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:s.ib||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>s.ib||n.Qu()?0:navigator.keyboard||n.nr?1:2)(),touch:"ontouchstart"in o.G||navigator.maxTouchPoints>0,pointerEvents:o.G.PointerEvent&&("ontouchstart"in o.G||navigator.maxTouchPoints>0)}},63872:(e,t,i)=>{"use strict";i.d(t,{t:()=>o});var n=i(33911);const o={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:n.K.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},2150:(e,t,i)=>{"use strict";i.d(t,{$:()=>Ve,BC:()=>Pe,BK:()=>K,Be:()=>W,Bx:()=>Le,CE:()=>qe,Cl:()=>ne,Di:()=>Je,Ej:()=>q,Er:()=>xe,Fv:()=>E,H4:()=>Z,Hs:()=>Me,Ij:()=>M,Iv:()=>k,L9:()=>V,Ln:()=>Fe,Mc:()=>nt,OK:()=>X,Oq:()=>F,PG:()=>B,Pl:()=>Oe,Q2:()=>w,QX:()=>J,TT:()=>Xe,Tf:()=>Ge,Tr:()=>Q,U2:()=>ye,U3:()=>P,WU:()=>ze,Wt:()=>be,X7:()=>re,XD:()=>te,Xc:()=>A,ZF:()=>C,a:()=>le,a4:()=>Ze,b2:()=>N,bo:()=>je,bq:()=>se,cL:()=>$,fg:()=>U,fs:()=>Ie,fz:()=>ce,gI:()=>Ye,h:()=>it,i0:()=>Ke,jD:()=>Ue,jG:()=>oe,jh:()=>ue,ko:()=>I,kx:()=>Ee,li:()=>ge,mU:()=>G,nR:()=>ae,nY:()=>Se,pN:()=>et,q3:()=>x,sb:()=>Ce,sd:()=>Te,tG:()=>j,vT:()=>$e,w5:()=>Ae,w_:()=>L,wk:()=>Re,xZ:()=>ke,y6:()=>Y,yt:()=>Qe,zK:()=>De,zk:()=>_});var n=i(88758),o=i(12402),s=i(68389),r=i(46274),a=i(9659),l=i(14396),c=i(40231),d=i(86501),u=i(5091),h=i(6657),g=i(25160),p=i(65647),f=i(62484);const{registerWindow:m,getWindow:_,getDocument:v,getWindows:b,getWindowsCount:y,getWindowId:w,getWindowById:C,hasWindow:S,onDidRegisterWindow:k,onWillUnregisterWindow:x,onDidUnregisterWindow:E}=function(){const e=new Map;(0,f.y)(f.G,1);const t={window:f.G,disposables:new u.Cm};e.set(f.G.vscodeWindowId,t);const i=new c.vl,n=new c.vl,o=new c.vl;function s(i,n){const o="number"===typeof i?e.get(i):void 0;return o??(n?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(t){if(e.has(t.vscodeWindowId))return u.jG.None;const s=new u.Cm,r={window:t,disposables:s.add(new u.Cm)};return e.set(t.vscodeWindowId,r),s.add((0,u.s)((()=>{e.delete(t.vscodeWindowId),n.fire(t)}))),s.add(I(t,Le.BEFORE_UNLOAD,(()=>{o.fire(t)}))),i.fire(r),s},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:s,getWindow(e){const t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;const i=e;return i?.view?i.view.window:f.G},getDocument(e){const t=e;return _(t).document}}}();function L(e){while(e.firstChild)e.firstChild.remove()}class T{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function I(e,t,i,n){return new T(e,t,i,n)}function D(e,t){return function(i){return t(new r.P(e,i))}}function R(e){return function(t){return e(new s.Z(t))}}const N=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t||"contextmenu"===t?o=D(_(e),i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=R(i)),I(e,t,o,n)},A=function(e,t,i){const n=D(_(e),t);return O(e,n,i)};function O(e,t,i){return I(e,g.un&&o.e.pointerEvents?Le.POINTER_DOWN:Le.MOUSE_DOWN,t,i)}function P(e,t,i){return(0,a.b7)(e,t,i)}class M extends a.A0{constructor(e,t){super(e,t)}}let F,B;class W extends a.vb{constructor(e){super(),this.defaultTarget=e&&_(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}}class H{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dz)(e)}}static sort(e,t){return t.priority-e.priority}}function V(e){return _(e).getComputedStyle(e,null)}function j(e,t){const i=_(e),n=i.document;if(e!==n.body)return new U(e.clientWidth,e.clientHeight);if(g.un&&i?.visualViewport)return new U(i.visualViewport.width,i.visualViewport.height);if(i?.innerWidth&&i.innerHeight)return new U(i.innerWidth,i.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new U(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new U(n.documentElement.clientWidth,n.documentElement.clientHeight);if(t)return j(t);throw new Error("Unable to figure out browser width and height")}(function(){const e=new Map,t=new Map,i=new Map,n=new Map,o=o=>{i.set(o,!1);const s=e.get(o)??[];t.set(o,s),e.set(o,[]),n.set(o,!0);while(s.length>0){s.sort(H.sort);const e=s.shift();e.execute()}n.set(o,!1)};B=(t,n,s=0)=>{const r=w(t),a=new H(n,s);let l=e.get(r);return l||(l=[],e.set(r,l)),l.push(a),i.get(r)||(i.set(r,!0),t.requestAnimationFrame((()=>o(r)))),a},F=(e,i,o)=>{const s=w(e);if(n.get(s)){const e=new H(i,o);let n=t.get(s);return n||(n=[],t.set(s,n)),n.push(e),e}return B(e,i,o)}})();class z{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=V(e),o=n?n.getPropertyValue(t):"0";return z.convertToPixels(e,o)}static getBorderLeftWidth(e){return z.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return z.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return z.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return z.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return z.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return z.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return z.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return z.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return z.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return z.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return z.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return z.getDimension(e,"margin-bottom","marginBottom")}}class U{static{this.None=new U(0,0)}constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new U(e,t):this}static is(e){return"object"===typeof e&&"number"===typeof e.height&&"number"===typeof e.width}static lift(e){return e instanceof U?e:new U(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}}function $(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;while(null!==(e=e.parentNode)&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement){i-=e.scrollTop;const o=ie(e)?null:V(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=z.getBorderLeftWidth(e),i+=z.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function q(e,t,i){"number"===typeof t&&(e.style.width=`${t}px`),"number"===typeof i&&(e.style.height=`${i}px`)}function K(e){const t=e.getBoundingClientRect(),i=_(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}function G(e){let t=e,i=1;do{const e=V(t).zoom;null!==e&&void 0!==e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==t.ownerDocument.documentElement);return i}function Q(e){const t=z.getMarginLeft(e)+z.getMarginRight(e);return e.offsetWidth+t}function Y(e){const t=z.getBorderLeftWidth(e)+z.getBorderRightWidth(e),i=z.getPaddingLeft(e)+z.getPaddingRight(e);return e.offsetWidth-t-i}function Z(e){const t=z.getBorderTopWidth(e)+z.getBorderBottomWidth(e),i=z.getPaddingTop(e)+z.getPaddingBottom(e);return e.offsetHeight-t-i}function X(e){const t=z.getMarginTop(e)+z.getMarginBottom(e);return e.offsetHeight+t}function J(e,t){return Boolean(t?.contains(e))}function ee(e,t,i){while(e&&e.nodeType===e.ELEMENT_NODE){if(e.classList.contains(t))return e;if(i)if("string"===typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function te(e,t,i){return!!ee(e,t,i)}function ie(e){return e&&!!e.host&&!!e.mode}function ne(e){return!!oe(e)}function oe(e){while(e.parentNode){if(e===e.ownerDocument?.body)return null;e=e.parentNode}return ie(e)?e:null}function se(){let e=le().activeElement;while(e?.shadowRoot)e=e.shadowRoot.activeElement;return e}function re(e){return se()===e}function ae(e){return J(se(),e)}function le(){if(y()<=1)return f.G.document;const e=Array.from(b()).map((({window:e})=>e.document));return e.find((e=>e.hasFocus()))??f.G.document}function ce(){const e=le();return e.defaultView?.window??f.G}const de=new Map;function ue(){return new he}class he{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=ge(f.G.document.head,(t=>t.innerText=e)))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function ge(e=f.G.document.head,t,i){const n=document.createElement("style");if(n.type="text/css",n.media="screen",t?.(n),e.appendChild(n),i&&i.add((0,u.s)((()=>n.remove()))),e===f.G.document.head){const e=new Set;de.set(n,e);for(const{window:t,disposables:o}of b()){if(t===f.G)continue;const s=o.add(pe(n,e,t));i?.add(s)}}return n}function pe(e,t,i){const n=new u.Cm,o=e.cloneNode(!0);i.document.head.appendChild(o),n.add((0,u.s)((()=>o.remove())));for(const t of ve(e))o.sheet?.insertRule(t.cssText,o.sheet?.cssRules.length);return n.add(fe.observe(e,n,{childList:!0})((()=>{o.textContent=e.textContent}))),t.add(o),n.add((0,u.s)((()=>t.delete(o)))),n}const fe=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));const o=(0,p.tW)(i);let s=n.get(o);if(s)s.users+=1;else{const r=new c.vl,a=new MutationObserver((e=>r.fire(e)));a.observe(e,i);const l=s={users:1,observer:a,onDidMutate:r.event};t.add((0,u.s)((()=>{l.users-=1,0===l.users&&(r.dispose(),a.disconnect(),n?.delete(o),0===n?.size&&this.mutationObservers.delete(e))}))),n.set(o,s)}return s.onDidMutate}};let me=null;function _e(){return me||(me=ge()),me}function ve(e){return e?.sheet?.rules?e.sheet.rules:e?.sheet?.cssRules?e.sheet.cssRules:[]}function be(e,t,i=_e()){if(i&&t){i.sheet?.insertRule(`${e} {${t}}`,0);for(const n of de.get(i)??[])be(e,t,n)}}function ye(e,t=_e()){if(!t)return;const i=ve(t),n=[];for(let t=0;t=0;e--)t.sheet?.deleteRule(n[e]);for(const i of de.get(t)??[])ye(e,i)}function we(e){return"string"===typeof e.selectorText}function Ce(e){return e instanceof HTMLElement||e instanceof _(e).HTMLElement}function Se(e){return e instanceof HTMLAnchorElement||e instanceof _(e).HTMLAnchorElement}function ke(e){return e instanceof SVGElement||e instanceof _(e).SVGElement}function xe(e){return e instanceof MouseEvent||e instanceof _(e).MouseEvent}function Ee(e){return e instanceof KeyboardEvent||e instanceof _(e).KeyboardEvent}const Le={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Tc?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Tc?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Tc?"webkitAnimationIteration":"animationiteration"};function Te(e){const t=e;return!(!t||"function"!==typeof t.preventDefault||"function"!==typeof t.stopPropagation)}const Ie={stop:(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e)};function De(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function Re(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class Ne extends u.jG{static hasFocusWithin(e){if(Ce(e)){const t=oe(e),i=t?t.activeElement:e.ownerDocument.activeElement;return J(i,e)}{const t=e;return J(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new c.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.vl),this.onDidBlur=this._onDidBlur.event;let t=Ne.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,(Ce(e)?_(e):e).setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{const i=Ne.hasFocusWithin(e);i!==t&&(t?o():n())},this._register(I(e,Le.FOCUS,n,!0)),this._register(I(e,Le.BLUR,o,!0)),Ce(e)&&(this._register(I(e,Le.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(I(e,Le.FOCUS_OUT,(()=>this._refreshStateHandler()))))}}function Ae(e){return new Ne(e)}function Oe(e,t){return e.after(t),t}function Pe(e,...t){if(e.append(...t),1===t.length&&"string"!==typeof t[0])return t[0]}function Me(e,t){return e.insertBefore(t,e.firstChild),t}function Fe(e,...t){e.innerText="",Pe(e,...t)}const Be=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var We;function He(e,t,i,...n){const o=Be.exec(t);if(!o)throw new Error("Bad use of emmet");const s=o[1]||"div";let r;return r=e!==We.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{"undefined"!==typeof t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function Ve(e,t,...i){return He(We.HTML,e,t,...i)}function je(e,...t){e?ze(...t):Ue(...t)}function ze(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function Ue(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function $e(e,t){const i=e.devicePixelRatio*t;return Math.max(1,Math.floor(i))/e.devicePixelRatio}function qe(e){f.G.open(e,"_blank","noopener")}function Ke(e,t){const i=()=>{t(),n=B(e,i)};let n=B(e,i);return(0,u.s)((()=>n.dispose()))}function Ge(e){return e?`url('${h.zl.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Qe(e){return`'${e.replace(/'/g,"%27")}'`}function Ye(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=Ye(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}function Ze(e,t=!1){const i=document.createElement("a");return d.$w("afterSanitizeAttributes",(n=>{for(const o of["href","src"])if(n.hasAttribute(o)){const s=n.getAttribute(o);if("href"===o&&s.startsWith("#"))continue;if(i.href=s,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===o&&i.href.startsWith("data:"))continue;n.removeAttribute(o)}}})),(0,u.s)((()=>{d.SV("afterSanitizeAttributes")}))}(function(e){e["HTML"]="http://www.w3.org/1999/xhtml",e["SVG"]="http://www.w3.org/2000/svg"})(We||(We={})),Ve.SVG=function(e,t,...i){return He(We.SVG,e,t,...i)},h.Ez.setPreferredWebSchema(/^https:/.test(f.G.location.href)?"https":"http");const Xe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class Je extends c.vl{constructor(){super(),this._subscriptions=new u.Cm,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(c.Jh.runAndSubscribe(k,(({window:e,disposables:t})=>this.registerListeners(e,t)),{window:f.G,disposables:this._subscriptions}))}registerListeners(e,t){t.add(I(e,"keydown",(e=>{if(e.defaultPrevented)return;const t=new s.Z(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),t.add(I(e,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),t.add(I(e.document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(I(e.document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(I(e.document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),t.add(I(e,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Je.instance||(Je.instance=new Je),Je.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class et extends u.jG{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(I(this.element,Le.DRAG_START,(e=>{this.callbacks.onDragStart?.(e)}))),this.callbacks.onDrag&&this._register(I(this.element,Le.DRAG,(e=>{this.callbacks.onDrag?.(e)}))),this._register(I(this.element,Le.DRAG_ENTER,(e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter?.(e)}))),this._register(I(this.element,Le.DRAG_OVER,(e=>{e.preventDefault(),this.callbacks.onDragOver?.(e,e.timeStamp-this.dragStartTime)}))),this._register(I(this.element,Le.DRAG_LEAVE,(e=>{this.counter--,0===this.counter&&(this.dragStartTime=0,this.callbacks.onDragLeave?.(e))}))),this._register(I(this.element,Le.DRAG_END,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd?.(e)}))),this._register(I(this.element,Le.DROP,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop?.(e)})))}}const tt=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function it(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const o=tt.exec(e);if(!o||!o.groups)throw new Error("Bad use of h");const s=o.groups["tag"]||"div",r=document.createElement(s);o.groups["id"]&&(r.id=o.groups["id"]);const a=[];if(o.groups["class"])for(const e of o.groups["class"].split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(o.groups["name"]&&(l[o.groups["name"]]=r),n)for(const e of n)Ce(e)?r.appendChild(e):"string"===typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(ot(e),"number"===typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(ot(e),t.toString());return l["root"]=r,l}function nt(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const o=tt.exec(e);if(!o||!o.groups)throw new Error("Bad use of h");const s=o.groups["tag"]||"div",r=document.createElementNS("http://www.w3.org/2000/svg",s);o.groups["id"]&&(r.id=o.groups["id"]);const a=[];if(o.groups["class"])for(const e of o.groups["class"].split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(o.groups["name"]&&(l[o.groups["name"]]=r),n)for(const e of n)Ce(e)?r.appendChild(e):"string"===typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(ot(e),"number"===typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(ot(e),t.toString());return l["root"]=r,l}function ot(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},86501:(e,t,i)=>{"use strict";i.d(t,{$w:()=>te,SV:()=>ie,aj:()=>ee}); /*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */ -const{entries:n,setPrototypeOf:o,isFrozen:s,getPrototypeOf:r,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:d}=Object,{apply:u,construct:h}="undefined"!==typeof Reflect&&Reflect;u||(u=function(e,t,i){return e.apply(t,i)}),l||(l=function(e){return e}),c||(c=function(e){return e}),h||(h=function(e,t){return new e(...t)});const g=k(Array.prototype.forEach),p=k(Array.prototype.pop),f=k(Array.prototype.push),m=k(String.prototype.toLowerCase),_=k(String.prototype.toString),v=k(String.prototype.match),b=k(String.prototype.replace),y=k(String.prototype.indexOf),w=k(String.prototype.trim),C=k(RegExp.prototype.test),S=x(TypeError);function k(e){return function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o/gm),j=c(/\${[\w\W]*}/gm),z=c(/^data-[\-\w.\u00B7-\uFFFF]/),U=c(/^aria-[\-\w]+$/),$=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=c(/^(?:\w+script|data):/i),K=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=c(/^html$/i);var Q=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:V,TMPLIT_EXPR:j,DATA_ATTR:z,ARIA_ATTR:U,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:K,DOCTYPE_NAME:G});const Y=()=>"undefined"===typeof window?null:window,Z=function(e,t){if("object"!==typeof e||"function"!==typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(e){return e},createScriptURL(e){return e}})}catch(s){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function X(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const t=e=>X(e);if(t.version="3.0.5",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;const i=e.document,o=i.currentScript;let{document:s}=e;const{DocumentFragment:r,HTMLTemplateElement:a,Node:c,Element:d,NodeFilter:u,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:k,DOMParser:x,trustedTypes:H}=e,V=d.prototype,j=T(V,"cloneNode"),z=T(V,"nextSibling"),U=T(V,"childNodes"),q=T(V,"parentNode");if("function"===typeof a){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let K,J="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ie,getElementsByTagName:ne}=s,{importNode:oe}=i;let se={};t.isSupported="function"===typeof n&&"function"===typeof q&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:re,ERB_EXPR:ae,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:he}=Q;let{IS_ALLOWED_URI:ge}=Q,pe=null;const fe=E({},[...I,...R,...D,...A,...P]);let me=null;const _e=E({},[...M,...F,...B,...W]);let ve=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,ye=null,we=!0,Ce=!0,Se=!1,ke=!0,xe=!1,Ee=!1,Le=!1,Te=!1,Ie=!1,Re=!1,De=!1,Ne=!0,Ae=!1;const Oe="user-content-";let Pe=!0,Me=!1,Fe={},Be=null;const We=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let He=null;const Ve=E({},["audio","video","img","source","image","track"]);let je=null;const ze=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ue="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Ke=qe,Ge=!1,Qe=null;const Ye=E({},[Ue,$e,qe],_);let Ze;const Xe=["application/xhtml+xml","text/html"],Je="text/html";let et,tt=null;const it=s.createElement("form"),nt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(e){if(!tt||tt!==e){if(e&&"object"===typeof e||(e={}),e=L(e),Ze=Ze=-1===Xe.indexOf(e.PARSER_MEDIA_TYPE)?Je:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?_:m,pe="ALLOWED_TAGS"in e?E({},e.ALLOWED_TAGS,et):fe,me="ALLOWED_ATTR"in e?E({},e.ALLOWED_ATTR,et):_e,Qe="ALLOWED_NAMESPACES"in e?E({},e.ALLOWED_NAMESPACES,_):Ye,je="ADD_URI_SAFE_ATTR"in e?E(L(ze),e.ADD_URI_SAFE_ATTR,et):ze,He="ADD_DATA_URI_TAGS"in e?E(L(Ve),e.ADD_DATA_URI_TAGS,et):Ve,Be="FORBID_CONTENTS"in e?E({},e.FORBID_CONTENTS,et):We,be="FORBID_TAGS"in e?E({},e.FORBID_TAGS,et):{},ye="FORBID_ATTR"in e?E({},e.FORBID_ATTR,et):{},Fe="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Ee=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,De=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,Ne=!1!==e.SANITIZE_DOM,Ae=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,Me=e.IN_PLACE||!1,ge=e.ALLOWED_URI_REGEXP||$,Ke=e.NAMESPACE||qe,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&nt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&nt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(Ce=!1),Re&&(Ie=!0),Fe&&(pe=E({},[...P]),me=[],!0===Fe.html&&(E(pe,I),E(me,M)),!0===Fe.svg&&(E(pe,R),E(me,F),E(me,W)),!0===Fe.svgFilters&&(E(pe,D),E(me,F),E(me,W)),!0===Fe.mathMl&&(E(pe,A),E(me,B),E(me,W))),e.ADD_TAGS&&(pe===fe&&(pe=L(pe)),E(pe,e.ADD_TAGS,et)),e.ADD_ATTR&&(me===_e&&(me=L(me)),E(me,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&E(je,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Be===We&&(Be=L(Be)),E(Be,e.FORBID_CONTENTS,et)),Pe&&(pe["#text"]=!0),Ee&&E(pe,["html","head","body"]),pe.table&&(E(pe,["tbody"]),delete be.tbody),e.TRUSTED_TYPES_POLICY){if("function"!==typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');K=e.TRUSTED_TYPES_POLICY,J=K.createHTML("")}else void 0===K&&(K=Z(H,o)),null!==K&&"string"===typeof J&&(J=K.createHTML(""));l&&l(e),tt=e}},st=E({},["mi","mo","mn","ms","mtext"]),rt=E({},["foreignobject","desc","title","annotation-xml"]),at=E({},["title","style","font","a","script"]),lt=E({},R);E(lt,D),E(lt,N);const ct=E({},A);E(ct,O);const dt=function(e){let t=q(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});const i=m(e.tagName),n=m(t.tagName);return!!Qe[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===qe?"svg"===i:t.namespaceURI===Ue?"svg"===i&&("annotation-xml"===n||st[n]):Boolean(lt[i]):e.namespaceURI===Ue?t.namespaceURI===qe?"math"===i:t.namespaceURI===$e?"math"===i&&rt[n]:Boolean(ct[i]):e.namespaceURI===qe?!(t.namespaceURI===$e&&!rt[n])&&(!(t.namespaceURI===Ue&&!st[n])&&(!ct[i]&&(at[i]||!lt[i]))):!("application/xhtml+xml"!==Ze||!Qe[e.namespaceURI]))},ut=function(e){f(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(i){e.remove()}},ht=function(e,i){try{f(t.removed,{attribute:i.getAttributeNode(e),from:i})}catch(n){f(t.removed,{attribute:null,from:i})}if(i.removeAttribute(e),"is"===e&&!me[e])if(Ie||Re)try{ut(i)}catch(n){}else try{i.setAttribute(e,"")}catch(n){}},gt=function(e){let t,i;if(Te)e=""+e;else{const t=v(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===Ze&&Ke===qe&&(e=''+e+"");const n=K?K.createHTML(e):e;if(Ke===qe)try{t=(new x).parseFromString(n,Ze)}catch(r){}if(!t||!t.documentElement){t=ee.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Ge?J:n}catch(r){}}const o=t.body||t.documentElement;return e&&i&&o.insertBefore(s.createTextNode(i),o.childNodes[0]||null),Ke===qe?ne.call(t,Ee?"html":"body")[0]:Ee?t.documentElement:o},pt=function(e){return te.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},ft=function(e){return e instanceof k&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof h)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore||"function"!==typeof e.hasChildNodes)},mt=function(e){return"object"===typeof c?e instanceof c:e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName},_t=function(e,i,n){se[e]&&g(se[e],(e=>{e.call(t,i,n,tt)}))},vt=function(e){let i;if(_t("beforeSanitizeElements",e,null),ft(e))return ut(e),!0;const n=et(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:n,allowedTags:pe}),e.hasChildNodes()&&!mt(e.firstElementChild)&&(!mt(e.content)||!mt(e.content.firstElementChild))&&C(/<[/\w]/g,e.innerHTML)&&C(/<[/\w]/g,e.textContent))return ut(e),!0;if(!pe[n]||be[n]){if(!be[n]&&yt(n)){if(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,n))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))return!1}if(Pe&&!Be[n]){const t=q(e)||e.parentNode,i=U(e)||e.childNodes;if(i&&t){const n=i.length;for(let o=n-1;o>=0;--o)t.insertBefore(j(i[o],!0),z(e))}}return ut(e),!0}return e instanceof d&&!dt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!C(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(i=e.textContent,i=b(i,re," "),i=b(i,ae," "),i=b(i,le," "),e.textContent!==i&&(f(t.removed,{element:e.cloneNode()}),e.textContent=i)),_t("afterSanitizeElements",e,null),!1):(ut(e),!0)},bt=function(e,t,i){if(Ne&&("id"===t||"name"===t)&&(i in s||i in it))return!1;if(Ce&&!ye[t]&&C(ce,t));else if(we&&C(de,t));else if(!me[t]||ye[t]){if(!(yt(e)&&(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&C(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,i)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(i))))return!1}else if(je[t]);else if(C(ge,b(i,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(i,"data:")||!He[e]){if(Se&&!C(ue,b(i,he,"")));else if(i)return!1}else;return!0},yt=function(e){return e.indexOf("-")>0},wt=function(e){let i,n,o,s;_t("beforeSanitizeAttributes",e,null);const{attributes:r}=e;if(!r)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};s=r.length;while(s--){i=r[s];const{name:c,namespaceURI:d}=i;if(n="value"===c?i.value:w(i.value),o=et(c),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,_t("uponSanitizeAttribute",e,a),n=a.attrValue,a.forceKeepAttr)continue;if(ht(c,e),!a.keepAttr)continue;if(!ke&&C(/\/>/i,n)){ht(c,e);continue}xe&&(n=b(n,re," "),n=b(n,ae," "),n=b(n,le," "));const u=et(e.nodeName);if(bt(u,o,n)){if(!Ae||"id"!==o&&"name"!==o||(ht(c,e),n=Oe+n),K&&"object"===typeof H&&"function"===typeof H.getAttributeType)if(d);else switch(H.getAttributeType(u,o)){case"TrustedHTML":n=K.createHTML(n);break;case"TrustedScriptURL":n=K.createScriptURL(n);break}try{d?e.setAttributeNS(d,c,n):e.setAttribute(c,n),p(t.removed)}catch(l){}}}_t("afterSanitizeAttributes",e,null)},Ct=function e(t){let i;const n=pt(t);_t("beforeSanitizeShadowDOM",t,null);while(i=n.nextNode())_t("uponSanitizeShadowNode",i,null),vt(i)||(i.content instanceof r&&e(i.content),wt(i));_t("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(e){let n,o,s,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ge=!e,Ge&&(e="\x3c!--\x3e"),"string"!==typeof e&&!mt(e)){if("function"!==typeof e.toString)throw S("toString is not a function");if(e=e.toString(),"string"!==typeof e)throw S("dirty is not a string, aborting")}if(!t.isSupported)return e;if(Le||ot(l),t.removed=[],"string"===typeof e&&(Me=!1),Me){if(e.nodeName){const t=et(e.nodeName);if(!pe[t]||be[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)n=gt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ie&&!xe&&!Ee&&-1===e.indexOf("<"))return K&&De?K.createHTML(e):e;if(n=gt(e),!n)return Ie?null:De?J:""}n&&Te&&ut(n.firstChild);const d=pt(Me?e:n);while(s=d.nextNode())vt(s)||(s.content instanceof r&&Ct(s.content),wt(s));if(Me)return e;if(Ie){if(Re){a=ie.call(n.ownerDocument);while(n.firstChild)a.appendChild(n.firstChild)}else a=n;return(me.shadowroot||me.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let u=Ee?n.outerHTML:n.innerHTML;return Ee&&pe["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&C(G,n.ownerDocument.doctype.name)&&(u="\n"+u),xe&&(u=b(u,re," "),u=b(u,ae," "),u=b(u,le," ")),K&&De?K.createHTML(u):u},t.setConfig=function(e){ot(e),Le=!0},t.clearConfig=function(){tt=null,Le=!1},t.isValidAttribute=function(e,t,i){tt||ot({});const n=et(e),o=et(t);return bt(n,o,i)},t.addHook=function(e,t){"function"===typeof t&&(se[e]=se[e]||[],f(se[e],t))},t.removeHook=function(e){if(se[e])return p(se[e])},t.removeHooks=function(e){se[e]&&(se[e]=[])},t.removeAllHooks=function(){se={}},t}var J=X();J.version,J.isSupported;const ee=J.sanitize,te=(J.setConfig,J.clearConfig,J.isValidAttribute,J.addHook),ie=J.removeHook;J.removeHooks,J.removeAllHooks},49822:(e,t,i)=>{"use strict";i.d(t,{f:()=>o});var n=i(40231);class o{get event(){return this.emitter.event}constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.vl({onWillAddFirstListener:()=>e.addEventListener(t,o,i),onDidRemoveLastListener:()=>e.removeEventListener(t,o,i)})}dispose(){this.emitter.dispose()}}},76892:(e,t,i)=>{"use strict";i.d(t,{D:()=>n,Z:()=>s});class n{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=o(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=o(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=o(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=o(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=o(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=o(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=o(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=o(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=o(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=o(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=o(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return"number"===typeof e?`${e}px`:e}function s(e){return new n(e)}},40628:(e,t,i)=>{"use strict";i.d(t,{z:()=>o});var n=i(25160);const o=n.uF?'"Segoe WPC", "Segoe UI", sans-serif':n.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'},60934:(e,t,i)=>{"use strict";i.d(t,{S5:()=>o,n:()=>r,yk:()=>s});var n=i(2150);function o(e,t={}){const i=r(t);return i.textContent=e,i}function s(e,t={}){const i=r(t);return l(i,c(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,o){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&o)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.b2(e,"click",(e=>{i.callback(String(t.index),e)}))),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach((e=>{l(s,e,i,o)}))}function c(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new a(e);while(!r.eos()){let e=r.next();const i="\\"===e&&0!==u(r.peek(),t);if(i&&(e=r.next()),!i&&d(e,t)&&e===r.peek()){r.advance(),2===o.type&&(o=s.pop());const i=u(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}else if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e}return 2===o.type&&(o=s.pop()),s.length,i}function d(e,t){return 0!==u(e,t)}function u(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},80125:(e,t,i)=>{"use strict";i.d(t,{_:()=>s});var n=i(2150),o=i(5091);class s{constructor(){this._hooks=new o.Cm,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,s,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,o.s)((()=>{try{e.releasePointerCapture(t)}catch(i){}})))}catch(l){a=n.zk(e)}this._hooks.add(n.ko(a,n.Bx.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(n.ko(a,n.Bx.POINTER_UP,(e=>this.stopMonitoring(!0))))}}},68389:(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});var n=i(88758),o=i(91348),s=i(48770),r=i(25160);function a(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return o.YM.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.gm)switch(t){case 59:return 85;case 60:if(r.j9)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(r.zx)return 57;break}else if(n.Tc){if(r.zx&&93===t)return 57;if(!r.zx&&92===t)return 57}return o.uw[t]||0}const l=r.zx?256:2048,c=512,d=1024,u=r.zx?2048:256;class h{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=a(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=l),this.altKey&&(t|=c),this.shiftKey&&(t|=d),this.metaKey&&(t|=u),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new s.dG(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},44964:(e,t,i)=>{"use strict";i.d(t,{Gc:()=>R,R9:()=>F});var n=i(2150),o=i(86501),s=i(49822),r=i(60934),a=i(68389),l=i(46274),c=i(84653),d=i(14396),u=i(40231),h=i(42325),g=i(74529),p=i(23453),f=i(85661),m=i(5091);let _={};(function(){function e(e,t){t(_)}e.amd=!0,function(t,i){"function"===typeof e&&e.amd?e(["exports"],i):"object"===typeof exports?i(exports):(t="undefined"!==typeof globalThis?globalThis:t||self,i(t.marked={}))}(this,(function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(t){e.defaults=t}e.defaults=t();const n=/[&<>"']/,o=new RegExp(n.source,"g"),s=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,r=new RegExp(s.source,"g"),a={"&":"&","<":"<",">":">",'"':""","'":"'"},l=e=>a[e];function c(e,t){if(t){if(n.test(e))return e.replace(o,l)}else if(s.test(e))return e.replace(r,l);return e}const d=/(^|[^\[])\^/g;function u(e,t){let i="string"===typeof e?e:e.source;t=t||"";const n={replace:(e,t)=>{let o="string"===typeof t?t:t.source;return o=o.replace(d,"$1"),i=i.replace(e,o),n},getRegex:()=>new RegExp(i,t)};return n}function h(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const g={exec:()=>null};function p(e,t){const i=e.replace(/\|/g,((e,t,i)=>{let n=!1,o=t;while(--o>=0&&"\\"===i[o])n=!n;return n?"|":" |"})),n=i.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else while(n.length{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=n.length?e.slice(n.length):e})).join("\n")}class b{options;rules;lexer;constructor(t){this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:f(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=v(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=f(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:f(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=f(t[0],"\n").split("\n"),i="",n="";const o=[];while(e.length>0){let t=!1;const s=[];let r;for(r=0;r/.test(e[r]))s.push(e[r]),t=!0;else{if(t)break;s.push(e[r])}e=e.slice(r);const a=s.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}\n${a}`:a,n=n?`${n}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;const d=o[o.length-1];if("code"===d?.type)break;if("blockquote"===d?.type){const t=d,s=t.raw+"\n"+e.join("\n"),r=this.blockquote(s);o[o.length-1]=r,i=i.substring(0,i.length-t.raw.length)+r.raw,n=n.substring(0,n.length-t.text.length)+r.text;break}if("list"!==d?.type);else{const t=d,s=t.raw+"\n"+e.join("\n"),r=this.list(s);o[o.length-1]=r,i=i.substring(0,i.length-d.raw.length)+r.raw,n=n.substring(0,n.length-t.raw.length)+r.raw,e=s.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,o={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const s=new RegExp(`^( {0,3}${i})((?:[\t ][^\\n]*)?(?:\\n|$))`);let r=!1;while(e){let i=!1,n="",a="";if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],d=!l.trim(),u=0;if(this.options.pedantic?(u=2,a=l.trimStart()):d?u=t[1].length+1:(u=t[2].search(/[^ ]/),u=u>4?1:u,a=l.slice(u),u+=t[1].length),d&&/^ *$/.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),i=!0),!i){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);while(e){const r=e.split("\n",1)[0];if(c=r,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),o.test(c))break;if(s.test(c))break;if(t.test(c))break;if(i.test(e))break;if(c.search(/[^ ]/)>=u||!c.trim())a+="\n"+c.slice(u);else{if(d)break;if(l.search(/[^ ]/)>=4)break;if(o.test(l))break;if(s.test(l))break;if(i.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),n+=r+"\n",e=e.substring(r.length+1),l=c.slice(u)}}o.loose||(r?o.loose=!0:/\n *\n *$/.test(n)&&(r=!0));let h,g=null;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(h="[ ] "!==g[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:n,task:!!g,checked:h,loose:!1,text:a,tokens:[]}),o.raw+=n}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),i=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=i}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const i=p(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const e of n)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:s.align[t]}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:c(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=f(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=m(t[2],"()");if(e>-1){const i=0===t[0].indexOf("!")?5:4,n=i+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^$/.test(e)?i.slice(1):i.slice(1,-1)),_(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=(i[2]||i[1]).replace(/\s+/g," "),n=t[e.toLowerCase()];if(!n){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return _(i,n,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n)return;if(n[3]&&i.match(/[\p{L}\p{N}]/u))return;const o=n[1]||n[2]||"";if(!o||!i||this.rules.inline.punctuation.exec(i)){const i=[...n[0]].length-1;let o,s,r=i,a=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;l.lastIndex=0,t=t.slice(-1*e.length+i);while(null!=(n=l.exec(t))){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){r+=s;continue}if((n[5]||n[6])&&i%3&&!((i+s)%3)){a+=s;continue}if(r-=s,r>0)continue;s=Math.min(s,s+r+a);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+s);if(Math.min(i,s)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=c(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=c(t[1]),i="mailto:"+e):(e=c(t[1]),i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,i;if("@"===t[2])e=c(t[0]),i="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(n!==t[0]);e=c(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:c(t[0]),{type:"text",raw:t[0],text:e}}}}const y=/^(?: *(?:\n|$))+/,w=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,C=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,S=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,k=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,x=/(?:[*+-]|\d{1,9}[.)])/,E=u(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,x).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),L=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,T=/^[^\n]+/,I=/(?!\s*\])(?:\\.|[^\[\]\\])+/,R=u(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",I).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),D=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,x).getRegex(),N="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",A=/|$))/,O=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",A).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),P=u(L).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),M=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",P).getRegex(),F={blockquote:M,code:w,def:R,fences:C,heading:k,hr:S,html:O,lheading:E,list:D,newline:y,paragraph:P,table:g,text:T},B=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),W={...F,table:B,paragraph:u(L).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",B).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex()},H={...F,html:u("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",A).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(L).replace("hr",S).replace("heading"," *#{1,6} *[^\n]").replace("lheading",E).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},V=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,j=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,z=/^( {2,}|\\)\n(?!\s*$)/,U=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,G=u(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,$).getRegex(),Q=u("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,$).getRegex(),Y=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,$).getRegex(),Z=u(/\\([punct])/,"gu").replace(/punct/g,$).getRegex(),X=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),J=u(A).replace("(?:--\x3e|$)","--\x3e").getRegex(),ee=u("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",J).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ie=u(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ne=u(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",I).getRegex(),oe=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",I).getRegex(),se=u("reflink|nolink(?!\\()","g").replace("reflink",ne).replace("nolink",oe).getRegex(),re={_backpedal:g,anyPunctuation:Z,autolink:X,blockSkip:K,br:z,code:j,del:g,emStrongLDelim:G,emStrongRDelimAst:Q,emStrongRDelimUnd:Y,escape:V,link:ie,nolink:oe,punctuation:q,reflink:ne,reflinkSearch:se,tag:ee,text:U,url:g},ae={...re,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},le={...re,escape:u(V).replace("])","~|])").getRegex(),url:u(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(i.length)));while(e)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?t.push(n):(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(o.raw+="\n"+n.raw,o.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},i),"number"===typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))o=t[t.length-1],i&&"paragraph"===o?.type?(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n),i=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),o=t[t.length-1],o&&"text"===o.type?(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,o,s,r,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)while(null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(l)))e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(s=this.tokenizer.rules.inline.blockSkip.exec(l)))l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(l)))l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);while(e)if(r||(a=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,l,a))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},i),"number"===typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(o))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),r=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}class ge{options;parser;constructor(t){this.options=t||e.defaults}space(e){return""}code({text:e,lang:t,escaped:i}){const n=(t||"").match(/^\S*/)?.[0],o=e.replace(/\n$/,"")+"\n";return n?'
'+(i?o:c(o,!0))+"
\n":"
"+(i?o:c(o,!0))+"
\n"}blockquote({tokens:e}){const t=this.parser.parse(e);return`
\n${t}
\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,i=e.start;let n="";for(let r=0;r\n"+n+"\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",i="";for(let o=0;o${n}`),"\n\n"+t+"\n"+n+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td",n=e.align?`<${i} align="${e.align}">`:`<${i}>`;return n+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:i}){const n=this.parser.parseInline(i),o=h(e);if(null===o)return n;e=o;let s='
    ",s}image({href:e,title:t,text:i}){const n=h(e);if(null===n)return i;e=n;let o=`${i}{const o=e[n].flat(1/0);i=i.concat(this.walkTokens(o,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const i={...e};if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const i=t.renderers[e.name];t.renderers[e.name]=i?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=i.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const i=t[e.level];i?i.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),i.extensions=t),e.renderer){const t=this.defaults.renderer||new ge(this.defaults);for(const i in e.renderer){if(!(i in t))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const n=i,o=e.renderer[n],s=t[n];t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i||""}}i.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new b(this.defaults);for(const i in e.tokenizer){if(!(i in t))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const n=i,o=e.tokenizer[n],s=t[n];t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i}}i.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new me;for(const i in e.hooks){if(!(i in t))throw new Error(`hook '${i}' does not exist`);if("options"===i)continue;const n=i,o=e.hooks[n],s=t[n];me.passThroughHooks.has(i)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const i=o.call(t,e);return s.call(t,i)}:t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i}}i.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;i.walkTokens=function(e){let i=[];return i.push(n.call(this,e)),t&&(i=i.concat(t.call(this,e))),i}}this.defaults={...this.defaults,...i}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return he.lex(e,t??this.defaults)}parser(e,t){return fe.parse(e,t??this.defaults)}parseMarkdown(e,t){const i=(i,n)=>{const o={...n},s={...this.defaults,...o},r=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===o.async)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof i||null===i)return r(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof i)return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(i):i).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(r);try{s.hooks&&(i=s.hooks.preprocess(i));let n=e(i,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let o=t(n,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(a){return r(a)}};return i}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+c(i.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const ve=new _e;function be(e,t){return ve.parse(e,t)}be.options=be.setOptions=function(e){return ve.setOptions(e),be.defaults=ve.defaults,i(be.defaults),be},be.getDefaults=t,be.defaults=e.defaults,be.use=function(...e){return ve.use(...e),be.defaults=ve.defaults,i(be.defaults),be},be.walkTokens=function(e,t){return ve.walkTokens(e,t)},be.parseInline=ve.parseInline,be.Parser=fe,be.parser=fe.parse,be.Renderer=ge,be.TextRenderer=pe,be.Lexer=he,be.lexer=he.lex,be.Tokenizer=b,be.Hooks=me,be.parse=be;const ye=be.options,we=be.setOptions,Ce=be.use,Se=be.walkTokens,ke=be.parseInline,xe=be,Ee=fe.parse,Le=he.lex;e.Hooks=me,e.Lexer=he,e.Marked=_e,e.Parser=fe,e.Renderer=ge,e.TextRenderer=pe,e.Tokenizer=b,e.getDefaults=t,e.lexer=Le,e.marked=be,e.options=ye,e.parse=xe,e.parseInline=ke,e.parser=Ee,e.setOptions=we,e.use=Ce,e.walkTokens=Se}))})();_.Hooks||exports.Hooks,_.Lexer||exports.Lexer,_.Marked||exports.Marked,_.Parser||exports.Parser;var v=_.Renderer||exports.Renderer,b=(_.TextRenderer||exports.TextRenderer,_.Tokenizer||exports.Tokenizer,_.defaults||exports.defaults),y=(_.getDefaults||exports.getDefaults,_.lexer||exports.lexer),w=(_.marked||exports.marked,_.options||exports.options,_.parse||exports.parse),C=(_.parseInline||exports.parseInline,_.parser||exports.parser),S=(_.setOptions||exports.setOptions,_.use||exports.use,_.walkTokens||exports.walkTokens,i(61565)),k=i(6657),x=i(85603),E=i(84366),L=i(20601),T=i(29133);const I=Object.freeze({image:({href:e,title:t,text:i})=>{let n=[],o=[];return e&&(({href:e,dimensions:n}=(0,h.nI)(e)),o.push(`src="${(0,h.oO)(e)}"`)),i&&o.push(`alt="${(0,h.oO)(i)}"`),t&&o.push(`title="${(0,h.oO)(t)}"`),n.length&&(o=o.concat(n)),""},paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `},link({href:e,title:t,tokens:i}){let n=this.parser.parseInline(i);return"string"!==typeof e?"":(e===n&&(n=(0,h._W)(n)),t="string"===typeof t?(0,h.oO)((0,h._W)(t)):"",e=(0,h._W)(e),e=e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${n}`)}});function R(e,t={},i={}){const o=new m.Cm;let h=!1;const f=(0,r.n)(t),_=function(t){let i;try{i=(0,S.qg)(decodeURIComponent(t))}catch(n){}return i?(i=(0,x.PI)(i,(t=>e.uris&&e.uris[t]?T.r.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},E=function(t,i){const n=e.uris&&e.uris[t];let o=T.r.revive(n);return i?t.startsWith(k.ny.data+":")?t:(o||(o=T.r.parse(t)),k.zl.uriToBrowserUri(o).toString(!0)):o?T.r.parse(t).toString()===o.toString()?t:(o.query&&(o=o.with({query:_(o.query)})),o.toString()):t},R=new v;R.image=I.image,R.link=I.link,R.paragraph=I.paragraph;const A=[],P=[];if(t.codeBlockRendererSync?R.code=({text:e,lang:i})=>{const n=p.r.nextId(),o=t.codeBlockRendererSync(D(i),e);return P.push([n,o]),`
    ${(0,L.ih)(e)}
    `}:t.codeBlockRenderer&&(R.code=({text:e,lang:i})=>{const n=p.r.nextId(),o=t.codeBlockRenderer(D(i),e);return A.push(o.then((e=>[n,e]))),`
    ${(0,L.ih)(e)}
    `}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let o=n.dataset["href"];o&&(e.baseUri&&(o=N(T.r.from(e.baseUri),o)),t.actionHandler.callback(o,i))}catch(o){(0,d.dz)(o)}finally{i.preventDefault()}},o=t.actionHandler.disposables.add(new s.f(f,"click")),r=t.actionHandler.disposables.add(new s.f(f,"auxclick"));t.actionHandler.disposables.add(u.Jh.any(o.event,r.event)((e=>{const t=new l.P(n.zk(f),e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(n.ko(f,"keydown",(e=>{const t=new a.Z(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(R.html=({text:i})=>{if(t.sanitizerOptions?.replaceWithPlaintext)return(0,L.ih)(i);const n=e.isTrusted?i.match(/^(]+>)|(<\/\s*span>)$/):void 0;return n?i:""}),i.renderer=R;let M,F=e.value??"";if(F.length>1e5&&(F=`${F.substr(0,1e5)}…`),e.supportThemeIcons&&(F=(0,g.sA)(F)),t.fillInIncompleteTokens){const e={...b,...i},t=y(F,e),n=Q(t);M=C(n,e)}else M=w(F,{...i,async:!1});if(e.supportThemeIcons){const e=(0,c.n)(M);M=e.map((e=>"string"===typeof e?e:e.outerHTML)).join("")}const B=new DOMParser,W=B.parseFromString(O({isTrusted:e.isTrusted,...t.sanitizerOptions},M),"text/html");if(W.body.querySelectorAll("img, audio, video, source").forEach((i=>{const o=i.getAttribute("src");if(o){let r=o;try{e.baseUri&&(r=N(T.r.from(e.baseUri),r))}catch(s){}if(i.setAttribute("src",E(r,!0)),t.remoteImageIsAllowed){const e=T.r.parse(r);e.scheme===k.ny.file||e.scheme===k.ny.data||t.remoteImageIsAllowed(e)||i.replaceWith(n.$("",void 0,i.outerHTML))}}})),W.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=E(i,!1);e.baseUri&&(n=N(T.r.from(e.baseUri),i)),t.dataset.href=n}})),f.innerHTML=O({isTrusted:e.isTrusted,...t.sanitizerOptions},W.body.innerHTML),A.length>0)Promise.all(A).then((e=>{if(h)return;const i=new Map(e),o=f.querySelectorAll("div[data-code]");for(const t of o){const e=i.get(t.dataset["code"]??"");e&&n.Ln(t,e)}t.asyncRenderCallback?.()}));else if(P.length>0){const e=new Map(P),t=f.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(i.dataset["code"]??"");t&&n.Ln(i,t)}}if(t.asyncRenderCallback)for(const s of f.getElementsByTagName("img")){const e=o.add(n.ko(s,"load",(()=>{e.dispose(),t.asyncRenderCallback()})))}return{element:f,dispose:()=>{h=!0,o.dispose()}}}function D(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function N(e,t){const i=/^\w[\w\d+.-]*:/.test(t);return i?t:e.path.endsWith("/")?(0,E.o1)(e,t).toString():(0,E.o1)((0,E.pD)(e),t).toString()}const A=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function O(e,t){const{config:i,allowedSchemes:s}=M(e),r=new m.Cm;r.add(ae("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName){if("INPUT"===e.tagName&&"checkbox"===e.attributes.getNamedItem("type")?.value){if("type"===t.attrName&&"checkbox"===t.attrValue||"disabled"===t.attrName||"checked"===t.attrName)return void(t.keepAttr=!0);t.keepAttr=!1}}else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}))),r.add(ae("uponSanitizeElement",((t,i)=>{if("input"===i.tagName&&("checkbox"===t.attributes.getNamedItem("type")?.value?t.setAttribute("disabled",""):e.replaceWithPlaintext||t.remove()),e.replaceWithPlaintext&&!i.allowedTags[i.tagName]&&"body"!==i.tagName&&t.parentElement){let e,n;if("#comment"===i.tagName)e=`\x3c!--${t.textContent}--\x3e`;else{const o=A.includes(i.tagName),s=t.attributes.length?" "+Array.from(t.attributes).map((e=>`${e.name}="${e.value}"`)).join(" "):"";e=`<${i.tagName}${s}>`,o||(n=``)}const o=document.createDocumentFragment(),s=t.parentElement.ownerDocument.createTextNode(e);o.appendChild(s);const r=n?t.parentElement.ownerDocument.createTextNode(n):void 0;while(t.firstChild)o.appendChild(t.firstChild);r&&o.appendChild(r),t.parentElement.replaceChild(o,t)}}))),r.add(n.a4(s));try{return o.aj(t,{...i,RETURN_TRUSTED_TYPE:!0})}finally{r.dispose()}}const P=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];function M(e){const t=[k.ny.http,k.ny.https,k.ny.mailto,k.ny.data,k.ny.file,k.ny.vscodeFileResource,k.ny.vscodeRemote,k.ny.vscodeRemoteResource];return e.isTrusted&&t.push(k.ny.command),{config:{ALLOWED_TAGS:e.allowedTags??[...n.TT],ALLOWED_ATTR:P,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}function F(e){return"string"===typeof e?e:B(e)}function B(e,t){let i=e.value??"";i.length>1e5&&(i=`${i.substr(0,1e5)}…`);const n=w(i,{async:!1,renderer:t?j.value:V.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>W.get(e)??e));return O({isTrusted:!1},n).toString()}const W=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function H(){const e=new v;return e.code=({text:e})=>e,e.blockquote=({text:e})=>e+"\n",e.html=e=>"",e.heading=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.hr=()=>"",e.list=function({items:e}){return e.map((e=>this.listitem(e))).join("\n")+"\n"},e.listitem=({text:e})=>e+"\n",e.paragraph=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.table=function({header:e,rows:t}){return e.map((e=>this.tablecell(e))).join(" ")+"\n"+t.map((e=>e.map((e=>this.tablecell(e))).join(" "))).join("\n")+"\n"},e.tablerow=({text:e})=>e,e.tablecell=function({tokens:e}){return this.parser.parseInline(e)},e.strong=({text:e})=>e,e.em=({text:e})=>e,e.codespan=({text:e})=>e,e.br=e=>"\n",e.del=({text:e})=>e,e.image=e=>"",e.text=({text:e})=>e,e.link=({text:e})=>e,e}const V=new f.d((e=>H())),j=new f.d((()=>{const e=H();return e.code=({text:e})=>`\n\`\`\`\n${e}\n\`\`\`\n`,e}));function z(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function U(e){if(e.tokens)for(let t=e.tokens.length-1;t>=0;t--){const i=e.tokens[t];if("text"===i.type){const n=i.raw.split("\n"),o=n[n.length-1];if(o.includes("`"))return Z(e);if(o.includes("**"))return ne(e);if(o.match(/\*\w/))return X(e);if(o.match(/(^|\s)__\w/))return oe(e);if(o.match(/(^|\s)_\w/))return J(e);if($(o)||q(o)&&e.tokens.slice(0,t).some((e=>"text"===e.type&&e.raw.match(/\[[^\]]*$/)))){const i=e.tokens.slice(t+1);return"link"===i[0]?.type&&"text"===i[1]?.type&&i[1].raw.match(/^ *"[^"]*$/)||o.match(/^[^"]* +"[^"]*$/)?te(e):ee(e)}if(o.match(/(^|\s)\[\w*/))return ie(e)}}}function $(e){return!!e.match(/(^|\s)\[.*\]\(\w*/)}function q(e){return!!e.match(/^[^\[]*\]\([^\)]*$/)}function K(e){const t=e.items[e.items.length-1],i=t.tokens?t.tokens[t.tokens.length-1]:void 0;let n;if("text"!==i?.type||"inRawBlock"in t||(n=U(i)),!n||"paragraph"!==n.type)return;const o=z(e.items.slice(0,-1)),s=t.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!s)return;const r=s+z(t.tokens.slice(0,-1))+n.raw,a=y(o+r)[0];return"list"===a.type?a:void 0}const G=3;function Q(e){for(let t=0;t0){const e=o?i.slice(0,-1).join("\n"):t,s=!!e.match(/\|\s*$/),r=e+(s?"":"|")+`\n|${" --- |".repeat(n)}`;return y(r)}}function ae(e,t){return o.$w(e,t),(0,m.s)((()=>o.SV(e)))}},46274:(e,t,i)=>{"use strict";i.d(t,{P:()=>l,$:()=>c});var n=i(88758);const o=new WeakMap;function s(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return null}catch(t){return null}return e.parent}class r{static getSameOriginWindowChain(e){let t=o.get(e);if(!t){t=[],o.set(e,t);let i,n=e;do{i=s(n),i?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=i}while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const o=this.getSameOriginWindowChain(e);for(const s of o){const e=s.window.deref();if(i+=e?.scrollY??0,n+=e?.scrollX??0,e===t)break;if(!s.iframeElement)break;const o=s.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}var a=i(25160);class l{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=0===t.button,this.middleButton=1===t.button,this.rightButton=2===t.button,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,"dblclick"===t.type&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,"number"===typeof t.pageX?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const i=r.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class c{constructor(e,t=0,i=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let o=!1;if(n.H8){const e=navigator.userAgent.match(/Chrome\/(\d+)/),t=e?parseInt(e[1]):123;o=t<=122}if(e){const t=e,i=e,s=e.view?.devicePixelRatio||1;if("undefined"!==typeof t.wheelDeltaY)this.deltaY=o?t.wheelDeltaY/(120*s):t.wheelDeltaY/120;else if("undefined"!==typeof i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.gm&&!a.zx?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if("undefined"!==typeof t.wheelDeltaX)n.nr&&a.uF?this.deltaX=-t.wheelDeltaX/120:this.deltaX=o?t.wheelDeltaX/(120*s):t.wheelDeltaX/120;else if("undefined"!==typeof i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.gm&&!a.zx?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=o?e.wheelDelta/(120*s):e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}},736:(e,t,i)=>{"use strict";var n;i.d(t,{p:()=>n}),function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i={...t},n={...t},o={...t};let s=0;const r={keydown:0,input:0,render:0};function a(){_(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(l)}function l(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function c(){performance.mark("input/start"),r.input=1,m()}function d(){0===r.input&&c(),queueMicrotask(u)}function u(){1===r.input&&(performance.mark("input/end"),r.input=2)}function h(){_()}function g(){_()}function p(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(f),m())}function f(){1===r.render&&(performance.mark("render/end"),r.render=2)}function m(){setTimeout(_)}function _(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),v("keydown",t),v("input",i),v("render",n),v("inputlatency",o),s++,b())}function v(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function b(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0}function y(){if(0===s)return;const e={keydown:w(t),input:w(i),render:w(n),total:w(o),sampleCount:s};return C(t),C(i),C(n),C(o),s=0,e}function w(e){return{average:e.total/s,max:e.max,min:e.min}}function C(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=a,e.onBeforeInput=c,e.onInput=d,e.onKeyUp=h,e.onSelectionChange=g,e.onRenderStart=p,e.getAndClearMeasurements=y}(n||(n={}))},61979:(e,t,i)=>{"use strict";i.d(t,{c:()=>c});var n=i(2150),o=i(40231),s=i(5091);class r extends s.jG{constructor(e){super(),this._onDidChange=this._register(new o.vl),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,t){this._mediaQueryList?.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}}class a extends s.jG{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new o.vl),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const t=this._register(new r(e));this._register(t.onDidChange((()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)})))}_getPixelRatio(e){const t=document.createElement("canvas").getContext("2d"),i=e.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return i/n}}class l{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const t=(0,n.Q2)(e);let i=this.mapWindowIdToPixelRatioMonitor.get(t);return i||(i=(0,s.lC)(new a(e)),this.mapWindowIdToPixelRatioMonitor.set(t,i),(0,s.lC)(o.Jh.once(n.Fv)((({vscodeWindowId:e})=>{e===t&&(i?.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(t))})))),i}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}}const c=new l},25201:(e,t,i)=>{"use strict";i.d(t,{B:()=>n,q:()=>h});var n,o=i(2150),s=i(62484),r=i(85053),a=i(34125),l=i(40231),c=i(5091),d=i(67806),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};(function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"})(n||(n={}));class h extends c.jG{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new d.w,this.ignoreTargets=new d.w,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(l.Jh.runAndSubscribe(o.Iv,(({window:e,disposables:t})=>{t.add(o.ko(e.document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),t.add(o.ko(e.document,"touchend",(t=>this.onTouchEnd(e,t)))),t.add(o.ko(e.document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}),{window:s.G,disposables:this._store}))}static addTarget(e){if(!h.isTouchDevice())return c.jG.None;h.INSTANCE||(h.INSTANCE=(0,c.lC)(new h));const t=h.INSTANCE.targets.push(e);return(0,c.s)(t)}static ignoreTarget(e){if(!h.isTouchDevice())return c.jG.None;h.INSTANCE||(h.INSTANCE=(0,c.lC)(new h));const t=h.INSTANCE.ignoreTargets.push(e);return(0,c.s)(t)}static isTouchDevice(){return"ontouchstart"in s.G||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,o=e.targetTouches.length;i=h.HOLD_DELAY&&Math.abs(l.initialPageX-r.RT(l.rollingPageX))<30&&Math.abs(l.initialPageY-r.RT(l.rollingPageY))<30){const e=this.newGestureEvent(n.Contextmenu,l.initialTarget);e.pageX=r.RT(l.rollingPageX),e.pageY=r.RT(l.rollingPageY),this.dispatchEvent(e)}else if(1===o){const t=r.RT(l.rollingPageX),n=r.RT(l.rollingPageY),o=r.RT(l.rollingTimestamps)-l.rollingTimestamps[0],s=t-l.rollingPageX[0],a=n-l.rollingPageY[0],c=[...this.targets].filter((e=>l.initialTarget instanceof Node&&e.contains(l.initialTarget)));this.inertia(e,c,i,Math.abs(s)/o,s>0?1:-1,t,Math.abs(a)/o,a>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(n.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>h.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const i of this.ignoreTargets)if(i.contains(e.initialTarget))return;const t=[];for(const i of this.targets)if(i.contains(e.initialTarget)){let n=0,o=e.initialTarget;while(o&&o!==i)n++,o=o.parentElement;t.push([n,i])}t.sort(((e,t)=>e[0]-t[0]));for(const[i,n]of t)n.dispatchEvent(e),this.dispatched=!0}}inertia(e,t,i,s,r,a,l,c,d){this.handle=o.PG(e,(()=>{const o=Date.now(),u=o-i;let g=0,p=0,f=!0;s+=h.SCROLL_FRICTION*u,l+=h.SCROLL_FRICTION*u,s>0&&(f=!1,g=r*s*u),l>0&&(f=!1,p=c*l*u);const m=this.newGestureEvent(n.Change);m.translationX=g,m.translationY=p,t.forEach((e=>e.dispatchEvent(m))),f||this.inertia(e,t,o,s,r,a+g,l,c,d+p)}))}onTouchMove(e){const t=Date.now();for(let i=0,o=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(o.pageX),s.rollingPageY.push(o.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}u([a.B],h,"isTouchDevice",null)},21776:(e,t,i)=>{"use strict";i.d(t,{H:()=>o});var n=i(14396);function o(e,t){const i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(o){return void(0,n.dz)(o)}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(o){return void(0,n.dz)(o)}}},64236:(e,t,i)=>{"use strict";i.d(t,{Z4:()=>I,EH:()=>T,XF:()=>R});var n=i(88758),o=i(63872),s=i(2150),r=i(25201),a=i(96371),l=i(49822),c=i(68389),d=i(44964),u=i(50799),h=i(31304),g=i(85053),p=i(40231),f=i(91348),m=i(5091),_=i(25160),v=i(41337);const b=s.$,y="selectOption.entry.template";class w{get templateId(){return y}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=s.BC(e,b(".option-text")),t.detail=s.BC(e,b(".option-detail")),t.decoratorRight=s.BC(e,b(".option-decorator-right")),t}renderElement(e,t,i){const n=i,o=e.text,s=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=o,n.detail.textContent=s||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class C extends m.jG{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,i,n,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=o||Object.create(null),"number"!==typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=C.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"===typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"===typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new p.vl,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register((0,u.i)().setupManagedHover((0,a.nZ)("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return y}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=s.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=s.BC(this.selectDropDownContainer,b(".select-box-details-pane"));const t=s.BC(this.selectDropDownContainer,b(".select-box-dropdown-container-width-control")),i=s.BC(t,b(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",s.BC(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=s.li(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(s.ko(this.selectDropDownContainer,s.Bx.DRAG_START,(e=>{s.fs.stop(e,!0)})))}registerListeners(){let e;this._register(s.b2(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}))),this._register(s.ko(this.selectElement,s.Bx.CLICK,(e=>{s.fs.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.ko(this.selectElement,s.Bx.MOUSE_DOWN,(e=>{s.fs.stop(e)}))),this._register(s.ko(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(s.ko(this.selectElement,"touchend",(t=>{s.fs.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.ko(this.selectElement,s.Bx.KEY_DOWN,(e=>{const t=new c.Z(e);let i=!1;_.zx?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),s.fs.stop(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){g.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"===typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){const e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){const e=this.styles.selectBackground??"",t=s.gI(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;const i=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=s.zk(this.selectElement),i=s.BK(this.selectElement),n=s.zk(this.selectElement).getComputedStyle(this.selectElement),o=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-C.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),d=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let u=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const h=this._hasDetails?this._cachedMaxDetailsHeight:0,g=u+o+h,p=Math.floor((r-o-h)/this.getHeight()),f=Math.floor((a-o-h)/this.getHeight());if(e)return!(i.top+i.height>t.innerHeight-22||i.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.topr&&(u=p*this.getHeight())}else g>a&&(u=f*this.getHeight());return this.selectList.layout(u),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=u+o+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=u+o+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=d,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const o=e.detail?e.detail.length:0,s=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+o+s;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=s.Tr(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=s.BC(e,b(".select-box-dropdown-list-container")),this.listRenderer=new w,this.selectList=this._register(new h.B8("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,v.kg)({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>_.zx?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new l.f(this.selectDropDownListContainer,"keydown")),i=p.Jh.chain(t.event,(e=>e.filter((()=>this.selectList.length>0)).map((e=>new c.Z(e)))));this._register(p.Jh.chain(i,(e=>e.filter((e=>3===e.keyCode))))(this.onEnter,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>2===e.keyCode))))(this.onEnter,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>9===e.keyCode))))(this.onEscape,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>16===e.keyCode))))(this.onUpArrow,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>18===e.keyCode))))(this.onDownArrow,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>12===e.keyCode))))(this.onPageDown,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>11===e.keyCode))))(this.onPageUp,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>14===e.keyCode))))(this.onHome,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>13===e.keyCode))))(this.onEnd,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))))(this.onCharacter,this)),this._register(s.ko(this.selectList.getHTMLElement(),s.Bx.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>"undefined"!==typeof e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(s.ko(this.selectDropDownContainer,s.Bx.FOCUS_OUT,(e=>{this._isVisible&&!s.QX(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;s.fs.stop(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),o=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){if(this.selected>0){s.fs.stop(e,!0);const t=this.options[this.selected-1].isDisabled;t&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onPageUp(e){s.fs.stop(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){s.fs.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){s.fs.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=f.YM.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(s.ko(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(s.b2(this.selectElement,"click",(e=>{s.fs.stop(e,!0)}))),this._register(s.b2(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(s.b2(this.selectElement,"keydown",(e=>{let t=!1;_.zx?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&g.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new E.LN)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(r.q.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.gm&&this._register((0,s.ko)(e,s.Bx.DRAG_START,(e=>e.dataTransfer?.setData(o.t.TEXT,this._action.label))))),this._register((0,s.ko)(t,r.B.Tap,(e=>this.onClick(e,!0)))),this._register((0,s.ko)(t,s.Bx.MOUSE_DOWN,(e=>{i||s.fs.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),_.zx&&this._register((0,s.ko)(t,s.Bx.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,s.ko)(t,s.Bx.CLICK,(e=>{s.fs.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,s.ko)(t,s.Bx.DBLCLICK,(e=>{s.fs.stop(e,!0)}))),[s.Bx.MOUSE_UP,s.Bx.MOUSE_OUT].forEach((e=>{this._register((0,s.ko)(t,e,(e=>{s.fs.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){s.fs.stop(e,!0);const i=L.z(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){if(!this.element)return;const e=this.getTooltip()??"";if(this.updateAriaLabel(),this.options.hoverDelegate?.showNativeHover)this.element.title=e;else if(this.customHover||""===e)this.customHover&&this.customHover.update(e);else{const t=this.options.hoverDelegate??(0,a.nZ)("element");this.customHover=this._store.add((0,u.i)().setupManagedHover(t,this.element,e))}}updateAriaLabel(){if(this.element){const e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class I extends T{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),L.j(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){const e=document.createElement("span");e.classList.add("keybinding"),e.textContent=this.options.keybinding,this.element.appendChild(e)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===E.wv.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=v.kg({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){const e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class R extends T{constructor(e,t,i,n,o,s,r){super(e,t),this.selectBox=new x(i,n,o,s,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}},48038:(e,t,i)=>{"use strict";i.d(t,{E:()=>u});var n=i(2150),o=i(68389),s=i(64236),r=i(96371),a=i(55664),l=i(40231),c=i(5091),d=i(50322);class u extends c.jG{constructor(e,t={}){let i,d;switch(super(),this._actionRunnerDisposables=this._register(new c.Cm),this.viewItemDisposables=this._register(new c.$w),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.vl),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.vl({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l.vl),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new l.vl),this.onWillRun=this._onWillRun.event,this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register((0,r.bW)()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new a.LN,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:i=[15],d=[17];break;case 1:i=[16],d=[18],this.domNode.className+=" vertical";break}this._register(n.ko(this.domNode,n.Bx.KEY_DOWN,(e=>{const t=new o.Z(e);let n=!0;const r="number"===typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;i&&(t.equals(i[0])||t.equals(i[1]))?n=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&r instanceof s.EH&&r.trapsArrowNavigation?n=this.focusNext(void 0,!0):this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.ko(this.domNode,n.Bx.KEY_UP,(e=>{const t=new o.Z(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.w5(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.bq()!==this.domNode&&n.QX(n.bq(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof s.EH&&e.isEnabled()));e instanceof s.EH&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof s.EH&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){if("number"===typeof e)return this.viewItems[e]?.action;if(n.sb(e)){while(e.parentElement!==this.actionsList){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const i=document.createElement("li");let r;i.className="action-item",i.setAttribute("role","presentation");const a={hoverDelegate:this._hoverDelegate,...t,isTabList:"tablist"===this.options.ariaRole};this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e,a)),r||(r=new s.Z4(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(r,n.ko(i,n.Bx.CONTEXT_MENU,(e=>{n.fs.stop(e,!0)}))),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(i),this.focusable&&r instanceof s.EH&&0===this.viewItems.length&&r.setFocusable(!0),null===o||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(r)):(this.actionsList.insertBefore(i,this.actionsList.children[o]),this.viewItems.splice(o,0,r),o++)})),"number"===typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,c.AS)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.w_(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"===typeof e?t=e:"boolean"===typeof e&&(i=e),i&&"undefined"===typeof this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if("undefined"===typeof this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===a.wv.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if("undefined"===typeof this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===a.wv.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){"undefined"===typeof this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();const n=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(n){let o=!0;d.Tn(n.focus)||(o=!1),this.options.focusOnlyEnabledItems&&d.Tn(n.isEnabled)&&!n.isEnabled()&&(o=!1),n.action.id===a.wv.ID&&(o=!1),o?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),o&&n.showHover?.()}}doTrigger(e){if("undefined"===typeof this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof s.EH){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=(0,c.AS)(this.viewItems),this.getContainer().remove(),super.dispose()}}},19950:(e,t,i)=>{"use strict";i.d(t,{h5:()=>h,vr:()=>d,xE:()=>u});var n=i(2150);const o=2e4;let s,r,a,l,c;function d(e){s=document.createElement("div"),s.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};r=t(),a=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};l=i(),c=i(),e.appendChild(s)}function u(e){s&&(r.textContent!==e?(n.w_(a),g(r,e)):(n.w_(r),g(a,e)))}function h(e){s&&(l.textContent!==e?(n.w_(c),g(l,e)):(n.w_(l),g(c,e)))}function g(e,t){n.w_(e),t.length>o&&(t=t.substr(0,o)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},42312:(e,t,i)=>{"use strict";i.d(t,{$:()=>m});var n=i(2150),o=i(86501),s=i(68389),r=i(44964),a=i(25201),l=i(96371),c=i(84653),d=i(85476),u=i(40231),h=i(42325),g=i(5091),p=i(23740),f=i(50799);d.Q1.white.toString(),d.Q1.white.toString();class m extends g.jG{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new u.vl),this._onDidEscape=this._register(new u.vl),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"===typeof t.title&&this.setTitle(t.title),"string"===typeof t.ariaLabel&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(a.q.addTarget(this._element)),[n.Bx.CLICK,a.B.Tap].forEach((e=>{this._register((0,n.ko)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):n.fs.stop(e)})))})),this._register((0,n.ko)(this._element,n.Bx.KEY_DOWN,(e=>{const t=new s.Z(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._onDidEscape.fire(e),this._element.blur(),i=!0),i&&n.fs.stop(t,!0)}))),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register((0,n.w5)(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of(0,c.n)(e))if("string"===typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){if(this._label===e)return;if((0,h.VS)(this._label)&&(0,h.VS)(e)&&(0,h.nK)(this._label,e))return;this._element.classList.add("monaco-text-button");const t=this.options.supportShortLabel?this._labelElement:this._element;if((0,h.VS)(e)){const i=(0,r.Gc)(e,{inline:!0});i.dispose();const s=i.element.querySelector("p")?.innerHTML;if(s){const e=(0,o.aj)(s,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});t.innerHTML=e}else(0,n.Ln)(t)}else this.options.supportIcons?(0,n.Ln)(t,...this.getContentElements(e)):t.textContent=e;let i="";"string"===typeof this.options.title?i=this.options.title:this.options.title&&(i=(0,r.R9)(e)),this.setTitle(i),"string"===typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",i),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...p.L.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){this._hover||""===e?this._hover&&this._hover.update(e):this._hover=this._register((0,f.i)().setupManagedHover(this.options.hoverDelegate??(0,l.nZ)("mouse"),this._element,e))}}},70604:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(2150),o=i(20601);class s{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=(0,n.BC)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,o.GP)(this.countFormat,this.count),this.element.title=(0,o.GP)(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},53876:(e,t,i)=>{"use strict";i.d(t,{d:()=>g});var n=i(2150),o=i(64236),s=i(68389),r=i(25201),a=i(55664),l=i(40231);class c extends a.LN{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.BC)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.BC)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const s of[n.Bx.CLICK,n.Bx.MOUSE_DOWN,r.B.Tap])this._register((0,n.ko)(this.element,s,(e=>n.fs.stop(e,!0))));for(const s of[n.Bx.MOUSE_DOWN,r.B.Tap])this._register((0,n.ko)(this._label,s,(e=>{(0,n.Er)(e)&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register((0,n.ko)(this._label,n.Bx.KEY_UP,(e=>{const t=new s.Z(e);(t.equals(3)||t.equals(10))&&(n.fs.stop(e,!0),this.visible?this.hide():this.show())})));const o=i(this._label);o&&this._register(o),this._register(r.q.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class d extends c{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}var u=i(96371),h=i(50799);class g extends o.EH{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=e=>{this.element=(0,n.BC)(e,(0,n.$)("a.action-label"));let t=[];return"string"===typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register((0,h.i)().setupManagedHover(this.options.hoverDelegate??(0,u.nZ)("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),o={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new d(e,o)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{this.element?.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return e.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){const e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}},95994:(e,t,i)=>{"use strict";i.d(t,{c:()=>h});var n=i(2150),o=i(61865),s=i(76358),r=i(52469),a=i(40231),l=i(41337),c=i(5091),d=i(96371);const u=l.kg("defaultLabel","input");class h extends r.x{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new c.HE),this.additionalToggles=[],this._onDidOptionChange=this._register(new a.vl),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new a.vl),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new a.vl),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new a.vl),this._onKeyUp=this._register(new a.vl),this._onCaseSensitiveKeyDown=this._register(new a.vl),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new a.vl),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||u,this.showCommonFindToggles=!!i.showCommonFindToggles;const r=i.appendCaseSensitiveLabel||"",l=i.appendWholeWordsLabel||"",h=i.appendRegexLabel||"",g=i.history||[],p=!!i.flexibleHeight,f=!!i.flexibleWidth,m=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new s.mJ(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:g,showHistoryHint:i.showHistoryHint,flexibleHeight:p,flexibleWidth:f,flexibleMaxHeight:m,inputBoxStyles:i.inputBoxStyles}));const _=this._register((0,d.bW)());if(this.showCommonFindToggles){this.regex=this._register(new o.Ix({appendTitle:h,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new o.nV({appendTitle:l,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new o.bc({appendTitle:r,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(this.domNode.ownerDocument.activeElement);if(i>=0){let o=-1;t.equals(17)?o=(i+1)%e.length:t.equals(15)&&(o=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):o>=0&&e[o].focus(),n.fs.stop(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(n.ko(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(n.ko(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(const e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new c.Cm;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){this.inputBox.paddingRight=e?0:(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){return this.regex?.checked??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){this.caseSensitive?.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}},61865:(e,t,i)=>{"use strict";i.d(t,{Ix:()=>h,bc:()=>d,nV:()=>u});var n=i(96371),o=i(83092),s=i(25923),r=i(41337);const a=r.kg("caseDescription","Match Case"),l=r.kg("wordsDescription","Match Whole Word"),c=r.kg("regexDescription","Use Regular Expression");class d extends o.l{constructor(e){super({icon:s.W.caseSensitive,title:a+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class u extends o.l{constructor(e){super({icon:s.W.wholeWord,title:l+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class h extends o.l{constructor(e){super({icon:s.W.regex,title:c+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},4518:(e,t,i)=>{"use strict";i.d(t,{_:()=>c});var n=i(2150),o=i(50799),s=i(96371),r=i(84653),a=i(5091),l=i(85603);class c extends a.jG{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=t?.supportIcons??!1,this.domNode=n.BC(e,n.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=c.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&l.aI(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,o+=i;for(const i of t)i.end<=o||(i.start>=o&&(i.start+=n),i.end>=o&&(i.end+=n));return i+=n,"⏎"}))}}},50799:(e,t,i)=>{"use strict";i.d(t,{e:()=>o,i:()=>s});let n={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>null,showManagedHover:()=>{}};function o(e){n=e}function s(){return n}},96371:(e,t,i)=>{"use strict";i.d(t,{MW:()=>l,bW:()=>d,nZ:()=>c});var n=i(85661);const o=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});let s=o;const r=new n.d((()=>s("mouse",!1))),a=new n.d((()=>s("element",!1)));function l(e){s=e}function c(e){return"element"===e?a.value:r.value}function d(){return s("element",!0)}},44726:(e,t,i)=>{"use strict";i.d(t,{M4:()=>g,N4:()=>c,jQ:()=>d,vV:()=>h,vr:()=>u});var n=i(2150),o=i(68389),s=i(37800),r=i(5091),a=i(41337);const l=n.$;class c extends r.jG{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new s.MU(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class d extends r.jG{static render(e,t,i){return new d(e,t,i)}constructor(e,t,i){super(),this.actionLabel=t.label,this.actionKeybindingLabel=i,this.actionContainer=n.BC(e,l("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=n.BC(this.actionContainer,l("a.action")),this.action.setAttribute("role","button"),t.iconClass&&n.BC(this.action,l(`span.icon.${t.iconClass}`));const o=n.BC(this.action,l("span"));o.textContent=i?`${t.label} (${i})`:t.label,this._store.add(new h(this.actionContainer,t.run)),this._store.add(new g(this.actionContainer,t.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function u(e,t){return e&&t?(0,a.kg)("acessibleViewHint","Inspect this in the accessible view with {0}.",t):e?(0,a.kg)("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class h extends r.jG{constructor(e,t){super(),this._register(n.ko(e,n.Bx.CLICK,(i=>{i.stopPropagation(),i.preventDefault(),t(e)})))}}class g extends r.jG{constructor(e,t,i){super(),this._register(n.ko(e,n.Bx.KEY_DOWN,(n=>{const s=new o.Z(n);i.some((e=>s.equals(e)))&&(n.stopPropagation(),n.preventDefault(),t(e))})))}}},50278:(e,t,i)=>{"use strict";i.d(t,{s:()=>g});var n=i(2150),o=i(4518),s=i(5091),r=i(85603),a=i(21542),l=i(96371),c=i(50799),d=i(50322),u=i(74529);class h{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||(0,r.aI)(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class g extends s.jG{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new h(n.BC(e,n.$(".monaco-icon-label")))),this.labelContainer=n.BC(this.domNode.element,n.$(".monaco-icon-label-container")),this.nameContainer=n.BC(this.labelContainer,n.$("span.monaco-icon-name-container")),this.nameNode=t?.supportHighlights||t?.supportIcons?this._register(new m(this.nameContainer,!!t.supportIcons)):new p(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??(0,l.nZ)("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){const s=["monaco-icon-label"],r=["monaco-icon-label-container"];let a="";i&&(i.extraClasses&&s.push(...i.extraClasses),i.italic&&s.push("italic"),i.strikethrough&&s.push("strikethrough"),i.disabledCommand&&r.push("disabled"),i.title&&("string"===typeof i.title?a+=i.title:a+=e));const l=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let e;l&&n.sb(l)?e=l:(e=n.$(".monaco-icon-label-iconpath"),this.domNode.element.prepend(e)),e.style.backgroundImage=n.Tf(i?.iconPath)}else l&&l.remove();if(this.domNode.classNames=s,this.domNode.element.setAttribute("aria-label",a),this.labelContainer.classList.value="",this.labelContainer.classList.add(...r),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof o._?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines),this.setupHover(e.element,i?.descriptionTitle)):(e.textContent=t&&i?.labelEscapeNewLines?o._.escapeNewLines(t,[]):t||"",this.setupHover(e.element,i?.descriptionTitle||""),e.empty=!t)}if(i?.suffix||this.suffixNode){const e=this.getOrCreateSuffixNode();e.textContent=i?.suffix??""}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate.showNativeHover){function n(e,t){(0,d.Kg)(t)?e.title=(0,u.pS)(t):t?.markdownNotSupportedFallback?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}n(e,t)}else{const o=(0,c.i)().setupManagedHover(this.hoverDelegate,e,t);o&&this.customHovers.set(e,o)}else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new h(n.Pl(this.nameContainer,n.$("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new h(n.BC(e.element,n.$("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){const e=this._register(new h(n.BC(this.labelContainer,n.$("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new o._(n.BC(e.element,n.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new h(n.BC(e.element,n.$("span.label-description"))))}return this.descriptionNode}}class p{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,r.aI)(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.BC(this.container,n.$("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const o={start:n,end:n+e.length},s=i.map((e=>a.Q.intersect(o,e))).filter((e=>!a.Q.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}class m extends s.jG{constructor(e,t){super(),this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,r.aI)(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=this._register(new o._(n.BC(this.container,n.$("a.label-name",{id:t?.domId})),{supportIcons:this.supportIcons}))),this.singleLabel.set(e,t?.matches,void 0,t?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=t?.separator||"/",s=f(e,i,t?.matches);for(let r=0;r{"use strict";i.d(t,{n:()=>r,s:()=>a});var n=i(2150),o=i(23740);const s=new RegExp(`(\\\\)?\\$\\((${o.L.iconNameExpression}(?:${o.L.iconModifierExpression})?)\\)`,"g");function r(e){const t=new Array;let i,n=0,o=0;while(null!==(i=s.exec(e))){o=i.index||0,n{"use strict";i.d(t,{mJ:()=>y,x8:()=>v});var n=i(2150),o=i(49822),s=i(60934),r=i(48038),a=i(19950),l=i(50799),c=i(96371),d=i(37800),u=i(52469),h=i(40231);class g{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class p{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new g(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var f=i(85603),m=i(41337);const _=n.$,v={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class b extends u.x{constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new h.vl),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new h.vl),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.BC(e,_(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",a=n.BC(this.element,_(".ibwrapper"));if(this.input=n.BC(a,_(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"===typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.BC(a,_("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new d.Se(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.BC(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new o.f(e.ownerDocument,"selectionchange")),i=h.Jh.filter(t.event,(()=>{const t=e.ownerDocument.getSelection();return t?.anchorNode===a}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new r.E(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register((0,l.i)().setupManagedHover((0,c.nZ)("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"===typeof this.cachedHeight?this.cachedHeight:n.OK(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return n.X7(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){const e=this.input.selectionStart;if(null===e)return null;const t=this.input.selectionEnd??e;return{start:e,end:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!==typeof this.cachedContentHeight||"number"!==typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&(0,f.aI)(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${n.gI(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=n.Tr(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{if(!this.message)return null;e=n.BC(i,_(".monaco-inputbox-container")),t();const o={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?(0,s.yk)(this.message.content,o):(0,s.S5)(this.message.content,o);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background??"",r.style.color=a.foreground??"",r.style.border=a.border?`1px solid ${a.border}`:"",n.BC(e,r),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?m.kg("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?m.kg("alertWarningMessage","Warning: {0}",this.message.content):m.kg("alertInfoMessage","Info: {0}",this.message.content),a.xE(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=e.charCodeAt(e.length-1),i=10===t?" ":"",n=(e+i).replace(/\u000c/g,"");n?this.mirror.textContent=e+i:this.mirror.innerText=" ",this.layout()}applyStyles(){const e=this.options.inputBoxStyles,t=e.inputBackground??"",i=e.inputForeground??"",o=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=i,this.input.style.backgroundColor="inherit",this.input.style.color=i,this.element.style.border=`1px solid ${n.gI(o,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.OK(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}}class y extends b{constructor(e,t,i){const o=m.kg({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," or {0} for history","⇅"),s=m.kg({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new h.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new h.vl),this.onDidBlur=this._onDidBlur.event,this.history=new p(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?o:s,t=this.placeholder+e;i.showPlaceholderOnFocus&&!n.X7(this.input)?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(s)||e(o)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",a.h5(this.value?this.value:m.kg("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,a.h5(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}},92678:(e,t,i)=>{"use strict";i.d(t,{l:()=>u,x:()=>h});var n=i(2150),o=i(50799),s=i(96371),r=i(59812),a=i(5091),l=i(85603),c=i(41337);const d=n.$,u={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class h extends a.jG{constructor(e,t,i){super(),this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);const r=this.options.keybindingLabelForeground;this.domNode=n.BC(e,d(".monaco-keybinding")),r&&(this.domNode.style.color=r),this.hover=this._register((0,o.i)().setupManagedHover((0,s.nZ)("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&h.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){const e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let i=1;i{"use strict";i.d(t,{ur:()=>E,uO:()=>D});var n=i(63872),o=i(2150),s=i(49822),r=i(25201),a=i(37800),l=i(85053),c=i(9659),d=i(34125),u=i(40231),h=i(5091),g=i(21542),p=i(52210);function f(e,t){const i=[];for(const n of t){if(e.start>=n.range.end)continue;if(e.ende.concat(t)),[]))}class b{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,o=f({start:0,end:e},this.groups),s=f({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:m(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=v(o,r,s),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e){const e=this.getRenderer(t);e.disposeTemplate(i.templateData),i.templateData=null}})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var w=i(14396),C=i(19977),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const k={CurrentDragAndDropData:void 0},x={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class E{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class T{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,this.getPosInSet=e?.getPosInSet?e.getPosInSet.bind(e):(e,t)=>t+1,this.getRole=e?.getRole?e.getRole.bind(e):e=>"listitem",this.isChecked=e?.isChecked?e.isChecked.bind(e):e=>{}}}class D{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,o.y6)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=x){if(this.virtualDelegate=t,this.domId="list_id_"+ ++D.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new c.ve(50),this.splicing=!1,this.dragOverAnimationStopDisposable=h.jG.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=h.jG.None,this.onDragLeaveTimeout=h.jG.None,this.disposables=new h.Cm,this._onDidChangeContentHeight=new u.vl,this._onDidChangeContentWidth=new u.vl,this.onDidChangeContentHeight=u.Jh.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(n.paddingTop??0);for(const o of i)this.renderers.set(o.templateId,o);this.cache=this.disposables.add(new y(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!==typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=n.horizontalScrolling??x.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom="undefined"===typeof n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new R(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const s=n.transformOptimization??x.transformOptimization;s&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.q.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new p.yE({forceIntegerValues:!0,smoothScrollDuration:n.smoothScrolling?125:0,scheduleAtNextAnimationFrame:e=>(0,o.PG)((0,o.zk)(this.domNode),e)})),this.scrollableElement=this.disposables.add(new a.oO(this.rowsContainer,{alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel??x.alwaysConsumeMouseWheel,horizontal:1,vertical:n.verticalScrollMode??x.verticalScrollMode,useShadows:n.useShadows??x.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,o.ko)(this.rowsContainer,r.B.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,o.ko)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,o.ko)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,o.ko)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,o.ko)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,o.ko)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=n.setRowLineHeight??x.setRowLineHeight,this.setRowHeight=n.setRowHeight??x.setRowHeight,this.supportDynamicHeights=n.supportDynamicHeights??x.supportDynamicHeights,this.dnd=n.dnd??this.disposables.add(x.dnd),this.layout(n.initialSize?.height,n.initialSize?.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t={...t??{},scrollByPage:e.scrollByPage}),void 0!==e.mouseWheelScrollSensitivity&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new b(e)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=g.Q.intersect(n,o),r=new Map;for(let h=s.end-1;h>=s.start;h--){const e=this.items[h];if(e.dragStartDisposable.dispose(),e.checkedDisposable.dispose(),e.row){let t=r.get(e.templateId);t||(t=[],r.set(e.templateId,t));const i=this.renderers.get(e.templateId);i&&i.disposeElement&&i.disposeElement(e.element,h,e.row.templateData,e.size),t.unshift(e.row)}e.row=null,e.stale=!0}const a={start:e+t,end:this.items.length},l=g.Q.intersect(a,n),c=g.Q.relativeComplement(a,n),d=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:h.jG.None,checkedDisposable:h.jG.None,stale:!1})));let u;0===e&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),u=this.items,this.items=d):(this.rangeMap.splice(e,t,d),u=this.items.splice(e,t,...d));const p=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=m(l,p),v=g.Q.intersect(f,_);for(let h=v.start;hm(e,p))),w={start:e,end:e+i.length},C=[w,...y].map((e=>g.Q.intersect(f,e))).reverse();for(const h of C)for(let e=h.end-1;e>=h.start;e--){const t=this.items[e],i=r.get(t.templateId),n=i?.pop();this.insertItemInDOM(e,n)}for(const h of r.values())for(const e of h)this.cache.release(e);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),u.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,o.PG)((0,o.zk)(this.domNode),(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)"undefined"!==typeof t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){const e=this.scrollableElement.getScrollDimensions();return e.height}get firstVisibleIndex(){const e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);return e.start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex((t=>t.element===e))}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:"number"===typeof e?e:(0,o.H4)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),"undefined"!==typeof t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"===typeof t?t:(0,o.y6)(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=g.Q.relativeComplement(r,e).reverse(),l=g.Q.relativeComplement(e,r);if(s){const t=g.Q.intersect(e,r);for(let e=t.start;e{for(const e of l)for(let t=e.start;t=e.start;t--)this.insertItemInDOM(t)})),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){const i=this.items[e];if(!i.row)if(t)i.row=t,i.stale=!0;else{const e=this.cache.alloc(i.templateId);i.row=e.row,i.stale||=e.isReusingConnectedDomNode}const n=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",n);const s=this.accessibilityProvider.isChecked(i.element);if("boolean"===typeof s)i.row.domNode.setAttribute("aria-checked",String(!!s));else if(s){const e=e=>i.row.domNode.setAttribute("aria-checked",String(!!e));e(s.value),i.checkedDisposable=s.onDidChange((()=>e(s.value)))}if(i.stale||!i.row.domNode.parentElement){const t=this.items.at(e+1)?.row?.domNode??null;i.row.domNode.parentElement===this.rowsContainer&&i.row.domNode.nextElementSibling===t||this.rowsContainer.insertBefore(i.row.domNode,t),i.stale=!1}this.updateItemInDOM(i,e);const r=this.renderers.get(i.templateId);if(!r)throw new Error(`No renderer found for template id ${i.templateId}`);r?.renderElement(i.element,e,i.row.templateData,i.size);const a=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a&&(i.dragStartDisposable=(0,o.ko)(i.row.domNode,"dragstart",(e=>this.onDragStart(i.element,a,e)))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,o.y6)(e.row.domNode);const t=(0,o.zk)(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){const e=this.scrollableElement.getScrollPosition();return e.scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return u.Jh.filter(u.Jh.map(this.disposables.add(new s.f(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return u.Jh.any(u.Jh.map(this.disposables.add(new s.f(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),u.Jh.map(this.disposables.add(new s.f(this.domNode,r.B.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return u.Jh.map(this.disposables.add(new s.f(this.rowsContainer,r.B.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element,o=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:n,sector:o}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const s=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.t.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(s,i)),"undefined"===typeof e&&(e=String(s.length));const t=(0,o.$)(".monaco-drag-image");t.textContent=e;const n=e=>{while(e&&!e.classList.contains("monaco-workbench"))e=e.parentElement;return e||this.domNode.ownerDocument},r=n(this.domNode);r.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>t.remove()),0)}this.domNode.classList.add("dragging"),this.currentDragData=new E(s),k.CurrentDragAndDropData=new L(s),this.dnd.onDragStart?.(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),k.CurrentDragAndDropData&&"vscode-ui"===k.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(k.CurrentDragAndDropData)this.currentDragData=k.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new T}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop="boolean"===typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;e.browserEvent.dataTransfer.dropEffect="boolean"!==typeof t&&0===t.effect?.type?"copy":"move",i="boolean"!==typeof t&&t.feedback?t.feedback:"undefined"===typeof e.index?[-1]:[e.index],i=(0,l.dM)(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i;let n="boolean"!==typeof t&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(I(this.currentDragFeedback,i)&&this.currentDragFeedbackPosition===n)return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackPosition=n,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add(n),this.rowsContainer.classList.add(n),this.currentDragFeedbackDisposable=(0,h.s)((()=>{this.domNode.classList.remove(n),this.rowsContainer.classList.remove(n)}));else{if(i.length>1&&"drop-target"!==n)throw new Error("Can't use multiple feedbacks with position different than 'over'");"drop-target-after"===n&&i[0]{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row?.domNode.classList.remove(n)}}))}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,c.EQ)((()=>this.clearDragOverFeedback()),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,k.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,k.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=h.jG.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,o.cL)(this.domNode).top;this.dragOverAnimationDisposable=(0,o.i0)((0,o.zk)(this.domNode),this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,c.EQ)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(void 0===t)return;const i=e.offsetY/this.items[t].size,n=Math.floor(i/.25);return(0,C.qE)(n,0,3)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;while(((0,o.sb)(i)||(0,o.xZ)(i))&&i!==this.rowsContainer&&t.contains(i)){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;while(1){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=e.start;t--)this.insertItemInDOM(t);for(let e=a.start;e{"use strict";i.d(t,{hb:()=>K,B8:()=>ne,MH:()=>q,_C:()=>y,W0:()=>O,Bm:()=>F,B6:()=>R,b$:()=>A,bm:()=>N,mh:()=>z,tX:()=>j,Es:()=>M,xu:()=>P,bG:()=>G});var n=i(2150),o=i(49822),s=i(68389),r=i(25201),a=i(19950);class l{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var c=i(85053),d=i(9659),u=i(85476),h=i(34125),g=i(40231),p=i(10695),f=i(5091),m=i(19977),_=i(25160),v=i(50322);class b extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var y,w,C=i(90487),S=i(46274),k=i(39751),x=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class E{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class L{get name(){return this._trait}get renderer(){return new E(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.vl,this.onChange=this._onChange.event}splice(e,t,i){const n=i.length-t,o=e+t,s=[];let r=0;while(r=o)s.push(this.sortedIndexes[r++]+n);this.renderer.splice(e,t,i.length),this._set(s,s)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(J),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=Z(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,c.El)(this.sortedIndexes,e,J)>=0}dispose(){(0,f.AS)(this._onChange)}}x([h.B],L.prototype,"renderer",null);class T extends L{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class I{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const o=new Set(n),s=i.map((e=>o.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,s)}}function R(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function D(e,t){return!!e.classList.contains(t)||!e.classList.contains("monaco-list")&&(!!e.parentElement&&D(e.parentElement,t))}function N(e){return D(e,"monaco-editor")}function A(e){return D(e,"monaco-custom-toggle")}function O(e){return D(e,"action-item")}function P(e){return D(e,"monaco-tree-sticky-row")}function M(e){return e.classList.contains("monaco-tree-sticky-container")}function F(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&(!!e.parentElement&&F(e.parentElement))}class B{get onKeyDown(){return g.Jh.chain(this.disposables.add(new o.f(this.view.domNode,"keydown")).event,(e=>e.filter((e=>!R(e.target))).map((e=>new s.Z(e)))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new f.Cm,this.multipleSelectionDisposables=new f.Cm,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown((e=>{switch(e.keyCode){case 3:return this.onEnter(e);case 16:return this.onUpArrow(e);case 18:return this.onDownArrow(e);case 11:return this.onPageUpArrow(e);case 12:return this.onPageDownArrow(e);case 9:return this.onEscape(e);case 31:this.multipleSelectionSupport&&(_.zx?e.metaKey:e.ctrlKey)&&this.onCtrlA(e)}})))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,c.y1)(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}x([h.B],B.prototype,"onKeyDown",null),function(e){e[e["Automatic"]=0]="Automatic",e[e["Trigger"]=1]="Trigger"}(y||(y={})),function(e){e[e["Idle"]=0]="Idle",e[e["Typing"]=1]="Typing"}(w||(w={}));const W=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class H{constructor(e,t,i,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=o,this.enabled=!1,this.state=w.Idle,this.mode=y.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new f.Cm,this.disposables=new f.Cm,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??1?this.enable():this.disable(),this.mode=e.typeNavigationMode??y.Automatic}enable(){if(this.enabled)return;let e=!1;const t=g.Jh.chain(this.enabledDisposables.add(new o.f(this.view.domNode,"keydown")).event,(t=>t.filter((e=>!R(e.target))).filter((()=>this.mode===y.Automatic||this.triggered)).map((e=>new s.Z(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>n.fs.stop(e,!0))).map((e=>e.browserEvent.key)))),i=g.Jh.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables),r=g.Jh.reduce(g.Jh.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables);r(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const t=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(e[0]));"string"===typeof t?(0,a.xE)(t):t&&(0,a.xE)(t.get())}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=w.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===w.Idle?1:0;this.state=w.Typing;for(let o=0;o1&&1===n.length)return this.previouslyFocused=i,this.list.setFocus([t]),void this.list.reveal(t)}}}else if("undefined"===typeof r||(0,p.WP)(e,r))return this.previouslyFocused=i,this.list.setFocus([t]),void this.list.reveal(t)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class V{constructor(e,t){this.list=e,this.view=t,this.disposables=new f.Cm;const i=g.Jh.chain(this.disposables.add(new o.f(t.domNode,"keydown")).event,(e=>e.filter((e=>!R(e.target))).map((e=>new s.Z(e))))),n=g.Jh.chain(i,(e=>e.filter((e=>2===e.keyCode&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey))));n(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const o=i.querySelector("[tabIndex]");if(!o||!(0,n.sb)(o)||-1===o.tabIndex)return;const s=(0,n.zk)(o).getComputedStyle(o);"hidden"!==s.visibility&&"none"!==s.display&&(e.preventDefault(),e.stopPropagation(),o.focus())}dispose(){this.disposables.dispose()}}function j(e){return _.zx?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function z(e){return e.browserEvent.shiftKey}function U(e){return(0,n.Er)(e)&&2===e.button}const $={isSelectionSingleChangeEvent:j,isSelectionRangeChangeEvent:z};class q{constructor(e){this.list=e,this.disposables=new f.Cm,this._onPointer=new g.vl,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$),this.mouseSupport="undefined"===typeof e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(r.q.addTarget(e.getHTMLElement()))),g.Jh.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){N(e.browserEvent.target)||(0,n.bq)()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(R(e.browserEvent.target)||N(e.browserEvent.target))return;const t="undefined"===typeof e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(R(e.browserEvent.target)||N(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return"undefined"===typeof t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),U(e.browserEvent)||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e))}onDoubleClick(e){if(R(e.browserEvent.target)||N(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if("undefined"===typeof i){const e=this.list.getFocus()[0];i=e??t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=(0,c.y1)(n,o+1),r=this.list.getSelection(),a=Y(Z(r,[i]),i);if(0===a.length)return;const l=Z(s,X(r,a));this.list.setSelection(l,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const i=this.list.getSelection(),n=i.filter((e=>e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class K{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const o=(0,n.gI)(e.listFocusAndSelectionOutline,(0,n.gI)(e.listSelectionOutline,e.listFocusOutline??""));o&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${o}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const s=(0,n.gI)(e.listSelectionOutline,e.listInactiveFocusOutline??"");s&&i.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${s}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; }\n\t\t\t`),e.listDropBetweenBackground&&(i.push(`\n\t\t\t.monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,\n\t\t\t.monaco-list${t} .monaco-list-row.drop-target-before::before {\n\t\t\t\tcontent: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`),i.push(`\n\t\t\t.monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,\n\t\t\t.monaco-list${t} .monaco-list-row.drop-target-after::after {\n\t\t\t\tcontent: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`)),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&i.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=i.join("\n")}}const G={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:u.Q1.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:u.Q1.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:u.Q1.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},Q={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function Y(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;while(o>=0&&e[o]===t-(i-o))n.push(e[o--]);n.reverse(),o=i;while(o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]e-t;class ee{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const s of this.renderers)s.disposeElement?.(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class te{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new f.Cm}}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e),o=n&&"string"!==typeof n?n:(0,k.lk)(n);i.disposables.add((0,k.fm)((e=>{this.setAriaLabel(e.readObservable(o),i.container)})));const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"===typeof s?i.container.setAttribute("aria-level",`${s}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i,n){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class ie{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements(),i=t.indexOf(e)>-1?t:[e];return i}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,o){return this.dnd.onDragOver(e,t,i,n,o)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,o){this.dnd.drop(e,t,i,n,o)}dispose(){this.dnd.dispose()}}class ne{get onDidChangeFocus(){return g.Jh.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return g.Jh.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=g.Jh.chain(this.disposables.add(new o.f(this.view.domNode,"keydown")).event,(t=>t.map((e=>new s.Z(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>n.fs.stop(e,!0))).filter((()=>!1)))),i=g.Jh.chain(this.disposables.add(new o.f(this.view.domNode,"keyup")).event,(t=>t.forEach((()=>e=!1)).map((e=>new s.Z(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>n.fs.stop(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0,n="undefined"!==typeof i?this.view.element(i):void 0,o="undefined"!==typeof i?this.view.domElement(i):this.view.domNode;return{index:i,element:n,anchor:o,browserEvent:e}})))),r=g.Jh.chain(this.view.onContextMenu,(t=>t.filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new S.P((0,n.zk)(this.view.domNode),i),browserEvent:i})))));return g.Jh.any(t,i,r)}get onKeyDown(){return this.disposables.add(new o.f(this.view.domNode,"keydown")).event}get onDidFocus(){return g.Jh.signal(this.disposables.add(new o.f(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return g.Jh.signal(this.disposables.add(new o.f(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,o,s=Q){this.user=e,this._options=s,this.focus=new L("focused"),this.anchor=new L("anchor"),this.eventBufferer=new g.at,this._ariaLabel="",this.disposables=new f.Cm,this._onDidDispose=new g.vl,this.onDidDispose=this._onDidDispose.event;const r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new T("listbox"!==r);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(a.push(new te(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new ee(e.templateId,[...a,e])));const c={...s,dnd:s.dnd&&new ie(this,s.dnd)};if(this.view=this.createListView(t,i,o,c),this.view.domNode.setAttribute("role",r),s.styleController)this.styleController=s.styleController(this.view.domId);else{const e=(0,n.li)(this.view.domNode);this.styleController=new K(e,this.view.domId)}if(this.spliceable=new l([new I(this.focus,this.view,s.identityProvider),new I(this.selection,this.view,s.identityProvider),new I(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new V(this,this.view)),("boolean"!==typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new B(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||W;this.typeNavigationController=new H(this,this.view,s.keyboardNavigationLabelProvider,s.keyboardNavigationEventFilter??(()=>!0),e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new C.uO(e,t,i,n)}createMouseController(e){return new q(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new b(this.user,`Invalid start index: ${e}`);if(t<0)throw new b(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new b(this.user,`Invalid index ${i}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if("undefined"!==typeof e){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,c.Fy)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return"undefined"===typeof e?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new b(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const o=this.findPreviousIndex(i,!1,t);o>-1&&n!==o?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();let s=o+this.view.renderHeight;i>n&&(s-=this.view.elementHeight(i)),this.view.setScrollTop(s),this.view.getScrollTop()!==o&&(this.setFocus([]),await(0,d.wR)(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=()=>0){let n;const o=i(),s=this.view.getScrollTop()+o;n=0===s?this.view.indexAt(s):this.view.indexAfter(s-1);const r=this.getFocus()[0];if(r!==n&&(void 0===r||r>=n)){const i=this.findNextIndex(n,!1,t);i>-1&&r!==i?this.setFocus([i],e):this.setFocus([n],e)}else{const n=s;this.view.setScrollTop(s-this.view.renderHeight-o),this.view.getScrollTop()+i()!==n&&(this.setFocus([]),await(0,d.wR)(0),await this.focusPreviousPage(e,t,i))}}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),o=this.view.elementTop(e),s=this.view.elementHeight(e);if((0,v.Et)(t)){const e=s-this.view.renderHeight+i;this.view.setScrollTop(e*(0,m.qE)(t,0,1)+o-i)}else{const e=o+s,t=n+this.view.renderHeight;o=t||(o=t&&s>=this.view.renderHeight?this.view.setScrollTop(o-i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const s=o-this.view.renderHeight+t;return Math.abs((i+t-n)/s)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){const e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}x([h.B],ne.prototype,"onDidChangeFocus",null),x([h.B],ne.prototype,"onDidChangeSelection",null),x([h.B],ne.prototype,"onContextMenu",null),x([h.B],ne.prototype,"onKeyDown",null),x([h.B],ne.prototype,"onDidFocus",null),x([h.B],ne.prototype,"onDidBlur",null)},1606:(e,t,i)=>{"use strict";i.d(t,{v:()=>a});var n=i(2150),o=i(53062),s=i(40231),r=i(5091);class a{constructor(){let e;this._onDidWillResize=new s.vl,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new s.vl,this.onDidResize=this._onDidResize.event,this._sashListener=new r.Cm,this._size=new n.fg(0,0),this._minSize=new n.fg(0,0),this._maxSize=new n.fg(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new o.m(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new o.m(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new o.m(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:o.B.North}),this._southSash=new o.m(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:o.B.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(s.Jh.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(s.Jh.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(s.Jh.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(s.Jh.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:o}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(o,Math.min(r,t));const a=new n.fg(t,e);n.fg.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}},53062:(e,t,i)=>{"use strict";i.d(t,{B:()=>g,m:()=>C});var n=i(2150),o=i(49822),s=i(25201),r=i(9659),a=i(34125),l=i(40231),c=i(5091),d=i(25160),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const h=!1;var g;(function(e){e["North"]="north",e["South"]="south",e["East"]="east",e["West"]="west"})(g||(g={}));let p=4;const f=new l.vl;let m=300;const _=new l.vl;class v{constructor(e){this.el=e,this.disposables=new c.Cm}get onPointerMove(){return this.disposables.add(new o.f((0,n.zk)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new o.f((0,n.zk)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}u([a.B],v.prototype,"onPointerMove",null),u([a.B],v.prototype,"onPointerUp",null);class b{get onPointerMove(){return this.disposables.add(new o.f(this.el,s.B.Change)).event}get onPointerUp(){return this.disposables.add(new o.f(this.el,s.B.End)).event}constructor(e){this.el=e,this.disposables=new c.Cm}dispose(){this.disposables.dispose()}}u([a.B],b.prototype,"onPointerMove",null),u([a.B],b.prototype,"onPointerUp",null);class y{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}u([a.B],y.prototype,"onPointerMove",null),u([a.B],y.prototype,"onPointerUp",null);const w="pointer-events-disabled";class C extends c.jG{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,n.BC)(this.el,(0,n.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,c.s)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new o.f(this._orthogonalStartDragHandle,"mouseenter")).event((()=>C.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new o.f(this._orthogonalStartDragHandle,"mouseleave")).event((()=>C.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,n.BC)(this.el,(0,n.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,c.s)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new o.f(this._orthogonalEndDragHandle,"mouseenter")).event((()=>C.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new o.f(this._orthogonalEndDragHandle,"mouseleave")).event((()=>C.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=m,this.hoverDelayer=this._register(new r.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new l.vl),this._onDidStart=this._register(new l.vl),this._onDidChange=this._register(new l.vl),this._onDidReset=this._register(new l.vl),this._onDidEnd=this._register(new l.vl),this.orthogonalStartSashDisposables=this._register(new c.Cm),this.orthogonalStartDragHandleDisposables=this._register(new c.Cm),this.orthogonalEndSashDisposables=this._register(new c.Cm),this.orthogonalEndDragHandleDisposables=this._register(new c.Cm),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,n.BC)(e,(0,n.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),d.zx&&this.el.classList.add("mac");const a=this._register(new o.f(this.el,"mousedown")).event;this._register(a((t=>this.onPointerStart(t,new v(e))),this));const u=this._register(new o.f(this.el,"dblclick")).event;this._register(u(this.onPointerDoublePress,this));const g=this._register(new o.f(this.el,"mouseenter")).event;this._register(g((()=>C.onMouseEnter(this))));const y=this._register(new o.f(this.el,"mouseleave")).event;this._register(y((()=>C.onMouseLeave(this)))),this._register(s.q.addTarget(this.el));const w=this._register(new o.f(this.el,s.B.Start)).event;this._register(w((e=>this.onPointerStart(e,new b(this.el))),this));const S=this._register(new o.f(this.el,s.B.Tap)).event;let k;this._register(S((e=>{if(k)return clearTimeout(k),k=void 0,void this.onPointerDoublePress(e);clearTimeout(k),k=setTimeout((()=>k=void 0),250)}),this)),"number"===typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=p,this._register(f.event((e=>{this.size=e,this.layout()})))),this._register(_.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",h),this.layout()}onPointerStart(e,t){n.fs.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new y(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new y(t))),!this.state)return;const o=this.el.ownerDocument.getElementsByTagName("iframe");for(const n of o)n.classList.add(w);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const u=(0,n.li)(this.el),h=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":d.zx?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":d.zx?"col-resize":"ew-resize",u.textContent=`* { cursor: ${e} !important; }`},g=new c.Cm;h(),i||this.onDidEnablementChange.event(h,null,g);const p=e=>{n.fs.stop(e,!1);const t={startX:s,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)},f=e=>{n.fs.stop(e,!1),u.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const t of o)t.classList.remove(w)};t.onPointerMove(p,null,g),t.onPointerUp(f,null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&C.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&C.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){C.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){const t=e.initialTarget??e.target;if(t&&(0,n.sb)(t))return t.classList.contains("orthogonal-drag-handle")?t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},37800:(e,t,i)=>{"use strict";i.d(t,{MU:()=>N,QC:()=>T,Se:()=>R,oO:()=>D});var n=i(88758),o=i(2150),s=i(76892),r=i(46274),a=i(80125),l=i(52469),c=i(9659),d=i(23740);const u=11;class h extends l.x{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px","undefined"!==typeof e.top&&(this.bgDomNode.style.top="0px"),"undefined"!==typeof e.left&&(this.bgDomNode.style.left="0px"),"undefined"!==typeof e.bottom&&(this.bgDomNode.style.bottom="0px"),"undefined"!==typeof e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...d.L.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=u+"px",this.domNode.style.height=u+"px","undefined"!==typeof e.top&&(this.domNode.style.top=e.top+"px"),"undefined"!==typeof e.left&&(this.domNode.style.left=e.left+"px"),"undefined"!==typeof e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),"undefined"!==typeof e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a._),this._register(o.b2(this.bgDomNode,o.Bx.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(o.b2(this.domNode,o.Bx.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new o.Be),this._pointerdownScheduleRepeatTimer=this._register(new c.pc)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24,o.zk(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault()}}var g=i(5091);class p extends g.jG{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new c.pc)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode?.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}var f=i(25160);const m=140;class _ extends l.x{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new p(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a._),this._shouldRender=!0,this.domNode=(0,s.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(o.ko(this.domNode.domNode,o.Bx.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,s.Z)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"===typeof i&&this.slider.setWidth(i),"number"===typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(o.ko(this.slider.domNode,o.Bx.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);i<=o&&o<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"===typeof e.offsetX&&"number"===typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=o.BK(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const o=this._sliderOrthogonalPointerPosition(e),s=Math.abs(o-i);if(f.uF&&s>m)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e),a=r-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(a))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}var v=i(28925),b=i(25923);class y extends _{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new v.m(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-u)/2,i=(t.horizontalScrollbarSize-u)/2;this._createArrow({className:"scra",icon:b.W.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,1,0))}),this._createArrow({className:"scra",icon:b.W.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class w extends _{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new v.m(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-u)/2,i=(t.verticalScrollbarSize-u)/2;this._createArrow({className:"scra",icon:b.W.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,1))}),this._createArrow({className:"scra",icon:b.W.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var C=i(40231),S=i(52210);const k=500,x=50,E=!0;class L{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class T{static{this.INSTANCE=new T}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;do{const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}while(1);return t<=.5}acceptStandardWheelEvent(e){if(n.H8){const t=o.zk(e.browserEvent),i=(0,n.pR)(t);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){let n=null;const o=new L(e,t,i);-1===this._front&&-1===this._rear?(this._memory[0]=o,this._front=0,this._rear=0):(n=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o),o.score=this._computeScore(o,n)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if(this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(i+=.25),t){const n=Math.abs(e.deltaX),o=Math.abs(e.deltaY),s=Math.abs(t.deltaX),r=Math.abs(t.deltaY),a=Math.max(Math.min(n,s),1),l=Math.max(Math.min(o,r),1),c=Math.max(n,s),d=Math.max(o,r),u=c%a===0&&d%l===0;u&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){const t=Math.abs(Math.round(e)-e);return t<.01}}class I extends l.x{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new C.vl),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new C.vl),e.style.overflow="hidden",this._options=A(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new w(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new y(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,s.Z)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,s.Z)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,s.Z)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new c.pc),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,g.AS)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,f.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){"undefined"!==typeof e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),"undefined"!==typeof e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),"undefined"!==typeof e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),"undefined"!==typeof e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),"undefined"!==typeof e.horizontal&&(this._options.horizontal=e.horizontal),"undefined"!==typeof e.vertical&&(this._options.vertical=e.vertical),"undefined"!==typeof e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),"undefined"!==typeof e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),"undefined"!==typeof e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.$(e))}_setListeningToMouseWheel(e){const t=this._mouseWheelToDispose.length>0;if(t!==e&&(this._mouseWheelToDispose=(0,g.AS)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.$(e))};this._mouseWheelToDispose.push(o.ko(this._listenOnDomNode,o.Bx.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;const t=T.INSTANCE;E&&t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&o+n===0?o=n=0:Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const s=!f.zx&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=x*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(o){const e=x*o,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}if(a=this._scrollable.validateScrollPosition(a),r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop){const e=E&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel();e?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0}}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),k)}}class R extends I{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new S.yE({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>o.PG(o.zk(e),t)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class D extends I{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class N extends I{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new S.yE({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>o.PG(o.zk(e),t)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}))),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function A(e){const t={lazyRender:"undefined"!==typeof e.lazyRender&&e.lazyRender,className:"undefined"!==typeof e.className?e.className:"",useShadows:"undefined"===typeof e.useShadows||e.useShadows,handleMouseWheel:"undefined"===typeof e.handleMouseWheel||e.handleMouseWheel,flipAxes:"undefined"!==typeof e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:"undefined"!==typeof e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:"undefined"!==typeof e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:"undefined"!==typeof e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:"undefined"!==typeof e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:"undefined"!==typeof e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:"undefined"===typeof e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:"undefined"===typeof e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:"undefined"!==typeof e.arrowSize?e.arrowSize:11,listenOnDomNode:"undefined"!==typeof e.listenOnDomNode?e.listenOnDomNode:null,horizontal:"undefined"!==typeof e.horizontal?e.horizontal:1,horizontalScrollbarSize:"undefined"!==typeof e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:"undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:"undefined"!==typeof e.horizontalHasArrows&&e.horizontalHasArrows,vertical:"undefined"!==typeof e.vertical?e.vertical:1,verticalScrollbarSize:"undefined"!==typeof e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:"undefined"!==typeof e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:"undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:"undefined"!==typeof e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize="undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize="undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,f.zx&&(t.className+=" mac"),t}},28925:(e,t,i)=>{"use strict";i.d(t,{m:()=>o});const n=20;class o{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new o(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,o,s){const r=Math.max(0,i-e),a=Math.max(0,r-2*t),l=o>0&&o>i;if(!l)return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(n,Math.floor(i*a/o))),d=(a-c)/(o-i),u=s*d;return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const e=o._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t{"use strict";i.d(t,{U:()=>y,X:()=>b});var n=i(2150),o=i(49822),s=i(53062),r=i(37800),a=i(85053),l=i(85476),c=i(40231),d=i(5091),u=i(19977),h=i(52210),g=i(50322);const p={separatorBorder:l.Q1.transparent};class f{set size(e){this._size=e}get size(){return this._size}get visible(){return"undefined"===typeof this._cachedVisibleSize}setVisible(e,t){if(e!==this.visible){e?(this.size=(0,u.qE)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"===typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{this.view.setVisible?.(e)}catch(i){console.error("Splitview: Failed to set visible view"),console.error(i)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"===typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(i){console.error("Splitview: Failed to layout view"),console.error(i)}}dispose(){this.disposable.dispose()}}class m extends f{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class _ extends f{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var v,b;(function(e){e[e["Idle"]=0]="Idle",e[e["Busy"]=1]="Busy"})(v||(v={})),function(e){function t(e){return{type:"split",index:e}}function i(e){return{type:"auto",index:e}}function n(e){return{type:"invisible",cachedVisibleSize:e}}e.Distribute={type:"distribute"},e.Split=t,e.Auto=i,e.Invisible=n}(b||(b={}));class y extends d.jG{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=v.Idle,this._onDidSashChange=this._register(new c.vl),this._onDidSashReset=this._register(new c.vl),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=t.orientation??0,this.inverseAltBehavior=t.inverseAltBehavior??!1,this.proportionalLayout=t.proportionalLayout??!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,n.BC)(this.el,(0,n.$)(".sash-container")),this.viewContainer=(0,n.$)(".split-view-container"),this.scrollable=this._register(new h.yE({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:e=>(0,n.PG)((0,n.zk)(this.el),e)})),this.scrollableElement=this._register(new r.oO(this.viewContainer,{vertical:0===this.orientation?t.scrollbarVisibility??1:2,horizontal:1===this.orientation?t.scrollbarVisibility??1:2},this.scrollable));const i=this._register(new o.f(this.viewContainer,"scroll")).event;this._register(i((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),(0,n.BC)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||p),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=g.b0(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this._contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i0&&(n.size=(0,u.qE)(Math.round(o*e/t),n.minimumSize,n.maximumSize))}}else{const t=(0,a.y1)(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const n of this.viewItems)n.enabled=!1;const o=this.sashItems.findIndex((t=>t.sash===e)),s=(0,d.qE)((0,n.ko)(this.el.ownerDocument.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),(0,n.ko)(this.el.ownerDocument.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,r,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){const e=o===this.sashItems.length-1;if(e){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}}if(!t){const e=(0,a.y1)(o,-1),t=(0,a.y1)(o+1,this.viewItems.length),s=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),d=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),u=Math.max(s,d),h=Math.min(c,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"===typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?u-t:u+t,size:e.size}}if("number"===typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);r={index:p,limitDelta:e.visible?h+t:h-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l,maxDelta:c,alt:t,snapBefore:n,snapAfter:r,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,d=this.resize(t,c,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"===typeof t?t:e.size,t=(0,u.qE)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;try{const i=(0,a.y1)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),s=this.viewItems[e];t=Math.round(t),t=(0,u.qE)(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o)}finally{this.state=v.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const r of this.viewItems)r.maximumSize-r.minimumSize>0&&(e.push(r),t+=r.size);const i=Math.floor(t/e.length);for(const r of e)r.size=(0,u.qE)(i,r.minimumSize,r.maximumSize);const n=(0,a.y1)(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,o){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;try{const r=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(i));const l=e.onDidChange((e=>this.onViewChange(p,e))),u=(0,d.s)((()=>r.remove())),h=(0,d.qE)(l,u);let g;"number"===typeof t?g=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),g="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const p=0===this.orientation?new m(r,e,g,h):new _(r,e,g,h);if(this.viewItems.splice(i,0,p),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new s.m(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},{...e,orientation:1}):new s.m(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},{...e,orientation:0}),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=c.Jh.map(t.onDidStart,n),r=o(this.onSashStart,this),l=c.Jh.map(t.onDidChange,n),u=l(this.onSashChange,this),h=c.Jh.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),g=h(this.onSashEnd,this),p=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.y1)(e,-1),n=(0,a.y1)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!==typeof o||this.viewItems[o].visible)&&("number"!==typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(e)})),f=(0,d.qE)(r,u,g,p,t),m={sash:t,disposable:f};this.sashItems.splice(i-1,0,m)}let f;r.appendChild(e.element),"number"!==typeof t&&"split"===t.type&&(f=[t.index]),o||this.relayout([i],f),o||"number"===typeof t||"distribute"!==t.type||this.distributeViewSizes()}finally{this.state=v.Idle}}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,s=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const d=(0,a.y1)(e,-1),h=(0,a.y1)(e+1,this.viewItems.length);if(o)for(const u of o)(0,a._A)(d,u),(0,a._A)(h,u);if(n)for(const u of n)(0,a.r7)(d,u),(0,a.r7)(h,u);const g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),f=h.map((e=>this.viewItems[e])),m=h.map((e=>i[e])),_=d.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=d.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===h.length?Number.POSITIVE_INFINITY:h.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),y=0===h.length?Number.NEGATIVE_INFINITY:h.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),w=Math.max(_,y,s),C=Math.min(b,v,r);let S=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;S=i!==e.visible,e.setVisible(i,l.size)}if(!S&&c){const e=this.viewItems[c.index],i=te+t.size),0);let i=this.size-t;const n=(0,a.y1)(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));for(const r of s)(0,a._A)(n,r);for(const r of o)(0,a.r7)(n,r);"number"===typeof e&&(0,a.r7)(n,e);for(let r=0;0!==i&&re+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const s=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let l=0;l0||this.startSnappingEnabled)?e.state=1:u&&t[l]&&(r0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),(0,d.AS)(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}},83092:(e,t,i)=>{"use strict";i.d(t,{F:()=>l,l:()=>c});var n=i(52469),o=i(23740),s=i(40231),r=i(96371),a=i(50799);const l={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class c extends n.x{constructor(e){super(),this._onChange=this._register(new s.vl),this.onChange=this._onChange.event,this._onKeyDown=this._register(new s.vl),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...o.L.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register((0,a.i)().setupManagedHover(e.hoverDelegate??(0,r.nZ)("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},55798:(e,t,i)=>{"use strict";i.d(t,{DO:()=>Q,KP:()=>n,RD:()=>O,vD:()=>A,w0:()=>I});var n,o=i(2150),s=(i(49822),i(68389)),r=(i(48038),i(95994),i(76358)),a=i(90487),l=i(31304),c=i(83092),d=i(41197),u=i(57688),h=(i(55664),i(85053)),g=i(9659),p=i(25923),f=i(23740),m=i(21553),_=i(40231),v=i(10695),b=i(5091),y=i(19977),w=i(50322),C=i(41337),S=(i(96371),i(39751)),k=i(19950);class x extends a.ur{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function E(e){return e instanceof a.ur?new x(e):e}class L{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=b.jG.None,this.disposables=new b.Cm}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart?.(E(e),t)}onDragOver(e,t,i,n,o,s=!0){const r=this.dnd.onDragOver(E(e),t&&t.element,i,n,o),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),"undefined"===typeof t)return r;if(a&&"boolean"!==typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,g.EQ)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500,this.disposables)),"boolean"===typeof r||!r.accept||"undefined"===typeof r.bubble||r.feedback){if(!s){const e="boolean"===typeof r?r:r.accept,t="boolean"===typeof r?void 0:r.effect;return{accept:e,effect:t,feedback:[i]}}return r}if(1===r.bubble){const i=this.modelProvider(),s=i.getNodeLocation(t),r=i.getParentNodeLocation(s),a=i.getNode(r),l=r&&i.getListIndex(r);return this.onDragOver(e,a,l,n,o,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),d=l.getListIndex(c),u=l.getListRenderCount(c);return{...r,feedback:(0,h.y1)(d,d+u)}}drop(e,t,i,n,o){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(E(e),t&&t.element,i,n,o)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function T(e,t){return t&&{...t,identityProvider:t.identityProvider&&{getId(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new L(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return t.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return t.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:t.accessibilityProvider&&{...t.accessibilityProvider,getSetSize(t){const i=e(),n=i.getNodeLocation(t),o=i.getParentNodeLocation(n),s=i.getNode(o);return s.visibleChildrenCount},getPosInSet(e){return e.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}}}class I{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}}(function(e){e["None"]="none",e["OnHover"]="onHover",e["Always"]="always"})(n||(n={}));class R{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new b.Cm,this.onDidChange=_.Jh.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class D{static{this.DefaultIndent=8}constructor(e,t,i,n,o,s={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=D.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=b.jG.None,this.disposables=new b.Cm,this.templateId=e.templateId,this.updateOptions(s),_.Jh.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if("undefined"!==typeof e.indent){const t=(0,y.qE)(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if("undefined"!==typeof e.renderIndentGuides){const t=e.renderIndentGuides!==n.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new b.Cm;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}"undefined"!==typeof e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,o.BC)(e,(0,o.$)(".monaco-tl-row")),i=(0,o.BC)(t,(0,o.$)(".monaco-tl-indent")),n=(0,o.BC)(t,(0,o.$)(".monaco-tl-twistie")),s=(0,o.BC)(t,(0,o.$)(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:b.jG.None,templateData:r}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,i.templateData,n),"number"===typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=D.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...f.L.asClassNameArray(p.W.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...f.L.asClassNameArray(p.W.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,o.w_)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new b.Cm,n=this.modelProvider();while(1){const s=n.getNodeLocation(e),r=n.getParentNodeLocation(s);if(!r)break;const a=n.getNode(r),l=(0,o.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),i.add((0,b.s)((()=>this.renderedIndentGuides.delete(a,l)))),e=a}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch{}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,b.AS)(this.disposables)}}class N{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new b.Cm,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"===typeof n?n?1:0:(0,d.iZ)(n)?(0,d.Mn)(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:v.ne.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(n)?n:[n];for(const s of o){const e=s&&s.toString();if("undefined"===typeof e)return{data:v.ne.Default,visibility:i};let t;if(this.tree.findMatchType===O.Contiguous){const i=e.toLowerCase().indexOf(this._lowercasePattern);if(i>-1){t=[Number.MAX_SAFE_INTEGER,0];for(let e=this._lowercasePattern.length;e>0;e--)t.push(i+e-1)}}else t=(0,v.dt)(this._pattern,this._lowercasePattern,0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(t)return this._matchCount++,1===o.length?{data:t,visibility:i}:{data:{label:e,score:t},visibility:i}}return this.tree.findMode===A.Filter?"number"===typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:v.ne.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,b.AS)(this.disposables)}}c.l;c.l;r.x8,c.F;var A,O;(function(e){e[e["Highlight"]=0]="Highlight",e[e["Filter"]=1]="Filter"})(A||(A={})),function(e){e[e["Fuzzy"]=0]="Fuzzy",e[e["Contiguous"]=1]="Contiguous"}(O||(O={}));b.jG;class P{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,o,s={}){this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=o,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new _.vl,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new _.vl,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new _.vl,this._onDidChangeOpenState=new _.vl,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new b.Cm,this.disposables=new b.Cm,this._mode=e.options.defaultFindMode??A.Highlight,this._matchType=e.options.defaultFindMatchType??O.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&e?((0,k.xE)((0,C.kg)("replFindNoResults","No results")),this.tree.options.showNotFoundMessage??1?this.widget?.showMessage({type:2,content:(0,C.kg)("not found","No elements found.")}):this.widget?.showMessage({type:2})):(this.widget?.clearMessage(),this.pattern&&(0,k.xE)((0,C.kg)("replFindResults","{0} results",this.filter.matchCount)))}shouldAllowFocus(e){return!this.widget||!this.pattern||(this.filter.totalCount>0&&this.filter.matchCount<=1||!v.ne.isDefault(e.filterData))}layout(e){this.width=e,this.widget?.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function M(e,t){return e.position===t.position&&F(e,t)}function F(e,t){return e.node.element===t.node.element&&e.startIndex===t.startIndex&&e.height===t.height&&e.endIndex===t.endIndex}class B{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return(0,h.aI)(this.stickyNodes,e.stickyNodes,M)}lastNodePartiallyVisible(){if(0===this.count)return!1;const e=this.stickyNodes[this.count-1];if(1===this.count)return 0!==e.position;const t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!(0,h.aI)(this.stickyNodes,e.stickyNodes,F))return!1;if(0===this.count)return!1;const t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class W{constrainStickyScrollNodes(e,t,i){for(let n=0;ni||n>=t)return e.slice(0,n)}return e}}class H extends b.jG{constructor(e,t,i,n,o,s={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=o,this.maxWidgetViewRatio=.4;const r=this.validateStickySettings(s);this.stickyScrollMaxItemCount=r.stickyScrollMaxItemCount,this.stickyScrollDelegate=s.stickyScrollDelegate??new W,this._widget=this._register(new V(i.getScrollableElement(),i,e,n,o,s.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll((()=>this.update()))),this._register(i.onDidChangeContentHeight((()=>this.update()))),this._register(e.onDidChangeCollapseState((()=>this.update()))),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(t=0===e?this.view.firstVisibleIndex:this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){const e=this.getNodeAtHeight(0);if(!e||0===this.tree.scrollTop)return void this._widget.setState(void 0);const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[];let i=e,n=0,o=this.getNextStickyNode(i,void 0,n);while(o){if(t.push(o),n+=o.height,t.length<=this.stickyScrollMaxItemCount&&(i=this.getNextVisibleNode(o),!i))break;o=this.getNextStickyNode(i,o.node,n)}const s=this.constrainStickyNodes(t);return s.length?new B(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n){if(n===e){if(!this.nodeIsUncollapsedParent(e))return;if(this.nodeTopAlignsWithStickyNodesBottom(e,i))return}return this.createStickyScrollNode(n,i)}}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),o=t;return this.view.scrollTop===n-o}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:o}=this.getNodeRange(e),s=this.calculateStickyNodePosition(o,t,i);return{node:e,position:s,height:i,startIndex:n,endIndex:o}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);while(n){if(n===t)return i;i=n,n=this.getParentNode(i)}if(void 0===t)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(null===n&&this.view.firstVisibleIndex===e&&e+1a&&t<=a?a-i:t}constrainStickyNodes(e){if(0===e.length)return[];const t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;const n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];const o=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||o.position+o.height>t)throw new Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){const t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);return i}getNodeRange(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");const n=this.model.getListRenderCount(t),o=i+n-1;return{startIndex:i,endIndex:o}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);while(i)t.push(i),i=this.getParentNode(i);let n=0;for(let o=0;o0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i)return this._previousState=void 0,this._previousElements=[],void this._previousStateDisposables.clear();const n=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${n.position}px`;else{this._previousStateDisposables.clear();const t=Array(e.count);for(let i=e.count-1;i>=0;i--){const n=e.stickyNodes[i],{element:o,disposable:s}=this.createElement(n,i,e.count);t[i]=o,this._rootDomNode.appendChild(o),this._previousStateDisposables.add(s)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}createElement(e,t,i){const n=e.startIndex,o=document.createElement("div");o.style.top=`${e.position}px`,!1!==this.tree.options.setRowHeight&&(o.style.height=`${e.height}px`),!1!==this.tree.options.setRowLineHeight&&(o.style.lineHeight=`${e.height}px`),o.classList.add("monaco-tree-sticky-row"),o.classList.add("monaco-list-row"),o.setAttribute("data-index",`${n}`),o.setAttribute("data-parity",n%2===0?"even":"odd"),o.setAttribute("id",this.view.getElementID(n));const s=this.setAccessibilityAttributes(o,e.node.element,t,i),r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find((e=>e.templateId===r));if(!a)throw new Error(`No renderer found for template id ${r}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));const c=a.renderTemplate(o);a.renderElement(l,e.startIndex,c,e.height);const d=(0,b.s)((()=>{s.dispose(),a.disposeElement(l,e.startIndex,c,e.height),a.disposeTemplate(c),o.remove()}));return{element:o,disposable:d}}setAccessibilityAttributes(e,t,i,n){if(!this.accessibilityProvider)return b.jG.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");const o=this.accessibilityProvider.getAriaLabel(t),s=o&&"string"!==typeof o?o:(0,S.lk)(o),r=(0,S.fm)((t=>{const i=t.readObservable(s);i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")}));"string"===typeof o||o&&e.setAttribute("aria-label",o.get());const a=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return"number"===typeof a&&e.setAttribute("aria-level",`${a}`),e.setAttribute("aria-selected",String(!1)),r}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class j extends b.jG{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new _.vl,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new _.vl,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register((0,o.ko)(this.container,"focus",(()=>this.onFocus()))),this._register((0,o.ko)(this.container,"blur",(()=>this.onBlur()))),this._register(this.view.onDidFocus((()=>this.toggleStickyScrollFocused(!1)))),this._register(this.view.onKeyDown((e=>this.onKeyDown(e)))),this._register(this.view.onMouseDown((e=>this.onMouseDown(e)))),this._register(this.view.onContextMenu((e=>this.handleContextMenu(e))))}handleContextMenu(e){const t=e.browserEvent.target;if(!(0,l.Es)(t)&&!(0,l.xu)(t))return void(this.focusedLast()&&this.view.domFocus());if(!(0,o.kx)(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const t=this.state.stickyNodes.findIndex((t=>t.node.element===e.element?.element));if(-1===t)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");return this.container.focus(),void this.setFocus(t)}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const i=this.state.stickyNodes[this.focusedIndex],n=i.node.element,s=this.elements[this.focusedIndex];this._onContextMenu.fire({element:n,anchor:s,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state)if("ArrowUp"===e.key)this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if("ArrowDown"===e.key||"ArrowRight"===e.key){if(this.focusedIndex>=this.state.count-1){const e=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([e]),this.scrollNodeUnderWidget(e,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}onMouseDown(e){const t=e.browserEvent.target;((0,l.Es)(t)||(0,l.xu)(t))&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&0===t.count)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){const e=(0,y.qE)(i,0,t.count-1);this.setFocus(e)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){const t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,o=this.view.getElementTop(e),s=n?n.position+n.height+i.height:i.height;this.view.scrollTop=o-s}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return!!this.state&&this.view.getHTMLElement().classList.contains("sticky-scroll-focused")}removeFocus(){-1!==this.focusedIndex&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){-1!==this.focusedIndex&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||0===this.elements.length)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),-1===this.focusedIndex&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function z(e){let t=u.Lx.Unknown;return(0,o.XD)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=u.Lx.Twistie:(0,o.XD)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=u.Lx.Element:(0,o.XD)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=u.Lx.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function U(e){const t=(0,l.Es)(e.browserEvent.target);return{element:e.element?e.element.element:null,browserEvent:e.browserEvent,anchor:e.anchor,isStickyScroll:t}}function $(e,t){t(e),e.children.forEach((e=>$(e,t)))}class q{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new _.vl,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&(0,h.aI)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>$(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>$(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>$(e,s)));const r=[];for(const a of this.nodes){const e=this.identityProvider.getId(a.element).toString(),t=i.has(e);if(t){const t=o.get(e);t&&t.visible&&r.push(t)}else r.push(a)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class K extends l.MH{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if((0,l.Bm)(e.browserEvent.target)||(0,l.B6)(e.browserEvent.target)||(0,l.bm)(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,o=(0,l.xu)(e.browserEvent.target);let s=!1;if(s=!!o||("function"===typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick),o)this.handleStickyScrollMouseEvent(e,t);else{if(s&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e)}if(t.collapsible&&(!o||n)){const i=this.tree.getNodeLocation(t),o=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,o),n)return void(e.browserEvent.isHandledByList=!0)}o||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if((0,l.b$)(e.browserEvent.target)||(0,l.W0)(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),o=this.list.getElementTop(n),s=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=o-s,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){const t=e.browserEvent.target.classList.contains("monaco-tl-twistie");!t&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}onMouseDown(e){const t=e.browserEvent.target;(0,l.Es)(t)||(0,l.xu)(t)||super.onMouseDown(e)}onContextMenu(e){const t=e.browserEvent.target;(0,l.Es)(t)||(0,l.xu)(t)||super.onContextMenu(e)}}class G extends l.B8{constructor(e,t,i,n,o,s,r,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=r}createMouseController(e){return new K(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];let s;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(s=e+i)})),n.length>0&&super.setFocus((0,h.dM)([...super.getFocus(),...n])),o.length>0&&super.setSelection((0,h.dM)([...super.getSelection(),...o])),"number"===typeof s&&super.setAnchor(s)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||("undefined"===typeof e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class Q{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return _.Jh.filter(_.Jh.map(this.view.onMouseDblClick,z),(e=>e.target!==u.Lx.Filter))}get onMouseOver(){return _.Jh.map(this.view.onMouseOver,z)}get onMouseOut(){return _.Jh.map(this.view.onMouseOut,z)}get onContextMenu(){return _.Jh.any(_.Jh.filter(_.Jh.map(this.view.onContextMenu,U),(e=>!e.isStickyScroll)),this.stickyScrollController?.onContextMenu??_.Jh.None)}get onPointer(){return _.Jh.map(this.view.onPointer,z)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return _.Jh.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){return this.findController?.mode??A.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){return this.findController?.matchType??O.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return"undefined"===typeof this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return"undefined"===typeof this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,r,a={}){this._user=e,this._options=a,this.eventBufferer=new _.at,this.onDidChangeFindOpenState=_.Jh.None,this.onDidChangeStickyScrollFocused=_.Jh.None,this.disposables=new b.Cm,this._onWillRefilter=new _.vl,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new _.vl,this.treeDelegate=new I(i);const c=new _.Wj,d=new _.Wj,u=this.disposables.add(new R(d.event)),h=new m.db;this.renderers=r.map((e=>new D(e,(()=>this.model),c.event,u,h,a)));for(const n of this.renderers)this.disposables.add(n);let p;a.keyboardNavigationLabelProvider&&(p=new N(this,a.keyboardNavigationLabelProvider,a.filter),a={...a,filter:p},this.disposables.add(p)),this.focus=new q((()=>this.view.getFocusedElements()[0]),a.identityProvider),this.selection=new q((()=>this.view.getSelectedElements()[0]),a.identityProvider),this.anchor=new q((()=>this.view.getAnchorElement()),a.identityProvider),this.view=new G(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...T((()=>this.model),a),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,a),c.input=this.model.onDidChangeCollapseState;const f=_.Jh.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);f((()=>null),null,this.disposables);const v=this.disposables.add(new _.vl),y=this.disposables.add(new g.ve(0));if(this.disposables.add(_.Jh.any(f,this.focus.onDidChange,this.selection.onDidChange)((()=>{y.trigger((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);v.fire([...e.values()])}))}))),d.input=v.event,!1!==a.keyboardSupport){const e=_.Jh.chain(this.view.onKeyDown,(e=>e.filter((e=>!(0,l.B6)(e.target))).map((e=>new s.Z(e)))));_.Jh.chain(e,(e=>e.filter((e=>15===e.keyCode))))(this.onLeftArrow,this,this.disposables),_.Jh.chain(e,(e=>e.filter((e=>17===e.keyCode))))(this.onRightArrow,this,this.disposables),_.Jh.chain(e,(e=>e.filter((e=>10===e.keyCode))))(this.onSpace,this,this.disposables)}if((a.findWidgetEnabled??1)&&a.keyboardNavigationLabelProvider&&a.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new P(this,this.model,this.view,p,a.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=_.Jh.None,this.onDidChangeFindMatchType=_.Jh.None;a.enableStickyScroll&&(this.stickyScrollController=new H(this,this.model,this.view,this.renderers,this.treeDelegate,a),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,o.li)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}updateOptions(e={}){this._options={...this._options,...e};for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new H(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=_.Jh.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t),(0,w.Et)(t)&&this.findController?.layout(t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const n=e.treeStickyScrollBackground??e.listBackground;n&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${n}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${n}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const s=(0,o.gI)(e.listFocusAndSelectionOutline,(0,o.gI)(e.listSelectionOutline,e.listFocusOutline??""));s&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e),i=this.model.getNode(t);return i.element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}))}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}))}focusNext(e=1,t=!1,i,n=((0,o.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=((0,o.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=((0,o.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=((0,o.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusPreviousPage(e,t,(()=>this.stickyScrollController?.height??0))}focusLast(e,t=((0,o.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusLast(e,t)}focusFirst(e,t=((0,o.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(-1!==i)if(this.stickyScrollController){const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}else this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!0);if(!o){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!1);if(!o){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,b.AS)(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose()}}},41197:(e,t,i)=>{"use strict";i.d(t,{G6:()=>g,Mn:()=>u,iZ:()=>d});var n=i(57688),o=i(85053),s=i(9659),r=i(59638),a=i(40651),l=i(40231),c=i(5837);function d(e){return"object"===typeof e&&"visibility"in e&&"data"in e}function u(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function h(e){return"boolean"===typeof e.collapsible}class g{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new l.at,this._onDidChangeCollapseState=new l.vl,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new l.vl,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new l.vl,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new s.ve(r.h),this.collapseByDefault="undefined"!==typeof n.collapseByDefault&&n.collapseByDefault,this.allowNonCollapsibleParents=n.allowNonCollapsibleParents??!1,this.filter=n.filter,this.autoExpandSingleChildren="undefined"!==typeof n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=c.f.empty(),o={}){if(0===e.length)throw new n.jh(this.user,"Invalid tree location");o.diffIdentityProvider?this.spliceSmart(o.diffIdentityProvider,e,t,i,o):this.spliceSimple(e,t,i,o)}spliceSmart(e,t,i,n=c.f.empty(),o,s=o.diffDepth??0){const{parentNode:r}=this.getParentNodeWithListIndex(t);if(!r.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],d=t[t.length-1],u=new a.uP({getElements:()=>r.lastDiffIds},{getElements:()=>[...r.children.slice(0,d),...l,...r.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(u.quitEarly)return r.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),g=(t,i,n)=>{if(s>0)for(let r=0;rt.originalStart-e.originalStart)))g(p,f,p-(a.originalStart+a.originalLength)),p=a.originalStart,f=a.modifiedStart-d,this.spliceSimple([...h,p],a.originalLength,c.f.slice(l,f,f+a.modifiedLength),o);g(p,f,p)}spliceSimple(e,t,i=c.f.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:u}=this.getParentNodeWithListIndex(e),h=[],g=c.f.map(i,(e=>this.createTreeNode(e,a,a.visible?1:0,d,h,n))),p=e[e.length-1];let f=0;for(let o=p;o>=0&&or.getId(e.element).toString()))):a.lastDiffIds=a.children.map((e=>r.getId(e.element).toString())):a.lastDiffIds=void 0;let y=0;for(const o of b)o.visible&&y++;if(0!==y)for(let o=p+m.length;oe+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(a,v-e),this.list.splice(l,e,h)}if(b.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};b.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:b});let w=a;while(w){if(2===w.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}w=w.parent}}rerender(e){if(0===e.length)throw new n.jh(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:o}=this.getTreeNodeWithListIndex(e);t.visible&&o&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);"undefined"===typeof t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);"undefined"===typeof t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!h(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(h(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!h(t)&&t.recursive)for(const o of e.children)n=this._setNodeCollapseState(o,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);while(t.parent)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,s){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"===typeof e.collapsible?e.collapsible:"undefined"!==typeof e.collapsed,collapsed:"undefined"===typeof e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&o.push(r);const l=e.children||c.f.empty(),d=n&&0!==a&&!r.collapsed;let u=0,h=1;for(const c of l){const e=this.createTreeNode(c,r,a,d,o,s);r.children.push(e),h+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=u++)}return this.allowNonCollapsibleParents||(r.collapsible=r.collapsible||r.children.length>0),r.visibleChildrenCount=u,r.visible=2===a?u>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=h):(r.renderNodeCount=0,n&&o.pop()),s?.(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)while(e)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"===typeof i?(e.filterData=void 0,i?1:0):d(i)?(e.filterData=i.data,u(i.visibility)):(e.filterData=void 0,u(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...o]=e;if(i<0||i>t.children.length)throw new n.jh(this.user,"Invalid tree location");return this.getTreeNode(o,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:o,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new n.jh(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:o,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,o=!0,s=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new n.jh(this.user,"Invalid tree location");for(let n=0;n{"use strict";var n,o;i.d(t,{Lx:()=>o,Yo:()=>n,jh:()=>s,y2:()=>r}),function(e){e[e["Expanded"]=0]="Expanded",e[e["Collapsed"]=1]="Collapsed",e[e["PreserveOrExpanded"]=2]="PreserveOrExpanded",e[e["PreserveOrCollapsed"]=3]="PreserveOrCollapsed"}(n||(n={})),function(e){e[e["Unknown"]=0]="Unknown",e[e["Twistie"]=1]="Twistie",e[e["Element"]=2]="Element",e[e["Filter"]=3]="Filter"}(o||(o={}));class s extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class r{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}},52469:(e,t,i)=>{"use strict";i.d(t,{x:()=>l});var n=i(2150),o=i(68389),s=i(46274),r=i(25201),a=i(5091);class l extends a.jG{onclick(e,t){this._register(n.ko(e,n.Bx.CLICK,(i=>t(new s.P(n.zk(e),i)))))}onmousedown(e,t){this._register(n.ko(e,n.Bx.MOUSE_DOWN,(i=>t(new s.P(n.zk(e),i)))))}onmouseover(e,t){this._register(n.ko(e,n.Bx.MOUSE_OVER,(i=>t(new s.P(n.zk(e),i)))))}onmouseleave(e,t){this._register(n.ko(e,n.Bx.MOUSE_LEAVE,(i=>t(new s.P(n.zk(e),i)))))}onkeydown(e,t){this._register(n.ko(e,n.Bx.KEY_DOWN,(e=>t(new o.Z(e)))))}onkeyup(e,t){this._register(n.ko(e,n.Bx.KEY_UP,(e=>t(new o.Z(e)))))}oninput(e,t){this._register(n.ko(e,n.Bx.INPUT,t))}onblur(e,t){this._register(n.ko(e,n.Bx.BLUR,t))}onfocus(e,t){this._register(n.ko(e,n.Bx.FOCUS,t))}ignoreGesture(e){return r.q.ignoreTarget(e)}}},62484:(e,t,i)=>{"use strict";function n(e,t){const i=e;"number"!==typeof i.vscodeWindowId&&Object.defineProperty(i,"vscodeWindowId",{get:()=>t})}i.d(t,{G:()=>o,y:()=>n});const o=window},55664:(e,t,i)=>{"use strict";i.d(t,{HJ:()=>d,LN:()=>a,YH:()=>c,ih:()=>u,rc:()=>r,wv:()=>l});var n=i(40231),o=i(5091),s=i(41337);class r extends o.jG{constructor(e,t="",i="",o=!0,s){super(),this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=o,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}}class a extends o.jG{constructor(){super(...arguments),this._onWillRun=this._register(new n.vl),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new n.vl),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;let i;this._onWillRun.fire({action:e});try{await this.runAction(e,t)}catch(n){i=n}this._onDidRun.fire({action:e,error:i})}async runAction(e,t){await e.run(t)}}class l{constructor(){this.id=l.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t=t.length?[...t,new l,...i]:i);return t}static{this.ID="vs.actions.separator"}async run(){}}class c{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}async run(){}}class d extends r{static{this.ID="vs.actions.empty"}constructor(){super(d.ID,s.kg("submenu.empty","(empty)"),void 0,!1)}}function u(e){return{id:e.id,label:e.label,tooltip:e.tooltip??e.label,class:e.class,enabled:e.enabled??!0,checked:e.checked,run:async(...t)=>e.run(...t)}}},85053:(e,t,i)=>{"use strict";function n(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function s(e,t,i=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;ni(e[n],t)))}function l(e,t){let i=0,n=e-1;while(i<=n){const e=(i+n)/2|0,o=t(e);if(o<0)i=e+1;else{if(!(o>0))return e;n=e-1}}return-(i+1)}function c(e,t,i){if(e|=0,e>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(const a of t){const e=i(a,n);e<0?o.push(a):e>0?s.push(a):r.push(a)}return e!!e))}function f(e){let t=0;for(let i=0;i0}function v(e,t=e=>e){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function b(e,t){return e.length>0?e[0]:t}function y(e,t){let i="number"===typeof t?e:0;"number"===typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let o=i;ot;o--)n.push(o);return n}function w(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function C(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function S(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function k(e,t){for(const i of t)e.push(i)}function x(e){return Array.isArray(e)?e:[e]}function E(e,t,i){const n=T(e,t),o=e.length,s=i.length;e.length=o+s;for(let r=o-1;r>=n;r--)e[r+s]=e[r];for(let r=0;rt(e(i),e(n))}function D(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!I.isNeitherLessOrGreaterThan(e))return e}return I.neitherLessOrGreaterThan}}i.d(t,{$z:()=>d,Ct:()=>m,E4:()=>k,EI:()=>_,El:()=>a,Fy:()=>b,Hw:()=>O,RT:()=>n,SK:()=>f,SO:()=>c,TS:()=>A,U9:()=>N,UH:()=>r,V4:()=>L,VE:()=>R,Yc:()=>p,_A:()=>C,_j:()=>x,aI:()=>s,bS:()=>o,c1:()=>M,dM:()=>v,j3:()=>P,kj:()=>g,n:()=>u,nH:()=>D,nK:()=>w,pN:()=>h,r7:()=>S,t9:()=>F,y1:()=>y}),function(e){function t(e){return e<0}function i(e){return e<=0}function n(e){return e>0}function o(e){return 0===e}e.isLessThan=t,e.isLessThanOrEqual=i,e.isGreaterThan=n,e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(I||(I={}));const N=(e,t)=>e-t,A=(e,t)=>N(e?1:0,t?1:0);function O(e){return(t,i)=>-e(t,i)}class P{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;while(t=0&&e(this.items[t]))t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class M{static{this.empty=new M((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new M((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new M((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||I.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}class F{constructor(e){this._indexMap=e}static createSortPermutation(e,t){const i=Array.from(e.keys()).sort(((i,n)=>t(e[i],e[n])));return new F(i)}apply(e){return e.map(((t,i)=>e[this._indexMap[i]]))}inverse(){const e=this._indexMap.slice();for(let t=0;t{"use strict";function n(e,t){const i=o(e,t);if(-1!==i)return e[i]}function o(e,t,i=e.length-1){for(let n=i;n>=0;n--){const i=e[n];if(t(i))return n}return-1}function s(e,t){const i=r(e,t);return-1===i?void 0:e[i]}function r(e,t,i=0,n=e.length){let o=i,s=n;while(od,TM:()=>g,Uk:()=>n,XP:()=>a,hw:()=>l,iM:()=>r,kh:()=>h,lx:()=>s,oH:()=>p,ot:()=>u,vJ:()=>c});class c{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(c.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=r(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}function d(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n0&&(i=o)}return i}function u(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=o)}return i}function h(e,t){return d(e,((e,i)=>-t(e,i)))}function g(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n0&&(i=n)}return i}function p(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}},79109:(e,t,i)=>{"use strict";i.d(t,{Ft:()=>a,V7:()=>r,Xo:()=>l,ok:()=>o,xb:()=>s});var n=i(14396);function o(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function r(e){e||(0,n.dz)(new n.D7("Soft Assertion Failed"))}function a(e){e()||(e(),(0,n.dz)(new n.D7("Assertion Failed")))}function l(e,t){let i=0;while(i{"use strict";i.d(t,{$1:()=>b,$6:()=>S,A0:()=>x,AE:()=>I,EQ:()=>v,F6:()=>E,HC:()=>T,PK:()=>u,Qg:()=>c,SS:()=>d,Th:()=>m,Zv:()=>L,b7:()=>k,bI:()=>D,pc:()=>y,uC:()=>C,vb:()=>w,ve:()=>f,wR:()=>_});var n=i(67792),o=i(14396),s=i(40231),r=i(5091),a=i(25160),l=i(59638);function c(e){return!!e&&"function"===typeof e.then}function d(e){const t=new n.Qi,i=e(t.token),s=new Promise(((e,n)=>{const s=t.token.onCancellationRequested((()=>{s.dispose(),n(new o.AL)}));Promise.resolve(i).then((i=>{s.dispose(),t.dispose(),e(i)}),(e=>{s.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel(),t.dispose()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function u(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class h{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}const g=(e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}},p=e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}};class f{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=t===l.h?p(i):g(t,i),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new o.AL),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}class m{constructor(e){this.delayer=new f(e),this.throttler=new h}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function _(e,t){return t?new Promise(((i,n)=>{const s=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(s),r.dispose(),n(new o.AL)}))})):d((t=>_(e,t)))}function v(e,t=0,i){const n=setTimeout((()=>{e(),i&&o.dispose()}),t),o=(0,r.s)((()=>{clearTimeout(n),i?.deleteAndLeak(o)}));return i?.add(o),o}function b(e,t=e=>!!e,i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++],a=Promise.resolve(r());return a.then((e=>t(e)?Promise.resolve(e):s()))};return s()}class y{constructor(e,t){this._isDisposed=!1,this._token=-1,"function"===typeof e&&"number"===typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new o.D7("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){if(this._isDisposed)throw new o.D7("Calling 'setIfNotSet' on a disposed TimeoutTimer");-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class w{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new o.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const n=i.setInterval((()=>{e()}),t);this.disposable=(0,r.s)((()=>{i.clearInterval(n),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class C{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let S,k;(function(){k="function"!==typeof globalThis.requestIdleCallback||"function"!==typeof globalThis.cancelIdleCallback?(e,t)=>{(0,a._p)((()=>{if(i)return;const e=Date.now()+15,n={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(n))}));let i=!1;return{dispose(){i||(i=!0)}}}:(e,t,i)=>{const n=e.requestIdleCallback(t,"number"===typeof i?{timeout:i}:void 0);let o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},S=e=>k(globalThis,e)})();class x{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=k(e,(()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class E extends x{constructor(e){super(globalThis,e)}}class L{get isRejected(){return 1===this.outcome?.outcome}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new o.AL)}}var T;(function(e){async function t(e){let t;const i=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if("undefined"!==typeof t)throw t;return i}function i(e){return new Promise((async(t,i)=>{try{await e(t,i)}catch(n){i(n)}}))}e.settled=t,e.withAsyncBody=i})(T||(T={}));class I{static fromArray(e){return new I((t=>{t.emitMany(e)}))}static fromPromise(e){return new I((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new I((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new I((async t=>{await Promise.all(e.map((async e=>{for await(const i of e)t.emitOne(i)})))}))}static{this.EMPTY=I.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new s.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(i){this.reject(i)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new I((async i=>{for await(const n of e)i.emitOne(t(n))}))}map(e){return I.map(this,e)}static filter(e,t){return new I((async i=>{for await(const n of e)t(n)&&i.emitOne(n)}))}filter(e){return I.filter(this,e)}static coalesce(e){return I.filter(e,(e=>!!e))}coalesce(){return I.coalesce(this)}static async toPromise(e){const t=[];for await(const i of e)t.push(i);return t}toPromise(){return I.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}class R extends I{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function D(e){const t=new n.Qi,i=e(t.token);return new R(t,(async e=>{const n=t.token.onCancellationRequested((()=>{n.dispose(),t.dispose(),e.reject(new o.AL)}));try{for await(const n of i){if(t.token.isCancellationRequested)return;e.emitOne(n)}n.dispose(),t.dispose()}catch(s){n.dispose(),t.dispose(),e.reject(s)}}))}},87885:(e,t,i)=>{"use strict";i.d(t,{$l:()=>a,Gs:()=>h,MB:()=>r,Sw:()=>d,bb:()=>c,gN:()=>l,pJ:()=>u});var n=i(85661);const o="undefined"!==typeof Buffer;new n.d((()=>new Uint8Array(256)));let s;class r{static wrap(e){return o&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new r(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return o?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function l(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function c(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function d(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function u(e,t){return e[t]}function h(e,t,i){e[i]=t}},17389:(e,t,i)=>{"use strict";function n(e){return e}i.d(t,{VV:()=>s,o5:()=>o});class o{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"===typeof e?(this._fn=e,this._computeKey=n):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class s{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"===typeof e?(this._fn=e,this._computeKey=n):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const i=this._fn(e);return this._map.set(e,i),this._map2.set(t,i),i}}},67792:(e,t,i)=>{"use strict";i.d(t,{Qi:()=>a,XO:()=>s,bs:()=>l});var n=i(40231);const o=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var s;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof r||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})})(s||(s={}));class r{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=s.None}}function l(e){const t=new a;return e.add({dispose(){t.cancel()}}),t.token}},25923:(e,t,i)=>{"use strict";i.d(t,{W:()=>r});var n=i(79855);const o={add:(0,n.k)("add",6e4),plus:(0,n.k)("plus",6e4),gistNew:(0,n.k)("gist-new",6e4),repoCreate:(0,n.k)("repo-create",6e4),lightbulb:(0,n.k)("lightbulb",60001),lightBulb:(0,n.k)("light-bulb",60001),repo:(0,n.k)("repo",60002),repoDelete:(0,n.k)("repo-delete",60002),gistFork:(0,n.k)("gist-fork",60003),repoForked:(0,n.k)("repo-forked",60003),gitPullRequest:(0,n.k)("git-pull-request",60004),gitPullRequestAbandoned:(0,n.k)("git-pull-request-abandoned",60004),recordKeys:(0,n.k)("record-keys",60005),keyboard:(0,n.k)("keyboard",60005),tag:(0,n.k)("tag",60006),gitPullRequestLabel:(0,n.k)("git-pull-request-label",60006),tagAdd:(0,n.k)("tag-add",60006),tagRemove:(0,n.k)("tag-remove",60006),person:(0,n.k)("person",60007),personFollow:(0,n.k)("person-follow",60007),personOutline:(0,n.k)("person-outline",60007),personFilled:(0,n.k)("person-filled",60007),gitBranch:(0,n.k)("git-branch",60008),gitBranchCreate:(0,n.k)("git-branch-create",60008),gitBranchDelete:(0,n.k)("git-branch-delete",60008),sourceControl:(0,n.k)("source-control",60008),mirror:(0,n.k)("mirror",60009),mirrorPublic:(0,n.k)("mirror-public",60009),star:(0,n.k)("star",60010),starAdd:(0,n.k)("star-add",60010),starDelete:(0,n.k)("star-delete",60010),starEmpty:(0,n.k)("star-empty",60010),comment:(0,n.k)("comment",60011),commentAdd:(0,n.k)("comment-add",60011),alert:(0,n.k)("alert",60012),warning:(0,n.k)("warning",60012),search:(0,n.k)("search",60013),searchSave:(0,n.k)("search-save",60013),logOut:(0,n.k)("log-out",60014),signOut:(0,n.k)("sign-out",60014),logIn:(0,n.k)("log-in",60015),signIn:(0,n.k)("sign-in",60015),eye:(0,n.k)("eye",60016),eyeUnwatch:(0,n.k)("eye-unwatch",60016),eyeWatch:(0,n.k)("eye-watch",60016),circleFilled:(0,n.k)("circle-filled",60017),primitiveDot:(0,n.k)("primitive-dot",60017),closeDirty:(0,n.k)("close-dirty",60017),debugBreakpoint:(0,n.k)("debug-breakpoint",60017),debugBreakpointDisabled:(0,n.k)("debug-breakpoint-disabled",60017),debugHint:(0,n.k)("debug-hint",60017),terminalDecorationSuccess:(0,n.k)("terminal-decoration-success",60017),primitiveSquare:(0,n.k)("primitive-square",60018),edit:(0,n.k)("edit",60019),pencil:(0,n.k)("pencil",60019),info:(0,n.k)("info",60020),issueOpened:(0,n.k)("issue-opened",60020),gistPrivate:(0,n.k)("gist-private",60021),gitForkPrivate:(0,n.k)("git-fork-private",60021),lock:(0,n.k)("lock",60021),mirrorPrivate:(0,n.k)("mirror-private",60021),close:(0,n.k)("close",60022),removeClose:(0,n.k)("remove-close",60022),x:(0,n.k)("x",60022),repoSync:(0,n.k)("repo-sync",60023),sync:(0,n.k)("sync",60023),clone:(0,n.k)("clone",60024),desktopDownload:(0,n.k)("desktop-download",60024),beaker:(0,n.k)("beaker",60025),microscope:(0,n.k)("microscope",60025),vm:(0,n.k)("vm",60026),deviceDesktop:(0,n.k)("device-desktop",60026),file:(0,n.k)("file",60027),fileText:(0,n.k)("file-text",60027),more:(0,n.k)("more",60028),ellipsis:(0,n.k)("ellipsis",60028),kebabHorizontal:(0,n.k)("kebab-horizontal",60028),mailReply:(0,n.k)("mail-reply",60029),reply:(0,n.k)("reply",60029),organization:(0,n.k)("organization",60030),organizationFilled:(0,n.k)("organization-filled",60030),organizationOutline:(0,n.k)("organization-outline",60030),newFile:(0,n.k)("new-file",60031),fileAdd:(0,n.k)("file-add",60031),newFolder:(0,n.k)("new-folder",60032),fileDirectoryCreate:(0,n.k)("file-directory-create",60032),trash:(0,n.k)("trash",60033),trashcan:(0,n.k)("trashcan",60033),history:(0,n.k)("history",60034),clock:(0,n.k)("clock",60034),folder:(0,n.k)("folder",60035),fileDirectory:(0,n.k)("file-directory",60035),symbolFolder:(0,n.k)("symbol-folder",60035),logoGithub:(0,n.k)("logo-github",60036),markGithub:(0,n.k)("mark-github",60036),github:(0,n.k)("github",60036),terminal:(0,n.k)("terminal",60037),console:(0,n.k)("console",60037),repl:(0,n.k)("repl",60037),zap:(0,n.k)("zap",60038),symbolEvent:(0,n.k)("symbol-event",60038),error:(0,n.k)("error",60039),stop:(0,n.k)("stop",60039),variable:(0,n.k)("variable",60040),symbolVariable:(0,n.k)("symbol-variable",60040),array:(0,n.k)("array",60042),symbolArray:(0,n.k)("symbol-array",60042),symbolModule:(0,n.k)("symbol-module",60043),symbolPackage:(0,n.k)("symbol-package",60043),symbolNamespace:(0,n.k)("symbol-namespace",60043),symbolObject:(0,n.k)("symbol-object",60043),symbolMethod:(0,n.k)("symbol-method",60044),symbolFunction:(0,n.k)("symbol-function",60044),symbolConstructor:(0,n.k)("symbol-constructor",60044),symbolBoolean:(0,n.k)("symbol-boolean",60047),symbolNull:(0,n.k)("symbol-null",60047),symbolNumeric:(0,n.k)("symbol-numeric",60048),symbolNumber:(0,n.k)("symbol-number",60048),symbolStructure:(0,n.k)("symbol-structure",60049),symbolStruct:(0,n.k)("symbol-struct",60049),symbolParameter:(0,n.k)("symbol-parameter",60050),symbolTypeParameter:(0,n.k)("symbol-type-parameter",60050),symbolKey:(0,n.k)("symbol-key",60051),symbolText:(0,n.k)("symbol-text",60051),symbolReference:(0,n.k)("symbol-reference",60052),goToFile:(0,n.k)("go-to-file",60052),symbolEnum:(0,n.k)("symbol-enum",60053),symbolValue:(0,n.k)("symbol-value",60053),symbolRuler:(0,n.k)("symbol-ruler",60054),symbolUnit:(0,n.k)("symbol-unit",60054),activateBreakpoints:(0,n.k)("activate-breakpoints",60055),archive:(0,n.k)("archive",60056),arrowBoth:(0,n.k)("arrow-both",60057),arrowDown:(0,n.k)("arrow-down",60058),arrowLeft:(0,n.k)("arrow-left",60059),arrowRight:(0,n.k)("arrow-right",60060),arrowSmallDown:(0,n.k)("arrow-small-down",60061),arrowSmallLeft:(0,n.k)("arrow-small-left",60062),arrowSmallRight:(0,n.k)("arrow-small-right",60063),arrowSmallUp:(0,n.k)("arrow-small-up",60064),arrowUp:(0,n.k)("arrow-up",60065),bell:(0,n.k)("bell",60066),bold:(0,n.k)("bold",60067),book:(0,n.k)("book",60068),bookmark:(0,n.k)("bookmark",60069),debugBreakpointConditionalUnverified:(0,n.k)("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:(0,n.k)("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:(0,n.k)("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:(0,n.k)("debug-breakpoint-data-unverified",60072),debugBreakpointData:(0,n.k)("debug-breakpoint-data",60073),debugBreakpointDataDisabled:(0,n.k)("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:(0,n.k)("debug-breakpoint-log-unverified",60074),debugBreakpointLog:(0,n.k)("debug-breakpoint-log",60075),debugBreakpointLogDisabled:(0,n.k)("debug-breakpoint-log-disabled",60075),briefcase:(0,n.k)("briefcase",60076),broadcast:(0,n.k)("broadcast",60077),browser:(0,n.k)("browser",60078),bug:(0,n.k)("bug",60079),calendar:(0,n.k)("calendar",60080),caseSensitive:(0,n.k)("case-sensitive",60081),check:(0,n.k)("check",60082),checklist:(0,n.k)("checklist",60083),chevronDown:(0,n.k)("chevron-down",60084),chevronLeft:(0,n.k)("chevron-left",60085),chevronRight:(0,n.k)("chevron-right",60086),chevronUp:(0,n.k)("chevron-up",60087),chromeClose:(0,n.k)("chrome-close",60088),chromeMaximize:(0,n.k)("chrome-maximize",60089),chromeMinimize:(0,n.k)("chrome-minimize",60090),chromeRestore:(0,n.k)("chrome-restore",60091),circleOutline:(0,n.k)("circle-outline",60092),circle:(0,n.k)("circle",60092),debugBreakpointUnverified:(0,n.k)("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:(0,n.k)("terminal-decoration-incomplete",60092),circleSlash:(0,n.k)("circle-slash",60093),circuitBoard:(0,n.k)("circuit-board",60094),clearAll:(0,n.k)("clear-all",60095),clippy:(0,n.k)("clippy",60096),closeAll:(0,n.k)("close-all",60097),cloudDownload:(0,n.k)("cloud-download",60098),cloudUpload:(0,n.k)("cloud-upload",60099),code:(0,n.k)("code",60100),collapseAll:(0,n.k)("collapse-all",60101),colorMode:(0,n.k)("color-mode",60102),commentDiscussion:(0,n.k)("comment-discussion",60103),creditCard:(0,n.k)("credit-card",60105),dash:(0,n.k)("dash",60108),dashboard:(0,n.k)("dashboard",60109),database:(0,n.k)("database",60110),debugContinue:(0,n.k)("debug-continue",60111),debugDisconnect:(0,n.k)("debug-disconnect",60112),debugPause:(0,n.k)("debug-pause",60113),debugRestart:(0,n.k)("debug-restart",60114),debugStart:(0,n.k)("debug-start",60115),debugStepInto:(0,n.k)("debug-step-into",60116),debugStepOut:(0,n.k)("debug-step-out",60117),debugStepOver:(0,n.k)("debug-step-over",60118),debugStop:(0,n.k)("debug-stop",60119),debug:(0,n.k)("debug",60120),deviceCameraVideo:(0,n.k)("device-camera-video",60121),deviceCamera:(0,n.k)("device-camera",60122),deviceMobile:(0,n.k)("device-mobile",60123),diffAdded:(0,n.k)("diff-added",60124),diffIgnored:(0,n.k)("diff-ignored",60125),diffModified:(0,n.k)("diff-modified",60126),diffRemoved:(0,n.k)("diff-removed",60127),diffRenamed:(0,n.k)("diff-renamed",60128),diff:(0,n.k)("diff",60129),diffSidebyside:(0,n.k)("diff-sidebyside",60129),discard:(0,n.k)("discard",60130),editorLayout:(0,n.k)("editor-layout",60131),emptyWindow:(0,n.k)("empty-window",60132),exclude:(0,n.k)("exclude",60133),extensions:(0,n.k)("extensions",60134),eyeClosed:(0,n.k)("eye-closed",60135),fileBinary:(0,n.k)("file-binary",60136),fileCode:(0,n.k)("file-code",60137),fileMedia:(0,n.k)("file-media",60138),filePdf:(0,n.k)("file-pdf",60139),fileSubmodule:(0,n.k)("file-submodule",60140),fileSymlinkDirectory:(0,n.k)("file-symlink-directory",60141),fileSymlinkFile:(0,n.k)("file-symlink-file",60142),fileZip:(0,n.k)("file-zip",60143),files:(0,n.k)("files",60144),filter:(0,n.k)("filter",60145),flame:(0,n.k)("flame",60146),foldDown:(0,n.k)("fold-down",60147),foldUp:(0,n.k)("fold-up",60148),fold:(0,n.k)("fold",60149),folderActive:(0,n.k)("folder-active",60150),folderOpened:(0,n.k)("folder-opened",60151),gear:(0,n.k)("gear",60152),gift:(0,n.k)("gift",60153),gistSecret:(0,n.k)("gist-secret",60154),gist:(0,n.k)("gist",60155),gitCommit:(0,n.k)("git-commit",60156),gitCompare:(0,n.k)("git-compare",60157),compareChanges:(0,n.k)("compare-changes",60157),gitMerge:(0,n.k)("git-merge",60158),githubAction:(0,n.k)("github-action",60159),githubAlt:(0,n.k)("github-alt",60160),globe:(0,n.k)("globe",60161),grabber:(0,n.k)("grabber",60162),graph:(0,n.k)("graph",60163),gripper:(0,n.k)("gripper",60164),heart:(0,n.k)("heart",60165),home:(0,n.k)("home",60166),horizontalRule:(0,n.k)("horizontal-rule",60167),hubot:(0,n.k)("hubot",60168),inbox:(0,n.k)("inbox",60169),issueReopened:(0,n.k)("issue-reopened",60171),issues:(0,n.k)("issues",60172),italic:(0,n.k)("italic",60173),jersey:(0,n.k)("jersey",60174),json:(0,n.k)("json",60175),kebabVertical:(0,n.k)("kebab-vertical",60176),key:(0,n.k)("key",60177),law:(0,n.k)("law",60178),lightbulbAutofix:(0,n.k)("lightbulb-autofix",60179),linkExternal:(0,n.k)("link-external",60180),link:(0,n.k)("link",60181),listOrdered:(0,n.k)("list-ordered",60182),listUnordered:(0,n.k)("list-unordered",60183),liveShare:(0,n.k)("live-share",60184),loading:(0,n.k)("loading",60185),location:(0,n.k)("location",60186),mailRead:(0,n.k)("mail-read",60187),mail:(0,n.k)("mail",60188),markdown:(0,n.k)("markdown",60189),megaphone:(0,n.k)("megaphone",60190),mention:(0,n.k)("mention",60191),milestone:(0,n.k)("milestone",60192),gitPullRequestMilestone:(0,n.k)("git-pull-request-milestone",60192),mortarBoard:(0,n.k)("mortar-board",60193),move:(0,n.k)("move",60194),multipleWindows:(0,n.k)("multiple-windows",60195),mute:(0,n.k)("mute",60196),noNewline:(0,n.k)("no-newline",60197),note:(0,n.k)("note",60198),octoface:(0,n.k)("octoface",60199),openPreview:(0,n.k)("open-preview",60200),package:(0,n.k)("package",60201),paintcan:(0,n.k)("paintcan",60202),pin:(0,n.k)("pin",60203),play:(0,n.k)("play",60204),run:(0,n.k)("run",60204),plug:(0,n.k)("plug",60205),preserveCase:(0,n.k)("preserve-case",60206),preview:(0,n.k)("preview",60207),project:(0,n.k)("project",60208),pulse:(0,n.k)("pulse",60209),question:(0,n.k)("question",60210),quote:(0,n.k)("quote",60211),radioTower:(0,n.k)("radio-tower",60212),reactions:(0,n.k)("reactions",60213),references:(0,n.k)("references",60214),refresh:(0,n.k)("refresh",60215),regex:(0,n.k)("regex",60216),remoteExplorer:(0,n.k)("remote-explorer",60217),remote:(0,n.k)("remote",60218),remove:(0,n.k)("remove",60219),replaceAll:(0,n.k)("replace-all",60220),replace:(0,n.k)("replace",60221),repoClone:(0,n.k)("repo-clone",60222),repoForcePush:(0,n.k)("repo-force-push",60223),repoPull:(0,n.k)("repo-pull",60224),repoPush:(0,n.k)("repo-push",60225),report:(0,n.k)("report",60226),requestChanges:(0,n.k)("request-changes",60227),rocket:(0,n.k)("rocket",60228),rootFolderOpened:(0,n.k)("root-folder-opened",60229),rootFolder:(0,n.k)("root-folder",60230),rss:(0,n.k)("rss",60231),ruby:(0,n.k)("ruby",60232),saveAll:(0,n.k)("save-all",60233),saveAs:(0,n.k)("save-as",60234),save:(0,n.k)("save",60235),screenFull:(0,n.k)("screen-full",60236),screenNormal:(0,n.k)("screen-normal",60237),searchStop:(0,n.k)("search-stop",60238),server:(0,n.k)("server",60240),settingsGear:(0,n.k)("settings-gear",60241),settings:(0,n.k)("settings",60242),shield:(0,n.k)("shield",60243),smiley:(0,n.k)("smiley",60244),sortPrecedence:(0,n.k)("sort-precedence",60245),splitHorizontal:(0,n.k)("split-horizontal",60246),splitVertical:(0,n.k)("split-vertical",60247),squirrel:(0,n.k)("squirrel",60248),starFull:(0,n.k)("star-full",60249),starHalf:(0,n.k)("star-half",60250),symbolClass:(0,n.k)("symbol-class",60251),symbolColor:(0,n.k)("symbol-color",60252),symbolConstant:(0,n.k)("symbol-constant",60253),symbolEnumMember:(0,n.k)("symbol-enum-member",60254),symbolField:(0,n.k)("symbol-field",60255),symbolFile:(0,n.k)("symbol-file",60256),symbolInterface:(0,n.k)("symbol-interface",60257),symbolKeyword:(0,n.k)("symbol-keyword",60258),symbolMisc:(0,n.k)("symbol-misc",60259),symbolOperator:(0,n.k)("symbol-operator",60260),symbolProperty:(0,n.k)("symbol-property",60261),wrench:(0,n.k)("wrench",60261),wrenchSubaction:(0,n.k)("wrench-subaction",60261),symbolSnippet:(0,n.k)("symbol-snippet",60262),tasklist:(0,n.k)("tasklist",60263),telescope:(0,n.k)("telescope",60264),textSize:(0,n.k)("text-size",60265),threeBars:(0,n.k)("three-bars",60266),thumbsdown:(0,n.k)("thumbsdown",60267),thumbsup:(0,n.k)("thumbsup",60268),tools:(0,n.k)("tools",60269),triangleDown:(0,n.k)("triangle-down",60270),triangleLeft:(0,n.k)("triangle-left",60271),triangleRight:(0,n.k)("triangle-right",60272),triangleUp:(0,n.k)("triangle-up",60273),twitter:(0,n.k)("twitter",60274),unfold:(0,n.k)("unfold",60275),unlock:(0,n.k)("unlock",60276),unmute:(0,n.k)("unmute",60277),unverified:(0,n.k)("unverified",60278),verified:(0,n.k)("verified",60279),versions:(0,n.k)("versions",60280),vmActive:(0,n.k)("vm-active",60281),vmOutline:(0,n.k)("vm-outline",60282),vmRunning:(0,n.k)("vm-running",60283),watch:(0,n.k)("watch",60284),whitespace:(0,n.k)("whitespace",60285),wholeWord:(0,n.k)("whole-word",60286),window:(0,n.k)("window",60287),wordWrap:(0,n.k)("word-wrap",60288),zoomIn:(0,n.k)("zoom-in",60289),zoomOut:(0,n.k)("zoom-out",60290),listFilter:(0,n.k)("list-filter",60291),listFlat:(0,n.k)("list-flat",60292),listSelection:(0,n.k)("list-selection",60293),selection:(0,n.k)("selection",60293),listTree:(0,n.k)("list-tree",60294),debugBreakpointFunctionUnverified:(0,n.k)("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:(0,n.k)("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:(0,n.k)("debug-breakpoint-function-disabled",60296),debugStackframeActive:(0,n.k)("debug-stackframe-active",60297),circleSmallFilled:(0,n.k)("circle-small-filled",60298),debugStackframeDot:(0,n.k)("debug-stackframe-dot",60298),terminalDecorationMark:(0,n.k)("terminal-decoration-mark",60298),debugStackframe:(0,n.k)("debug-stackframe",60299),debugStackframeFocused:(0,n.k)("debug-stackframe-focused",60299),debugBreakpointUnsupported:(0,n.k)("debug-breakpoint-unsupported",60300),symbolString:(0,n.k)("symbol-string",60301),debugReverseContinue:(0,n.k)("debug-reverse-continue",60302),debugStepBack:(0,n.k)("debug-step-back",60303),debugRestartFrame:(0,n.k)("debug-restart-frame",60304),debugAlt:(0,n.k)("debug-alt",60305),callIncoming:(0,n.k)("call-incoming",60306),callOutgoing:(0,n.k)("call-outgoing",60307),menu:(0,n.k)("menu",60308),expandAll:(0,n.k)("expand-all",60309),feedback:(0,n.k)("feedback",60310),gitPullRequestReviewer:(0,n.k)("git-pull-request-reviewer",60310),groupByRefType:(0,n.k)("group-by-ref-type",60311),ungroupByRefType:(0,n.k)("ungroup-by-ref-type",60312),account:(0,n.k)("account",60313),gitPullRequestAssignee:(0,n.k)("git-pull-request-assignee",60313),bellDot:(0,n.k)("bell-dot",60314),debugConsole:(0,n.k)("debug-console",60315),library:(0,n.k)("library",60316),output:(0,n.k)("output",60317),runAll:(0,n.k)("run-all",60318),syncIgnored:(0,n.k)("sync-ignored",60319),pinned:(0,n.k)("pinned",60320),githubInverted:(0,n.k)("github-inverted",60321),serverProcess:(0,n.k)("server-process",60322),serverEnvironment:(0,n.k)("server-environment",60323),pass:(0,n.k)("pass",60324),issueClosed:(0,n.k)("issue-closed",60324),stopCircle:(0,n.k)("stop-circle",60325),playCircle:(0,n.k)("play-circle",60326),record:(0,n.k)("record",60327),debugAltSmall:(0,n.k)("debug-alt-small",60328),vmConnect:(0,n.k)("vm-connect",60329),cloud:(0,n.k)("cloud",60330),merge:(0,n.k)("merge",60331),export:(0,n.k)("export",60332),graphLeft:(0,n.k)("graph-left",60333),magnet:(0,n.k)("magnet",60334),notebook:(0,n.k)("notebook",60335),redo:(0,n.k)("redo",60336),checkAll:(0,n.k)("check-all",60337),pinnedDirty:(0,n.k)("pinned-dirty",60338),passFilled:(0,n.k)("pass-filled",60339),circleLargeFilled:(0,n.k)("circle-large-filled",60340),circleLarge:(0,n.k)("circle-large",60341),circleLargeOutline:(0,n.k)("circle-large-outline",60341),combine:(0,n.k)("combine",60342),gather:(0,n.k)("gather",60342),table:(0,n.k)("table",60343),variableGroup:(0,n.k)("variable-group",60344),typeHierarchy:(0,n.k)("type-hierarchy",60345),typeHierarchySub:(0,n.k)("type-hierarchy-sub",60346),typeHierarchySuper:(0,n.k)("type-hierarchy-super",60347),gitPullRequestCreate:(0,n.k)("git-pull-request-create",60348),runAbove:(0,n.k)("run-above",60349),runBelow:(0,n.k)("run-below",60350),notebookTemplate:(0,n.k)("notebook-template",60351),debugRerun:(0,n.k)("debug-rerun",60352),workspaceTrusted:(0,n.k)("workspace-trusted",60353),workspaceUntrusted:(0,n.k)("workspace-untrusted",60354),workspaceUnknown:(0,n.k)("workspace-unknown",60355),terminalCmd:(0,n.k)("terminal-cmd",60356),terminalDebian:(0,n.k)("terminal-debian",60357),terminalLinux:(0,n.k)("terminal-linux",60358),terminalPowershell:(0,n.k)("terminal-powershell",60359),terminalTmux:(0,n.k)("terminal-tmux",60360),terminalUbuntu:(0,n.k)("terminal-ubuntu",60361),terminalBash:(0,n.k)("terminal-bash",60362),arrowSwap:(0,n.k)("arrow-swap",60363),copy:(0,n.k)("copy",60364),personAdd:(0,n.k)("person-add",60365),filterFilled:(0,n.k)("filter-filled",60366),wand:(0,n.k)("wand",60367),debugLineByLine:(0,n.k)("debug-line-by-line",60368),inspect:(0,n.k)("inspect",60369),layers:(0,n.k)("layers",60370),layersDot:(0,n.k)("layers-dot",60371),layersActive:(0,n.k)("layers-active",60372),compass:(0,n.k)("compass",60373),compassDot:(0,n.k)("compass-dot",60374),compassActive:(0,n.k)("compass-active",60375),azure:(0,n.k)("azure",60376),issueDraft:(0,n.k)("issue-draft",60377),gitPullRequestClosed:(0,n.k)("git-pull-request-closed",60378),gitPullRequestDraft:(0,n.k)("git-pull-request-draft",60379),debugAll:(0,n.k)("debug-all",60380),debugCoverage:(0,n.k)("debug-coverage",60381),runErrors:(0,n.k)("run-errors",60382),folderLibrary:(0,n.k)("folder-library",60383),debugContinueSmall:(0,n.k)("debug-continue-small",60384),beakerStop:(0,n.k)("beaker-stop",60385),graphLine:(0,n.k)("graph-line",60386),graphScatter:(0,n.k)("graph-scatter",60387),pieChart:(0,n.k)("pie-chart",60388),bracket:(0,n.k)("bracket",60175),bracketDot:(0,n.k)("bracket-dot",60389),bracketError:(0,n.k)("bracket-error",60390),lockSmall:(0,n.k)("lock-small",60391),azureDevops:(0,n.k)("azure-devops",60392),verifiedFilled:(0,n.k)("verified-filled",60393),newline:(0,n.k)("newline",60394),layout:(0,n.k)("layout",60395),layoutActivitybarLeft:(0,n.k)("layout-activitybar-left",60396),layoutActivitybarRight:(0,n.k)("layout-activitybar-right",60397),layoutPanelLeft:(0,n.k)("layout-panel-left",60398),layoutPanelCenter:(0,n.k)("layout-panel-center",60399),layoutPanelJustify:(0,n.k)("layout-panel-justify",60400),layoutPanelRight:(0,n.k)("layout-panel-right",60401),layoutPanel:(0,n.k)("layout-panel",60402),layoutSidebarLeft:(0,n.k)("layout-sidebar-left",60403),layoutSidebarRight:(0,n.k)("layout-sidebar-right",60404),layoutStatusbar:(0,n.k)("layout-statusbar",60405),layoutMenubar:(0,n.k)("layout-menubar",60406),layoutCentered:(0,n.k)("layout-centered",60407),target:(0,n.k)("target",60408),indent:(0,n.k)("indent",60409),recordSmall:(0,n.k)("record-small",60410),errorSmall:(0,n.k)("error-small",60411),terminalDecorationError:(0,n.k)("terminal-decoration-error",60411),arrowCircleDown:(0,n.k)("arrow-circle-down",60412),arrowCircleLeft:(0,n.k)("arrow-circle-left",60413),arrowCircleRight:(0,n.k)("arrow-circle-right",60414),arrowCircleUp:(0,n.k)("arrow-circle-up",60415),layoutSidebarRightOff:(0,n.k)("layout-sidebar-right-off",60416),layoutPanelOff:(0,n.k)("layout-panel-off",60417),layoutSidebarLeftOff:(0,n.k)("layout-sidebar-left-off",60418),blank:(0,n.k)("blank",60419),heartFilled:(0,n.k)("heart-filled",60420),map:(0,n.k)("map",60421),mapHorizontal:(0,n.k)("map-horizontal",60421),foldHorizontal:(0,n.k)("fold-horizontal",60421),mapFilled:(0,n.k)("map-filled",60422),mapHorizontalFilled:(0,n.k)("map-horizontal-filled",60422),foldHorizontalFilled:(0,n.k)("fold-horizontal-filled",60422),circleSmall:(0,n.k)("circle-small",60423),bellSlash:(0,n.k)("bell-slash",60424),bellSlashDot:(0,n.k)("bell-slash-dot",60425),commentUnresolved:(0,n.k)("comment-unresolved",60426),gitPullRequestGoToChanges:(0,n.k)("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:(0,n.k)("git-pull-request-new-changes",60428),searchFuzzy:(0,n.k)("search-fuzzy",60429),commentDraft:(0,n.k)("comment-draft",60430),send:(0,n.k)("send",60431),sparkle:(0,n.k)("sparkle",60432),insert:(0,n.k)("insert",60433),mic:(0,n.k)("mic",60434),thumbsdownFilled:(0,n.k)("thumbsdown-filled",60435),thumbsupFilled:(0,n.k)("thumbsup-filled",60436),coffee:(0,n.k)("coffee",60437),snake:(0,n.k)("snake",60438),game:(0,n.k)("game",60439),vr:(0,n.k)("vr",60440),chip:(0,n.k)("chip",60441),piano:(0,n.k)("piano",60442),music:(0,n.k)("music",60443),micFilled:(0,n.k)("mic-filled",60444),repoFetch:(0,n.k)("repo-fetch",60445),copilot:(0,n.k)("copilot",60446),lightbulbSparkle:(0,n.k)("lightbulb-sparkle",60447),robot:(0,n.k)("robot",60448),sparkleFilled:(0,n.k)("sparkle-filled",60449),diffSingle:(0,n.k)("diff-single",60450),diffMultiple:(0,n.k)("diff-multiple",60451),surroundWith:(0,n.k)("surround-with",60452),share:(0,n.k)("share",60453),gitStash:(0,n.k)("git-stash",60454),gitStashApply:(0,n.k)("git-stash-apply",60455),gitStashPop:(0,n.k)("git-stash-pop",60456),vscode:(0,n.k)("vscode",60457),vscodeInsiders:(0,n.k)("vscode-insiders",60458),codeOss:(0,n.k)("code-oss",60459),runCoverage:(0,n.k)("run-coverage",60460),runAllCoverage:(0,n.k)("run-all-coverage",60461),coverage:(0,n.k)("coverage",60462),githubProject:(0,n.k)("github-project",60463),mapVertical:(0,n.k)("map-vertical",60464),foldVertical:(0,n.k)("fold-vertical",60464),mapVerticalFilled:(0,n.k)("map-vertical-filled",60465),foldVerticalFilled:(0,n.k)("fold-vertical-filled",60465),goToSearch:(0,n.k)("go-to-search",60466),percentage:(0,n.k)("percentage",60467),sortPercentage:(0,n.k)("sort-percentage",60467),attach:(0,n.k)("attach",60468)},s={dialogError:(0,n.k)("dialog-error","error"),dialogWarning:(0,n.k)("dialog-warning","warning"),dialogInfo:(0,n.k)("dialog-info","info"),dialogClose:(0,n.k)("dialog-close","close"),treeItemExpanded:(0,n.k)("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:(0,n.k)("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:(0,n.k)("tree-filter-on-type-off","list-selection"),treeFilterClear:(0,n.k)("tree-filter-clear","close"),treeItemLoading:(0,n.k)("tree-item-loading","loading"),menuSelection:(0,n.k)("menu-selection","check"),menuSubmenu:(0,n.k)("menu-submenu","chevron-right"),menuBarMore:(0,n.k)("menubar-more","more"),scrollbarButtonLeft:(0,n.k)("scrollbar-button-left","triangle-left"),scrollbarButtonRight:(0,n.k)("scrollbar-button-right","triangle-right"),scrollbarButtonUp:(0,n.k)("scrollbar-button-up","triangle-up"),scrollbarButtonDown:(0,n.k)("scrollbar-button-down","triangle-down"),toolBarMore:(0,n.k)("toolbar-more","more"),quickInputBack:(0,n.k)("quick-input-back","arrow-left"),dropDownButton:(0,n.k)("drop-down-button",60084),symbolCustomColor:(0,n.k)("symbol-customcolor",60252),exportIcon:(0,n.k)("export",60332),workspaceUnspecified:(0,n.k)("workspace-unspecified",60355),newLine:(0,n.k)("newline",60394),thumbsDownFilled:(0,n.k)("thumbsdown-filled",60435),thumbsUpFilled:(0,n.k)("thumbsup-filled",60436),gitFetch:(0,n.k)("git-fetch",60445),lightbulbSparkleAutofix:(0,n.k)("lightbulb-sparkle-autofix",60447),debugBreakpointPending:(0,n.k)("debug-breakpoint-pending",60377)},r={...o,...s}},79855:(e,t,i)=>{"use strict";i.d(t,{J:()=>r,k:()=>s});var n=i(50322);const o=Object.create(null);function s(e,t){if((0,n.Kg)(t)){const i=o[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return o[e]=t,{id:e}}function r(){return o}},52782:(e,t,i)=>{"use strict";function n(e,t){const i=[],n=[];for(const o of e)t.has(o)||i.push(o);for(const o of t)e.has(o)||n.push(o);return{removed:i,added:n}}function o(e,t){const i=new Set;for(const n of t)e.has(n)&&i.add(n);return i}i.d(t,{E:()=>o,Z:()=>n})},85476:(e,t,i)=>{"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{$J:()=>r,Q1:()=>a,bU:()=>o,hB:()=>s});class o{constructor(e,t,i,o=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,i,o){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const d=(a+r)/2,u=r-a;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),r){case t:l=(i-n)/u+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,c;if(0===i)a=l=c=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;a=s._hue2rgb(o,e,t+1/3),l=s._hue2rgb(o,e,t),c=s._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*c),r)}}class r{constructor(e,t,i,o){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),s=Math.min(t,i,n),a=o-s,l=0===o?0:a/o;let c;return c=0===a?0:o===t?((i-n)/a%6+6)%6:o===i?(n-t)/a+2:(t-i)/a+4,new r(Math.round(60*c),l,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[c,d,u]=[0,0,0];return t<60?(c=r,d=a):t<120?(c=a,d=r):t<180?(d=r,u=a):t<240?(d=a,u=r):t<300?(c=a,u=r):t<=360&&(c=r,u=a),c=Math.round(255*(c+l)),d=Math.round(255*(d+l)),u=Math.round(255*(u+l)),new o(c,d,u,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g),i=a._relativeLuminanceForComponent(this.rgba.b),o=.2126*e+.7152*t+.0722*i;return n(o,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i}isDarkerThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t{"use strict";i.d(t,{VX:()=>a,Vq:()=>l,Y:()=>d,gf:()=>r,jt:()=>h});var n=i(85053),o=i(5837),s=i(23264);function r(e){return{asString:async()=>e,asFile:()=>{},value:"string"===typeof e?e:void 0}}function a(e,t,i){const n={id:(0,s.b)(),name:e,uri:t,data:i};return{asString:async()=>"",asFile:()=>n,value:void 0}}class l{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return o.f.some(this,(([e,t])=>t.asFile()))&&t.push("files"),u(c(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return c(e)}}function c(e){return e.toLowerCase()}function d(e,t){return u(c(e),t.map(c))}function u(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,o,s]=i;return"*"===s&&t.some((e=>e.startsWith(o+"/")))}const h=Object.freeze({create:e=>(0,n.dM)(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>h.split(e).filter((e=>!e.startsWith("#")))})},34125:(e,t,i)=>{"use strict";function n(e,t,i){let n=null,o=null;if("function"===typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"===typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[s]}}i.d(t,{B:()=>n})},40651:(e,t,i)=>{"use strict";i.d(t,{uP:()=>d,F1:()=>r});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=i(65647);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class d{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=d._getElements(e),[r,a,l]=d._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(d._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&o>=i&&this.ElementsAreEqual(t,o))t--,o--;if(e>t||i>o){let s;return i<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new n(e,0,i,o-i+1)]):e<=t?(a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const r=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,o,r,l,s),d=r[0],u=l[0];if(null!==c)return c;if(!s[0]){const r=this.ComputeDiffRecursive(e,d,i,u,s);let a=[];return a=s[0]?[new n(d+1,t-(d+1)+1,u+1,o-(u+1)+1)]:this.ComputeDiffRecursive(d+1,t,u+1,o,s),this.ConcatenateChanges(r,a)}return[new n(e,t-e+1,i,o-i+1)]}WALKTRACE(e,t,i,o,s,r,a,l,d,u,h,g,p,f,m,_,v,b){let y=null,w=null,C=new c,S=t,k=i,x=p[0]-_[0]-o,E=-1073741824,L=this.m_forwardHistory.length-1;do{const t=x+e;t===S||t=0&&(d=this.m_forwardHistory[L],e=d[0],S=1,k=d.length-1)}while(--L>=-1);if(y=C.getReverseChanges(),b[0]){let e=p[0]+1,t=_[0]+1;if(null!==y&&y.length>0){const i=y[y.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}w=[new n(e,g-e+1,t,m-t+1)]}else{C=new c,S=r,k=a,x=p[0]-_[0]-l,E=1073741824,L=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=x+s;e===S||e=u[e+1]?(h=u[e+1]-1,f=h-x-l,h>E&&C.MarkNextChange(),E=h+1,C.AddOriginalElement(h+1,f+1),x=e+1-s):(h=u[e-1],f=h-x-l,h>E&&C.MarkNextChange(),E=h,C.AddModifiedElement(h+1,f+1),x=e-1-s),L>=0&&(u=this.m_reverseHistory[L],s=u[0],S=1,k=u.length-1)}while(--L>=-1);w=C.getChanges()}return this.ConcatenateChanges(y,w)}ComputeRecursionPoint(e,t,i,o,s,r,a){let c=0,d=0,u=0,h=0,g=0,p=0;e--,i--,s[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(o-i),m=f+1,_=new Int32Array(m),v=new Int32Array(m),b=o-i,y=t-e,w=e-i,C=t-o,S=y-b,k=S%2===0;_[b]=e,v[y]=t,a[0]=!1;for(let x=1;x<=f/2+1;x++){let f=0,S=0;u=this.ClipDiagonalBound(b-x,x,b,m),h=this.ClipDiagonalBound(b+x,x,b,m);for(let e=u;e<=h;e+=2){c=e===u||ef+S&&(f=c,S=d),!k&&Math.abs(e-y)<=x-1&&c>=v[e])return s[0]=c,r[0]=d,i<=v[e]&&x<=1448?this.WALKTRACE(b,u,h,w,y,g,p,C,_,v,c,t,s,d,o,r,k,a):null}const E=(f-e+(S-i)-x)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(f,E))return a[0]=!0,s[0]=f,r[0]=S,E>0&&x<=1448?this.WALKTRACE(b,u,h,w,y,g,p,C,_,v,c,t,s,d,o,r,k,a):(e++,i++,[new n(e,t-e+1,i,o-i+1)]);g=this.ClipDiagonalBound(y-x,x,y,m),p=this.ClipDiagonalBound(y+x,x,y,m);for(let n=g;n<=p;n+=2){c=n===g||n=v[n+1]?v[n+1]-1:v[n-1],d=c-(n-y)-C;const l=c;while(c>e&&d>i&&this.ElementsAreEqual(c,d))c--,d--;if(v[n]=c,k&&Math.abs(n-b)<=x&&c<=_[n])return s[0]=c,r[0]=d,l>=_[n]&&x<=1448?this.WALKTRACE(b,u,h,w,y,g,p,C,_,v,c,t,s,d,o,r,k,a):null}if(x<=1447){let e=new Int32Array(h-u+2);e[0]=b-u+1,l.Copy2(_,u,e,1,h-u+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=y-g+1,l.Copy2(v,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,u,h,w,y,g,p,C,_,v,c,t,s,d,o,r,k,a)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;while(i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=u,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&t>a&&(a=t,l=d,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){const o=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(i,n)?1:0;return o+s}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(o,s,r,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e{"use strict";i.d(t,{KC:()=>a,S3:()=>s,dB:()=>l,nx:()=>o,r:()=>r});var n=i(85053);const o=(e,t)=>e===t;function s(e=o){return(t,i)=>n.aI(t,i,e)}function r(){return(e,t)=>e.equals(t)}function a(e,t,i){if(void 0!==i){const n=e;return void 0===n||null===n||void 0===t||null===t?t===n:i(n,t)}{const t=e;return(e,i)=>void 0===e||null===e||void 0===i||null===i?i===e:t(e,i)}}function l(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i{"use strict";i.d(t,{r:()=>c});var n=i(85053),o=i(50322),s=i(41337);function r(e,t){return t&&(e.stack||e.stacktrace)?s.kg("stackTrace.format","{0}: {1}",l(e),a(e.stack)||a(e.stacktrace)):l(e)}function a(e){return Array.isArray(e)?e.join("\n"):e}function l(e){return"ERR_UNC_HOST_NOT_ALLOWED"===e.code?`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:"string"===typeof e.code&&"number"===typeof e.errno&&"string"===typeof e.syscall?s.kg("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||s.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function c(e=null,t=!1){if(!e)return s.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=n.Yc(e),o=c(i[0],t);return i.length>1?s.kg("error.moreErrors","{0} ({1} errors in total)",o,i.length):o}if(o.Kg(e))return e;if(e.detail){const i=e.detail;if(i.error)return r(i.error,t);if(i.exception)return r(i.exception,t)}return e.stack?r(e,t):e.message?e.message:s.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}},14396:(e,t,i)=>{"use strict";i.d(t,{AL:()=>d,D7:()=>m,EM:()=>p,MB:()=>c,M_:()=>r,Qg:()=>h,aD:()=>u,cU:()=>a,dz:()=>s,iH:()=>g});class n{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(f.isErrorNoTelemetry(e))throw new f(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const o=new n;function s(e){c(e)||o.onUnexpectedError(e)}function r(e){c(e)||o.onUnexpectedExternalError(e)}function a(e){if(e instanceof Error){const{name:t,message:i}=e,n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:i,stack:n,noTelemetry:f.isErrorNoTelemetry(e)}}return e}const l="Canceled";function c(e){return e instanceof d||e instanceof Error&&e.name===l&&e.message===l}class d extends Error{constructor(){super(l),this.name=this.message}}function u(){const e=new Error(l);return e.name=e.message,e}function h(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function g(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class p extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class f extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof f)return e;const t=new f;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class m extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,m.prototype)}}},40231:(e,t,i)=>{"use strict";i.d(t,{Jh:()=>u,QT:()=>L,Qy:()=>S,Wj:()=>R,_B:()=>T,at:()=>I,fV:()=>x,uI:()=>E,vl:()=>C});var n=i(14396),o=i(90702),s=i(5091),r=i(67806),a=i(84240);const l=!1,c=!1,d=!1;var u;(function(e){function t(e){if(d){const{onDidAddListener:t}=e,i=f.create();let n=0;e.onDidAddListener=()=>{2===++n&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),i.print()),t?.()}}}function i(e,t){return m(e,(()=>{}),0,void 0,!0,void 0,t)}function n(e){return(t,i=null,n)=>{let o,s=!1;return o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n),s&&o.dispose(),o}}function o(t,i){return e.once(e.filter(t,i))}function r(e,t,i){return g(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)),i)}function a(e,t,i){return g(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)),i)}function l(e,t,i){return g(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)),i)}function c(e){return e}function u(...e){return(t,i=null,n)=>{const o=(0,s.qE)(...e.map((e=>e((e=>t.call(i,e))))));return p(o,n)}}function h(e,t,i,n){let o=i;return r(e,(e=>(o=t(o,e),o)),n)}function g(e,i){let n;const o={onWillAddFirstListener(){n=e(s.fire,s)},onDidRemoveLastListener(){n?.dispose()}};i||t(o);const s=new C(o);return i?.add(s),s.event}function p(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function m(e,i,n=100,o=!1,s=!1,r,a){let l,c,d,u,h=0;const g={leakWarningThreshold:r,onWillAddFirstListener(){l=e((e=>{h++,c=i(c,e),o&&!d&&(p.fire(c),c=void 0),u=()=>{const e=c;c=void 0,d=void 0,(!o||h>1)&&p.fire(e),h=0},"number"===typeof n?(clearTimeout(d),d=setTimeout(u,n)):void 0===d&&(d=0,queueMicrotask(u))}))},onWillRemoveListener(){s&&h>0&&u?.()},onDidRemoveLastListener(){u=void 0,l.dispose()}};a||t(g);const p=new C(g);return a?.add(p),p.event}function _(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)}function v(e,t=(e,t)=>e===t,i){let n,o=!0;return l(e,(e=>{const i=o||!t(e,n);return o=!1,n=e,i}),i)}function b(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]}function y(e,t=!1,i=[],n){let o=i.slice(),s=e((e=>{o?o.push(e):a.fire(e)}));n&&n.add(s);const r=()=>{o?.forEach((e=>a.fire(e))),o=null},a=new C({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),n&&n.add(s))},onDidAddFirstListener(){o&&(t?setTimeout(r):r())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return n&&n.add(a),a.event}function w(e,t){const i=(i,n,o)=>{const s=t(new k);return e((function(e){const t=s.evaluate(e);t!==S&&i.call(n,t)}),void 0,o)};return i}e.None=()=>s.jG.None,e.defer=i,e.once=n,e.onceIf=o,e.map=r,e.forEach=a,e.filter=l,e.signal=c,e.any=u,e.reduce=h,e.debounce=m,e.accumulate=_,e.latch=v,e.split=b,e.buffer=y,e.chain=w;const S=Symbol("HaltChainable");class k{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:S)),this}reduce(e,t){let i=t;return this.steps.push((t=>(i=e(i,t),i))),this}latch(e=(e,t)=>e===t){let t,i=!0;return this.steps.push((n=>{const o=i||!e(n,t);return i=!1,t=n,o?n:S})),this}evaluate(e){for(const t of this.steps)if(e=t(e),e===S)break;return e}}function x(e,t,i=e=>e){const n=(...e)=>r.fire(i(...e)),o=()=>e.on(t,n),s=()=>e.removeListener(t,n),r=new C({onWillAddFirstListener:o,onDidRemoveLastListener:s});return r.event}function E(e,t,i=e=>e){const n=(...e)=>r.fire(i(...e)),o=()=>e.addEventListener(t,n),s=()=>e.removeEventListener(t,n),r=new C({onWillAddFirstListener:o,onDidRemoveLastListener:s});return r.event}function L(e){return new Promise((t=>n(e)(t)))}function T(e){const t=new C;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event}function I(e,t){return e((e=>t.fire(e)))}function R(e,t,i){return t(i),e((e=>t(e)))}e.fromNodeEventEmitter=x,e.fromDOMEventEmitter=E,e.toPromise=L,e.fromPromise=T,e.forward=I,e.runAndSubscribe=R;class D{constructor(e,i){this._observable=e,this._counter=0,this._hasChanged=!1;const n={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};i||t(n),this.emitter=new C(n),i&&i.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function N(e,t){const i=new D(e,t);return i.emitter.event}function A(e){return(t,i,n)=>{let o=0,r=!1;const a={beginUpdate(){o++},endUpdate(){o--,0===o&&(e.reportChanges(),r&&(r=!1,t.call(i)))},handlePossibleChange(){},handleChange(){r=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return n instanceof s.Cm?n.add(l):Array.isArray(n)&&n.push(l),l}}e.fromObservable=N,e.fromObservableLight=A})(u||(u={}));class h{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${h._idPool++}`,h.all.add(this)}start(e){this._stopWatch=new a.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}let g=-1;class p{static{this._idPool=1}constructor(e,t,i=(p._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=i,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[i,n]of this._stacks)(!e||t{if(e instanceof v)t(e);else for(let i=0;i{0!==e.length&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join("\n")),e.length=0)}),3e3),w=new FinalizationRegistry((t=>{"string"===typeof t&&e.push(t)}))}class C{constructor(e){this._size=0,this._options=e,this._leakageMon=g>0||this._options?.leakWarningThreshold?new p(e?.onListenerError??n.dz,this._options?.leakWarningThreshold??g):void 0,this._perfMon=this._options?._profName?new h(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(c){const e=this._listeners;queueMicrotask((()=>{y(e,(e=>e.stack?.print()))}))}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],i=new _(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]),o=this._options?.onListenerError||n.dz;return o(i),s.jG.None}if(this._disposed)return s.jG.None;t&&(e=e.bind(t));const o=new v(e);let r,a;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(o.stack=f.create(),r=this._leakageMon.check(o.stack,this._size+1)),c&&(o.stack=a??f.create()),this._listeners?this._listeners instanceof v?(this._deliveryQueue??=new k,this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._size++;const l=(0,s.s)((()=>{w?.unregister(l),r?.(),this._removeListener(o)}));if(i instanceof s.Cm?i.add(l):Array.isArray(i)&&i.push(l),w){const e=(new Error).stack.split("\n").slice(2,3).join("\n").trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);w.register(l,t?.[2]??e,l)}return l},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,i=t.indexOf(e);if(-1===i)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;const n=this._deliveryQueue.current===this;if(this._size*b<=t.length){let e=0;for(let i=0;i0}}const S=()=>new k;class k{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class x extends C{constructor(e){super(e),this._isPaused=0,this._eventQueue=new r.w,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0===--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else while(!this._isPaused&&0!==this._eventQueue.size)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class E extends x{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class L extends C{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class T{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new C({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};this.events.push(t),this.hasListeners&&this.hook(t);const i=()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)};return(0,s.s)((0,o.P)(i))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(const e of this.events)e.listener?.dispose();this.events=[]}}class I{constructor(){this.data=[]}wrapEvent(e,t,i){return(n,o,s)=>e((e=>{const s=this.data[this.data.length-1];if(!t)return void(s?s.buffers.push((()=>n.call(o,e))):n.call(o,e));const r=s;r?(r.items??=[],r.items.push(e),0===r.buffers.length&&s.buffers.push((()=>{r.reducedResult??=i?r.items.reduce(t,i):r.items.reduce(t),n.call(o,r.reducedResult)}))):n.call(o,t(i,e))}),void 0,s)}bufferEvents(e){const t={buffers:new Array};this.data.push(t);const i=e();return this.data.pop(),t.buffers.forEach((e=>e())),i}}class R{constructor(){this.listening=!1,this.inputEvent=u.None,this.inputEventListener=s.jG.None,this.emitter=new C({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},37531:(e,t,i)=>{"use strict";i.d(t,{No:()=>h,TH:()=>a,Zn:()=>c,_1:()=>d,kb:()=>l});var n=i(52444),o=i(25160),s=i(20601);function r(e){return 47===e||92===e}function a(e){return e.replace(/[\\/]/g,n.SA.sep)}function l(e){return-1===e.indexOf("/")&&(e=a(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function c(e,t=n.SA.sep){if(!e)return"";const i=e.length,o=e.charCodeAt(0);if(r(o)){if(r(e.charCodeAt(1))&&!r(e.charCodeAt(2))){let n=3;const o=n;for(;ne.length)return!1;if(i){const i=(0,s.ns)(e,t);if(!i)return!1;if(t.length===e.length)return!0;let n=t.length;return t.charAt(t.length-1)===o&&n--,e.charAt(n)===o}return t.charAt(t.length-1)!==o&&(t+=o),0===e.indexOf(t)}function u(e){return e>=65&&e<=90||e>=97&&e<=122}function h(e,t=o.uF){return!!t&&(u(e.charCodeAt(0))&&58===e.charCodeAt(1))}},10695:(e,t,i)=>{"use strict";i.d(t,{ne:()=>de,Nd:()=>ue,Jo:()=>K,WJ:()=>G,dt:()=>he,uU:()=>fe,Tt:()=>v,yr:()=>$,O:()=>q,WP:()=>m,dE:()=>b,J1:()=>W,or:()=>f});var n=i(21553);function o(e){const t=a(e);if(t&&t.length>0)return new Uint32Array(t)}let s=0;const r=new Uint32Array(10);function a(e){if(s=0,l(e,d,4352),s>0)return r.subarray(0,s);if(l(e,u,4449),s>0)return r.subarray(0,s);if(l(e,h,4520),s>0)return r.subarray(0,s);if(l(e,g,12593),s)return r.subarray(0,s);if(e>=44032&&e<=55203){const t=e-44032,i=t%588,n=Math.floor(t/588),o=Math.floor(i/28),a=i%28-1;if(n=0&&(a0)return r.subarray(0,s)}}function l(e,t,i){e>=i&&e>8&&(r[s++]=e>>8&255),e>>16&&(r[s++]=e>>16&255))}const d=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),u=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),h=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),g=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);var p=i(20601);function f(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}function v(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function b(e,t){return y(e.toLowerCase(),t.toLowerCase(),0,0)}function y(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=y(e,t,i+1,n+1))?D({start:n,end:n+1},o):null}return y(e,t,i,n+1)}function w(e){return 97<=e&&e<=122}function C(e){return 65<=e&&e<=90}function S(e){return 48<=e&&e<=57}function k(e){return 32===e||9===e||10===e||13===e}const x=new Set;function E(e){return k(e)||x.has(e)}function L(e,t){return e===t||E(e)&&E(t)}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>x.add(e.charCodeAt(0))));const T=new Map;function I(e){if(T.has(e))return T.get(e);let t;const i=o(e);return i&&(t=i),T.set(e,t),t}function R(e){return w(e)||C(e)||S(e)}function D(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function N(e,t){for(let i=t;i0&&!R(e.charCodeAt(i-1)))return i}return e.length}function A(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,s=n+1;o=A(e,t,i+1,n+1);while(!o&&(s=N(t,s)).6}function M(e){const{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:o}=e;return i>.2&&t<.8&&n>.6&&o<.2}function F(e){let t=0,i=0,n=0,o=0;for(let s=0;s60&&(t=t.substring(0,60));const i=O(t);if(!M(i)){if(!P(i))return null;t=t.toLowerCase()}let n=null,o=0;e=e.toLowerCase();while(o0&&E(e.charCodeAt(i-1)))return i;return e.length}const j=f(m,B,v),z=f(m,B,b),U=new n.qK(1e4);function $(e,t,i=!1){if("string"!==typeof e||"string"!==typeof t)return null;let n=U.get(e);n||(n=new RegExp(p.Bm(e),"i"),U.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?z(e,t):j(e,t)}function q(e,t){const i=he(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?G(i):null}function K(e,t,i,n,o,s){const r=Math.min(13,e.length);for(;i1;n--){const o=e[n]+i,s=t[t.length-1];s&&s.end===o?s.end=o+1:t.push({start:o,end:o+1})}return t}const Q=128;function Y(){const e=[],t=[];for(let i=0;i<=Q;i++)t[i]=0;for(let i=0;i<=Q;i++)e.push(t.slice(0));return e}function Z(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const X=Z(2*Q),J=Z(2*Q),ee=Y(),te=Y(),ie=Y(),ne=!1;function oe(e,t,i,n,o){function s(e,t,i=" "){while(e.lengths(e,3))).join("|")}\n`;for(let a=0;a<=i;a++)r+=0===a?" |":`${t[a-1]}|`,r+=e[a].slice(0,o+1).map((e=>s(e.toString(),3))).join("|")+"\n";return r}function se(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(oe(te,e,e.length,i,i.length)),console.log(oe(ie,e,e.length,i,i.length)),console.log(oe(ee,e,e.length,i,i.length))}function re(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!p.Ss(i)}}function ae(e,t){if(t<0||t>=e.length)return!1;const i=e.charCodeAt(t);switch(i){case 32:case 9:return!0;default:return!1}}function le(e,t,i){return t[e]!==i[e]}function ce(e,t,i,n,o,s,r=!1){while(tQ?Q:e.length,l=n.length>Q?Q:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!ce(t,i,a,o,s,l,!0))return;ge(a,l,i,s,t,o);let c=1,d=1,u=i,h=s;const g=[!1];for(c=1,u=i;ur,v=_?te[c][d-1]+(ee[c][d-1]>0?-5:0):0,b=h>r+1&&ee[c][d-1]>0,y=b?te[c][d-2]+(ee[c][d-2]>0?-5:0):0;if(b&&(!_||y>=v)&&(!f||y>=m))te[c][d]=y,ie[c][d]=3,ee[c][d]=0;else if(_&&(!f||v>=m))te[c][d]=v,ie[c][d]=2,ee[c][d]=0;else{if(!f)throw new Error("not possible");te[c][d]=m,ie[c][d]=1,ee[c][d]=ee[c-1][d-1]+1}}}if(ne&&se(e,i,n,s),!g[0]&&!r.firstMatchCanBeWeak)return;c--,d--;const p=[te[c][d],s];let f=0,m=0;while(c>=1){let e=d;do{const t=ie[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);f>1&&t[i+c-1]===o[s+d-1]&&!le(e+s-1,n,o)&&f+1>ee[c][e]&&(e=d),e===d?f++:f=1,m||(m=e),c--,d=e-1,p.push(d)}l-s===a&&r.boostFullMatch&&(p[0]+=2);const _=m-a;return p[0]-=_,p}function ge(e,t,i,n,o,s){let r=e-1,a=t-1;while(r>=i&&a>=n)o[r]===s[a]&&(J[r]=a,r--),a--}function pe(e,t,i,n,o,s,r,a,l,c,d){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let u=1,h=!1;return r===i-n?u=e[i]===o[r]?7:5:!le(r,o,s)||0!==r&&le(r-1,o,s)?!re(s,r)||0!==r&&re(s,r-1)?(re(s,r-1)||ae(s,r-1))&&(u=5,h=!0):u=5:(u=e[i]===o[r]?7:5,h=!0),u>1&&i===n&&(d[0]=!0),h||(h=le(r,o,s)||re(s,r-1)||ae(s,r-1)),i===n?r>l&&(u-=h?3:5):u+=c?h?2:0:h?0:1,r+1===a&&(u-=h?3:5),u}function fe(e,t,i,n,o,s,r){return me(e,t,i,n,o,s,!0,r)}function me(e,t,i,n,o,s,r,a){let l=he(e,t,i,n,o,s,a);if(l&&!r)return l;if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}function _e(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}},90702:(e,t,i)=>{"use strict";function n(e,t){const i=this;let n,o=!1;return function(){if(o)return n;if(o=!0,t)try{n=e.apply(i,arguments)}finally{t()}else n=e.apply(i,arguments);return n}}i.d(t,{P:()=>n})},13589:(e,t,i)=>{"use strict";i.d(t,{YW:()=>O,qg:()=>P});var n=i(9659),o=i(37531),s=i(21553),r=i(52444),a=i(25160),l=i(20601);const c="**",d="/",u="[/\\\\]",h="[^/\\\\]",g=/\//g;function p(e,t){switch(e){case 0:return"";case 1:return`${h}*?`;default:return`(?:${u}|${h}+${u}${t?`|${u}${h}+`:""})*?`}}function f(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}s+=r}return s&&i.push(s),i}function m(e){if(!e)return"";let t="";const i=f(e,d);if(i.every((e=>e===c)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===c){if(e)return;t+=p(2,o===i.length-1)}else{let e=!1,s="",r=!1,a="";for(const i of n)if("}"!==i&&e)s+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=f(s,","),n=`(?:${i.map((e=>m(e))).join("|")})`;t+=n,e=!1,s="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=h;continue;case"*":t+=p(1);continue;default:t+=(0,l.bm)(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?i===d?"":(0,l.bm)(i):"^",a+=e}oE(e,t))).filter((e=>e!==x)),e),n=i.length;if(!n)return x;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}function N(e,t,i){const n=r.Vn===r.SA.sep,o=n?e:e.replace(g,r.Vn),s=r.Vn+o,a=r.SA.sep+e;let l;return l=i?function(i,r){return"string"!==typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,s){return"string"!==typeof i||i!==o&&(n||i!==e)?null:t},l.allPaths=[(i?"*/":"./")+e],l}function A(e){try{const t=new RegExp(`^${m(e)}$`);return function(i){return t.lastIndex=0,"string"===typeof i&&t.test(i)?e:null}}catch(t){return x}}function O(e,t,i){return!(!e||"string"!==typeof t)&&P(e)(t,void 0,i)}function P(e,t={}){if(!e)return k;if("string"===typeof e||M(e)){const i=E(e,t);if(i===x)return k;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return F(e,t)}function M(e){const t=e;return!!t&&("string"===typeof t.base&&"string"===typeof t.pattern)}function F(e,t){const i=W(Object.getOwnPropertyNames(e).map((i=>B(i,e[i],t))).filter((e=>e!==x))),o=i.length;if(!o)return x;if(!i.some((e=>!!e.requiresSiblings))){if(1===o)return i[0];const e=function(e,t){let o;for(let s=0,r=i.length;s{for(const e of o){const t=await e;if("string"===typeof t)return t}return null})():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,o){let s,a;for(let l=0,c=i.length;l{for(const e of a){const t=await e;if("string"===typeof t)return t}return null})():null},a=i.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}function B(e,t,i){if(!1===t)return x;const o=E(e,i);if(o===x)return x;if("boolean"===typeof t)return o;if(t){const i=t.when;if("string"===typeof i){const t=(t,s,r,a)=>{if(!a||!o(t,s))return null;const l=i.replace("$(basename)",(()=>r)),c=a(l);return(0,n.Qg)(c)?c.then((t=>t?e:null)):c?e:null};return t.requiresSiblings=!0,t}}return o}function W(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const s=function(e,t){if("string"!==typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(s),r}},65647:(e,t,i)=>{"use strict";i.d(t,{e2:()=>l,sN:()=>s,tW:()=>o,v7:()=>f});var n=i(20601);function o(e){return s(e,0)}function s(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?c(e,t):d(e,t);case"string":return l(e,t);case"boolean":return a(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}}function r(e,t){return(t<<5)-t+e|0}function a(e,t){return r(e?433:863,t)}function l(e,t){t=r(149417,t);for(let i=0,n=e.length;is(t,e)),t)}function d(e,t){return t=r(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=l(i,t),s(e[i],t))),t)}function u(e,t,i=32){const n=i-t,o=~((1<>>n)>>>0}function h(e,t=0,i=e.byteLength,n=0){for(let o=0;oe.toString(16).padStart(2,"0"))).join(""):g((e>>>0).toString(16),t/4)}class f{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let o,s,r=this._buffLen,a=this._leftoverHighSurrogate;0!==a?(o=a,s=-1,a=0):(o=e.charCodeAt(0),s=0);while(1){let l=o;if(n.pc(o)){if(!(s+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),p(this._h0)+p(this._h1)+p(this._h2)+p(this._h3)+p(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,h(this._buff,this._buffLen),this._buffLen>56&&(this._step(),h(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=f._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,u(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let d=0;d<80;d++)d<20?(i=r&a|~r&l,n=1518500249):d<40?(i=r^a^l,n=1859775393):d<60?(i=r&a|r&l|a&l,n=2400959708):(i=r^a^l,n=3395469782),o=u(s,5)+i+c+n+e.getUint32(4*d,!1)&4294967295,c=l,l=a,a=u(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}},59200:(e,t,i)=>{"use strict";i.d(t,{k:()=>n});class n{static{this.sep="."}static{this.None=new n("@@none@@")}static{this.Empty=new n("")}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+n.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new n((this.value?[this.value,...e]:e).join(n.sep))}}},44757:(e,t,i)=>{"use strict";i.d(t,{O:()=>s,e:()=>o});var n=i(34230);function o(){return n._K&&!!n._K["VSCODE_DEV"]}function s(e){if(o()){const t=r();return t.add(e),{dispose(){t.delete(e)}}}return{dispose(){}}}function r(){a||(a=new Set);const e=globalThis;return e.$hotReload_applyNewExports||(e.$hotReload_applyNewExports=e=>{const t={config:{mode:void 0},...e},i=[];for(const n of a){const e=n(t);e&&i.push(e)}if(i.length>0)return e=>{let t=!1;for(const n of i)n(e)&&(t=!0);return t}}),a}let a;o()&&s((({oldExports:e,newSrc:t,config:i})=>{if("patch-prototype"===i.mode)return t=>{for(const i in t){const n=t[i];if(console.log(`[hot-reload] Patching prototype methods of '${i}'`,{exportedItem:n}),"function"===typeof n&&n.prototype){const o=e[i];if(o){for(const e of Object.getOwnPropertyNames(n.prototype)){const t=Object.getOwnPropertyDescriptor(n.prototype,e),s=Object.getOwnPropertyDescriptor(o.prototype,e);t?.value?.toString()!==s?.value?.toString()&&console.log(`[hot-reload] Patching prototype method '${i}.${e}'`),Object.defineProperty(o.prototype,e,t)}t[i]=o}}}return!0}}))},34956:(e,t,i)=>{"use strict";i.d(t,{b:()=>s});var n=i(44757),o=i(39751);function s(e,t){return r([e],t),e}function r(e,t){if((0,n.e)()){const i=(0,o.yQ)("reload",(t=>(0,n.O)((({oldExports:i})=>{if([...Object.values(i)].some((t=>e.includes(t))))return e=>(t(void 0),!0)}))));i.read(t)}}},42325:(e,t,i)=>{"use strict";i.d(t,{Bc:()=>l,VS:()=>d,_W:()=>f,it:()=>c,nI:()=>m,nK:()=>u,oO:()=>p});var n=i(14396),o=i(74529),s=i(84366),r=i(20601),a=i(29133);class l{constructor(e="",t=!1){if(this.value=e,"string"!==typeof this.value)throw(0,n.Qg)("value");"boolean"===typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=t.isTrusted??void 0,this.supportThemeIcons=t.supportThemeIcons??!1,this.supportHtml=t.supportHtml??!1)}appendText(e,t=0){return this.value+=h(this.supportThemeIcons?(0,o.m2)(e):e).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`\n${g(t,e)}\n`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp((0,r.bm)(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function c(e){return d(e)?!e.value:!Array.isArray(e)||e.every(c)}function d(e){return e instanceof l||!(!e||"object"!==typeof e)&&("string"===typeof e.value&&("boolean"===typeof e.isTrusted||"object"===typeof e.isTrusted||void 0===e.isTrusted)&&("boolean"===typeof e.supportThemeIcons||void 0===e.supportThemeIcons))}function u(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons&&e.supportHtml===t.supportHtml&&(e.baseUri===t.baseUri||!!e.baseUri&&!!t.baseUri&&(0,s.n4)(a.r.from(e.baseUri),a.r.from(t.baseUri))))}function h(e){return e.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function g(e,t){const i=e.match(/^`+/gm)?.reduce(((e,t)=>e.length>t.length?e:t)).length??0,n=i>=3?i+1:3;return[`${"`".repeat(n)}${t}`,e,`${"`".repeat(n)}`].join("\n")}function p(e){return e.replace(/"/g,""")}function f(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}function m(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",s=i?i[1]:"",r=isFinite(parseInt(s)),a=isFinite(parseInt(o));r&&t.push(`width="${s}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},74529:(e,t,i)=>{"use strict";i.d(t,{R$:()=>p,_k:()=>m,m2:()=>c,pS:()=>g,pz:()=>_,sA:()=>u});var n=i(10695),o=i(20601),s=i(23740);const r="$(",a=new RegExp(`\\$\\(${s.L.iconNameExpression}(?:${s.L.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function c(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const d=new RegExp(`\\\\${a.source}`,"g");function u(e){return e.replace(d,(e=>`\\${e}`))}const h=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(r)?e:e.replace(h,((e,t,i,n)=>i?e:t||n||""))}function p(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}const f=new RegExp(`\\$\\(${s.L.iconNameCharacter}+\\)`,"g");function m(e){f.lastIndex=0;let t="";const i=[];let n=0;while(1){const o=f.lastIndex,s=f.exec(e),r=e.substring(o,s?.index);if(r.length>0){t+=r;for(let e=0;e{"use strict";i.d(t,{n:()=>n,r:()=>o});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new n("id#")},53790:(e,t,i)=>{"use strict";i.d(t,{M:()=>s});var n=i(40231);class o{constructor(){this._onDidChange=new n.vl,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const s=new o},5837:(e,t,i)=>{"use strict";var n;i.d(t,{f:()=>n}),function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function n(){return i}function*o(e){yield e}function s(e){return t(e)?e:o(e)}function r(e){return e||i}function*a(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function l(e){return!e||!0===e[Symbol.iterator]().next().done}function c(e){return e[Symbol.iterator]().next().value}function d(e,t){let i=0;for(const n of e)if(t(n,i++))return!0;return!1}function u(e,t){for(const i of e)if(t(i))return i}function*h(e,t){for(const i of e)t(i)&&(yield i)}function*g(e,t){let i=0;for(const n of e)yield t(n,i++)}function*p(e,t){let i=0;for(const n of e)yield*t(n,i++)}function*f(...e){for(const t of e)yield*t}function m(e,t,i){let n=i;for(const o of e)n=t(n,o);return n}function*_(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t{"use strict";i.d(t,{Fo:()=>h,YM:()=>p,m5:()=>f,uw:()=>a});class n{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new n,s=new n,r=new n,a=new Array(230),l={},c=[],d=Object.create(null),u=Object.create(null),h=[],g=[];for(let m=0;m<=193;m++)h[m]=-1;for(let m=0;m<=132;m++)g[m]=-1;var p;function f(e,t){const i=(65535&t)<<16>>>0;return(e|i)>>>0}(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],i=[],n=[];for(const p of t){const[e,t,f,m,_,v,b,y,w]=p;if(n[t]||(n[t]=!0,c[t]=f,d[f]=t,u[f.toLowerCase()]=t,e&&(h[t]=m,0!==m&&3!==m&&5!==m&&4!==m&&6!==m&&57!==m&&(g[m]=t))),!i[m]){if(i[m]=!0,!_)throw new Error(`String representation missing for key code ${m} around scan code ${f}`);o.define(m,_),s.define(m,y||_),r.define(m,w||y||_)}v&&(a[v]=m),b&&(l[b]=m)}g[3]=46})(),function(e){function t(e){return o.keyCodeToStr(e)}function i(e){return o.strToKeyCode(e)}function n(e){return s.keyCodeToStr(e)}function a(e){return r.keyCodeToStr(e)}function l(e){return s.strToKeyCode(e)||r.strToKeyCode(e)}function c(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}e.toString=t,e.fromString=i,e.toUserSettingsUS=n,e.toUserSettingsGeneral=a,e.fromUserSettings=l,e.toElectronAccelerator=c}(p||(p={}))},59812:(e,t,i)=>{"use strict";i.d(t,{G$:()=>l,Of:()=>s,r0:()=>r,rr:()=>a});var n=i(41337);class o{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,s=t.length;o{"use strict";i.d(t,{FW:()=>l,Zv:()=>o,dG:()=>r,z5:()=>c});var n=i(14396);function o(e,t){if("number"===typeof e){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new a(0!==n?[s(i,t),s(n,t)]:[s(i,t)])}{const i=[];for(let n=0;n{"use strict";i.d(t,{d:()=>n});class n{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},5091:(e,t,i)=>{"use strict";i.d(t,{$w:()=>C,AS:()=>p,Ay:()=>l,BO:()=>w,Cm:()=>_,HE:()=>b,VD:()=>c,Xm:()=>g,jG:()=>v,lC:()=>h,mp:()=>y,qE:()=>f,s:()=>m});var n=i(90702),o=i(5837);const s=!1;let r=null;function a(e){r=e}if(s){const e="__is_disposable_tracked__";a(new class{trackDisposable(t){const i=new Error("Potentially leaked disposable").stack;setTimeout((()=>{t[e]||console.log(i)}),3e3)}setParent(t,i){if(t&&t!==v.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==v.None)try{t[e]=!0}catch{}}markAsSingleton(e){}})}function l(e){return r?.trackDisposable(e),e}function c(e){r?.markAsDisposed(e)}function d(e,t){r?.setParent(e,t)}function u(e,t){if(r)for(const i of e)r.setParent(i,t)}function h(e){return r?.markAsSingleton(e),e}function g(e){return"object"===typeof e&&null!==e&&"function"===typeof e.dispose&&0===e.dispose.length}function p(e){if(o.f.is(e)){const i=[];for(const n of e)if(n)try{n.dispose()}catch(t){i.push(t)}if(1===i.length)throw i[0];if(i.length>1)throw new AggregateError(i,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function f(...e){const t=m((()=>p(e)));return u(e,t),t}function m(e){const t=l({dispose:(0,n.P)((()=>{c(t),e()}))});return t}class _{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,l(this)}dispose(){this._isDisposed||(c(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{p(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return d(e,this),this._isDisposed?_.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),d(e,null))}}class v{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new _,l(this),d(this._store,this)}dispose(){c(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class b{constructor(){this._isDisposed=!1,l(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&d(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,c(this),this._value?.dispose(),this._value=void 0}}class y{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0===--this._counter&&this._disposable.dispose(),this}}class w{constructor(e){this.object=e}dispose(){}}class C{constructor(){this._store=new Map,this._isDisposed=!1,l(this)}dispose(){c(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{p(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},67806:(e,t,i)=>{"use strict";i.d(t,{w:()=>o});class n{static{this.Undefined=new n(void 0)}constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}class o{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;while(e!==n.Undefined){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==n.Undefined)yield e.element,e=e.next}}},21553:(e,t,i)=>{"use strict";var n,o;i.d(t,{cO:()=>u,db:()=>h,fT:()=>a,qK:()=>d});class s{constructor(e,t){this.uri=e,this.value=t}}function r(e){return Array.isArray(e)}class a{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[n]="ResourceMap",e instanceof a)this.map=new Map(e.map),this.toKey=t??a.defaultToKey;else if(r(e)){this.map=new Map,this.toKey=t??a.defaultToKey;for(const[t,i]of e)this.set(t,i)}else this.map=new Map,this.toKey=e??a.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(const[i,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class l{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;while(n){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;while(t&&i>e)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,i=this.size;while(t&&i>e)this._map.delete(t.key),t=t.previous,i--;this._tail=t,this._size=i,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class c extends l{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class d extends c{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class h{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}},61565:(e,t,i)=>{"use strict";i.d(t,{As:()=>s,qg:()=>r});var n=i(87885),o=i(29133);function s(e){return JSON.stringify(e,a)}function r(e){let t=JSON.parse(e);return t=l(t),t}function a(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function l(e,t=0){if(!e||t>200)return e;if("object"===typeof e){switch(e.$mid){case 1:return o.r.revive(e);case 2:return new RegExp(e.source,e.flags);case 17:return new Date(e.source)}if(e instanceof n.MB||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{"use strict";i.d(t,{K:()=>n});const n=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},6657:(e,t,i)=>{"use strict";i.d(t,{Ez:()=>g,SJ:()=>_,fV:()=>d,ny:()=>n,v$:()=>c,zl:()=>m});var n,o=i(14396),s=i(25160),r=i(20601),a=i(29133),l=i(52444);function c(e,t){return a.r.isUri(e)?(0,r.Q_)(e.scheme,t):(0,r.ns)(e,t+":")}function d(e,...t){return t.some((t=>c(e,t)))}(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(n||(n={}));const u="tkn";class h{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,n.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(d){return o.dz(d),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const r=this._ports[t],l=this._connectionTokens[t];let c=`path=${encodeURIComponent(e.path)}`;return"string"===typeof l&&(c+=`&${u}=${encodeURIComponent(l)}`),a.r.from({scheme:s.HZ?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${r}`,path:this._remoteResourcesPath,query:c})}}const g=new h,p="vscode-app";class f{static{this.FALLBACK_AUTHORITY=p}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===n.vscodeRemote?g.rewrite(e):e.scheme!==n.file||!s.ib&&s.lg!==`${n.vscodeFileResource}://${f.FALLBACK_AUTHORITY}`?e:e.with({scheme:n.vscodeFileResource,authority:e.authority||f.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const i=l.fj(t,e);return a.r.file(i)}return a.r.parse(t.toUrl(e))}}const m=new f;var _;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";function n(e){let n;"string"===typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:a.r.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const o=n?.get(i);if(o)return t.get(o)}function o(e,t,n){if(!globalThis.crossOriginIsolated)return;const o=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,o):e[i]=o}e.getHeadersFromQuery=n,e.addSearchParam=o})(_||(_={}))},19977:(e,t,i)=>{"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{Uq:()=>o,mu:()=>s,qE:()=>n});class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class s{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{"use strict";i.d(t,{Go:()=>o,PI:()=>a,V0:()=>h,aI:()=>d,co:()=>c,kT:()=>g,ol:()=>s});var n=i(50322);function o(e){if(!e||"object"!==typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach((([e,i])=>{t[e]=i&&"object"===typeof i?o(i):i})),t}function s(e){if(!e||"object"!==typeof e)return e;const t=[e];while(t.length>0){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const o=e[i];"object"!==typeof o||Object.isFrozen(o)||(0,n.iu)(o)||t.push(o)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.z)(e))return e;const o=t(e);if("undefined"!==typeof o)return o;if(Array.isArray(e)){const n=[];for(const o of e)n.push(l(o,t,i));return n}if((0,n.Gv)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const o in e)r.call(e,o)&&(n[o]=l(e[o],t,i));return i.delete(e),n}return e}function c(e,t,i=!0){return(0,n.Gv)(e)?((0,n.Gv)(t)&&Object.keys(t).forEach((o=>{o in e?i&&((0,n.Gv)(e[o])&&(0,n.Gv)(t[o])?c(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]})),e):t}function d(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ifunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const o of e)n[o]=i(o);return n}},39751:(e,t,i)=>{"use strict";i.d(t,{BK:()=>_,fm:()=>c,Y:()=>u,zL:()=>d,yC:()=>g,ht:()=>h,lk:()=>f.lk,un:()=>o.un,nb:()=>o.nb,ZX:()=>f.ZX,C:()=>o.C,rm:()=>o.rm,X2:()=>n.X2,y0:()=>f.y0,Yd:()=>f.Yd,yQ:()=>f.yQ,FY:()=>n.FY,Zh:()=>C,OI:()=>f.OI,PO:()=>n.PO,Rn:()=>n.Rn,oJ:()=>b});var n=i(81275),o=i(42389),s=i(79109),r=i(5091),a=i(74580),l=i(29933);function c(e){return new p(new a.nA(void 0,void 0,e),e,void 0,void 0)}function d(e,t){return new p(new a.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,void 0)}function u(e,t){return new p(new a.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,e.createEmptyChangeSummary,e.handleChange)}function h(e,t){const i=new r.Cm,n=u({owner:e.owner,debugName:e.debugName,debugReferenceFn:e.debugReferenceFn??t,createEmptyChangeSummary:e.createEmptyChangeSummary,handleChange:e.handleChange},((e,n)=>{i.clear(),t(e,n,i)}));return(0,r.s)((()=>{n.dispose(),i.dispose()}))}function g(e){const t=new r.Cm,i=d({owner:void 0,debugName:void 0,debugReferenceFn:e},(i=>{t.clear(),e(i,t)}));return(0,r.s)((()=>{i.dispose(),t.dispose()}))}class p{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n){this._debugNameData=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),(0,l.tZ)()?.handleAutorunCreated(this),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){(0,l.tZ)()?.handleAutorunTriggered(this);const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{t||(0,l.tZ)()?.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,s.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary);i&&(this.state=2)}}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(e){e.Observer=p})(c||(c={}));var f=i(79741),m=i(14396);class _{static fromFn(e){return new _(e())}constructor(e){this._value=(0,n.FY)(this,void 0),this.promiseResult=this._value,this.promise=e.then((e=>((0,n.Rn)((t=>{this._value.set(new v(e,void 0),t)})),e)),(e=>{throw(0,n.Rn)((t=>{this._value.set(new v(void 0,e),t)})),e}))}}class v{constructor(e,t){this.data=e,this.error=t}}function b(e,t,i,n){return t||(t=e=>null!==e&&void 0!==e),new Promise(((o,s)=>{let r=!0,a=!1;const l=e.map((e=>({isFinished:t(e),error:!!i&&i(e),state:e}))),d=c((e=>{const{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:d.dispose(),i?s(!0===i?n:i):o(n))}));if(n){const e=n.onCancellationRequested((()=>{d.dispose(),e.dispose(),s(new m.AL)}));if(n.isCancellationRequested)return d.dispose(),e.dispose(),void s(new m.AL)}r=!1,a&&d.dispose()}))}var y=i(45746);class w extends n.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i){super(),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const e of this.observers)for(const t of this._deltas)e.handleChange(this,t);this._deltas.length=0}else for(const e of this.observers)e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(const e of this.observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){this._update();const e=[...this.observers];for(const t of e)t.endUpdate(this)}}addObserver(e){const t=!this.observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){if(void 0===i&&this._equalityComparator(this._value,e))return;let o;t||(t=o=new n.XL((()=>{}),(()=>`Setting ${this.debugName}`)));try{if(this._isUpToDate=!1,this._setValue(e),void 0!==i&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(e,t)=>{},handlePossibleChange:e=>{}},this),this._updateCounter>1)for(const e of this.observers)e.handlePossibleChange(this)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function C(e,t){return e.lazy?new w(new a.nA(e.owner,e.debugName,void 0),t,e.equalsFn??y.nx):new n.Lj(new a.nA(e.owner,e.debugName,void 0),t,e.equalsFn??y.nx)}const S=!1;S&&(0,l.Br)(new l.jm)},81275:(e,t,i)=>{"use strict";i.d(t,{Bm:()=>d,FB:()=>u,FY:()=>y,Lj:()=>w,N2:()=>h,PO:()=>v,Rn:()=>f,X2:()=>C,XL:()=>b,YY:()=>m,ZK:()=>p,fL:()=>_,zV:()=>g});var n=i(45746),o=i(74580),s=i(29933);let r,a,l,c;function d(e){r=e}function u(e){a=e}function h(e){l=e}class g{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=void 0===t?void 0:e,n=void 0===t?e:t;return l({owner:i,debugName:()=>{const e=(0,o.qQ)(n);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/,s=t.exec(n.toString());return s?`${this.debugName}.${s[2]}`:i?void 0:`${this.debugName} (mapped)`},debugReferenceFn:n},(e=>n(this.read(e),e)))}flatten(){return l({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(r(this,t)),this}keepObserved(e){return e.add(a(this)),this}}class p extends g{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){const t=this.observers.delete(e);t&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function f(e,t){const i=new b(e,t);try{e(i)}finally{i.finish()}}function m(e){if(c)e(c);else{const t=new b(e,void 0);c=t;try{e(t)}finally{t.finish(),c=void 0}}}async function _(e,t){const i=new b(e,t);try{await e(i)}finally{i.finish()}}function v(e,t,i){e?t(e):f(t,i)}class b{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],(0,s.tZ)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,o.qQ)(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t{}),(()=>`Setting ${this.debugName}`)));try{const n=this._value;this._setValue(e),(0,s.tZ)()?.handleObservableChanged(this,{oldValue:n,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function C(e,t){let i;return i="string"===typeof e?new o.nA(void 0,e,void 0):new o.nA(e,void 0,void 0),new S(i,t,n.nx)}class S extends w{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}},74580:(e,t,i)=>{"use strict";i.d(t,{nA:()=>n,qQ:()=>g});class n{constructor(e,t,i){this.owner=e,this.debugNameSource=t,this.referenceFn=i}getDebugName(e){return r(e,this)}}const o=new Map,s=new WeakMap;function r(e,t){const i=s.get(e);if(i)return i;const n=a(e,t);if(n){let t=o.get(n)??0;t++,o.set(n,t);const i=1===t?n:`${n}#${t}`;return s.set(e,i),i}}function a(e,t){const i=s.get(e);if(i)return i;const n=t.owner?u(t.owner)+".":"";let o;const r=t.debugNameSource;if(void 0!==r){if("function"!==typeof r)return n+r;if(o=r(),void 0!==o)return n+o}const a=t.referenceFn;if(void 0!==a&&(o=g(a),void 0!==o))return n+o;if(void 0!==t.owner){const i=l(t.owner,e);if(void 0!==i)return n+i}}function l(e,t){for(const i in e)if(e[i]===t)return i}const c=new Map,d=new WeakMap;function u(e){const t=d.get(e);if(t)return t;const i=h(e);let n=c.get(i)??0;n++,c.set(i,n);const o=1===n?i:`${i}#${n}`;return d.set(e,o),o}function h(e){const t=e.constructor;return t?t.name:"Object"}function g(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//,n=i.exec(t),o=n?n[1]:void 0;return o?.trim()}},42389:(e,t,i)=>{"use strict";i.d(t,{C:()=>u,a0:()=>p,dQ:()=>d,nb:()=>h,rm:()=>g,un:()=>c});var n=i(79109),o=i(45746),s=i(5091),r=i(81275),a=i(74580),l=i(29933);function c(e,t){return void 0!==t?new f(new a.nA(e,void 0,t),t,void 0,void 0,void 0,o.nx):new f(new a.nA(void 0,void 0,e),e,void 0,void 0,void 0,o.nx)}function d(e,t,i){return new m(new a.nA(e,void 0,t),t,void 0,void 0,void 0,o.nx,i)}function u(e,t){return new f(new a.nA(e.owner,e.debugName,e.debugReferenceFn),t,void 0,void 0,e.onLastObserverRemoved,e.equalsFn??o.nx)}function h(e,t){return new f(new a.nA(e.owner,e.debugName,void 0),t,e.createEmptyChangeSummary,e.handleChange,void 0,e.equalityComparer??o.nx)}function g(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const r=new s.Cm;return new f(new a.nA(n,void 0,i),(e=>(r.clear(),i(e,r))),void 0,void 0,(()=>r.dispose()),o.nx)}function p(e,t){let i,n,r;return void 0===t?(i=e,n=void 0):(n=e,i=t),new f(new a.nA(n,void 0,i),(e=>{r?r.clear():r=new s.Cm;const t=i(e);return t&&r.add(t),t}),void 0,void 0,(()=>{r&&(r.dispose(),r=void 0)}),o.nx)}(0,r.N2)(u);class f extends r.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n,o=void 0,s){super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=i,this._handleChange=n,this._handleLastObserverRemoved=o,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=this.createChangeSummary?.(),(0,l.tZ)()?.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(0===this.observers.size){const e=this._computeFn(this,this.createChangeSummary?.());return this.onLastObserverRemoved(),e}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;const t=0!==this.state,i=this.value;this.state=3;const n=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this.value=this._computeFn(this,n)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const o=t&&!this._equalityComparator(i,this.value);if((0,l.tZ)()?.handleDerivedRecomputed(this,{oldValue:i,newValue:this.value,change:void 0,didChange:o,hadValue:t}),o)for(const s of this.observers)s.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const i of this.observers)i.handlePossibleChange(this);if(t)for(const i of this.observers)i.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,n.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}class m extends f{constructor(e,t,i,n,o=void 0,s,r){super(e,t,i,n,o,s),this.set=r}}},29933:(e,t,i)=>{"use strict";let n;function o(e){n=e}function s(){return n}i.d(t,{Br:()=>o,jm:()=>r,tZ:()=>s});class r{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return a([l(p("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[l(" "),d(u(e.oldValue,70),{color:"red",strikeThrough:!0}),l(" "),d(u(e.newValue,60),{color:"green"})]:[l(" (unchanged)")]:[l(" "),d(u(e.newValue,60),{color:"green"}),l(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([c("observable value changed"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return d(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleDerivedRecomputed(e,t){const i=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([c("derived recomputed"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),i.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([c("observable from event triggered"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([c("autorun"),d(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([c("transaction"),d(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function a(e){const t=new Array,i=[];let n="";function o(e){if("length"in e)for(const t of e)t&&o(t);else"text"in e?(n+=`%c${e.text}`,t.push(e.style),e.data&&i.push(...e.data)):"data"in e&&i.push(...e.data)}o(e);const s=[n,...t];return s.push(...i),s}function l(e){return d(e,{color:"black"})}function c(e){return d(f(`${e}: `,10),{color:"black",bold:!0})}function d(e,t={color:"black"}){function i(e){return Object.entries(e).reduce(((e,[t,i])=>`${e}${t}:${i};`),"")}const n={color:t.color};return t.strikeThrough&&(n["text-decoration"]="line-through"),t.bold&&(n["font-weight"]="bold"),{text:e,style:i(n)}}function u(e,t){switch(typeof e){case"number":return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?h(e,t):g(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`;default:return""+e}}function h(e,t){let i="[ ",n=!0;for(const o of e){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${u(o,t-i.length)}`}return i+=" ]",i}function g(e,t){let i="{ ",n=!0;for(const[o,s]of Object.entries(e)){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${o}: ${u(s,t-i.length)}`}return i+=" }",i}function p(e,t){let i="";for(let n=1;n<=t;n++)i+=e;return i}function f(e,t){while(e.length{"use strict";i.d(t,{OI:()=>b,Rl:()=>C,Yd:()=>m,ZX:()=>w,eP:()=>h,lk:()=>c,t:()=>k,y0:()=>u,yQ:()=>p});i(40231);var n=i(5091),o=i(81275),s=i(74580),r=i(42389),a=i(29933),l=i(45746);function c(e){return new d(e)}class d extends o.zV{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function u(...e){let t,i,n;return 3===e.length?[t,i,n]=e:[i,n]=e,new g(new s.nA(t,void 0,n),i,n,(()=>g.globalTransaction),l.nx)}function h(e,t,i){return new g(new s.nA(e.owner,e.debugName,e.debugReferenceFn??i),t,i,(()=>g.globalTransaction),e.equalsFn??l.nx)}class g extends o.ZK{constructor(e,t,i,n,s){super(),this._debugNameData=e,this.event=t,this._getValue=i,this._getTransaction=n,this._equalityComparator=s,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),i=this.value,n=!this.hasValue||!this._equalityComparator(i,t);let s=!1;n&&(this.value=t,this.hasValue&&(s=!0,(0,o.PO)(this._getTransaction(),(e=>{(0,a.tZ)()?.handleFromEventObservableTriggered(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),s||(0,a.tZ)()?.handleFromEventObservableTriggered(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){if(this.subscription)return this.hasValue||this.handleEvent(void 0),this.value;{const e=this._getValue(void 0);return e}}}function p(e,t){return new f(e,t)}(function(e){function t(e,t){let i=!1;void 0===g.globalTransaction&&(g.globalTransaction=e,i=!0);try{t()}finally{i&&(g.globalTransaction=void 0)}}e.Observer=g,e.batchEventsGlobally=t})(u||(u={}));class f extends o.ZK{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{(0,o.Rn)((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function m(e){return"string"===typeof e?new _(e):new _(void 0,e)}class _ extends o.ZK{get debugName(){return new s.nA(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else(0,o.Rn)((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function v(e){const t=new y(!1,void 0);return e.addObserver(t),(0,n.s)((()=>{e.removeObserver(t)}))}function b(e,t){const i=new y(!0,t);return e.addObserver(i),t?t(e.get()):e.reportChanges(),(0,n.s)((()=>{e.removeObserver(i)}))}(0,o.FB)(v),(0,o.Bm)(b);class y{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}function w(e,t){let i;const n=(0,r.C)({owner:e,debugReferenceFn:t},(e=>(i=t(e,i),i)));return n}function C(e,t,i,n){let o=new S(i,n);const s=(0,r.C)({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{o.dispose(),o=new S(i)}},(e=>(o.setItems(t.read(e)),o.getItems())));return s}class S{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach((e=>e.store.dispose())),this._cache.clear()}setItems(e){const t=[],i=new Set(this._cache.keys());for(const o of e){const e=this._keySelector?this._keySelector(o):o;let s=this._cache.get(e);if(s)i.delete(e);else{const t=new n.Cm,i=this._map(o,t);s={out:i,store:t},this._cache.set(e,s)}t.push(s.out)}for(const n of i){const e=this._cache.get(n);e.store.dispose(),this._cache.delete(n)}this._items=t}getItems(){return this._items}}function k(e,t){return w(e,((e,i)=>i??t(e)))}},52444:(e,t,i)=>{"use strict";i.d(t,{IN:()=>S,LC:()=>N,P8:()=>D,S8:()=>E,SA:()=>x,V8:()=>I,Vn:()=>A,fj:()=>L,hd:()=>T,pD:()=>R});var n=i(34230);const o=65,s=97,r=90,a=122,l=46,c=47,d=92,u=58,h=63;class g extends Error{constructor(e,t,i){let n;"string"===typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;s+=". Received type "+typeof i,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function p(e,t){if(null===e||"object"!==typeof e)throw new g(t,"Object",e)}function f(e,t){if("string"!==typeof e)throw new g(t,"string",e)}const m="win32"===n.iD;function _(e){return e===c||e===d}function v(e){return e===c}function b(e){return e>=o&&e<=r||e>=s&&e<=a}function y(e,t,i,n){let o="",s=0,r=-1,a=0,d=0;for(let u=0;u<=e.length;++u){if(u2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):(o=o.slice(0,e),s=o.length-1-o.lastIndexOf(i)),r=u,a=0;continue}if(0!==o.length){o="",s=0,r=u,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,u)}`:o=e.slice(r+1,u),s=u-r-1;r=u,a=0}else d===l&&-1!==a?++a:a=-1}return o}function w(e){return e?`${"."===e[0]?"":"."}${e}`:""}function C(e,t){p(t,"pathObject");const i=t.dir||t.root,n=t.base||`${t.name||""}${w(t.ext)}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const S={resolve(...e){let t="",i="",o=!1;for(let s=e.length-1;s>=-1;s--){let r;if(s>=0){if(r=e[s],f(r,`paths[${s}]`),0===r.length)continue}else 0===t.length?r=n.bJ():(r=n._K[`=${t}`]||n.bJ(),(void 0===r||r.slice(0,2).toLowerCase()!==t.toLowerCase()&&r.charCodeAt(2)===d)&&(r=`${t}\\`));const a=r.length;let l=0,c="",h=!1;const g=r.charCodeAt(0);if(1===a)_(g)&&(l=1,h=!0);else if(_(g))if(h=!0,_(r.charCodeAt(1))){let e=2,t=e;while(e2&&_(r.charCodeAt(2))&&(h=!0,l=3));if(c.length>0)if(t.length>0){if(c.toLowerCase()!==t.toLowerCase())continue}else t=c;if(o){if(t.length>0)break}else if(i=`${r.slice(l)}\\${i}`,o=h,h&&t.length>0)break}return i=y(i,!o,"\\",_),o?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){f(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return v(s)?"\\":e;if(_(s))if(o=!0,_(e.charCodeAt(1))){let o=2,s=o;while(o2&&_(e.charCodeAt(2))&&(o=!0,n=3));let r=n0&&_(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){f(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return _(i)||t>2&&b(i)&&e.charCodeAt(1)===u&&_(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let s=0;s0&&(void 0===t?t=i=n:t+=`\\${n}`)}if(void 0===t)return".";let n=!0,o=0;if("string"===typeof i&&_(i.charCodeAt(0))){++o;const e=i.length;e>1&&_(i.charCodeAt(1))&&(++o,e>2&&(_(i.charCodeAt(2))?++o:n=!1))}if(n){while(o=2&&(t=`\\${t.slice(o)}`)}return S.normalize(t)},relative(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";const i=S.resolve(e),n=S.resolve(t);if(i===n)return"";if(e=i.toLowerCase(),t=n.toLowerCase(),e===t)return"";let o=0;while(oo&&e.charCodeAt(s-1)===d)s--;const r=s-o;let a=0;while(aa&&t.charCodeAt(l-1)===d)l--;const c=l-a,u=ru){if(t.charCodeAt(a+g)===d)return n.slice(a+g+1);if(2===g)return n.slice(a+g)}r>u&&(e.charCodeAt(o+g)===d?h=g:2===g&&(h=3)),-1===h&&(h=0)}let p="";for(g=o+h+1;g<=s;++g)g!==s&&e.charCodeAt(g)!==d||(p+=0===p.length?"..":"\\..");return a+=h,p.length>0?`${p}${n.slice(a,l)}`:(n.charCodeAt(a)===d&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e||0===e.length)return e;const t=S.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===d){if(t.charCodeAt(1)===d){const e=t.charCodeAt(2);if(e!==h&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(b(t.charCodeAt(0))&&t.charCodeAt(1)===u&&t.charCodeAt(2)===d)return`\\\\?\\${t}`;return e},dirname(e){f(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return _(o)?e:".";if(_(o)){if(i=n=1,_(e.charCodeAt(1))){let o=2,s=o;while(o2&&_(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let a=t-1;a>=n;--a)if(_(e.charCodeAt(a))){if(!r){s=a;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&f(t,"suffix"),f(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&b(e.charCodeAt(0))&&e.charCodeAt(1)===u&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(_(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1===--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(_(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){f(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&e.charCodeAt(1)===u&&b(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(_(t)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1),t===l?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:C.bind(null,"\\"),parse(e){f(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return _(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(_(o)){if(n=1,_(e.charCodeAt(1))){let t=2,o=t;while(t0&&(t.root=e.slice(0,n));let s=-1,r=n,a=-1,c=!0,d=e.length-1,h=0;for(;d>=n;--d)if(o=e.charCodeAt(d),_(o)){if(!c){r=d+1;break}}else-1===a&&(c=!1,a=d+1),o===l?-1===s?s=d:1!==h&&(h=1):-1!==s&&(h=-1);return-1!==a&&(-1===s||0===h||1===h&&s===a-1&&s===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,s),t.base=e.slice(r,a),t.ext=e.slice(s,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},k=(()=>{if(m){const e=/\\/g;return()=>{const t=n.bJ().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>n.bJ()})(),x={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:k();f(o,`paths[${n}]`),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===c)}return t=y(t,!i,"/",v),i?`/${t}`:t.length>0?t:"."},normalize(e){if(f(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c,i=e.charCodeAt(e.length-1)===c;return e=y(e,!t,"/",v),0===e.length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return f(e,"path"),e.length>0&&e.charCodeAt(0)===c},join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":x.normalize(t)},relative(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";if(e=x.resolve(e),t=x.resolve(t),e===t)return"";const i=1,n=e.length,o=n-i,s=1,r=t.length-s,a=oa){if(t.charCodeAt(s+d)===c)return t.slice(s+d+1);if(0===d)return t.slice(s+d)}else o>a&&(e.charCodeAt(i+d)===c?l=d:0===d&&(l=0));let u="";for(d=i+l+1;d<=n;++d)d!==n&&e.charCodeAt(d)!==c||(u+=0===u.length?"..":"/..");return`${u}${t.slice(s+l)}`},toNamespacedPath(e){return e},dirname(e){if(f(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c;let i=-1,n=!0;for(let o=e.length-1;o>=1;--o)if(e.charCodeAt(o)===c){if(!n){i=o;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&f(t,"ext"),f(e,"path");let i,n=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===c){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1===--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===c){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){f(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==c)-1===n&&(o=!1,n=r+1),a===l?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:C.bind(null,"/"),parse(e){f(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===c;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,a=!0,d=e.length-1,u=0;for(;d>=n;--d){const t=e.charCodeAt(d);if(t!==c)-1===r&&(a=!1,r=d+1),t===l?-1===o?o=d:1!==u&&(u=1):-1!==o&&(u=-1);else if(!a){s=d+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===u||1===u&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};x.win32=S.win32=S,x.posix=S.posix=x;const E=m?S.normalize:x.normalize,L=m?S.join:x.join,T=m?S.resolve:x.resolve,I=m?S.relative:x.relative,R=m?S.dirname:x.dirname,D=m?S.basename:x.basename,N=m?S.extname:x.extname,A=m?S.sep:x.sep},25160:(e,t,i)=>{"use strict";i.d(t,{BH:()=>P,Fr:()=>A,H8:()=>j,HZ:()=>I,OS:()=>B,UP:()=>$,_p:()=>F,cm:()=>V,gm:()=>z,ib:()=>T,j9:()=>L,lg:()=>D,m0:()=>q,nr:()=>U,uF:()=>x,un:()=>N,zx:()=>E});var n=i(41337);const o="en";let s,r,a=!1,l=!1,c=!1,d=!1,u=!1,h=!1,g=!1,p=!1,f=!1,m=!1,_=o,v=null,b=null;const y=globalThis;let w;"undefined"!==typeof y.vscode&&"undefined"!==typeof y.vscode.process?w=y.vscode.process:"undefined"!==typeof process&&"string"===typeof process?.versions?.node&&(w=process);const C="string"===typeof w?.versions?.electron,S=C&&"renderer"===w?.type;if("object"===typeof w){a="win32"===w.platform,l="darwin"===w.platform,c="linux"===w.platform,d=c&&!!w.env["SNAP"]&&!!w.env["SNAP_REVISION"],g=C,f=!!w.env["CI"]||!!w.env["BUILD_ARTIFACTSTAGINGDIRECTORY"],s=o,_=o;const e=w.env["VSCODE_NLS_CONFIG"];if(e)try{const t=JSON.parse(e);s=t.userLocale,v=t.osLocale,_=t.resolvedLanguage||o,b=t.languagePack?.translationsConfigFile}catch(K){}u=!0}else"object"!==typeof navigator||S?console.error("Unable to resolve platform."):(r=navigator.userAgent,a=r.indexOf("Windows")>=0,l=r.indexOf("Macintosh")>=0,p=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=r.indexOf("Linux")>=0,m=r?.indexOf("Mobi")>=0,h=!0,_=n.i8()||o,s=navigator.language.toLowerCase(),v=s);let k=0;l?k=1:a?k=3:c&&(k=2);const x=a,E=l,L=c,T=u,I=h,R=h&&"function"===typeof y.importScripts,D=R?y.origin:void 0,N=p,A=m,O=r,P=_,M="function"===typeof y.postMessage&&!y.importScripts,F=(()=>{if(M){const e=[];y.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),y.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),B=l||p?2:a?1:3;let W=!0,H=!1;function V(){if(!H){H=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);W=513===t[0]}return W}const j=!!(O&&O.indexOf("Chrome")>=0),z=!!(O&&O.indexOf("Firefox")>=0),U=!!(!j&&O&&O.indexOf("Safari")>=0),$=!!(O&&O.indexOf("Edg/")>=0),q=!!(O&&O.indexOf("Android")>=0)},34230:(e,t,i)=>{"use strict";i.d(t,{_K:()=>a,bJ:()=>r,iD:()=>l});var n=i(25160);let o;const s=globalThis.vscode;if("undefined"!==typeof s&&"undefined"!==typeof s.process){const e=s.process;o={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else o="undefined"!==typeof process&&"string"===typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env["VSCODE_CWD"]||process.cwd()}}:{get platform(){return n.uF?"win32":n.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const r=o.cwd,a=o.env,l=o.platform},21542:(e,t,i)=>{"use strict";var n;i.d(t,{Q:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}function n(e,n){return!i(t(e,n))}function o(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}e.intersect=t,e.isEmpty=i,e.intersects=n,e.relativeComplement=o}(n||(n={}))},84366:(e,t,i)=>{"use strict";i.d(t,{B6:()=>S,Fd:()=>v,LC:()=>f,P8:()=>p,Pi:()=>g,er:()=>u,iZ:()=>b,n4:()=>h,o1:()=>y,pD:()=>m,su:()=>c,uJ:()=>_});var n=i(37531),o=i(6657),s=i(52444),r=i(25160),a=i(20601),l=i(29133);function c(e){return(0,l.I)(e,!0)}class d{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===o.ny.file)return n._1(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(w(e.authority,t.authority))return n._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return p(e)||e.authority}basename(e){return s.SA.basename(e.path)}extname(e){return s.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===o.ny.file?t=l.r.file(s.pD(c(e))).path:(t=s.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===o.ny.file?l.r.file(s.S8(c(e))).path:s.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!w(e.authority,t.authority))return;if(e.scheme===o.ny.file){const i=s.V8(c(e),c(t));return r.uF?n.TH(i):i}let i=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,a.length);en.Zn(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.Vn){return C(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.Vn){let i=!1;if(e.scheme===o.ny.file){const o=c(e);i=void 0!==o&&o.length===n.Zn(o).length&&o[o.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||C(e,t)?e:e.with({path:e.path+"/"})}}const u=new d((()=>!1)),h=(new d((e=>e.scheme!==o.ny.file||!r.j9)),new d((e=>!0)),u.isEqual.bind(u)),g=(u.isEqualOrParent.bind(u),u.getComparisonKey.bind(u),u.basenameOrAuthority.bind(u)),p=u.basename.bind(u),f=u.extname.bind(u),m=u.dirname.bind(u),_=u.joinPath.bind(u),v=u.normalizePath.bind(u),b=u.relativePath.bind(u),y=u.resolvePath.bind(u),w=(u.isAbsolutePath.bind(u),u.isEqualAuthority.bind(u)),C=u.hasTrailingPathSeparator.bind(u);u.removeTrailingPathSeparator.bind(u),u.addTrailingPathSeparator.bind(u);var S;(function(e){function t(t){const i=new Map,n=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));n.split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const o=t.path.substring(0,t.path.indexOf(";"));return o&&i.set(e.META_DATA_MIME,o),i}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(S||(S={}))},52210:(e,t,i)=>{"use strict";i.d(t,{yE:()=>r});var n=i(40231),o=i(5091);class s{constructor(e,t,i,n,o,s,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,o|=0,s|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),o<0&&(o=0),r+o>s&&(r=s-o),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=o,this.scrollHeight=s,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new s(this._forceIntegerValues,"undefined"!==typeof e.width?e.width:this.width,"undefined"!==typeof e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,"undefined"!==typeof e.height?e.height:this.height,"undefined"!==typeof e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new s(this._forceIntegerValues,this.width,this.scrollWidth,"undefined"!==typeof e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,"undefined"!==typeof e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends o.jG{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.vl),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new s(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:"undefined"===typeof e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:"undefined"===typeof e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new d(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=d.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*h(t)}}function c(e,t,i){return function(n){return n2.5*i){let n,o;return e{"use strict";i.d(t,{A:()=>s});var n,o=i(20601);(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(n||(n={})),function(e){const t="error",i="warning",n="warn",s="info",r="ignore";function a(r){return r?o.Q_(t,r)?e.Error:o.Q_(i,r)||o.Q_(n,r)?e.Warning:o.Q_(s,r)?e.Info:e.Ignore:e.Ignore}function l(n){switch(n){case e.Error:return t;case e.Warning:return i;case e.Info:return s;default:return r}}e.fromValue=a,e.toString=l}(n||(n={}));const s=n},84240:(e,t,i)=>{"use strict";i.d(t,{W:()=>o});const n=globalThis.performance&&"function"===typeof globalThis.performance.now;class o{static create(e){return new o(e)}constructor(e){this._now=n&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},20601:(e,t,i)=>{"use strict";i.d(t,{$X:()=>Y,AV:()=>s,BO:()=>g,Bm:()=>p,Bq:()=>u,DB:()=>L,E_:()=>q,GP:()=>a,HG:()=>y,LJ:()=>P,LU:()=>ee,Lv:()=>T,MV:()=>j,NB:()=>h,OS:()=>m,Q_:()=>R,Qp:()=>N,S8:()=>ce,Ss:()=>X,UD:()=>S,UU:()=>w,Vi:()=>A,W1:()=>x,Wd:()=>re,Wv:()=>I,Z5:()=>F,_J:()=>Q,aC:()=>G,bm:()=>d,eY:()=>_,en:()=>b,ih:()=>c,iy:()=>V,jy:()=>l,km:()=>H,lF:()=>k,lT:()=>C,m:()=>z,ne:()=>Z,ns:()=>D,pc:()=>O,r_:()=>J,tk:()=>ie,tl:()=>de,uz:()=>v,wB:()=>f,y_:()=>ue,zY:()=>te,z_:()=>M,zd:()=>E});var n=i(17389),o=i(85661);function s(e){return!e||"string"!==typeof e||0===e.trim().length}const r=/{(\d+)}/g;function a(e,...t){return 0===t.length?e:e.replace(r,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function l(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function c(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function d(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function u(e,t=" "){const i=h(e,t);return g(i,t)}function h(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;while(e.indexOf(t,n)===n)n+=i;return e.substring(n)}function g(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,s=-1;while(1){if(s=e.lastIndexOf(t,o-1),-1===s||s+i!==o)break;if(0===s)return"";o=s}return e.substring(0,o)}function p(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(e){return e.replace(/\*/g,"")}function m(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=d(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function _(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function v(e){return e.split(/\r\n|\r|\n/)}function b(e){const t=[],i=e.split(/(\r\n|\r|\n)/);for(let n=0;n=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function S(e,t){return et?1:0}function k(e,t,i=0,n=e.length,o=0,s=t.length){for(;is)return 1}const r=n-i,a=s-o;return ra?1:0}function x(e,t){return E(e,t,0,e.length,0,t.length)}function E(e,t,i=0,n=e.length,o=0,s=t.length){for(;i=128||a>=128)return k(e.toLowerCase(),t.toLowerCase(),i,n,o,s);T(r)&&(r-=32),T(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return ra?1:0}function L(e){return e>=48&&e<=57}function T(e){return e>=97&&e<=122}function I(e){return e>=65&&e<=90}function R(e,t){return e.length===t.length&&0===E(e,t)}function D(e,t){const i=t.length;return!(t.length>e.length)&&0===E(e,t,0,i)}function N(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n1){const n=e.charCodeAt(t-2);if(O(n))return M(n,i)}return i}class W{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=B(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=F(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class H{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new W(e,t)}nextGraphemeLength(){const e=oe.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());while(!t.eol()){const i=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(ne(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=oe.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());while(t.offset>0){const i=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(ne(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function V(e,t){const i=new H(e,t);return i.nextGraphemeLength()}function j(e,t){const i=new H(e,t);return i.prevGraphemeLength()}function z(e,t){t>0&&P(e.charCodeAt(t))&&t--;const i=t+V(e,t),n=i-j(e,i);return[n,i]}let U;function $(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function q(e){return U||(U=$()),U.test(e)}const K=/^[\t\n\r\x20-\x7E]*$/;function G(e){return K.test(e)}const Q=/[\u2028\u2029]/;function Y(e){return Q.test(e)}function Z(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function X(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const J=String.fromCharCode(65279);function ee(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function te(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ie(e){const t=26;return e%=2*t,et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function se(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function re(e,t){if(0===e)return 0;const i=ae(e,t);if(void 0!==i)return i;const n=new W(t,e);return n.prevCodePoint(),n.offset}function ae(e,t){const i=new W(t,e);let n=i.prevCodePoint();while(le(n)||65039===n||8419===n){if(0===i.offset)return;n=i.prevCodePoint()}if(!X(n))return;let o=i.offset;if(o>0){const e=i.prevCodePoint();8205===e&&(o=i.offset)}return o}function le(e){return 127995<=e&&e<=127999}const ce=" ";class de{static{this.ambiguousCharacterData=new o.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new n.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in o));0===r.length&&(r=["_default"]);for(const c of r){const e=t(o[c]);s=n(s,e)}const a=t(o["_common"]),l=i(a,s);return new de(l)}))}static getInstance(e){return de.cache.get(Array.from(e))}static{this._locales=new o.d((()=>Object.keys(de.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return de._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class ue{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(ue.getRawData())),this._data}static isInvisibleCharacter(e){return ue.getData().has(e)}static get codePoints(){return ue.getData()}}},59638:(e,t,i)=>{"use strict";i.d(t,{h:()=>n});const n=Symbol("MicrotaskDelay")},71268:(e,t,i)=>{"use strict";i.d(t,{cB:()=>c});var n=i(20601);class o{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new c(new a(e,t))}static forStrings(){return new c(new o)}static forConfigKeys(){return new c(new s)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new l,this._root.segment=i.value());const o=[];n=this._root;while(1){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new l,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new l,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const s=n.value;n.value=t,n.key=e;for(let r=o.length-1;r>=0;r--){const e=o[r][1];e.updateHeight();const t=e.balanceFactor();if(t<-1||t>1){const t=o[r][0],i=o[r+1][0];if(1===t&&1===i)o[r][1]=e.rotateLeft();else if(-1===t&&-1===i)o[r][1]=e.rotateRight();else if(1===t&&-1===i)e.right=o[r+1][1]=o[r+1][1].rotateRight(),o[r][1]=e.rotateLeft();else{if(-1!==t||1!==i)throw new Error;e.left=o[r+1][1]=o[r+1][1].rotateLeft(),o[r][1]=e.rotateRight()}if(r>0)switch(o[r-1][0]){case-1:o[r-1][1].left=o[r][1];break;case 1:o[r-1][1].right=o[r][1];break;case 0:o[r-1][1].mid=o[r][1];break}else this._root=o[0][1]}}return s}get(e){return this._getNode(e)?.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;while(i){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===t?.value&&void 0===t?.mid)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let o=this._root;while(o){const e=i.cmp(o.segment);if(e>0)n.push([-1,o]),o=o.left;else if(e<0)n.push([1,o]),o=o.right;else{if(!i.hasNext())break;i.next(),n.push([0,o]),o=o.mid}}if(o){if(t?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const e=this._min(o.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),o.key=t,o.value=i,o.segment=n}}else{const e=o.left??o.right;if(n.length>0){const[t,i]=n[n.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e;break}}else this._root=e}for(let e=n.length-1;e>=0;e--){const t=n[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),n[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),n[e][1]=t.rotateRight()),e>0)switch(n[e-1][0]){case-1:n[e-1][1].left=n[e][1];break;case 1:n[e-1][1].right=n[e][1];break;case 0:n[e-1][1].mid=n[e][1];break}else this._root=n[0][1]}}}_min(e){while(e.left)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;while(n){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;while(n){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}},23740:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n,o,s=i(25923);(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeColor=t})(n||(n={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(s.W.error);const[,o,r]=n,a=["codicon","codicon-"+o];return r&&a.push("codicon-modifier-"+r.substring(1)),a}function o(e){return i(e).join(" ")}function r(e){return"."+i(e).join(".")}function a(e){return e&&"object"===typeof e&&"string"===typeof e.id&&("undefined"===typeof e.color||n.isThemeColor(e.color))}e.asClassNameArray=i,e.asClassName=o,e.asCSSSelector=r,e.isThemeIcon=a;const l=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);function c(e){const t=l.exec(e);if(!t)return;const[,i]=t;return{id:i}}function d(e){return{id:e}}function u(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}}function h(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)}function g(e,t){return e.id===t.id&&e.color?.id===t.color?.id}e.fromString=c,e.fromId=d,e.modify=u,e.getModifier=h,e.isEqual=g}(o||(o={}))},50322:(e,t,i)=>{"use strict";function n(e){return"string"===typeof e}function o(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(e){const t=Object.getPrototypeOf(Uint8Array);return"object"===typeof e&&e instanceof t}function r(e){return"number"===typeof e&&!isNaN(e)}function a(e){return!!e&&"function"===typeof e[Symbol.iterator]}function l(e){return!0===e||!1===e}function c(e){return"undefined"===typeof e}function d(e){return!u(e)}function u(e){return c(e)||null===e}function h(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function g(e){if(u(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function p(e){return"function"===typeof e}function f(e,t){const i=Math.min(e.length,t.length);for(let n=0;nr,Gv:()=>o,Kg:()=>n,Lm:()=>l,O9:()=>d,Tn:()=>p,b0:()=>c,eU:()=>g,iu:()=>s,j:()=>h,jx:()=>f,xZ:()=>a,z:()=>u})},62647:(e,t,i)=>{"use strict";function n(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{W:()=>n,j:()=>o})},29133:(e,t,i)=>{"use strict";i.d(t,{I:()=>y,r:()=>p});var n=i(52444),o=i(25160);const s=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function c(e,t){return e||t?e:"file"}function d(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h;break}return t}const u="",h="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(e){return e instanceof p||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"string"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}constructor(e,t,i,n,o,s=!1){"object"===typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=c(e,s),this.authority=t||u,this.path=d(this.scheme,i||u),this.query=n||u,this.fragment=o||u,l(this,s))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===i?i=this.authority:null===i&&(i=u),void 0===n?n=this.path:null===n&&(n=u),void 0===o?o=this.query:null===o&&(o=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new m(t,i,n,o,s)}static parse(e,t=!1){const i=g.exec(e);return i?new m(i[2]||u,k(i[4]||u),k(i[5]||u),k(i[7]||u),k(i[9]||u),t):new m(u,u,u,u,u)}static file(e){let t=u;if(o.uF&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){const i=e.indexOf(h,2);-1===i?(t=e.substring(2),e=h):(t=e.substring(2,i),e=e.substring(i)||h)}return new m("file",t,e,u,u)}static from(e,t){const i=new m(e.scheme,e.authority,e.path,e.query,e.fragment,t);return i}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=o.uF&&"file"===e.scheme?p.file(n.IN.join(y(e,!0),...t)).path:n.SA.join(e.path,...t),e.with({path:i})}toString(e=!1){return w(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof p)return e;{const t=new m(e);return t._formatted=e.external??null,t._fsPath=e._sep===f?e.fsPath??null:null,t}}return e}}const f=o.uF?1:void 0;class m extends p{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const _={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function v(e,t,i){let n,o=-1;for(let s=0;s=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),void 0!==n&&(n+=e.charAt(s));else{void 0===n&&(n=e.substr(0,s));const t=_[r];void 0!==t?(-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),n+=t):-1===o&&(o=s)}}return-1!==o&&(n+=encodeURIComponent(e.substring(o))),void 0!==n?n:e}function b(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o.uF&&(i=i.replace(/\//g,"\\")),i}function w(e,t){const i=t?b:v;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=h,n+=h),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?n+=i(s,!1,!0):(n+=i(s.substr(0,e),!1,!0),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:v(l,!1,!1)),n}function C(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}const S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(S)?e.replace(S,(e=>C(e))):e}},23264:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});const n=function(){if("object"===typeof crypto&&"function"===typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"===typeof crypto&&"function"===typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t{"use strict";i.r(t),i.d(t,{SimpleWorkerClient:()=>y,SimpleWorkerServer:()=>S,create:()=>k,logOnceWebWorkerWarning:()=>g});var n=i(14396),o=i(40231),s=i(5091),r=i(6657),a=i(25160),l=i(20601);const c=!0,d="default",u="$initialize";let h=!1;function g(e){a.HZ&&(h||(h=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class p{constructor(e,t,i,n,o){this.vsWorker=e,this.req=t,this.channel=i,this.method=n,this.args=o,this.type=0}}class f{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class m{constructor(e,t,i,n,o){this.vsWorker=e,this.req=t,this.channel=i,this.eventName=n,this.arg=o,this.type=2}}class _{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class v{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class b{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,i){const n=String(++this._lastSentReq);return new Promise(((o,s)=>{this._pendingReplies[n]={resolve:o,reject:s},this._send(new p(this._workerId,n,e,t,i))}))}listen(e,t,i){let n=null;const s=new o.vl({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,s),this._send(new m(this._workerId,n,e,t,i))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new v(this._workerId,n)),n=null}});return s.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const i={get:(i,n)=>("string"!==typeof n||i[n]||(C(n)?i[n]=t=>this.listen(e,n,t):w(n)?i[n]=this.listen(e,n,void 0):36===n.charCodeAt(0)&&(i[n]=async(...i)=>(await(t?.()),this.sendMessage(e,n,i)))),i[n])};return new Proxy(Object.create(null),i)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req,i=this._handler.handleMessage(e.channel,e.method,e.args);i.then((e=>{this._send(new f(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,n.cU)(e.detail)),this._send(new f(this._workerId,t,void 0,(0,n.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new _(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{(0,n.dz)(e)}))),this._protocol=new b({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,i)=>this._handleMessage(e,t,i),handleEvent:(e,t,i)=>this._handleEvent(e,t,i)}),this._protocol.setWorkerId(this._worker.getId());let i=null;const o=globalThis.require;"undefined"!==typeof o&&"function"===typeof o.getConfig?i=o.getConfig():"undefined"!==typeof globalThis.requirejs&&(i=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(d,u,[this._worker.getId(),JSON.parse(JSON.stringify(i)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(d,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,i){const n=this._localChannels.get(e);if(!n)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!==typeof n[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(n[t].apply(n,i))}catch(o){return Promise.reject(o)}}_handleEvent(e,t,i){const n=this._localChannels.get(e);if(!n)throw new Error(`Missing channel ${e} on main thread`);if(C(t)){const o=n[t].call(n,i);if("function"!==typeof o)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return o}if(w(t)){const i=n[t];if("function"!==typeof i)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return i}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function w(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function C(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class S{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new b({sendMessage:(t,i)=>{e(t,i)},handleMessage:(e,t,i)=>this._handleMessage(e,t,i),handleEvent:(e,t,i)=>this._handleEvent(e,t,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,i){if(e===d&&t===u)return this.initialize(i[0],i[1],i[2]);const n=e===d?this._requestHandler:this._localChannels.get(e);if(!n)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!==typeof n[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(n[t].apply(n,i))}catch(o){return Promise.reject(o)}}_handleEvent(e,t,i){const n=e===d?this._requestHandler:this._localChannels.get(e);if(!n)throw new Error(`Missing channel ${e} on worker thread`);if(C(t)){const e=n[t].call(n,i);if("function"!==typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(w(t)){const e=n[t];if("function"!==typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,n){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){if(t&&("undefined"!==typeof t.baseUrl&&delete t["baseUrl"],"undefined"!==typeof t.paths&&"undefined"!==typeof t.paths.vs&&delete t.paths["vs"],"undefined"!==typeof t.trustedTypesPolicy&&delete t["trustedTypesPolicy"],t.catchError=!0,globalThis.require.config(t)),c){const e=r.zl.asBrowserUri(`${n}.js`).toString(!0);return i(5890)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}return new Promise(((e,t)=>{const i=globalThis.require;i([n],(i=>{this._requestHandler=i.create(this),this._requestHandler?e():t(new Error("No RequestHandler!"))}),t)}))}this._requestHandler=this._requestHandlerFactory(this)}}function k(e){return new S(e,null)}},34417:(e,t,i)=>{"use strict";i.d(t,{K:()=>p});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; +const{entries:n,setPrototypeOf:o,isFrozen:s,getPrototypeOf:r,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:d}=Object,{apply:u,construct:h}="undefined"!==typeof Reflect&&Reflect;u||(u=function(e,t,i){return e.apply(t,i)}),l||(l=function(e){return e}),c||(c=function(e){return e}),h||(h=function(e,t){return new e(...t)});const g=k(Array.prototype.forEach),p=k(Array.prototype.pop),f=k(Array.prototype.push),m=k(String.prototype.toLowerCase),_=k(String.prototype.toString),v=k(String.prototype.match),b=k(String.prototype.replace),y=k(String.prototype.indexOf),w=k(String.prototype.trim),C=k(RegExp.prototype.test),S=x(TypeError);function k(e){return function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o/gm),j=c(/\${[\w\W]*}/gm),z=c(/^data-[\-\w.\u00B7-\uFFFF]/),U=c(/^aria-[\-\w]+$/),$=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=c(/^(?:\w+script|data):/i),K=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=c(/^html$/i);var Q=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:V,TMPLIT_EXPR:j,DATA_ATTR:z,ARIA_ATTR:U,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:K,DOCTYPE_NAME:G});const Y=()=>"undefined"===typeof window?null:window,Z=function(e,t){if("object"!==typeof e||"function"!==typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function X(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const t=e=>X(e);if(t.version="3.0.5",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;const i=e.document,o=i.currentScript;let{document:s}=e;const{DocumentFragment:r,HTMLTemplateElement:a,Node:c,Element:d,NodeFilter:u,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:k,DOMParser:x,trustedTypes:H}=e,V=d.prototype,j=T(V,"cloneNode"),z=T(V,"nextSibling"),U=T(V,"childNodes"),q=T(V,"parentNode");if("function"===typeof a){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let K,J="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ie,getElementsByTagName:ne}=s,{importNode:oe}=i;let se={};t.isSupported="function"===typeof n&&"function"===typeof q&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:re,ERB_EXPR:ae,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:he}=Q;let{IS_ALLOWED_URI:ge}=Q,pe=null;const fe=E({},[...I,...D,...R,...A,...P]);let me=null;const _e=E({},[...M,...F,...B,...W]);let ve=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,ye=null,we=!0,Ce=!0,Se=!1,ke=!0,xe=!1,Ee=!1,Le=!1,Te=!1,Ie=!1,De=!1,Re=!1,Ne=!0,Ae=!1;const Oe="user-content-";let Pe=!0,Me=!1,Fe={},Be=null;const We=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let He=null;const Ve=E({},["audio","video","img","source","image","track"]);let je=null;const ze=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ue="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Ke=qe,Ge=!1,Qe=null;const Ye=E({},[Ue,$e,qe],_);let Ze;const Xe=["application/xhtml+xml","text/html"],Je="text/html";let et,tt=null;const it=s.createElement("form"),nt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(e){if(!tt||tt!==e){if(e&&"object"===typeof e||(e={}),e=L(e),Ze=Ze=-1===Xe.indexOf(e.PARSER_MEDIA_TYPE)?Je:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?_:m,pe="ALLOWED_TAGS"in e?E({},e.ALLOWED_TAGS,et):fe,me="ALLOWED_ATTR"in e?E({},e.ALLOWED_ATTR,et):_e,Qe="ALLOWED_NAMESPACES"in e?E({},e.ALLOWED_NAMESPACES,_):Ye,je="ADD_URI_SAFE_ATTR"in e?E(L(ze),e.ADD_URI_SAFE_ATTR,et):ze,He="ADD_DATA_URI_TAGS"in e?E(L(Ve),e.ADD_DATA_URI_TAGS,et):Ve,Be="FORBID_CONTENTS"in e?E({},e.FORBID_CONTENTS,et):We,be="FORBID_TAGS"in e?E({},e.FORBID_TAGS,et):{},ye="FORBID_ATTR"in e?E({},e.FORBID_ATTR,et):{},Fe="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Ee=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Re=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,Ne=!1!==e.SANITIZE_DOM,Ae=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,Me=e.IN_PLACE||!1,ge=e.ALLOWED_URI_REGEXP||$,Ke=e.NAMESPACE||qe,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&nt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&nt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(Ce=!1),De&&(Ie=!0),Fe&&(pe=E({},[...P]),me=[],!0===Fe.html&&(E(pe,I),E(me,M)),!0===Fe.svg&&(E(pe,D),E(me,F),E(me,W)),!0===Fe.svgFilters&&(E(pe,R),E(me,F),E(me,W)),!0===Fe.mathMl&&(E(pe,A),E(me,B),E(me,W))),e.ADD_TAGS&&(pe===fe&&(pe=L(pe)),E(pe,e.ADD_TAGS,et)),e.ADD_ATTR&&(me===_e&&(me=L(me)),E(me,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&E(je,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Be===We&&(Be=L(Be)),E(Be,e.FORBID_CONTENTS,et)),Pe&&(pe["#text"]=!0),Ee&&E(pe,["html","head","body"]),pe.table&&(E(pe,["tbody"]),delete be.tbody),e.TRUSTED_TYPES_POLICY){if("function"!==typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');K=e.TRUSTED_TYPES_POLICY,J=K.createHTML("")}else void 0===K&&(K=Z(H,o)),null!==K&&"string"===typeof J&&(J=K.createHTML(""));l&&l(e),tt=e}},st=E({},["mi","mo","mn","ms","mtext"]),rt=E({},["foreignobject","desc","title","annotation-xml"]),at=E({},["title","style","font","a","script"]),lt=E({},D);E(lt,R),E(lt,N);const ct=E({},A);E(ct,O);const dt=function(e){let t=q(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});const i=m(e.tagName),n=m(t.tagName);return!!Qe[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===qe?"svg"===i:t.namespaceURI===Ue?"svg"===i&&("annotation-xml"===n||st[n]):Boolean(lt[i]):e.namespaceURI===Ue?t.namespaceURI===qe?"math"===i:t.namespaceURI===$e?"math"===i&&rt[n]:Boolean(ct[i]):e.namespaceURI===qe?!(t.namespaceURI===$e&&!rt[n])&&(!(t.namespaceURI===Ue&&!st[n])&&(!ct[i]&&(at[i]||!lt[i]))):!("application/xhtml+xml"!==Ze||!Qe[e.namespaceURI]))},ut=function(e){f(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ht=function(e,i){try{f(t.removed,{attribute:i.getAttributeNode(e),from:i})}catch(e){f(t.removed,{attribute:null,from:i})}if(i.removeAttribute(e),"is"===e&&!me[e])if(Ie||De)try{ut(i)}catch(e){}else try{i.setAttribute(e,"")}catch(e){}},gt=function(e){let t,i;if(Te)e=""+e;else{const t=v(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===Ze&&Ke===qe&&(e=''+e+"");const n=K?K.createHTML(e):e;if(Ke===qe)try{t=(new x).parseFromString(n,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Ge?J:n}catch(e){}}const o=t.body||t.documentElement;return e&&i&&o.insertBefore(s.createTextNode(i),o.childNodes[0]||null),Ke===qe?ne.call(t,Ee?"html":"body")[0]:Ee?t.documentElement:o},pt=function(e){return te.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},ft=function(e){return e instanceof k&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof h)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore||"function"!==typeof e.hasChildNodes)},mt=function(e){return"object"===typeof c?e instanceof c:e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName},_t=function(e,i,n){se[e]&&g(se[e],(e=>{e.call(t,i,n,tt)}))},vt=function(e){let i;if(_t("beforeSanitizeElements",e,null),ft(e))return ut(e),!0;const n=et(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:n,allowedTags:pe}),e.hasChildNodes()&&!mt(e.firstElementChild)&&(!mt(e.content)||!mt(e.content.firstElementChild))&&C(/<[/\w]/g,e.innerHTML)&&C(/<[/\w]/g,e.textContent))return ut(e),!0;if(!pe[n]||be[n]){if(!be[n]&&yt(n)){if(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,n))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))return!1}if(Pe&&!Be[n]){const t=q(e)||e.parentNode,i=U(e)||e.childNodes;if(i&&t){const n=i.length;for(let o=n-1;o>=0;--o)t.insertBefore(j(i[o],!0),z(e))}}return ut(e),!0}return e instanceof d&&!dt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!C(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(i=e.textContent,i=b(i,re," "),i=b(i,ae," "),i=b(i,le," "),e.textContent!==i&&(f(t.removed,{element:e.cloneNode()}),e.textContent=i)),_t("afterSanitizeElements",e,null),!1):(ut(e),!0)},bt=function(e,t,i){if(Ne&&("id"===t||"name"===t)&&(i in s||i in it))return!1;if(Ce&&!ye[t]&&C(ce,t));else if(we&&C(de,t));else if(!me[t]||ye[t]){if(!(yt(e)&&(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&C(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&C(ve.tagNameCheck,i)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(i))))return!1}else if(je[t]);else if(C(ge,b(i,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(i,"data:")||!He[e]){if(Se&&!C(ue,b(i,he,"")));else if(i)return!1}else;return!0},yt=function(e){return e.indexOf("-")>0},wt=function(e){let i,n,o,s;_t("beforeSanitizeAttributes",e,null);const{attributes:r}=e;if(!r)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};s=r.length;while(s--){i=r[s];const{name:l,namespaceURI:c}=i;if(n="value"===l?i.value:w(i.value),o=et(l),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,_t("uponSanitizeAttribute",e,a),n=a.attrValue,a.forceKeepAttr)continue;if(ht(l,e),!a.keepAttr)continue;if(!ke&&C(/\/>/i,n)){ht(l,e);continue}xe&&(n=b(n,re," "),n=b(n,ae," "),n=b(n,le," "));const d=et(e.nodeName);if(bt(d,o,n)){if(!Ae||"id"!==o&&"name"!==o||(ht(l,e),n=Oe+n),K&&"object"===typeof H&&"function"===typeof H.getAttributeType)if(c);else switch(H.getAttributeType(d,o)){case"TrustedHTML":n=K.createHTML(n);break;case"TrustedScriptURL":n=K.createScriptURL(n);break}try{c?e.setAttributeNS(c,l,n):e.setAttribute(l,n),p(t.removed)}catch(e){}}}_t("afterSanitizeAttributes",e,null)},Ct=function e(t){let i;const n=pt(t);_t("beforeSanitizeShadowDOM",t,null);while(i=n.nextNode())_t("uponSanitizeShadowNode",i,null),vt(i)||(i.content instanceof r&&e(i.content),wt(i));_t("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(e){let n,o,s,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ge=!e,Ge&&(e="\x3c!--\x3e"),"string"!==typeof e&&!mt(e)){if("function"!==typeof e.toString)throw S("toString is not a function");if(e=e.toString(),"string"!==typeof e)throw S("dirty is not a string, aborting")}if(!t.isSupported)return e;if(Le||ot(l),t.removed=[],"string"===typeof e&&(Me=!1),Me){if(e.nodeName){const t=et(e.nodeName);if(!pe[t]||be[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)n=gt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ie&&!xe&&!Ee&&-1===e.indexOf("<"))return K&&Re?K.createHTML(e):e;if(n=gt(e),!n)return Ie?null:Re?J:""}n&&Te&&ut(n.firstChild);const d=pt(Me?e:n);while(s=d.nextNode())vt(s)||(s.content instanceof r&&Ct(s.content),wt(s));if(Me)return e;if(Ie){if(De){a=ie.call(n.ownerDocument);while(n.firstChild)a.appendChild(n.firstChild)}else a=n;return(me.shadowroot||me.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let u=Ee?n.outerHTML:n.innerHTML;return Ee&&pe["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&C(G,n.ownerDocument.doctype.name)&&(u="\n"+u),xe&&(u=b(u,re," "),u=b(u,ae," "),u=b(u,le," ")),K&&Re?K.createHTML(u):u},t.setConfig=function(e){ot(e),Le=!0},t.clearConfig=function(){tt=null,Le=!1},t.isValidAttribute=function(e,t,i){tt||ot({});const n=et(e),o=et(t);return bt(n,o,i)},t.addHook=function(e,t){"function"===typeof t&&(se[e]=se[e]||[],f(se[e],t))},t.removeHook=function(e){if(se[e])return p(se[e])},t.removeHooks=function(e){se[e]&&(se[e]=[])},t.removeAllHooks=function(){se={}},t}var J=X();J.version,J.isSupported;const ee=J.sanitize,te=(J.setConfig,J.clearConfig,J.isValidAttribute,J.addHook),ie=J.removeHook;J.removeHooks,J.removeAllHooks},49822:(e,t,i)=>{"use strict";i.d(t,{f:()=>o});var n=i(40231);class o{get event(){return this.emitter.event}constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.vl({onWillAddFirstListener:()=>e.addEventListener(t,o,i),onDidRemoveLastListener:()=>e.removeEventListener(t,o,i)})}dispose(){this.emitter.dispose()}}},76892:(e,t,i)=>{"use strict";i.d(t,{D:()=>n,Z:()=>s});class n{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=o(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=o(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=o(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=o(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=o(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=o(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=o(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=o(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=o(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=o(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=o(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return"number"===typeof e?`${e}px`:e}function s(e){return new n(e)}},40628:(e,t,i)=>{"use strict";i.d(t,{z:()=>o});var n=i(25160);const o=n.uF?'"Segoe WPC", "Segoe UI", sans-serif':n.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'},60934:(e,t,i)=>{"use strict";i.d(t,{S5:()=>o,n:()=>r,yk:()=>s});var n=i(2150);function o(e,t={}){const i=r(t);return i.textContent=e,i}function s(e,t={}){const i=r(t);return l(i,c(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,o){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&o)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.b2(e,"click",(e=>{i.callback(String(t.index),e)}))),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach((e=>{l(s,e,i,o)}))}function c(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new a(e);while(!r.eos()){let e=r.next();const i="\\"===e&&0!==u(r.peek(),t);if(i&&(e=r.next()),!i&&d(e,t)&&e===r.peek()){r.advance(),2===o.type&&(o=s.pop());const i=u(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}else if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e}return 2===o.type&&(o=s.pop()),s.length,i}function d(e,t){return 0!==u(e,t)}function u(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},80125:(e,t,i)=>{"use strict";i.d(t,{_:()=>s});var n=i(2150),o=i(5091);class s{constructor(){this._hooks=new o.Cm,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,s,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,o.s)((()=>{try{e.releasePointerCapture(t)}catch(e){}})))}catch(t){a=n.zk(e)}this._hooks.add(n.ko(a,n.Bx.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(n.ko(a,n.Bx.POINTER_UP,(e=>this.stopMonitoring(!0))))}}},68389:(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});var n=i(88758),o=i(91348),s=i(48770),r=i(25160);function a(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return o.YM.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.gm)switch(t){case 59:return 85;case 60:if(r.j9)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(r.zx)return 57;break}else if(n.Tc){if(r.zx&&93===t)return 57;if(!r.zx&&92===t)return 57}return o.uw[t]||0}const l=r.zx?256:2048,c=512,d=1024,u=r.zx?2048:256;class h{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=a(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=l),this.altKey&&(t|=c),this.shiftKey&&(t|=d),this.metaKey&&(t|=u),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new s.dG(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},44964:(e,t,i)=>{"use strict";i.d(t,{Gc:()=>D,R9:()=>F});var n=i(2150),o=i(86501),s=i(49822),r=i(60934),a=i(68389),l=i(46274),c=i(84653),d=i(14396),u=i(40231),h=i(42325),g=i(74529),p=i(23453),f=i(85661),m=i(5091);let _={};(function(){function e(e,t){t(_)}e.amd=!0,function(t,i){"function"===typeof e&&e.amd?e(["exports"],i):"object"===typeof exports?i(exports):(t="undefined"!==typeof globalThis?globalThis:t||self,i(t.marked={}))}(this,(function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(t){e.defaults=t}e.defaults=t();const n=/[&<>"']/,o=new RegExp(n.source,"g"),s=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,r=new RegExp(s.source,"g"),a={"&":"&","<":"<",">":">",'"':""","'":"'"},l=e=>a[e];function c(e,t){if(t){if(n.test(e))return e.replace(o,l)}else if(s.test(e))return e.replace(r,l);return e}const d=/(^|[^\[])\^/g;function u(e,t){let i="string"===typeof e?e:e.source;t=t||"";const n={replace:(e,t)=>{let o="string"===typeof t?t:t.source;return o=o.replace(d,"$1"),i=i.replace(e,o),n},getRegex:()=>new RegExp(i,t)};return n}function h(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const g={exec:()=>null};function p(e,t){const i=e.replace(/\|/g,((e,t,i)=>{let n=!1,o=t;while(--o>=0&&"\\"===i[o])n=!n;return n?"|":" |"})),n=i.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else while(n.length{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=n.length?e.slice(n.length):e})).join("\n")}class b{options;rules;lexer;constructor(t){this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:f(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=v(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=f(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:f(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=f(t[0],"\n").split("\n"),i="",n="";const o=[];while(e.length>0){let t=!1;const s=[];let r;for(r=0;r/.test(e[r]))s.push(e[r]),t=!0;else{if(t)break;s.push(e[r])}e=e.slice(r);const a=s.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}\n${a}`:a,n=n?`${n}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;const d=o[o.length-1];if("code"===d?.type)break;if("blockquote"===d?.type){const t=d,s=t.raw+"\n"+e.join("\n"),r=this.blockquote(s);o[o.length-1]=r,i=i.substring(0,i.length-t.raw.length)+r.raw,n=n.substring(0,n.length-t.text.length)+r.text;break}if("list"!==d?.type);else{const t=d,s=t.raw+"\n"+e.join("\n"),r=this.list(s);o[o.length-1]=r,i=i.substring(0,i.length-d.raw.length)+r.raw,n=n.substring(0,n.length-t.raw.length)+r.raw,e=s.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,o={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const s=new RegExp(`^( {0,3}${i})((?:[\t ][^\\n]*)?(?:\\n|$))`);let r=!1;while(e){let i=!1,n="",a="";if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],d=!l.trim(),u=0;if(this.options.pedantic?(u=2,a=l.trimStart()):d?u=t[1].length+1:(u=t[2].search(/[^ ]/),u=u>4?1:u,a=l.slice(u),u+=t[1].length),d&&/^ *$/.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),i=!0),!i){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);while(e){const r=e.split("\n",1)[0];if(c=r,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),o.test(c))break;if(s.test(c))break;if(t.test(c))break;if(i.test(e))break;if(c.search(/[^ ]/)>=u||!c.trim())a+="\n"+c.slice(u);else{if(d)break;if(l.search(/[^ ]/)>=4)break;if(o.test(l))break;if(s.test(l))break;if(i.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),n+=r+"\n",e=e.substring(r.length+1),l=c.slice(u)}}o.loose||(r?o.loose=!0:/\n *\n *$/.test(n)&&(r=!0));let h,g=null;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(h="[ ] "!==g[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:n,task:!!g,checked:h,loose:!1,text:a,tokens:[]}),o.raw+=n}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),i=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=i}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const i=p(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const e of n)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:s.align[t]}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:c(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=f(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=m(t[2],"()");if(e>-1){const i=0===t[0].indexOf("!")?5:4,n=i+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^$/.test(e)?i.slice(1):i.slice(1,-1)),_(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=(i[2]||i[1]).replace(/\s+/g," "),n=t[e.toLowerCase()];if(!n){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return _(i,n,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n)return;if(n[3]&&i.match(/[\p{L}\p{N}]/u))return;const o=n[1]||n[2]||"";if(!o||!i||this.rules.inline.punctuation.exec(i)){const i=[...n[0]].length-1;let o,s,r=i,a=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;l.lastIndex=0,t=t.slice(-1*e.length+i);while(null!=(n=l.exec(t))){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){r+=s;continue}if((n[5]||n[6])&&i%3&&!((i+s)%3)){a+=s;continue}if(r-=s,r>0)continue;s=Math.min(s,s+r+a);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+s);if(Math.min(i,s)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=c(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=c(t[1]),i="mailto:"+e):(e=c(t[1]),i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,i;if("@"===t[2])e=c(t[0]),i="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(n!==t[0]);e=c(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:c(t[0]),{type:"text",raw:t[0],text:e}}}}const y=/^(?: *(?:\n|$))+/,w=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,C=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,S=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,k=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,x=/(?:[*+-]|\d{1,9}[.)])/,E=u(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,x).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),L=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,T=/^[^\n]+/,I=/(?!\s*\])(?:\\.|[^\[\]\\])+/,D=u(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",I).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),R=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,x).getRegex(),N="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",A=/|$))/,O=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",A).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),P=u(L).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),M=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",P).getRegex(),F={blockquote:M,code:w,def:D,fences:C,heading:k,hr:S,html:O,lheading:E,list:R,newline:y,paragraph:P,table:g,text:T},B=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),W={...F,table:B,paragraph:u(L).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",B).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex()},H={...F,html:u("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",A).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(L).replace("hr",S).replace("heading"," *#{1,6} *[^\n]").replace("lheading",E).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},V=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,j=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,z=/^( {2,}|\\)\n(?!\s*$)/,U=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,G=u(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,$).getRegex(),Q=u("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,$).getRegex(),Y=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,$).getRegex(),Z=u(/\\([punct])/,"gu").replace(/punct/g,$).getRegex(),X=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),J=u(A).replace("(?:--\x3e|$)","--\x3e").getRegex(),ee=u("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",J).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ie=u(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ne=u(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",I).getRegex(),oe=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",I).getRegex(),se=u("reflink|nolink(?!\\()","g").replace("reflink",ne).replace("nolink",oe).getRegex(),re={_backpedal:g,anyPunctuation:Z,autolink:X,blockSkip:K,br:z,code:j,del:g,emStrongLDelim:G,emStrongRDelimAst:Q,emStrongRDelimUnd:Y,escape:V,link:ie,nolink:oe,punctuation:q,reflink:ne,reflinkSearch:se,tag:ee,text:U,url:g},ae={...re,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},le={...re,escape:u(V).replace("])","~|])").getRegex(),url:u(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(i.length)));while(e)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?t.push(n):(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(o.raw+="\n"+n.raw,o.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},i),"number"===typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))o=t[t.length-1],i&&"paragraph"===o?.type?(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n),i=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),o=t[t.length-1],o&&"text"===o.type?(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,o,s,r,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)while(null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(l)))e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(s=this.tokenizer.rules.inline.blockSkip.exec(l)))l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(l)))l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);while(e)if(r||(a=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,l,a))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},i),"number"===typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(o))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),r=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}class ge{options;parser;constructor(t){this.options=t||e.defaults}space(e){return""}code({text:e,lang:t,escaped:i}){const n=(t||"").match(/^\S*/)?.[0],o=e.replace(/\n$/,"")+"\n";return n?'
    '+(i?o:c(o,!0))+"
    \n":"
    "+(i?o:c(o,!0))+"
    \n"}blockquote({tokens:e}){const t=this.parser.parse(e);return`
    \n${t}
    \n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,i=e.start;let n="";for(let t=0;t\n"+n+"\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",i="";for(let t=0;t${n}`),"\n\n"+t+"\n"+n+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td",n=e.align?`<${i} align="${e.align}">`:`<${i}>`;return n+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:i}){const n=this.parser.parseInline(i),o=h(e);if(null===o)return n;e=o;let s='
    ",s}image({href:e,title:t,text:i}){const n=h(e);if(null===n)return i;e=n;let o=`${i}{const o=e[n].flat(1/0);i=i.concat(this.walkTokens(o,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const i={...e};if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const i=t.renderers[e.name];t.renderers[e.name]=i?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=i.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const i=t[e.level];i?i.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),i.extensions=t),e.renderer){const t=this.defaults.renderer||new ge(this.defaults);for(const i in e.renderer){if(!(i in t))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const n=i,o=e.renderer[n],s=t[n];t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i||""}}i.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new b(this.defaults);for(const i in e.tokenizer){if(!(i in t))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const n=i,o=e.tokenizer[n],s=t[n];t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i}}i.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new me;for(const i in e.hooks){if(!(i in t))throw new Error(`hook '${i}' does not exist`);if("options"===i)continue;const n=i,o=e.hooks[n],s=t[n];me.passThroughHooks.has(i)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const i=o.call(t,e);return s.call(t,i)}:t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i}}i.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;i.walkTokens=function(e){let i=[];return i.push(n.call(this,e)),t&&(i=i.concat(t.call(this,e))),i}}this.defaults={...this.defaults,...i}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return he.lex(e,t??this.defaults)}parser(e,t){return fe.parse(e,t??this.defaults)}parseMarkdown(e,t){const i=(i,n)=>{const o={...n},s={...this.defaults,...o},r=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===o.async)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof i||null===i)return r(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof i)return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(i):i).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(r);try{s.hooks&&(i=s.hooks.preprocess(i));let n=e(i,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let o=t(n,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return r(e)}};return i}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+c(i.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const ve=new _e;function be(e,t){return ve.parse(e,t)}be.options=be.setOptions=function(e){return ve.setOptions(e),be.defaults=ve.defaults,i(be.defaults),be},be.getDefaults=t,be.defaults=e.defaults,be.use=function(...e){return ve.use(...e),be.defaults=ve.defaults,i(be.defaults),be},be.walkTokens=function(e,t){return ve.walkTokens(e,t)},be.parseInline=ve.parseInline,be.Parser=fe,be.parser=fe.parse,be.Renderer=ge,be.TextRenderer=pe,be.Lexer=he,be.lexer=he.lex,be.Tokenizer=b,be.Hooks=me,be.parse=be;const ye=be.options,we=be.setOptions,Ce=be.use,Se=be.walkTokens,ke=be.parseInline,xe=be,Ee=fe.parse,Le=he.lex;e.Hooks=me,e.Lexer=he,e.Marked=_e,e.Parser=fe,e.Renderer=ge,e.TextRenderer=pe,e.Tokenizer=b,e.getDefaults=t,e.lexer=Le,e.marked=be,e.options=ye,e.parse=xe,e.parseInline=ke,e.parser=Ee,e.setOptions=we,e.use=Ce,e.walkTokens=Se}))})();_.Hooks||exports.Hooks,_.Lexer||exports.Lexer,_.Marked||exports.Marked,_.Parser||exports.Parser;var v=_.Renderer||exports.Renderer,b=(_.TextRenderer||exports.TextRenderer,_.Tokenizer||exports.Tokenizer,_.defaults||exports.defaults),y=(_.getDefaults||exports.getDefaults,_.lexer||exports.lexer),w=(_.marked||exports.marked,_.options||exports.options,_.parse||exports.parse),C=(_.parseInline||exports.parseInline,_.parser||exports.parser),S=(_.setOptions||exports.setOptions,_.use||exports.use,_.walkTokens||exports.walkTokens,i(61565)),k=i(6657),x=i(85603),E=i(84366),L=i(20601),T=i(29133);const I=Object.freeze({image:({href:e,title:t,text:i})=>{let n=[],o=[];return e&&(({href:e,dimensions:n}=(0,h.nI)(e)),o.push(`src="${(0,h.oO)(e)}"`)),i&&o.push(`alt="${(0,h.oO)(i)}"`),t&&o.push(`title="${(0,h.oO)(t)}"`),n.length&&(o=o.concat(n)),""},paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `},link({href:e,title:t,tokens:i}){let n=this.parser.parseInline(i);return"string"!==typeof e?"":(e===n&&(n=(0,h._W)(n)),t="string"===typeof t?(0,h.oO)((0,h._W)(t)):"",e=(0,h._W)(e),e=e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${n}`)}});function D(e,t={},i={}){const o=new m.Cm;let h=!1;const f=(0,r.n)(t),_=function(t){let i;try{i=(0,S.qg)(decodeURIComponent(t))}catch(e){}return i?(i=(0,x.PI)(i,(t=>e.uris&&e.uris[t]?T.r.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},E=function(t,i){const n=e.uris&&e.uris[t];let o=T.r.revive(n);return i?t.startsWith(k.ny.data+":")?t:(o||(o=T.r.parse(t)),k.zl.uriToBrowserUri(o).toString(!0)):o?T.r.parse(t).toString()===o.toString()?t:(o.query&&(o=o.with({query:_(o.query)})),o.toString()):t},D=new v;D.image=I.image,D.link=I.link,D.paragraph=I.paragraph;const A=[],P=[];if(t.codeBlockRendererSync?D.code=({text:e,lang:i})=>{const n=p.r.nextId(),o=t.codeBlockRendererSync(R(i),e);return P.push([n,o]),`
    ${(0,L.ih)(e)}
    `}:t.codeBlockRenderer&&(D.code=({text:e,lang:i})=>{const n=p.r.nextId(),o=t.codeBlockRenderer(R(i),e);return A.push(o.then((e=>[n,e]))),`
    ${(0,L.ih)(e)}
    `}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let o=n.dataset["href"];o&&(e.baseUri&&(o=N(T.r.from(e.baseUri),o)),t.actionHandler.callback(o,i))}catch(e){(0,d.dz)(e)}finally{i.preventDefault()}},o=t.actionHandler.disposables.add(new s.f(f,"click")),r=t.actionHandler.disposables.add(new s.f(f,"auxclick"));t.actionHandler.disposables.add(u.Jh.any(o.event,r.event)((e=>{const t=new l.P(n.zk(f),e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(n.ko(f,"keydown",(e=>{const t=new a.Z(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(D.html=({text:i})=>{if(t.sanitizerOptions?.replaceWithPlaintext)return(0,L.ih)(i);const n=e.isTrusted?i.match(/^(]+>)|(<\/\s*span>)$/):void 0;return n?i:""}),i.renderer=D;let M,F=e.value??"";if(F.length>1e5&&(F=`${F.substr(0,1e5)}…`),e.supportThemeIcons&&(F=(0,g.sA)(F)),t.fillInIncompleteTokens){const e={...b,...i},t=y(F,e),n=Q(t);M=C(n,e)}else M=w(F,{...i,async:!1});if(e.supportThemeIcons){const e=(0,c.n)(M);M=e.map((e=>"string"===typeof e?e:e.outerHTML)).join("")}const B=new DOMParser,W=B.parseFromString(O({isTrusted:e.isTrusted,...t.sanitizerOptions},M),"text/html");if(W.body.querySelectorAll("img, audio, video, source").forEach((i=>{const o=i.getAttribute("src");if(o){let s=o;try{e.baseUri&&(s=N(T.r.from(e.baseUri),s))}catch(e){}if(i.setAttribute("src",E(s,!0)),t.remoteImageIsAllowed){const e=T.r.parse(s);e.scheme===k.ny.file||e.scheme===k.ny.data||t.remoteImageIsAllowed(e)||i.replaceWith(n.$("",void 0,i.outerHTML))}}})),W.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=E(i,!1);e.baseUri&&(n=N(T.r.from(e.baseUri),i)),t.dataset.href=n}})),f.innerHTML=O({isTrusted:e.isTrusted,...t.sanitizerOptions},W.body.innerHTML),A.length>0)Promise.all(A).then((e=>{if(h)return;const i=new Map(e),o=f.querySelectorAll("div[data-code]");for(const e of o){const t=i.get(e.dataset["code"]??"");t&&n.Ln(e,t)}t.asyncRenderCallback?.()}));else if(P.length>0){const e=new Map(P),t=f.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(i.dataset["code"]??"");t&&n.Ln(i,t)}}if(t.asyncRenderCallback)for(const e of f.getElementsByTagName("img")){const i=o.add(n.ko(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()})))}return{element:f,dispose:()=>{h=!0,o.dispose()}}}function R(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function N(e,t){const i=/^\w[\w\d+.-]*:/.test(t);return i?t:e.path.endsWith("/")?(0,E.o1)(e,t).toString():(0,E.o1)((0,E.pD)(e),t).toString()}const A=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function O(e,t){const{config:i,allowedSchemes:s}=M(e),r=new m.Cm;r.add(ae("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName){if("INPUT"===e.tagName&&"checkbox"===e.attributes.getNamedItem("type")?.value){if("type"===t.attrName&&"checkbox"===t.attrValue||"disabled"===t.attrName||"checked"===t.attrName)return void(t.keepAttr=!0);t.keepAttr=!1}}else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}))),r.add(ae("uponSanitizeElement",((t,i)=>{if("input"===i.tagName&&("checkbox"===t.attributes.getNamedItem("type")?.value?t.setAttribute("disabled",""):e.replaceWithPlaintext||t.remove()),e.replaceWithPlaintext&&!i.allowedTags[i.tagName]&&"body"!==i.tagName&&t.parentElement){let e,n;if("#comment"===i.tagName)e=`\x3c!--${t.textContent}--\x3e`;else{const o=A.includes(i.tagName),s=t.attributes.length?" "+Array.from(t.attributes).map((e=>`${e.name}="${e.value}"`)).join(" "):"";e=`<${i.tagName}${s}>`,o||(n=``)}const o=document.createDocumentFragment(),s=t.parentElement.ownerDocument.createTextNode(e);o.appendChild(s);const r=n?t.parentElement.ownerDocument.createTextNode(n):void 0;while(t.firstChild)o.appendChild(t.firstChild);r&&o.appendChild(r),t.parentElement.replaceChild(o,t)}}))),r.add(n.a4(s));try{return o.aj(t,{...i,RETURN_TRUSTED_TYPE:!0})}finally{r.dispose()}}const P=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];function M(e){const t=[k.ny.http,k.ny.https,k.ny.mailto,k.ny.data,k.ny.file,k.ny.vscodeFileResource,k.ny.vscodeRemote,k.ny.vscodeRemoteResource];return e.isTrusted&&t.push(k.ny.command),{config:{ALLOWED_TAGS:e.allowedTags??[...n.TT],ALLOWED_ATTR:P,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}function F(e){return"string"===typeof e?e:B(e)}function B(e,t){let i=e.value??"";i.length>1e5&&(i=`${i.substr(0,1e5)}…`);const n=w(i,{async:!1,renderer:t?j.value:V.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>W.get(e)??e));return O({isTrusted:!1},n).toString()}const W=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function H(){const e=new v;return e.code=({text:e})=>e,e.blockquote=({text:e})=>e+"\n",e.html=e=>"",e.heading=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.hr=()=>"",e.list=function({items:e}){return e.map((e=>this.listitem(e))).join("\n")+"\n"},e.listitem=({text:e})=>e+"\n",e.paragraph=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.table=function({header:e,rows:t}){return e.map((e=>this.tablecell(e))).join(" ")+"\n"+t.map((e=>e.map((e=>this.tablecell(e))).join(" "))).join("\n")+"\n"},e.tablerow=({text:e})=>e,e.tablecell=function({tokens:e}){return this.parser.parseInline(e)},e.strong=({text:e})=>e,e.em=({text:e})=>e,e.codespan=({text:e})=>e,e.br=e=>"\n",e.del=({text:e})=>e,e.image=e=>"",e.text=({text:e})=>e,e.link=({text:e})=>e,e}const V=new f.d((e=>H())),j=new f.d((()=>{const e=H();return e.code=({text:e})=>`\n\`\`\`\n${e}\n\`\`\`\n`,e}));function z(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function U(e){if(e.tokens)for(let t=e.tokens.length-1;t>=0;t--){const i=e.tokens[t];if("text"===i.type){const n=i.raw.split("\n"),o=n[n.length-1];if(o.includes("`"))return Z(e);if(o.includes("**"))return ne(e);if(o.match(/\*\w/))return X(e);if(o.match(/(^|\s)__\w/))return oe(e);if(o.match(/(^|\s)_\w/))return J(e);if($(o)||q(o)&&e.tokens.slice(0,t).some((e=>"text"===e.type&&e.raw.match(/\[[^\]]*$/)))){const i=e.tokens.slice(t+1);return"link"===i[0]?.type&&"text"===i[1]?.type&&i[1].raw.match(/^ *"[^"]*$/)||o.match(/^[^"]* +"[^"]*$/)?te(e):ee(e)}if(o.match(/(^|\s)\[\w*/))return ie(e)}}}function $(e){return!!e.match(/(^|\s)\[.*\]\(\w*/)}function q(e){return!!e.match(/^[^\[]*\]\([^\)]*$/)}function K(e){const t=e.items[e.items.length-1],i=t.tokens?t.tokens[t.tokens.length-1]:void 0;let n;if("text"!==i?.type||"inRawBlock"in t||(n=U(i)),!n||"paragraph"!==n.type)return;const o=z(e.items.slice(0,-1)),s=t.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!s)return;const r=s+z(t.tokens.slice(0,-1))+n.raw,a=y(o+r)[0];return"list"===a.type?a:void 0}const G=3;function Q(e){for(let t=0;t0){const e=o?i.slice(0,-1).join("\n"):t,s=!!e.match(/\|\s*$/),r=e+(s?"":"|")+`\n|${" --- |".repeat(n)}`;return y(r)}}function ae(e,t){return o.$w(e,t),(0,m.s)((()=>o.SV(e)))}},46274:(e,t,i)=>{"use strict";i.d(t,{P:()=>l,$:()=>c});var n=i(88758);const o=new WeakMap;function s(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return null}catch(e){return null}return e.parent}class r{static getSameOriginWindowChain(e){let t=o.get(e);if(!t){t=[],o.set(e,t);let i,n=e;do{i=s(n),i?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=i}while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const o=this.getSameOriginWindowChain(e);for(const e of o){const o=e.window.deref();if(i+=o?.scrollY??0,n+=o?.scrollX??0,o===t)break;if(!e.iframeElement)break;const s=e.iframeElement.getBoundingClientRect();i+=s.top,n+=s.left}return{top:i,left:n}}}var a=i(25160);class l{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=0===t.button,this.middleButton=1===t.button,this.rightButton=2===t.button,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,"dblclick"===t.type&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,"number"===typeof t.pageX?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const i=r.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class c{constructor(e,t=0,i=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let o=!1;if(n.H8){const e=navigator.userAgent.match(/Chrome\/(\d+)/),t=e?parseInt(e[1]):123;o=t<=122}if(e){const t=e,i=e,s=e.view?.devicePixelRatio||1;if("undefined"!==typeof t.wheelDeltaY)this.deltaY=o?t.wheelDeltaY/(120*s):t.wheelDeltaY/120;else if("undefined"!==typeof i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.gm&&!a.zx?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if("undefined"!==typeof t.wheelDeltaX)n.nr&&a.uF?this.deltaX=-t.wheelDeltaX/120:this.deltaX=o?t.wheelDeltaX/(120*s):t.wheelDeltaX/120;else if("undefined"!==typeof i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.gm&&!a.zx?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=o?e.wheelDelta/(120*s):e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}},736:(e,t,i)=>{"use strict";var n;i.d(t,{p:()=>n}),function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i={...t},n={...t},o={...t};let s=0;const r={keydown:0,input:0,render:0};function a(){_(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(l)}function l(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function c(){performance.mark("input/start"),r.input=1,m()}function d(){0===r.input&&c(),queueMicrotask(u)}function u(){1===r.input&&(performance.mark("input/end"),r.input=2)}function h(){_()}function g(){_()}function p(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(f),m())}function f(){1===r.render&&(performance.mark("render/end"),r.render=2)}function m(){setTimeout(_)}function _(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),v("keydown",t),v("input",i),v("render",n),v("inputlatency",o),s++,b())}function v(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function b(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0}function y(){if(0===s)return;const e={keydown:w(t),input:w(i),render:w(n),total:w(o),sampleCount:s};return C(t),C(i),C(n),C(o),s=0,e}function w(e){return{average:e.total/s,max:e.max,min:e.min}}function C(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=a,e.onBeforeInput=c,e.onInput=d,e.onKeyUp=h,e.onSelectionChange=g,e.onRenderStart=p,e.getAndClearMeasurements=y}(n||(n={}))},61979:(e,t,i)=>{"use strict";i.d(t,{c:()=>c});var n=i(2150),o=i(40231),s=i(5091);class r extends s.jG{constructor(e){super(),this._onDidChange=this._register(new o.vl),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,t){this._mediaQueryList?.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}}class a extends s.jG{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new o.vl),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const t=this._register(new r(e));this._register(t.onDidChange((()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)})))}_getPixelRatio(e){const t=document.createElement("canvas").getContext("2d"),i=e.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return i/n}}class l{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const t=(0,n.Q2)(e);let i=this.mapWindowIdToPixelRatioMonitor.get(t);return i||(i=(0,s.lC)(new a(e)),this.mapWindowIdToPixelRatioMonitor.set(t,i),(0,s.lC)(o.Jh.once(n.Fv)((({vscodeWindowId:e})=>{e===t&&(i?.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(t))})))),i}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}}const c=new l},25201:(e,t,i)=>{"use strict";i.d(t,{B:()=>n,q:()=>h});var n,o=i(2150),s=i(62484),r=i(85053),a=i(34125),l=i(40231),c=i(5091),d=i(67806),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};(function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"})(n||(n={}));class h extends c.jG{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new d.w,this.ignoreTargets=new d.w,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(l.Jh.runAndSubscribe(o.Iv,(({window:e,disposables:t})=>{t.add(o.ko(e.document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),t.add(o.ko(e.document,"touchend",(t=>this.onTouchEnd(e,t)))),t.add(o.ko(e.document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}),{window:s.G,disposables:this._store}))}static addTarget(e){if(!h.isTouchDevice())return c.jG.None;h.INSTANCE||(h.INSTANCE=(0,c.lC)(new h));const t=h.INSTANCE.targets.push(e);return(0,c.s)(t)}static ignoreTarget(e){if(!h.isTouchDevice())return c.jG.None;h.INSTANCE||(h.INSTANCE=(0,c.lC)(new h));const t=h.INSTANCE.ignoreTargets.push(e);return(0,c.s)(t)}static isTouchDevice(){return"ontouchstart"in s.G||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,o=e.targetTouches.length;i=h.HOLD_DELAY&&Math.abs(l.initialPageX-r.RT(l.rollingPageX))<30&&Math.abs(l.initialPageY-r.RT(l.rollingPageY))<30){const e=this.newGestureEvent(n.Contextmenu,l.initialTarget);e.pageX=r.RT(l.rollingPageX),e.pageY=r.RT(l.rollingPageY),this.dispatchEvent(e)}else if(1===o){const t=r.RT(l.rollingPageX),n=r.RT(l.rollingPageY),o=r.RT(l.rollingTimestamps)-l.rollingTimestamps[0],s=t-l.rollingPageX[0],a=n-l.rollingPageY[0],c=[...this.targets].filter((e=>l.initialTarget instanceof Node&&e.contains(l.initialTarget)));this.inertia(e,c,i,Math.abs(s)/o,s>0?1:-1,t,Math.abs(a)/o,a>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(n.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>h.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;const t=[];for(const i of this.targets)if(i.contains(e.initialTarget)){let n=0,o=e.initialTarget;while(o&&o!==i)n++,o=o.parentElement;t.push([n,i])}t.sort(((e,t)=>e[0]-t[0]));for(const[i,n]of t)n.dispatchEvent(e),this.dispatched=!0}}inertia(e,t,i,s,r,a,l,c,d){this.handle=o.PG(e,(()=>{const o=Date.now(),u=o-i;let g=0,p=0,f=!0;s+=h.SCROLL_FRICTION*u,l+=h.SCROLL_FRICTION*u,s>0&&(f=!1,g=r*s*u),l>0&&(f=!1,p=c*l*u);const m=this.newGestureEvent(n.Change);m.translationX=g,m.translationY=p,t.forEach((e=>e.dispatchEvent(m))),f||this.inertia(e,t,o,s,r,a+g,l,c,d+p)}))}onTouchMove(e){const t=Date.now();for(let i=0,o=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(o.pageX),s.rollingPageY.push(o.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}u([a.B],h,"isTouchDevice",null)},21776:(e,t,i)=>{"use strict";i.d(t,{H:()=>o});var n=i(14396);function o(e,t){const i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(e){return void(0,n.dz)(e)}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){return void(0,n.dz)(e)}}},64236:(e,t,i)=>{"use strict";i.d(t,{Z4:()=>I,EH:()=>T,XF:()=>D});var n=i(88758),o=i(63872),s=i(2150),r=i(25201),a=i(96371),l=i(49822),c=i(68389),d=i(44964),u=i(50799),h=i(31304),g=i(85053),p=i(40231),f=i(91348),m=i(5091),_=i(25160),v=i(41337);const b=s.$,y="selectOption.entry.template";class w{get templateId(){return y}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=s.BC(e,b(".option-text")),t.detail=s.BC(e,b(".option-detail")),t.decoratorRight=s.BC(e,b(".option-decorator-right")),t}renderElement(e,t,i){const n=i,o=e.text,s=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=o,n.detail.textContent=s||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class C extends m.jG{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,i,n,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=o||Object.create(null),"number"!==typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=C.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"===typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"===typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new p.vl,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register((0,u.i)().setupManagedHover((0,a.nZ)("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return y}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=s.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=s.BC(this.selectDropDownContainer,b(".select-box-details-pane"));const t=s.BC(this.selectDropDownContainer,b(".select-box-dropdown-container-width-control")),i=s.BC(t,b(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",s.BC(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=s.li(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(s.ko(this.selectDropDownContainer,s.Bx.DRAG_START,(e=>{s.fs.stop(e,!0)})))}registerListeners(){let e;this._register(s.b2(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}))),this._register(s.ko(this.selectElement,s.Bx.CLICK,(e=>{s.fs.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.ko(this.selectElement,s.Bx.MOUSE_DOWN,(e=>{s.fs.stop(e)}))),this._register(s.ko(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(s.ko(this.selectElement,"touchend",(t=>{s.fs.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.ko(this.selectElement,s.Bx.KEY_DOWN,(e=>{const t=new c.Z(e);let i=!1;_.zx?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),s.fs.stop(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){g.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"===typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){const e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){const e=this.styles.selectBackground??"",t=s.gI(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;const i=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=s.zk(this.selectElement),i=s.BK(this.selectElement),n=s.zk(this.selectElement).getComputedStyle(this.selectElement),o=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-C.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),d=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let u=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const h=this._hasDetails?this._cachedMaxDetailsHeight:0,g=u+o+h,p=Math.floor((r-o-h)/this.getHeight()),f=Math.floor((a-o-h)/this.getHeight());if(e)return!(i.top+i.height>t.innerHeight-22||i.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.topr&&(u=p*this.getHeight())}else g>a&&(u=f*this.getHeight());return this.selectList.layout(u),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=u+o+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=u+o+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=d,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const o=e.detail?e.detail.length:0,s=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+o+s;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=s.Tr(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=s.BC(e,b(".select-box-dropdown-list-container")),this.listRenderer=new w,this.selectList=this._register(new h.B8("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,v.kg)({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>_.zx?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new l.f(this.selectDropDownListContainer,"keydown")),i=p.Jh.chain(t.event,(e=>e.filter((()=>this.selectList.length>0)).map((e=>new c.Z(e)))));this._register(p.Jh.chain(i,(e=>e.filter((e=>3===e.keyCode))))(this.onEnter,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>2===e.keyCode))))(this.onEnter,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>9===e.keyCode))))(this.onEscape,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>16===e.keyCode))))(this.onUpArrow,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>18===e.keyCode))))(this.onDownArrow,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>12===e.keyCode))))(this.onPageDown,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>11===e.keyCode))))(this.onPageUp,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>14===e.keyCode))))(this.onHome,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>13===e.keyCode))))(this.onEnd,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))))(this.onCharacter,this)),this._register(s.ko(this.selectList.getHTMLElement(),s.Bx.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>"undefined"!==typeof e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(s.ko(this.selectDropDownContainer,s.Bx.FOCUS_OUT,(e=>{this._isVisible&&!s.QX(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;s.fs.stop(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),o=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){if(this.selected>0){s.fs.stop(e,!0);const t=this.options[this.selected-1].isDisabled;t&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onPageUp(e){s.fs.stop(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){s.fs.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){s.fs.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=f.YM.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(s.ko(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(s.b2(this.selectElement,"click",(e=>{s.fs.stop(e,!0)}))),this._register(s.b2(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(s.b2(this.selectElement,"keydown",(e=>{let t=!1;_.zx?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&g.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new E.LN)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(r.q.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.gm&&this._register((0,s.ko)(e,s.Bx.DRAG_START,(e=>e.dataTransfer?.setData(o.t.TEXT,this._action.label))))),this._register((0,s.ko)(t,r.B.Tap,(e=>this.onClick(e,!0)))),this._register((0,s.ko)(t,s.Bx.MOUSE_DOWN,(e=>{i||s.fs.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),_.zx&&this._register((0,s.ko)(t,s.Bx.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,s.ko)(t,s.Bx.CLICK,(e=>{s.fs.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,s.ko)(t,s.Bx.DBLCLICK,(e=>{s.fs.stop(e,!0)}))),[s.Bx.MOUSE_UP,s.Bx.MOUSE_OUT].forEach((e=>{this._register((0,s.ko)(t,e,(e=>{s.fs.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){s.fs.stop(e,!0);const i=L.z(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){if(!this.element)return;const e=this.getTooltip()??"";if(this.updateAriaLabel(),this.options.hoverDelegate?.showNativeHover)this.element.title=e;else if(this.customHover||""===e)this.customHover&&this.customHover.update(e);else{const t=this.options.hoverDelegate??(0,a.nZ)("element");this.customHover=this._store.add((0,u.i)().setupManagedHover(t,this.element,e))}}updateAriaLabel(){if(this.element){const e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class I extends T{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),L.j(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){const e=document.createElement("span");e.classList.add("keybinding"),e.textContent=this.options.keybinding,this.element.appendChild(e)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===E.wv.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=v.kg({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){const e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class D extends T{constructor(e,t,i,n,o,s,r){super(e,t),this.selectBox=new x(i,n,o,s,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}},48038:(e,t,i)=>{"use strict";i.d(t,{E:()=>u});var n=i(2150),o=i(68389),s=i(64236),r=i(96371),a=i(55664),l=i(40231),c=i(5091),d=i(50322);class u extends c.jG{constructor(e,t={}){let i,d;switch(super(),this._actionRunnerDisposables=this._register(new c.Cm),this.viewItemDisposables=this._register(new c.$w),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.vl),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.vl({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l.vl),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new l.vl),this.onWillRun=this._onWillRun.event,this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register((0,r.bW)()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new a.LN,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:i=[15],d=[17];break;case 1:i=[16],d=[18],this.domNode.className+=" vertical";break}this._register(n.ko(this.domNode,n.Bx.KEY_DOWN,(e=>{const t=new o.Z(e);let n=!0;const r="number"===typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;i&&(t.equals(i[0])||t.equals(i[1]))?n=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&r instanceof s.EH&&r.trapsArrowNavigation?n=this.focusNext(void 0,!0):this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.ko(this.domNode,n.Bx.KEY_UP,(e=>{const t=new o.Z(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.w5(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.bq()!==this.domNode&&n.QX(n.bq(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof s.EH&&e.isEnabled()));e instanceof s.EH&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof s.EH&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){if("number"===typeof e)return this.viewItems[e]?.action;if(n.sb(e)){while(e.parentElement!==this.actionsList){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const i=document.createElement("li");let r;i.className="action-item",i.setAttribute("role","presentation");const a={hoverDelegate:this._hoverDelegate,...t,isTabList:"tablist"===this.options.ariaRole};this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e,a)),r||(r=new s.Z4(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(r,n.ko(i,n.Bx.CONTEXT_MENU,(e=>{n.fs.stop(e,!0)}))),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(i),this.focusable&&r instanceof s.EH&&0===this.viewItems.length&&r.setFocusable(!0),null===o||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(r)):(this.actionsList.insertBefore(i,this.actionsList.children[o]),this.viewItems.splice(o,0,r),o++)})),"number"===typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,c.AS)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.w_(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"===typeof e?t=e:"boolean"===typeof e&&(i=e),i&&"undefined"===typeof this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if("undefined"===typeof this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===a.wv.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if("undefined"===typeof this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===a.wv.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){"undefined"===typeof this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();const n=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(n){let o=!0;d.Tn(n.focus)||(o=!1),this.options.focusOnlyEnabledItems&&d.Tn(n.isEnabled)&&!n.isEnabled()&&(o=!1),n.action.id===a.wv.ID&&(o=!1),o?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),o&&n.showHover?.()}}doTrigger(e){if("undefined"===typeof this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof s.EH){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=(0,c.AS)(this.viewItems),this.getContainer().remove(),super.dispose()}}},19950:(e,t,i)=>{"use strict";i.d(t,{h5:()=>h,vr:()=>d,xE:()=>u});var n=i(2150);const o=2e4;let s,r,a,l,c;function d(e){s=document.createElement("div"),s.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};r=t(),a=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};l=i(),c=i(),e.appendChild(s)}function u(e){s&&(r.textContent!==e?(n.w_(a),g(r,e)):(n.w_(r),g(a,e)))}function h(e){s&&(l.textContent!==e?(n.w_(c),g(l,e)):(n.w_(l),g(c,e)))}function g(e,t){n.w_(e),t.length>o&&(t=t.substr(0,o)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},42312:(e,t,i)=>{"use strict";i.d(t,{$:()=>m});var n=i(2150),o=i(86501),s=i(68389),r=i(44964),a=i(25201),l=i(96371),c=i(84653),d=i(85476),u=i(40231),h=i(42325),g=i(5091),p=i(23740),f=i(50799);d.Q1.white.toString(),d.Q1.white.toString();class m extends g.jG{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new u.vl),this._onDidEscape=this._register(new u.vl),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"===typeof t.title&&this.setTitle(t.title),"string"===typeof t.ariaLabel&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(a.q.addTarget(this._element)),[n.Bx.CLICK,a.B.Tap].forEach((e=>{this._register((0,n.ko)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):n.fs.stop(e)})))})),this._register((0,n.ko)(this._element,n.Bx.KEY_DOWN,(e=>{const t=new s.Z(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._onDidEscape.fire(e),this._element.blur(),i=!0),i&&n.fs.stop(t,!0)}))),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register((0,n.w5)(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of(0,c.n)(e))if("string"===typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){if(this._label===e)return;if((0,h.VS)(this._label)&&(0,h.VS)(e)&&(0,h.nK)(this._label,e))return;this._element.classList.add("monaco-text-button");const t=this.options.supportShortLabel?this._labelElement:this._element;if((0,h.VS)(e)){const i=(0,r.Gc)(e,{inline:!0});i.dispose();const s=i.element.querySelector("p")?.innerHTML;if(s){const e=(0,o.aj)(s,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});t.innerHTML=e}else(0,n.Ln)(t)}else this.options.supportIcons?(0,n.Ln)(t,...this.getContentElements(e)):t.textContent=e;let i="";"string"===typeof this.options.title?i=this.options.title:this.options.title&&(i=(0,r.R9)(e)),this.setTitle(i),"string"===typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",i),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...p.L.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){this._hover||""===e?this._hover&&this._hover.update(e):this._hover=this._register((0,f.i)().setupManagedHover(this.options.hoverDelegate??(0,l.nZ)("mouse"),this._element,e))}}},70604:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(2150),o=i(20601);class s{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=(0,n.BC)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,o.GP)(this.countFormat,this.count),this.element.title=(0,o.GP)(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},53876:(e,t,i)=>{"use strict";i.d(t,{d:()=>g});var n=i(2150),o=i(64236),s=i(68389),r=i(25201),a=i(55664),l=i(40231);class c extends a.LN{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.BC)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.BC)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[n.Bx.CLICK,n.Bx.MOUSE_DOWN,r.B.Tap])this._register((0,n.ko)(this.element,e,(e=>n.fs.stop(e,!0))));for(const e of[n.Bx.MOUSE_DOWN,r.B.Tap])this._register((0,n.ko)(this._label,e,(e=>{(0,n.Er)(e)&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register((0,n.ko)(this._label,n.Bx.KEY_UP,(e=>{const t=new s.Z(e);(t.equals(3)||t.equals(10))&&(n.fs.stop(e,!0),this.visible?this.hide():this.show())})));const o=i(this._label);o&&this._register(o),this._register(r.q.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class d extends c{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}var u=i(96371),h=i(50799);class g extends o.EH{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=e=>{this.element=(0,n.BC)(e,(0,n.$)("a.action-label"));let t=[];return"string"===typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register((0,h.i)().setupManagedHover(this.options.hoverDelegate??(0,u.nZ)("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),o={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new d(e,o)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{this.element?.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return e.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){const e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}},95994:(e,t,i)=>{"use strict";i.d(t,{c:()=>h});var n=i(2150),o=i(61865),s=i(76358),r=i(52469),a=i(40231),l=i(41337),c=i(5091),d=i(96371);const u=l.kg("defaultLabel","input");class h extends r.x{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new c.HE),this.additionalToggles=[],this._onDidOptionChange=this._register(new a.vl),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new a.vl),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new a.vl),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new a.vl),this._onKeyUp=this._register(new a.vl),this._onCaseSensitiveKeyDown=this._register(new a.vl),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new a.vl),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||u,this.showCommonFindToggles=!!i.showCommonFindToggles;const r=i.appendCaseSensitiveLabel||"",l=i.appendWholeWordsLabel||"",h=i.appendRegexLabel||"",g=i.history||[],p=!!i.flexibleHeight,f=!!i.flexibleWidth,m=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new s.mJ(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:g,showHistoryHint:i.showHistoryHint,flexibleHeight:p,flexibleWidth:f,flexibleMaxHeight:m,inputBoxStyles:i.inputBoxStyles}));const _=this._register((0,d.bW)());if(this.showCommonFindToggles){this.regex=this._register(new o.Ix({appendTitle:h,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new o.nV({appendTitle:l,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new o.bc({appendTitle:r,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(this.domNode.ownerDocument.activeElement);if(i>=0){let o=-1;t.equals(17)?o=(i+1)%e.length:t.equals(15)&&(o=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):o>=0&&e[o].focus(),n.fs.stop(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(n.ko(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(n.ko(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(const e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const e of this.additionalToggles)e.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new c.Cm;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){this.inputBox.paddingRight=e?0:(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){return this.regex?.checked??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){this.caseSensitive?.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}},61865:(e,t,i)=>{"use strict";i.d(t,{Ix:()=>h,bc:()=>d,nV:()=>u});var n=i(96371),o=i(83092),s=i(25923),r=i(41337);const a=r.kg("caseDescription","Match Case"),l=r.kg("wordsDescription","Match Whole Word"),c=r.kg("regexDescription","Use Regular Expression");class d extends o.l{constructor(e){super({icon:s.W.caseSensitive,title:a+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class u extends o.l{constructor(e){super({icon:s.W.wholeWord,title:l+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class h extends o.l{constructor(e){super({icon:s.W.regex,title:c+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},4518:(e,t,i)=>{"use strict";i.d(t,{_:()=>c});var n=i(2150),o=i(50799),s=i(96371),r=i(84653),a=i(5091),l=i(85603);class c extends a.jG{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=t?.supportIcons??!1,this.domNode=n.BC(e,n.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=c.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&l.aI(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}},50799:(e,t,i)=>{"use strict";i.d(t,{e:()=>o,i:()=>s});let n={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>null,showManagedHover:()=>{}};function o(e){n=e}function s(){return n}},96371:(e,t,i)=>{"use strict";i.d(t,{MW:()=>l,bW:()=>d,nZ:()=>c});var n=i(85661);const o=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});let s=o;const r=new n.d((()=>s("mouse",!1))),a=new n.d((()=>s("element",!1)));function l(e){s=e}function c(e){return"element"===e?a.value:r.value}function d(){return s("element",!0)}},44726:(e,t,i)=>{"use strict";i.d(t,{M4:()=>g,N4:()=>c,jQ:()=>d,vV:()=>h,vr:()=>u});var n=i(2150),o=i(68389),s=i(37800),r=i(5091),a=i(41337);const l=n.$;class c extends r.jG{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new s.MU(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class d extends r.jG{static render(e,t,i){return new d(e,t,i)}constructor(e,t,i){super(),this.actionLabel=t.label,this.actionKeybindingLabel=i,this.actionContainer=n.BC(e,l("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=n.BC(this.actionContainer,l("a.action")),this.action.setAttribute("role","button"),t.iconClass&&n.BC(this.action,l(`span.icon.${t.iconClass}`));const o=n.BC(this.action,l("span"));o.textContent=i?`${t.label} (${i})`:t.label,this._store.add(new h(this.actionContainer,t.run)),this._store.add(new g(this.actionContainer,t.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function u(e,t){return e&&t?(0,a.kg)("acessibleViewHint","Inspect this in the accessible view with {0}.",t):e?(0,a.kg)("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class h extends r.jG{constructor(e,t){super(),this._register(n.ko(e,n.Bx.CLICK,(i=>{i.stopPropagation(),i.preventDefault(),t(e)})))}}class g extends r.jG{constructor(e,t,i){super(),this._register(n.ko(e,n.Bx.KEY_DOWN,(n=>{const s=new o.Z(n);i.some((e=>s.equals(e)))&&(n.stopPropagation(),n.preventDefault(),t(e))})))}}},50278:(e,t,i)=>{"use strict";i.d(t,{s:()=>g});var n=i(2150),o=i(4518),s=i(5091),r=i(85603),a=i(21542),l=i(96371),c=i(50799),d=i(50322),u=i(74529);class h{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||(0,r.aI)(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class g extends s.jG{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new h(n.BC(e,n.$(".monaco-icon-label")))),this.labelContainer=n.BC(this.domNode.element,n.$(".monaco-icon-label-container")),this.nameContainer=n.BC(this.labelContainer,n.$("span.monaco-icon-name-container")),this.nameNode=t?.supportHighlights||t?.supportIcons?this._register(new m(this.nameContainer,!!t.supportIcons)):new p(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??(0,l.nZ)("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){const s=["monaco-icon-label"],r=["monaco-icon-label-container"];let a="";i&&(i.extraClasses&&s.push(...i.extraClasses),i.italic&&s.push("italic"),i.strikethrough&&s.push("strikethrough"),i.disabledCommand&&r.push("disabled"),i.title&&("string"===typeof i.title?a+=i.title:a+=e));const l=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let e;l&&n.sb(l)?e=l:(e=n.$(".monaco-icon-label-iconpath"),this.domNode.element.prepend(e)),e.style.backgroundImage=n.Tf(i?.iconPath)}else l&&l.remove();if(this.domNode.classNames=s,this.domNode.element.setAttribute("aria-label",a),this.labelContainer.classList.value="",this.labelContainer.classList.add(...r),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof o._?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines),this.setupHover(e.element,i?.descriptionTitle)):(e.textContent=t&&i?.labelEscapeNewLines?o._.escapeNewLines(t,[]):t||"",this.setupHover(e.element,i?.descriptionTitle||""),e.empty=!t)}if(i?.suffix||this.suffixNode){const e=this.getOrCreateSuffixNode();e.textContent=i?.suffix??""}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate.showNativeHover){function n(e,t){(0,d.Kg)(t)?e.title=(0,u.pS)(t):t?.markdownNotSupportedFallback?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}n(e,t)}else{const o=(0,c.i)().setupManagedHover(this.hoverDelegate,e,t);o&&this.customHovers.set(e,o)}else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new h(n.Pl(this.nameContainer,n.$("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new h(n.BC(e.element,n.$("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){const e=this._register(new h(n.BC(this.labelContainer,n.$("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new o._(n.BC(e.element,n.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new h(n.BC(e.element,n.$("span.label-description"))))}return this.descriptionNode}}class p{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,r.aI)(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.BC(this.container,n.$("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const o={start:n,end:n+e.length},s=i.map((e=>a.Q.intersect(o,e))).filter((e=>!a.Q.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}class m extends s.jG{constructor(e,t){super(),this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,r.aI)(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=this._register(new o._(n.BC(this.container,n.$("a.label-name",{id:t?.domId})),{supportIcons:this.supportIcons}))),this.singleLabel.set(e,t?.matches,void 0,t?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=t?.separator||"/",s=f(e,i,t?.matches);for(let r=0;r{"use strict";i.d(t,{n:()=>r,s:()=>a});var n=i(2150),o=i(23740);const s=new RegExp(`(\\\\)?\\$\\((${o.L.iconNameExpression}(?:${o.L.iconModifierExpression})?)\\)`,"g");function r(e){const t=new Array;let i,n=0,o=0;while(null!==(i=s.exec(e))){o=i.index||0,n{"use strict";i.d(t,{mJ:()=>y,x8:()=>v});var n=i(2150),o=i(49822),s=i(60934),r=i(48038),a=i(19950),l=i(50799),c=i(96371),d=i(37800),u=i(52469),h=i(40231);class g{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class p{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new g(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var f=i(85603),m=i(41337);const _=n.$,v={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class b extends u.x{constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new h.vl),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new h.vl),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.BC(e,_(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",a=n.BC(this.element,_(".ibwrapper"));if(this.input=n.BC(a,_(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"===typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.BC(a,_("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new d.Se(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.BC(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new o.f(e.ownerDocument,"selectionchange")),i=h.Jh.filter(t.event,(()=>{const t=e.ownerDocument.getSelection();return t?.anchorNode===a}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new r.E(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register((0,l.i)().setupManagedHover((0,c.nZ)("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"===typeof this.cachedHeight?this.cachedHeight:n.OK(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return n.X7(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){const e=this.input.selectionStart;if(null===e)return null;const t=this.input.selectionEnd??e;return{start:e,end:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!==typeof this.cachedContentHeight||"number"!==typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&(0,f.aI)(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${n.gI(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=n.Tr(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{if(!this.message)return null;e=n.BC(i,_(".monaco-inputbox-container")),t();const o={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?(0,s.yk)(this.message.content,o):(0,s.S5)(this.message.content,o);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background??"",r.style.color=a.foreground??"",r.style.border=a.border?`1px solid ${a.border}`:"",n.BC(e,r),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?m.kg("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?m.kg("alertWarningMessage","Warning: {0}",this.message.content):m.kg("alertInfoMessage","Info: {0}",this.message.content),a.xE(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=e.charCodeAt(e.length-1),i=10===t?" ":"",n=(e+i).replace(/\u000c/g,"");n?this.mirror.textContent=e+i:this.mirror.innerText=" ",this.layout()}applyStyles(){const e=this.options.inputBoxStyles,t=e.inputBackground??"",i=e.inputForeground??"",o=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=i,this.input.style.backgroundColor="inherit",this.input.style.color=i,this.element.style.border=`1px solid ${n.gI(o,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.OK(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}}class y extends b{constructor(e,t,i){const o=m.kg({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," or {0} for history","⇅"),s=m.kg({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new h.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new h.vl),this.onDidBlur=this._onDidBlur.event,this.history=new p(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?o:s,t=this.placeholder+e;i.showPlaceholderOnFocus&&!n.X7(this.input)?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(s)||e(o)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",a.h5(this.value?this.value:m.kg("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,a.h5(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}},92678:(e,t,i)=>{"use strict";i.d(t,{l:()=>u,x:()=>h});var n=i(2150),o=i(50799),s=i(96371),r=i(59812),a=i(5091),l=i(85603),c=i(41337);const d=n.$,u={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class h extends a.jG{constructor(e,t,i){super(),this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);const r=this.options.keybindingLabelForeground;this.domNode=n.BC(e,d(".monaco-keybinding")),r&&(this.domNode.style.color=r),this.hover=this._register((0,o.i)().setupManagedHover((0,s.nZ)("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&h.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){const e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let t=1;t{"use strict";i.d(t,{ur:()=>E,uO:()=>R});var n=i(63872),o=i(2150),s=i(49822),r=i(25201),a=i(37800),l=i(85053),c=i(9659),d=i(34125),u=i(40231),h=i(5091),g=i(21542),p=i(52210);function f(e,t){const i=[];for(const n of t){if(e.start>=n.range.end)continue;if(e.ende.concat(t)),[]))}class b{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,o=f({start:0,end:e},this.groups),s=f({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:m(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=v(o,r,s),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e){const e=this.getRenderer(t);e.disposeTemplate(i.templateData),i.templateData=null}})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var w=i(14396),C=i(19977),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const k={CurrentDragAndDropData:void 0},x={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class E{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class T{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,this.getPosInSet=e?.getPosInSet?e.getPosInSet.bind(e):(e,t)=>t+1,this.getRole=e?.getRole?e.getRole.bind(e):e=>"listitem",this.isChecked=e?.isChecked?e.isChecked.bind(e):e=>{}}}class R{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,o.y6)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=x){if(this.virtualDelegate=t,this.domId="list_id_"+ ++R.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new c.ve(50),this.splicing=!1,this.dragOverAnimationStopDisposable=h.jG.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=h.jG.None,this.onDragLeaveTimeout=h.jG.None,this.disposables=new h.Cm,this._onDidChangeContentHeight=new u.vl,this._onDidChangeContentWidth=new u.vl,this.onDidChangeContentHeight=u.Jh.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(n.paddingTop??0);for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new y(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!==typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=n.horizontalScrolling??x.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom="undefined"===typeof n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new D(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const s=n.transformOptimization??x.transformOptimization;s&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.q.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new p.yE({forceIntegerValues:!0,smoothScrollDuration:n.smoothScrolling?125:0,scheduleAtNextAnimationFrame:e=>(0,o.PG)((0,o.zk)(this.domNode),e)})),this.scrollableElement=this.disposables.add(new a.oO(this.rowsContainer,{alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel??x.alwaysConsumeMouseWheel,horizontal:1,vertical:n.verticalScrollMode??x.verticalScrollMode,useShadows:n.useShadows??x.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,o.ko)(this.rowsContainer,r.B.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,o.ko)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,o.ko)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,o.ko)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,o.ko)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,o.ko)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=n.setRowLineHeight??x.setRowLineHeight,this.setRowHeight=n.setRowHeight??x.setRowHeight,this.supportDynamicHeights=n.supportDynamicHeights??x.supportDynamicHeights,this.dnd=n.dnd??this.disposables.add(x.dnd),this.layout(n.initialSize?.height,n.initialSize?.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t={...t??{},scrollByPage:e.scrollByPage}),void 0!==e.mouseWheelScrollSensitivity&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new b(e)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=g.Q.intersect(n,o),r=new Map;for(let e=s.end-1;e>=s.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.unshift(t.row)}t.row=null,t.stale=!0}const a={start:e+t,end:this.items.length},l=g.Q.intersect(a,n),c=g.Q.relativeComplement(a,n),d=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:h.jG.None,checkedDisposable:h.jG.None,stale:!1})));let u;0===e&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),u=this.items,this.items=d):(this.rangeMap.splice(e,t,d),u=this.items.splice(e,t,...d));const p=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=m(l,p),v=g.Q.intersect(f,_);for(let e=v.start;em(e,p))),w={start:e,end:e+i.length},C=[w,...y].map((e=>g.Q.intersect(f,e))).reverse();for(const e of C)for(let t=e.end-1;t>=e.start;t--){const e=this.items[t],i=r.get(e.templateId),n=i?.pop();this.insertItemInDOM(t,n)}for(const e of r.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),u.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,o.PG)((0,o.zk)(this.domNode),(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)"undefined"!==typeof t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){const e=this.scrollableElement.getScrollDimensions();return e.height}get firstVisibleIndex(){const e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);return e.start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex((t=>t.element===e))}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:"number"===typeof e?e:(0,o.H4)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),"undefined"!==typeof t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"===typeof t?t:(0,o.y6)(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=g.Q.relativeComplement(r,e).reverse(),l=g.Q.relativeComplement(e,r);if(s){const t=g.Q.intersect(e,r);for(let e=t.start;e{for(const e of l)for(let t=e.start;t=e.start;t--)this.insertItemInDOM(t)})),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){const i=this.items[e];if(!i.row)if(t)i.row=t,i.stale=!0;else{const e=this.cache.alloc(i.templateId);i.row=e.row,i.stale||=e.isReusingConnectedDomNode}const n=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",n);const s=this.accessibilityProvider.isChecked(i.element);if("boolean"===typeof s)i.row.domNode.setAttribute("aria-checked",String(!!s));else if(s){const e=e=>i.row.domNode.setAttribute("aria-checked",String(!!e));e(s.value),i.checkedDisposable=s.onDidChange((()=>e(s.value)))}if(i.stale||!i.row.domNode.parentElement){const t=this.items.at(e+1)?.row?.domNode??null;i.row.domNode.parentElement===this.rowsContainer&&i.row.domNode.nextElementSibling===t||this.rowsContainer.insertBefore(i.row.domNode,t),i.stale=!1}this.updateItemInDOM(i,e);const r=this.renderers.get(i.templateId);if(!r)throw new Error(`No renderer found for template id ${i.templateId}`);r?.renderElement(i.element,e,i.row.templateData,i.size);const a=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a&&(i.dragStartDisposable=(0,o.ko)(i.row.domNode,"dragstart",(e=>this.onDragStart(i.element,a,e)))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,o.y6)(e.row.domNode);const t=(0,o.zk)(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){const e=this.scrollableElement.getScrollPosition();return e.scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return u.Jh.filter(u.Jh.map(this.disposables.add(new s.f(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return u.Jh.any(u.Jh.map(this.disposables.add(new s.f(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),u.Jh.map(this.disposables.add(new s.f(this.domNode,r.B.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return u.Jh.map(this.disposables.add(new s.f(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return u.Jh.map(this.disposables.add(new s.f(this.rowsContainer,r.B.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element,o=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:n,sector:o}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const s=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.t.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(s,i)),"undefined"===typeof e&&(e=String(s.length));const t=(0,o.$)(".monaco-drag-image");t.textContent=e;const n=e=>{while(e&&!e.classList.contains("monaco-workbench"))e=e.parentElement;return e||this.domNode.ownerDocument},r=n(this.domNode);r.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>t.remove()),0)}this.domNode.classList.add("dragging"),this.currentDragData=new E(s),k.CurrentDragAndDropData=new L(s),this.dnd.onDragStart?.(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),k.CurrentDragAndDropData&&"vscode-ui"===k.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(k.CurrentDragAndDropData)this.currentDragData=k.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new T}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop="boolean"===typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;e.browserEvent.dataTransfer.dropEffect="boolean"!==typeof t&&0===t.effect?.type?"copy":"move",i="boolean"!==typeof t&&t.feedback?t.feedback:"undefined"===typeof e.index?[-1]:[e.index],i=(0,l.dM)(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i;let n="boolean"!==typeof t&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(I(this.currentDragFeedback,i)&&this.currentDragFeedbackPosition===n)return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackPosition=n,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add(n),this.rowsContainer.classList.add(n),this.currentDragFeedbackDisposable=(0,h.s)((()=>{this.domNode.classList.remove(n),this.rowsContainer.classList.remove(n)}));else{if(i.length>1&&"drop-target"!==n)throw new Error("Can't use multiple feedbacks with position different than 'over'");"drop-target-after"===n&&i[0]{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row?.domNode.classList.remove(n)}}))}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,c.EQ)((()=>this.clearDragOverFeedback()),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,k.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,k.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=h.jG.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,o.cL)(this.domNode).top;this.dragOverAnimationDisposable=(0,o.i0)((0,o.zk)(this.domNode),this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,c.EQ)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(void 0===t)return;const i=e.offsetY/this.items[t].size,n=Math.floor(i/.25);return(0,C.qE)(n,0,3)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;while(((0,o.sb)(i)||(0,o.xZ)(i))&&i!==this.rowsContainer&&t.contains(i)){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;while(1){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=e.start;t--)this.insertItemInDOM(t);for(let e=a.start;e{"use strict";i.d(t,{hb:()=>K,B8:()=>ne,MH:()=>q,_C:()=>y,W0:()=>O,Bm:()=>F,B6:()=>D,b$:()=>A,bm:()=>N,mh:()=>z,tX:()=>j,Es:()=>M,xu:()=>P,bG:()=>G});var n=i(2150),o=i(49822),s=i(68389),r=i(25201),a=i(19950);class l{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var c=i(85053),d=i(9659),u=i(85476),h=i(34125),g=i(40231),p=i(10695),f=i(5091),m=i(19977),_=i(25160),v=i(50322);class b extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var y,w,C=i(90487),S=i(46274),k=i(39751),x=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class E{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class L{get name(){return this._trait}get renderer(){return new E(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.vl,this.onChange=this._onChange.event}splice(e,t,i){const n=i.length-t,o=e+t,s=[];let r=0;while(r=o)s.push(this.sortedIndexes[r++]+n);this.renderer.splice(e,t,i.length),this._set(s,s)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(J),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=Z(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,c.El)(this.sortedIndexes,e,J)>=0}dispose(){(0,f.AS)(this._onChange)}}x([h.B],L.prototype,"renderer",null);class T extends L{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class I{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const o=new Set(n),s=i.map((e=>o.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,s)}}function D(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function R(e,t){return!!e.classList.contains(t)||!e.classList.contains("monaco-list")&&(!!e.parentElement&&R(e.parentElement,t))}function N(e){return R(e,"monaco-editor")}function A(e){return R(e,"monaco-custom-toggle")}function O(e){return R(e,"action-item")}function P(e){return R(e,"monaco-tree-sticky-row")}function M(e){return e.classList.contains("monaco-tree-sticky-container")}function F(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&(!!e.parentElement&&F(e.parentElement))}class B{get onKeyDown(){return g.Jh.chain(this.disposables.add(new o.f(this.view.domNode,"keydown")).event,(e=>e.filter((e=>!D(e.target))).map((e=>new s.Z(e)))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new f.Cm,this.multipleSelectionDisposables=new f.Cm,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown((e=>{switch(e.keyCode){case 3:return this.onEnter(e);case 16:return this.onUpArrow(e);case 18:return this.onDownArrow(e);case 11:return this.onPageUpArrow(e);case 12:return this.onPageDownArrow(e);case 9:return this.onEscape(e);case 31:this.multipleSelectionSupport&&(_.zx?e.metaKey:e.ctrlKey)&&this.onCtrlA(e)}})))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,c.y1)(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}x([h.B],B.prototype,"onKeyDown",null),function(e){e[e["Automatic"]=0]="Automatic",e[e["Trigger"]=1]="Trigger"}(y||(y={})),function(e){e[e["Idle"]=0]="Idle",e[e["Typing"]=1]="Typing"}(w||(w={}));const W=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class H{constructor(e,t,i,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=o,this.enabled=!1,this.state=w.Idle,this.mode=y.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new f.Cm,this.disposables=new f.Cm,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??1?this.enable():this.disable(),this.mode=e.typeNavigationMode??y.Automatic}enable(){if(this.enabled)return;let e=!1;const t=g.Jh.chain(this.enabledDisposables.add(new o.f(this.view.domNode,"keydown")).event,(t=>t.filter((e=>!D(e.target))).filter((()=>this.mode===y.Automatic||this.triggered)).map((e=>new s.Z(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>n.fs.stop(e,!0))).map((e=>e.browserEvent.key)))),i=g.Jh.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables),r=g.Jh.reduce(g.Jh.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables);r(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const t=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(e[0]));"string"===typeof t?(0,a.xE)(t):t&&(0,a.xE)(t.get())}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=w.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===w.Idle?1:0;this.state=w.Typing;for(let t=0;t1&&1===t.length)return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}}else if("undefined"===typeof r||(0,p.WP)(e,r))return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class V{constructor(e,t){this.list=e,this.view=t,this.disposables=new f.Cm;const i=g.Jh.chain(this.disposables.add(new o.f(t.domNode,"keydown")).event,(e=>e.filter((e=>!D(e.target))).map((e=>new s.Z(e))))),n=g.Jh.chain(i,(e=>e.filter((e=>2===e.keyCode&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey))));n(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const o=i.querySelector("[tabIndex]");if(!o||!(0,n.sb)(o)||-1===o.tabIndex)return;const s=(0,n.zk)(o).getComputedStyle(o);"hidden"!==s.visibility&&"none"!==s.display&&(e.preventDefault(),e.stopPropagation(),o.focus())}dispose(){this.disposables.dispose()}}function j(e){return _.zx?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function z(e){return e.browserEvent.shiftKey}function U(e){return(0,n.Er)(e)&&2===e.button}const $={isSelectionSingleChangeEvent:j,isSelectionRangeChangeEvent:z};class q{constructor(e){this.list=e,this.disposables=new f.Cm,this._onPointer=new g.vl,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$),this.mouseSupport="undefined"===typeof e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(r.q.addTarget(e.getHTMLElement()))),g.Jh.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){N(e.browserEvent.target)||(0,n.bq)()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(D(e.browserEvent.target)||N(e.browserEvent.target))return;const t="undefined"===typeof e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(D(e.browserEvent.target)||N(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return"undefined"===typeof t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),U(e.browserEvent)||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e))}onDoubleClick(e){if(D(e.browserEvent.target)||N(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if("undefined"===typeof i){const e=this.list.getFocus()[0];i=e??t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=(0,c.y1)(n,o+1),r=this.list.getSelection(),a=Y(Z(r,[i]),i);if(0===a.length)return;const l=Z(s,X(r,a));this.list.setSelection(l,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const i=this.list.getSelection(),n=i.filter((e=>e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class K{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const o=(0,n.gI)(e.listFocusAndSelectionOutline,(0,n.gI)(e.listSelectionOutline,e.listFocusOutline??""));o&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${o}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const s=(0,n.gI)(e.listSelectionOutline,e.listInactiveFocusOutline??"");s&&i.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${s}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; }\n\t\t\t`),e.listDropBetweenBackground&&(i.push(`\n\t\t\t.monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,\n\t\t\t.monaco-list${t} .monaco-list-row.drop-target-before::before {\n\t\t\t\tcontent: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`),i.push(`\n\t\t\t.monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,\n\t\t\t.monaco-list${t} .monaco-list-row.drop-target-after::after {\n\t\t\t\tcontent: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`)),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&i.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=i.join("\n")}}const G={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:u.Q1.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:u.Q1.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:u.Q1.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},Q={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function Y(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;while(o>=0&&e[o]===t-(i-o))n.push(e[o--]);n.reverse(),o=i;while(o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]e-t;class ee{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const s of this.renderers)s.disposeElement?.(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class te{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new f.Cm}}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e),o=n&&"string"!==typeof n?n:(0,k.lk)(n);i.disposables.add((0,k.fm)((e=>{this.setAriaLabel(e.readObservable(o),i.container)})));const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"===typeof s?i.container.setAttribute("aria-level",`${s}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i,n){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class ie{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements(),i=t.indexOf(e)>-1?t:[e];return i}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,o){return this.dnd.onDragOver(e,t,i,n,o)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,o){this.dnd.drop(e,t,i,n,o)}dispose(){this.dnd.dispose()}}class ne{get onDidChangeFocus(){return g.Jh.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return g.Jh.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=g.Jh.chain(this.disposables.add(new o.f(this.view.domNode,"keydown")).event,(t=>t.map((e=>new s.Z(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>n.fs.stop(e,!0))).filter((()=>!1)))),i=g.Jh.chain(this.disposables.add(new o.f(this.view.domNode,"keyup")).event,(t=>t.forEach((()=>e=!1)).map((e=>new s.Z(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>n.fs.stop(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0,n="undefined"!==typeof i?this.view.element(i):void 0,o="undefined"!==typeof i?this.view.domElement(i):this.view.domNode;return{index:i,element:n,anchor:o,browserEvent:e}})))),r=g.Jh.chain(this.view.onContextMenu,(t=>t.filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new S.P((0,n.zk)(this.view.domNode),i),browserEvent:i})))));return g.Jh.any(t,i,r)}get onKeyDown(){return this.disposables.add(new o.f(this.view.domNode,"keydown")).event}get onDidFocus(){return g.Jh.signal(this.disposables.add(new o.f(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return g.Jh.signal(this.disposables.add(new o.f(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,o,s=Q){this.user=e,this._options=s,this.focus=new L("focused"),this.anchor=new L("anchor"),this.eventBufferer=new g.at,this._ariaLabel="",this.disposables=new f.Cm,this._onDidDispose=new g.vl,this.onDidDispose=this._onDidDispose.event;const r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new T("listbox"!==r);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(a.push(new te(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new ee(e.templateId,[...a,e])));const c={...s,dnd:s.dnd&&new ie(this,s.dnd)};if(this.view=this.createListView(t,i,o,c),this.view.domNode.setAttribute("role",r),s.styleController)this.styleController=s.styleController(this.view.domId);else{const e=(0,n.li)(this.view.domNode);this.styleController=new K(e,this.view.domId)}if(this.spliceable=new l([new I(this.focus,this.view,s.identityProvider),new I(this.selection,this.view,s.identityProvider),new I(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new V(this,this.view)),("boolean"!==typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new B(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||W;this.typeNavigationController=new H(this,this.view,s.keyboardNavigationLabelProvider,s.keyboardNavigationEventFilter??(()=>!0),e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new C.uO(e,t,i,n)}createMouseController(e){return new q(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new b(this.user,`Invalid start index: ${e}`);if(t<0)throw new b(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if("undefined"!==typeof e){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,c.Fy)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return"undefined"===typeof e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const o=this.findPreviousIndex(i,!1,t);o>-1&&n!==o?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();let s=o+this.view.renderHeight;i>n&&(s-=this.view.elementHeight(i)),this.view.setScrollTop(s),this.view.getScrollTop()!==o&&(this.setFocus([]),await(0,d.wR)(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=()=>0){let n;const o=i(),s=this.view.getScrollTop()+o;n=0===s?this.view.indexAt(s):this.view.indexAfter(s-1);const r=this.getFocus()[0];if(r!==n&&(void 0===r||r>=n)){const i=this.findNextIndex(n,!1,t);i>-1&&r!==i?this.setFocus([i],e):this.setFocus([n],e)}else{const n=s;this.view.setScrollTop(s-this.view.renderHeight-o),this.view.getScrollTop()+i()!==n&&(this.setFocus([]),await(0,d.wR)(0),await this.focusPreviousPage(e,t,i))}}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),o=this.view.elementTop(e),s=this.view.elementHeight(e);if((0,v.Et)(t)){const e=s-this.view.renderHeight+i;this.view.setScrollTop(e*(0,m.qE)(t,0,1)+o-i)}else{const e=o+s,t=n+this.view.renderHeight;o=t||(o=t&&s>=this.view.renderHeight?this.view.setScrollTop(o-i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const s=o-this.view.renderHeight+t;return Math.abs((i+t-n)/s)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){const e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}x([h.B],ne.prototype,"onDidChangeFocus",null),x([h.B],ne.prototype,"onDidChangeSelection",null),x([h.B],ne.prototype,"onContextMenu",null),x([h.B],ne.prototype,"onKeyDown",null),x([h.B],ne.prototype,"onDidFocus",null),x([h.B],ne.prototype,"onDidBlur",null)},1606:(e,t,i)=>{"use strict";i.d(t,{v:()=>a});var n=i(2150),o=i(53062),s=i(40231),r=i(5091);class a{constructor(){let e;this._onDidWillResize=new s.vl,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new s.vl,this.onDidResize=this._onDidResize.event,this._sashListener=new r.Cm,this._size=new n.fg(0,0),this._minSize=new n.fg(0,0),this._maxSize=new n.fg(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new o.m(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new o.m(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new o.m(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:o.B.North}),this._southSash=new o.m(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:o.B.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(s.Jh.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(s.Jh.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(s.Jh.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(s.Jh.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:o}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(o,Math.min(r,t));const a=new n.fg(t,e);n.fg.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}},53062:(e,t,i)=>{"use strict";i.d(t,{B:()=>g,m:()=>C});var n=i(2150),o=i(49822),s=i(25201),r=i(9659),a=i(34125),l=i(40231),c=i(5091),d=i(25160),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const h=!1;var g;(function(e){e["North"]="north",e["South"]="south",e["East"]="east",e["West"]="west"})(g||(g={}));let p=4;const f=new l.vl;let m=300;const _=new l.vl;class v{constructor(e){this.el=e,this.disposables=new c.Cm}get onPointerMove(){return this.disposables.add(new o.f((0,n.zk)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new o.f((0,n.zk)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}u([a.B],v.prototype,"onPointerMove",null),u([a.B],v.prototype,"onPointerUp",null);class b{get onPointerMove(){return this.disposables.add(new o.f(this.el,s.B.Change)).event}get onPointerUp(){return this.disposables.add(new o.f(this.el,s.B.End)).event}constructor(e){this.el=e,this.disposables=new c.Cm}dispose(){this.disposables.dispose()}}u([a.B],b.prototype,"onPointerMove",null),u([a.B],b.prototype,"onPointerUp",null);class y{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}u([a.B],y.prototype,"onPointerMove",null),u([a.B],y.prototype,"onPointerUp",null);const w="pointer-events-disabled";class C extends c.jG{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,n.BC)(this.el,(0,n.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,c.s)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new o.f(this._orthogonalStartDragHandle,"mouseenter")).event((()=>C.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new o.f(this._orthogonalStartDragHandle,"mouseleave")).event((()=>C.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,n.BC)(this.el,(0,n.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,c.s)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new o.f(this._orthogonalEndDragHandle,"mouseenter")).event((()=>C.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new o.f(this._orthogonalEndDragHandle,"mouseleave")).event((()=>C.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=m,this.hoverDelayer=this._register(new r.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new l.vl),this._onDidStart=this._register(new l.vl),this._onDidChange=this._register(new l.vl),this._onDidReset=this._register(new l.vl),this._onDidEnd=this._register(new l.vl),this.orthogonalStartSashDisposables=this._register(new c.Cm),this.orthogonalStartDragHandleDisposables=this._register(new c.Cm),this.orthogonalEndSashDisposables=this._register(new c.Cm),this.orthogonalEndDragHandleDisposables=this._register(new c.Cm),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,n.BC)(e,(0,n.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),d.zx&&this.el.classList.add("mac");const a=this._register(new o.f(this.el,"mousedown")).event;this._register(a((t=>this.onPointerStart(t,new v(e))),this));const u=this._register(new o.f(this.el,"dblclick")).event;this._register(u(this.onPointerDoublePress,this));const g=this._register(new o.f(this.el,"mouseenter")).event;this._register(g((()=>C.onMouseEnter(this))));const y=this._register(new o.f(this.el,"mouseleave")).event;this._register(y((()=>C.onMouseLeave(this)))),this._register(s.q.addTarget(this.el));const w=this._register(new o.f(this.el,s.B.Start)).event;this._register(w((e=>this.onPointerStart(e,new b(this.el))),this));const S=this._register(new o.f(this.el,s.B.Tap)).event;let k;this._register(S((e=>{if(k)return clearTimeout(k),k=void 0,void this.onPointerDoublePress(e);clearTimeout(k),k=setTimeout((()=>k=void 0),250)}),this)),"number"===typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=p,this._register(f.event((e=>{this.size=e,this.layout()})))),this._register(_.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",h),this.layout()}onPointerStart(e,t){n.fs.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new y(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new y(t))),!this.state)return;const o=this.el.ownerDocument.getElementsByTagName("iframe");for(const e of o)e.classList.add(w);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const u=(0,n.li)(this.el),h=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":d.zx?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":d.zx?"col-resize":"ew-resize",u.textContent=`* { cursor: ${e} !important; }`},g=new c.Cm;h(),i||this.onDidEnablementChange.event(h,null,g);const p=e=>{n.fs.stop(e,!1);const t={startX:s,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)},f=e=>{n.fs.stop(e,!1),u.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of o)e.classList.remove(w)};t.onPointerMove(p,null,g),t.onPointerUp(f,null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&C.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&C.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){C.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){const t=e.initialTarget??e.target;if(t&&(0,n.sb)(t))return t.classList.contains("orthogonal-drag-handle")?t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},37800:(e,t,i)=>{"use strict";i.d(t,{MU:()=>N,QC:()=>T,Se:()=>D,oO:()=>R});var n=i(88758),o=i(2150),s=i(76892),r=i(46274),a=i(80125),l=i(52469),c=i(9659),d=i(23740);const u=11;class h extends l.x{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px","undefined"!==typeof e.top&&(this.bgDomNode.style.top="0px"),"undefined"!==typeof e.left&&(this.bgDomNode.style.left="0px"),"undefined"!==typeof e.bottom&&(this.bgDomNode.style.bottom="0px"),"undefined"!==typeof e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...d.L.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=u+"px",this.domNode.style.height=u+"px","undefined"!==typeof e.top&&(this.domNode.style.top=e.top+"px"),"undefined"!==typeof e.left&&(this.domNode.style.left=e.left+"px"),"undefined"!==typeof e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),"undefined"!==typeof e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a._),this._register(o.b2(this.bgDomNode,o.Bx.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(o.b2(this.domNode,o.Bx.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new o.Be),this._pointerdownScheduleRepeatTimer=this._register(new c.pc)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24,o.zk(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault()}}var g=i(5091);class p extends g.jG{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new c.pc)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode?.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}var f=i(25160);const m=140;class _ extends l.x{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new p(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a._),this._shouldRender=!0,this.domNode=(0,s.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(o.ko(this.domNode.domNode,o.Bx.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,s.Z)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"===typeof i&&this.slider.setWidth(i),"number"===typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(o.ko(this.slider.domNode,o.Bx.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);i<=o&&o<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"===typeof e.offsetX&&"number"===typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=o.BK(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const o=this._sliderOrthogonalPointerPosition(e),s=Math.abs(o-i);if(f.uF&&s>m)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e),a=r-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(a))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}var v=i(28925),b=i(25923);class y extends _{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new v.m(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-u)/2,i=(t.horizontalScrollbarSize-u)/2;this._createArrow({className:"scra",icon:b.W.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,1,0))}),this._createArrow({className:"scra",icon:b.W.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class w extends _{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new v.m(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-u)/2,i=(t.verticalScrollbarSize-u)/2;this._createArrow({className:"scra",icon:b.W.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,1))}),this._createArrow({className:"scra",icon:b.W.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var C=i(40231),S=i(52210);const k=500,x=50,E=!0;class L{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class T{static{this.INSTANCE=new T}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;do{const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}while(1);return t<=.5}acceptStandardWheelEvent(e){if(n.H8){const t=o.zk(e.browserEvent),i=(0,n.pR)(t);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){let n=null;const o=new L(e,t,i);-1===this._front&&-1===this._rear?(this._memory[0]=o,this._front=0,this._rear=0):(n=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o),o.score=this._computeScore(o,n)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if(this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(i+=.25),t){const n=Math.abs(e.deltaX),o=Math.abs(e.deltaY),s=Math.abs(t.deltaX),r=Math.abs(t.deltaY),a=Math.max(Math.min(n,s),1),l=Math.max(Math.min(o,r),1),c=Math.max(n,s),d=Math.max(o,r),u=c%a===0&&d%l===0;u&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){const t=Math.abs(Math.round(e)-e);return t<.01}}class I extends l.x{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new C.vl),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new C.vl),e.style.overflow="hidden",this._options=A(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new w(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new y(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,s.Z)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,s.Z)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,s.Z)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new c.pc),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,g.AS)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,f.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){"undefined"!==typeof e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),"undefined"!==typeof e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),"undefined"!==typeof e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),"undefined"!==typeof e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),"undefined"!==typeof e.horizontal&&(this._options.horizontal=e.horizontal),"undefined"!==typeof e.vertical&&(this._options.vertical=e.vertical),"undefined"!==typeof e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),"undefined"!==typeof e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),"undefined"!==typeof e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.$(e))}_setListeningToMouseWheel(e){const t=this._mouseWheelToDispose.length>0;if(t!==e&&(this._mouseWheelToDispose=(0,g.AS)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.$(e))};this._mouseWheelToDispose.push(o.ko(this._listenOnDomNode,o.Bx.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;const t=T.INSTANCE;E&&t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&o+n===0?o=n=0:Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const s=!f.zx&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=x*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(o){const e=x*o,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}if(a=this._scrollable.validateScrollPosition(a),r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop){const e=E&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel();e?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0}}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),k)}}class D extends I{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new S.yE({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>o.PG(o.zk(e),t)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class R extends I{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class N extends I{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new S.yE({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>o.PG(o.zk(e),t)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}))),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function A(e){const t={lazyRender:"undefined"!==typeof e.lazyRender&&e.lazyRender,className:"undefined"!==typeof e.className?e.className:"",useShadows:"undefined"===typeof e.useShadows||e.useShadows,handleMouseWheel:"undefined"===typeof e.handleMouseWheel||e.handleMouseWheel,flipAxes:"undefined"!==typeof e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:"undefined"!==typeof e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:"undefined"!==typeof e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:"undefined"!==typeof e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:"undefined"!==typeof e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:"undefined"!==typeof e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:"undefined"===typeof e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:"undefined"===typeof e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:"undefined"!==typeof e.arrowSize?e.arrowSize:11,listenOnDomNode:"undefined"!==typeof e.listenOnDomNode?e.listenOnDomNode:null,horizontal:"undefined"!==typeof e.horizontal?e.horizontal:1,horizontalScrollbarSize:"undefined"!==typeof e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:"undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:"undefined"!==typeof e.horizontalHasArrows&&e.horizontalHasArrows,vertical:"undefined"!==typeof e.vertical?e.vertical:1,verticalScrollbarSize:"undefined"!==typeof e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:"undefined"!==typeof e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:"undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:"undefined"!==typeof e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize="undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize="undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,f.zx&&(t.className+=" mac"),t}},28925:(e,t,i)=>{"use strict";i.d(t,{m:()=>o});const n=20;class o{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new o(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,o,s){const r=Math.max(0,i-e),a=Math.max(0,r-2*t),l=o>0&&o>i;if(!l)return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(n,Math.floor(i*a/o))),d=(a-c)/(o-i),u=s*d;return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const e=o._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t{"use strict";i.d(t,{U:()=>y,X:()=>b});var n=i(2150),o=i(49822),s=i(53062),r=i(37800),a=i(85053),l=i(85476),c=i(40231),d=i(5091),u=i(19977),h=i(52210),g=i(50322);const p={separatorBorder:l.Q1.transparent};class f{set size(e){this._size=e}get size(){return this._size}get visible(){return"undefined"===typeof this._cachedVisibleSize}setVisible(e,t){if(e!==this.visible){e?(this.size=(0,u.qE)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"===typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{this.view.setVisible?.(e)}catch(e){console.error("Splitview: Failed to set visible view"),console.error(e)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"===typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(e){console.error("Splitview: Failed to layout view"),console.error(e)}}dispose(){this.disposable.dispose()}}class m extends f{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class _ extends f{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var v,b;(function(e){e[e["Idle"]=0]="Idle",e[e["Busy"]=1]="Busy"})(v||(v={})),function(e){function t(e){return{type:"split",index:e}}function i(e){return{type:"auto",index:e}}function n(e){return{type:"invisible",cachedVisibleSize:e}}e.Distribute={type:"distribute"},e.Split=t,e.Auto=i,e.Invisible=n}(b||(b={}));class y extends d.jG{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=v.Idle,this._onDidSashChange=this._register(new c.vl),this._onDidSashReset=this._register(new c.vl),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=t.orientation??0,this.inverseAltBehavior=t.inverseAltBehavior??!1,this.proportionalLayout=t.proportionalLayout??!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,n.BC)(this.el,(0,n.$)(".sash-container")),this.viewContainer=(0,n.$)(".split-view-container"),this.scrollable=this._register(new h.yE({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:e=>(0,n.PG)((0,n.zk)(this.el),e)})),this.scrollableElement=this._register(new r.oO(this.viewContainer,{vertical:0===this.orientation?t.scrollbarVisibility??1:2,horizontal:1===this.orientation?t.scrollbarVisibility??1:2},this.scrollable));const i=this._register(new o.f(this.viewContainer,"scroll")).event;this._register(i((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),(0,n.BC)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||p),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=g.b0(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this._contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i0&&(n.size=(0,u.qE)(Math.round(o*e/t),n.minimumSize,n.maximumSize))}}else{const t=(0,a.y1)(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const o=this.sashItems.findIndex((t=>t.sash===e)),s=(0,d.qE)((0,n.ko)(this.el.ownerDocument.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),(0,n.ko)(this.el.ownerDocument.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,r,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){const e=o===this.sashItems.length-1;if(e){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}}if(!t){const e=(0,a.y1)(o,-1),t=(0,a.y1)(o+1,this.viewItems.length),s=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),d=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),u=Math.max(s,d),h=Math.min(c,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"===typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?u-t:u+t,size:e.size}}if("number"===typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);r={index:p,limitDelta:e.visible?h+t:h-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l,maxDelta:c,alt:t,snapBefore:n,snapAfter:r,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,d=this.resize(t,c,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"===typeof t?t:e.size,t=(0,u.qE)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;try{const i=(0,a.y1)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),s=this.viewItems[e];t=Math.round(t),t=(0,u.qE)(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o)}finally{this.state=v.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,u.qE)(i,t.minimumSize,t.maximumSize);const n=(0,a.y1)(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,o){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;try{const r=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(i));const l=e.onDidChange((e=>this.onViewChange(p,e))),u=(0,d.s)((()=>r.remove())),h=(0,d.qE)(l,u);let g;"number"===typeof t?g=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),g="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const p=0===this.orientation?new m(r,e,g,h):new _(r,e,g,h);if(this.viewItems.splice(i,0,p),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new s.m(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},{...e,orientation:1}):new s.m(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},{...e,orientation:0}),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=c.Jh.map(t.onDidStart,n),r=o(this.onSashStart,this),l=c.Jh.map(t.onDidChange,n),u=l(this.onSashChange,this),h=c.Jh.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),g=h(this.onSashEnd,this),p=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.y1)(e,-1),n=(0,a.y1)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!==typeof o||this.viewItems[o].visible)&&("number"!==typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(e)})),f=(0,d.qE)(r,u,g,p,t),m={sash:t,disposable:f};this.sashItems.splice(i-1,0,m)}let f;r.appendChild(e.element),"number"!==typeof t&&"split"===t.type&&(f=[t.index]),o||this.relayout([i],f),o||"number"===typeof t||"distribute"!==t.type||this.distributeViewSizes()}finally{this.state=v.Idle}}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,s=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const d=(0,a.y1)(e,-1),h=(0,a.y1)(e+1,this.viewItems.length);if(o)for(const e of o)(0,a._A)(d,e),(0,a._A)(h,e);if(n)for(const e of n)(0,a.r7)(d,e),(0,a.r7)(h,e);const g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),f=h.map((e=>this.viewItems[e])),m=h.map((e=>i[e])),_=d.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=d.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===h.length?Number.POSITIVE_INFINITY:h.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),y=0===h.length?Number.NEGATIVE_INFINITY:h.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),w=Math.max(_,y,s),C=Math.min(b,v,r);let S=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;S=i!==e.visible,e.setVisible(i,l.size)}if(!S&&c){const e=this.viewItems[c.index],i=te+t.size),0);let i=this.size-t;const n=(0,a.y1)(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));for(const e of s)(0,a._A)(n,e);for(const e of o)(0,a.r7)(n,e);"number"===typeof e&&(0,a.r7)(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const s=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:u&&t[e]&&(r0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),(0,d.AS)(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}},83092:(e,t,i)=>{"use strict";i.d(t,{F:()=>l,l:()=>c});var n=i(52469),o=i(23740),s=i(40231),r=i(96371),a=i(50799);const l={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class c extends n.x{constructor(e){super(),this._onChange=this._register(new s.vl),this.onChange=this._onChange.event,this._onKeyDown=this._register(new s.vl),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...o.L.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register((0,a.i)().setupManagedHover(e.hoverDelegate??(0,r.nZ)("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},55798:(e,t,i)=>{"use strict";i.d(t,{DO:()=>Q,KP:()=>n,RD:()=>O,vD:()=>A,w0:()=>I});var n,o=i(2150),s=(i(49822),i(68389)),r=(i(48038),i(95994),i(76358)),a=i(90487),l=i(31304),c=i(83092),d=i(41197),u=i(57688),h=(i(55664),i(85053)),g=i(9659),p=i(25923),f=i(23740),m=i(21553),_=i(40231),v=i(10695),b=i(5091),y=i(19977),w=i(50322),C=i(41337),S=(i(96371),i(39751)),k=i(19950);class x extends a.ur{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function E(e){return e instanceof a.ur?new x(e):e}class L{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=b.jG.None,this.disposables=new b.Cm}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart?.(E(e),t)}onDragOver(e,t,i,n,o,s=!0){const r=this.dnd.onDragOver(E(e),t&&t.element,i,n,o),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),"undefined"===typeof t)return r;if(a&&"boolean"!==typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,g.EQ)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500,this.disposables)),"boolean"===typeof r||!r.accept||"undefined"===typeof r.bubble||r.feedback){if(!s){const e="boolean"===typeof r?r:r.accept,t="boolean"===typeof r?void 0:r.effect;return{accept:e,effect:t,feedback:[i]}}return r}if(1===r.bubble){const i=this.modelProvider(),s=i.getNodeLocation(t),r=i.getParentNodeLocation(s),a=i.getNode(r),l=r&&i.getListIndex(r);return this.onDragOver(e,a,l,n,o,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),d=l.getListIndex(c),u=l.getListRenderCount(c);return{...r,feedback:(0,h.y1)(d,d+u)}}drop(e,t,i,n,o){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(E(e),t&&t.element,i,n,o)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function T(e,t){return t&&{...t,identityProvider:t.identityProvider&&{getId(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new L(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return t.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return t.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:t.accessibilityProvider&&{...t.accessibilityProvider,getSetSize(t){const i=e(),n=i.getNodeLocation(t),o=i.getParentNodeLocation(n),s=i.getNode(o);return s.visibleChildrenCount},getPosInSet(e){return e.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}}}class I{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}}(function(e){e["None"]="none",e["OnHover"]="onHover",e["Always"]="always"})(n||(n={}));class D{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new b.Cm,this.onDidChange=_.Jh.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class R{static{this.DefaultIndent=8}constructor(e,t,i,n,o,s={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=R.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=b.jG.None,this.disposables=new b.Cm,this.templateId=e.templateId,this.updateOptions(s),_.Jh.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if("undefined"!==typeof e.indent){const t=(0,y.qE)(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if("undefined"!==typeof e.renderIndentGuides){const t=e.renderIndentGuides!==n.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new b.Cm;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}"undefined"!==typeof e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,o.BC)(e,(0,o.$)(".monaco-tl-row")),i=(0,o.BC)(t,(0,o.$)(".monaco-tl-indent")),n=(0,o.BC)(t,(0,o.$)(".monaco-tl-twistie")),s=(0,o.BC)(t,(0,o.$)(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:b.jG.None,templateData:r}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,i.templateData,n),"number"===typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=R.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...f.L.asClassNameArray(p.W.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...f.L.asClassNameArray(p.W.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,o.w_)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new b.Cm,n=this.modelProvider();while(1){const s=n.getNodeLocation(e),r=n.getParentNodeLocation(s);if(!r)break;const a=n.getNode(r),l=(0,o.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),i.add((0,b.s)((()=>this.renderedIndentGuides.delete(a,l)))),e=a}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch{}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,b.AS)(this.disposables)}}class N{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new b.Cm,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"===typeof n?n?1:0:(0,d.iZ)(n)?(0,d.Mn)(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:v.ne.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(n)?n:[n];for(const e of o){const t=e&&e.toString();if("undefined"===typeof t)return{data:v.ne.Default,visibility:i};let n;if(this.tree.findMatchType===O.Contiguous){const e=t.toLowerCase().indexOf(this._lowercasePattern);if(e>-1){n=[Number.MAX_SAFE_INTEGER,0];for(let t=this._lowercasePattern.length;t>0;t--)n.push(e+t-1)}}else n=(0,v.dt)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===o.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===A.Filter?"number"===typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:v.ne.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,b.AS)(this.disposables)}}c.l;c.l;r.x8,c.F;var A,O;(function(e){e[e["Highlight"]=0]="Highlight",e[e["Filter"]=1]="Filter"})(A||(A={})),function(e){e[e["Fuzzy"]=0]="Fuzzy",e[e["Contiguous"]=1]="Contiguous"}(O||(O={}));b.jG;class P{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,o,s={}){this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=o,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new _.vl,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new _.vl,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new _.vl,this._onDidChangeOpenState=new _.vl,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new b.Cm,this.disposables=new b.Cm,this._mode=e.options.defaultFindMode??A.Highlight,this._matchType=e.options.defaultFindMatchType??O.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&e?((0,k.xE)((0,C.kg)("replFindNoResults","No results")),this.tree.options.showNotFoundMessage??1?this.widget?.showMessage({type:2,content:(0,C.kg)("not found","No elements found.")}):this.widget?.showMessage({type:2})):(this.widget?.clearMessage(),this.pattern&&(0,k.xE)((0,C.kg)("replFindResults","{0} results",this.filter.matchCount)))}shouldAllowFocus(e){return!this.widget||!this.pattern||(this.filter.totalCount>0&&this.filter.matchCount<=1||!v.ne.isDefault(e.filterData))}layout(e){this.width=e,this.widget?.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function M(e,t){return e.position===t.position&&F(e,t)}function F(e,t){return e.node.element===t.node.element&&e.startIndex===t.startIndex&&e.height===t.height&&e.endIndex===t.endIndex}class B{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return(0,h.aI)(this.stickyNodes,e.stickyNodes,M)}lastNodePartiallyVisible(){if(0===this.count)return!1;const e=this.stickyNodes[this.count-1];if(1===this.count)return 0!==e.position;const t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!(0,h.aI)(this.stickyNodes,e.stickyNodes,F))return!1;if(0===this.count)return!1;const t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class W{constrainStickyScrollNodes(e,t,i){for(let n=0;ni||n>=t)return e.slice(0,n)}return e}}class H extends b.jG{constructor(e,t,i,n,o,s={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=o,this.maxWidgetViewRatio=.4;const r=this.validateStickySettings(s);this.stickyScrollMaxItemCount=r.stickyScrollMaxItemCount,this.stickyScrollDelegate=s.stickyScrollDelegate??new W,this._widget=this._register(new V(i.getScrollableElement(),i,e,n,o,s.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll((()=>this.update()))),this._register(i.onDidChangeContentHeight((()=>this.update()))),this._register(e.onDidChangeCollapseState((()=>this.update()))),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(t=0===e?this.view.firstVisibleIndex:this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){const e=this.getNodeAtHeight(0);if(!e||0===this.tree.scrollTop)return void this._widget.setState(void 0);const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[];let i=e,n=0,o=this.getNextStickyNode(i,void 0,n);while(o){if(t.push(o),n+=o.height,t.length<=this.stickyScrollMaxItemCount&&(i=this.getNextVisibleNode(o),!i))break;o=this.getNextStickyNode(i,o.node,n)}const s=this.constrainStickyNodes(t);return s.length?new B(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n){if(n===e){if(!this.nodeIsUncollapsedParent(e))return;if(this.nodeTopAlignsWithStickyNodesBottom(e,i))return}return this.createStickyScrollNode(n,i)}}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),o=t;return this.view.scrollTop===n-o}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:o}=this.getNodeRange(e),s=this.calculateStickyNodePosition(o,t,i);return{node:e,position:s,height:i,startIndex:n,endIndex:o}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);while(n){if(n===t)return i;i=n,n=this.getParentNode(i)}if(void 0===t)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(null===n&&this.view.firstVisibleIndex===e&&e+1a&&t<=a?a-i:t}constrainStickyNodes(e){if(0===e.length)return[];const t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;const n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];const o=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||o.position+o.height>t)throw new Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){const t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);return i}getNodeRange(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");const n=this.model.getListRenderCount(t),o=i+n-1;return{startIndex:i,endIndex:o}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);while(i)t.push(i),i=this.getParentNode(i);let n=0;for(let e=0;e0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i)return this._previousState=void 0,this._previousElements=[],void this._previousStateDisposables.clear();const n=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${n.position}px`;else{this._previousStateDisposables.clear();const t=Array(e.count);for(let i=e.count-1;i>=0;i--){const n=e.stickyNodes[i],{element:o,disposable:s}=this.createElement(n,i,e.count);t[i]=o,this._rootDomNode.appendChild(o),this._previousStateDisposables.add(s)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}createElement(e,t,i){const n=e.startIndex,o=document.createElement("div");o.style.top=`${e.position}px`,!1!==this.tree.options.setRowHeight&&(o.style.height=`${e.height}px`),!1!==this.tree.options.setRowLineHeight&&(o.style.lineHeight=`${e.height}px`),o.classList.add("monaco-tree-sticky-row"),o.classList.add("monaco-list-row"),o.setAttribute("data-index",`${n}`),o.setAttribute("data-parity",n%2===0?"even":"odd"),o.setAttribute("id",this.view.getElementID(n));const s=this.setAccessibilityAttributes(o,e.node.element,t,i),r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find((e=>e.templateId===r));if(!a)throw new Error(`No renderer found for template id ${r}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));const c=a.renderTemplate(o);a.renderElement(l,e.startIndex,c,e.height);const d=(0,b.s)((()=>{s.dispose(),a.disposeElement(l,e.startIndex,c,e.height),a.disposeTemplate(c),o.remove()}));return{element:o,disposable:d}}setAccessibilityAttributes(e,t,i,n){if(!this.accessibilityProvider)return b.jG.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");const o=this.accessibilityProvider.getAriaLabel(t),s=o&&"string"!==typeof o?o:(0,S.lk)(o),r=(0,S.fm)((t=>{const i=t.readObservable(s);i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")}));"string"===typeof o||o&&e.setAttribute("aria-label",o.get());const a=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return"number"===typeof a&&e.setAttribute("aria-level",`${a}`),e.setAttribute("aria-selected",String(!1)),r}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class j extends b.jG{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new _.vl,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new _.vl,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register((0,o.ko)(this.container,"focus",(()=>this.onFocus()))),this._register((0,o.ko)(this.container,"blur",(()=>this.onBlur()))),this._register(this.view.onDidFocus((()=>this.toggleStickyScrollFocused(!1)))),this._register(this.view.onKeyDown((e=>this.onKeyDown(e)))),this._register(this.view.onMouseDown((e=>this.onMouseDown(e)))),this._register(this.view.onContextMenu((e=>this.handleContextMenu(e))))}handleContextMenu(e){const t=e.browserEvent.target;if(!(0,l.Es)(t)&&!(0,l.xu)(t))return void(this.focusedLast()&&this.view.domFocus());if(!(0,o.kx)(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const t=this.state.stickyNodes.findIndex((t=>t.node.element===e.element?.element));if(-1===t)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");return this.container.focus(),void this.setFocus(t)}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const i=this.state.stickyNodes[this.focusedIndex],n=i.node.element,s=this.elements[this.focusedIndex];this._onContextMenu.fire({element:n,anchor:s,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state)if("ArrowUp"===e.key)this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if("ArrowDown"===e.key||"ArrowRight"===e.key){if(this.focusedIndex>=this.state.count-1){const e=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([e]),this.scrollNodeUnderWidget(e,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}onMouseDown(e){const t=e.browserEvent.target;((0,l.Es)(t)||(0,l.xu)(t))&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&0===t.count)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){const e=(0,y.qE)(i,0,t.count-1);this.setFocus(e)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){const t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,o=this.view.getElementTop(e),s=n?n.position+n.height+i.height:i.height;this.view.scrollTop=o-s}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return!!this.state&&this.view.getHTMLElement().classList.contains("sticky-scroll-focused")}removeFocus(){-1!==this.focusedIndex&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){-1!==this.focusedIndex&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||0===this.elements.length)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),-1===this.focusedIndex&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function z(e){let t=u.Lx.Unknown;return(0,o.XD)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=u.Lx.Twistie:(0,o.XD)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=u.Lx.Element:(0,o.XD)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=u.Lx.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function U(e){const t=(0,l.Es)(e.browserEvent.target);return{element:e.element?e.element.element:null,browserEvent:e.browserEvent,anchor:e.anchor,isStickyScroll:t}}function $(e,t){t(e),e.children.forEach((e=>$(e,t)))}class q{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new _.vl,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&(0,h.aI)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>$(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>$(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>$(e,s)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString(),n=i.has(t);if(n){const e=o.get(t);e&&e.visible&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class K extends l.MH{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if((0,l.Bm)(e.browserEvent.target)||(0,l.B6)(e.browserEvent.target)||(0,l.bm)(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,o=(0,l.xu)(e.browserEvent.target);let s=!1;if(s=!!o||("function"===typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick),o)this.handleStickyScrollMouseEvent(e,t);else{if(s&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e)}if(t.collapsible&&(!o||n)){const i=this.tree.getNodeLocation(t),o=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,o),n)return void(e.browserEvent.isHandledByList=!0)}o||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if((0,l.b$)(e.browserEvent.target)||(0,l.W0)(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),o=this.list.getElementTop(n),s=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=o-s,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){const t=e.browserEvent.target.classList.contains("monaco-tl-twistie");!t&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}onMouseDown(e){const t=e.browserEvent.target;(0,l.Es)(t)||(0,l.xu)(t)||super.onMouseDown(e)}onContextMenu(e){const t=e.browserEvent.target;(0,l.Es)(t)||(0,l.xu)(t)||super.onContextMenu(e)}}class G extends l.B8{constructor(e,t,i,n,o,s,r,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=r}createMouseController(e){return new K(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];let s;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(s=e+i)})),n.length>0&&super.setFocus((0,h.dM)([...super.getFocus(),...n])),o.length>0&&super.setSelection((0,h.dM)([...super.getSelection(),...o])),"number"===typeof s&&super.setAnchor(s)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||("undefined"===typeof e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class Q{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return _.Jh.filter(_.Jh.map(this.view.onMouseDblClick,z),(e=>e.target!==u.Lx.Filter))}get onMouseOver(){return _.Jh.map(this.view.onMouseOver,z)}get onMouseOut(){return _.Jh.map(this.view.onMouseOut,z)}get onContextMenu(){return _.Jh.any(_.Jh.filter(_.Jh.map(this.view.onContextMenu,U),(e=>!e.isStickyScroll)),this.stickyScrollController?.onContextMenu??_.Jh.None)}get onPointer(){return _.Jh.map(this.view.onPointer,z)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return _.Jh.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){return this.findController?.mode??A.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){return this.findController?.matchType??O.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return"undefined"===typeof this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return"undefined"===typeof this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,r,a={}){this._user=e,this._options=a,this.eventBufferer=new _.at,this.onDidChangeFindOpenState=_.Jh.None,this.onDidChangeStickyScrollFocused=_.Jh.None,this.disposables=new b.Cm,this._onWillRefilter=new _.vl,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new _.vl,this.treeDelegate=new I(i);const c=new _.Wj,d=new _.Wj,u=this.disposables.add(new D(d.event)),h=new m.db;this.renderers=r.map((e=>new R(e,(()=>this.model),c.event,u,h,a)));for(const e of this.renderers)this.disposables.add(e);let p;a.keyboardNavigationLabelProvider&&(p=new N(this,a.keyboardNavigationLabelProvider,a.filter),a={...a,filter:p},this.disposables.add(p)),this.focus=new q((()=>this.view.getFocusedElements()[0]),a.identityProvider),this.selection=new q((()=>this.view.getSelectedElements()[0]),a.identityProvider),this.anchor=new q((()=>this.view.getAnchorElement()),a.identityProvider),this.view=new G(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...T((()=>this.model),a),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,a),c.input=this.model.onDidChangeCollapseState;const f=_.Jh.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);f((()=>null),null,this.disposables);const v=this.disposables.add(new _.vl),y=this.disposables.add(new g.ve(0));if(this.disposables.add(_.Jh.any(f,this.focus.onDidChange,this.selection.onDidChange)((()=>{y.trigger((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);v.fire([...e.values()])}))}))),d.input=v.event,!1!==a.keyboardSupport){const e=_.Jh.chain(this.view.onKeyDown,(e=>e.filter((e=>!(0,l.B6)(e.target))).map((e=>new s.Z(e)))));_.Jh.chain(e,(e=>e.filter((e=>15===e.keyCode))))(this.onLeftArrow,this,this.disposables),_.Jh.chain(e,(e=>e.filter((e=>17===e.keyCode))))(this.onRightArrow,this,this.disposables),_.Jh.chain(e,(e=>e.filter((e=>10===e.keyCode))))(this.onSpace,this,this.disposables)}if((a.findWidgetEnabled??1)&&a.keyboardNavigationLabelProvider&&a.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new P(this,this.model,this.view,p,a.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=_.Jh.None,this.onDidChangeFindMatchType=_.Jh.None;a.enableStickyScroll&&(this.stickyScrollController=new H(this,this.model,this.view,this.renderers,this.treeDelegate,a),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,o.li)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}updateOptions(e={}){this._options={...this._options,...e};for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new H(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=_.Jh.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t),(0,w.Et)(t)&&this.findController?.layout(t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const n=e.treeStickyScrollBackground??e.listBackground;n&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${n}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${n}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const s=(0,o.gI)(e.listFocusAndSelectionOutline,(0,o.gI)(e.listSelectionOutline,e.listFocusOutline??""));s&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e),i=this.model.getNode(t);return i.element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}))}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}))}focusNext(e=1,t=!1,i,n=((0,o.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=((0,o.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=((0,o.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=((0,o.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusPreviousPage(e,t,(()=>this.stickyScrollController?.height??0))}focusLast(e,t=((0,o.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusLast(e,t)}focusFirst(e,t=((0,o.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(-1!==i)if(this.stickyScrollController){const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}else this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!0);if(!o){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!1);if(!o){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,b.AS)(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose()}}},41197:(e,t,i)=>{"use strict";i.d(t,{G6:()=>g,Mn:()=>u,iZ:()=>d});var n=i(57688),o=i(85053),s=i(9659),r=i(59638),a=i(40651),l=i(40231),c=i(5837);function d(e){return"object"===typeof e&&"visibility"in e&&"data"in e}function u(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function h(e){return"boolean"===typeof e.collapsible}class g{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new l.at,this._onDidChangeCollapseState=new l.vl,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new l.vl,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new l.vl,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new s.ve(r.h),this.collapseByDefault="undefined"!==typeof n.collapseByDefault&&n.collapseByDefault,this.allowNonCollapsibleParents=n.allowNonCollapsibleParents??!1,this.filter=n.filter,this.autoExpandSingleChildren="undefined"!==typeof n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=c.f.empty(),o={}){if(0===e.length)throw new n.jh(this.user,"Invalid tree location");o.diffIdentityProvider?this.spliceSmart(o.diffIdentityProvider,e,t,i,o):this.spliceSimple(e,t,i,o)}spliceSmart(e,t,i,n=c.f.empty(),o,s=o.diffDepth??0){const{parentNode:r}=this.getParentNodeWithListIndex(t);if(!r.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],d=t[t.length-1],u=new a.uP({getElements:()=>r.lastDiffIds},{getElements:()=>[...r.children.slice(0,d),...l,...r.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(u.quitEarly)return r.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),g=(t,i,n)=>{if(s>0)for(let r=0;rt.originalStart-e.originalStart)))g(p,f,p-(e.originalStart+e.originalLength)),p=e.originalStart,f=e.modifiedStart-d,this.spliceSimple([...h,p],e.originalLength,c.f.slice(l,f,f+e.modifiedLength),o);g(p,f,p)}spliceSimple(e,t,i=c.f.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:u}=this.getParentNodeWithListIndex(e),h=[],g=c.f.map(i,(e=>this.createTreeNode(e,a,a.visible?1:0,d,h,n))),p=e[e.length-1];let f=0;for(let e=p;e>=0&&er.getId(e.element).toString()))):a.lastDiffIds=a.children.map((e=>r.getId(e.element).toString())):a.lastDiffIds=void 0;let y=0;for(const e of b)e.visible&&y++;if(0!==y)for(let e=p+m.length;ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(a,v-e),this.list.splice(l,e,h)}if(b.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};b.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:b});let w=a;while(w){if(2===w.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}w=w.parent}}rerender(e){if(0===e.length)throw new n.jh(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:o}=this.getTreeNodeWithListIndex(e);t.visible&&o&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);"undefined"===typeof t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);"undefined"===typeof t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!h(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(h(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!h(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);while(t.parent)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,s){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"===typeof e.collapsible?e.collapsible:"undefined"!==typeof e.collapsed,collapsed:"undefined"===typeof e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&o.push(r);const l=e.children||c.f.empty(),d=n&&0!==a&&!r.collapsed;let u=0,h=1;for(const e of l){const t=this.createTreeNode(e,r,a,d,o,s);r.children.push(t),h+=t.renderNodeCount,t.visible&&(t.visibleChildIndex=u++)}return this.allowNonCollapsibleParents||(r.collapsible=r.collapsible||r.children.length>0),r.visibleChildrenCount=u,r.visible=2===a?u>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=h):(r.renderNodeCount=0,n&&o.pop()),s?.(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)while(e)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"===typeof i?(e.filterData=void 0,i?1:0):d(i)?(e.filterData=i.data,u(i.visibility)):(e.filterData=void 0,u(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...o]=e;if(i<0||i>t.children.length)throw new n.jh(this.user,"Invalid tree location");return this.getTreeNode(o,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:o,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new n.jh(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:o,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,o=!0,s=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new n.jh(this.user,"Invalid tree location");for(let e=0;e{"use strict";var n,o;i.d(t,{Lx:()=>o,Yo:()=>n,jh:()=>s,y2:()=>r}),function(e){e[e["Expanded"]=0]="Expanded",e[e["Collapsed"]=1]="Collapsed",e[e["PreserveOrExpanded"]=2]="PreserveOrExpanded",e[e["PreserveOrCollapsed"]=3]="PreserveOrCollapsed"}(n||(n={})),function(e){e[e["Unknown"]=0]="Unknown",e[e["Twistie"]=1]="Twistie",e[e["Element"]=2]="Element",e[e["Filter"]=3]="Filter"}(o||(o={}));class s extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class r{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}},52469:(e,t,i)=>{"use strict";i.d(t,{x:()=>l});var n=i(2150),o=i(68389),s=i(46274),r=i(25201),a=i(5091);class l extends a.jG{onclick(e,t){this._register(n.ko(e,n.Bx.CLICK,(i=>t(new s.P(n.zk(e),i)))))}onmousedown(e,t){this._register(n.ko(e,n.Bx.MOUSE_DOWN,(i=>t(new s.P(n.zk(e),i)))))}onmouseover(e,t){this._register(n.ko(e,n.Bx.MOUSE_OVER,(i=>t(new s.P(n.zk(e),i)))))}onmouseleave(e,t){this._register(n.ko(e,n.Bx.MOUSE_LEAVE,(i=>t(new s.P(n.zk(e),i)))))}onkeydown(e,t){this._register(n.ko(e,n.Bx.KEY_DOWN,(e=>t(new o.Z(e)))))}onkeyup(e,t){this._register(n.ko(e,n.Bx.KEY_UP,(e=>t(new o.Z(e)))))}oninput(e,t){this._register(n.ko(e,n.Bx.INPUT,t))}onblur(e,t){this._register(n.ko(e,n.Bx.BLUR,t))}onfocus(e,t){this._register(n.ko(e,n.Bx.FOCUS,t))}ignoreGesture(e){return r.q.ignoreTarget(e)}}},62484:(e,t,i)=>{"use strict";function n(e,t){const i=e;"number"!==typeof i.vscodeWindowId&&Object.defineProperty(i,"vscodeWindowId",{get:()=>t})}i.d(t,{G:()=>o,y:()=>n});const o=window},55664:(e,t,i)=>{"use strict";i.d(t,{HJ:()=>d,LN:()=>a,YH:()=>c,ih:()=>u,rc:()=>r,wv:()=>l});var n=i(40231),o=i(5091),s=i(41337);class r extends o.jG{constructor(e,t="",i="",o=!0,s){super(),this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=o,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}}class a extends o.jG{constructor(){super(...arguments),this._onWillRun=this._register(new n.vl),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new n.vl),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;let i;this._onWillRun.fire({action:e});try{await this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}async runAction(e,t){await e.run(t)}}class l{constructor(){this.id=l.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t=t.length?[...t,new l,...i]:i);return t}static{this.ID="vs.actions.separator"}async run(){}}class c{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}async run(){}}class d extends r{static{this.ID="vs.actions.empty"}constructor(){super(d.ID,s.kg("submenu.empty","(empty)"),void 0,!1)}}function u(e){return{id:e.id,label:e.label,tooltip:e.tooltip??e.label,class:e.class,enabled:e.enabled??!0,checked:e.checked,run:async(...t)=>e.run(...t)}}},85053:(e,t,i)=>{"use strict";function n(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function s(e,t,i=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;ni(e[n],t)))}function l(e,t){let i=0,n=e-1;while(i<=n){const e=(i+n)/2|0,o=t(e);if(o<0)i=e+1;else{if(!(o>0))return e;n=e-1}}return-(i+1)}function c(e,t,i){if(e|=0,e>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(const e of t){const t=i(e,n);t<0?o.push(e):t>0?s.push(e):r.push(e)}return e!!e))}function f(e){let t=0;for(let i=0;i0}function v(e,t=e=>e){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function b(e,t){return e.length>0?e[0]:t}function y(e,t){let i="number"===typeof t?e:0;"number"===typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function w(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function C(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function S(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function k(e,t){for(const i of t)e.push(i)}function x(e){return Array.isArray(e)?e:[e]}function E(e,t,i){const n=T(e,t),o=e.length,s=i.length;e.length=o+s;for(let t=o-1;t>=n;t--)e[t+s]=e[t];for(let t=0;tt(e(i),e(n))}function R(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!I.isNeitherLessOrGreaterThan(e))return e}return I.neitherLessOrGreaterThan}}i.d(t,{$z:()=>d,Ct:()=>m,E4:()=>k,EI:()=>_,El:()=>a,Fy:()=>b,Hw:()=>O,RT:()=>n,SK:()=>f,SO:()=>c,TS:()=>A,U9:()=>N,UH:()=>r,V4:()=>L,VE:()=>D,Yc:()=>p,_A:()=>C,_j:()=>x,aI:()=>s,bS:()=>o,c1:()=>M,dM:()=>v,j3:()=>P,kj:()=>g,n:()=>u,nH:()=>R,nK:()=>w,pN:()=>h,r7:()=>S,t9:()=>F,y1:()=>y}),function(e){function t(e){return e<0}function i(e){return e<=0}function n(e){return e>0}function o(e){return 0===e}e.isLessThan=t,e.isLessThanOrEqual=i,e.isGreaterThan=n,e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(I||(I={}));const N=(e,t)=>e-t,A=(e,t)=>N(e?1:0,t?1:0);function O(e){return(t,i)=>-e(t,i)}class P{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;while(t=0&&e(this.items[t]))t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class M{static{this.empty=new M((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new M((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new M((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||I.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}class F{constructor(e){this._indexMap=e}static createSortPermutation(e,t){const i=Array.from(e.keys()).sort(((i,n)=>t(e[i],e[n])));return new F(i)}apply(e){return e.map(((t,i)=>e[this._indexMap[i]]))}inverse(){const e=this._indexMap.slice();for(let t=0;t{"use strict";function n(e,t){const i=o(e,t);if(-1!==i)return e[i]}function o(e,t,i=e.length-1){for(let n=i;n>=0;n--){const i=e[n];if(t(i))return n}return-1}function s(e,t){const i=r(e,t);return-1===i?void 0:e[i]}function r(e,t,i=0,n=e.length){let o=i,s=n;while(od,TM:()=>g,Uk:()=>n,XP:()=>a,hw:()=>l,iM:()=>r,kh:()=>h,lx:()=>s,oH:()=>p,ot:()=>u,vJ:()=>c});class c{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(c.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=r(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}function d(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n0&&(i=o)}return i}function u(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=o)}return i}function h(e,t){return d(e,((e,i)=>-t(e,i)))}function g(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n0&&(i=n)}return i}function p(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}},79109:(e,t,i)=>{"use strict";i.d(t,{Ft:()=>a,V7:()=>r,Xo:()=>l,ok:()=>o,xb:()=>s});var n=i(14396);function o(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function r(e){e||(0,n.dz)(new n.D7("Soft Assertion Failed"))}function a(e){e()||(e(),(0,n.dz)(new n.D7("Assertion Failed")))}function l(e,t){let i=0;while(i{"use strict";i.d(t,{$1:()=>b,$6:()=>S,A0:()=>x,AE:()=>I,EQ:()=>v,F6:()=>E,HC:()=>T,PK:()=>u,Qg:()=>c,SS:()=>d,Th:()=>m,Zv:()=>L,b7:()=>k,bI:()=>R,pc:()=>y,uC:()=>C,vb:()=>w,ve:()=>f,wR:()=>_});var n=i(67792),o=i(14396),s=i(40231),r=i(5091),a=i(25160),l=i(59638);function c(e){return!!e&&"function"===typeof e.then}function d(e){const t=new n.Qi,i=e(t.token),s=new Promise(((e,n)=>{const s=t.token.onCancellationRequested((()=>{s.dispose(),n(new o.AL)}));Promise.resolve(i).then((i=>{s.dispose(),t.dispose(),e(i)}),(e=>{s.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel(),t.dispose()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function u(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class h{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}const g=(e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}},p=e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}};class f{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=t===l.h?p(i):g(t,i),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new o.AL),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}class m{constructor(e){this.delayer=new f(e),this.throttler=new h}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function _(e,t){return t?new Promise(((i,n)=>{const s=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(s),r.dispose(),n(new o.AL)}))})):d((t=>_(e,t)))}function v(e,t=0,i){const n=setTimeout((()=>{e(),i&&o.dispose()}),t),o=(0,r.s)((()=>{clearTimeout(n),i?.deleteAndLeak(o)}));return i?.add(o),o}function b(e,t=e=>!!e,i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++],a=Promise.resolve(r());return a.then((e=>t(e)?Promise.resolve(e):s()))};return s()}class y{constructor(e,t){this._isDisposed=!1,this._token=-1,"function"===typeof e&&"number"===typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new o.D7("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){if(this._isDisposed)throw new o.D7("Calling 'setIfNotSet' on a disposed TimeoutTimer");-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class w{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new o.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const n=i.setInterval((()=>{e()}),t);this.disposable=(0,r.s)((()=>{i.clearInterval(n),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class C{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let S,k;(function(){k="function"!==typeof globalThis.requestIdleCallback||"function"!==typeof globalThis.cancelIdleCallback?(e,t)=>{(0,a._p)((()=>{if(i)return;const e=Date.now()+15,n={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(n))}));let i=!1;return{dispose(){i||(i=!0)}}}:(e,t,i)=>{const n=e.requestIdleCallback(t,"number"===typeof i?{timeout:i}:void 0);let o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},S=e=>k(globalThis,e)})();class x{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=k(e,(()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class E extends x{constructor(e){super(globalThis,e)}}class L{get isRejected(){return 1===this.outcome?.outcome}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new o.AL)}}var T;(function(e){async function t(e){let t;const i=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if("undefined"!==typeof t)throw t;return i}function i(e){return new Promise((async(t,i)=>{try{await e(t,i)}catch(e){i(e)}}))}e.settled=t,e.withAsyncBody=i})(T||(T={}));class I{static fromArray(e){return new I((t=>{t.emitMany(e)}))}static fromPromise(e){return new I((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new I((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new I((async t=>{await Promise.all(e.map((async e=>{for await(const i of e)t.emitOne(i)})))}))}static{this.EMPTY=I.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new s.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new I((async i=>{for await(const n of e)i.emitOne(t(n))}))}map(e){return I.map(this,e)}static filter(e,t){return new I((async i=>{for await(const n of e)t(n)&&i.emitOne(n)}))}filter(e){return I.filter(this,e)}static coalesce(e){return I.filter(e,(e=>!!e))}coalesce(){return I.coalesce(this)}static async toPromise(e){const t=[];for await(const i of e)t.push(i);return t}toPromise(){return I.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}class D extends I{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function R(e){const t=new n.Qi,i=e(t.token);return new D(t,(async e=>{const n=t.token.onCancellationRequested((()=>{n.dispose(),t.dispose(),e.reject(new o.AL)}));try{for await(const n of i){if(t.token.isCancellationRequested)return;e.emitOne(n)}n.dispose(),t.dispose()}catch(i){n.dispose(),t.dispose(),e.reject(i)}}))}},87885:(e,t,i)=>{"use strict";i.d(t,{$l:()=>a,Gs:()=>h,MB:()=>r,Sw:()=>d,bb:()=>c,gN:()=>l,pJ:()=>u});var n=i(85661);const o="undefined"!==typeof Buffer;new n.d((()=>new Uint8Array(256)));let s;class r{static wrap(e){return o&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new r(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return o?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function l(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function c(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function d(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function u(e,t){return e[t]}function h(e,t,i){e[i]=t}},17389:(e,t,i)=>{"use strict";function n(e){return e}i.d(t,{VV:()=>s,o5:()=>o});class o{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"===typeof e?(this._fn=e,this._computeKey=n):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class s{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"===typeof e?(this._fn=e,this._computeKey=n):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const i=this._fn(e);return this._map.set(e,i),this._map2.set(t,i),i}}},67792:(e,t,i)=>{"use strict";i.d(t,{Qi:()=>a,XO:()=>s,bs:()=>l});var n=i(40231);const o=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var s;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof r||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})})(s||(s={}));class r{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=s.None}}function l(e){const t=new a;return e.add({dispose(){t.cancel()}}),t.token}},25923:(e,t,i)=>{"use strict";i.d(t,{W:()=>r});var n=i(79855);const o={add:(0,n.k)("add",6e4),plus:(0,n.k)("plus",6e4),gistNew:(0,n.k)("gist-new",6e4),repoCreate:(0,n.k)("repo-create",6e4),lightbulb:(0,n.k)("lightbulb",60001),lightBulb:(0,n.k)("light-bulb",60001),repo:(0,n.k)("repo",60002),repoDelete:(0,n.k)("repo-delete",60002),gistFork:(0,n.k)("gist-fork",60003),repoForked:(0,n.k)("repo-forked",60003),gitPullRequest:(0,n.k)("git-pull-request",60004),gitPullRequestAbandoned:(0,n.k)("git-pull-request-abandoned",60004),recordKeys:(0,n.k)("record-keys",60005),keyboard:(0,n.k)("keyboard",60005),tag:(0,n.k)("tag",60006),gitPullRequestLabel:(0,n.k)("git-pull-request-label",60006),tagAdd:(0,n.k)("tag-add",60006),tagRemove:(0,n.k)("tag-remove",60006),person:(0,n.k)("person",60007),personFollow:(0,n.k)("person-follow",60007),personOutline:(0,n.k)("person-outline",60007),personFilled:(0,n.k)("person-filled",60007),gitBranch:(0,n.k)("git-branch",60008),gitBranchCreate:(0,n.k)("git-branch-create",60008),gitBranchDelete:(0,n.k)("git-branch-delete",60008),sourceControl:(0,n.k)("source-control",60008),mirror:(0,n.k)("mirror",60009),mirrorPublic:(0,n.k)("mirror-public",60009),star:(0,n.k)("star",60010),starAdd:(0,n.k)("star-add",60010),starDelete:(0,n.k)("star-delete",60010),starEmpty:(0,n.k)("star-empty",60010),comment:(0,n.k)("comment",60011),commentAdd:(0,n.k)("comment-add",60011),alert:(0,n.k)("alert",60012),warning:(0,n.k)("warning",60012),search:(0,n.k)("search",60013),searchSave:(0,n.k)("search-save",60013),logOut:(0,n.k)("log-out",60014),signOut:(0,n.k)("sign-out",60014),logIn:(0,n.k)("log-in",60015),signIn:(0,n.k)("sign-in",60015),eye:(0,n.k)("eye",60016),eyeUnwatch:(0,n.k)("eye-unwatch",60016),eyeWatch:(0,n.k)("eye-watch",60016),circleFilled:(0,n.k)("circle-filled",60017),primitiveDot:(0,n.k)("primitive-dot",60017),closeDirty:(0,n.k)("close-dirty",60017),debugBreakpoint:(0,n.k)("debug-breakpoint",60017),debugBreakpointDisabled:(0,n.k)("debug-breakpoint-disabled",60017),debugHint:(0,n.k)("debug-hint",60017),terminalDecorationSuccess:(0,n.k)("terminal-decoration-success",60017),primitiveSquare:(0,n.k)("primitive-square",60018),edit:(0,n.k)("edit",60019),pencil:(0,n.k)("pencil",60019),info:(0,n.k)("info",60020),issueOpened:(0,n.k)("issue-opened",60020),gistPrivate:(0,n.k)("gist-private",60021),gitForkPrivate:(0,n.k)("git-fork-private",60021),lock:(0,n.k)("lock",60021),mirrorPrivate:(0,n.k)("mirror-private",60021),close:(0,n.k)("close",60022),removeClose:(0,n.k)("remove-close",60022),x:(0,n.k)("x",60022),repoSync:(0,n.k)("repo-sync",60023),sync:(0,n.k)("sync",60023),clone:(0,n.k)("clone",60024),desktopDownload:(0,n.k)("desktop-download",60024),beaker:(0,n.k)("beaker",60025),microscope:(0,n.k)("microscope",60025),vm:(0,n.k)("vm",60026),deviceDesktop:(0,n.k)("device-desktop",60026),file:(0,n.k)("file",60027),fileText:(0,n.k)("file-text",60027),more:(0,n.k)("more",60028),ellipsis:(0,n.k)("ellipsis",60028),kebabHorizontal:(0,n.k)("kebab-horizontal",60028),mailReply:(0,n.k)("mail-reply",60029),reply:(0,n.k)("reply",60029),organization:(0,n.k)("organization",60030),organizationFilled:(0,n.k)("organization-filled",60030),organizationOutline:(0,n.k)("organization-outline",60030),newFile:(0,n.k)("new-file",60031),fileAdd:(0,n.k)("file-add",60031),newFolder:(0,n.k)("new-folder",60032),fileDirectoryCreate:(0,n.k)("file-directory-create",60032),trash:(0,n.k)("trash",60033),trashcan:(0,n.k)("trashcan",60033),history:(0,n.k)("history",60034),clock:(0,n.k)("clock",60034),folder:(0,n.k)("folder",60035),fileDirectory:(0,n.k)("file-directory",60035),symbolFolder:(0,n.k)("symbol-folder",60035),logoGithub:(0,n.k)("logo-github",60036),markGithub:(0,n.k)("mark-github",60036),github:(0,n.k)("github",60036),terminal:(0,n.k)("terminal",60037),console:(0,n.k)("console",60037),repl:(0,n.k)("repl",60037),zap:(0,n.k)("zap",60038),symbolEvent:(0,n.k)("symbol-event",60038),error:(0,n.k)("error",60039),stop:(0,n.k)("stop",60039),variable:(0,n.k)("variable",60040),symbolVariable:(0,n.k)("symbol-variable",60040),array:(0,n.k)("array",60042),symbolArray:(0,n.k)("symbol-array",60042),symbolModule:(0,n.k)("symbol-module",60043),symbolPackage:(0,n.k)("symbol-package",60043),symbolNamespace:(0,n.k)("symbol-namespace",60043),symbolObject:(0,n.k)("symbol-object",60043),symbolMethod:(0,n.k)("symbol-method",60044),symbolFunction:(0,n.k)("symbol-function",60044),symbolConstructor:(0,n.k)("symbol-constructor",60044),symbolBoolean:(0,n.k)("symbol-boolean",60047),symbolNull:(0,n.k)("symbol-null",60047),symbolNumeric:(0,n.k)("symbol-numeric",60048),symbolNumber:(0,n.k)("symbol-number",60048),symbolStructure:(0,n.k)("symbol-structure",60049),symbolStruct:(0,n.k)("symbol-struct",60049),symbolParameter:(0,n.k)("symbol-parameter",60050),symbolTypeParameter:(0,n.k)("symbol-type-parameter",60050),symbolKey:(0,n.k)("symbol-key",60051),symbolText:(0,n.k)("symbol-text",60051),symbolReference:(0,n.k)("symbol-reference",60052),goToFile:(0,n.k)("go-to-file",60052),symbolEnum:(0,n.k)("symbol-enum",60053),symbolValue:(0,n.k)("symbol-value",60053),symbolRuler:(0,n.k)("symbol-ruler",60054),symbolUnit:(0,n.k)("symbol-unit",60054),activateBreakpoints:(0,n.k)("activate-breakpoints",60055),archive:(0,n.k)("archive",60056),arrowBoth:(0,n.k)("arrow-both",60057),arrowDown:(0,n.k)("arrow-down",60058),arrowLeft:(0,n.k)("arrow-left",60059),arrowRight:(0,n.k)("arrow-right",60060),arrowSmallDown:(0,n.k)("arrow-small-down",60061),arrowSmallLeft:(0,n.k)("arrow-small-left",60062),arrowSmallRight:(0,n.k)("arrow-small-right",60063),arrowSmallUp:(0,n.k)("arrow-small-up",60064),arrowUp:(0,n.k)("arrow-up",60065),bell:(0,n.k)("bell",60066),bold:(0,n.k)("bold",60067),book:(0,n.k)("book",60068),bookmark:(0,n.k)("bookmark",60069),debugBreakpointConditionalUnverified:(0,n.k)("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:(0,n.k)("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:(0,n.k)("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:(0,n.k)("debug-breakpoint-data-unverified",60072),debugBreakpointData:(0,n.k)("debug-breakpoint-data",60073),debugBreakpointDataDisabled:(0,n.k)("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:(0,n.k)("debug-breakpoint-log-unverified",60074),debugBreakpointLog:(0,n.k)("debug-breakpoint-log",60075),debugBreakpointLogDisabled:(0,n.k)("debug-breakpoint-log-disabled",60075),briefcase:(0,n.k)("briefcase",60076),broadcast:(0,n.k)("broadcast",60077),browser:(0,n.k)("browser",60078),bug:(0,n.k)("bug",60079),calendar:(0,n.k)("calendar",60080),caseSensitive:(0,n.k)("case-sensitive",60081),check:(0,n.k)("check",60082),checklist:(0,n.k)("checklist",60083),chevronDown:(0,n.k)("chevron-down",60084),chevronLeft:(0,n.k)("chevron-left",60085),chevronRight:(0,n.k)("chevron-right",60086),chevronUp:(0,n.k)("chevron-up",60087),chromeClose:(0,n.k)("chrome-close",60088),chromeMaximize:(0,n.k)("chrome-maximize",60089),chromeMinimize:(0,n.k)("chrome-minimize",60090),chromeRestore:(0,n.k)("chrome-restore",60091),circleOutline:(0,n.k)("circle-outline",60092),circle:(0,n.k)("circle",60092),debugBreakpointUnverified:(0,n.k)("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:(0,n.k)("terminal-decoration-incomplete",60092),circleSlash:(0,n.k)("circle-slash",60093),circuitBoard:(0,n.k)("circuit-board",60094),clearAll:(0,n.k)("clear-all",60095),clippy:(0,n.k)("clippy",60096),closeAll:(0,n.k)("close-all",60097),cloudDownload:(0,n.k)("cloud-download",60098),cloudUpload:(0,n.k)("cloud-upload",60099),code:(0,n.k)("code",60100),collapseAll:(0,n.k)("collapse-all",60101),colorMode:(0,n.k)("color-mode",60102),commentDiscussion:(0,n.k)("comment-discussion",60103),creditCard:(0,n.k)("credit-card",60105),dash:(0,n.k)("dash",60108),dashboard:(0,n.k)("dashboard",60109),database:(0,n.k)("database",60110),debugContinue:(0,n.k)("debug-continue",60111),debugDisconnect:(0,n.k)("debug-disconnect",60112),debugPause:(0,n.k)("debug-pause",60113),debugRestart:(0,n.k)("debug-restart",60114),debugStart:(0,n.k)("debug-start",60115),debugStepInto:(0,n.k)("debug-step-into",60116),debugStepOut:(0,n.k)("debug-step-out",60117),debugStepOver:(0,n.k)("debug-step-over",60118),debugStop:(0,n.k)("debug-stop",60119),debug:(0,n.k)("debug",60120),deviceCameraVideo:(0,n.k)("device-camera-video",60121),deviceCamera:(0,n.k)("device-camera",60122),deviceMobile:(0,n.k)("device-mobile",60123),diffAdded:(0,n.k)("diff-added",60124),diffIgnored:(0,n.k)("diff-ignored",60125),diffModified:(0,n.k)("diff-modified",60126),diffRemoved:(0,n.k)("diff-removed",60127),diffRenamed:(0,n.k)("diff-renamed",60128),diff:(0,n.k)("diff",60129),diffSidebyside:(0,n.k)("diff-sidebyside",60129),discard:(0,n.k)("discard",60130),editorLayout:(0,n.k)("editor-layout",60131),emptyWindow:(0,n.k)("empty-window",60132),exclude:(0,n.k)("exclude",60133),extensions:(0,n.k)("extensions",60134),eyeClosed:(0,n.k)("eye-closed",60135),fileBinary:(0,n.k)("file-binary",60136),fileCode:(0,n.k)("file-code",60137),fileMedia:(0,n.k)("file-media",60138),filePdf:(0,n.k)("file-pdf",60139),fileSubmodule:(0,n.k)("file-submodule",60140),fileSymlinkDirectory:(0,n.k)("file-symlink-directory",60141),fileSymlinkFile:(0,n.k)("file-symlink-file",60142),fileZip:(0,n.k)("file-zip",60143),files:(0,n.k)("files",60144),filter:(0,n.k)("filter",60145),flame:(0,n.k)("flame",60146),foldDown:(0,n.k)("fold-down",60147),foldUp:(0,n.k)("fold-up",60148),fold:(0,n.k)("fold",60149),folderActive:(0,n.k)("folder-active",60150),folderOpened:(0,n.k)("folder-opened",60151),gear:(0,n.k)("gear",60152),gift:(0,n.k)("gift",60153),gistSecret:(0,n.k)("gist-secret",60154),gist:(0,n.k)("gist",60155),gitCommit:(0,n.k)("git-commit",60156),gitCompare:(0,n.k)("git-compare",60157),compareChanges:(0,n.k)("compare-changes",60157),gitMerge:(0,n.k)("git-merge",60158),githubAction:(0,n.k)("github-action",60159),githubAlt:(0,n.k)("github-alt",60160),globe:(0,n.k)("globe",60161),grabber:(0,n.k)("grabber",60162),graph:(0,n.k)("graph",60163),gripper:(0,n.k)("gripper",60164),heart:(0,n.k)("heart",60165),home:(0,n.k)("home",60166),horizontalRule:(0,n.k)("horizontal-rule",60167),hubot:(0,n.k)("hubot",60168),inbox:(0,n.k)("inbox",60169),issueReopened:(0,n.k)("issue-reopened",60171),issues:(0,n.k)("issues",60172),italic:(0,n.k)("italic",60173),jersey:(0,n.k)("jersey",60174),json:(0,n.k)("json",60175),kebabVertical:(0,n.k)("kebab-vertical",60176),key:(0,n.k)("key",60177),law:(0,n.k)("law",60178),lightbulbAutofix:(0,n.k)("lightbulb-autofix",60179),linkExternal:(0,n.k)("link-external",60180),link:(0,n.k)("link",60181),listOrdered:(0,n.k)("list-ordered",60182),listUnordered:(0,n.k)("list-unordered",60183),liveShare:(0,n.k)("live-share",60184),loading:(0,n.k)("loading",60185),location:(0,n.k)("location",60186),mailRead:(0,n.k)("mail-read",60187),mail:(0,n.k)("mail",60188),markdown:(0,n.k)("markdown",60189),megaphone:(0,n.k)("megaphone",60190),mention:(0,n.k)("mention",60191),milestone:(0,n.k)("milestone",60192),gitPullRequestMilestone:(0,n.k)("git-pull-request-milestone",60192),mortarBoard:(0,n.k)("mortar-board",60193),move:(0,n.k)("move",60194),multipleWindows:(0,n.k)("multiple-windows",60195),mute:(0,n.k)("mute",60196),noNewline:(0,n.k)("no-newline",60197),note:(0,n.k)("note",60198),octoface:(0,n.k)("octoface",60199),openPreview:(0,n.k)("open-preview",60200),package:(0,n.k)("package",60201),paintcan:(0,n.k)("paintcan",60202),pin:(0,n.k)("pin",60203),play:(0,n.k)("play",60204),run:(0,n.k)("run",60204),plug:(0,n.k)("plug",60205),preserveCase:(0,n.k)("preserve-case",60206),preview:(0,n.k)("preview",60207),project:(0,n.k)("project",60208),pulse:(0,n.k)("pulse",60209),question:(0,n.k)("question",60210),quote:(0,n.k)("quote",60211),radioTower:(0,n.k)("radio-tower",60212),reactions:(0,n.k)("reactions",60213),references:(0,n.k)("references",60214),refresh:(0,n.k)("refresh",60215),regex:(0,n.k)("regex",60216),remoteExplorer:(0,n.k)("remote-explorer",60217),remote:(0,n.k)("remote",60218),remove:(0,n.k)("remove",60219),replaceAll:(0,n.k)("replace-all",60220),replace:(0,n.k)("replace",60221),repoClone:(0,n.k)("repo-clone",60222),repoForcePush:(0,n.k)("repo-force-push",60223),repoPull:(0,n.k)("repo-pull",60224),repoPush:(0,n.k)("repo-push",60225),report:(0,n.k)("report",60226),requestChanges:(0,n.k)("request-changes",60227),rocket:(0,n.k)("rocket",60228),rootFolderOpened:(0,n.k)("root-folder-opened",60229),rootFolder:(0,n.k)("root-folder",60230),rss:(0,n.k)("rss",60231),ruby:(0,n.k)("ruby",60232),saveAll:(0,n.k)("save-all",60233),saveAs:(0,n.k)("save-as",60234),save:(0,n.k)("save",60235),screenFull:(0,n.k)("screen-full",60236),screenNormal:(0,n.k)("screen-normal",60237),searchStop:(0,n.k)("search-stop",60238),server:(0,n.k)("server",60240),settingsGear:(0,n.k)("settings-gear",60241),settings:(0,n.k)("settings",60242),shield:(0,n.k)("shield",60243),smiley:(0,n.k)("smiley",60244),sortPrecedence:(0,n.k)("sort-precedence",60245),splitHorizontal:(0,n.k)("split-horizontal",60246),splitVertical:(0,n.k)("split-vertical",60247),squirrel:(0,n.k)("squirrel",60248),starFull:(0,n.k)("star-full",60249),starHalf:(0,n.k)("star-half",60250),symbolClass:(0,n.k)("symbol-class",60251),symbolColor:(0,n.k)("symbol-color",60252),symbolConstant:(0,n.k)("symbol-constant",60253),symbolEnumMember:(0,n.k)("symbol-enum-member",60254),symbolField:(0,n.k)("symbol-field",60255),symbolFile:(0,n.k)("symbol-file",60256),symbolInterface:(0,n.k)("symbol-interface",60257),symbolKeyword:(0,n.k)("symbol-keyword",60258),symbolMisc:(0,n.k)("symbol-misc",60259),symbolOperator:(0,n.k)("symbol-operator",60260),symbolProperty:(0,n.k)("symbol-property",60261),wrench:(0,n.k)("wrench",60261),wrenchSubaction:(0,n.k)("wrench-subaction",60261),symbolSnippet:(0,n.k)("symbol-snippet",60262),tasklist:(0,n.k)("tasklist",60263),telescope:(0,n.k)("telescope",60264),textSize:(0,n.k)("text-size",60265),threeBars:(0,n.k)("three-bars",60266),thumbsdown:(0,n.k)("thumbsdown",60267),thumbsup:(0,n.k)("thumbsup",60268),tools:(0,n.k)("tools",60269),triangleDown:(0,n.k)("triangle-down",60270),triangleLeft:(0,n.k)("triangle-left",60271),triangleRight:(0,n.k)("triangle-right",60272),triangleUp:(0,n.k)("triangle-up",60273),twitter:(0,n.k)("twitter",60274),unfold:(0,n.k)("unfold",60275),unlock:(0,n.k)("unlock",60276),unmute:(0,n.k)("unmute",60277),unverified:(0,n.k)("unverified",60278),verified:(0,n.k)("verified",60279),versions:(0,n.k)("versions",60280),vmActive:(0,n.k)("vm-active",60281),vmOutline:(0,n.k)("vm-outline",60282),vmRunning:(0,n.k)("vm-running",60283),watch:(0,n.k)("watch",60284),whitespace:(0,n.k)("whitespace",60285),wholeWord:(0,n.k)("whole-word",60286),window:(0,n.k)("window",60287),wordWrap:(0,n.k)("word-wrap",60288),zoomIn:(0,n.k)("zoom-in",60289),zoomOut:(0,n.k)("zoom-out",60290),listFilter:(0,n.k)("list-filter",60291),listFlat:(0,n.k)("list-flat",60292),listSelection:(0,n.k)("list-selection",60293),selection:(0,n.k)("selection",60293),listTree:(0,n.k)("list-tree",60294),debugBreakpointFunctionUnverified:(0,n.k)("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:(0,n.k)("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:(0,n.k)("debug-breakpoint-function-disabled",60296),debugStackframeActive:(0,n.k)("debug-stackframe-active",60297),circleSmallFilled:(0,n.k)("circle-small-filled",60298),debugStackframeDot:(0,n.k)("debug-stackframe-dot",60298),terminalDecorationMark:(0,n.k)("terminal-decoration-mark",60298),debugStackframe:(0,n.k)("debug-stackframe",60299),debugStackframeFocused:(0,n.k)("debug-stackframe-focused",60299),debugBreakpointUnsupported:(0,n.k)("debug-breakpoint-unsupported",60300),symbolString:(0,n.k)("symbol-string",60301),debugReverseContinue:(0,n.k)("debug-reverse-continue",60302),debugStepBack:(0,n.k)("debug-step-back",60303),debugRestartFrame:(0,n.k)("debug-restart-frame",60304),debugAlt:(0,n.k)("debug-alt",60305),callIncoming:(0,n.k)("call-incoming",60306),callOutgoing:(0,n.k)("call-outgoing",60307),menu:(0,n.k)("menu",60308),expandAll:(0,n.k)("expand-all",60309),feedback:(0,n.k)("feedback",60310),gitPullRequestReviewer:(0,n.k)("git-pull-request-reviewer",60310),groupByRefType:(0,n.k)("group-by-ref-type",60311),ungroupByRefType:(0,n.k)("ungroup-by-ref-type",60312),account:(0,n.k)("account",60313),gitPullRequestAssignee:(0,n.k)("git-pull-request-assignee",60313),bellDot:(0,n.k)("bell-dot",60314),debugConsole:(0,n.k)("debug-console",60315),library:(0,n.k)("library",60316),output:(0,n.k)("output",60317),runAll:(0,n.k)("run-all",60318),syncIgnored:(0,n.k)("sync-ignored",60319),pinned:(0,n.k)("pinned",60320),githubInverted:(0,n.k)("github-inverted",60321),serverProcess:(0,n.k)("server-process",60322),serverEnvironment:(0,n.k)("server-environment",60323),pass:(0,n.k)("pass",60324),issueClosed:(0,n.k)("issue-closed",60324),stopCircle:(0,n.k)("stop-circle",60325),playCircle:(0,n.k)("play-circle",60326),record:(0,n.k)("record",60327),debugAltSmall:(0,n.k)("debug-alt-small",60328),vmConnect:(0,n.k)("vm-connect",60329),cloud:(0,n.k)("cloud",60330),merge:(0,n.k)("merge",60331),export:(0,n.k)("export",60332),graphLeft:(0,n.k)("graph-left",60333),magnet:(0,n.k)("magnet",60334),notebook:(0,n.k)("notebook",60335),redo:(0,n.k)("redo",60336),checkAll:(0,n.k)("check-all",60337),pinnedDirty:(0,n.k)("pinned-dirty",60338),passFilled:(0,n.k)("pass-filled",60339),circleLargeFilled:(0,n.k)("circle-large-filled",60340),circleLarge:(0,n.k)("circle-large",60341),circleLargeOutline:(0,n.k)("circle-large-outline",60341),combine:(0,n.k)("combine",60342),gather:(0,n.k)("gather",60342),table:(0,n.k)("table",60343),variableGroup:(0,n.k)("variable-group",60344),typeHierarchy:(0,n.k)("type-hierarchy",60345),typeHierarchySub:(0,n.k)("type-hierarchy-sub",60346),typeHierarchySuper:(0,n.k)("type-hierarchy-super",60347),gitPullRequestCreate:(0,n.k)("git-pull-request-create",60348),runAbove:(0,n.k)("run-above",60349),runBelow:(0,n.k)("run-below",60350),notebookTemplate:(0,n.k)("notebook-template",60351),debugRerun:(0,n.k)("debug-rerun",60352),workspaceTrusted:(0,n.k)("workspace-trusted",60353),workspaceUntrusted:(0,n.k)("workspace-untrusted",60354),workspaceUnknown:(0,n.k)("workspace-unknown",60355),terminalCmd:(0,n.k)("terminal-cmd",60356),terminalDebian:(0,n.k)("terminal-debian",60357),terminalLinux:(0,n.k)("terminal-linux",60358),terminalPowershell:(0,n.k)("terminal-powershell",60359),terminalTmux:(0,n.k)("terminal-tmux",60360),terminalUbuntu:(0,n.k)("terminal-ubuntu",60361),terminalBash:(0,n.k)("terminal-bash",60362),arrowSwap:(0,n.k)("arrow-swap",60363),copy:(0,n.k)("copy",60364),personAdd:(0,n.k)("person-add",60365),filterFilled:(0,n.k)("filter-filled",60366),wand:(0,n.k)("wand",60367),debugLineByLine:(0,n.k)("debug-line-by-line",60368),inspect:(0,n.k)("inspect",60369),layers:(0,n.k)("layers",60370),layersDot:(0,n.k)("layers-dot",60371),layersActive:(0,n.k)("layers-active",60372),compass:(0,n.k)("compass",60373),compassDot:(0,n.k)("compass-dot",60374),compassActive:(0,n.k)("compass-active",60375),azure:(0,n.k)("azure",60376),issueDraft:(0,n.k)("issue-draft",60377),gitPullRequestClosed:(0,n.k)("git-pull-request-closed",60378),gitPullRequestDraft:(0,n.k)("git-pull-request-draft",60379),debugAll:(0,n.k)("debug-all",60380),debugCoverage:(0,n.k)("debug-coverage",60381),runErrors:(0,n.k)("run-errors",60382),folderLibrary:(0,n.k)("folder-library",60383),debugContinueSmall:(0,n.k)("debug-continue-small",60384),beakerStop:(0,n.k)("beaker-stop",60385),graphLine:(0,n.k)("graph-line",60386),graphScatter:(0,n.k)("graph-scatter",60387),pieChart:(0,n.k)("pie-chart",60388),bracket:(0,n.k)("bracket",60175),bracketDot:(0,n.k)("bracket-dot",60389),bracketError:(0,n.k)("bracket-error",60390),lockSmall:(0,n.k)("lock-small",60391),azureDevops:(0,n.k)("azure-devops",60392),verifiedFilled:(0,n.k)("verified-filled",60393),newline:(0,n.k)("newline",60394),layout:(0,n.k)("layout",60395),layoutActivitybarLeft:(0,n.k)("layout-activitybar-left",60396),layoutActivitybarRight:(0,n.k)("layout-activitybar-right",60397),layoutPanelLeft:(0,n.k)("layout-panel-left",60398),layoutPanelCenter:(0,n.k)("layout-panel-center",60399),layoutPanelJustify:(0,n.k)("layout-panel-justify",60400),layoutPanelRight:(0,n.k)("layout-panel-right",60401),layoutPanel:(0,n.k)("layout-panel",60402),layoutSidebarLeft:(0,n.k)("layout-sidebar-left",60403),layoutSidebarRight:(0,n.k)("layout-sidebar-right",60404),layoutStatusbar:(0,n.k)("layout-statusbar",60405),layoutMenubar:(0,n.k)("layout-menubar",60406),layoutCentered:(0,n.k)("layout-centered",60407),target:(0,n.k)("target",60408),indent:(0,n.k)("indent",60409),recordSmall:(0,n.k)("record-small",60410),errorSmall:(0,n.k)("error-small",60411),terminalDecorationError:(0,n.k)("terminal-decoration-error",60411),arrowCircleDown:(0,n.k)("arrow-circle-down",60412),arrowCircleLeft:(0,n.k)("arrow-circle-left",60413),arrowCircleRight:(0,n.k)("arrow-circle-right",60414),arrowCircleUp:(0,n.k)("arrow-circle-up",60415),layoutSidebarRightOff:(0,n.k)("layout-sidebar-right-off",60416),layoutPanelOff:(0,n.k)("layout-panel-off",60417),layoutSidebarLeftOff:(0,n.k)("layout-sidebar-left-off",60418),blank:(0,n.k)("blank",60419),heartFilled:(0,n.k)("heart-filled",60420),map:(0,n.k)("map",60421),mapHorizontal:(0,n.k)("map-horizontal",60421),foldHorizontal:(0,n.k)("fold-horizontal",60421),mapFilled:(0,n.k)("map-filled",60422),mapHorizontalFilled:(0,n.k)("map-horizontal-filled",60422),foldHorizontalFilled:(0,n.k)("fold-horizontal-filled",60422),circleSmall:(0,n.k)("circle-small",60423),bellSlash:(0,n.k)("bell-slash",60424),bellSlashDot:(0,n.k)("bell-slash-dot",60425),commentUnresolved:(0,n.k)("comment-unresolved",60426),gitPullRequestGoToChanges:(0,n.k)("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:(0,n.k)("git-pull-request-new-changes",60428),searchFuzzy:(0,n.k)("search-fuzzy",60429),commentDraft:(0,n.k)("comment-draft",60430),send:(0,n.k)("send",60431),sparkle:(0,n.k)("sparkle",60432),insert:(0,n.k)("insert",60433),mic:(0,n.k)("mic",60434),thumbsdownFilled:(0,n.k)("thumbsdown-filled",60435),thumbsupFilled:(0,n.k)("thumbsup-filled",60436),coffee:(0,n.k)("coffee",60437),snake:(0,n.k)("snake",60438),game:(0,n.k)("game",60439),vr:(0,n.k)("vr",60440),chip:(0,n.k)("chip",60441),piano:(0,n.k)("piano",60442),music:(0,n.k)("music",60443),micFilled:(0,n.k)("mic-filled",60444),repoFetch:(0,n.k)("repo-fetch",60445),copilot:(0,n.k)("copilot",60446),lightbulbSparkle:(0,n.k)("lightbulb-sparkle",60447),robot:(0,n.k)("robot",60448),sparkleFilled:(0,n.k)("sparkle-filled",60449),diffSingle:(0,n.k)("diff-single",60450),diffMultiple:(0,n.k)("diff-multiple",60451),surroundWith:(0,n.k)("surround-with",60452),share:(0,n.k)("share",60453),gitStash:(0,n.k)("git-stash",60454),gitStashApply:(0,n.k)("git-stash-apply",60455),gitStashPop:(0,n.k)("git-stash-pop",60456),vscode:(0,n.k)("vscode",60457),vscodeInsiders:(0,n.k)("vscode-insiders",60458),codeOss:(0,n.k)("code-oss",60459),runCoverage:(0,n.k)("run-coverage",60460),runAllCoverage:(0,n.k)("run-all-coverage",60461),coverage:(0,n.k)("coverage",60462),githubProject:(0,n.k)("github-project",60463),mapVertical:(0,n.k)("map-vertical",60464),foldVertical:(0,n.k)("fold-vertical",60464),mapVerticalFilled:(0,n.k)("map-vertical-filled",60465),foldVerticalFilled:(0,n.k)("fold-vertical-filled",60465),goToSearch:(0,n.k)("go-to-search",60466),percentage:(0,n.k)("percentage",60467),sortPercentage:(0,n.k)("sort-percentage",60467),attach:(0,n.k)("attach",60468)},s={dialogError:(0,n.k)("dialog-error","error"),dialogWarning:(0,n.k)("dialog-warning","warning"),dialogInfo:(0,n.k)("dialog-info","info"),dialogClose:(0,n.k)("dialog-close","close"),treeItemExpanded:(0,n.k)("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:(0,n.k)("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:(0,n.k)("tree-filter-on-type-off","list-selection"),treeFilterClear:(0,n.k)("tree-filter-clear","close"),treeItemLoading:(0,n.k)("tree-item-loading","loading"),menuSelection:(0,n.k)("menu-selection","check"),menuSubmenu:(0,n.k)("menu-submenu","chevron-right"),menuBarMore:(0,n.k)("menubar-more","more"),scrollbarButtonLeft:(0,n.k)("scrollbar-button-left","triangle-left"),scrollbarButtonRight:(0,n.k)("scrollbar-button-right","triangle-right"),scrollbarButtonUp:(0,n.k)("scrollbar-button-up","triangle-up"),scrollbarButtonDown:(0,n.k)("scrollbar-button-down","triangle-down"),toolBarMore:(0,n.k)("toolbar-more","more"),quickInputBack:(0,n.k)("quick-input-back","arrow-left"),dropDownButton:(0,n.k)("drop-down-button",60084),symbolCustomColor:(0,n.k)("symbol-customcolor",60252),exportIcon:(0,n.k)("export",60332),workspaceUnspecified:(0,n.k)("workspace-unspecified",60355),newLine:(0,n.k)("newline",60394),thumbsDownFilled:(0,n.k)("thumbsdown-filled",60435),thumbsUpFilled:(0,n.k)("thumbsup-filled",60436),gitFetch:(0,n.k)("git-fetch",60445),lightbulbSparkleAutofix:(0,n.k)("lightbulb-sparkle-autofix",60447),debugBreakpointPending:(0,n.k)("debug-breakpoint-pending",60377)},r={...o,...s}},79855:(e,t,i)=>{"use strict";i.d(t,{J:()=>r,k:()=>s});var n=i(50322);const o=Object.create(null);function s(e,t){if((0,n.Kg)(t)){const i=o[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return o[e]=t,{id:e}}function r(){return o}},52782:(e,t,i)=>{"use strict";function n(e,t){const i=[],n=[];for(const n of e)t.has(n)||i.push(n);for(const i of t)e.has(i)||n.push(i);return{removed:i,added:n}}function o(e,t){const i=new Set;for(const n of t)e.has(n)&&i.add(n);return i}i.d(t,{E:()=>o,Z:()=>n})},85476:(e,t,i)=>{"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{$J:()=>r,Q1:()=>a,bU:()=>o,hB:()=>s});class o{constructor(e,t,i,o=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,i,o){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const d=(a+r)/2,u=r-a;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),r){case t:l=(i-n)/u+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,c;if(0===i)a=l=c=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;a=s._hue2rgb(o,e,t+1/3),l=s._hue2rgb(o,e,t),c=s._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*c),r)}}class r{constructor(e,t,i,o){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),s=Math.min(t,i,n),a=o-s,l=0===o?0:a/o;let c;return c=0===a?0:o===t?((i-n)/a%6+6)%6:o===i?(n-t)/a+2:(t-i)/a+4,new r(Math.round(60*c),l,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[c,d,u]=[0,0,0];return t<60?(c=r,d=a):t<120?(c=a,d=r):t<180?(d=r,u=a):t<240?(d=a,u=r):t<300?(c=a,u=r):t<=360&&(c=r,u=a),c=Math.round(255*(c+l)),d=Math.round(255*(d+l)),u=Math.round(255*(u+l)),new o(c,d,u,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g),i=a._relativeLuminanceForComponent(this.rgba.b),o=.2126*e+.7152*t+.0722*i;return n(o,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i}isDarkerThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t{"use strict";i.d(t,{VX:()=>a,Vq:()=>l,Y:()=>d,gf:()=>r,jt:()=>h});var n=i(85053),o=i(5837),s=i(23264);function r(e){return{asString:async()=>e,asFile:()=>{},value:"string"===typeof e?e:void 0}}function a(e,t,i){const n={id:(0,s.b)(),name:e,uri:t,data:i};return{asString:async()=>"",asFile:()=>n,value:void 0}}class l{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return o.f.some(this,(([e,t])=>t.asFile()))&&t.push("files"),u(c(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return c(e)}}function c(e){return e.toLowerCase()}function d(e,t){return u(c(e),t.map(c))}function u(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,o,s]=i;return"*"===s&&t.some((e=>e.startsWith(o+"/")))}const h=Object.freeze({create:e=>(0,n.dM)(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>h.split(e).filter((e=>!e.startsWith("#")))})},34125:(e,t,i)=>{"use strict";function n(e,t,i){let n=null,o=null;if("function"===typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"===typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[s]}}i.d(t,{B:()=>n})},40651:(e,t,i)=>{"use strict";i.d(t,{uP:()=>d,F1:()=>r});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=i(65647);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class d{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=d._getElements(e),[r,a,l]=d._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(d._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&o>=i&&this.ElementsAreEqual(t,o))t--,o--;if(e>t||i>o){let s;return i<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new n(e,0,i,o-i+1)]):e<=t?(a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const r=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,o,r,l,s),d=r[0],u=l[0];if(null!==c)return c;if(!s[0]){const r=this.ComputeDiffRecursive(e,d,i,u,s);let a=[];return a=s[0]?[new n(d+1,t-(d+1)+1,u+1,o-(u+1)+1)]:this.ComputeDiffRecursive(d+1,t,u+1,o,s),this.ConcatenateChanges(r,a)}return[new n(e,t-e+1,i,o-i+1)]}WALKTRACE(e,t,i,o,s,r,a,l,d,u,h,g,p,f,m,_,v,b){let y=null,w=null,C=new c,S=t,k=i,x=p[0]-_[0]-o,E=-1073741824,L=this.m_forwardHistory.length-1;do{const t=x+e;t===S||t=0&&(d=this.m_forwardHistory[L],e=d[0],S=1,k=d.length-1)}while(--L>=-1);if(y=C.getReverseChanges(),b[0]){let e=p[0]+1,t=_[0]+1;if(null!==y&&y.length>0){const i=y[y.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}w=[new n(e,g-e+1,t,m-t+1)]}else{C=new c,S=r,k=a,x=p[0]-_[0]-l,E=1073741824,L=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=x+s;e===S||e=u[e+1]?(h=u[e+1]-1,f=h-x-l,h>E&&C.MarkNextChange(),E=h+1,C.AddOriginalElement(h+1,f+1),x=e+1-s):(h=u[e-1],f=h-x-l,h>E&&C.MarkNextChange(),E=h,C.AddModifiedElement(h+1,f+1),x=e-1-s),L>=0&&(u=this.m_reverseHistory[L],s=u[0],S=1,k=u.length-1)}while(--L>=-1);w=C.getChanges()}return this.ConcatenateChanges(y,w)}ComputeRecursionPoint(e,t,i,o,s,r,a){let c=0,d=0,u=0,h=0,g=0,p=0;e--,i--,s[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(o-i),m=f+1,_=new Int32Array(m),v=new Int32Array(m),b=o-i,y=t-e,w=e-i,C=t-o,S=y-b,k=S%2===0;_[b]=e,v[y]=t,a[0]=!1;for(let S=1;S<=f/2+1;S++){let f=0,x=0;u=this.ClipDiagonalBound(b-S,S,b,m),h=this.ClipDiagonalBound(b+S,S,b,m);for(let e=u;e<=h;e+=2){c=e===u||ef+x&&(f=c,x=d),!k&&Math.abs(e-y)<=S-1&&c>=v[e])return s[0]=c,r[0]=d,i<=v[e]&&S<=1448?this.WALKTRACE(b,u,h,w,y,g,p,C,_,v,c,t,s,d,o,r,k,a):null}const E=(f-e+(x-i)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(f,E))return a[0]=!0,s[0]=f,r[0]=x,E>0&&S<=1448?this.WALKTRACE(b,u,h,w,y,g,p,C,_,v,c,t,s,d,o,r,k,a):(e++,i++,[new n(e,t-e+1,i,o-i+1)]);g=this.ClipDiagonalBound(y-S,S,y,m),p=this.ClipDiagonalBound(y+S,S,y,m);for(let n=g;n<=p;n+=2){c=n===g||n=v[n+1]?v[n+1]-1:v[n-1],d=c-(n-y)-C;const l=c;while(c>e&&d>i&&this.ElementsAreEqual(c,d))c--,d--;if(v[n]=c,k&&Math.abs(n-b)<=S&&c<=_[n])return s[0]=c,r[0]=d,l>=_[n]&&S<=1448?this.WALKTRACE(b,u,h,w,y,g,p,C,_,v,c,t,s,d,o,r,k,a):null}if(S<=1447){let e=new Int32Array(h-u+2);e[0]=b-u+1,l.Copy2(_,u,e,1,h-u+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=y-g+1,l.Copy2(v,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,u,h,w,y,g,p,C,_,v,c,t,s,d,o,r,k,a)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;while(i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=u,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){const o=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(i,n)?1:0;return o+s}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(o,s,r,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e{"use strict";i.d(t,{KC:()=>a,S3:()=>s,dB:()=>l,nx:()=>o,r:()=>r});var n=i(85053);const o=(e,t)=>e===t;function s(e=o){return(t,i)=>n.aI(t,i,e)}function r(){return(e,t)=>e.equals(t)}function a(e,t,i){if(void 0!==i){const n=e;return void 0===n||null===n||void 0===t||null===t?t===n:i(n,t)}{const t=e;return(e,i)=>void 0===e||null===e||void 0===i||null===i?i===e:t(e,i)}}function l(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i{"use strict";i.d(t,{r:()=>c});var n=i(85053),o=i(50322),s=i(41337);function r(e,t){return t&&(e.stack||e.stacktrace)?s.kg("stackTrace.format","{0}: {1}",l(e),a(e.stack)||a(e.stacktrace)):l(e)}function a(e){return Array.isArray(e)?e.join("\n"):e}function l(e){return"ERR_UNC_HOST_NOT_ALLOWED"===e.code?`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:"string"===typeof e.code&&"number"===typeof e.errno&&"string"===typeof e.syscall?s.kg("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||s.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function c(e=null,t=!1){if(!e)return s.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=n.Yc(e),o=c(i[0],t);return i.length>1?s.kg("error.moreErrors","{0} ({1} errors in total)",o,i.length):o}if(o.Kg(e))return e;if(e.detail){const i=e.detail;if(i.error)return r(i.error,t);if(i.exception)return r(i.exception,t)}return e.stack?r(e,t):e.message?e.message:s.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}},14396:(e,t,i)=>{"use strict";i.d(t,{AL:()=>d,D7:()=>m,EM:()=>p,MB:()=>c,M_:()=>r,Qg:()=>h,aD:()=>u,cU:()=>a,dz:()=>s,iH:()=>g});class n{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(f.isErrorNoTelemetry(e))throw new f(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const o=new n;function s(e){c(e)||o.onUnexpectedError(e)}function r(e){c(e)||o.onUnexpectedExternalError(e)}function a(e){if(e instanceof Error){const{name:t,message:i}=e,n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:i,stack:n,noTelemetry:f.isErrorNoTelemetry(e)}}return e}const l="Canceled";function c(e){return e instanceof d||e instanceof Error&&e.name===l&&e.message===l}class d extends Error{constructor(){super(l),this.name=this.message}}function u(){const e=new Error(l);return e.name=e.message,e}function h(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function g(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class p extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class f extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof f)return e;const t=new f;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class m extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,m.prototype)}}},40231:(e,t,i)=>{"use strict";i.d(t,{Jh:()=>u,QT:()=>L,Qy:()=>S,Wj:()=>D,_B:()=>T,at:()=>I,fV:()=>x,uI:()=>E,vl:()=>C});var n=i(14396),o=i(90702),s=i(5091),r=i(67806),a=i(84240);const l=!1,c=!1,d=!1;var u;(function(e){function t(e){if(d){const{onDidAddListener:t}=e,i=f.create();let n=0;e.onDidAddListener=()=>{2===++n&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),i.print()),t?.()}}}function i(e,t){return m(e,(()=>{}),0,void 0,!0,void 0,t)}function n(e){return(t,i=null,n)=>{let o,s=!1;return o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n),s&&o.dispose(),o}}function o(t,i){return e.once(e.filter(t,i))}function r(e,t,i){return g(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)),i)}function a(e,t,i){return g(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)),i)}function l(e,t,i){return g(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)),i)}function c(e){return e}function u(...e){return(t,i=null,n)=>{const o=(0,s.qE)(...e.map((e=>e((e=>t.call(i,e))))));return p(o,n)}}function h(e,t,i,n){let o=i;return r(e,(e=>(o=t(o,e),o)),n)}function g(e,i){let n;const o={onWillAddFirstListener(){n=e(s.fire,s)},onDidRemoveLastListener(){n?.dispose()}};i||t(o);const s=new C(o);return i?.add(s),s.event}function p(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function m(e,i,n=100,o=!1,s=!1,r,a){let l,c,d,u,h=0;const g={leakWarningThreshold:r,onWillAddFirstListener(){l=e((e=>{h++,c=i(c,e),o&&!d&&(p.fire(c),c=void 0),u=()=>{const e=c;c=void 0,d=void 0,(!o||h>1)&&p.fire(e),h=0},"number"===typeof n?(clearTimeout(d),d=setTimeout(u,n)):void 0===d&&(d=0,queueMicrotask(u))}))},onWillRemoveListener(){s&&h>0&&u?.()},onDidRemoveLastListener(){u=void 0,l.dispose()}};a||t(g);const p=new C(g);return a?.add(p),p.event}function _(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)}function v(e,t=(e,t)=>e===t,i){let n,o=!0;return l(e,(e=>{const i=o||!t(e,n);return o=!1,n=e,i}),i)}function b(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]}function y(e,t=!1,i=[],n){let o=i.slice(),s=e((e=>{o?o.push(e):a.fire(e)}));n&&n.add(s);const r=()=>{o?.forEach((e=>a.fire(e))),o=null},a=new C({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),n&&n.add(s))},onDidAddFirstListener(){o&&(t?setTimeout(r):r())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return n&&n.add(a),a.event}function w(e,t){const i=(i,n,o)=>{const s=t(new k);return e((function(e){const t=s.evaluate(e);t!==S&&i.call(n,t)}),void 0,o)};return i}e.None=()=>s.jG.None,e.defer=i,e.once=n,e.onceIf=o,e.map=r,e.forEach=a,e.filter=l,e.signal=c,e.any=u,e.reduce=h,e.debounce=m,e.accumulate=_,e.latch=v,e.split=b,e.buffer=y,e.chain=w;const S=Symbol("HaltChainable");class k{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:S)),this}reduce(e,t){let i=t;return this.steps.push((t=>(i=e(i,t),i))),this}latch(e=(e,t)=>e===t){let t,i=!0;return this.steps.push((n=>{const o=i||!e(n,t);return i=!1,t=n,o?n:S})),this}evaluate(e){for(const t of this.steps)if(e=t(e),e===S)break;return e}}function x(e,t,i=e=>e){const n=(...e)=>r.fire(i(...e)),o=()=>e.on(t,n),s=()=>e.removeListener(t,n),r=new C({onWillAddFirstListener:o,onDidRemoveLastListener:s});return r.event}function E(e,t,i=e=>e){const n=(...e)=>r.fire(i(...e)),o=()=>e.addEventListener(t,n),s=()=>e.removeEventListener(t,n),r=new C({onWillAddFirstListener:o,onDidRemoveLastListener:s});return r.event}function L(e){return new Promise((t=>n(e)(t)))}function T(e){const t=new C;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event}function I(e,t){return e((e=>t.fire(e)))}function D(e,t,i){return t(i),e((e=>t(e)))}e.fromNodeEventEmitter=x,e.fromDOMEventEmitter=E,e.toPromise=L,e.fromPromise=T,e.forward=I,e.runAndSubscribe=D;class R{constructor(e,i){this._observable=e,this._counter=0,this._hasChanged=!1;const n={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};i||t(n),this.emitter=new C(n),i&&i.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function N(e,t){const i=new R(e,t);return i.emitter.event}function A(e){return(t,i,n)=>{let o=0,r=!1;const a={beginUpdate(){o++},endUpdate(){o--,0===o&&(e.reportChanges(),r&&(r=!1,t.call(i)))},handlePossibleChange(){},handleChange(){r=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return n instanceof s.Cm?n.add(l):Array.isArray(n)&&n.push(l),l}}e.fromObservable=N,e.fromObservableLight=A})(u||(u={}));class h{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${h._idPool++}`,h.all.add(this)}start(e){this._stopWatch=new a.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}let g=-1;class p{static{this._idPool=1}constructor(e,t,i=(p._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=i,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[i,n]of this._stacks)(!e||t{if(e instanceof v)t(e);else for(let i=0;i{0!==e.length&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join("\n")),e.length=0)}),3e3),w=new FinalizationRegistry((t=>{"string"===typeof t&&e.push(t)}))}class C{constructor(e){this._size=0,this._options=e,this._leakageMon=g>0||this._options?.leakWarningThreshold?new p(e?.onListenerError??n.dz,this._options?.leakWarningThreshold??g):void 0,this._perfMon=this._options?._profName?new h(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(c){const e=this._listeners;queueMicrotask((()=>{y(e,(e=>e.stack?.print()))}))}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],i=new _(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]),o=this._options?.onListenerError||n.dz;return o(i),s.jG.None}if(this._disposed)return s.jG.None;t&&(e=e.bind(t));const o=new v(e);let r,a;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(o.stack=f.create(),r=this._leakageMon.check(o.stack,this._size+1)),c&&(o.stack=a??f.create()),this._listeners?this._listeners instanceof v?(this._deliveryQueue??=new k,this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._size++;const l=(0,s.s)((()=>{w?.unregister(l),r?.(),this._removeListener(o)}));if(i instanceof s.Cm?i.add(l):Array.isArray(i)&&i.push(l),w){const e=(new Error).stack.split("\n").slice(2,3).join("\n").trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);w.register(l,t?.[2]??e,l)}return l},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,i=t.indexOf(e);if(-1===i)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;const n=this._deliveryQueue.current===this;if(this._size*b<=t.length){let e=0;for(let i=0;i0}}const S=()=>new k;class k{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class x extends C{constructor(e){super(e),this._isPaused=0,this._eventQueue=new r.w,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0===--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else while(!this._isPaused&&0!==this._eventQueue.size)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class E extends x{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class L extends C{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class T{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new C({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};this.events.push(t),this.hasListeners&&this.hook(t);const i=()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)};return(0,s.s)((0,o.P)(i))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(const e of this.events)e.listener?.dispose();this.events=[]}}class I{constructor(){this.data=[]}wrapEvent(e,t,i){return(n,o,s)=>e((e=>{const s=this.data[this.data.length-1];if(!t)return void(s?s.buffers.push((()=>n.call(o,e))):n.call(o,e));const r=s;r?(r.items??=[],r.items.push(e),0===r.buffers.length&&s.buffers.push((()=>{r.reducedResult??=i?r.items.reduce(t,i):r.items.reduce(t),n.call(o,r.reducedResult)}))):n.call(o,t(i,e))}),void 0,s)}bufferEvents(e){const t={buffers:new Array};this.data.push(t);const i=e();return this.data.pop(),t.buffers.forEach((e=>e())),i}}class D{constructor(){this.listening=!1,this.inputEvent=u.None,this.inputEventListener=s.jG.None,this.emitter=new C({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},37531:(e,t,i)=>{"use strict";i.d(t,{No:()=>h,TH:()=>a,Zn:()=>c,_1:()=>d,kb:()=>l});var n=i(52444),o=i(25160),s=i(20601);function r(e){return 47===e||92===e}function a(e){return e.replace(/[\\/]/g,n.SA.sep)}function l(e){return-1===e.indexOf("/")&&(e=a(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function c(e,t=n.SA.sep){if(!e)return"";const i=e.length,o=e.charCodeAt(0);if(r(o)){if(r(e.charCodeAt(1))&&!r(e.charCodeAt(2))){let n=3;const o=n;for(;ne.length)return!1;if(i){const i=(0,s.ns)(e,t);if(!i)return!1;if(t.length===e.length)return!0;let n=t.length;return t.charAt(t.length-1)===o&&n--,e.charAt(n)===o}return t.charAt(t.length-1)!==o&&(t+=o),0===e.indexOf(t)}function u(e){return e>=65&&e<=90||e>=97&&e<=122}function h(e,t=o.uF){return!!t&&(u(e.charCodeAt(0))&&58===e.charCodeAt(1))}},10695:(e,t,i)=>{"use strict";i.d(t,{ne:()=>de,Nd:()=>ue,Jo:()=>K,WJ:()=>G,dt:()=>he,uU:()=>fe,Tt:()=>v,yr:()=>$,O:()=>q,WP:()=>m,dE:()=>b,J1:()=>W,or:()=>f});var n=i(21553);function o(e){const t=a(e);if(t&&t.length>0)return new Uint32Array(t)}let s=0;const r=new Uint32Array(10);function a(e){if(s=0,l(e,d,4352),s>0)return r.subarray(0,s);if(l(e,u,4449),s>0)return r.subarray(0,s);if(l(e,h,4520),s>0)return r.subarray(0,s);if(l(e,g,12593),s)return r.subarray(0,s);if(e>=44032&&e<=55203){const t=e-44032,i=t%588,n=Math.floor(t/588),o=Math.floor(i/28),a=i%28-1;if(n=0&&(a0)return r.subarray(0,s)}}function l(e,t,i){e>=i&&e>8&&(r[s++]=e>>8&255),e>>16&&(r[s++]=e>>16&255))}const d=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),u=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),h=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),g=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);var p=i(20601);function f(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}function v(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function b(e,t){return y(e.toLowerCase(),t.toLowerCase(),0,0)}function y(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=y(e,t,i+1,n+1))?R({start:n,end:n+1},o):null}return y(e,t,i,n+1)}function w(e){return 97<=e&&e<=122}function C(e){return 65<=e&&e<=90}function S(e){return 48<=e&&e<=57}function k(e){return 32===e||9===e||10===e||13===e}const x=new Set;function E(e){return k(e)||x.has(e)}function L(e,t){return e===t||E(e)&&E(t)}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>x.add(e.charCodeAt(0))));const T=new Map;function I(e){if(T.has(e))return T.get(e);let t;const i=o(e);return i&&(t=i),T.set(e,t),t}function D(e){return w(e)||C(e)||S(e)}function R(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function N(e,t){for(let i=t;i0&&!D(e.charCodeAt(i-1)))return i}return e.length}function A(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,s=n+1;o=A(e,t,i+1,n+1);while(!o&&(s=N(t,s)).6}function M(e){const{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:o}=e;return i>.2&&t<.8&&n>.6&&o<.2}function F(e){let t=0,i=0,n=0,o=0;for(let s=0;s60&&(t=t.substring(0,60));const i=O(t);if(!M(i)){if(!P(i))return null;t=t.toLowerCase()}let n=null,o=0;e=e.toLowerCase();while(o0&&E(e.charCodeAt(i-1)))return i;return e.length}const j=f(m,B,v),z=f(m,B,b),U=new n.qK(1e4);function $(e,t,i=!1){if("string"!==typeof e||"string"!==typeof t)return null;let n=U.get(e);n||(n=new RegExp(p.Bm(e),"i"),U.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?z(e,t):j(e,t)}function q(e,t){const i=he(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?G(i):null}function K(e,t,i,n,o,s){const r=Math.min(13,e.length);for(;i1;n--){const o=e[n]+i,s=t[t.length-1];s&&s.end===o?s.end=o+1:t.push({start:o,end:o+1})}return t}const Q=128;function Y(){const e=[],t=[];for(let e=0;e<=Q;e++)t[e]=0;for(let i=0;i<=Q;i++)e.push(t.slice(0));return e}function Z(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const X=Z(2*Q),J=Z(2*Q),ee=Y(),te=Y(),ie=Y(),ne=!1;function oe(e,t,i,n,o){function s(e,t,i=" "){while(e.lengths(e,3))).join("|")}\n`;for(let n=0;n<=i;n++)r+=0===n?" |":`${t[n-1]}|`,r+=e[n].slice(0,o+1).map((e=>s(e.toString(),3))).join("|")+"\n";return r}function se(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(oe(te,e,e.length,i,i.length)),console.log(oe(ie,e,e.length,i,i.length)),console.log(oe(ee,e,e.length,i,i.length))}function re(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!p.Ss(i)}}function ae(e,t){if(t<0||t>=e.length)return!1;const i=e.charCodeAt(t);switch(i){case 32:case 9:return!0;default:return!1}}function le(e,t,i){return t[e]!==i[e]}function ce(e,t,i,n,o,s,r=!1){while(tQ?Q:e.length,l=n.length>Q?Q:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!ce(t,i,a,o,s,l,!0))return;ge(a,l,i,s,t,o);let c=1,d=1,u=i,h=s;const g=[!1];for(c=1,u=i;ur,v=_?te[c][d-1]+(ee[c][d-1]>0?-5:0):0,b=h>r+1&&ee[c][d-1]>0,y=b?te[c][d-2]+(ee[c][d-2]>0?-5:0):0;if(b&&(!_||y>=v)&&(!f||y>=m))te[c][d]=y,ie[c][d]=3,ee[c][d]=0;else if(_&&(!f||v>=m))te[c][d]=v,ie[c][d]=2,ee[c][d]=0;else{if(!f)throw new Error("not possible");te[c][d]=m,ie[c][d]=1,ee[c][d]=ee[c-1][d-1]+1}}}if(ne&&se(e,i,n,s),!g[0]&&!r.firstMatchCanBeWeak)return;c--,d--;const p=[te[c][d],s];let f=0,m=0;while(c>=1){let e=d;do{const t=ie[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);f>1&&t[i+c-1]===o[s+d-1]&&!le(e+s-1,n,o)&&f+1>ee[c][e]&&(e=d),e===d?f++:f=1,m||(m=e),c--,d=e-1,p.push(d)}l-s===a&&r.boostFullMatch&&(p[0]+=2);const _=m-a;return p[0]-=_,p}function ge(e,t,i,n,o,s){let r=e-1,a=t-1;while(r>=i&&a>=n)o[r]===s[a]&&(J[r]=a,r--),a--}function pe(e,t,i,n,o,s,r,a,l,c,d){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let u=1,h=!1;return r===i-n?u=e[i]===o[r]?7:5:!le(r,o,s)||0!==r&&le(r-1,o,s)?!re(s,r)||0!==r&&re(s,r-1)?(re(s,r-1)||ae(s,r-1))&&(u=5,h=!0):u=5:(u=e[i]===o[r]?7:5,h=!0),u>1&&i===n&&(d[0]=!0),h||(h=le(r,o,s)||re(s,r-1)||ae(s,r-1)),i===n?r>l&&(u-=h?3:5):u+=c?h?2:0:h?0:1,r+1===a&&(u-=h?3:5),u}function fe(e,t,i,n,o,s,r){return me(e,t,i,n,o,s,!0,r)}function me(e,t,i,n,o,s,r,a){let l=he(e,t,i,n,o,s,a);if(l&&!r)return l;if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}function _e(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}},90702:(e,t,i)=>{"use strict";function n(e,t){const i=this;let n,o=!1;return function(){if(o)return n;if(o=!0,t)try{n=e.apply(i,arguments)}finally{t()}else n=e.apply(i,arguments);return n}}i.d(t,{P:()=>n})},13589:(e,t,i)=>{"use strict";i.d(t,{YW:()=>O,qg:()=>P});var n=i(9659),o=i(37531),s=i(21553),r=i(52444),a=i(25160),l=i(20601);const c="**",d="/",u="[/\\\\]",h="[^/\\\\]",g=/\//g;function p(e,t){switch(e){case 0:return"";case 1:return`${h}*?`;default:return`(?:${u}|${h}+${u}${t?`|${u}${h}+`:""})*?`}}function f(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}s+=r}return s&&i.push(s),i}function m(e){if(!e)return"";let t="";const i=f(e,d);if(i.every((e=>e===c)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===c){if(e)return;t+=p(2,o===i.length-1)}else{let e=!1,s="",r=!1,a="";for(const i of n)if("}"!==i&&e)s+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=f(s,","),n=`(?:${i.map((e=>m(e))).join("|")})`;t+=n,e=!1,s="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=h;continue;case"*":t+=p(1);continue;default:t+=(0,l.bm)(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?i===d?"":(0,l.bm)(i):"^",a+=e}oE(e,t))).filter((e=>e!==x)),e),n=i.length;if(!n)return x;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}function N(e,t,i){const n=r.Vn===r.SA.sep,o=n?e:e.replace(g,r.Vn),s=r.Vn+o,a=r.SA.sep+e;let l;return l=i?function(i,r){return"string"!==typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,s){return"string"!==typeof i||i!==o&&(n||i!==e)?null:t},l.allPaths=[(i?"*/":"./")+e],l}function A(e){try{const t=new RegExp(`^${m(e)}$`);return function(i){return t.lastIndex=0,"string"===typeof i&&t.test(i)?e:null}}catch(e){return x}}function O(e,t,i){return!(!e||"string"!==typeof t)&&P(e)(t,void 0,i)}function P(e,t={}){if(!e)return k;if("string"===typeof e||M(e)){const i=E(e,t);if(i===x)return k;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return F(e,t)}function M(e){const t=e;return!!t&&("string"===typeof t.base&&"string"===typeof t.pattern)}function F(e,t){const i=W(Object.getOwnPropertyNames(e).map((i=>B(i,e[i],t))).filter((e=>e!==x))),o=i.length;if(!o)return x;if(!i.some((e=>!!e.requiresSiblings))){if(1===o)return i[0];const e=function(e,t){let o;for(let s=0,r=i.length;s{for(const e of o){const t=await e;if("string"===typeof t)return t}return null})():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,o){let s,a;for(let l=0,c=i.length;l{for(const e of a){const t=await e;if("string"===typeof t)return t}return null})():null},a=i.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}function B(e,t,i){if(!1===t)return x;const o=E(e,i);if(o===x)return x;if("boolean"===typeof t)return o;if(t){const i=t.when;if("string"===typeof i){const t=(t,s,r,a)=>{if(!a||!o(t,s))return null;const l=i.replace("$(basename)",(()=>r)),c=a(l);return(0,n.Qg)(c)?c.then((t=>t?e:null)):c?e:null};return t.requiresSiblings=!0,t}}return o}function W(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const s=function(e,t){if("string"!==typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(s),r}},65647:(e,t,i)=>{"use strict";i.d(t,{e2:()=>l,sN:()=>s,tW:()=>o,v7:()=>f});var n=i(20601);function o(e){return s(e,0)}function s(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?c(e,t):d(e,t);case"string":return l(e,t);case"boolean":return a(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}}function r(e,t){return(t<<5)-t+e|0}function a(e,t){return r(e?433:863,t)}function l(e,t){t=r(149417,t);for(let i=0,n=e.length;is(t,e)),t)}function d(e,t){return t=r(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=l(i,t),s(e[i],t))),t)}function u(e,t,i=32){const n=i-t,o=~((1<>>n)>>>0}function h(e,t=0,i=e.byteLength,n=0){for(let o=0;oe.toString(16).padStart(2,"0"))).join(""):g((e>>>0).toString(16),t/4)}class f{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let o,s,r=this._buffLen,a=this._leftoverHighSurrogate;0!==a?(o=a,s=-1,a=0):(o=e.charCodeAt(0),s=0);while(1){let l=o;if(n.pc(o)){if(!(s+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),p(this._h0)+p(this._h1)+p(this._h2)+p(this._h3)+p(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,h(this._buff,this._buffLen),this._buffLen>56&&(this._step(),h(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=f._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,u(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&l,n=1518500249):t<40?(i=r^a^l,n=1859775393):t<60?(i=r&a|r&l|a&l,n=2400959708):(i=r^a^l,n=3395469782),o=u(s,5)+i+c+n+e.getUint32(4*t,!1)&4294967295,c=l,l=a,a=u(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}},59200:(e,t,i)=>{"use strict";i.d(t,{k:()=>n});class n{static{this.sep="."}static{this.None=new n("@@none@@")}static{this.Empty=new n("")}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+n.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new n((this.value?[this.value,...e]:e).join(n.sep))}}},44757:(e,t,i)=>{"use strict";i.d(t,{O:()=>s,e:()=>o});var n=i(34230);function o(){return n._K&&!!n._K["VSCODE_DEV"]}function s(e){if(o()){const t=r();return t.add(e),{dispose(){t.delete(e)}}}return{dispose(){}}}function r(){a||(a=new Set);const e=globalThis;return e.$hotReload_applyNewExports||(e.$hotReload_applyNewExports=e=>{const t={config:{mode:void 0},...e},i=[];for(const e of a){const n=e(t);n&&i.push(n)}if(i.length>0)return e=>{let t=!1;for(const n of i)n(e)&&(t=!0);return t}}),a}let a;o()&&s((({oldExports:e,newSrc:t,config:i})=>{if("patch-prototype"===i.mode)return t=>{for(const i in t){const n=t[i];if(console.log(`[hot-reload] Patching prototype methods of '${i}'`,{exportedItem:n}),"function"===typeof n&&n.prototype){const o=e[i];if(o){for(const e of Object.getOwnPropertyNames(n.prototype)){const t=Object.getOwnPropertyDescriptor(n.prototype,e),s=Object.getOwnPropertyDescriptor(o.prototype,e);t?.value?.toString()!==s?.value?.toString()&&console.log(`[hot-reload] Patching prototype method '${i}.${e}'`),Object.defineProperty(o.prototype,e,t)}t[i]=o}}}return!0}}))},34956:(e,t,i)=>{"use strict";i.d(t,{b:()=>s});var n=i(44757),o=i(39751);function s(e,t){return r([e],t),e}function r(e,t){if((0,n.e)()){const i=(0,o.yQ)("reload",(t=>(0,n.O)((({oldExports:i})=>{if([...Object.values(i)].some((t=>e.includes(t))))return e=>(t(void 0),!0)}))));i.read(t)}}},42325:(e,t,i)=>{"use strict";i.d(t,{Bc:()=>l,VS:()=>d,_W:()=>f,it:()=>c,nI:()=>m,nK:()=>u,oO:()=>p});var n=i(14396),o=i(74529),s=i(84366),r=i(20601),a=i(29133);class l{constructor(e="",t=!1){if(this.value=e,"string"!==typeof this.value)throw(0,n.Qg)("value");"boolean"===typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=t.isTrusted??void 0,this.supportThemeIcons=t.supportThemeIcons??!1,this.supportHtml=t.supportHtml??!1)}appendText(e,t=0){return this.value+=h(this.supportThemeIcons?(0,o.m2)(e):e).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`\n${g(t,e)}\n`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp((0,r.bm)(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function c(e){return d(e)?!e.value:!Array.isArray(e)||e.every(c)}function d(e){return e instanceof l||!(!e||"object"!==typeof e)&&("string"===typeof e.value&&("boolean"===typeof e.isTrusted||"object"===typeof e.isTrusted||void 0===e.isTrusted)&&("boolean"===typeof e.supportThemeIcons||void 0===e.supportThemeIcons))}function u(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons&&e.supportHtml===t.supportHtml&&(e.baseUri===t.baseUri||!!e.baseUri&&!!t.baseUri&&(0,s.n4)(a.r.from(e.baseUri),a.r.from(t.baseUri))))}function h(e){return e.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function g(e,t){const i=e.match(/^`+/gm)?.reduce(((e,t)=>e.length>t.length?e:t)).length??0,n=i>=3?i+1:3;return[`${"`".repeat(n)}${t}`,e,`${"`".repeat(n)}`].join("\n")}function p(e){return e.replace(/"/g,""")}function f(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}function m(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",s=i?i[1]:"",r=isFinite(parseInt(s)),a=isFinite(parseInt(o));r&&t.push(`width="${s}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},74529:(e,t,i)=>{"use strict";i.d(t,{R$:()=>p,_k:()=>m,m2:()=>c,pS:()=>g,pz:()=>_,sA:()=>u});var n=i(10695),o=i(20601),s=i(23740);const r="$(",a=new RegExp(`\\$\\(${s.L.iconNameExpression}(?:${s.L.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function c(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const d=new RegExp(`\\\\${a.source}`,"g");function u(e){return e.replace(d,(e=>`\\${e}`))}const h=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(r)?e:e.replace(h,((e,t,i,n)=>i?e:t||n||""))}function p(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}const f=new RegExp(`\\$\\(${s.L.iconNameCharacter}+\\)`,"g");function m(e){f.lastIndex=0;let t="";const i=[];let n=0;while(1){const o=f.lastIndex,s=f.exec(e),r=e.substring(o,s?.index);if(r.length>0){t+=r;for(let e=0;e{"use strict";i.d(t,{n:()=>n,r:()=>o});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new n("id#")},53790:(e,t,i)=>{"use strict";i.d(t,{M:()=>s});var n=i(40231);class o{constructor(){this._onDidChange=new n.vl,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const s=new o},5837:(e,t,i)=>{"use strict";var n;i.d(t,{f:()=>n}),function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function n(){return i}function*o(e){yield e}function s(e){return t(e)?e:o(e)}function r(e){return e||i}function*a(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function l(e){return!e||!0===e[Symbol.iterator]().next().done}function c(e){return e[Symbol.iterator]().next().value}function d(e,t){let i=0;for(const n of e)if(t(n,i++))return!0;return!1}function u(e,t){for(const i of e)if(t(i))return i}function*h(e,t){for(const i of e)t(i)&&(yield i)}function*g(e,t){let i=0;for(const n of e)yield t(n,i++)}function*p(e,t){let i=0;for(const n of e)yield*t(n,i++)}function*f(...e){for(const t of e)yield*t}function m(e,t,i){let n=i;for(const i of e)n=t(n,i);return n}function*_(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t{"use strict";i.d(t,{Fo:()=>h,YM:()=>p,m5:()=>f,uw:()=>a});class n{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new n,s=new n,r=new n,a=new Array(230),l={},c=[],d=Object.create(null),u=Object.create(null),h=[],g=[];for(let e=0;e<=193;e++)h[e]=-1;for(let e=0;e<=132;e++)g[e]=-1;var p;function f(e,t){const i=(65535&t)<<16>>>0;return(e|i)>>>0}(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],i=[],n=[];for(const e of t){const[t,p,f,m,_,v,b,y,w]=e;if(n[p]||(n[p]=!0,c[p]=f,d[f]=p,u[f.toLowerCase()]=p,t&&(h[p]=m,0!==m&&3!==m&&5!==m&&4!==m&&6!==m&&57!==m&&(g[m]=p))),!i[m]){if(i[m]=!0,!_)throw new Error(`String representation missing for key code ${m} around scan code ${f}`);o.define(m,_),s.define(m,y||_),r.define(m,w||y||_)}v&&(a[v]=m),b&&(l[b]=m)}g[3]=46})(),function(e){function t(e){return o.keyCodeToStr(e)}function i(e){return o.strToKeyCode(e)}function n(e){return s.keyCodeToStr(e)}function a(e){return r.keyCodeToStr(e)}function l(e){return s.strToKeyCode(e)||r.strToKeyCode(e)}function c(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}e.toString=t,e.fromString=i,e.toUserSettingsUS=n,e.toUserSettingsGeneral=a,e.fromUserSettings=l,e.toElectronAccelerator=c}(p||(p={}))},59812:(e,t,i)=>{"use strict";i.d(t,{G$:()=>l,Of:()=>s,r0:()=>r,rr:()=>a});var n=i(41337);class o{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,s=t.length;o{"use strict";i.d(t,{FW:()=>l,Zv:()=>o,dG:()=>r,z5:()=>c});var n=i(14396);function o(e,t){if("number"===typeof e){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new a(0!==n?[s(i,t),s(n,t)]:[s(i,t)])}{const i=[];for(let n=0;n{"use strict";i.d(t,{d:()=>n});class n{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},5091:(e,t,i)=>{"use strict";i.d(t,{$w:()=>C,AS:()=>p,Ay:()=>l,BO:()=>w,Cm:()=>_,HE:()=>b,VD:()=>c,Xm:()=>g,jG:()=>v,lC:()=>h,mp:()=>y,qE:()=>f,s:()=>m});var n=i(90702),o=i(5837);const s=!1;let r=null;function a(e){r=e}if(s){const e="__is_disposable_tracked__";a(new class{trackDisposable(t){const i=new Error("Potentially leaked disposable").stack;setTimeout((()=>{t[e]||console.log(i)}),3e3)}setParent(t,i){if(t&&t!==v.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==v.None)try{t[e]=!0}catch{}}markAsSingleton(e){}})}function l(e){return r?.trackDisposable(e),e}function c(e){r?.markAsDisposed(e)}function d(e,t){r?.setParent(e,t)}function u(e,t){if(r)for(const i of e)r.setParent(i,t)}function h(e){return r?.markAsSingleton(e),e}function g(e){return"object"===typeof e&&null!==e&&"function"===typeof e.dispose&&0===e.dispose.length}function p(e){if(o.f.is(e)){const t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function f(...e){const t=m((()=>p(e)));return u(e,t),t}function m(e){const t=l({dispose:(0,n.P)((()=>{c(t),e()}))});return t}class _{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,l(this)}dispose(){this._isDisposed||(c(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{p(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return d(e,this),this._isDisposed?_.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),d(e,null))}}class v{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new _,l(this),d(this._store,this)}dispose(){c(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class b{constructor(){this._isDisposed=!1,l(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&d(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,c(this),this._value?.dispose(),this._value=void 0}}class y{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0===--this._counter&&this._disposable.dispose(),this}}class w{constructor(e){this.object=e}dispose(){}}class C{constructor(){this._store=new Map,this._isDisposed=!1,l(this)}dispose(){c(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{p(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},67806:(e,t,i)=>{"use strict";i.d(t,{w:()=>o});class n{static{this.Undefined=new n(void 0)}constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}class o{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;while(e!==n.Undefined){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==n.Undefined)yield e.element,e=e.next}}},21553:(e,t,i)=>{"use strict";var n,o;i.d(t,{cO:()=>u,db:()=>h,fT:()=>a,qK:()=>d});class s{constructor(e,t){this.uri=e,this.value=t}}function r(e){return Array.isArray(e)}class a{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[n]="ResourceMap",e instanceof a)this.map=new Map(e.map),this.toKey=t??a.defaultToKey;else if(r(e)){this.map=new Map,this.toKey=t??a.defaultToKey;for(const[t,i]of e)this.set(t,i)}else this.map=new Map,this.toKey=e??a.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(const[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class l{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;while(n){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;while(t&&i>e)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,i=this.size;while(t&&i>e)this._map.delete(t.key),t=t.previous,i--;this._tail=t,this._size=i,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class c extends l{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class d extends c{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class h{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}},61565:(e,t,i)=>{"use strict";i.d(t,{As:()=>s,qg:()=>r});var n=i(87885),o=i(29133);function s(e){return JSON.stringify(e,a)}function r(e){let t=JSON.parse(e);return t=l(t),t}function a(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function l(e,t=0){if(!e||t>200)return e;if("object"===typeof e){switch(e.$mid){case 1:return o.r.revive(e);case 2:return new RegExp(e.source,e.flags);case 17:return new Date(e.source)}if(e instanceof n.MB||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{"use strict";i.d(t,{K:()=>n});const n=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},6657:(e,t,i)=>{"use strict";i.d(t,{Ez:()=>g,SJ:()=>_,fV:()=>d,ny:()=>n,v$:()=>c,zl:()=>m});var n,o=i(14396),s=i(25160),r=i(20601),a=i(29133),l=i(52444);function c(e,t){return a.r.isUri(e)?(0,r.Q_)(e.scheme,t):(0,r.ns)(e,t+":")}function d(e,...t){return t.some((t=>c(e,t)))}(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(n||(n={}));const u="tkn";class h{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,n.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return o.dz(t),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const r=this._ports[t],l=this._connectionTokens[t];let c=`path=${encodeURIComponent(e.path)}`;return"string"===typeof l&&(c+=`&${u}=${encodeURIComponent(l)}`),a.r.from({scheme:s.HZ?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${r}`,path:this._remoteResourcesPath,query:c})}}const g=new h,p="vscode-app";class f{static{this.FALLBACK_AUTHORITY=p}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===n.vscodeRemote?g.rewrite(e):e.scheme!==n.file||!s.ib&&s.lg!==`${n.vscodeFileResource}://${f.FALLBACK_AUTHORITY}`?e:e.with({scheme:n.vscodeFileResource,authority:e.authority||f.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const i=l.fj(t,e);return a.r.file(i)}return a.r.parse(t.toUrl(e))}}const m=new f;var _;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";function n(e){let n;"string"===typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:a.r.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const o=n?.get(i);if(o)return t.get(o)}function o(e,t,n){if(!globalThis.crossOriginIsolated)return;const o=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,o):e[i]=o}e.getHeadersFromQuery=n,e.addSearchParam=o})(_||(_={}))},19977:(e,t,i)=>{"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{Uq:()=>o,mu:()=>s,qE:()=>n});class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class s{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{"use strict";i.d(t,{Go:()=>o,PI:()=>a,V0:()=>h,aI:()=>d,co:()=>c,kT:()=>g,ol:()=>s});var n=i(50322);function o(e){if(!e||"object"!==typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach((([e,i])=>{t[e]=i&&"object"===typeof i?o(i):i})),t}function s(e){if(!e||"object"!==typeof e)return e;const t=[e];while(t.length>0){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const o=e[i];"object"!==typeof o||Object.isFrozen(o)||(0,n.iu)(o)||t.push(o)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.z)(e))return e;const o=t(e);if("undefined"!==typeof o)return o;if(Array.isArray(e)){const n=[];for(const o of e)n.push(l(o,t,i));return n}if((0,n.Gv)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const o in e)r.call(e,o)&&(n[o]=l(e[o],t,i));return i.delete(e),n}return e}function c(e,t,i=!0){return(0,n.Gv)(e)?((0,n.Gv)(t)&&Object.keys(t).forEach((o=>{o in e?i&&((0,n.Gv)(e[o])&&(0,n.Gv)(t[o])?c(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]})),e):t}function d(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ifunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const t of e)n[t]=i(t);return n}},39751:(e,t,i)=>{"use strict";i.d(t,{BK:()=>_,fm:()=>c,Y:()=>u,zL:()=>d,yC:()=>g,ht:()=>h,lk:()=>f.lk,un:()=>o.un,nb:()=>o.nb,ZX:()=>f.ZX,C:()=>o.C,rm:()=>o.rm,X2:()=>n.X2,y0:()=>f.y0,Yd:()=>f.Yd,yQ:()=>f.yQ,FY:()=>n.FY,Zh:()=>C,OI:()=>f.OI,PO:()=>n.PO,Rn:()=>n.Rn,oJ:()=>b});var n=i(81275),o=i(42389),s=i(79109),r=i(5091),a=i(74580),l=i(29933);function c(e){return new p(new a.nA(void 0,void 0,e),e,void 0,void 0)}function d(e,t){return new p(new a.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,void 0)}function u(e,t){return new p(new a.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,e.createEmptyChangeSummary,e.handleChange)}function h(e,t){const i=new r.Cm,n=u({owner:e.owner,debugName:e.debugName,debugReferenceFn:e.debugReferenceFn??t,createEmptyChangeSummary:e.createEmptyChangeSummary,handleChange:e.handleChange},((e,n)=>{i.clear(),t(e,n,i)}));return(0,r.s)((()=>{n.dispose(),i.dispose()}))}function g(e){const t=new r.Cm,i=d({owner:void 0,debugName:void 0,debugReferenceFn:e},(i=>{t.clear(),e(i,t)}));return(0,r.s)((()=>{i.dispose(),t.dispose()}))}class p{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n){this._debugNameData=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),(0,l.tZ)()?.handleAutorunCreated(this),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){(0,l.tZ)()?.handleAutorunTriggered(this);const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{t||(0,l.tZ)()?.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,s.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary);i&&(this.state=2)}}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(e){e.Observer=p})(c||(c={}));var f=i(79741),m=i(14396);class _{static fromFn(e){return new _(e())}constructor(e){this._value=(0,n.FY)(this,void 0),this.promiseResult=this._value,this.promise=e.then((e=>((0,n.Rn)((t=>{this._value.set(new v(e,void 0),t)})),e)),(e=>{throw(0,n.Rn)((t=>{this._value.set(new v(void 0,e),t)})),e}))}}class v{constructor(e,t){this.data=e,this.error=t}}function b(e,t,i,n){return t||(t=e=>null!==e&&void 0!==e),new Promise(((o,s)=>{let r=!0,a=!1;const l=e.map((e=>({isFinished:t(e),error:!!i&&i(e),state:e}))),d=c((e=>{const{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:d.dispose(),i?s(!0===i?n:i):o(n))}));if(n){const e=n.onCancellationRequested((()=>{d.dispose(),e.dispose(),s(new m.AL)}));if(n.isCancellationRequested)return d.dispose(),e.dispose(),void s(new m.AL)}r=!1,a&&d.dispose()}))}var y=i(45746);class w extends n.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i){super(),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const e of this.observers)for(const t of this._deltas)e.handleChange(this,t);this._deltas.length=0}else for(const e of this.observers)e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(const e of this.observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){this._update();const e=[...this.observers];for(const t of e)t.endUpdate(this)}}addObserver(e){const t=!this.observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){if(void 0===i&&this._equalityComparator(this._value,e))return;let o;t||(t=o=new n.XL((()=>{}),(()=>`Setting ${this.debugName}`)));try{if(this._isUpToDate=!1,this._setValue(e),void 0!==i&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(e,t)=>{},handlePossibleChange:e=>{}},this),this._updateCounter>1)for(const e of this.observers)e.handlePossibleChange(this)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function C(e,t){return e.lazy?new w(new a.nA(e.owner,e.debugName,void 0),t,e.equalsFn??y.nx):new n.Lj(new a.nA(e.owner,e.debugName,void 0),t,e.equalsFn??y.nx)}const S=!1;S&&(0,l.Br)(new l.jm)},81275:(e,t,i)=>{"use strict";i.d(t,{Bm:()=>d,FB:()=>u,FY:()=>y,Lj:()=>w,N2:()=>h,PO:()=>v,Rn:()=>f,X2:()=>C,XL:()=>b,YY:()=>m,ZK:()=>p,fL:()=>_,zV:()=>g});var n=i(45746),o=i(74580),s=i(29933);let r,a,l,c;function d(e){r=e}function u(e){a=e}function h(e){l=e}class g{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=void 0===t?void 0:e,n=void 0===t?e:t;return l({owner:i,debugName:()=>{const e=(0,o.qQ)(n);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/,s=t.exec(n.toString());return s?`${this.debugName}.${s[2]}`:i?void 0:`${this.debugName} (mapped)`},debugReferenceFn:n},(e=>n(this.read(e),e)))}flatten(){return l({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(r(this,t)),this}keepObserved(e){return e.add(a(this)),this}}class p extends g{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){const t=this.observers.delete(e);t&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function f(e,t){const i=new b(e,t);try{e(i)}finally{i.finish()}}function m(e){if(c)e(c);else{const t=new b(e,void 0);c=t;try{e(t)}finally{t.finish(),c=void 0}}}async function _(e,t){const i=new b(e,t);try{await e(i)}finally{i.finish()}}function v(e,t,i){e?t(e):f(t,i)}class b{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],(0,s.tZ)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,o.qQ)(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t{}),(()=>`Setting ${this.debugName}`)));try{const n=this._value;this._setValue(e),(0,s.tZ)()?.handleObservableChanged(this,{oldValue:n,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function C(e,t){let i;return i="string"===typeof e?new o.nA(void 0,e,void 0):new o.nA(e,void 0,void 0),new S(i,t,n.nx)}class S extends w{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}},74580:(e,t,i)=>{"use strict";i.d(t,{nA:()=>n,qQ:()=>g});class n{constructor(e,t,i){this.owner=e,this.debugNameSource=t,this.referenceFn=i}getDebugName(e){return r(e,this)}}const o=new Map,s=new WeakMap;function r(e,t){const i=s.get(e);if(i)return i;const n=a(e,t);if(n){let t=o.get(n)??0;t++,o.set(n,t);const i=1===t?n:`${n}#${t}`;return s.set(e,i),i}}function a(e,t){const i=s.get(e);if(i)return i;const n=t.owner?u(t.owner)+".":"";let o;const r=t.debugNameSource;if(void 0!==r){if("function"!==typeof r)return n+r;if(o=r(),void 0!==o)return n+o}const a=t.referenceFn;if(void 0!==a&&(o=g(a),void 0!==o))return n+o;if(void 0!==t.owner){const i=l(t.owner,e);if(void 0!==i)return n+i}}function l(e,t){for(const i in e)if(e[i]===t)return i}const c=new Map,d=new WeakMap;function u(e){const t=d.get(e);if(t)return t;const i=h(e);let n=c.get(i)??0;n++,c.set(i,n);const o=1===n?i:`${i}#${n}`;return d.set(e,o),o}function h(e){const t=e.constructor;return t?t.name:"Object"}function g(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//,n=i.exec(t),o=n?n[1]:void 0;return o?.trim()}},42389:(e,t,i)=>{"use strict";i.d(t,{C:()=>u,a0:()=>p,dQ:()=>d,nb:()=>h,rm:()=>g,un:()=>c});var n=i(79109),o=i(45746),s=i(5091),r=i(81275),a=i(74580),l=i(29933);function c(e,t){return void 0!==t?new f(new a.nA(e,void 0,t),t,void 0,void 0,void 0,o.nx):new f(new a.nA(void 0,void 0,e),e,void 0,void 0,void 0,o.nx)}function d(e,t,i){return new m(new a.nA(e,void 0,t),t,void 0,void 0,void 0,o.nx,i)}function u(e,t){return new f(new a.nA(e.owner,e.debugName,e.debugReferenceFn),t,void 0,void 0,e.onLastObserverRemoved,e.equalsFn??o.nx)}function h(e,t){return new f(new a.nA(e.owner,e.debugName,void 0),t,e.createEmptyChangeSummary,e.handleChange,void 0,e.equalityComparer??o.nx)}function g(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const r=new s.Cm;return new f(new a.nA(n,void 0,i),(e=>(r.clear(),i(e,r))),void 0,void 0,(()=>r.dispose()),o.nx)}function p(e,t){let i,n,r;return void 0===t?(i=e,n=void 0):(n=e,i=t),new f(new a.nA(n,void 0,i),(e=>{r?r.clear():r=new s.Cm;const t=i(e);return t&&r.add(t),t}),void 0,void 0,(()=>{r&&(r.dispose(),r=void 0)}),o.nx)}(0,r.N2)(u);class f extends r.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n,o=void 0,s){super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=i,this._handleChange=n,this._handleLastObserverRemoved=o,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=this.createChangeSummary?.(),(0,l.tZ)()?.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(0===this.observers.size){const e=this._computeFn(this,this.createChangeSummary?.());return this.onLastObserverRemoved(),e}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;const t=0!==this.state,i=this.value;this.state=3;const n=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this.value=this._computeFn(this,n)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const o=t&&!this._equalityComparator(i,this.value);if((0,l.tZ)()?.handleDerivedRecomputed(this,{oldValue:i,newValue:this.value,change:void 0,didChange:o,hadValue:t}),o)for(const e of this.observers)e.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,n.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}class m extends f{constructor(e,t,i,n,o=void 0,s,r){super(e,t,i,n,o,s),this.set=r}}},29933:(e,t,i)=>{"use strict";let n;function o(e){n=e}function s(){return n}i.d(t,{Br:()=>o,jm:()=>r,tZ:()=>s});class r{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return a([l(p("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[l(" "),d(u(e.oldValue,70),{color:"red",strikeThrough:!0}),l(" "),d(u(e.newValue,60),{color:"green"})]:[l(" (unchanged)")]:[l(" "),d(u(e.newValue,60),{color:"green"}),l(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([c("observable value changed"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return d(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleDerivedRecomputed(e,t){const i=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([c("derived recomputed"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),i.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([c("observable from event triggered"),d(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([c("autorun"),d(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([c("transaction"),d(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function a(e){const t=new Array,i=[];let n="";function o(e){if("length"in e)for(const t of e)t&&o(t);else"text"in e?(n+=`%c${e.text}`,t.push(e.style),e.data&&i.push(...e.data)):"data"in e&&i.push(...e.data)}o(e);const s=[n,...t];return s.push(...i),s}function l(e){return d(e,{color:"black"})}function c(e){return d(f(`${e}: `,10),{color:"black",bold:!0})}function d(e,t={color:"black"}){function i(e){return Object.entries(e).reduce(((e,[t,i])=>`${e}${t}:${i};`),"")}const n={color:t.color};return t.strikeThrough&&(n["text-decoration"]="line-through"),t.bold&&(n["font-weight"]="bold"),{text:e,style:i(n)}}function u(e,t){switch(typeof e){case"number":return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?h(e,t):g(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`;default:return""+e}}function h(e,t){let i="[ ",n=!0;for(const o of e){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${u(o,t-i.length)}`}return i+=" ]",i}function g(e,t){let i="{ ",n=!0;for(const[o,s]of Object.entries(e)){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${o}: ${u(s,t-i.length)}`}return i+=" }",i}function p(e,t){let i="";for(let n=1;n<=t;n++)i+=e;return i}function f(e,t){while(e.length{"use strict";i.d(t,{OI:()=>b,Rl:()=>C,Yd:()=>m,ZX:()=>w,eP:()=>h,lk:()=>c,t:()=>k,y0:()=>u,yQ:()=>p});i(40231);var n=i(5091),o=i(81275),s=i(74580),r=i(42389),a=i(29933),l=i(45746);function c(e){return new d(e)}class d extends o.zV{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function u(...e){let t,i,n;return 3===e.length?[t,i,n]=e:[i,n]=e,new g(new s.nA(t,void 0,n),i,n,(()=>g.globalTransaction),l.nx)}function h(e,t,i){return new g(new s.nA(e.owner,e.debugName,e.debugReferenceFn??i),t,i,(()=>g.globalTransaction),e.equalsFn??l.nx)}class g extends o.ZK{constructor(e,t,i,n,s){super(),this._debugNameData=e,this.event=t,this._getValue=i,this._getTransaction=n,this._equalityComparator=s,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),i=this.value,n=!this.hasValue||!this._equalityComparator(i,t);let s=!1;n&&(this.value=t,this.hasValue&&(s=!0,(0,o.PO)(this._getTransaction(),(e=>{(0,a.tZ)()?.handleFromEventObservableTriggered(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),s||(0,a.tZ)()?.handleFromEventObservableTriggered(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){if(this.subscription)return this.hasValue||this.handleEvent(void 0),this.value;{const e=this._getValue(void 0);return e}}}function p(e,t){return new f(e,t)}(function(e){function t(e,t){let i=!1;void 0===g.globalTransaction&&(g.globalTransaction=e,i=!0);try{t()}finally{i&&(g.globalTransaction=void 0)}}e.Observer=g,e.batchEventsGlobally=t})(u||(u={}));class f extends o.ZK{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{(0,o.Rn)((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function m(e){return"string"===typeof e?new _(e):new _(void 0,e)}class _ extends o.ZK{get debugName(){return new s.nA(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else(0,o.Rn)((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function v(e){const t=new y(!1,void 0);return e.addObserver(t),(0,n.s)((()=>{e.removeObserver(t)}))}function b(e,t){const i=new y(!0,t);return e.addObserver(i),t?t(e.get()):e.reportChanges(),(0,n.s)((()=>{e.removeObserver(i)}))}(0,o.FB)(v),(0,o.Bm)(b);class y{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}function w(e,t){let i;const n=(0,r.C)({owner:e,debugReferenceFn:t},(e=>(i=t(e,i),i)));return n}function C(e,t,i,n){let o=new S(i,n);const s=(0,r.C)({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{o.dispose(),o=new S(i)}},(e=>(o.setItems(t.read(e)),o.getItems())));return s}class S{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach((e=>e.store.dispose())),this._cache.clear()}setItems(e){const t=[],i=new Set(this._cache.keys());for(const o of e){const e=this._keySelector?this._keySelector(o):o;let s=this._cache.get(e);if(s)i.delete(e);else{const t=new n.Cm,i=this._map(o,t);s={out:i,store:t},this._cache.set(e,s)}t.push(s.out)}for(const e of i){const t=this._cache.get(e);t.store.dispose(),this._cache.delete(e)}this._items=t}getItems(){return this._items}}function k(e,t){return w(e,((e,i)=>i??t(e)))}},52444:(e,t,i)=>{"use strict";i.d(t,{IN:()=>S,LC:()=>N,P8:()=>R,S8:()=>E,SA:()=>x,V8:()=>I,Vn:()=>A,fj:()=>L,hd:()=>T,pD:()=>D});var n=i(34230);const o=65,s=97,r=90,a=122,l=46,c=47,d=92,u=58,h=63;class g extends Error{constructor(e,t,i){let n;"string"===typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;s+=". Received type "+typeof i,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function p(e,t){if(null===e||"object"!==typeof e)throw new g(t,"Object",e)}function f(e,t){if("string"!==typeof e)throw new g(t,"string",e)}const m="win32"===n.iD;function _(e){return e===c||e===d}function v(e){return e===c}function b(e){return e>=o&&e<=r||e>=s&&e<=a}function y(e,t,i,n){let o="",s=0,r=-1,a=0,d=0;for(let u=0;u<=e.length;++u){if(u2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):(o=o.slice(0,e),s=o.length-1-o.lastIndexOf(i)),r=u,a=0;continue}if(0!==o.length){o="",s=0,r=u,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,u)}`:o=e.slice(r+1,u),s=u-r-1;r=u,a=0}else d===l&&-1!==a?++a:a=-1}return o}function w(e){return e?`${"."===e[0]?"":"."}${e}`:""}function C(e,t){p(t,"pathObject");const i=t.dir||t.root,n=t.base||`${t.name||""}${w(t.ext)}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const S={resolve(...e){let t="",i="",o=!1;for(let s=e.length-1;s>=-1;s--){let r;if(s>=0){if(r=e[s],f(r,`paths[${s}]`),0===r.length)continue}else 0===t.length?r=n.bJ():(r=n._K[`=${t}`]||n.bJ(),(void 0===r||r.slice(0,2).toLowerCase()!==t.toLowerCase()&&r.charCodeAt(2)===d)&&(r=`${t}\\`));const a=r.length;let l=0,c="",h=!1;const g=r.charCodeAt(0);if(1===a)_(g)&&(l=1,h=!0);else if(_(g))if(h=!0,_(r.charCodeAt(1))){let e=2,t=e;while(e2&&_(r.charCodeAt(2))&&(h=!0,l=3));if(c.length>0)if(t.length>0){if(c.toLowerCase()!==t.toLowerCase())continue}else t=c;if(o){if(t.length>0)break}else if(i=`${r.slice(l)}\\${i}`,o=h,h&&t.length>0)break}return i=y(i,!o,"\\",_),o?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){f(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return v(s)?"\\":e;if(_(s))if(o=!0,_(e.charCodeAt(1))){let o=2,s=o;while(o2&&_(e.charCodeAt(2))&&(o=!0,n=3));let r=n0&&_(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){f(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return _(i)||t>2&&b(i)&&e.charCodeAt(1)===u&&_(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"===typeof i&&_(i.charCodeAt(0))){++o;const e=i.length;e>1&&_(i.charCodeAt(1))&&(++o,e>2&&(_(i.charCodeAt(2))?++o:n=!1))}if(n){while(o=2&&(t=`\\${t.slice(o)}`)}return S.normalize(t)},relative(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";const i=S.resolve(e),n=S.resolve(t);if(i===n)return"";if(e=i.toLowerCase(),t=n.toLowerCase(),e===t)return"";let o=0;while(oo&&e.charCodeAt(s-1)===d)s--;const r=s-o;let a=0;while(aa&&t.charCodeAt(l-1)===d)l--;const c=l-a,u=ru){if(t.charCodeAt(a+g)===d)return n.slice(a+g+1);if(2===g)return n.slice(a+g)}r>u&&(e.charCodeAt(o+g)===d?h=g:2===g&&(h=3)),-1===h&&(h=0)}let p="";for(g=o+h+1;g<=s;++g)g!==s&&e.charCodeAt(g)!==d||(p+=0===p.length?"..":"\\..");return a+=h,p.length>0?`${p}${n.slice(a,l)}`:(n.charCodeAt(a)===d&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e||0===e.length)return e;const t=S.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===d){if(t.charCodeAt(1)===d){const e=t.charCodeAt(2);if(e!==h&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(b(t.charCodeAt(0))&&t.charCodeAt(1)===u&&t.charCodeAt(2)===d)return`\\\\?\\${t}`;return e},dirname(e){f(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return _(o)?e:".";if(_(o)){if(i=n=1,_(e.charCodeAt(1))){let o=2,s=o;while(o2&&_(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let i=t-1;i>=n;--i)if(_(e.charCodeAt(i))){if(!r){s=i;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&f(t,"suffix"),f(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&b(e.charCodeAt(0))&&e.charCodeAt(1)===u&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(_(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1===--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(_(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){f(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&e.charCodeAt(1)===u&&b(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(_(t)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1),t===l?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:C.bind(null,"\\"),parse(e){f(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return _(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(_(o)){if(n=1,_(e.charCodeAt(1))){let t=2,o=t;while(t0&&(t.root=e.slice(0,n));let s=-1,r=n,a=-1,c=!0,d=e.length-1,h=0;for(;d>=n;--d)if(o=e.charCodeAt(d),_(o)){if(!c){r=d+1;break}}else-1===a&&(c=!1,a=d+1),o===l?-1===s?s=d:1!==h&&(h=1):-1!==s&&(h=-1);return-1!==a&&(-1===s||0===h||1===h&&s===a-1&&s===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,s),t.base=e.slice(r,a),t.ext=e.slice(s,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},k=(()=>{if(m){const e=/\\/g;return()=>{const t=n.bJ().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>n.bJ()})(),x={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:k();f(o,`paths[${n}]`),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===c)}return t=y(t,!i,"/",v),i?`/${t}`:t.length>0?t:"."},normalize(e){if(f(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c,i=e.charCodeAt(e.length-1)===c;return e=y(e,!t,"/",v),0===e.length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return f(e,"path"),e.length>0&&e.charCodeAt(0)===c},join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":x.normalize(t)},relative(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";if(e=x.resolve(e),t=x.resolve(t),e===t)return"";const i=1,n=e.length,o=n-i,s=1,r=t.length-s,a=oa){if(t.charCodeAt(s+d)===c)return t.slice(s+d+1);if(0===d)return t.slice(s+d)}else o>a&&(e.charCodeAt(i+d)===c?l=d:0===d&&(l=0));let u="";for(d=i+l+1;d<=n;++d)d!==n&&e.charCodeAt(d)!==c||(u+=0===u.length?"..":"/..");return`${u}${t.slice(s+l)}`},toNamespacedPath(e){return e},dirname(e){if(f(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===c){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&f(t,"ext"),f(e,"path");let i,n=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===c){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1===--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===c){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){f(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==c)-1===n&&(o=!1,n=r+1),a===l?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:C.bind(null,"/"),parse(e){f(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===c;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,a=!0,d=e.length-1,u=0;for(;d>=n;--d){const t=e.charCodeAt(d);if(t!==c)-1===r&&(a=!1,r=d+1),t===l?-1===o?o=d:1!==u&&(u=1):-1!==o&&(u=-1);else if(!a){s=d+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===u||1===u&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};x.win32=S.win32=S,x.posix=S.posix=x;const E=m?S.normalize:x.normalize,L=m?S.join:x.join,T=m?S.resolve:x.resolve,I=m?S.relative:x.relative,D=m?S.dirname:x.dirname,R=m?S.basename:x.basename,N=m?S.extname:x.extname,A=m?S.sep:x.sep},25160:(e,t,i)=>{"use strict";i.d(t,{BH:()=>P,Fr:()=>A,H8:()=>j,HZ:()=>I,OS:()=>B,UP:()=>$,_p:()=>F,cm:()=>V,gm:()=>z,ib:()=>T,j9:()=>L,lg:()=>R,m0:()=>q,nr:()=>U,uF:()=>x,un:()=>N,zx:()=>E});var n=i(41337);const o="en";let s,r,a=!1,l=!1,c=!1,d=!1,u=!1,h=!1,g=!1,p=!1,f=!1,m=!1,_=o,v=null,b=null;const y=globalThis;let w;"undefined"!==typeof y.vscode&&"undefined"!==typeof y.vscode.process?w=y.vscode.process:"undefined"!==typeof process&&"string"===typeof process?.versions?.node&&(w=process);const C="string"===typeof w?.versions?.electron,S=C&&"renderer"===w?.type;if("object"===typeof w){a="win32"===w.platform,l="darwin"===w.platform,c="linux"===w.platform,d=c&&!!w.env["SNAP"]&&!!w.env["SNAP_REVISION"],g=C,f=!!w.env["CI"]||!!w.env["BUILD_ARTIFACTSTAGINGDIRECTORY"],s=o,_=o;const e=w.env["VSCODE_NLS_CONFIG"];if(e)try{const t=JSON.parse(e);s=t.userLocale,v=t.osLocale,_=t.resolvedLanguage||o,b=t.languagePack?.translationsConfigFile}catch(e){}u=!0}else"object"!==typeof navigator||S?console.error("Unable to resolve platform."):(r=navigator.userAgent,a=r.indexOf("Windows")>=0,l=r.indexOf("Macintosh")>=0,p=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=r.indexOf("Linux")>=0,m=r?.indexOf("Mobi")>=0,h=!0,_=n.i8()||o,s=navigator.language.toLowerCase(),v=s);let k=0;l?k=1:a?k=3:c&&(k=2);const x=a,E=l,L=c,T=u,I=h,D=h&&"function"===typeof y.importScripts,R=D?y.origin:void 0,N=p,A=m,O=r,P=_,M="function"===typeof y.postMessage&&!y.importScripts,F=(()=>{if(M){const e=[];y.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),y.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),B=l||p?2:a?1:3;let W=!0,H=!1;function V(){if(!H){H=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);W=513===t[0]}return W}const j=!!(O&&O.indexOf("Chrome")>=0),z=!!(O&&O.indexOf("Firefox")>=0),U=!!(!j&&O&&O.indexOf("Safari")>=0),$=!!(O&&O.indexOf("Edg/")>=0),q=!!(O&&O.indexOf("Android")>=0)},34230:(e,t,i)=>{"use strict";i.d(t,{_K:()=>a,bJ:()=>r,iD:()=>l});var n=i(25160);let o;const s=globalThis.vscode;if("undefined"!==typeof s&&"undefined"!==typeof s.process){const e=s.process;o={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else o="undefined"!==typeof process&&"string"===typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env["VSCODE_CWD"]||process.cwd()}}:{get platform(){return n.uF?"win32":n.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const r=o.cwd,a=o.env,l=o.platform},21542:(e,t,i)=>{"use strict";var n;i.d(t,{Q:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}function n(e,n){return!i(t(e,n))}function o(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}e.intersect=t,e.isEmpty=i,e.intersects=n,e.relativeComplement=o}(n||(n={}))},84366:(e,t,i)=>{"use strict";i.d(t,{B6:()=>S,Fd:()=>v,LC:()=>f,P8:()=>p,Pi:()=>g,er:()=>u,iZ:()=>b,n4:()=>h,o1:()=>y,pD:()=>m,su:()=>c,uJ:()=>_});var n=i(37531),o=i(6657),s=i(52444),r=i(25160),a=i(20601),l=i(29133);function c(e){return(0,l.I)(e,!0)}class d{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===o.ny.file)return n._1(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(w(e.authority,t.authority))return n._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return p(e)||e.authority}basename(e){return s.SA.basename(e.path)}extname(e){return s.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===o.ny.file?t=l.r.file(s.pD(c(e))).path:(t=s.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===o.ny.file?l.r.file(s.S8(c(e))).path:s.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!w(e.authority,t.authority))return;if(e.scheme===o.ny.file){const i=s.V8(c(e),c(t));return r.uF?n.TH(i):i}let i=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,a.length);en.Zn(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.Vn){return C(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.Vn){let i=!1;if(e.scheme===o.ny.file){const o=c(e);i=void 0!==o&&o.length===n.Zn(o).length&&o[o.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||C(e,t)?e:e.with({path:e.path+"/"})}}const u=new d((()=>!1)),h=(new d((e=>e.scheme!==o.ny.file||!r.j9)),new d((e=>!0)),u.isEqual.bind(u)),g=(u.isEqualOrParent.bind(u),u.getComparisonKey.bind(u),u.basenameOrAuthority.bind(u)),p=u.basename.bind(u),f=u.extname.bind(u),m=u.dirname.bind(u),_=u.joinPath.bind(u),v=u.normalizePath.bind(u),b=u.relativePath.bind(u),y=u.resolvePath.bind(u),w=(u.isAbsolutePath.bind(u),u.isEqualAuthority.bind(u)),C=u.hasTrailingPathSeparator.bind(u);u.removeTrailingPathSeparator.bind(u),u.addTrailingPathSeparator.bind(u);var S;(function(e){function t(t){const i=new Map,n=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));n.split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const o=t.path.substring(0,t.path.indexOf(";"));return o&&i.set(e.META_DATA_MIME,o),i}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(S||(S={}))},52210:(e,t,i)=>{"use strict";i.d(t,{yE:()=>r});var n=i(40231),o=i(5091);class s{constructor(e,t,i,n,o,s,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,o|=0,s|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),o<0&&(o=0),r+o>s&&(r=s-o),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=o,this.scrollHeight=s,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new s(this._forceIntegerValues,"undefined"!==typeof e.width?e.width:this.width,"undefined"!==typeof e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,"undefined"!==typeof e.height?e.height:this.height,"undefined"!==typeof e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new s(this._forceIntegerValues,this.width,this.scrollWidth,"undefined"!==typeof e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,"undefined"!==typeof e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends o.jG{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.vl),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new s(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:"undefined"===typeof e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:"undefined"===typeof e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new d(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=d.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*h(t)}}function c(e,t,i){return function(n){return n2.5*i){let n,o;return e{"use strict";i.d(t,{A:()=>s});var n,o=i(20601);(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(n||(n={})),function(e){const t="error",i="warning",n="warn",s="info",r="ignore";function a(r){return r?o.Q_(t,r)?e.Error:o.Q_(i,r)||o.Q_(n,r)?e.Warning:o.Q_(s,r)?e.Info:e.Ignore:e.Ignore}function l(n){switch(n){case e.Error:return t;case e.Warning:return i;case e.Info:return s;default:return r}}e.fromValue=a,e.toString=l}(n||(n={}));const s=n},84240:(e,t,i)=>{"use strict";i.d(t,{W:()=>o});const n=globalThis.performance&&"function"===typeof globalThis.performance.now;class o{static create(e){return new o(e)}constructor(e){this._now=n&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},20601:(e,t,i)=>{"use strict";i.d(t,{$X:()=>Y,AV:()=>s,BO:()=>g,Bm:()=>p,Bq:()=>u,DB:()=>L,E_:()=>q,GP:()=>a,HG:()=>y,LJ:()=>P,LU:()=>ee,Lv:()=>T,MV:()=>j,NB:()=>h,OS:()=>m,Q_:()=>D,Qp:()=>N,S8:()=>ce,Ss:()=>X,UD:()=>S,UU:()=>w,Vi:()=>A,W1:()=>x,Wd:()=>re,Wv:()=>I,Z5:()=>F,_J:()=>Q,aC:()=>G,bm:()=>d,eY:()=>_,en:()=>b,ih:()=>c,iy:()=>V,jy:()=>l,km:()=>H,lF:()=>k,lT:()=>C,m:()=>z,ne:()=>Z,ns:()=>R,pc:()=>O,r_:()=>J,tk:()=>ie,tl:()=>de,uz:()=>v,wB:()=>f,y_:()=>ue,zY:()=>te,z_:()=>M,zd:()=>E});var n=i(17389),o=i(85661);function s(e){return!e||"string"!==typeof e||0===e.trim().length}const r=/{(\d+)}/g;function a(e,...t){return 0===t.length?e:e.replace(r,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function l(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function c(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function d(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function u(e,t=" "){const i=h(e,t);return g(i,t)}function h(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;while(e.indexOf(t,n)===n)n+=i;return e.substring(n)}function g(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,s=-1;while(1){if(s=e.lastIndexOf(t,o-1),-1===s||s+i!==o)break;if(0===s)return"";o=s}return e.substring(0,o)}function p(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(e){return e.replace(/\*/g,"")}function m(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=d(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function _(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function v(e){return e.split(/\r\n|\r|\n/)}function b(e){const t=[],i=e.split(/(\r\n|\r|\n)/);for(let e=0;e=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function S(e,t){return et?1:0}function k(e,t,i=0,n=e.length,o=0,s=t.length){for(;is)return 1}const r=n-i,a=s-o;return ra?1:0}function x(e,t){return E(e,t,0,e.length,0,t.length)}function E(e,t,i=0,n=e.length,o=0,s=t.length){for(;i=128||a>=128)return k(e.toLowerCase(),t.toLowerCase(),i,n,o,s);T(r)&&(r-=32),T(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return ra?1:0}function L(e){return e>=48&&e<=57}function T(e){return e>=97&&e<=122}function I(e){return e>=65&&e<=90}function D(e,t){return e.length===t.length&&0===E(e,t)}function R(e,t){const i=t.length;return!(t.length>e.length)&&0===E(e,t,0,i)}function N(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n1){const n=e.charCodeAt(t-2);if(O(n))return M(n,i)}return i}class W{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=B(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=F(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class H{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new W(e,t)}nextGraphemeLength(){const e=oe.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());while(!t.eol()){const i=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(ne(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=oe.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());while(t.offset>0){const i=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(ne(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function V(e,t){const i=new H(e,t);return i.nextGraphemeLength()}function j(e,t){const i=new H(e,t);return i.prevGraphemeLength()}function z(e,t){t>0&&P(e.charCodeAt(t))&&t--;const i=t+V(e,t),n=i-j(e,i);return[n,i]}let U;function $(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function q(e){return U||(U=$()),U.test(e)}const K=/^[\t\n\r\x20-\x7E]*$/;function G(e){return K.test(e)}const Q=/[\u2028\u2029]/;function Y(e){return Q.test(e)}function Z(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function X(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const J=String.fromCharCode(65279);function ee(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function te(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ie(e){const t=26;return e%=2*t,et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function se(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function re(e,t){if(0===e)return 0;const i=ae(e,t);if(void 0!==i)return i;const n=new W(t,e);return n.prevCodePoint(),n.offset}function ae(e,t){const i=new W(t,e);let n=i.prevCodePoint();while(le(n)||65039===n||8419===n){if(0===i.offset)return;n=i.prevCodePoint()}if(!X(n))return;let o=i.offset;if(o>0){const e=i.prevCodePoint();8205===e&&(o=i.offset)}return o}function le(e){return 127995<=e&&e<=127999}const ce=" ";class de{static{this.ambiguousCharacterData=new o.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new n.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in o));0===r.length&&(r=["_default"]);for(const e of r){const i=t(o[e]);s=n(s,i)}const a=t(o["_common"]),l=i(a,s);return new de(l)}))}static getInstance(e){return de.cache.get(Array.from(e))}static{this._locales=new o.d((()=>Object.keys(de.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return de._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class ue{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(ue.getRawData())),this._data}static isInvisibleCharacter(e){return ue.getData().has(e)}static get codePoints(){return ue.getData()}}},59638:(e,t,i)=>{"use strict";i.d(t,{h:()=>n});const n=Symbol("MicrotaskDelay")},71268:(e,t,i)=>{"use strict";i.d(t,{cB:()=>c});var n=i(20601);class o{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new c(new a(e,t))}static forStrings(){return new c(new o)}static forConfigKeys(){return new c(new s)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new l,this._root.segment=i.value());const o=[];n=this._root;while(1){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new l,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new l,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const s=n.value;n.value=t,n.key=e;for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=o[e][0],n=o[e+1][0];if(1===i&&1===n)o[e][1]=t.rotateLeft();else if(-1===i&&-1===n)o[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=o[e+1][1]=o[e+1][1].rotateRight(),o[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=o[e+1][1]=o[e+1][1].rotateLeft(),o[e][1]=t.rotateRight()}if(e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1];break}else this._root=o[0][1]}}return s}get(e){return this._getNode(e)?.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;while(i){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===t?.value&&void 0===t?.mid)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let o=this._root;while(o){const e=i.cmp(o.segment);if(e>0)n.push([-1,o]),o=o.left;else if(e<0)n.push([1,o]),o=o.right;else{if(!i.hasNext())break;i.next(),n.push([0,o]),o=o.mid}}if(o){if(t?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const e=this._min(o.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),o.key=t,o.value=i,o.segment=n}}else{const e=o.left??o.right;if(n.length>0){const[t,i]=n[n.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e;break}}else this._root=e}for(let e=n.length-1;e>=0;e--){const t=n[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),n[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),n[e][1]=t.rotateRight()),e>0)switch(n[e-1][0]){case-1:n[e-1][1].left=n[e][1];break;case 1:n[e-1][1].right=n[e][1];break;case 0:n[e-1][1].mid=n[e][1];break}else this._root=n[0][1]}}}_min(e){while(e.left)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;while(n){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;while(n){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}},23740:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n,o,s=i(25923);(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeColor=t})(n||(n={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(s.W.error);const[,o,r]=n,a=["codicon","codicon-"+o];return r&&a.push("codicon-modifier-"+r.substring(1)),a}function o(e){return i(e).join(" ")}function r(e){return"."+i(e).join(".")}function a(e){return e&&"object"===typeof e&&"string"===typeof e.id&&("undefined"===typeof e.color||n.isThemeColor(e.color))}e.asClassNameArray=i,e.asClassName=o,e.asCSSSelector=r,e.isThemeIcon=a;const l=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);function c(e){const t=l.exec(e);if(!t)return;const[,i]=t;return{id:i}}function d(e){return{id:e}}function u(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}}function h(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)}function g(e,t){return e.id===t.id&&e.color?.id===t.color?.id}e.fromString=c,e.fromId=d,e.modify=u,e.getModifier=h,e.isEqual=g}(o||(o={}))},50322:(e,t,i)=>{"use strict";function n(e){return"string"===typeof e}function o(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(e){const t=Object.getPrototypeOf(Uint8Array);return"object"===typeof e&&e instanceof t}function r(e){return"number"===typeof e&&!isNaN(e)}function a(e){return!!e&&"function"===typeof e[Symbol.iterator]}function l(e){return!0===e||!1===e}function c(e){return"undefined"===typeof e}function d(e){return!u(e)}function u(e){return c(e)||null===e}function h(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function g(e){if(u(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function p(e){return"function"===typeof e}function f(e,t){const i=Math.min(e.length,t.length);for(let n=0;nr,Gv:()=>o,Kg:()=>n,Lm:()=>l,O9:()=>d,Tn:()=>p,b0:()=>c,eU:()=>g,iu:()=>s,j:()=>h,jx:()=>f,xZ:()=>a,z:()=>u})},62647:(e,t,i)=>{"use strict";function n(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{W:()=>n,j:()=>o})},29133:(e,t,i)=>{"use strict";i.d(t,{I:()=>y,r:()=>p});var n=i(52444),o=i(25160);const s=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function c(e,t){return e||t?e:"file"}function d(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h;break}return t}const u="",h="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(e){return e instanceof p||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"string"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}constructor(e,t,i,n,o,s=!1){"object"===typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=c(e,s),this.authority=t||u,this.path=d(this.scheme,i||u),this.query=n||u,this.fragment=o||u,l(this,s))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===i?i=this.authority:null===i&&(i=u),void 0===n?n=this.path:null===n&&(n=u),void 0===o?o=this.query:null===o&&(o=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new m(t,i,n,o,s)}static parse(e,t=!1){const i=g.exec(e);return i?new m(i[2]||u,k(i[4]||u),k(i[5]||u),k(i[7]||u),k(i[9]||u),t):new m(u,u,u,u,u)}static file(e){let t=u;if(o.uF&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){const i=e.indexOf(h,2);-1===i?(t=e.substring(2),e=h):(t=e.substring(2,i),e=e.substring(i)||h)}return new m("file",t,e,u,u)}static from(e,t){const i=new m(e.scheme,e.authority,e.path,e.query,e.fragment,t);return i}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=o.uF&&"file"===e.scheme?p.file(n.IN.join(y(e,!0),...t)).path:n.SA.join(e.path,...t),e.with({path:i})}toString(e=!1){return w(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof p)return e;{const t=new m(e);return t._formatted=e.external??null,t._fsPath=e._sep===f?e.fsPath??null:null,t}}return e}}const f=o.uF?1:void 0;class m extends p{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const _={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(e,t,i){let n,o=-1;for(let s=0;s=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),void 0!==n&&(n+=e.charAt(s));else{void 0===n&&(n=e.substr(0,s));const t=_[r];void 0!==t?(-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),n+=t):-1===o&&(o=s)}}return-1!==o&&(n+=encodeURIComponent(e.substring(o))),void 0!==n?n:e}function b(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o.uF&&(i=i.replace(/\//g,"\\")),i}function w(e,t){const i=t?b:v;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=h,n+=h),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?n+=i(s,!1,!0):(n+=i(s.substr(0,e),!1,!0),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:v(l,!1,!1)),n}function C(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}const S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(S)?e.replace(S,(e=>C(e))):e}},23264:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});const n=function(){if("object"===typeof crypto&&"function"===typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"===typeof crypto&&"function"===typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t{"use strict";i.r(t),i.d(t,{SimpleWorkerClient:()=>y,SimpleWorkerServer:()=>S,create:()=>k,logOnceWebWorkerWarning:()=>g});var n=i(14396),o=i(40231),s=i(5091),r=i(6657),a=i(25160),l=i(20601);const c=!0,d="default",u="$initialize";let h=!1;function g(e){a.HZ&&(h||(h=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class p{constructor(e,t,i,n,o){this.vsWorker=e,this.req=t,this.channel=i,this.method=n,this.args=o,this.type=0}}class f{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class m{constructor(e,t,i,n,o){this.vsWorker=e,this.req=t,this.channel=i,this.eventName=n,this.arg=o,this.type=2}}class _{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class v{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class b{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,i){const n=String(++this._lastSentReq);return new Promise(((o,s)=>{this._pendingReplies[n]={resolve:o,reject:s},this._send(new p(this._workerId,n,e,t,i))}))}listen(e,t,i){let n=null;const s=new o.vl({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,s),this._send(new m(this._workerId,n,e,t,i))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new v(this._workerId,n)),n=null}});return s.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const i={get:(i,n)=>("string"!==typeof n||i[n]||(C(n)?i[n]=t=>this.listen(e,n,t):w(n)?i[n]=this.listen(e,n,void 0):36===n.charCodeAt(0)&&(i[n]=async(...i)=>(await(t?.()),this.sendMessage(e,n,i)))),i[n])};return new Proxy(Object.create(null),i)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req,i=this._handler.handleMessage(e.channel,e.method,e.args);i.then((e=>{this._send(new f(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,n.cU)(e.detail)),this._send(new f(this._workerId,t,void 0,(0,n.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new _(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{(0,n.dz)(e)}))),this._protocol=new b({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,i)=>this._handleMessage(e,t,i),handleEvent:(e,t,i)=>this._handleEvent(e,t,i)}),this._protocol.setWorkerId(this._worker.getId());let i=null;const o=globalThis.require;"undefined"!==typeof o&&"function"===typeof o.getConfig?i=o.getConfig():"undefined"!==typeof globalThis.requirejs&&(i=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(d,u,[this._worker.getId(),JSON.parse(JSON.stringify(i)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(d,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,i){const n=this._localChannels.get(e);if(!n)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!==typeof n[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(n[t].apply(n,i))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,i){const n=this._localChannels.get(e);if(!n)throw new Error(`Missing channel ${e} on main thread`);if(C(t)){const o=n[t].call(n,i);if("function"!==typeof o)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return o}if(w(t)){const i=n[t];if("function"!==typeof i)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return i}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function w(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function C(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class S{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new b({sendMessage:(t,i)=>{e(t,i)},handleMessage:(e,t,i)=>this._handleMessage(e,t,i),handleEvent:(e,t,i)=>this._handleEvent(e,t,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,i){if(e===d&&t===u)return this.initialize(i[0],i[1],i[2]);const n=e===d?this._requestHandler:this._localChannels.get(e);if(!n)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!==typeof n[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(n[t].apply(n,i))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,i){const n=e===d?this._requestHandler:this._localChannels.get(e);if(!n)throw new Error(`Missing channel ${e} on worker thread`);if(C(t)){const e=n[t].call(n,i);if("function"!==typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(w(t)){const e=n[t];if("function"!==typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,n){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){if(t&&("undefined"!==typeof t.baseUrl&&delete t["baseUrl"],"undefined"!==typeof t.paths&&"undefined"!==typeof t.paths.vs&&delete t.paths["vs"],"undefined"!==typeof t.trustedTypesPolicy&&delete t["trustedTypesPolicy"],t.catchError=!0,globalThis.require.config(t)),c){const e=r.zl.asBrowserUri(`${n}.js`).toString(!0);return i(5890)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}return new Promise(((e,t)=>{const i=globalThis.require;i([n],(i=>{this._requestHandler=i.create(this),this._requestHandler?e():t(new Error("No RequestHandler!"))}),t)}))}this._requestHandler=this._requestHandlerFactory(this)}}function k(e){return new S(e,null)}},34417:(e,t,i)=>{"use strict";i.d(t,{K:()=>p});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) @@ -1635,7 +1635,7 @@ var n={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],[ * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ -var n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]};function o(e){let t=[];const i=e.split(/\t+|\r+|\n+| +/);for(let n=0;n0&&t.push(i[n]);return t}var s=o("true false"),r=o("\n\t\t\t alias\n\t\t\t break\n\t\t\t case\n\t\t\t const\n\t\t\t const_assert\n\t\t\t continue\n\t\t\t continuing\n\t\t\t default\n\t\t\t diagnostic\n\t\t\t discard\n\t\t\t else\n\t\t\t enable\n\t\t\t fn\n\t\t\t for\n\t\t\t if\n\t\t\t let\n\t\t\t loop\n\t\t\t override\n\t\t\t requires\n\t\t\t return\n\t\t\t struct\n\t\t\t switch\n\t\t\t var\n\t\t\t while\n\t\t\t "),a=o("\n\t\t\t NULL\n\t\t\t Self\n\t\t\t abstract\n\t\t\t active\n\t\t\t alignas\n\t\t\t alignof\n\t\t\t as\n\t\t\t asm\n\t\t\t asm_fragment\n\t\t\t async\n\t\t\t attribute\n\t\t\t auto\n\t\t\t await\n\t\t\t become\n\t\t\t binding_array\n\t\t\t cast\n\t\t\t catch\n\t\t\t class\n\t\t\t co_await\n\t\t\t co_return\n\t\t\t co_yield\n\t\t\t coherent\n\t\t\t column_major\n\t\t\t common\n\t\t\t compile\n\t\t\t compile_fragment\n\t\t\t concept\n\t\t\t const_cast\n\t\t\t consteval\n\t\t\t constexpr\n\t\t\t constinit\n\t\t\t crate\n\t\t\t debugger\n\t\t\t decltype\n\t\t\t delete\n\t\t\t demote\n\t\t\t demote_to_helper\n\t\t\t do\n\t\t\t dynamic_cast\n\t\t\t enum\n\t\t\t explicit\n\t\t\t export\n\t\t\t extends\n\t\t\t extern\n\t\t\t external\n\t\t\t fallthrough\n\t\t\t filter\n\t\t\t final\n\t\t\t finally\n\t\t\t friend\n\t\t\t from\n\t\t\t fxgroup\n\t\t\t get\n\t\t\t goto\n\t\t\t groupshared\n\t\t\t highp\n\t\t\t impl\n\t\t\t implements\n\t\t\t import\n\t\t\t inline\n\t\t\t instanceof\n\t\t\t interface\n\t\t\t layout\n\t\t\t lowp\n\t\t\t macro\n\t\t\t macro_rules\n\t\t\t match\n\t\t\t mediump\n\t\t\t meta\n\t\t\t mod\n\t\t\t module\n\t\t\t move\n\t\t\t mut\n\t\t\t mutable\n\t\t\t namespace\n\t\t\t new\n\t\t\t nil\n\t\t\t noexcept\n\t\t\t noinline\n\t\t\t nointerpolation\n\t\t\t noperspective\n\t\t\t null\n\t\t\t nullptr\n\t\t\t of\n\t\t\t operator\n\t\t\t package\n\t\t\t packoffset\n\t\t\t partition\n\t\t\t pass\n\t\t\t patch\n\t\t\t pixelfragment\n\t\t\t precise\n\t\t\t precision\n\t\t\t premerge\n\t\t\t priv\n\t\t\t protected\n\t\t\t pub\n\t\t\t public\n\t\t\t readonly\n\t\t\t ref\n\t\t\t regardless\n\t\t\t register\n\t\t\t reinterpret_cast\n\t\t\t require\n\t\t\t resource\n\t\t\t restrict\n\t\t\t self\n\t\t\t set\n\t\t\t shared\n\t\t\t sizeof\n\t\t\t smooth\n\t\t\t snorm\n\t\t\t static\n\t\t\t static_assert\n\t\t\t static_cast\n\t\t\t std\n\t\t\t subroutine\n\t\t\t super\n\t\t\t target\n\t\t\t template\n\t\t\t this\n\t\t\t thread_local\n\t\t\t throw\n\t\t\t trait\n\t\t\t try\n\t\t\t type\n\t\t\t typedef\n\t\t\t typeid\n\t\t\t typename\n\t\t\t typeof\n\t\t\t union\n\t\t\t unless\n\t\t\t unorm\n\t\t\t unsafe\n\t\t\t unsized\n\t\t\t use\n\t\t\t using\n\t\t\t varying\n\t\t\t virtual\n\t\t\t volatile\n\t\t\t wgsl\n\t\t\t where\n\t\t\t with\n\t\t\t writeonly\n\t\t\t yield\n\t\t\t "),l=o("\n\t\tread write read_write\n\t\tfunction private workgroup uniform storage\n\t\tperspective linear flat\n\t\tcenter centroid sample\n\t\tvertex_index instance_index position front_facing frag_depth\n\t\t\tlocal_invocation_id local_invocation_index\n\t\t\tglobal_invocation_id workgroup_id num_workgroups\n\t\t\tsample_index sample_mask\n\t\trgba8unorm\n\t\trgba8snorm\n\t\trgba8uint\n\t\trgba8sint\n\t\trgba16uint\n\t\trgba16sint\n\t\trgba16float\n\t\tr32uint\n\t\tr32sint\n\t\tr32float\n\t\trg32uint\n\t\trg32sint\n\t\trg32float\n\t\trgba32uint\n\t\trgba32sint\n\t\trgba32float\n\t\tbgra8unorm\n"),c=o("\n\t\tbool\n\t\tf16\n\t\tf32\n\t\ti32\n\t\tsampler sampler_comparison\n\t\ttexture_depth_2d\n\t\ttexture_depth_2d_array\n\t\ttexture_depth_cube\n\t\ttexture_depth_cube_array\n\t\ttexture_depth_multisampled_2d\n\t\ttexture_external\n\t\ttexture_external\n\t\tu32\n\t\t"),d=o("\n\t\tarray\n\t\tatomic\n\t\tmat2x2\n\t\tmat2x3\n\t\tmat2x4\n\t\tmat3x2\n\t\tmat3x3\n\t\tmat3x4\n\t\tmat4x2\n\t\tmat4x3\n\t\tmat4x4\n\t\tptr\n\t\ttexture_1d\n\t\ttexture_2d\n\t\ttexture_2d_array\n\t\ttexture_3d\n\t\ttexture_cube\n\t\ttexture_cube_array\n\t\ttexture_multisampled_2d\n\t\ttexture_storage_1d\n\t\ttexture_storage_2d\n\t\ttexture_storage_2d_array\n\t\ttexture_storage_3d\n\t\tvec2\n\t\tvec3\n\t\tvec4\n\t\t"),u=o("\n\t\tvec2i vec3i vec4i\n\t\tvec2u vec3u vec4u\n\t\tvec2f vec3f vec4f\n\t\tvec2h vec3h vec4h\n\t\tmat2x2f mat2x3f mat2x4f\n\t\tmat3x2f mat3x3f mat3x4f\n\t\tmat4x2f mat4x3f mat4x4f\n\t\tmat2x2h mat2x3h mat2x4h\n\t\tmat3x2h mat3x3h mat3x4h\n\t\tmat4x2h mat4x3h mat4x4h\n\t\t"),h=o("\n bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2\n ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross\n degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit\n firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length\n log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract\n reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose\n trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine\n textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers\n textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare\n textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge\n textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin\n atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm\n pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm\n unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier\n workgroupUniformLoad\n"),g=o("\n\t\t\t\t\t &\n\t\t\t\t\t &&\n\t\t\t\t\t ->\n\t\t\t\t\t /\n\t\t\t\t\t =\n\t\t\t\t\t ==\n\t\t\t\t\t !=\n\t\t\t\t\t >\n\t\t\t\t\t >=\n\t\t\t\t\t <\n\t\t\t\t\t <=\n\t\t\t\t\t %\n\t\t\t\t\t -\n\t\t\t\t\t --\n\t\t\t\t\t +\n\t\t\t\t\t ++\n\t\t\t\t\t |\n\t\t\t\t\t ||\n\t\t\t\t\t *\n\t\t\t\t\t <<\n\t\t\t\t\t >>\n\t\t\t\t\t +=\n\t\t\t\t\t -=\n\t\t\t\t\t *=\n\t\t\t\t\t /=\n\t\t\t\t\t %=\n\t\t\t\t\t &=\n\t\t\t\t\t |=\n\t\t\t\t\t ^=\n\t\t\t\t\t >>=\n\t\t\t\t\t <<=\n\t\t\t\t\t "),p=/enable|requires|diagnostic/,f=/[_\p{XID_Start}]\p{XID_Continue}*/u,m="variable.predefined",_={tokenPostfix:".wgsl",defaultToken:"invalid",unicode:!0,atoms:s,keywords:r,reserved:a,predeclared_enums:l,predeclared_types:c,predeclared_type_generators:d,predeclared_type_aliases:u,predeclared_intrinsics:h,operators:g,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[p,"keyword","@directive"],[f,{cases:{"@atoms":m,"@keywords":"keyword","@reserved":"invalid","@predeclared_enums":m,"@predeclared_types":m,"@predeclared_type_generators":m,"@predeclared_type_aliases":m,"@predeclared_intrinsics":m,"@default":"identifier"}}],{include:"@commentOrSpace"},{include:"@numbers"},[/[{}()\[\]]/,"@brackets"],["@","annotation","@attribute"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/./,"invalid"]],commentOrSpace:[[/\s+/,"white"],[/\/\*/,"comment","@blockComment"],[/\/\/.*$/,"comment"]],blockComment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],attribute:[{include:"@commentOrSpace"},[/\w+/,"annotation","@pop"]],directive:[{include:"@commentOrSpace"},[/[()]/,"@brackets"],[/,/,"delimiter"],[f,"meta.content"],[/;/,"delimiter","@pop"]],numbers:[[/0[fh]/,"number.float"],[/[1-9][0-9]*[fh]/,"number.float"],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,"number.float"],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,"number.hex"],[/0[xX][0-9a-fA-F]+[iu]?/,"number.hex"],[/[1-9][0-9]*[iu]?/,"number"],[/0[iu]?/,"number"]]}}},59179:(e,t,i)=>{"use strict";i.r(t),i.d(t,{conf:()=>u,language:()=>h});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; +var n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]};function o(e){let t=[];const i=e.split(/\t+|\r+|\n+| +/);for(let e=0;e0&&t.push(i[e]);return t}var s=o("true false"),r=o("\n\t\t\t alias\n\t\t\t break\n\t\t\t case\n\t\t\t const\n\t\t\t const_assert\n\t\t\t continue\n\t\t\t continuing\n\t\t\t default\n\t\t\t diagnostic\n\t\t\t discard\n\t\t\t else\n\t\t\t enable\n\t\t\t fn\n\t\t\t for\n\t\t\t if\n\t\t\t let\n\t\t\t loop\n\t\t\t override\n\t\t\t requires\n\t\t\t return\n\t\t\t struct\n\t\t\t switch\n\t\t\t var\n\t\t\t while\n\t\t\t "),a=o("\n\t\t\t NULL\n\t\t\t Self\n\t\t\t abstract\n\t\t\t active\n\t\t\t alignas\n\t\t\t alignof\n\t\t\t as\n\t\t\t asm\n\t\t\t asm_fragment\n\t\t\t async\n\t\t\t attribute\n\t\t\t auto\n\t\t\t await\n\t\t\t become\n\t\t\t binding_array\n\t\t\t cast\n\t\t\t catch\n\t\t\t class\n\t\t\t co_await\n\t\t\t co_return\n\t\t\t co_yield\n\t\t\t coherent\n\t\t\t column_major\n\t\t\t common\n\t\t\t compile\n\t\t\t compile_fragment\n\t\t\t concept\n\t\t\t const_cast\n\t\t\t consteval\n\t\t\t constexpr\n\t\t\t constinit\n\t\t\t crate\n\t\t\t debugger\n\t\t\t decltype\n\t\t\t delete\n\t\t\t demote\n\t\t\t demote_to_helper\n\t\t\t do\n\t\t\t dynamic_cast\n\t\t\t enum\n\t\t\t explicit\n\t\t\t export\n\t\t\t extends\n\t\t\t extern\n\t\t\t external\n\t\t\t fallthrough\n\t\t\t filter\n\t\t\t final\n\t\t\t finally\n\t\t\t friend\n\t\t\t from\n\t\t\t fxgroup\n\t\t\t get\n\t\t\t goto\n\t\t\t groupshared\n\t\t\t highp\n\t\t\t impl\n\t\t\t implements\n\t\t\t import\n\t\t\t inline\n\t\t\t instanceof\n\t\t\t interface\n\t\t\t layout\n\t\t\t lowp\n\t\t\t macro\n\t\t\t macro_rules\n\t\t\t match\n\t\t\t mediump\n\t\t\t meta\n\t\t\t mod\n\t\t\t module\n\t\t\t move\n\t\t\t mut\n\t\t\t mutable\n\t\t\t namespace\n\t\t\t new\n\t\t\t nil\n\t\t\t noexcept\n\t\t\t noinline\n\t\t\t nointerpolation\n\t\t\t noperspective\n\t\t\t null\n\t\t\t nullptr\n\t\t\t of\n\t\t\t operator\n\t\t\t package\n\t\t\t packoffset\n\t\t\t partition\n\t\t\t pass\n\t\t\t patch\n\t\t\t pixelfragment\n\t\t\t precise\n\t\t\t precision\n\t\t\t premerge\n\t\t\t priv\n\t\t\t protected\n\t\t\t pub\n\t\t\t public\n\t\t\t readonly\n\t\t\t ref\n\t\t\t regardless\n\t\t\t register\n\t\t\t reinterpret_cast\n\t\t\t require\n\t\t\t resource\n\t\t\t restrict\n\t\t\t self\n\t\t\t set\n\t\t\t shared\n\t\t\t sizeof\n\t\t\t smooth\n\t\t\t snorm\n\t\t\t static\n\t\t\t static_assert\n\t\t\t static_cast\n\t\t\t std\n\t\t\t subroutine\n\t\t\t super\n\t\t\t target\n\t\t\t template\n\t\t\t this\n\t\t\t thread_local\n\t\t\t throw\n\t\t\t trait\n\t\t\t try\n\t\t\t type\n\t\t\t typedef\n\t\t\t typeid\n\t\t\t typename\n\t\t\t typeof\n\t\t\t union\n\t\t\t unless\n\t\t\t unorm\n\t\t\t unsafe\n\t\t\t unsized\n\t\t\t use\n\t\t\t using\n\t\t\t varying\n\t\t\t virtual\n\t\t\t volatile\n\t\t\t wgsl\n\t\t\t where\n\t\t\t with\n\t\t\t writeonly\n\t\t\t yield\n\t\t\t "),l=o("\n\t\tread write read_write\n\t\tfunction private workgroup uniform storage\n\t\tperspective linear flat\n\t\tcenter centroid sample\n\t\tvertex_index instance_index position front_facing frag_depth\n\t\t\tlocal_invocation_id local_invocation_index\n\t\t\tglobal_invocation_id workgroup_id num_workgroups\n\t\t\tsample_index sample_mask\n\t\trgba8unorm\n\t\trgba8snorm\n\t\trgba8uint\n\t\trgba8sint\n\t\trgba16uint\n\t\trgba16sint\n\t\trgba16float\n\t\tr32uint\n\t\tr32sint\n\t\tr32float\n\t\trg32uint\n\t\trg32sint\n\t\trg32float\n\t\trgba32uint\n\t\trgba32sint\n\t\trgba32float\n\t\tbgra8unorm\n"),c=o("\n\t\tbool\n\t\tf16\n\t\tf32\n\t\ti32\n\t\tsampler sampler_comparison\n\t\ttexture_depth_2d\n\t\ttexture_depth_2d_array\n\t\ttexture_depth_cube\n\t\ttexture_depth_cube_array\n\t\ttexture_depth_multisampled_2d\n\t\ttexture_external\n\t\ttexture_external\n\t\tu32\n\t\t"),d=o("\n\t\tarray\n\t\tatomic\n\t\tmat2x2\n\t\tmat2x3\n\t\tmat2x4\n\t\tmat3x2\n\t\tmat3x3\n\t\tmat3x4\n\t\tmat4x2\n\t\tmat4x3\n\t\tmat4x4\n\t\tptr\n\t\ttexture_1d\n\t\ttexture_2d\n\t\ttexture_2d_array\n\t\ttexture_3d\n\t\ttexture_cube\n\t\ttexture_cube_array\n\t\ttexture_multisampled_2d\n\t\ttexture_storage_1d\n\t\ttexture_storage_2d\n\t\ttexture_storage_2d_array\n\t\ttexture_storage_3d\n\t\tvec2\n\t\tvec3\n\t\tvec4\n\t\t"),u=o("\n\t\tvec2i vec3i vec4i\n\t\tvec2u vec3u vec4u\n\t\tvec2f vec3f vec4f\n\t\tvec2h vec3h vec4h\n\t\tmat2x2f mat2x3f mat2x4f\n\t\tmat3x2f mat3x3f mat3x4f\n\t\tmat4x2f mat4x3f mat4x4f\n\t\tmat2x2h mat2x3h mat2x4h\n\t\tmat3x2h mat3x3h mat3x4h\n\t\tmat4x2h mat4x3h mat4x4h\n\t\t"),h=o("\n bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2\n ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross\n degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit\n firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length\n log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract\n reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose\n trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine\n textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers\n textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare\n textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge\n textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin\n atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm\n pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm\n unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier\n workgroupUniformLoad\n"),g=o("\n\t\t\t\t\t &\n\t\t\t\t\t &&\n\t\t\t\t\t ->\n\t\t\t\t\t /\n\t\t\t\t\t =\n\t\t\t\t\t ==\n\t\t\t\t\t !=\n\t\t\t\t\t >\n\t\t\t\t\t >=\n\t\t\t\t\t <\n\t\t\t\t\t <=\n\t\t\t\t\t %\n\t\t\t\t\t -\n\t\t\t\t\t --\n\t\t\t\t\t +\n\t\t\t\t\t ++\n\t\t\t\t\t |\n\t\t\t\t\t ||\n\t\t\t\t\t *\n\t\t\t\t\t <<\n\t\t\t\t\t >>\n\t\t\t\t\t +=\n\t\t\t\t\t -=\n\t\t\t\t\t *=\n\t\t\t\t\t /=\n\t\t\t\t\t %=\n\t\t\t\t\t &=\n\t\t\t\t\t |=\n\t\t\t\t\t ^=\n\t\t\t\t\t >>=\n\t\t\t\t\t <<=\n\t\t\t\t\t "),p=/enable|requires|diagnostic/,f=/[_\p{XID_Start}]\p{XID_Continue}*/u,m="variable.predefined",_={tokenPostfix:".wgsl",defaultToken:"invalid",unicode:!0,atoms:s,keywords:r,reserved:a,predeclared_enums:l,predeclared_types:c,predeclared_type_generators:d,predeclared_type_aliases:u,predeclared_intrinsics:h,operators:g,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[p,"keyword","@directive"],[f,{cases:{"@atoms":m,"@keywords":"keyword","@reserved":"invalid","@predeclared_enums":m,"@predeclared_types":m,"@predeclared_type_generators":m,"@predeclared_type_aliases":m,"@predeclared_intrinsics":m,"@default":"identifier"}}],{include:"@commentOrSpace"},{include:"@numbers"},[/[{}()\[\]]/,"@brackets"],["@","annotation","@attribute"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/./,"invalid"]],commentOrSpace:[[/\s+/,"white"],[/\/\*/,"comment","@blockComment"],[/\/\/.*$/,"comment"]],blockComment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],attribute:[{include:"@commentOrSpace"},[/\w+/,"annotation","@pop"]],directive:[{include:"@commentOrSpace"},[/[()]/,"@brackets"],[/,/,"delimiter"],[f,"meta.content"],[/;/,"delimiter","@pop"]],numbers:[[/0[fh]/,"number.float"],[/[1-9][0-9]*[fh]/,"number.float"],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,"number.float"],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,"number.hex"],[/0[xX][0-9a-fA-F]+[iu]?/,"number.hex"],[/[1-9][0-9]*[iu]?/,"number"],[/0[iu]?/,"number"]]}}},59179:(e,t,i)=>{"use strict";i.r(t),i.d(t,{conf:()=>u,language:()=>h});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) @@ -1647,25 +1647,25 @@ var n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"], * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/c(d,n);var u={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:d.languages.IndentAction.Indent}}]},h={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}}},11320:(e,t,i)=>{"use strict";i.d(t,{M:()=>o});var n=i(76892);function o(e,t){e instanceof n.D?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}},87550:(e,t,i)=>{"use strict";i.d(t,{u:()=>r});var n=i(5091),o=i(40231),s=i(2150);class r extends n.jG{constructor(e,t){super(),this._onDidChange=this._register(new o.vl),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const o=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{(0,s.PG)((0,s.zk)(this._referenceDomElement),(()=>{n=!1,o()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?{width:t[0].contentRect.width,height:t[0].contentRect.height}:null,i=!0,o()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}},74753:(e,t,i)=>{"use strict";i.d(t,{T:()=>f});var n=i(2150),o=i(61979),s=i(40231),r=i(5091),a=i(11320);class l{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class c{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),this._container?.remove(),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");(0,a.M)(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");(0,a.M)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");(0,a.M)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const s of this._requests){let e;0===s.type&&(e=t),2===s.type&&(e=i),1===s.type&&(e=n),e.appendChild(document.createElement("br"));const r=document.createElement("span");c._render(r,s),e.appendChild(r),o.push(r)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)}),5e3))}_evictUntrustedReadings(e){const t=this._ensureCache(e),i=t.getValues();let n=!1;for(const o of i)o.isTrusted||(n=!0,t.remove(o));n&&this._onDidChange.fire()}readFontInfo(e,t){const i=this._ensureCache(e);if(!i.has(t)){let i=this._actualReadFontInfo(e,t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new h.YJ({pixelRatio:o.c.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(e,t,i)}return i.get(t)}_createRequest(e,t,i,n){const o=new l(e,t);return i.push(o),n?.push(o),o}_actualReadFontInfo(e,t){const i=[],n=[],s=this._createRequest("n",0,i,n),r=this._createRequest("m",0,i,null),a=this._createRequest(" ",0,i,n),l=this._createRequest("0",0,i,n),c=this._createRequest("1",0,i,n),g=this._createRequest("2",0,i,n),p=this._createRequest("3",0,i,n),f=this._createRequest("4",0,i,n),m=this._createRequest("5",0,i,n),_=this._createRequest("6",0,i,n),v=this._createRequest("7",0,i,n),b=this._createRequest("8",0,i,n),y=this._createRequest("9",0,i,n),w=this._createRequest("→",0,i,n),C=this._createRequest("→",0,i,null),S=this._createRequest("·",0,i,n),k=this._createRequest(String.fromCharCode(11825),0,i,null),x="|/-_ilm%";for(let o=0,d=x.length;o.001){L=!1;break}}let I=!0;return L&&C.width!==T&&(I=!1),C.width>w.width&&(I=!1),new h.YJ({pixelRatio:o.c.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:L,typicalHalfwidthCharacterWidth:s.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:I,spaceWidth:a.width,middotWidth:S.width,wsmiddotWidth:k.width,maxDigitWidth:E},!0)}}class p{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const f=new g},3692:(e,t,i)=>{"use strict";i.d(t,{M:()=>s});var n=i(40231);class o{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new n.vl,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const s=new o},169:(e,t,i)=>{"use strict";i.d(t,{$D:()=>n,Eq:()=>y,M0:()=>x,Mz:()=>k,No:()=>S,bs:()=>w});var n,o=i(88758),s=i(2150),r=i(49822),a=i(68389),l=i(736),c=i(9659),d=i(40231),u=i(5091),h=i(33911),g=i(20601),p=i(45436),f=i(98581),m=i(17300),_=i(12660),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};(function(e){e.Tap="-monaco-textarea-synthetic-tap"})(n||(n={}));const y={forceCopyWithSyntaxHighlighting:!1};class w{static{this.INSTANCE=new w}constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}class C{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let S=class extends u.jG{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,o,s){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=o,this._logService=s,this._onFocus=this._register(new d.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new d.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new d.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new d.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new d.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new d.vl),this.onPaste=this._onPaste.event,this._onType=this._register(new d.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new d.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new d.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new d.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new d.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new u.HE),this._asyncTriggerCut=this._register(new c.uC((()=>this._onCut.fire()),0)),this._textAreaState=p._O.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(d.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new c.uC((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)):this._asyncFocusGainWriteScreenReaderContent.clear()}))),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown((e=>{const t=new a.Z(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new a.Z(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{p.Hf&&console.log("[compositionstart]",e);const t=new C;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code))return p.Hf&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{p.Hf&&console.log("[compositionupdate]",e);const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=p._O.readFromTextArea(this._textArea,this._textAreaState),i=p._O.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p._O.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{p.Hf&&console.log("[compositionend]",e);const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=p._O.readFromTextArea(this._textArea,this._textAreaState),t=p._O.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p._O.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(p.Hf&&console.log("[input]",e),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=p._O.readFromTextArea(this._textArea,this._textAreaState),i=p._O.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!g.pc(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=k.getTextData(e.clipboardData);t&&(i=i||w.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new c.uC((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return s.ko(this._textArea.ownerDocument,"selectionchange",(t=>{if(l.p.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selection)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const c=this._textAreaState.deduceEditorPosition(r),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(u[0],u[1],u[2]),g=new f.L(d.lineNumber,d.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&"render"===e||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};w.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&k.setTextData(e.clipboardData,t.text,t.html,i)}};S=v([b(4,m.j),b(5,_.rr)],S);const k={getTextData(e){const t=e.getData(h.K.text);let i=null;const n=e.getData("vscode-editor-data");if("string"===typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(o){}if(0===t.length&&null===i&&e.files.length>0){const t=Array.prototype.slice.call(e.files,0);return[t.map((e=>e.name)).join("\n"),null]}return[t,i]},setTextData(e,t,i,n){e.setData(h.K.text,t),"string"===typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class x extends u.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new r.f(this._actual,"keydown")).event,this.onKeyUp=this._register(new r.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new r.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new r.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new r.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new r.f(this._actual,"beforeinput")).event,this.onInput=this._register(new r.f(this._actual,"input")).event,this.onCut=this._register(new r.f(this._actual,"cut")).event,this.onCopy=this._register(new r.f(this._actual,"copy")).event,this.onPaste=this._register(new r.f(this._actual,"paste")).event,this.onFocus=this._register(new r.f(this._actual,"focus")).event,this.onBlur=this._register(new r.f(this._actual,"blur")).event,this._onSyntheticTap=this._register(new d.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>l.p.onKeyDown()))),this._register(this.onBeforeInput((()=>l.p.onBeforeInput()))),this._register(this.onInput((()=>l.p.onInput()))),this._register(this.onKeyUp((()=>l.p.onKeyUp()))),this._register(s.ko(this._actual,n.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=s.jG(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&s.bq()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let r=null;const a=s.jG(n);r=a?a.activeElement:s.bq();const l=s.zk(r),c=r===n,d=n.selectionStart,u=n.selectionEnd;if(c&&d===t&&u===i)o.gm&&l.parent!==l&&n.focus();else{if(c)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o.gm&&l.parent!==l&&n.focus());try{const e=s.zK(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),s.wk(n,e)}catch(h){}}}}},45436:(e,t,i)=>{"use strict";i.d(t,{Al:()=>a,Hf:()=>s,_O:()=>r});var n=i(20601),o=i(8690);const s=!1;class r{static{this.EMPTY=new r("",0,0,null,void 0)}constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),o=e.getSelectionEnd();let s;if(t){const e=i.substring(0,n),o=t.value.substring(0,t.selectionStart);e===o&&(s=t.newlineCountBeforeSelection)}return new r(i,n,o,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new r(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){s&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;while(-1!==(o=t.indexOf("\n",o+1)))n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));const o=Math.min(n.Qp(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(n.Vi(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),a=e.value.substring(o,e.value.length-r),l=t.value.substring(o,t.value.length-r),c=e.selectionStart-o,d=e.selectionEnd-o,u=t.selectionStart-o,h=t.selectionEnd-o;if(s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${c}, selectionEnd: ${d}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${u}, selectionEnd: ${h}`)),u===h){const t=e.selectionStart-o;return s&&console.log(`REMOVE PREVIOUS: ${t} chars`),{text:l,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}const g=d-c;return{text:l,replacePrevCharCnt:g,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Qp(e.value,t.value),e.selectionEnd),o=Math.min(n.Vi(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-o),a=t.value.substring(i,t.value.length-o),l=e.selectionStart-i,c=e.selectionEnd-i,d=t.selectionStart-i,u=t.selectionEnd-i;return s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${d}, selectionEnd: ${u}`)),{text:a,replacePrevCharCnt:c,replaceNextCharCnt:r.length-c,positionDelta:u-a.length}}}class a{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new o.Q(n,1,s+1,1)}static fromEditorSelection(e,t,i,n){const s=500,l=a._getPageOfLine(t.startLineNumber,i),c=a._getRangeForPage(l,i),d=a._getPageOfLine(t.endLineNumber,i),u=a._getRangeForPage(d,i);let h=c.intersectRanges(new o.Q(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(h,1)>s){const t=e.modifyPosition(h.getEndPosition(),-s);h=o.Q.fromPositions(t,h.getEndPosition())}const g=e.getValueInRange(h,1),p=e.getLineCount(),f=e.getLineMaxColumn(p);let m=u.intersectRanges(new o.Q(t.endLineNumber,t.endColumn,p,f));if(n&&e.getValueLengthInRange(m,1)>s){const t=e.modifyPosition(m.getStartPosition(),s);m=o.Q.fromPositions(m.getStartPosition(),t)}const _=e.getValueInRange(m,1);let v;if(l===d||l+1===d)v=e.getValueInRange(t,1);else{const i=c.intersectRanges(t),n=u.intersectRanges(t);v=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&v.length>2*s&&(v=v.substring(0,s)+String.fromCharCode(8230)+v.substring(v.length-s,v.length)),new r(g+v+_,g.length,g.length+v.length,t,h.endLineNumber-h.startLineNumber)}}},32378:(e,t,i)=>{"use strict";i.d(t,{Yh:()=>R,QM:()=>x});var n=i(41337),o=i(88758),s=i(50322),r=i(19950),a=i(16259),l=i(94728),c=i(332),d=i(36788),u=i(8690);class h{static columnSelect(e,t,i,n,o,s){const r=Math.abs(o-i)+1,a=i>o,l=n>s,h=ns)continue;if(_n)continue;if(m0&&n--,h.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let a=o;a<=s;a++){const i=t.getLineMaxColumn(a),o=e.visibleColumnFromColumn(t,new d.y(a,i));n=Math.max(n,o)}let r=i.toViewVisualColumn;return r{const i=e.get(l.T).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=(0,b.bq)();return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(i),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.T).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}(function(e){class t extends C{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){if(!t.position)return;e.model.pushStackElement();const i=e.setCursorStates(t.source,3,[p.c.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]);i&&2!==t.revealType&&e.revealAllCursors(t.source,!0,!0)}}e.MoveTo=(0,a.E_)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.E_)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends C{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>c.MF.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=(0,a.E_)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if("undefined"===typeof n.position||"undefined"===typeof n.viewPosition||"undefined"===typeof n.mouseColumn)return null;const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new d.y(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return h.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.E_)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return h.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.E_)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return h.columnSelectRight(e.cursorConfig,e,i)}});class s extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return h.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.E_)(new s({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.E_)(new s({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return h.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.E_)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.E_)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3596,linux:{primary:0}}}));class g extends C{constructor(){super({id:"cursorMove",precondition:void 0,metadata:p.S.metadata})}runCoreEditorCommand(e,t){const i=p.S.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,g._move(e,e.getCursorStates(),i)),e.revealAllCursors(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return p.c.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return p.c.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=g,e.CursorMove=(0,a.E_)(new g);class f extends C{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,p.c.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealAllCursors(t.source,!0)}}e.CursorLeft=(0,a.E_)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.E_)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1039}})),e.CursorRight=(0,a.E_)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.E_)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1041}})),e.CursorUp=(0,a.E_)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.E_)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.E_)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.E_)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1035}})),e.CursorDown=(0,a.E_)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.E_)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.E_)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.E_)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.E_)(new class extends C{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?p.c.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):p.c.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;is&&(o=s);const r=new u.Q(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case k.RawAtArgument.Top:a=3;break;case k.RawAtArgument.Center:a=1;break;case k.RawAtArgument.Bottom:a=4;break;default:break}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends E{constructor(){super(a.tc)}runDOMCommand(e){o.gm&&(e.focus(),e.select()),e.ownerDocument.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[p.c.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.E_)(new class extends C{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[c.MF.fromModelSelection(t.selection)]))}})})(x||(x={}));const L=_.M$.and(m.R.textInputFocus,m.R.columnSelection);function T(e,t){v.f.registerKeybindingRule({id:e,primary:t,when:L,weight:w+1})}function I(e){return e.register(),e}var R;T(x.CursorColumnSelectLeft.id,1039),T(x.CursorColumnSelectRight.id,1041),T(x.CursorColumnSelectUp.id,1040),T(x.CursorColumnSelectPageUp.id,1035),T(x.CursorColumnSelectDown.id,1042),T(x.CursorColumnSelectPageDown.id,1036),function(e){class t extends a.DX{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.E_)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:m.R.writable,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,y.AO.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.E_)(new class extends t{constructor(){super({id:"outdent",precondition:m.R.writable,kbOpts:{weight:w,kbExpr:_.M$.and(m.R.editorTextFocus,m.R.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,f.T.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.E_)(new class extends t{constructor(){super({id:"tab",precondition:m.R.writable,kbOpts:{weight:w,kbExpr:_.M$.and(m.R.editorTextFocus,m.R.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,f.T.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.E_)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=g.g.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.E_)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=g.g.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends E{constructor(){super(a.aU)}runDOMCommand(e){e.ownerDocument.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(92))return t.getModel().undo()}},e.Redo=new class extends E{constructor(){super(a.ih)}runDOMCommand(e){e.ownerDocument.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(92))return t.getModel().redo()}}}(R||(R={}));class D extends a.uB{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.T).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function N(e,t){I(new D("default:"+e,e)),I(new D(e,e,t))}N("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),N("replacePreviousChar"),N("compositionType"),N("compositionStart"),N("compositionEnd"),N("paste"),N("cut")},35524:(e,t,i)=>{"use strict";i.d(t,{l:()=>u,q:()=>l});var n=i(63872),o=i(65312),s=i(33911),r=i(29133),a=i(47747);function l(e){const t=new o.Vq;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,(0,o.gf)(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,c(n))}}return t}function c(e){const t=e.path?r.r.parse(e.path):void 0;return(0,o.VX)(e.name,t,(async()=>new Uint8Array(await e.arrayBuffer())))}const d=Object.freeze([a.sV.EDITORS,a.sV.FILES,n.t.RESOURCES,n.t.INTERNAL_URI_LIST]);function u(e,t=!1){const i=l(e),a=i.get(n.t.INTERNAL_URI_LIST);if(a)i.replace(s.K.uriList,a);else if(t||!i.has(s.K.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(r.r.file(i).toString()):t.push(r.r.parse(e.name,!0).toString())}catch{}}}t.length&&i.replace(s.K.uriList,(0,o.gf)(o.jt.create(t)))}for(const n of d)i.delete(n);return i}},55413:(e,t,i)=>{"use strict";i.d(t,{Np:()=>s,jA:()=>a,z9:()=>o});var n=i(69483);function o(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===n._.ICodeEditor}function s(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===n._.IDiffEditor}function r(e){return!!e&&"object"===typeof e&&"function"===typeof e.onDidChangeActiveEditor}function a(e){return o(e)?e:s(e)?e.getModifiedEditor():r(e)&&o(e.activeCodeEditor)?e.activeCodeEditor:null}},66621:(e,t,i)=>{"use strict";i.d(t,{$z:()=>m,BA:()=>v,DW:()=>_,Hh:()=>d,Qn:()=>b,dO:()=>f,i_:()=>p,nz:()=>c,wt:()=>g});var n=i(2150),o=i(80125),s=i(46274),r=i(9659),a=i(5091),l=i(66344);class c{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new d(this.x-e.scrollX,this.y-e.scrollY)}}class d{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new c(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class u{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class h{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function g(e){const t=n.BK(e);return new u(t.left,t.top,t.width,t.height)}function p(e,t,i){const n=t.width/e.offsetWidth,o=t.height/e.offsetHeight,s=(i.x-t.x)/n,r=(i.y-t.y)/o;return new h(s,r)}class f extends s.P{constructor(e,t,i){super(n.zk(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new c(this.posx,this.posy),this.editorPos=g(i),this.relativePos=p(i,this.editorPos,this.pos)}}class m{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return n.ko(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return n.ko(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return n.ko(e,n.Bx.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return n.ko(e,n.Bx.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return n.ko(e,"mousemove",(e=>t(this._create(e))))}}class _{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return n.ko(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return n.ko(e,n.Bx.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return n.ko(e,"pointermove",(e=>t(this._create(e))))}}class v extends a.jG{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new o._),this._keydownListener=null}startMonitoring(e,t,i,o,s){this._keydownListener=n.b2(e.ownerDocument,"keydown",(e=>{const t=e.toKeyCodeChord();t.isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{o(new f(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),s(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class b{static{this._idPool=0}constructor(e){this._editor=e,this._instanceId=++b._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new r.uC((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const o=this._counter++;i=new y(t,`dyn-rule-${this._instanceId}-${o}`,n.Cl(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}class y{constructor(e,t,i,o){this.key=e,this.className=t,this.properties=o,this._referenceCount=0,this._styleElementDisposables=new a.Cm,this._styleElement=n.li(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const n in t){const e=t[n];let o;o="object"===typeof e?(0,l.GuP)(e.id):e;const s=w(n);i+=`\n\t${s}: ${o};`}return i+="\n}",i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function w(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}},16259:(e,t,i)=>{"use strict";i.d(t,{DX:()=>S,E_:()=>T,Fl:()=>I,HW:()=>N,PF:()=>x,aU:()=>M,dS:()=>n,fE:()=>w,gW:()=>R,ih:()=>F,ke:()=>L,ks:()=>k,qO:()=>E,tc:()=>B,uB:()=>y,xX:()=>D});var n,o=i(41337),s=i(29133),r=i(94728),a=i(36788),l=i(69361),c=i(64037),d=i(6330),u=i(72786),h=i(18904),g=i(87778),p=i(78386),f=i(16374),m=i(11086),_=i(50322),v=i(12660),b=i(2150);class y{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?h.M$.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};p.f.registerKeybindingRule(i)}}u.w.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){d.ZG.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class w extends y{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{const o=e.get(h.fN);if(o.contextMatchesRules(i??void 0))return n(e,s,t)}))}runCommand(e,t){return S.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class k extends S{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=d.D8.EditorContext),t.title||(t.title=e.label),t.when=h.M$.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(k.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(m.k).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class x extends k{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e{const i=e.get(h.fN),o=e.get(v.rr),s=i.contextMatchesRules(this.desc.precondition??void 0);if(s)return this.runEditorCommand(e,n,...t);o.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize())}))}}function L(e,t){u.w.registerCommand(e,(function(e,...i){const n=e.get(g._Y),[o,r]=i;(0,_.j)(s.r.isUri(o)),(0,_.j)(a.y.isIPosition(r));const d=e.get(l.IModelService).getModel(o);if(d){const e=a.y.lift(r);return n.invokeFunction(t,d,e,...i.slice(2))}return e.get(c.ITextModelService).createModelReference(o).then((e=>new Promise(((o,s)=>{try{const s=n.invokeFunction(t,e.object.textEditorModel,a.y.lift(r),i.slice(2));o(s)}catch(l){s(l)}})).finally((()=>{e.dispose()}))))}))}function T(e){return O.INSTANCE.registerEditorCommand(e),e}function I(e){const t=new e;return O.INSTANCE.registerEditorAction(t),t}function R(e){return O.INSTANCE.registerEditorAction(e),e}function D(e){O.INSTANCE.registerEditorAction(e)}function N(e,t,i){O.INSTANCE.registerEditorContribution(e,t,i)}(function(e){function t(e){return O.INSTANCE.getEditorCommand(e)}function i(){return O.INSTANCE.getEditorActions()}function n(){return O.INSTANCE.getEditorContributions()}function o(e){return O.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))}function s(){return O.INSTANCE.getDiffEditorContributions()}e.getEditorCommand=t,e.getEditorActions=i,e.getEditorContributions=n,e.getSomeEditorContributions=o,e.getDiffEditorContributions=s})(n||(n={}));const A={EditorCommonContributions:"editor.contributions"};class O{static{this.INSTANCE=new O}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function P(e){return e.register(),e}f.O.add(A.EditorCommonContributions,O.INSTANCE);const M=P(new w({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:o.kg({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:d.D8.CommandPalette,group:"",title:o.kg("undo","Undo"),order:1}]}));P(new C(M,{id:"default:undo",precondition:void 0}));const F=P(new w({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:o.kg({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:d.D8.CommandPalette,group:"",title:o.kg("redo","Redo"),order:1}]}));P(new C(F,{id:"default:redo",precondition:void 0}));const B=P(new w({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:d.D8.MenubarSelectionMenu,group:"1_basic",title:o.kg({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:d.D8.CommandPalette,group:"",title:o.kg("selectAll","Select All"),order:1}]}))},55745:(e,t,i)=>{"use strict";i.d(t,{Qg:()=>h,Ud:()=>c,jD:()=>u});var n=i(45746),o=i(5091),s=i(39751),r=i(81275),a=i(42389),l=i(98581);function c(e){return d.get(e)}class d extends o.jG{static{this._map=new Map}static get(e){let t=d._map.get(e);if(!t){t=new d(e),d._map.set(e,t);const i=e.onDidDispose((()=>{const t=d._map.get(e);t&&(d._map.delete(e),t.dispose(),i.dispose())}))}return t}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&(this._currentTransaction=new r.XL((()=>{})))}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){const e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=(0,s.FY)(this,this.editor.getModel()),this.model=this._model,this.isReadonly=(0,s.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(92))),this._versionId=(0,s.Zh)({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=(0,s.Zh)({owner:this,equalsFn:(0,n.KC)((0,n.S3)(l.L.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.isFocused=(0,s.y0)(this,(e=>{const t=this.editor.onDidFocusEditorWidget(e),i=this.editor.onDidBlurEditorWidget(e);return{dispose(){t.dispose(),i.dispose()}}}),(()=>this.editor.hasWidgetFocus())),this.value=(0,a.dQ)(this,(e=>(this.versionId.read(e),this.model.read(e)?.getValue()??"")),((e,t)=>{const i=this.model.get();null!==i&&e!==i.getValue()&&i.setValue(e)})),this.valueIsEmpty=(0,s.un)(this,(e=>(this.versionId.read(e),0===this.editor.getModel()?.getValueLength()))),this.cursorSelection=(0,s.C)({owner:this,equalsFn:(0,n.KC)(l.L.selectionsEqual)},(e=>this.selections.read(e)?.[0]??null)),this.onDidType=(0,s.Yd)(this),this.scrollTop=(0,s.y0)(this.editor.onDidScrollChange,(()=>this.editor.getScrollTop())),this.scrollLeft=(0,s.y0)(this.editor.onDidScrollChange,(()=>this.editor.getScrollLeft())),this.layoutInfo=(0,s.y0)(this.editor.onDidLayoutChange,(()=>this.editor.getLayoutInfo())),this.layoutInfoContentLeft=this.layoutInfo.map((e=>e.contentLeft)),this.layoutInfoDecorationsLeft=this.layoutInfo.map((e=>e.decorationsLeft)),this.contentWidth=(0,s.y0)(this.editor.onDidContentSizeChange,(()=>this.editor.getContentWidth())),this._overlayWidgetCounter=0,this._register(this.editor.onBeginUpdate((()=>this._beginUpdate()))),this._register(this.editor.onEndUpdate((()=>this._endUpdate()))),this._register(this.editor.onDidChangeModel((()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}}))),this._register(this.editor.onDidType((e=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,e)}finally{this._endUpdate()}}))),this._register(this.editor.onDidChangeModelContent((e=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,e),this._forceUpdate()}finally{this._endUpdate()}}))),this._register(this.editor.onDidChangeCursorSelection((e=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,e),this._forceUpdate()}finally{this._endUpdate()}})))}forceUpdate(e){this._beginUpdate();try{if(this._forceUpdate(),!e)return;return e(this._currentTransaction)}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e){return(0,s.y0)(this,(t=>this.editor.onDidChangeConfiguration((i=>{i.hasChanged(e)&&t(void 0)}))),(()=>this.editor.getOption(e)))}setDecorations(e){const t=new o.Cm,i=this.editor.createDecorationsCollection();return t.add((0,s.zL)({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},(t=>{const n=e.read(t);i.set(n)}))),t.add({dispose:()=>{i.clear()}}),t}createOverlayWidget(e){const t="observableOverlayWidget"+this._overlayWidgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(i);const n=(0,s.fm)((t=>{e.position.read(t),e.minContentWidthInPx.read(t),this.editor.layoutOverlayWidget(i)}));return(0,o.s)((()=>{n.dispose(),this.editor.removeOverlayWidget(i)}))}}function u(e,t){return(0,s.ht)({createEmptyChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(t,i)=>{if(t.didChange(e)){const e=t.change;void 0!==e&&i.deltas.push(e),i.didChange=!0}return!0}},((i,n)=>{const o=e.read(i);n.didChange&&t(o,n.deltas)}))}function h(e,t){const i=new o.Cm,n=u(e,((e,n)=>{i.clear(),t(e,n,i)}));return{dispose(){n.dispose(),i.dispose()}}}},3176:(e,t,i)=>{"use strict";i.d(t,{cw:()=>l,jN:()=>a,nu:()=>r});var n=i(87778),o=i(29133),s=i(50322);const r=(0,n.u1)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(l.is(e))return l.lift(e);if(c.is(e))return c.lift(e);throw new Error("Unsupported edit")}))}}class l extends a{static is(e){return e instanceof l||(0,s.Gv)(e)&&o.r.isUri(e.resource)&&(0,s.Gv)(e.textEdit)}static lift(e){return e instanceof l?e:new l(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class c extends a{static is(e){return e instanceof c||(0,s.Gv)(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof c?e:new c(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},94728:(e,t,i)=>{"use strict";i.d(t,{T:()=>o});var n=i(87778);const o=(0,n.u1)("codeEditorService")},71203:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const o=e.getVisibleRanges();if(o.length>0){t=o[0].getStartPosition();const n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,o){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=o}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}},95687:(e,t,i)=>{"use strict";i.d(t,{BG:()=>s,IO:()=>a,Y:()=>r,eh:()=>o,pj:()=>c,qN:()=>l});class n{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class o extends n{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class s{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class r{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i{"use strict";i.d(t,{Gb:()=>f,Ax:()=>p,rk:()=>C});var n=i(88758),o=i(76892),s=i(25160),r=i(95687);class a{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const s=this._createRange();try{return s.setStart(e,t),s.setEnd(i,n),s.getClientRects()}catch(r){return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return e;e.sort(r.IO.compare);const t=[];let i=0,n=e[0];for(let o=1,s=e.length;o=s.left?n.width=Math.max(n.width,s.left+s.width-n.left):(t[i++]=n,n=s)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let o=0,s=e.length;oa)return null;if(t=Math.min(a,Math.max(r,t)),n=Math.min(a,Math.max(r,n)),t===n&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,s.clientRectDeltaLeft,s.clientRectScale)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let l=e.children[t].firstChild,c=e.children[n].firstChild;if(l&&c||(!l&&0===i&&t>0&&(l=e.children[t-1].firstChild,i=1073741824),!c&&0===o&&n>0&&(c=e.children[n-1].firstChild,o=1073741824)),!l||!c)return null;i=Math.min(l.textContent.length,Math.max(0,i)),o=Math.min(c.textContent.length,Math.max(0,o));const d=this._readClientRects(l,i,c,o,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,s.clientRectDeltaLeft,s.clientRectScale)}}var l=i(1550),c=i(20529),d=i(1474),u=i(35011);const h=function(){return!!s.ib||!(s.j9||n.gm||n.nr)}();let g=!0;class p{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50),o=i.get(38);this.renderWhitespace="off"===o?i.get(100):"none",this.renderControlCharacters=i.get(95),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(118),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class f{static{this.CLASS_NAME="view-line"}constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,o.Z)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!(0,d.Bb)(this._options.themeType)&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const s=n.getViewLineRenderingData(e),r=this._options,a=l.d.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let p=null;if((0,d.Bb)(r.themeType)||"selection"===this._options.renderWhitespace){const t=n.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:s.minColumn,n=i.endLineNumber===e?i.endColumn:s.maxColumn;t');const v=(0,c.UW)(_,o);o.appendString("");let y=null;return g&&h&&s.isBasicASCII&&r.useMonospaceOptimizations&&0===v.containsForeignElements&&(y=new m(this._renderedViewLine?this._renderedViewLine.domNode:null,_,v.characterMapping)),y||(y=b(this._renderedViewLine?this._renderedViewLine.domNode:null,_,v.characterMapping,v.containsRTL,v.containsForeignElements)),this._renderedViewLine=y,!0}layoutLine(e,t,i){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(i))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof m}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof m?this._renderedViewLine.monospaceAssumptionsAreValid():g}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof m&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==o&&t>o+1&&i>o+1)return new r.pj(!0,[new r.IO(this.getWidth(n),0)]);-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return s&&s.length>0?new r.pj(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}class m{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),g=!1)}return g}toSlowRenderedLine(){return b(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getColumnPixelOffset(e,t,n),s=this._getColumnPixelOffset(e,i,n);return[new r.IO(o,s-o)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,o=300*(n+1)+1;let s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[n],-1===s&&(s=this._actualReadPixelOffset(e,o,i),this._keyColumnPixelOffsetCache[n]=s)),-1===s){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(o),a=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),o=a.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return o&&0!==o.length?o[0].left:-1}getColumnOfNodeOffset(e,t){return C(this._characterMapping,e,t)}}class _{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,n);if(-1===o)return null;const s=this._readPixelOffset(this.domNode,e,i,n);return-1===s?null:[new r.IO(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,o){if(i===n){const n=this._readPixelOffset(e,t,i,o);return-1===n?null:[new r.IO(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,o)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[i];if(-1!==o)return o;const s=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=a.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const o=this._characterMapping.getDomPosition(i),s=a.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new r.IO(0,this.getWidth(n))];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return a.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n)}getColumnOfNodeOffset(e,t){return C(this._characterMapping,e,t)}}class v extends _{_readVisibleRangesForRange(e,t,i,n,o){const s=super._readVisibleRangesForRange(e,t,i,n,o);if(!s||0===s.length||i===n||1===i&&n===this._characterMapping.length)return s;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=s[s.length-1];e.left{"use strict";i.d(t,{x:()=>us});var n=i(63637),o=i(16259),s=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},r=function(e,t){return function(i,n){t(i,n,e)}};let a=class{static{this.ID="editor.contrib.markerDecorations"}constructor(e,t){}dispose(){}};a=s([r(1,n.IMarkerDecorationsService)],a),(0,o.HW)(a.ID,a,0);var l=i(2150),c=i(14396),d=i(40231),u=i(5091),h=i(6657),g=i(11320),p=i(88758),f=i(85053),m=i(85603),_=i(25160),v=i(87550),b=i(74753);class y{static{this.items=[]}constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=y._read(e,this.key),i=t=>y._read(e,t),n=(t,i)=>y._write(e,t,i);this.migrate(t,i,n)}static _read(e,t){if("undefined"===typeof e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const o=t.substring(0,n);return e[o]=e[o]||{},void this._write(e[o],t.substring(n+1),i)}e[t]=i}}function w(e,t){y.items.push(new y(e,t))}function C(e,t){w(e,((i,n,o)=>{if("undefined"!==typeof i)for(const[s,r]of t)if(i===s)return void o(e,r)}))}function S(e){y.items.forEach((t=>t.apply(e)))}C("wordWrap",[[!0,"on"],[!1,"off"]]),C("lineNumbers",[[!0,"on"],[!1,"off"]]),C("cursorBlinking",[["visible","solid"]]),C("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),C("renderLineHighlight",[[!0,"line"],[!1,"none"]]),C("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),C("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),C("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),C("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),C("autoIndent",[[!1,"advanced"],[!0,"full"]]),C("matchBrackets",[[!0,"always"],[!1,"never"]]),C("renderFinalNewline",[[!0,"on"],[!1,"off"]]),C("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),C("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),C("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),w("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),"undefined"===typeof t("autoClosingQuotes")&&i("autoClosingQuotes","never"),"undefined"===typeof t("autoSurround")&&i("autoSurround","never"))})),w("renderIndentGuides",((e,t,i)=>{"undefined"!==typeof e&&(i("renderIndentGuides",void 0),"undefined"===typeof t("guides.indentation")&&i("guides.indentation",!!e))})),w("highlightActiveIndentGuide",((e,t,i)=>{"undefined"!==typeof e&&(i("highlightActiveIndentGuide",void 0),"undefined"===typeof t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const k={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};w("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"===typeof e){for(const n of Object.entries(k)){const o=e[n[0]];!1===o&&"undefined"===typeof t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1)}i("suggest.filteredTypes",void 0)}})),w("quickSuggestions",((e,t,i)=>{if("boolean"===typeof e){const t=e?"on":"off",n={comments:t,strings:t,other:t};i("quickSuggestions",n)}})),w("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"===typeof e&&(i("experimental.stickyScroll.enabled",void 0),"undefined"===typeof t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),w("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"===typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),"undefined"===typeof t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))})),w("codeActionsOnSave",((e,t,i)=>{if(e&&"object"===typeof e){let t=!1;const n={};for(const i of Object.entries(e))"boolean"===typeof i[1]?(t=!0,n[i[0]]=i[1]?"explicit":"never"):n[i[0]]=i[1];t&&i("codeActionsOnSave",n)}})),w("codeActionWidget.includeNearbyQuickfixes",((e,t,i)=>{"boolean"===typeof e&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),"undefined"===typeof t("codeActionWidget.includeNearbyQuickFixes")&&i("codeActionWidget.includeNearbyQuickFixes",e))})),w("lightbulb.enabled",((e,t,i)=>{"boolean"===typeof e&&i("lightbulb.enabled",e?void 0:"off")}));var x=i(3692),E=i(35011),L=i(17522),T=i(86817),I=i(17300),R=i(61979),D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};let A=class extends u.jG{constructor(e,t,i,n,o){super(),this._accessibilityService=o,this._onDidChange=this._register(new d.vl),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new d.vl),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new E.n0,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new v.u(n,i.dimension)),this._targetWindowId=(0,l.zk)(n).vscodeWindowId,this._rawOptions=W(i),this._validatedOptions=B.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(L.D.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(x.M.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(b.T.onDidChange((()=>this._recomputeOptions()))),this._register(R.c.getInstance((0,l.zk)(n)).onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=B.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=T._8.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:x.M.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return B.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:P(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:p.Tc||p.gm,pixelRatio:R.c.getInstance((0,l.ZF)(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return b.T.readFontInfo((0,l.ZF)(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=W(e),i=B.applyUpdate(this._rawOptions,t);i&&(this._validatedOptions=B.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=O(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function O(e){let t=0;while(e)e=Math.floor(e/10),t++;return t||1}function P(){let e="";return p.nr||p.c8||(e+="no-user-select "),p.nr&&(e+="no-minimap-shadow ",e+="enable-user-select "),_.zx&&(e+="mac "),e}A=D([N(4,I.j)],A);class M{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class F{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class B{static validateOptions(e){const t=new M;for(const i of E.BE){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new F;for(const n of E.BE)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!==typeof e||"object"!==typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&f.aI(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!B._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of E.BE){const s=!B._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new E.lw(i):null}static applyUpdate(e,t){let i=!1;for(const n of E.BE)if(t.hasOwnProperty(n.name)){const o=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=o.newValue,i=i||o.didChange}return i}}function W(e){const t=m.Go(e);return S(t),t}var H=i(94728),V=i(76892),j=i(736),z=i(66621);class U extends u.jG{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=4&&3===e[0]&&8===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&8===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&6===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&9===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&5===e[0]}}class se{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(146),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(67),this.stickyTabStops=n.get(117),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return se.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount();let s,r=null,a=null;return i.afterLineNumber!==o&&(a=new Q.y(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new Q.y(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,de._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class ae extends re{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=q.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,i,n,o){super(e,t,i,n),this.hitTestResult=new J.d((()=>de.doHitTest(this._ctx,this))),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=o;const s=Boolean(this._eventTarget);this._useHitTestTarget=!s}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return oe.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.relativePos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};if(o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth){const r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),a=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber);return s.glyphMarginLane=a[Math.floor(o/e.lineHeight)],t.fulfillMargin(2,n,i.range,s)}return o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,s))}return null}static _hitTestViewLines(e,t){if(!oe.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new Q.y(1,1),le);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new Q.y(i,n),le)}if(oe.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=ce(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new Q.y(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=ce(t.mouseContentHorizontalOffset-n),s=new Q.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}const i=t.hitTestResult.value;return 1===i.type?de.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(oe.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Q.y(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(oe.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Q.y(i,n))}}return null}static _hitTestScrollbar(e,t){if(oe.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Q.y(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(146),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return de._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;const i=Math.round(e/t);return i+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const s=n.lineNumber,r=n.column,a=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>a){const e=ce(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const c=e.visibleRangeForPosition(s,r);if(!c)return t.fulfillUnknown(n);const d=c.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const u=[];if(u.push({offset:c.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&u.push({offset:t.left,column:r-1})}const h=e.viewModel.getLineMaxColumn(s);if(re.offset-t.offset));const g=t.pos.toClientCoordinates(l.zk(e.viewDomNode)),p=i.getBoundingClientRect(),f=p.left<=g.clientX&&g.clientX<=p.right;let m=null;for(let l=1;lo;if(!s){const i=Math.floor((n+o)/2);let s=t.pos.y+(i-t.mouseVerticalOffset);s<=t.editorPos.y&&(s=t.editorPos.y+1),s>=t.editorPos.y+t.editorPos.height&&(s=t.editorPos.y+t.editorPos.height-1);const r=new z.nz(t.pos.x,s),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(l.zk(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(l.zk(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=l.jG(e.viewDomNode);let n;if(n=i?"undefined"===typeof i.caretRangeFromPoint?ue(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new ee;const o=n.startContainer;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,i=t?t.parentNode:null,s=i?i.parentNode:null,r=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;return r===G.Gb.CLASS_NAME?K.createFromDOMInfo(e,t,n.startOffset):new ee(o.parentNode)}if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,i=t?t.parentNode:null,n=i&&i.nodeType===i.ELEMENT_NODE?i.className:null;return n===G.Gb.CLASS_NAME?K.createFromDOMInfo(e,o,o.textContent.length):new ee(o)}return new ee}static _doHitTestWithCaretPositionFromPoint(e,t){const i=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null,s=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;return s===G.Gb.CLASS_NAME?K.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new ee(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,o=t?t.parentNode:null,s=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(n===G.Gb.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return K.createFromDOMInfo(e,t,0)}else if(s===G.Gb.CLASS_NAME)return K.createFromDOMInfo(e,i.offsetNode,0)}return new ee(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),o=X.s.atomicPosition(i,e.column-1,n,2);return-1!==o?new Q.y(e.lineNumber,o+1):e}static doHitTest(e,t){let i=new ee;if("function"===typeof e.viewDomNode.ownerDocument.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(l.zk(e.viewDomNode)))),1===i.type){const t=e.viewModel.getInjectedTextAt(i.position),n=e.viewModel.normalizePosition(i.position,2);!t&&n.equals(i.position)||(i=new te(n,i.spanNode,t))}return i}}function ue(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){while(o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild)o=o.lastChild;const e=o.getBoundingClientRect(),i=l.zk(o),s=i.getComputedStyle(o,null).getPropertyValue("font-style"),r=i.getComputedStyle(o,null).getPropertyValue("font-variant"),a=i.getComputedStyle(o,null).getPropertyValue("font-weight"),c=i.getComputedStyle(o,null).getPropertyValue("font-size"),d=i.getComputedStyle(o,null).getPropertyValue("line-height"),u=i.getComputedStyle(o,null).getPropertyValue("font-family"),h=`${s} ${r} ${a} ${c}/${d} ${u}`,g=o.innerText;let p,f=e.left,m=0;if(t>e.left+e.width)m=g.length;else{const e=he.getInstance();for(let i=0;ithis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(146).height;const n=new z.$z(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=l.ko(this.viewHelper.viewDomNode.ownerDocument,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new z.dO(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let o=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{o=t}))),this._register(l.ko(this.viewHelper.viewDomNode,l.Bx.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,o)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=ve.QC.INSTANCE;let t=0,i=L.D.getZoomLevel(),n=!1,o=0;const s=s=>{if(this.viewController.emitMouseWheel(s),!this._context.configuration.options.get(76))return;const a=new me.$(s);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(r(s)){const e=L.D.getZoomLevel(),t=a.deltaY>0?1:-1;L.D.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=L.D.getZoomLevel(),n=r(s),o=0),t=Date.now(),o+=a.deltaY,n&&(L.D.setZoomLevel(i+o/5),a.preventDefault(),a.stopPropagation())};function r(e){return _.zx?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(l.ko(this.viewHelper.viewDomNode,l.Bx.MOUSE_WHEEL,s,{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(146)){const e=this._context.configuration.options.get(146).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new z.Hh(e,t),n=i.toPageCoordinates(l.zk(this.viewHelper.viewDomNode)),o=(0,z.wt)(this.viewHelper.viewDomNode);if(n.yo.y+o.height||n.xo.x+o.width)return null;const s=(0,z.i_)(this.viewHelper.viewDomNode,o,n);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o,n,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=l.jG(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){const t=this.mouseTargetFactory.mouseTargetIsWidget(e);if(t||e.preventDefault(),this._mouseDownOperation.isActive())return;const i=e.timestamp;i{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(n||s&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(o)e.preventDefault();else if(a){const n=i.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class ye extends u.jG{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=o,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new z.BA(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new we(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new Se,this._currentSelection=new _e.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const o=this._context.configuration.options;if(!o.get(92)&&o.get(35)&&!o.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);l.kx(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const s=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=se.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return ne.createOutsideEditor(o,e,"below",s)}const l=n.getLineNumberAtVerticalOffset(r);return ne.createOutsideEditor(o,new Q.y(l,i.getLineMaxColumn(l)),"below",s)}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const n=e.posx-t.x-t.width;return ne.createOutsideEditor(o,new Q.y(s,i.getLineMaxColumn(s)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t),o=n.position;if(!o)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return ne.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Q.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class we extends u.jG{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new Ce(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class Ce extends u.jG{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=o,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=l.PG(l.zk(s.browserEvent),(()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(67),t=this._context.configuration.options.get(146).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(67),t=this._getScrollSpeed(),i=this._tick(),n=t*(i/1e3)*e,o="above"===this._position.outsidePosition?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,o),this._viewHelper.renderNow();const s=this._context.viewLayout.getLinesViewportData(),r="above"===this._position.outsidePosition?s.startLineNumber:s.endLineNumber;let a;{const e=(0,z.wt)(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(146).horizontalScrollbarHeight,i=new z.nz(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=(0,z.i_)(this._viewHelper.viewDomNode,e,i);a=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}a.position&&a.position.lineNumber===r||(a="above"===this._position.outsidePosition?ne.createOutsideEditor(this._position.mouseColumn,new Q.y(r,1),"above",this._position.outsideDistance):ne.createOutsideEditor(this._position.mouseColumn,new Q.y(r,this._context.viewModel.getLineMaxColumn(r)),"below",this._position.outsideDistance)),this._dispatchMouse(a,!0,2),this._animationFrameDisposable=l.PG(l.zk(a.element),(()=>this._execute()))}}class Se{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>Se.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var ke=i(169);class xe extends be{constructor(e,t,i){super(e,t,i),this._register(pe.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Tap,(e=>this.onTap(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Change,(e=>this.onChange(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Contextmenu,(e=>this._onContextMenu(new z.dO(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(l.ko(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new z.DW(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){const i=this._createMouseTarget(new z.dO(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class Ee extends be{constructor(e,t,i){super(e,t,i),this._register(pe.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Tap,(e=>this.onTap(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Change,(e=>this.onChange(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Contextmenu,(e=>this._onContextMenu(new z.dO(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new z.dO(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(ke.$D.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class Le extends u.jG{constructor(e,t,i){super();const n=_.un||_.m0&&_.Fr;n&&ge.e.pointerEvents?this.handler=this._register(new xe(e,t,i)):fe.G.TouchEvent?this.handler=this._register(new Ee(e,t,i)):this.handler=this._register(new be(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Te=i(41337),Ie=i(20601),Re=i(45436);class De extends U{}var Ne=i(15911),Ae=i(52764);class Oe extends De{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Q.y(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const t=e.get(68);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(96);const i=e.get(146);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Q.y(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}if(3===this._renderLineNumbers){if(this._lastCursorModelPosition.lineNumber===i)return String(i);if(i%10===0)return String(i);const e=this._context.viewModel.getLineCount();return i===e?String(i):""}return String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=_.j9?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter((e=>!!e.options.lineNumberClassName));o.sort(((e,t)=>Y.Q.compareRangesUsingEnds(e.range,t.range)));let s=0;const r=this._context.viewModel.getLineCount(),a=[];for(let l=i;l<=n;l++){const e=l-i;let n=this._getLineRenderLineNumber(l),c="";while(s${n}`):a[e]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,Ne.zy)(((e,t)=>{const i=e.getColor(Ae.Qt),n=e.getColor(Ae.JB);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));class Pe extends ${static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,V.Z)(document.createElement("div")),this._domNode.setClassName(Pe.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,V.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Pe.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}var Me=i(90385);const Fe="monaco-mouse-cursor-text";var Be=i(35350),We=i(85476),He=i(53790),Ve=i(13046),je=i(87778),ze=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ue=function(e,t){return function(i,n){t(i,n,e)}};class $e{constructor(e,t,i,n,o){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new Q.y(this.modelLineNumber,this.distanceToModelLineStart+1),i=new Q.y(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const qe=p.gm;let Ke=class extends ${constructor(e,t,i,n,o){super(e),this._keybindingService=n,this._instantiationService=o,this._primaryCursorPosition=new Q.y(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const s=this._context.configuration.options,r=s.get(146);this._setAccessibilityOptions(s),this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,this._contentHeight=r.height,this._fontInfo=s.get(50),this._lineHeight=s.get(67),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new _e.L(1,1,1,1)],this._modelSelections=[new _e.L(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,V.Z)(document.createElement("textarea")),q.write(this.textArea,7),this.textArea.setClassName(`inputarea ${Fe}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:a}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=a*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(125))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",Te.kg("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(92)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,V.Z)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const l={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},c={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,_.uF),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,o=Array.isArray(e)?e.join(t):e;let s,r=null;if(ke.Eq.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:o,html:s,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(_.zx&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Re._O(i,i.length,i.length,Y.Q.fromPositions(t),0)}const t=500;if(_.zx&&!e.isEmpty()&&l.getValueLengthInRange(e,0)0)return new Re._O(i,n,n,Y.Q.fromPositions(t),0)}return Re._O.EMPTY}return Re.Al.fromEditorSelection(l,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},d=this._register(new ke.M0(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(ke.No,c,d,_.OS,{isAndroid:p.m0,isChrome:p.H8,isFirefox:p.gm,isSafari:p.nr})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i="undefined"!==typeof e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(Re.Hf&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(Re.Hf&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:o}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),o=e.substring(n+1),s=o.lastIndexOf("\t"),r=o.length-s-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),c=a.column-1-l,d=o.substring(0,o.length-l),{tabSize:u}=this._context.viewModel.model.getOptions(),h=Ge(this.textArea.domNode.ownerDocument,d,this._fontInfo,u);return{distanceToModelLineStart:c,widthOfHiddenTextBefore:h}})(),{distanceToModelLineEnd:s}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),o=-1===n?e:e.substring(0,n),s=o.indexOf("\t"),r=-1===s?o.length:o.length-s-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r),c=this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l;return{distanceToModelLineEnd:c}})();this._context.viewModel.revealRange("keyboard",!0,Y.Q.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new $e(this._context,i.startLineNumber,n,o,s),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Fe} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Fe}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(He.M.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=(0,Me.i)(t,[]);let o=!0,s=e.column,r=!0,a=e.column,l=0;while(l<50&&(o||r)){if(o&&s<=1&&(o=!1),o){const e=i.charCodeAt(s-2),t=n.get(e);0!==t?o=!1:s--}if(r&&a>i.length&&(r=!1),r){const e=i.charCodeAt(a-1),t=n.get(e);0!==t?r=!1:a++}l++}return[i.substring(s-1,a-1),e.column-s]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,Me.i)(this._context.configuration.options.get(132),[]);let n=e.column,o=0;while(n>1){const s=t.charCodeAt(n-2),r=i.get(s);if(0!==r||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber),i=t.charAt(e.column-2);if(!Ie.pc(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){const t=e.get(2);if(1===t){const e=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),t=this._keybindingService.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),i=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),n=Te.kg("accessibilityModeOff","The editor is not accessible at this time.");return e?Te.kg("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",n,e):t?Te.kg("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",n,t):i?Te.kg("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",n,i):n}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===E.qB.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(146),n=i.wrappingColumn;if(-1!==n&&1!==this._accessibilitySupport){const t=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=qe?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(67),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(125))),(e.hasChanged(34)||e.hasChanged(92))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options,t=!He.M.enabled||e.get(34)&&e.get(92);t?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new Q.y(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const o=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,s=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const c=this._context.viewModel.getViewLineData(i.lineNumber),d=c.tokens.findTokenIndexAtOffset(i.column-1),u=c.tokens.findTokenIndexAtOffset(n.column-1),h=d===u,g=this._visibleTextArea.definePresentation(h?c.tokens.getPresentation(d):null);this.textArea.domNode.scrollTop=s*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:o,left:a,width:l,height:this._lineHeight,useCover:!1,color:(Be.dG.getColorMap()||[])[g.foreground],italic:g.italic,bold:g.bold,underline:g.underline,strikethrough:g.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)this._renderAtTopLeft();else if(_.zx||2===this._accessibilitySupport){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:qe?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;do{if(i=e.indexOf("\n",i+1),-1===i)break;t++}while(1);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:qe?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;(0,g.M)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?We.Q1.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+Pe.OUTER_CLASS_NAME):0!==n.get(68).renderType?i.setClassName("monaco-editor-background textAreaCover "+Oe.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};function Ge(e,t,i,n){if(0===t.length)return 0;const o=e.createElement("div");o.style.position="absolute",o.style.top="-50000px",o.style.width="50000px";const s=e.createElement("span");(0,g.M)(s,i),s.style.whiteSpace="pre",s.style.tabSize=n*i.spaceWidth+"px",s.append(t),o.appendChild(s),e.body.appendChild(o);const r=s.offsetWidth;return o.remove(),r}Ke=ze([Ue(3,Ve.b),Ue(4,je._Y)],Ke);var Qe=i(95687),Ye=i(32378);class Ze{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ye.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Ye.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Ye.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ye.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ye.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Ye.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Ye.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Ye.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Ye.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Ye.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Ye.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Ye.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Ye.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Ye.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}var Xe=i(21776),Je=i(13647);class et{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new c.D7("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let o=0,s=0;for(let a=i;a<=n;a++){const i=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(o=i,s=1):s++)}if(e=n&&r<=o&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o){const t=this._lines.splice(e-this._rendLineNumberStart,o-e+1);return t}const s=[];for(let d=0;di)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class tt{constructor(e){this._lineFactory=e,this.domNode=this._createDomNode(),this._linesCollection=new et(this._lineFactory)}_createDomNode(){const e=(0,V.Z)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(146)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;ie})}constructor(e,t,i){this._domNode=e,this._lineFactory=t,this._viewportData=i}render(e,t,i,n){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1t){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1,n=t-e+1;n>0&&(this._removeLinesAfter(o,n),o.linesLength-=n)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let a=t;a<=i;a++){const e=s+a;r[a].layoutLine(e,n[e-o],this._viewportData.lineHeight)}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let a=t;a<=i;a++)s[r++]=this._lineFactory.createLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;r--){const t=e.lines[r];n[r]&&(t.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");it._ttPolicy&&(t=it._ttPolicy.createHTML(t)),n.innerHTML=t;for(let o=0;onew ot(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options,i=t.get(50);(0,g.M)(this.domNode,i),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),o.appendString(s),o.appendString(""),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i))}}class st extends nt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class rt extends nt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,g.M)(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;(0,g.M)(this.domNode,t.get(50));const i=t.get(146);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class at{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return at.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),5!==i.type&&8!==i.type||(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new Q.y(e.afterLineNumber,1)).lineNumber}}}class lt extends ${constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,V.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const t=this._context.configuration.options,i=t.get(146),n=i.contentWidth-i.verticalScrollbarWidth;this.contentWidth!==n&&(this.contentWidth=n,e=!0);const o=i.contentLeft;return this.contentLeft!==o&&(this.contentLeft=o,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;const i=e.getDecorationsInViewport();for(const n of i){if(!n.options.blockClassName)continue;let i,o,s=this.blocks[t];s||(s=this.blocks[t]=(0,V.Z)(document.createElement("div")),this.domNode.appendChild(s)),n.options.blockIsAfterEnd?(i=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!1),o=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0)):(i=e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!0),o=n.range.isEmpty()&&!n.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0));const[r,a,l,c]=n.options.blockPadding??[0,0,0,0];s.setClassName("blockDecorations-block "+n.options.blockClassName),s.setLeft(this.contentLeft-c),s.setWidth(this.contentWidth+c+a),s.setTop(i-e.scrollTop-r),s.setHeight(o-i+r+l),t++}for(let n=t;n0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const o=e.top,s=o,r=e.top+e.height,a=n.viewportHeight-r,l=o-i,c=s>=i,d=r,u=a>=i;let h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),ha){const e=d-(a-n);d-=e,i-=e}if(d=f,v=u+i<=h.height-m;return this._fixedOverflowWidgets?{fitsAbove:_,aboveTop:Math.max(d,f),fitsBelow:v,belowTop:u,left:p}:{fitsAbove:_,aboveTop:o,fitsBelow:v,belowTop:s,left:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new ht(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){const t=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),i=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,n=o(i,this._affinity,this._lineHeight);return{primary:t,secondary:n};function o(t,i,n){if(!t)return null;const o=e.visibleRangeForPosition(t);if(!o)return null;const s=1===t.column&&3===i?0:o.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new gt(r,s,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let o=t.left;return o=oe.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||"offViewport"===this._renderData.kind)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,"offViewport"===this._renderData?.kind&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),void("function"===typeof this._actual.afterRender&&pt(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"===typeof this._actual.afterRender&&pt(this._actual.afterRender,this._actual,this._renderData.position)}}class ut{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class ht{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class gt{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function pt(e,t,...i){try{return e.call(t,...i)}catch{return null}}var ft=i(1474);class mt extends De{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(146);this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new _e.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=new Set;for(const o of this._selections)t.add(o.positionLineNumber);const i=Array.from(t);i.sort(((e,t)=>e-t)),f.aI(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let s=t;s<=i;s++){const e=s-t;n[e]=""}if(this._wordWrap){const o=this._renderOne(e,!1);for(const e of this._cursorLineNumbers){const s=this._context.viewModel.coordinatesConverter,r=s.convertViewPositionToModelPosition(new Q.y(e,1)).lineNumber,a=s.convertModelPositionToViewPosition(new Q.y(r,1)).lineNumber,l=s.convertModelPositionToViewPosition(new Q.y(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,c=Math.max(a,t),d=Math.min(l,i);for(let e=c;e<=d;e++){const i=e-t;n[i]=o}}}const o=this._renderOne(e,!0);for(const s of this._cursorLineNumbers){if(si)continue;const e=s-t;n[e]=o}this._renderData=n}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class _t extends mt{_renderOne(e,t){const i="current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(t?" current-line-exact":"");return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class vt extends mt{_renderOne(e,t){const i="current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&t?" current-line-exact-margin":"");return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,Ne.zy)(((e,t)=>{const i=e.getColor(Ae.kG);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Ae.Mf)){const i=e.getColor(Ae.Mf);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),(0,ft.Bb)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}));class bt extends De{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let a=0,l=t.length;a{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:Y.Q.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let a=o;a<=s;a++){const e=a-o;r[e]=""}this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let s=0,r=t.length;s',a=Math.max(e.range.startLineNumber,n),l=Math.min(e.range.endLineNumber,o);for(let t=a;t<=l;t++){const e=t-n;i[e]+=r}}}_renderNormalDecorations(e,t,i){const n=e.visibleRange.startLineNumber;let o=null,s=!1,r=null,a=!1;for(let l=0,c=t.length;l';r[t]+=c}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class yt extends ${constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(104),r=o.get(75),a=o.get(40),c=o.get(107),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,Ne.Pz)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:c,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new ve.oO(t.domNode,d,this._context.viewLayout.getScrollable())),q.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,V.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const u=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(l.ko(i.domNode,"scroll",(e=>u(i.domNode,!0,!0)))),this._register(l.ko(t.domNode,"scroll",(e=>u(t.domNode,!0,!1)))),this._register(l.ko(n.domNode,"scroll",(e=>u(n.domNode,!0,!1)))),this._register(l.ko(this.scrollbarDomNode.domNode,"scroll",(e=>u(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(146);this.scrollbarDomNode.setLeft(t.contentLeft);const i=e.get(73),n=i.side;"right"===n?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(104)||e.hasChanged(75)||e.hasChanged(40)){const e=this._context.configuration.options,t=e.get(104),i=e.get(75),n=e.get(40),o=e.get(107),s={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(146)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,Ne.Pz)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}var wt=i(9322);class Ct{constructor(e,t,i,n,o){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=o??0}}class St{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class kt{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class xt extends De{_render(e,t,i){const n=[];for(let r=e;r<=t;r++){const t=r-e;n[t]=new kt}if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.classNamen)continue;const a=Math.max(s,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Q.y(a,0)),c=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(o.preference.lane);t.push(new Tt(a,c,o.preference.zIndex,o))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.laneIndex===t.laneIndex?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className0){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex));if(!n||0===n.length)break;const o=n[0];if(0===o.type){const e=[];for(const t of n){if(t.zIndex!==o.zIndex||t.type!==o.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(o.accept(e.join(" ")))}else o.widget.renderInfo={lineNumber:o.lineNumber,laneIndex:o.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");while(this._managedDomNodes.length>0){const e=this._managedDomNodes.pop();e?.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],o=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(o),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;ithis._decorationGlyphsToRender.length){const e=this._managedDomNodes.pop();e?.domNode.remove()}}}class Lt{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new It(this.lineNumber,this.laneIndex,e)}}class Tt{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class It{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}var Rt=i(50322),Dt=i(26783),Nt=i(26530);class At extends De{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(147),n=t.get(50);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(147),n=t.get(50);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){const t=e.selections[0],i=t.getPosition();return!this._primaryPosition?.equals(i)&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.scrollWidth,o=this._primaryPosition,s=this.getGuidesByLine(t,Math.min(i+1,this._context.viewModel.getLineCount()),o),r=[];for(let a=t;a<=i;a++){const i=a-t,o=s[i];let l="";const c=e.visibleRangeForPosition(new Q.y(a,1))?.left??0;for(const t of o){const i=-1===t.column?c+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new Q.y(a,t.column)).left;if(i>n||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",s=t.horizontalLine?(e.visibleRangeForPosition(new Q.y(a,t.horizontalLine.endColumn))?.left??i+this._spaceWidth)-i:this._spaceWidth;l+=`
    `}r[i]=l}this._renderResult=r}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?Nt.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?Nt.N6.EnabledForActive:Nt.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let s=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);s=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let d=e;d<=t;d++){const t=new Array;c.push(t);const i=n?n[d-e]:[],u=new f.j3(i),h=o?o[d-e]:0;for(let e=1;e<=h;e++){const n=(e-1)*l+1,o=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===i.length)&&s<=d&&d<=r&&e===a;t.push(...u.takeWhile((e=>e.visibleColumn!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Ot(e){if(!e||!e.isTransparent())return e}(0,Ne.zy)(((e,t)=>{const i=[{bracketColor:Ae.sN,guideColor:Ae.n4,guideColorActive:Ae.bB},{bracketColor:Ae.lQ,guideColor:Ae.I2,guideColorActive:Ae.WS},{bracketColor:Ae.ss,guideColor:Ae.Bo,guideColorActive:Ae.Pe},{bracketColor:Ae.l5,guideColor:Ae.If,guideColorActive:Ae.WD},{bracketColor:Ae.sH,guideColor:Ae.BD,guideColorActive:Ae.P1},{bracketColor:Ae.zp,guideColor:Ae.IW,guideColorActive:Ae.WY}],n=new Dt.k,o=[{indentColor:Ae.vV,indentColorActive:Ae.H0},{indentColor:Ae.ob,indentColorActive:Ae.Am},{indentColor:Ae.hz,indentColorActive:Ae.tK},{indentColor:Ae.ow,indentColorActive:Ae.A3},{indentColor:Ae.vP,indentColorActive:Ae.tp},{indentColor:Ae.CM,indentColorActive:Ae.As}],s=i.map((t=>{const i=e.getColor(t.bracketColor),n=e.getColor(t.guideColor),o=e.getColor(t.guideColorActive),s=Ot(Ot(n)??i?.transparent(.3)),r=Ot(Ot(o)??i);if(s&&r)return{guideColor:s,guideColorActive:r}})).filter(Rt.O9),r=o.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),o=Ot(i),s=Ot(n);if(o&&s)return{indentColor:o,indentColorActive:s}})).filter(Rt.O9);if(s.length>0){for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));var Pt=i(9659);class Mt{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class Ft{constructor(){this._currentVisibleRange=new Y.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Bt{constructor(e,t,i,n,o,s,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Wt{constructor(e,t,i,n,o){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=o,this.type="selections";let s=t[0].startLineNumber,r=t[0].endLineNumber;for(let a=1,l=t.length;anew G.Gb(this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,q.write(this.domNode,8),this.domNode.setClassName(`view-lines ${Fe}`),(0,g.M)(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Pt.uC((()=>{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new Pt.uC((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new Ft,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(116).enabled,this._maxNumberStickyLines=n.get(116).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(147)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(147);return this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(101),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(116).enabled,this._maxNumberStickyLines=t.get(116).maxLineCount,(0,g.M)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(146)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new G.Ax(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++){const e=this._visibleLines.getVisibleLine(t);e.onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let o=t;o<=i;o++)n=this._visibleLines.getVisibleLine(o).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Bt(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Wt(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop),o=n<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,o),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new Q.y(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(ns)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri)return-1;const n=new Mt(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=Y.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const o=[];let s=0;const r=new Mt(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Q.y(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let d=n.startLineNumber;d<=n.endLineNumber;d++){if(dc)continue;const e=d===n.startLineNumber?n.startColumn:1,u=d!==n.endLineNumber,h=u?this._context.viewModel.getLineMaxColumn(d):n.endColumn,g=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,e,h,r);if(g){if(t&&dthis._visibleLines.getEndLineNumber())return null;const n=new Mt(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Qe.qN(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):o=!1}return o&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let o=i;o<=n;o++){const e=this._visibleLines.getVisibleLine(o);e.onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),_.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){const e=this._visibleLines.getVisibleLine(i);if(e.needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=o[0].startLineNumber,t=o[0].endLineNumber;for(let i=1,n=o.length;ia){if(!c)return-1;g=d}else if(5===s||6===s)if(6===s&&r<=d&&u<=l)g=r;else{const e=Math.max(5*this._lineHeight,.2*a),t=d-e,i=u-a;g=Math.max(i,t)}else if(1===s||2===s)if(2===s&&r<=d&&u<=l)g=r;else{const e=(d+u)/2;g=Math.max(0,e-a/2)}else g=this._computeMinimumScrolling(r,l,d,u,3===s,4===s);return g}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(146),n=t.left,o=n+t.width-i.verticalScrollbarWidth;let s=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)s=Math.min(s,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const l of e.selections){if(l.startLineNumber!==l.endLineNumber)return null;const e=this._visibleRangesForLineRange(l.startLineNumber,l.startColumn,l.endColumn);if(!e)return null;for(const t of e.ranges)s=Math.min(s,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}if(e.minimalReveal||(s=Math.max(0,s-Ht.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-s>t.width)return null;const a=this._computeMinimumScrolling(n,o,s,r);return{scrollLeft:a,maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,s){e|=0,t|=0,i|=0,n|=0,o=!!o,s=!!s;const r=t-e,a=n-i;return at?Math.max(0,n-r):e:i}}class Vt extends xt{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(146);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let o=0,s=t.length;o',a=[];for(let l=t;l<=i;l++){const e=l-t,i=n[e].getDecorations();let o="";for(const t of i){let e='
    ';o[e]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var zt=i(80125);class Ut{static{this.Empty=new Ut(0,0,0,0)}constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Ut._clamp(e),this.g=Ut._clamp(t),this.b=Ut._clamp(i),this.a=Ut._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}class $t extends u.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,u.lC)(new $t)),this._INSTANCE}constructor(){super(),this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Be.dG.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=Be.dG.getColorMap();if(!e)return this._colors=[Ut.Empty],void(this._backgroundIsLight=!0);this._colors=[Ut.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}var qt=i(90765),Kt=i(66344);const Gt=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})(),Qt=(e,t)=>(e-=32,e<0||e>96?t<=2?(e+96)%96:95:e);var Yt=i(62647);class Zt{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Zt.soften(e,.8),this.charDataLight=Zt.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=c?this.charDataLight:this.charDataNormal,f=Qt(n,l),m=4*e.width,_=r.r,v=r.g,b=r.b,y=o.r-_,w=o.g-v,C=o.b-b,S=Math.max(s,a),k=e.data;let x=f*u*h,E=i*m+4*t;for(let L=0;Le.width||i+d>e.height)return void console.warn("bad render request outside image data");const u=4*e.width,h=o/255*.5,g=s.r,p=s.g,f=s.b,m=n.r-g,_=n.g-p,v=n.b-f,b=g+m*h,y=p+_*h,w=f+v*h,C=Math.max(o,r),S=e.data;let k=i*u+4*t;for(let x=0;x{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=Jt[e[i]]<<4|15&Jt[e[i+1]];return t},ti={1:(0,Xt.P)((()=>ei("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,Xt.P)((()=>ei("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class ii{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=ti[e]?new Zt(ti[e](),e):ii.createFromSampleData(ii.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const o of Gt)i.fillText(String.fromCharCode(o),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){const i=61440;if(e.length!==i)throw new Error("Unexpected source in MinimapCharRenderer");const n=ii._downsample(e,t);return new Zt(n,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let c=0;c0){const e=255/a;for(let t=0;tii.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=ai._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=ai._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(Kt.ILr);return i?new Ut(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Kt.K1Z);return t?Ut._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){const i=e.getColor(Kt.By2);return i?new Ut(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class li{constructor(e,t,i,n,o,s,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,o,s,r,a,l,c,d){const u=e.pixelRatio,h=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/h),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,o-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(c-o),d=l*s,u=n>0,h=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new li(l,c,u,s,d,i,g,1,Math.min(r,h))}let f;if(s&&i!==r){const e=i-t+1;f=Math.floor(e*h/u)}else{const e=o/p;f=Math.floor(e*h/u)}const m=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=o/p;v=Math.max(v,e-1)}if(v>0){const e=o/p;_=(m+r+v-e-1)*h/u}else _=Math.max(0,(m+r)*h/u-f);_=Math.min(e.minimapHeight-f,_);const b=_/(c-o),y=l*b;if(g>=m+r+v){const e=_>0;return new li(l,c,e,b,y,f,m,1,r)}{let i,o;i=t>1?t+m:Math.max(1,l/p);let s=Math.max(1,Math.floor(i-y*u/h));sl&&(s=Math.min(s,d.startLineNumber),o=Math.max(o,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?(t-s+o+_)*h/u:l/e.paddingTop*(o+_)*h/u,new li(l,c,!0,b,v,f,o,s,a)}}}class ci{static{this.INVALID=new ci(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class di{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new et({createLine:()=>ci.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get(),i=t.lines;for(let n=0,o=i.length;n1){for(let t=0,i=n-1;t0&&this.minimapLines[i-1]>=e)i--;let n=this.modelLineToMinimapLine(t)-1;while(n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0;o--){if(this.minimapLines[o]=0;i--){if(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=hi.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let o=0,s=t-e+1;o!e.options.minimap?.sectionHeaderStyle));if(this._samplingState){const e=[];for(const t of i){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),o=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new qt.vo(new Y.Q(n,i.startColumn,o,i.endColumn),t.options))}return e}return i}getSectionHeaderDecorationsInViewport(e,t){const i=this.options.minimapLineHeight,n=this.options.sectionHeaderFontSize,o=n/i;return e=Math.floor(Math.max(1,e-o)),this._getMinimapDecorationsInViewport(e,t).filter((e=>!!e.options.minimap?.sectionHeaderStyle))}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new Y.Q(n,1,o,this._context.viewModel.getLineMaxColumn(o))}else i=new Y.Q(e,1,t,this._context.viewModel.getLineMaxColumn(t));return this._context.viewModel.getMinimapDecorationsInRange(i)}getSectionHeaderText(e,t){const i=e.options.minimap?.sectionHeaderText;if(!i)return null;const n=this._sectionHeaderCache.get(i);if(n)return n;const o=t(i);return this._sectionHeaderCache.set(i,o),o}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new Y.Q(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class pi extends u.jG{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Kt.yr0),this._domNode=(0,V.Z)(document.createElement("div")),q.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,V.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,V.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,V.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,V.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,V.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=l.b2(this._domNode.domNode,l.Bx.POINTER_DOWN,(e=>{e.preventDefault();const t=this._model.options.renderMinimap;if(0===t)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=l.BK(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const i=this._model.options.minimapLineHeight,n=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY,o=Math.floor(n/i);let s=o+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;s=Math.min(s,this._model.getLineCount()),this._model.revealLineNumber(s)})),this._sliderPointerMoveMonitor=new zt._,this._sliderPointerDownListener=l.b2(this._slider.domNode,l.Bx.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=pe.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=l.ko(this._domNode.domNode,pe.B.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=l.ko(this._domNode.domNode,pe.B.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=l.b2(this._domNode.domNode,pe.B.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const o=(e,o)=>{const s=l.BK(this._domNode.domNode),r=Math.min(Math.abs(o-n),Math.abs(o-s.left),Math.abs(o-s.left-s.width));if(_.uF&&r>si)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&o(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>o(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new ui(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Kt.yr0),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){const t=this._model.options.renderMinimap;if(0===t)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=li.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(Y.Q.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new fi(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,s),this._renderDecorationsLineHighlights(l,i,c,e,s);const d=new fi(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,s,a,r,n),this._renderDecorationsHighlights(l,i,d,e,s,a,r,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,c]=t;for(let e=l;e<=c;e++)i.set(e,!0);const d=n.getYForLineNumber(l,o),u=n.getYForLineNumber(c,o);r>=d||(r>s&&e.fillRect(E.xq,s,e.canvas.width,r-s),s=d),r=u}r>s&&e.fillRect(E.xq,s,e.canvas.width,r-s)}_renderDecorationsLineHighlights(e,t,i,n,o){const s=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||1!==l.position)continue;const c=n.intersectWithViewport(a.range);if(!c)continue;const[d,u]=c,h=l.getColor(this._theme.value);if(!h||h.isTransparent())continue;let g=s.get(h.toString());g||(g=h.transparent(.5).toString(),s.set(h.toString(),g)),e.fillStyle=g;for(let t=d;t<=u;t++){if(i.has(t))continue;i.set(t,!0);const s=n.getYForLineNumber(d,o);e.fillRect(E.xq,s,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,s,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[c,d]=t;for(let u=c;u<=d;u++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,u,o,o,s,r,a)}}_renderDecorationsHighlights(e,t,i,n,o,s,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=n.intersectWithViewport(l.range);if(!c)continue;const[d,u]=c,h=t.getColor(this._theme.value);if(h&&!h.isTransparent())for(let g=d;g<=u;g++)switch(t.position){case 1:this.renderDecorationOnLine(e,i,l.range,h,n,g,o,o,s,r,a);continue;case 2:{const t=n.getYForLineNumber(g,o),i=2;this.renderDecoration(e,h,i,t,ri,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,c,d){const u=o.getYForLineNumber(s,a);if(u+r<0||u>this._model.options.canvasInnerHeight)return;const{startLineNumber:h,endLineNumber:g}=i,p=h===s?i.startColumn:1,f=g===s?i.endColumn:this._model.getLineMaxColumn(s),m=this.getXOffsetForPosition(t,s,p,l,c,d),_=this.getXOffsetForPosition(t,s,f,l,c,d);this.renderDecoration(e,n,m,u,_-m,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return E.xq;const r=(i-1)*o;if(r>=s)return s;let a=e.get(t);if(!a){const i=this._model.getLineContent(t);a=[E.xq];let r=E.xq;for(let e=1;e=s){a[e]=s;break}a[e]=c,r=c}e.set(t,a)}return i-1e.range.startLineNumber-t.range.startLineNumber));const g=pi._fitSectionHeader.bind(null,u,s-E.xq);for(const p of h){const n=e.getYForLineNumber(p.range.startLineNumber,t)+i,r=n-i,l=r+2,d=this._model.getSectionHeaderText(p,g);pi._renderSectionLabel(u,d,2===p.options.minimap?.sectionHeaderStyle,a,c,s,r,o,n,l)}}static _fitSectionHeader(e,t,i){if(!i)return i;const n="…",o=e.measureText(i).width,s=e.measureText(n).width;if(o<=t||o<=s)return i;const r=i.length,a=o/i.length,l=Math.floor((t-s)/a)-1;let c=Math.ceil(l/2);while(c>0&&/\s/.test(i[c-1]))--c;return i.substring(0,c)+n+i.substring(r-(l-c))}static _renderSectionLabel(e,t,i,n,o,s,r,a,l,c){t&&(e.fillStyle=n,e.fillRect(0,r,s,a),e.fillStyle=o,e.fillText(t,E.xq,l)),i&&(e.beginPath(),e.moveTo(0,c),e.lineTo(s,c),e.closePath(),e.stroke())}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new di(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;const[s,r,a]=pi._renderUntouchedLines(o,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,u=this._model.options.backgroundColor,h=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),f=this._model.options.renderMinimap,m=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=1===f?2:3,y=b*_,w=n>y?Math.floor((n-y)/2):0,C=u.a/255,S=new Ut(Math.round((u.r-d.r)*C+d.r),Math.round((u.g-d.g)*C+d.g),Math.round((u.b-d.b)*C+d.b),255);let k=e.topPaddingLineCount*n;const x=[];for(let R=0,D=i-t+1;R=0&&t_)return;const r=f.charCodeAt(y);if(9===r){const e=u-(y+w)%u;w+=e-1,b+=e*s}else if(32===r)b+=s;else{const u=Ie.ne(r)?2:1;for(let h=0;h_)return}}}}}class fi{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,o=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class mi extends ${constructor(e,t){super(e),this._viewDomNode=t;const i=this._context.configuration.options,n=i.get(146);this._widgets={},this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,V.Z)(document.createElement("div")),q.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,V.Z)(document.createElement("div")),q.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=(0,V.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()],n=t?t.preference:null,o=t?.stackOridinal;return i.preference===n&&i.stack===o?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=o,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t],i=e.domNode.domNode;delete this._widgets[t],i.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0;const t=Object.keys(this._widgets);for(let i=0,n=t.length;i0));t.sort(((e,t)=>(this._widgets[e].stack||0)-(this._widgets[t].stack||0)));for(let n=0,o=t.length;n=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e,r=s+t,a=s+t+o;return[[0,s,r,s,a,s,r,s],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t,o=e,s=o+t;return[[0,o,o,o,s,o,o,o],[0,t,t,t,i,t+i,t+i,t+i]]}{const t=e,i=n;return[[0,t,t,t,t,t,t,t],[0,i,i,i,i,i,i,i]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&We.Q1.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class vi extends ${constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,V.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Be.dG.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[{position:new Q.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new _i(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t1&&(n=0===t?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort(((e,t)=>Q.y.compare(e.position,t.position))),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return!!e.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return!!e.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes)return this._domNode.setBackgroundColor(e?We.Q1.Format.CSS.formatHexA(e):""),void this._domNode.setDisplay("none");const t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(qt.Uv.compareByRenderingProps),1!==this._actualShouldRender||qt.Uv.equalsArr(this._renderedDecorations,t)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,f.aI)(this._renderedCursorPositions,this._cursorPositions,((e,t)=>e.position.lineNumber===t.position.lineNumber&&e.color===t.color))||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,o=this._settings.lineHeight,s=this._context.viewLayout,r=this._context.viewLayout.getScrollHeight(),a=n/r,l=6*this._settings.pixelRatio|0,c=l/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=We.Q1.Format.CSS.formatHexA(e),d.fillRect(0,0,i,n)):(d.clearRect(0,0,i,n),d.fillStyle=We.Q1.Format.CSS.formatHexA(e),d.fillRect(0,0,i,n)):d.clearRect(0,0,i,n);const u=this._settings.x,h=this._settings.w;for(const g of t){const e=g.color,t=g.data;d.fillStyle=e;let i=0,r=0,p=0;for(let g=0,f=t.length/3;gn&&(e=n-c),_=e-c,v=e+c}_>p+1||e!==i?(0!==g&&d.fillRect(u[i],r,h[i],p-r),i=e,r=_,p=v):v>p&&(p=v)}d.fillRect(u[i],r,h[i],p-r)}if(!this._settings.hideCursor){const e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],o=this._settings.w[7];let r=-100,l=-100,c=null;for(let u=0,h=this._cursorPositions.length;un&&(p=n-t);const f=p-t,m=f+e;f>l+1||h!==c?(0!==u&&c&&d.fillRect(i,r,o,l-r),r=f,l=m):m>l&&(l=m),c=h,d.fillStyle=h}c&&d.fillRect(i,r,o,l-r)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,n),d.moveTo(1,0),d.lineTo(i,0),d.stroke())}}var bi,yi=i(21934);class wi extends U{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,V.Z)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new yi.rW((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(67)),this._zoneManager.setPixelRatio(i.get(144)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(t.get(67)),this._render()),e.hasChanged(144)&&(this._zoneManager.setPixelRatio(t.get(144)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=c):r>=l?r=Math.max(r,c):(e.fillRect(0,s,n,r-s),s=l,r=c)}e.fillRect(0,s,n,r-s)}}class Ci extends ${constructor(e){super(e),this.domNode=(0,V.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0){const e=(0,V.Z)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;while(i>0){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options,t=e.get(146);0===t.minimap.renderMinimap||t.minimap.minimapWidth>0&&0===t.minimap.minimapLeft?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(104);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class ki{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class xi{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Ei(e){return new ki(e)}function Li(e){return new xi(e.lineNumber,e.ranges.map(Ei))}class Ti extends De{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let r=0,a=t.length;r0){const e=t[r-1].ranges[0].left,o=t[r-1].ranges[0].left+t[r-1].ranges[0].width;Ii(i-e)e&&(c.top=1),Ii(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=n[0].lineNumber,r=n[n.length-1].lineNumber;for(let a=0,l=n.length;a1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Ii(e){return e<0?-e:e}(0,Ne.zy)(((e,t)=>{const i=e.getColor(Kt.rm4);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));class Ri{constructor(e,t,i,n,o,s,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=o,this.textContent=s,this.textContentClassName=r}}(function(e){e[e["Single"]=0]="Single",e[e["MultiPrimary"]=1]="MultiPrimary",e[e["MultiSecondary"]=2]="MultiSecondary"})(bi||(bi={}));class Di{constructor(e,t){this._context=e;const i=this._context.configuration.options,n=i.get(50);this._cursorStyle=i.get(28),this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,V.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${Fe}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,g.M)(this._domNode,n),this._domNode.setDisplay("none"),this._position=new Q.y(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case bi.Single:this._pluralityClass="";break;case bi.MultiPrimary:this._pluralityClass="cursor-primary";break;case bi.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),(0,g.M)(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,o]=Ie.m(i,t-1);return[new Q.y(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="",i="";const[n,o]=this._getGraphemeAwarePosition();if(this._cursorStyle===E.m9.Line||this._cursorStyle===E.m9.LineThin){const s=e.visibleRangeForPosition(n);if(!s||s.outsideRenderedLine)return null;const r=l.zk(this._domNode.domNode);let a;this._cursorStyle===E.m9.Line?(a=l.vT(r,this._lineCursorWidth>0?this._lineCursorWidth:2),a>2&&(t=o,i=this._getTokenClassName(n))):a=l.vT(r,1);let c=s.left,d=0;a>=2&&c>=1&&(d=1,c-=d);const u=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new Ri(u,c,d,a,this._lineHeight,t,i)}const s=e.linesVisibleRangesForRange(new Y.Q(n.lineNumber,n.column,n.lineNumber,n.column+o.length),!1);if(!s||0===s.length)return null;const r=s[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],c="\t"===o||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===E.m9.Block&&(t=o,i=this._getTokenClassName(n));let d=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return this._cursorStyle!==E.m9.Underline&&this._cursorStyle!==E.m9.UnderlineThin||(d+=this._lineHeight-2,u=2),new Ri(d,a.left,0,c,u,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${Fe} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class Ni extends ${static{this.BLINK_INTERVAL=500}constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Di(this._context,bi.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,V.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Pt.pc,this._cursorFlatBlinkInterval=new l.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),Ni.BLINK_INTERVAL,(0,l.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),Ni.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case E.m9.Line:e+=" cursor-line-style";break;case E.m9.Block:e+=" cursor-block-style";break;case E.m9.Underline:e+=" cursor-underline-style";break;case E.m9.LineThin:e+=" cursor-line-thin-style";break;case E.m9.BlockOutline:e+=" cursor-block-outline-style";break;case E.m9.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=[{class:".cursor",foreground:Ae.D0,background:Ae.kM},{class:".cursor-primary",foreground:Ae.sC,background:Ae.je},{class:".cursor-secondary",foreground:Ae.we,background:Ae.L0}];for(const n of i){const i=e.getColor(n.foreground);if(i){let o=e.getColor(n.background);o||(o=i.opposite()),t.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${i}; border-color: ${i}; color: ${o}; }`),(0,ft.Bb)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${o}; border-right: 1px solid ${o}; }`)}}}));const Ai=()=>{throw new Error("Invalid change accessor")};class Oi extends ${constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._lineHeight=t.get(67),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,V.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,V.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};Pi(e,n),n.addZone=Ai,n.removeZone=Ai,n.layoutZone=Ai})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n=e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),o={whitespaceId:n,delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,V.Z)(t.domNode),marginDomNode:t.marginDomNode?(0,V.Z)(t.marginDomNode):null};return this._safeCallOnComputedHeight(o.delegate,i.heightInPx),o.domNode.setPosition("absolute"),o.domNode.domNode.style.width="100%",o.domNode.setDisplay("none"),o.domNode.setAttribute("monaco-view-zone",o.whitespaceId),this.domNode.appendChild(o.domNode),o.marginDomNode&&(o.marginDomNode.setPosition("absolute"),o.marginDomNode.domNode.style.width="100%",o.marginDomNode.setDisplay("none"),o.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId),this.marginDomNode.appendChild(o.marginDomNode)),this._zones[o.whitespaceId]=o,this.setShouldRender(),o.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"===typeof e.heightInPx?e.heightInPx:"number"===typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"===typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"===typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(i){(0,c.dz)(i)}}_safeCallOnDomNodeTop(e,t){if("function"===typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(i){(0,c.dz)(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const s of t)this._zones[s.id].isInHiddenArea||(i[s.id]=s,n=!0);const o=Object.keys(this._zones);for(let s=0,r=o.length;sr)continue;const e=t.startLineNumber===r?t.startColumn:i.minColumn,o=t.endLineNumber===r?t.endColumn:i.maxColumn;e=x.endOffset&&(k++,x=i&&i[k]),9!==n&&32!==n)continue;if(u&&!C&&L<=y)continue;if(d&&L>=S&&L<=y&&32===n){const e=L-1>=0?r.charCodeAt(L-1):0,t=L+1=0?r.charCodeAt(L-1):0,t=32===n&&32!==e&&9!==e;if(t)continue}if(i&&(!x||x.startOffset>L||x.endOffset<=L))continue;const o=e.visibleRangeForPosition(new Q.y(t,L+1));o&&(s?(E=Math.max(E,o.left),w+=9===n?this._renderArrow(h,f,o.left):``):w+=9===n?`
    ${b?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:`
    ${String.fromCharCode(v)}
    `)}return s?(E=Math.round(E+f),``+w+""):w}_renderArrow(e,t,i){const n=t/7,o=t,s=e/2,r=i,a={x:0,y:n/2},l={x:.8*o,y:a.y},c={x:l.x-.2*l.x,y:l.y+.2*l.x},d={x:c.x+.1*l.x,y:c.y+.1*l.x},u={x:d.x+.35*l.x,y:d.y-.35*l.x},h={x:u.x,y:-u.y},g={x:d.x,y:-d.y},p={x:c.x,y:-c.y},f={x:l.x,y:-l.y},m={x:a.x,y:-a.y},_=[a,l,c,d,u,h,g,p,f,m],v=_.map((e=>`${(r+e.x).toFixed(2)} ${(s+e.y).toFixed(2)}`)).join(" L ");return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Bi{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(100),this.renderWithSVG=!0):(this.renderWhitespace=t.get(100),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(67),this.stopRenderingLineAfter=t.get(118)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class Wi{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.lineHeight=0|t.lineHeight,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new Y.Q(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Hi{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class Vi{constructor(e,t,i){this.configuration=e,this.theme=new Hi(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}var ji=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},zi=function(e,t){return function(i,n){t(i,n,e)}};let Ui=class extends U{constructor(e,t,i,n,o,s,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new _e.L(1,1,1,1)],this._renderAnimationFrame=null;const a=new Ze(t,n,o,e);this._context=new Vi(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(Ke,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,V.Z)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,V.Z)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,V.Z)(document.createElement("div")),q.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new yt(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Ht(this._context,this._linesContent),this._viewZones=new Oi(this._context),this._viewParts.push(this._viewZones);const l=new vi(this._context);this._viewParts.push(l);const c=new Si(this._context);this._viewParts.push(c);const d=new st(this._context);this._viewParts.push(d),d.addDynamicOverlay(new _t(this._context)),d.addDynamicOverlay(new Ti(this._context)),d.addDynamicOverlay(new At(this._context)),d.addDynamicOverlay(new bt(this._context)),d.addDynamicOverlay(new Fi(this._context));const u=new rt(this._context);this._viewParts.push(u),u.addDynamicOverlay(new vt(this._context)),u.addDynamicOverlay(new jt(this._context)),u.addDynamicOverlay(new Vt(this._context)),u.addDynamicOverlay(new Oe(this._context)),this._glyphMarginWidgets=new Et(this._context),this._viewParts.push(this._glyphMarginWidgets);const h=new Pe(this._context);h.getDomNode().appendChild(this._viewZones.marginDomNode),h.getDomNode().appendChild(u.getDomNode()),h.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(h),this._contentWidgets=new ct(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Ni(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new mi(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const g=new Ci(this._context);this._viewParts.push(g);const p=new lt(this._context);this._viewParts.push(p);const f=new gi(this._context);if(this._viewParts.push(f),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new Le(this._context,a,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes;let i=[],n=0;i=i.concat(e.getAllMarginDecorations().map((e=>{const t=e.options.glyphMargin?.position??wt.ZS.Center;return n=Math.max(n,e.range.endLineNumber),{range:e.range,lane:t,persist:e.options.glyphMargin?.persistLane}}))),i=i.concat(this._glyphMarginWidgets.getWidgets().map((t=>{const i=e.validateRange(t.preference.range);return n=Math.max(n,i.endLineNumber),{range:i,lane:t.preference.lane}}))),i.sort(((e,t)=>Y.Q.compareRangesUsingStarts(e.range,t.range))),t.reset(n);for(const o of i)t.push(o.lane,o.range,o.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new ie(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Q.y(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options,t=e.get(146);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(143)+" "+(0,Ne.Pz)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new c.D7;if(null===this._renderAnimationFrame){const e=this._createCoordinatedRendering();this._renderAnimationFrame=qi.INSTANCE.scheduleCoordinatedRendering({window:l.zk(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new c.D7;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new c.D7;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new c.D7;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new c.D7;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();$i((()=>e.prepareRenderText()));const t=$i((()=>e.renderText()));if(t){const[i,n]=t;$i((()=>e.prepareRender(i,n))),$i((()=>e.render(i,n)))}}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}j.p.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new Wi(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new Qe.eh(this._context.viewLayout,i,this._viewLines)]},prepareRender:(e,t)=>{for(const i of e)i.prepareRender(t)},render:(e,t)=>{for(const i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new Q.y(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?at.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new wi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=this._overlayWidgets.setWidgetPosition(e.widget,e.position);t&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position,i=this._glyphMarginWidgets.setWidgetPosition(e.widget,t);i&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};function $i(e){try{return e()}catch(t){return(0,c.dz)(t),null}}Ui=ji([zi(6,je._Y)],Ui);class qi{static{this.INSTANCE=new qi}constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(-1!==t&&(this._coordinatedRenderings.splice(t,1),0===this._coordinatedRenderings.length)){for(const[e,t]of this._animationFrameRunners)t.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,l.Oq(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const i of e)$i((()=>i.prepareRenderText()));const t=[];for(let i=0,n=e.length;in.renderText()))}for(let i=0,n=e.length;in.prepareRender(s,r)))}for(let i=0,n=e.length;in.render(s,r)))}}}var Ki=i(79109);class Gi{constructor(e,t,i,n,o){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=o}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0,i=this.breakOffsets[e];let n=i-t;return e>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));const i=0===e?t:this.breakOffsets[e-1]+t;let n=i;if(null!==this.injectionOffsets)for(let o=0;othis.injectionOffsets[o]))break;n0?this.breakOffsets[o-1]:0,0===t)if(e<=s)n=o-1;else{if(!(e>r))break;i=o+1}else if(e=r))break;i=o+1}}let r=e-s;return o>0&&(r+=this.wrappedTextIndentLength),new Zi(o,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(o!==n)return this.offsetInInputWithInjectionsToOutputPosition(o,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new Zi(e-1,this.getMaxOutputOffset(e-1))}else if(1===i){const i=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength));const i=(e>0?this.breakOffsets[e-1]:0)+t;return i}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&Qi(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(Yi(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;while(t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]){if(Qi(this.injectionOptions[t].cursorStops))break;if(e-=this.injectionOptions[t].content.length,Yi(this.injectionOptions[t].cursorStops))break;t--}return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;while(t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t])e-=this.injectionOptions[t-1].content.length,t--;return e}(0,Ki.xb)(t)}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let o=0;oe)break;if(e<=a)return{injectedTextIndex:o,offsetInInputWithInjections:r,length:s};n+=s}}}}function Qi(e){return null===e||void 0===e||(e===wt.VW.Right||e===wt.VW.Both)}function Yi(e){return null===e||void 0===e||(e===wt.VW.Left||e===wt.VW.Both)}class Zi{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new Q.y(e+this.outputLineIndex,this.outputOffset+1)}}var Xi=i(50410);const Ji=(0,Xe.H)("domLineBreaksComputer",{createHTML:e=>e});class en{static create(e){return new en(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t)},finalize:()=>tn((0,Rt.eU)(this.targetWindow.deref()),s,e,t,i,n,o,r)}}}function tn(e,t,i,n,o,s,r,a){function l(e){const i=a[e];if(i){const n=Xi.uK.applyInjectedText(t[e],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new Gi(s,o,[n.length],[],0)}return null}if(-1===o){const e=[];for(let i=0,n=t.length;ic?(o=0,r=0):l=c-t}const d=e.substr(o),u=nn(d,r,n,l,f,h);m[g]=o,_[g]=r,v[g]=d,b[g]=u[0],y[g]=u[1]}const w=f.build(),C=Ji?.createHTML(w)??w;p.innerHTML=C,p.style.position="absolute",p.style.top="10000","keepAll"===r?(p.style.wordBreak="keep-all",p.style.overflowWrap="anywhere"):(p.style.wordBreak="inherit",p.style.overflowWrap="break-word"),e.document.body.appendChild(p);const S=document.createRange(),k=Array.prototype.slice.call(p.children,0),x=[];for(let g=0;ge.options)),c=d.map((e=>e.column-1))):(r=null,c=null),x[g]=new Gi(c,r,t,s,n)}return p.remove(),x}function nn(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendString('
    ');const r=e.length;let a=t,l=0;const c=[],d=[];let u=0");for(let h=0;h"),c[h]=l,d[h]=a;const t=u;u=h+1"),c[e.length]=l,d[e.length]=a,o.appendString("
    "),[c,d]}function on(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{sn(e,o,n,0,null,i.length-1,null,s)}catch(r){return console.log(r),null}return 0===s.length?null:(s.push(i.length),s)}function sn(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||rn(e,t,i[n],i[n+1]),r=r||rn(e,t,i[s],i[s+1]),Math.abs(o[0].top-r[0].top)<=.1)return;if(n+1===s)return void a.push(s);const l=n+(s-n)/2|0,c=rn(e,t,i[l],i[l+1]);sn(e,t,i,n,o,l,c,a),sn(e,t,i,l,c,s,r,a)}function rn(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class an extends u.jG{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new u.$w),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const n of t)this._pending.has(n.id)?(0,c.dz)(new Error(`Cannot have two contributions with the same id ${n.id}`)):this._pending.set(n.id,n);this._instantiateSome(0),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(1)}))),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(2)}))),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"===typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"===typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return(0,l.U3)((0,l.zk)(this._editor?.getDomNode()),(()=>{this._instantiateSome(1)}),50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const i of t)this._instantiateById(i.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"===typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(i){(0,c.dz)(i)}}}}var ln=i(51232),cn=i(5868),dn=i(69483),un=i(57479),hn=i(50395),gn=i(35037),pn=i(12847),fn=i(94529);class mn{static create(e){return new mn(e.get(135),e.get(134))}constructor(e,t){this.classifier=new _n(e,t)}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[],a=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let e=0,d=s.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let vn=[],bn=[];function yn(e,t,i,n,o,s,r,a){if(-1===o)return null;const l=i.length;if(l<=1)return null;const c="keepAll"===a,d=t.breakOffsets,u=t.breakOffsetsVisibleColumn,h=xn(i,n,o,s,r),g=o-h,p=vn,f=bn;let m=0,_=0,v=0,b=o;const y=d.length;let w=0;if(w>=0){let e=Math.abs(u[w]-b);while(w+1=e)break;e=t,w++}}while(wt&&(t=_,o=v);let r=0,a=0,h=0,C=0;if(o<=b){let v=o,y=0===t?0:i.charCodeAt(t-1),w=0===t?0:e.get(y),S=!0;for(let o=t;o_&&kn(y,w,l,d,c)&&(r=t,a=v),v+=u,v>b){t>_?(h=t,C=v-u):(h=o+1,C=v),v-a>g&&(r=0),S=!1;break}y=l,w=d}if(S){m>0&&(p[m]=d[d.length-1],f[m]=u[d.length-1],m++);break}}if(0===r){let l=o,d=i.charCodeAt(t),u=e.get(d),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){p=!0;break}let f,m;if(Ie.LJ(o)?(n--,f=0,m=2):(f=e.get(o),m=Ie.ne(o)?s:1),l<=b){if(0===h&&(h=t,C=l),l<=b-g)break;if(kn(o,f,d,u,c)){r=t,a=l;break}}l-=m,d=o,u=f}if(0!==r){const e=g-(C-a);if(e<=n){const t=i.charCodeAt(h);let o;o=Ie.pc(t)?2:Cn(t,C,n,s),e-o<0&&(r=0)}}if(p){w--;continue}}if(0===r&&(r=h,a=C),r<=_){const e=i.charCodeAt(_);Ie.pc(e)?(r=_+2,a=v+2):(r=_+1,a=v+Cn(e,v,n,s))}_=r,p[m]=r,v=a,f[m]=a,m++,b=a+g;while(w<0||w=S)break;S=e,w++}}return 0===m?null:(p.length=m,f.length=m,vn=t.breakOffsets,bn=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=f,t.wrappedTextIndentLength=h,t)}function wn(e,t,i,n,o,s,r,a){const l=Xi.uK.applyInjectedText(t,i);let c,d;if(i&&i.length>0?(c=i.map((e=>e.options)),d=i.map((e=>e.column-1))):(c=null,d=null),-1===o)return c?new Gi(d,c,[l.length],[],0):null;const u=l.length;if(u<=1)return c?new Gi(d,c,[l.length],[],0):null;const h="keepAll"===a,g=xn(l,n,o,s,r),p=o-g,f=[],m=[];let _=0,v=0,b=0,y=o,w=l.charCodeAt(0),C=e.get(w),S=Cn(w,0,n,s),k=1;Ie.pc(w)&&(S+=1,w=l.charCodeAt(1),C=e.get(w),k++);for(let x=k;xy&&((0===v||S-b>p)&&(v=t,b=S-r),f[_]=v,m[_]=b,_++,y=b+p,v=0),w=i,C=o}return 0!==_||i&&0!==i.length?(f[_]=u,m[_]=S,new Gi(d,c,f,m,g)):null}function Cn(e,t,i,n){return 9===e?i-t%i:Ie.ne(e)||e<32?n:1}function Sn(e,t){return t-e%t}function kn(e,t,i,n,o){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!o&&3===t&&2!==n||!o&&3===n&&1!==t)}function xn(e,t,i,n,o){let s=0;if(0!==o){const r=Ie.HG(e);if(-1!==r){for(let i=0;ii&&(s=0)}}return s}var En=i(43654),Ln=i(332);class Tn{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Ln.mG(new Y.Q(1,1,1,1),0,0,new Q.y(1,1),0),new Ln.mG(new Y.Q(1,1,1,1),0,0,new Q.y(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Ln.MF(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?_e.L.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):_e.L.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,s),a=this._validatePositionWithCache(e,o,n,r);return i.equals(s)&&n.equals(r)&&o.equals(a)?t:new Ln.mG(Y.Q.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=Tn._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),s=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new Ln.mG(i,t.selectionStartKind,n,o,s)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Ln.mG(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Ln.mG(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Q.y(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new Q.y(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new Y.Q(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Ln.mG(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class In{constructor(e){this.context=e,this.cursors=[new Tn(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return(0,En.kh)(this.cursors,(0,f.VE)((e=>e.viewState.position),Q.y.compare)).viewState.position}getBottomMostViewPosition(){return(0,En.ot)(this.cursors,(0,f.VE)((e=>e.viewState.position),Q.y.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(Ln.MF.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),Y.Q.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class Rn{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var Dn=i(38471),Nn=i(44592),An=i(52220);class On{constructor(){this.type=0}}class Pn{constructor(){this.type=1}}class Mn{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Fn{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class Bn{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class Wn{constructor(){this.type=5}}class Hn{constructor(e){this.type=6,this.isFocused=e}}class Vn{constructor(){this.type=7}}class jn{constructor(){this.type=8}}class zn{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class Un{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class $n{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class qn{constructor(e,t,i,n,o,s,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=o,this.revealHorizontal=s,this.scrollType=r,this.type=12}}class Kn{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Gn{constructor(e){this.theme=e,this.type=14}}class Qn{constructor(e){this.type=15,this.ranges=e}}class Yn{constructor(){this.type=16}}class Zn{constructor(){this.type=17}}class Xn extends u.jG{constructor(){super(),this._onEvent=this._register(new d.vl),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{const t=this.beginEmitViewEvents();t.emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){while(this._viewEventQueue){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Jn{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class eo{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new eo(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class to{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new to(this.oldHasFocus,e.hasFocus)}}class io{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new io(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class no{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class oo{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class so{constructor(e,t,i,n,o,s,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let o=0;o0){const e=this._cursors.getSelections();for(let t=0;ts&&(n=n.slice(0,s),o=!0);const r=fo.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,i,n,o,s){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=Y.Q.fromPositions(r[0],r[0]),e.emitViewEvent(new qn(t,i,a,l,n,o,s))}revealPrimary(e,t,i,n,o,s){const r=this._cursors.getPrimaryCursor(),a=[r.viewState.selection];e.emitViewEvent(new qn(t,i,null,a,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const t=Ln.MF.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Ln.MF.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Ln.MF.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let r=0,a=e.length;r0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=fo.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new Fn(a,r,i)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new so(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const s=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let i=0,n=o.length;i0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=fo.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(s){(0,c.dz)(s)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return mo.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new bo(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(Nn.T.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;while(i{this._executeEditOperation(Nn.T.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,s);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new _e.L(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,s,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(Nn.T.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(Dn.g.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Ln.vY(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new Ln.vY(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class fo{static from(e,t){return new fo(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class _o{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let s=0,r=n.trackedRanges.length;s0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,s=[];for(let r=0;r0?(n[r].sort(o),s[r]=t[r].computeCursorState(e.model,{getInverseEditOperations:()=>n[r],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new _e.L(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new _e.L(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[r]=e.selectionsBefore[r];return s}));r||(r=e.selectionsBefore);const a=[];for(const l in o)o.hasOwnProperty(l)&&a.push(parseInt(l,10));a.sort(((e,t)=>t-e));for(const l of a)r.splice(l,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{Y.Q.isEmpty(e)&&""===s||n.push({identifier:{major:t,minor:o++},range:e,text:s,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a=(e,t,i)=>{r=!0,s(e,t,i)},l=(t,i)=>{const n=_e.L.liftSelection(t);let o;if(n.isEmpty())if("boolean"===typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()},d={addEditOperation:s,addTrackedEditOperation:a,trackSelection:l};try{i.getEditOperations(e.model,d)}catch(u){return(0,c.dz)(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){e=e.slice(0),e.sort(((e,t)=>-Y.Q.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;io.identifier.major?n.identifier.major:o.identifier.major,t[s.toString()]=!0;for(let t=0;t0&&i--}}return t}}class vo{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class bo{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new vo(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=bo._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=bo._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let o=0,s=this._original.length;o>>1;t===e[s].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,o|=0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new ko(s,e,i,n,o)),s},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}};e(i)}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const a of i)n.add(a.id);const o=new Map;for(const a of t)o.set(a.id,a);const s=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=xo.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[r+1].afterLineNumber>=e)return r;i=r+1|0}else n=r-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e),i=t+1;return i1?this._lineHeight*(e-1):0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return i+n+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e|=0;const i=this._lineHeight*e,n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tt}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e|=0,e<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;while(n=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===r?(r=a,c=s+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let d=o,u=d;const h=5e5;let g=0;o>=h&&(g=Math.floor(o/h)*h,g=Math.floor(g/i)*i,u-=g);const p=[],f=e+(t-e)/2;let m=-1;for(let y=n;y<=s;y++){if(-1===m){const e=d,t=d+i;(e<=f&&ff)&&(m=y)}d+=i,p[y-n]=u,u+=i;while(c===y)u+=l,d+=l,r++,r>=a?c=s+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){s=y;break}}-1===m&&(m=s);const _=0|this.getVerticalOffsetForLineNumber(s);let v=n,b=s;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:m,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),o=this.getHeightForWhitespaceIndex(i);if(e>=n+o)return-1;while(t=o+s)t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),o=this.getIdForWhitespaceIndex(t),s=this.getAfterLineNumberForWhitespaceIndex(t);return{id:o,afterLineNumber:s,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const o=[];for(let s=i;s<=n;s++){const e=this.getVerticalOffsetForWhitespaceIndex(s),i=this.getHeightForWhitespaceIndex(s);if(e>=t)break;o.push({id:this.getIdForWhitespaceIndex(s),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(s),verticalOffset:e,height:i})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}const Eo=125;class Lo{constructor(e,t,i,n){e|=0,t|=0,i|=0,n|=0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class To extends u.jG{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new d.vl),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Lo(0,0,0,0),this._scrollable=this._register(new Co.yE({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new eo(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class Io extends u.jG{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(146),s=n.get(84);this._linesLayout=new xo(t,n.get(67),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new To(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Lo(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(115)?Eo:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(t.get(67)),e.hasChanged(84)){const e=t.get(84);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(146)){const e=t.get(146),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new Lo(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(115)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options,n=i.get(104);return 2===n.horizontal||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(106)?o+=Math.max(0,t-n.get(67)-n.get(84).bottom):n.get(104).ignoreHorizontalScrollbarInContentHeight||(o+=this._getHorizontalScrollbarHeight(e,i)),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new Lo(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new qt.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new qt.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(147),n=e.get(50),o=e.get(146);if(i.isViewportWrapping){const i=e.get(73);return t>o.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+o.verticalScrollbarWidth:t}{const i=e.get(105)*n.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+o.verticalScrollbarWidth,s,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Lo(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){const e=this._scrollable.getScrollDimensions();return e.contentWidth}getScrollWidth(){const e=this._scrollable.getScrollDimensions();return e.scrollWidth}getContentHeight(){const e=this._scrollable.getScrollDimensions();return e.contentHeight}getScrollHeight(){const e=this._scrollable.getScrollDimensions();return e.scrollHeight}getCurrentScrollLeft(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollLeft}getCurrentScrollTop(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var Ro=i(10049),Do=i(70164);function No(e,t){return null===e?t?Oo.INSTANCE:Po.INSTANCE:new Ao(e,t)}class Ao{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,o=this._projectionData.breakOffsets[i];let s;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new Xi.uK(0,0,e+1,this._projectionData.injectionOptions[t],0))),r=Xi.uK.applyInjectedText(e.getLineContent(t),i);s=r.substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=Fo(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,o,s,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,c=a.injectionOptions;let d,u=null;if(l){u=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,s=a.breakOffsets[i];while(ts)break;if(o0?a.wrappedTextIndentLength:0,r=t+Math.max(d-o,0),l=t+Math.min(u-o,s-o);r!==l&&n.push(new qt.or(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(u<=s))break;e+=r,t++}}}d=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:Do.f.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let h=i;h0?n.wrappedTextIndentLength:0,s=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(s,r,o);let l=a.getLineContent();i>0&&(l=Fo(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,u=i+1=Mo.length)for(let t=1;t<=e;t++)Mo[t]=Bo(t);return Mo[e]}function Bo(e){return new Array(e+1).join(" ")}var Wo=i(73139);class Ho{constructor(e,t,i,n,o,s,r,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Uo(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),o=i.length,s=this.createLineBreaksComputer(),r=new f.j3(Xi.uK.fromDecorations(n));for(let p=0;pe.lineNumber===p+1));s.addRequest(i[p],e,t?t[p]:null)}const a=s.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Y.Q.compareRangesUsingStarts);let d=1,u=0,h=-1,g=h+1=d&&e<=u,i=No(a[p],!t);l[p]=i.getViewLineCount(),this.modelLineProjections[p]=i}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Wo.c2(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=e.map((e=>this.model.validateRange(e))),i=Vo(t),n=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Y.Q.compareRangesUsingStarts);if(i.length===n.length){let e=!1;for(let t=0;t({range:e,options:gn.kI.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,o);const s=i;let r=1,a=0,l=-1,c=l+1=r&&e<=a?this.modelLineProjections[u].isVisible()&&(this.modelLineProjections[u]=this.modelLineProjections[u].setVisible(!1),t=!0):(d=!0,this.modelLineProjections[u].isVisible()||(this.modelLineProjections[u]=this.modelLineProjections[u].setVisible(!0),t=!0)),t){const e=this.modelLineProjections[u].getViewLineCount();this.projectedModelLineLineCounts.setValue(u,e)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,o){const s=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,c=this.wordBreak===o;if(s&&r&&a&&l&&c)return!1;const d=s&&r&&!a&&l&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=o;let u=null;if(d){u=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),s=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let c=0,d=n.length;ca?(c=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=c+a-1,g=d+1,p=g+(o-a)-1,l=!0):ot?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new jo(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Q.y(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Q.y(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let s=this.getModelStartPositionOfViewLine(i),r=new Array;for(let a=i.modelLineNumber;a<=n.modelLineNumber;a++){const e=this.modelLineProjections[a-1];if(e.isVisible()){const t=a===i.modelLineNumber?i.modelLineWrappedLineIdx:0,o=a===n.modelLineNumber?n.modelLineWrappedLineIdx+1:e.getViewLineCount();for(let e=t;e{if(-1!==e.forWrappedLinesAfterColumn){const t=this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn);if(t.lineNumber>=i.modelLineWrappedLineIdx)return}if(-1!==e.forWrappedLinesBeforeOrAtColumn){const t=this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn);if(t.lineNumberi.modelLineWrappedLineIdx)return}const n=this.convertModelPositionToViewPosition(i.modelLineNumber,e.horizontalLine.endColumn),o=this.modelLineProjections[i.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return o.lineNumber===i.modelLineWrappedLineIdx?new Nt.TH(e.visibleColumn,t,e.className,new Nt.pv(e.horizontalLine.top,n.column),-1,-1):o.lineNumber!!e)))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[];const s=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let g=a;g<=l;g++){const e=this.modelLineProjections[g];if(e.isVisible()){const t=e.getViewLineNumberOfModelPosition(0,g===a?i.column:1),n=e.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),o=n-t+1;let l=0;o>1&&1===e.getViewLineMinColumn(this.model,g+1,n)&&(l=0===t?1:2),s.push(o),r.push(l),null===c&&(c=new Q.y(g+1,0))}else null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,g)),c=null)}null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const d=t-e+1,u=new Array(d);let h=0;for(let g=0,p=o.length;gt&&(u=!0,d=t-o+1),n.getViewLinesData(this.model,l+1,c,d,o-e,i,a),o+=d,u)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),o=n.index,s=n.remainder,r=this.modelLineProjections[o],a=r.getViewLineMinColumn(this.model,o+1,s),l=r.getViewLineMaxColumn(this.model,o+1,s);tl&&(t=l);const c=r.getModelColumnOfViewPosition(s,t),d=this.model.validatePosition(new Q.y(o+1,c));return d.equals(i)?new Q.y(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Y.Q(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new Q.y(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Y.Q(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,o=!1){const s=this.model.validatePosition(new Q.y(e,t)),r=s.lineNumber,a=s.column;let l=r-1,c=!1;if(o)while(l0&&!this.modelLineProjections[l].isVisible())l--,c=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new Q.y(n?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(l);let u;return u=c?o?this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(d,a,i),u}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return Y.Q.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new Y.Q(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}while(i>0&&!this.modelLineProjections[i].isVisible())i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,o){const s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new Y.Q(s.lineNumber,1,r.lineNumber,r.column),t,i,n,o);let a=[];const l=s.lineNumber-1,c=r.lineNumber-1;let d=null;for(let p=l;p<=c;p++){const e=this.modelLineProjections[p];if(e.isVisible())null===d&&(d=new Q.y(p+1,p===l?s.column:1));else if(null!==d){const e=this.model.getLineMaxColumn(p);a=a.concat(this.model.getDecorationsInRange(new Y.Q(d.lineNumber,d.column,p,e),t,i,n)),d=null}}null!==d&&(a=a.concat(this.model.getDecorationsInRange(new Y.Q(d.lineNumber,d.column,r.lineNumber,r.column),t,i,n)),d=null),a.sort(((e,t)=>{const i=Y.Q.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));const u=[];let h=0,g=null;for(const p of a){const e=p.id;g!==e&&(g=e,u[h++]=p)}return u}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}function Vo(e){if(0===e.length)return[];const t=e.slice();t.sort(Y.Q.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let s=1,r=t.length;so+1?(i.push(new Y.Q(n,1,o,1)),n=e.startLineNumber,o=e.endLineNumber):e.endLineNumber>o&&(o=e.endLineNumber)}return i.push(new Y.Q(n,1,o,1)),i}class jo{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class zo{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Uo{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class $o{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new qo(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new Un(t,i)}onModelLinesInserted(e,t,i,n){return new $n(t,i)}onModelLineChanged(e,t,i){return[!1,new zn(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let o=0;ot)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}const Ko=wt.ZS.Right;class Go{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*Ko/8))}reset(e){const t=Math.ceil((e+1)*Ko/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=Zo.create(this.model),this.glyphLanes=new Go(0),Qo&&this.model.isTooLargeForTokenization())this._lines=new $o(this.model);else{const e=this._configuration.options,t=e.get(50),i=e.get(140),s=e.get(147),r=e.get(139),a=e.get(130);this._lines=new Ho(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new po(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Io(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new Kn(e)),this._eventDispatcher.emitOutgoingEvent(new io(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new Ro.UB(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register($t.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new Yn)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Gn(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new Y.Q(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);return i}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Hn(e)),this._eventDispatcher.emitOutgoingEvent(new to(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new On)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Pn)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new Q.y(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new is(t,this._viewportStart.startLineDelta)}return new is(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,o=n.get(50),s=n.get(140),r=n.get(147),a=n.get(139),l=n.get(130);this._lines.setWrappingSettings(o,s,r.wrappingColumn,a,l)&&(e.emitViewEvent(new Wn),e.emitViewEvent(new jn),e.emitViewEvent(new Bn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(92)&&(this._decorations.reset(),e.emitViewEvent(new Bn(null))),t.hasChanged(99)&&(this._decorations.reset(),e.emitViewEvent(new Bn(null))),e.emitViewEvent(new Mn(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Ln.d$.shouldRecreate(t)&&(this.cursorConfig=new Ln.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e instanceof Xi.Ic?e.rawContentChangedEvent.changes:e.changes,s=e instanceof Xi.Ic?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new f.j3(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new Wn),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[o,r,a,c]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}case 5:break}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new jn),t.emitViewEvent(new Bn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof Xi.Ic&&t.emitOutgoingEvent(new uo(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new Vn),this.cursorConfig=new Ln.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new co(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new Ln.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new lo(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new Wn),e.emitViewEvent(new jn),e.emitViewEvent(new Bn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Ln.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new ho(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Bn(e)),this._eventDispatcher.emitOutgoingEvent(new ao(e))})))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const n=this._captureStableViewport();let o=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();o=this._lines.setHiddenAreas(i),o&&(e.emitViewEvent(new Wn),e.emitViewEvent(new jn),e.emitViewEvent(new Bn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const t=n.viewportStartModelPosition?.lineNumber,s=t&&i.some((e=>e.startLineNumber<=t&&t<=e.endLineNumber));s||n.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),o&&this._eventDispatcher.emitOutgoingEvent(new oo)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(146),t=this._configuration.options.get(67),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new Y.Q(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let o=0,s=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let c=0,d=i.length;ca||(st.toInlineDecoration(e)))]),new qt.qL(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,t,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new qt.nt(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,E.$C)(this._configuration.options)),i=new Xo;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const s=o.position;if(0===s)continue;const r=o.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,s)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e?.invalidateCachedColor();const i=t.options.minimap;i?.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e),n=this.model.modifyPosition(i,t);return this.coordinatesConverter.convertModelPositionToViewPosition(n)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n),s=o+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();e=e.slice(0),e.sort(Y.Q.compareRangesUsingStarts);let o=!1,s=!1;for(const a of e)a.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){const t=[];let n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const a of e)a.isEmpty()||r.push(this.model.getValueInRange(a,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===yo.vH)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new Y.Q(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(50),s=this._getColorMap(),r=/[:;\\\/<>]/.test(o.fontFamily),a=r||o.fontFamily===E.jU.fontFamily;let l;if(a)l=E.jU.fontFamily;else{l=o.fontFamily,l=l.replace(/"/g,"'");const e=/[,']/.test(l);if(!e){const e=/[+ ]/.test(l);e&&(l=`'${l}'`)}l=`${l}, ${E.jU.fontFamily}`}return{mode:i,html:`
    `+this._getHTMLToCopy(n,s)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let l=i;l<=o;l++){const e=this.model.tokenization.getLineTokens(l),c=e.getLineContent(),d=l===i?n-1:0,u=l===o?s-1:c.length;a+=""===c?"
    ":(0,wo.s0)(c,e.inflate(),t,d,u,r,_.uF)}return a}_getColorMap(){const e=Be.dG.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new ro):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((s=>this._cursor.compositionType(s,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealAll(n,e,i,0,t,0)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new Y.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new qn(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new Y.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new qn(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new qn(e,!1,i,null,n,t,o))))}changeWhitespace(e){const t=this.viewLayout.changeWhitespace(e);t&&(this._eventDispatcher.emitSingleViewEvent(new Zn),this._eventDispatcher.emitOutgoingEvent(new no))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges((()=>{try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}))}batchEvents(e){this._withViewEventsCollector((()=>{e()}))}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class Zo{static create(e){const t=e._setTrackedRange(null,new Y.Q(1,1,1,1),1);return new Zo(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,o){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=o}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new Q.y(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new Y.Q(i.lineNumber,i.column,i.lineNumber,i.column),1),o=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=s-o}invalidate(){this._isValid=!1}}class Xo{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const s=this._asMap[e];if(s){const e=s.data,t=e[e.length-3],r=e[e.length-1];if(t===o&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(o,i,n)}else{const s=new qt.Uv(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class Jo{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&ts(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>es(e,t)),[]);return ts(this.ranges,e)||(this.ranges=e),this.ranges}}function es(e,t){const i=[];let n=0,o=0;while(n=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ds=function(e,t){return function(i,n){t(i,n,e)}};let us=class extends u.jG{static{ns=this}static{this.dropIntoEditorDecorationOptions=gn.kI.register({description:"workbench-dnd-target",className:"dnd-target"})}get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}constructor(e,t,i,n,s,r,a,u,h,g,p,f){super(),this.languageConfigurationService=p,this._deliveryQueue=(0,d.Qy)(),this._contributions=this._register(new an),this._onDidDispose=this._register(new d.vl),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new ps({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new ps({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new fs(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new fs(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new fs(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new fs(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onBeginUpdate=this._register(new d.vl),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new d.vl),this.onEndUpdate=this._onEndUpdate.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),s.willCreateCodeEditor();const m={...t};let _;this._domElement=e,this._overflowWidgetsDomNode=m.overflowWidgetsDomNode,delete m.overflowWidgetsDomNode,this._id=++hs,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,i.contextMenuId??(i.isSimpleWidget?ls.D8.SimpleEditorContext:ls.D8.EditorContext),m,g)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(146)){const e=t.get(146);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=h,this._codeEditorService=s,this._commandService=r,this._themeService=u,this._register(new ms(this,this._contextKeyService)),this._register(new _s(this,this._contextKeyService,f)),this._instantiationService=this._register(n.createChild(new rs.a([ss.fN,this._contextKeyService]))),this._modelData=null,this._focusTracker=new vs(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},_=Array.isArray(i.contributions)?i.contributions:o.dS.getEditorContributions(),this._contributions.initialize(this,_,this._instantiationService);for(const l of o.dS.getEditorActions()){if(this._actions.has(l.id)){(0,c.dz)(new Error(`Cannot have two actions with the same id ${l.id}`));continue}const e=new cn.f(l.id,l.label,l.alias,l.metadata,l.precondition??void 0,(e=>this._instantiationService.invokeFunction((t=>Promise.resolve(l.runEditorCommand(t,this,e))))),this._contextKeyService);this._actions.set(e.id,e)}const v=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new l.pN(this._domElement,{onDragOver:e=>{if(!v())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this.showDropIndicatorAt(t.position)},onDrop:async e=>{if(!v())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this._onDropIntoEditor.fire({position:t.position,event:e})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i,n){return new A(e,t,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return dn._.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?ln.z.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(i);const n=this.hasTextFocus(),o=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(o),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?ns._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?ns._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,n)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return-1;const i=this._modelData.model.getLineMaxColumn(e);return ns._getVerticalOffsetAfterPosition(this._modelData,e,i,t)}setHiddenAreas(e,t){this._modelData?.viewModel.setHiddenAreas(e.map((e=>Y.Q.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Z.A.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!Q.y.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!Y.Q.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!==typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new Y.Q(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!Q.y.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Y.Q(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=_e.L.isISelection(e),n=Y.Q.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new _e.L(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!==typeof e||"number"!==typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new Y.Q(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!Y.Q.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Y.Q.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){i=i||{};try{switch(this._beginUpdate(),t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null,t.clipboardEvent)}case"cut":return void this._cut(e)}const n=this.getAction(t);if(n)return void Promise.resolve(n.run(i)).then(void 0,c.dz);if(!this._modelData)return;if(this._triggerEditorCommand(e,t,i))return;this._triggerCommand(t,i)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o,s){if(!this._modelData)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({clipboardEvent:s,range:new Y.Q(a.lineNumber,a.column,l.lineNumber,l.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=o.dS.getEditorCommand(t);return!!n&&(i=i||{},i.source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,c.dz)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(92)&&(this._modelData.model.pushStackElement(),!0))}popUndoStop(){return!!this._modelData&&(!this._configuration.options.get(92)&&(this._modelData.model.popStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(92))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new bs(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,E.$C)(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,(0,E.$C)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations((e=>e.deltaDecorations(t,[]))),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){const e=this._configuration.options,t=e.get(146);return t}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(146),o=ns._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft();return{top:o,left:s,height:i.get(67)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.viewModel.batchEvents((()=>{this._modelData.view.render(!0,e)}))}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,g.M)(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new Yo(this._id,this._configuration,e,en.create(l.zk(this._domElement)),mn.create(this._configuration.options),(e=>l.PG(l.zk(this._domElement),e)),this.languageConfigurationService,this._themeService,i,{batchChanges:e=>{try{return this._beginUpdate(),e()}finally{this._endUpdate()}}});t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=this.getOption(80),t=Te.kg("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",e);this._notificationService.prompt(as.AI.Warning,t,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:Te.kg("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let o=0,s=t.selections.length;o{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new at(e.coordinatesConverter);i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e);const n=new Ui(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService);return[n,!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new Y.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:ns.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,0===this._updateCounter&&this._onEndUpdate.fire()}};us=ns=cs([ds(3,je._Y),ds(4,H.T),ds(5,os.d),ds(6,ss.fN),ds(7,Ne.Gy),ds(8,as.Ot),ds(9,I.j),ds(10,hn.JZ),ds(11,pn.ILanguageFeaturesService)],us);let hs=0;class gs{constructor(e,t,i,n,o,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o,this.attachedView=s}dispose(){(0,u.AS)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class ps extends u.jG{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new d.vl(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new d.vl(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class fs extends d.vl{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class ms extends u.jG{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=un.R.editorSimpleInput.bindTo(t),this._editorFocus=un.R.focus.bindTo(t),this._textInputFocus=un.R.textInputFocus.bindTo(t),this._editorTextFocus=un.R.editorTextFocus.bindTo(t),this._tabMovesFocus=un.R.tabMovesFocus.bindTo(t),this._editorReadonly=un.R.readOnly.bindTo(t),this._inDiffEditor=un.R.inDiffEditor.bindTo(t),this._editorColumnSelection=un.R.columnSelection.bindTo(t),this._hasMultipleSelections=un.R.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=un.R.hasNonEmptySelection.bindTo(t),this._canUndo=un.R.canUndo.bindTo(t),this._canRedo=un.R.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._register(x.M.onDidChangeTabFocus((e=>this._tabMovesFocus.set(e)))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(x.M.getTabFocusMode()),this._editorReadonly.set(e.get(92)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class _s extends u.jG{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=un.R.languageId.bindTo(t),this._hasCompletionItemProvider=un.R.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=un.R.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=un.R.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=un.R.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=un.R.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=un.R.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=un.R.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=un.R.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=un.R.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=un.R.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=un.R.hasReferenceProvider.bindTo(t),this._hasRenameProvider=un.R.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=un.R.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=un.R.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=un.R.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=un.R.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=un.R.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=un.R.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=un.R.isInEmbeddedEditor.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===h.ny.walkThroughSnippet||e.uri.scheme===h.ny.vscodeChatCodeBlock)})):this.reset()}}class vs extends u.jG{constructor(e,t){super(),this._onChange=this._register(new d.vl),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(l.w5(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus((()=>{this._hasDomElementFocus=!0,this._update()}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasDomElementFocus=!1,this._update()}))),t&&(this._overflowWidgetsDomNode=this._register(l.w5(t)),this._register(this._overflowWidgetsDomNode.onDidFocus((()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()}))),this._register(this._overflowWidgetsDomNode.onDidBlur((()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()}))))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class bs{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations((i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)}))}finally{this._isChangingDecorations=!1}return t}}const ys=encodeURIComponent("");function Cs(e){return ys+encodeURIComponent(e.toString())+ws}const Ss=encodeURIComponent('');function xs(e){return Ss+encodeURIComponent(e.toString())+ks}(0,Ne.zy)(((e,t)=>{const i=e.getColor(Kt.Rbi);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Cs(i)}") repeat-x bottom left; }`);const n=e.getColor(Kt.Hng);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Cs(n)}") repeat-x bottom left; }`);const o=e.getColor(Kt.pOz);o&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Cs(o)}") repeat-x bottom left; }`);const s=e.getColor(Kt.i61);s&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${xs(s)}") no-repeat bottom left; }`);const r=e.getColor(Ae.yw);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}))},50576:(e,t,i)=>{"use strict";i.d(t,{t:()=>m});var n=i(85603),o=i(94728),s=i(10113),r=i(50395),a=i(12847),l=i(17300),c=i(72786),d=i(18904),u=i(87778),h=i(95062),g=i(15911),p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.x{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,o,s,r,a,l,c,d,u,h),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.co(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};m=p([f(4,u._Y),f(5,o.T),f(6,c.d),f(7,d.fN),f(8,g.Gy),f(9,h.Ot),f(10,l.j),f(11,r.JZ),f(12,a.ILanguageFeaturesService)],m)},40147:(e,t,i)=>{"use strict";var n=i(25923),o=i(2150),s=i(16259),r=i(94728),a=i(12032),l=i(57479),c=i(41337),d=i(6330),u=i(32828),h=i(18904);i(88402);class g extends d.L{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:(0,c.aS)("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:n.W.map,toggled:h.M$.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:h.M$.has("isInDiffEditor"),menu:{when:h.M$.has("isInDiffEditor"),id:d.D8.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(u.pG),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class p extends d.L{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:(0,c.aS)("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:h.M$.has("isInDiffEditor")})}run(e,...t){const i=e.get(u.pG),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class f extends d.L{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:(0,c.aS)("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:h.M$.has("isInDiffEditor")})}run(e,...t){const i=e.get(u.pG),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const m=(0,c.aS)("diffEditor","Diff Editor");class _ extends s.qO{constructor(){super({id:"diffEditor.switchSide",title:(0,c.aS)("switchSide","Switch Side"),icon:n.W.arrowSwap,precondition:h.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,i){const n=E(e);if(n instanceof a.T){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class v extends s.qO{constructor(){super({id:"diffEditor.exitCompareMove",title:(0,c.aS)("exitCompareMove","Exit Compare Move"),icon:n.W.close,precondition:l.R.comparingMovedCode,f1:!1,category:m,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=E(e);n instanceof a.T&&n.exitCompareMove()}}class b extends s.qO{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:(0,c.aS)("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:n.W.fold,precondition:h.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,...i){const n=E(e);n instanceof a.T&&n.collapseAllUnchangedRegions()}}class y extends s.qO{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:(0,c.aS)("showAllUnchangedRegions","Show All Unchanged Regions"),icon:n.W.unfold,precondition:h.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,...i){const n=E(e);n instanceof a.T&&n.showAllUnchangedRegions()}}class w extends d.L{constructor(){super({id:"diffEditor.revert",title:(0,c.aS)("revert","Revert"),f1:!1,category:m})}run(e,t){const i=x(e,t.originalUri,t.modifiedUri);i instanceof a.T&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const C=(0,c.aS)("accessibleDiffViewer","Accessible Diff Viewer");class S extends d.L{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:S.id,title:(0,c.aS)("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:C,precondition:h.M$.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=E(e);t?.accessibleDiffViewerNext()}}class k extends d.L{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:k.id,title:(0,c.aS)("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:C,precondition:h.M$.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=E(e);t?.accessibleDiffViewerPrev()}}function x(e,t,i){const n=e.get(r.T),o=n.listDiffEditors();return o.find((e=>{const n=e.getModifiedEditor(),o=e.getOriginalEditor();return n&&n.getModel()?.uri.toString()===i.toString()&&o&&o.getModel()?.uri.toString()===t.toString()}))||null}function E(e){const t=e.get(r.T),i=t.listDiffEditors(),n=(0,o.bq)();if(n)for(const o of i){const e=o.getContainerDomNode();if(L(e,n))return o}return null}function L(e,t){let i=t;while(i){if(i===e)return!0;i=i.parentElement}return!1}var T=i(72786);(0,d.ug)(g),(0,d.ug)(p),(0,d.ug)(f),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:(new f).desc.id,title:(0,c.kg)("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:h.M$.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:h.M$.has("isInDiffEditor")},order:11,group:"1_diff",when:h.M$.and(l.R.diffEditorRenderSideBySideInlineBreakpointReached,h.M$.has("isInDiffEditor"))}),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:(new p).desc.id,title:(0,c.kg)("showMoves","Show Moved Code Blocks"),icon:n.W.move,toggled:h.f1.create("config.diffEditor.experimental.showMoves",!0),precondition:h.M$.has("isInDiffEditor")},order:10,group:"1_diff",when:h.M$.has("isInDiffEditor")}),(0,d.ug)(w);for(const I of[{icon:n.W.arrowRight,key:l.R.diffEditorInlineMode.toNegated()},{icon:n.W.discard,key:l.R.diffEditorInlineMode}])d.ZG.appendMenuItem(d.D8.DiffEditorHunkToolbar,{command:{id:(new w).desc.id,title:(0,c.kg)("revertHunk","Revert Block"),icon:I.icon},when:h.M$.and(l.R.diffEditorModifiedWritable,I.key),order:5,group:"primary"}),d.ZG.appendMenuItem(d.D8.DiffEditorSelectionToolbar,{command:{id:(new w).desc.id,title:(0,c.kg)("revertSelection","Revert Selection"),icon:I.icon},when:h.M$.and(l.R.diffEditorModifiedWritable,I.key),order:5,group:"primary"});(0,d.ug)(_),(0,d.ug)(v),(0,d.ug)(b),(0,d.ug)(y),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:S.id,title:(0,c.kg)("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:h.M$.has("isInDiffEditor")},order:10,group:"2_diff",when:h.M$.and(l.R.accessibleDiffViewerVisible.negate(),h.M$.has("isInDiffEditor"))}),T.w.registerCommandAlias("editor.action.diffReview.next",S.id),(0,d.ug)(S),T.w.registerCommandAlias("editor.action.diffReview.prev",k.id),(0,d.ug)(k)},12032:(e,t,i)=>{"use strict";i.d(t,{T:()=>Kt});var n=i(2150),o=i(43654),s=i(14396),r=i(40231),a=i(5091),l=i(39751),c=i(42389),d=i(16259),u=i(94728),h=i(71203),g=i(10113),p=i(21776),f=i(48038),m=i(37800),_=i(55664),v=i(85053),b=i(25923),y=i(23740),w=i(11320),C=i(78787),S=i(35011),k=i(44544),x=i(50371),E=i(36788),L=i(8690),T=i(93866),I=i(14573),R=i(70164),D=i(20529),N=i(90765),A=i(41337),O=i(4380),P=i(87778),M=i(48401),F=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},B=function(e,t){return function(i,n){t(i,n,e)}};const W=(0,M.pU)("diff-review-insert",b.W.add,(0,A.kg)("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),H=(0,M.pU)("diff-review-remove",b.W.remove,(0,A.kg)("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),V=(0,M.pU)("diff-review-close",b.W.close,(0,A.kg)("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let j=class extends a.jG{static{this._ttPolicy=(0,p.H)("diffReview",{createHTML:e=>e})}constructor(e,t,i,n,o,s,r,a,c){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=o,this._height=s,this._diffs=r,this._models=a,this._instantiationService=c,this._state=(0,l.rm)(this,((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(z,this._diffs,this._models,this._setVisible,this._canClose)),o=t.add(this._instantiationService.createInstance(X,this._parentNode,n,this._width,this._height,this._models));return{model:n,view:o}})).recomputeInitiallyAndOnChange(this._store)}next(){(0,l.Rn)((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)}))}prev(){(0,l.Rn)((e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)}))}close(){(0,l.Rn)((e=>{this._setVisible(!1,e)}))}};j=F([B(8,P._Y)],j);let z=class extends a.jG{constructor(e,t,i,n,o){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=o,this._groups=(0,l.FY)(this,[]),this._currentGroupIdx=(0,l.FY)(this,0),this._currentElementIdx=(0,l.FY)(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>this.currentGroup.read(t)?.lines[e])),this._register((0,l.fm)((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=$(t,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());(0,l.Rn)((e=>{const t=this._models.getModifiedPosition();if(t){const n=i.findIndex((e=>t?.lineNumber{const t=this.currentElement.read(e);t?.type===q.Deleted?this._accessibilitySignalService.playSignal(O.Rh.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):t?.type===q.Added&&this._accessibilitySignalService.playSignal(O.Rh.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register((0,l.fm)((e=>{const t=this.currentElement.read(e);if(t&&t.type!==q.Header){const e=t.modifiedLineNumber??t.diff.modified.startLineNumber;this._models.modifiedSetSelection(L.Q.fromPositions(new E.y(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||(0,l.PO)(t,(t=>{this._currentGroupIdx.set(x.L.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||(0,l.Rn)((i=>{this._currentElementIdx.set(x.L.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);-1!==i&&(0,l.Rn)((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===q.Deleted?this._models.originalReveal(L.Q.fromPositions(new E.y(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==q.Header?L.Q.fromPositions(new E.y(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};z=F([B(4,O.Nt)],z);const U=3;function $(e,t,i){const n=[];for(const o of(0,v.n)(e,((e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<2*U))){const e=[];e.push(new G);const s=new k.M(Math.max(1,o[0].original.startLineNumber-U),Math.min(o[o.length-1].original.endLineNumberExclusive+U,t+1)),r=new k.M(Math.max(1,o[0].modified.startLineNumber-U),Math.min(o[o.length-1].modified.endLineNumberExclusive+U,i+1));(0,v.pN)(o,((t,i)=>{const n=new k.M(t?t.original.endLineNumberExclusive:s.startLineNumber,i?i.original.startLineNumber:s.endLineNumberExclusive),o=new k.M(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new Z(t,o.startLineNumber+(t-n.startLineNumber)))})),i&&(i.original.forEach((t=>{e.push(new Q(i,t))})),i.modified.forEach((t=>{e.push(new Y(i,t))})))}));const a=o[0].modified.join(o[o.length-1].modified),l=o[0].original.join(o[o.length-1].original);n.push(new K(new T.WL(a,l),e))}return n}var q;(function(e){e[e["Header"]=0]="Header",e[e["Unchanged"]=1]="Unchanged",e[e["Deleted"]=2]="Deleted",e[e["Added"]=3]="Added"})(q||(q={}));class K{constructor(e,t){this.range=e,this.lines=t}}class G{constructor(){this.type=q.Header}}class Q{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=q.Deleted,this.modifiedLineNumber=void 0}}class Y{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=q.Added,this.originalLineNumber=void 0}}class Z{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=q.Unchanged}}let X=class extends a.jG{constructor(e,t,i,o,s,r){super(),this._element=e,this._model=t,this._width=i,this._height=o,this._models=s,this._languageService=r,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const c=document.createElement("div");c.className="diff-review-actions",this._actionBar=this._register(new f.E(c)),this._register((0,l.fm)((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new _.rc("diffreview.close",(0,A.kg)("label.close","Close"),"close-diff-review "+y.L.asClassName(V),!0,(async()=>t.close())),{label:!1,icon:!0})}))),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new m.MU(this._content,{})),(0,n.Ln)(this.domNode,this._scrollbar.getDomNode(),c),this._register((0,l.fm)((e=>{this._height.read(e),this._width.read(e),this._scrollbar.scanDomNode()}))),this._register((0,a.s)((()=>{(0,n.Ln)(this.domNode)}))),this._register((0,C.AV)(this.domNode,{width:this._width,height:this._height})),this._register((0,C.AV)(this._content,{width:this._width,height:this._height})),this._register((0,l.yC)(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register((0,n.b2)(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),o=document.createElement("div");o.className="diff-review-table",o.setAttribute("role","list"),o.setAttribute("aria-label",(0,A.kg)("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),(0,w.M)(o,i.get(50)),(0,n.Ln)(this._content,o);const s=this._models.getOriginalModel(),r=this._models.getModifiedModel();if(!s||!r)return;const a=s.getOptions(),c=r.getOptions(),d=i.get(67),u=this._model.currentGroup.get();for(const h of u?.lines||[]){if(!u)break;let g;if(h.type===q.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=u.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,o=e=>0===e?(0,A.kg)("no_lines_changed","no lines changed"):1===e?(0,A.kg)("one_line_changed","1 line changed"):(0,A.kg)("more_lines_changed","{0} lines changed",e),s=o(t.original.length),r=o(t.modified.length);e.setAttribute("aria-label",(0,A.kg)({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,s,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),g=e}else g=this._createRow(h,d,this._width.get(),t,s,a,i,r,c);o.appendChild(g);const p=(0,l.un)((e=>this._model.currentElement.read(e)===h));e.add((0,l.fm)((e=>{const t=p.read(e);g.tabIndex=t?0:-1,t&&g.focus()}))),e.add((0,n.ko)(g,"focus",(()=>{this._model.goToLine(h)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,o,s,r,a,l){const c=n.get(146),d=c.glyphMarginWidth+c.lineNumbersWidth,u=r.get(146),h=10+u.glyphMarginWidth+u.lineNumbersWidth;let g="diff-review-row",p="";const f="diff-review-spacer";let m=null;switch(e.type){case q.Added:g="diff-review-row line-insert",p=" char-insert",m=W;break;case q.Deleted:g="diff-review-row line-delete",p=" char-delete",m=H;break}const _=document.createElement("div");_.style.minWidth=i+"px",_.className=g,_.setAttribute("role","listitem"),_.ariaLevel="";const v=document.createElement("div");v.className="diff-review-cell",v.style.height=`${t}px`,_.appendChild(v);const b=document.createElement("span");b.style.width=d+"px",b.style.minWidth=d+"px",b.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?b.appendChild(document.createTextNode(String(e.originalLineNumber))):b.innerText=" ",v.appendChild(b);const w=document.createElement("span");w.style.width=h+"px",w.style.minWidth=h+"px",w.style.paddingRight="10px",w.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?w.appendChild(document.createTextNode(String(e.modifiedLineNumber))):w.innerText=" ",v.appendChild(w);const C=document.createElement("span");if(C.className=f,m){const e=document.createElement("span");e.className=y.L.asClassName(m),e.innerText="  ",C.appendChild(e)}else C.innerText="  ";let S;if(v.appendChild(C),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);j._ttPolicy&&(t=j._ttPolicy.createHTML(t)),v.insertAdjacentHTML("beforeend",t),S=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(o,n,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);j._ttPolicy&&(t=j._ttPolicy.createHTML(t)),v.insertAdjacentHTML("beforeend",t),S=o.getLineContent(e.originalLineNumber)}0===S.length&&(S=(0,A.kg)("blankLine","blank"));let k="";switch(e.type){case q.Unchanged:k=e.originalLineNumber===e.modifiedLineNumber?(0,A.kg)({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",S,e.originalLineNumber):(0,A.kg)("equalLine","{0} original line {1} modified line {2}",S,e.originalLineNumber,e.modifiedLineNumber);break;case q.Added:k=(0,A.kg)("insertLine","+ {0} modified line {1}",S,e.modifiedLineNumber);break;case q.Deleted:k=(0,A.kg)("deleteLine","- {0} original line {1}",S,e.originalLineNumber);break}return _.setAttribute("aria-label",k),_}_getLineHtml(e,t,i,n,o){const s=e.getLineContent(n),r=t.get(50),a=R.f.createEmpty(s,o),l=N.qL.isBasicASCII(s,e.mightContainNonBasicASCII()),c=N.qL.containsRTL(s,l,e.mightContainRTL()),d=(0,D.Md)(new D.zL(r.isMonospace&&!t.get(33),r.canUseHalfwidthRightwardsArrow,s,!1,l,c,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(118),t.get(100),t.get(95),t.get(51)!==S.Bc.OFF,null));return d.html}};X=F([B(5,I.L)],X);class J{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}var ee=i(9659),te=i(50322),ie=i(88402),ne=i(67792),oe=i(41843),se=i(34956),re=i(29680),ae=i(95239),le=i(18485),ce=i(79233),de=i(79109),ue=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},he=function(e,t){return function(i,n){t(i,n,e)}};let ge=class extends a.jG{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=(0,l.FY)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,l.FY)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,l.FY)(this,void 0),this.unchangedRegions=(0,l.un)(this,(e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e)?.regions??[]:((0,l.Rn)((e=>{for(const t of this._unchangedRegions.get()?.regions||[])t.collapseAll(e)})),[]))),this.movedTextToCompare=(0,l.FY)(this,void 0),this._activeMovedText=(0,l.FY)(this,void 0),this._hoveredMovedText=(0,l.FY)(this,void 0),this.activeMovedText=(0,l.un)(this,(e=>this.movedTextToCompare.read(e)??this._hoveredMovedText.read(e)??this._activeMovedText.read(e))),this._cancellationTokenSource=new ne.Qi,this._diffProvider=(0,l.un)(this,(e=>{const t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)}),i=(0,l.yQ)("onDidChange",t.onDidChange);return{diffProvider:t,onChangeSignal:i}})),this._register((0,a.s)((()=>this._cancellationTokenSource.cancel())));const n=(0,l.Yd)("contentChangedSignal"),o=this._register(new ee.uC((()=>n.trigger(void 0)),200));this._register((0,l.fm)((t=>{const i=this._unchangedRegions.read(t);if(!i||i.regions.some((e=>e.isDragged.read(t))))return;const n=i.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),o=i.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),s=i.regions.map(((e,i)=>n[i]&&o[i]?new ve(n[i].startLineNumber,o[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0)).filter(te.O9),r=[];let a=!1;for(const e of(0,v.n)(s,((e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber)))if(e.length>1){a=!0;const t=e.reduce(((e,t)=>e+t.lineCount),0),i=new ve(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.get(),e[e.length-1].visibleLineCountBottom.get());r.push(i)}else r.push(e[0]);if(a){const t=e.original.deltaDecorations(i.originalDecorationIds,r.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));(0,l.Rn)((e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)}))}})));const s=(t,i,n)=>{const o=ve.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n));let s;const r=this._unchangedRegions.get();if(r){const t=r.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),i=r.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),o=(0,C.EK)(r.regions.map(((e,n)=>{if(!t[n]||!i[n])return;const o=t[n].length;return new ve(t[n].startLineNumber,i[n].startLineNumber,o,Math.min(e.visibleLineCountTop.get(),o),Math.min(e.visibleLineCountBottom.get(),o-e.visibleLineCountTop.get()))})).filter(te.O9),((e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount));let a=o.map((e=>new T.WL(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n))));a=T.WL.clip(a,k.M.ofLength(1,e.original.getLineCount()),k.M.ofLength(1,e.modified.getLineCount())),s=T.WL.inverse(a,e.original.getLineCount(),e.modified.getLineCount())}const a=[];if(s)for(const e of o){const t=s.filter((t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange)));a.push(...e.setVisibleRanges(t,i))}else a.push(...o);const l=e.original.deltaDecorations(r?.originalDecorationIds||[],a.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),c=e.modified.deltaDecorations(r?.modifiedDecorationIds||[],a.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:c},i)};this._register(e.modified.onDidChangeContent((t=>{const i=this._diff.get();if(i){const i=ae.c.fromModelContentChanges(t.changes),n=ye(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,l.Rn)((e=>{this._diff.set(me.fromDiffResult(this._lastDiff),e),s(n,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),o.schedule()}))),this._register(e.original.onDidChangeContent((t=>{const i=this._diff.get();if(i){const i=ae.c.fromModelContentChanges(t.changes),n=be(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,l.Rn)((e=>{this._diff.set(me.fromDiffResult(this._lastDiff),e),s(n,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),o.schedule()}))),this._register((0,l.yC)((async(t,i)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),o.cancel(),n.read(t);const r=this._diffProvider.read(t);r.onChangeSignal.read(t),(0,se.b)(re.D8,t),(0,se.b)(ce.NC,t),this._isDiffUpToDate.set(!1,void 0);let a=[];i.add(e.original.onDidChangeContent((e=>{const t=ae.c.fromModelContentChanges(e.changes);a=(0,le.M)(a,t)})));let c=[];i.add(e.modified.onDidChangeContent((e=>{const t=ae.c.fromModelContentChanges(e.changes);c=(0,le.M)(c,t)})));let d=await r.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(d=pe(d,e.original,e.modified),d=be(d,a,e.original,e.modified)??d,d=ye(d,c,e.original,e.modified)??d,(0,l.Rn)((e=>{s(d,e),this._lastDiff=d;const t=me.fromDiffResult(d);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))}ensureModifiedLineIsVisible(e,t,i){if(0===this.diff.get()?.mappings.length)return;const n=this._unchangedRegions.get()?.regions||[];for(const o of n)if(o.getHiddenModifiedRange(void 0).contains(e))return void o.showModifiedLine(e,t,i)}ensureOriginalLineIsVisible(e,t,i){if(0===this.diff.get()?.mappings.length)return;const n=this._unchangedRegions.get()?.regions||[];for(const o of n)if(o.getHiddenOriginalRange(void 0).contains(e))return void o.showOriginalLine(e,t,i)}async waitForDiff(){await(0,l.oJ)(this.isDiffUpToDate,(e=>e))}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){const t=e.collapsedRegions?.map((e=>k.M.deserialize(e.range))),i=this._unchangedRegions.get();i&&t&&(0,l.Rn)((e=>{for(const n of i.regions)for(const i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}}))}};function pe(e,t,i){return{changes:e.changes.map((e=>new T.wm(e.original,e.modified,e.innerChanges?e.innerChanges.map((e=>fe(e,t,i))):void 0))),moves:e.moves,identical:e.identical,quitEarly:e.quitEarly}}function fe(e,t,i){let n=e.originalRange,o=e.modifiedRange;return 1===n.startColumn&&1===o.startColumn&&(1!==n.endColumn||1!==o.endColumn)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&o.endColumn===i.getLineMaxColumn(o.endLineNumber)&&n.endLineNumbernew _e(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class _e{constructor(e){this.lineRangeMapping=e}}class ve{static fromDiffs(e,t,i,n,o){const s=T.wm.inverse(e,t,i),r=[];for(const a of s){let e=a.original.startLineNumber,s=a.modified.startLineNumber,l=a.original.length;const c=1===e&&1===s,d=e+l===t+1&&s+l===i+1;(c||d)&&l>=o+n?(c&&!d&&(l-=o),d&&!c&&(e+=o,s+=o,l-=o),r.push(new ve(e,s,l,0,0))):l>=2*o+n&&(e+=o,s+=o,l-=2*o,r.push(new ve(e,s,l,0,0)))}return r}get originalUnchangedRange(){return k.M.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return k.M.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,o){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,l.FY)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,l.FY)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,l.un)(this,(e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=(0,l.FY)(this,void 0);const s=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(o,this.lineCount-n),0);(0,de.V7)(n===s),(0,de.V7)(o===r),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){const i=[],n=new k.S(e.map((e=>e.modified))).subtractFrom(this.modifiedUnchangedRange);let o=this.originalLineNumber,s=this.modifiedLineNumber;const r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(const a of n.ranges){const l=e===n.ranges.length-1;e++;const c=(l?r:a.endLineNumberExclusive)-s,d=new ve(o,s,c,0,0);d.setHiddenModifiedRange(a,t),i.push(d),o=d.originalUnchangedRange.endLineNumberExclusive,s=d.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return k.M.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return k.M.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){const n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),o=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n{this._contextMenuService.showContextMenu({domForShadowRoot:h?i.getDomNode()??void 0:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=o.modified.isEmpty;e.push(new _.rc("diff.clipboard.copyDeletedContent",t?o.original.length>1?(0,A.kg)("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):(0,A.kg)("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):o.original.length>1?(0,A.kg)("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):(0,A.kg)("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(async()=>{const e=this._originalTextModel.getValueInRange(o.original.toExclusiveRange());await this._clipboardService.writeText(e)}))),o.original.length>1&&e.push(new _.rc("diff.clipboard.copyDeletedLineContent",t?(0,A.kg)("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.original.startLineNumber+u):(0,A.kg)("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",o.original.startLineNumber+u),void 0,!0,(async()=>{let e=this._originalTextModel.getLineContent(o.original.startLineNumber+u);if(""===e){const t=this._originalTextModel.getEndOfLineSequence();e=0===t?"\n":"\r\n"}await this._clipboardService.writeText(e)})));const n=i.getOption(92);return n||e.push(new _.rc("diff.inline.revertChange",(0,A.kg)("diff.inline.revertChange.label","Revert this change"),void 0,!0,(async()=>{this._editor.revert(this._diff)}))),e},autoSelectFirstItem:!0})};this._register((0,n.b2)(this._diffActions,"mousedown",(e=>{if(!e.leftButton)return;const{top:t,height:i}=(0,n.BK)(this._diffActions),o=Math.floor(d/3);e.preventDefault(),g(e.posx,t+i+o)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{if(e.event.leftButton&&(8===e.target.type||5===e.target.type)){const t=e.target.detail.viewZoneId;t===this._getViewZoneId()&&(e.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),g(e.event.posx,e.event.posy+d))}})))}_updateLightBulbPosition(e,t,i){const{top:o}=(0,n.BK)(e),s=t-o,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let e=0;for(let t=0;te});function Ee(e,t,i,n){(0,w.M)(n,t.fontInfo);const o=i.length>0,s=new Se.fe(1e4);let r=0,a=0;const l=[];for(let h=0;h');const l=t.getLineContent(),c=N.qL.isBasicASCII(l,o),d=N.qL.containsRTL(l,c,s),u=(0,D.UW)(new D.zL(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,d,0,t,i,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==S.Bc.OFF,null),a);return a.appendString(""),u.characterMapping.getHorizontalOffset(u.characterMapping.length)}var Re=i(28753),De=i(46403),Ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ae=function(e,t){return function(i,n){t(i,n,e)}};let Oe=class extends a.jG{constructor(e,t,i,o,s,r,c,d,u,h){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=o,this._diffEditorWidget=s,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=c,this._modViewZonesToIgnore=d,this._clipboardService=u,this._contextMenuService=h,this._originalTopPadding=(0,l.FY)(this,0),this._originalScrollOffset=(0,l.FY)(this,0),this._originalScrollOffsetAnimated=(0,C.Nu)(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,l.FY)(this,0),this._modifiedScrollOffset=(0,l.FY)(this,0),this._modifiedScrollOffsetAnimated=(0,C.Nu)(this._targetWindow,this._modifiedScrollOffset,this._store);const g=(0,l.FY)("invalidateAlignmentsState",0),p=this._register(new ee.uC((()=>{g.set(g.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(147)||e.hasChanged(67))&&p.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(147)||e.hasChanged(67))&&p.schedule()})));const f=this._diffModel.map((e=>e?(0,l.y0)(this,e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>e?.read(t))),m=(0,l.un)((e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!t||!i)return null;g.read(e);const n=this._options.renderSideBySide.read(e),o=n;return Pe(this._editors.original,this._editors.modified,i.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,o)})),_=(0,l.un)((e=>{const t=this._diffModel.read(e)?.movedTextToCompare.read(e);if(!t)return null;g.read(e);const i=t.changes.map((e=>new _e(e)));return Pe(this._editors.original,this._editors.modified,i,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)}));function v(){const e=document.createElement("div");return e.className="diagonal-fill",e}const S=this._register(new a.Cm);this.viewZones=(0,l.rm)(this,((e,t)=>{S.clear();const i=m.read(e)||[],o=[],r=[],a=this._modifiedTopPadding.read(e);a>0&&r.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:a,showInHiddenAreas:!0,suppressMouseDown:!0});const l=this._originalTopPadding.read(e);l>0&&o.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:l,showInHiddenAreas:!0,suppressMouseDown:!0});const c=this._options.renderSideBySide.read(e),d=c?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer();if(d){const E=this._editors.original.getModel();for(const L of i)if(L.diff)for(let T=L.originalRange.startLineNumber;TE.getLineCount())return{orig:o,mod:r};d?.addRequest(E.getLineContent(T),null,null)}}const u=d?.finalize()??[];let h=0;const g=this._editors.modified.getOption(67),p=this._diffModel.read(e)?.movedTextToCompare.read(e),C=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,k=this._editors.original.getModel()?.mightContainRTL()??!1,x=Te.fromEditor(this._editors.modified);for(const I of i)if(!I.diff||c||this._options.useTrueInlineDiffRendering.read(e)&&Fe(I.diff)){const R=I.modifiedHeightInPx-I.originalHeightInPx;if(R>0){if(p?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(I.originalRange.endLineNumberExclusive-1))continue;o.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:R,showInHiddenAreas:!0,suppressMouseDown:!0})}else{if(p?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(I.modifiedRange.endLineNumberExclusive-1))continue;function D(){const e=document.createElement("div");return e.className="arrow-revert-change "+y.L.asClassName(b.W.arrowRight),t.add((0,n.ko)(e,"mousedown",(e=>e.stopPropagation()))),t.add((0,n.ko)(e,"click",(e=>{e.stopPropagation(),s.revert(I.diff)}))),(0,n.$)("div",{},e)}let A;I.diff&&I.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(e)&&(A=D()),r.push({afterLineNumber:I.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-R,marginDomNode:A,showInHiddenAreas:!0,suppressMouseDown:!0})}}else{if(!I.originalRange.isEmpty){f.read(e);const P=document.createElement("div");P.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const M=this._editors.original.getModel();if(I.originalRange.endLineNumberExclusive-1>M.getLineCount())return{orig:o,mod:r};const F=new Le(I.originalRange.mapToLineArray((e=>M.tokenization.getLineTokens(e))),I.originalRange.mapToLineArray((e=>u[h++])),C,k),B=[];for(const j of I.diff.innerChanges||[])B.push(new N.kI(j.originalRange.delta(-(I.diff.original.startLineNumber-1)),ie.Zb.className,0));const W=Ee(F,x,B,P),H=document.createElement("div");if(H.className="inline-deleted-margin-view-zone",(0,w.M)(H,x.fontInfo),this._options.renderIndicators.read(e))for(let z=0;z(0,te.eU)(V)),H,this._editors.modified,I.diff,this._diffEditorWidget,W.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let $=0;$1&&o.push({afterLineNumber:I.originalRange.startLineNumber+$,domNode:v(),heightInPx:(q-1)*g,showInHiddenAreas:!0,suppressMouseDown:!0})}r.push({afterLineNumber:I.modifiedRange.startLineNumber-1,domNode:P,heightInPx:W.heightInLines*g,minWidthInPx:W.minWidthInPx,marginDomNode:H,setZoneId(e){V=e},showInHiddenAreas:!0,suppressMouseDown:!0})}const O=document.createElement("div");O.className="gutter-delete",o.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:I.modifiedHeightInPx,marginDomNode:O,showInHiddenAreas:!0,suppressMouseDown:!0})}for(const K of _.read(e)??[]){if(!p?.lineRangeMapping.original.intersect(K.originalRange)||!p?.lineRangeMapping.modified.intersect(K.modifiedRange))continue;const G=K.modifiedHeightInPx-K.originalHeightInPx;G>0?o.push({afterLineNumber:K.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:G,showInHiddenAreas:!0,suppressMouseDown:!0}):r.push({afterLineNumber:K.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-G,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:o,mod:r}}));let k=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!k&&(k=!0,this._editors.modified.setScrollLeft(e.scrollLeft),k=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!k&&(k=!0,this._editors.original.setScrollLeft(e.scrollLeft),k=!1)}))),this._originalScrollTop=(0,l.y0)(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.y0)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register((0,l.fm)((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register((0,l.fm)((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register((0,l.fm)((e=>{const t=this._diffModel.read(e)?.movedTextToCompare.read(e);let i=0;if(t){const e=this._editors.original.getTopForLineNumber(t.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get(),n=this._editors.modified.getTopForLineNumber(t.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get();i=n-e}i>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(i,void 0)):i<0?(this._modifiedTopPadding.set(-i,void 0),this._originalTopPadding.set(0,void 0)):setTimeout((()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)}),400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-i,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+i,void 0,!0)})))}};function Pe(e,t,i,n,o,s){const r=new v.j3(Me(e,n)),a=new v.j3(Me(t,o)),l=e.getOption(67),c=t.getOption(67),d=[];let u=0,h=0;function g(e,t){while(1){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const o=i?i.lineNumber-u:Number.MAX_VALUE,s=n?n.lineNumber-h:Number.MAX_VALUE;os?(a.dequeue(),i={lineNumber:n.lineNumber-h+u,heightInPx:0}):(r.dequeue(),a.dequeue()),d.push({originalRange:k.M.ofLength(i.lineNumber,1),modifiedRange:k.M.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:c+n.heightInPx,diff:void 0})}}for(const p of i){const f=p.lineRangeMapping;g(f.original.startLineNumber,f.modified.startLineNumber);let m=!0,_=f.modified.startLineNumber,b=f.original.startLineNumber;function y(e,t,i=!1){if(et.lineNumbere+t.heightInPx),0)??0,u=a.takeWhile((e=>e.lineNumbere+t.heightInPx),0)??0;d.push({originalRange:n,modifiedRange:o,originalHeightInPx:n.length*l+s,modifiedHeightInPx:o.length*c+u,diff:p.lineRangeMapping}),b=e,_=t}if(s)for(const w of f.innerChanges||[]){w.originalRange.startColumn>1&&w.modifiedRange.startColumn>1&&y(w.originalRange.startLineNumber,w.modifiedRange.startLineNumber);const C=e.getModel(),S=w.originalRange.endLineNumber<=C.getLineCount()?C.getLineMaxColumn(w.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;w.originalRange.endColumn1&&n.push({lineNumber:l,heightInPx:r*(e-1)})}for(const l of e.getWhitespaces()){if(t.has(l.id))continue;const e=0===l.afterLineNumber?0:s.convertViewPositionToModelPosition(new E.y(l.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:l.height})}const a=(0,C.Am)(i,n,(e=>e.lineNumber),((e,t)=>({lineNumber:e.lineNumber,heightInPx:e.heightInPx+t.heightInPx})));return a}function Fe(e){return!!e.innerChanges&&e.innerChanges.every((e=>Be(e.modifiedRange)&&Be(e.originalRange)||e.originalRange.equalsRange(new L.Q(1,1,1,1))))}function Be(e){return e.startLineNumber===e.endLineNumber}Oe=Ne([Ae(8,Re.h),Ae(9,De.Z)],Oe);class We extends a.jG{static{this.movedCodeBlockPadding=4}constructor(e,t,i,n,o){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=o,this._originalScrollTop=(0,l.y0)(this,this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.y0)(this,this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=(0,l.yQ)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,l.FY)(this,0),this._modifiedViewZonesChangedSignal=(0,l.yQ)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,l.yQ)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,l.rm)(this,((e,t)=>{this._element.replaceChildren();const i=this._diffModel.read(e),n=i?.diff.read(e)?.movedTexts;if(!n||0===n.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const o=this._originalEditorLayoutInfo.read(e),s=this._modifiedEditorLayoutInfo.read(e);if(!o||!s)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const r=n.map((t=>{function i(e,t){const i=t.getTopForLineNumber(e.startLineNumber,!0),n=t.getTopForLineNumber(e.endLineNumberExclusive,!0);return(i+n)/2}const n=i(t.lineRangeMapping.original,this._editors.original),o=this._originalScrollTop.read(e),s=i(t.lineRangeMapping.modified,this._editors.modified),r=this._modifiedScrollTop.read(e),a=n-o,l=s-r,c=Math.min(n,s),d=Math.max(n,s);return{range:new x.L(c,d),from:a,to:l,fromWithoutScroll:n,toWithoutScroll:s,move:t}}));r.sort((0,v.nH)((0,v.VE)((e=>e.fromWithoutScroll>e.toWithoutScroll),v.TS),(0,v.VE)((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),v.U9)));const a=He.compute(r.map((e=>e.range))),c=10,d=o.verticalScrollbarWidth,u=10*(a.getTrackCount()-1)+2*c,h=d+u+(s.contentLeft-We.movedCodeBlockPadding);let g=0;for(const p of r){const e=a.getTrack(g),n=d+c+10*e,o=15,r=15,u=h,f=s.glyphMarginWidth+s.lineNumbersWidth,m=18,_=document.createElementNS("http://www.w3.org/2000/svg","rect");_.classList.add("arrow-rectangle"),_.setAttribute("x",""+(u-f)),_.setAttribute("y",""+(p.to-m/2)),_.setAttribute("width",`${f}`),_.setAttribute("height",`${m}`),this._element.appendChild(_);const v=document.createElementNS("http://www.w3.org/2000/svg","g"),b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d",`M 0 ${p.from} L ${n} ${p.from} L ${n} ${p.to} L ${u-r} ${p.to}`),b.setAttribute("fill","none"),v.appendChild(b);const y=document.createElementNS("http://www.w3.org/2000/svg","polygon");y.classList.add("arrow"),t.add((0,l.fm)((e=>{b.classList.toggle("currentMove",p.move===i.activeMovedText.read(e)),y.classList.toggle("currentMove",p.move===i.activeMovedText.read(e))}))),y.setAttribute("points",`${u-r},${p.to-o/2} ${u},${p.to} ${u-r},${p.to+o/2}`),v.appendChild(y),this._element.appendChild(v),g++}this.width.set(u,void 0)})),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,a.s)((()=>this._element.remove()))),this._register((0,l.fm)((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-We.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register((0,l.OI)(this._state));const s=(0,l.un)((e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new C.D1((0,l.lk)(e.lineRangeMapping.original.startLineNumber-1),18),modified:new C.D1((0,l.lk)(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register((0,C.Vs)(this._editors.original,s.map((e=>e.map((e=>e.original)))))),this._register((0,C.Vs)(this._editors.modified,s.map((e=>e.map((e=>e.modified)))))),this._register((0,l.yC)(((e,t)=>{const i=s.read(e);for(const n of i)t.add(new Ve(this._editors.original,n.original,n.move,"original",this._diffModel.get())),t.add(new Ve(this._editors.modified,n.modified,n.move,"modified",this._diffModel.get()))})));const r=(0,l.yQ)("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),c=(0,l.yQ)("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let d="modified";this._register((0,l.Y)({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(r)&&(d="original"),e.didChange(c)&&(d="modified"),!0)},(e=>{r.read(e),c.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===d){const t=this._editors.originalCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===d){const t=this._editors.modifiedCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}class He{static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=(0,o.TM)(t,(0,v.VE)((e=>e.intersectWithRangeLength(n)),v.U9)):(e=t.length,t.push(new x.h))}t[e].addRange(n),i.push(e)}return new He(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class Ve extends C.uN{constructor(e,t,i,o,s){const r=(0,n.h)("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=o,this._diffModel=s,this._nodes=(0,n.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,n.h)("div.text-content@textContent"),(0,n.h)("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);const a=(0,l.y0)(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let c;this._register((0,C.AV)(this._nodes.root,{paddingRight:a.map((e=>e.verticalScrollbarWidth))})),c=i.changes.length>0?"original"===this._kind?(0,A.kg)("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,A.kg)("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?(0,A.kg)("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,A.kg)("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const d=this._register(new f.E(this._nodes.actionBar,{highlightToggledItems:!0})),u=new _.rc("",c,"",!1);d.push(u,{icon:!1,label:!0});const h=new _.rc("","Compare",y.L.asClassName(b.W.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register((0,l.fm)((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;h.checked=t}))),d.push(h,{icon:!1,label:!0})}}class je extends a.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),o=this._options.renderIndicators.read(e),s=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const c of i.mappings)if(c.lineRangeMapping.original.isEmpty||r.push({range:c.lineRangeMapping.original.toInclusiveRange(),options:o?ie.Ob:ie.XT}),c.lineRangeMapping.modified.isEmpty||a.push({range:c.lineRangeMapping.modified.toInclusiveRange(),options:o?ie.Kl:ie.Zw}),c.lineRangeMapping.modified.isEmpty||c.lineRangeMapping.original.isEmpty)c.lineRangeMapping.original.isEmpty||r.push({range:c.lineRangeMapping.original.toInclusiveRange(),options:ie.KL}),c.lineRangeMapping.modified.isEmpty||a.push({range:c.lineRangeMapping.modified.toInclusiveRange(),options:ie.Ou});else{const i=this._options.useTrueInlineDiffRendering.read(e)&&Fe(c.lineRangeMapping);for(const e of c.lineRangeMapping.innerChanges||[])if(c.lineRangeMapping.original.contains(e.originalRange.startLineNumber)&&r.push({range:e.originalRange,options:e.originalRange.isEmpty()&&s?ie.wp:ie.Zb}),c.lineRangeMapping.modified.contains(e.modifiedRange.startLineNumber)&&a.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()&&s&&!i?ie.GM:ie.bk}),i){const i=t.model.original.getValueInRange(e.originalRange);a.push({range:e.modifiedRange,options:{description:"deleted-text",before:{content:i,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(n)for(const c of n.changes){const e=c.original.toInclusiveRange();e&&r.push({range:e,options:o?ie.Ob:ie.XT});const t=c.modified.toInclusiveRange();t&&a.push({range:t,options:o?ie.Kl:ie.Zw});for(const i of c.innerChanges||[])r.push({range:i.originalRange,options:ie.Zb}),a.push({range:i.modifiedRange,options:ie.bk})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const c of i.movedTexts)r.push({range:c.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(c===l?" currentMove":""),blockPadding:[We.movedCodeBlockPadding,0,We.movedCodeBlockPadding,We.movedCodeBlockPadding]}}),a.push({range:c.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(c===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register((0,C.pY)(this._editors.original,this._decorations.map((e=>e?.originalDecorations||[])))),this._register((0,C.pY)(this._editors.modified,this._decorations.map((e=>e?.modifiedDecorations||[]))))}}var ze=i(53062);class Ue{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=(0,c.dQ)(this,(e=>{const t=this._sashRatio.read(e)??this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(t,e)}),((e,t)=>{const i=this.dimensions.width.get();this._sashRatio.set(e/i,t)})),this._sashRatio=(0,l.FY)(this,void 0)}_computeSashLeft(e,t){const i=this.dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),o=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,s=100;return i<=2*s?n:oi-s?i-s:o}}class $e extends a.jG{constructor(e,t,i,n,o,s){super(),this._domNode=e,this._dimensions=t,this._enabled=i,this._boundarySashes=n,this.sashLeft=o,this._resetSash=s,this._sash=this._register(new ze.m(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()}))),this._register(this._sash.onDidChange((e=>{this.sashLeft.set(this._startSashPosition+(e.currentX-e.startX),void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._resetSash()))),this._register((0,l.fm)((e=>{const t=this._boundarySashes.read(e);t&&(this._sash.orthogonalEndSash=t.bottom)}))),this._register((0,l.fm)((e=>{const t=this._enabled.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()})))}}class qe extends a.jG{constructor(e,t,i){super(),this._editor=e,this._domNode=t,this.itemProvider=i,this.scrollTop=(0,l.y0)(this,this._editor.onDidScrollChange,(e=>this._editor.getScrollTop())),this.isScrollTopZero=this.scrollTop.map((e=>0===e)),this.modelAttached=(0,l.y0)(this,this._editor.onDidChangeModel,(e=>this._editor.hasModel())),this.editorOnDidChangeViewZones=(0,l.yQ)("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=(0,l.yQ)("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=(0,l.Yd)("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const o=this._domNode.appendChild((0,n.h)("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),s=new ResizeObserver((()=>{(0,l.Rn)((e=>{this.domNodeSizeChanged.trigger(e)}))}));s.observe(this._domNode),this._register((0,a.s)((()=>s.disconnect()))),this._register((0,l.fm)((e=>{o.className=this.isScrollTopZero.read(e)?"":"scroll-decoration"}))),this._register((0,l.fm)((e=>this.render(e))))}dispose(){super.dispose(),(0,n.Ln)(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const t=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),n=new Set(this.views.keys()),o=x.L.ofStartAndLength(0,this._domNode.clientHeight);if(!o.isEmpty)for(const s of i){const i=new k.M(s.startLineNumber,s.endLineNumber+1),r=this.itemProvider.getIntersectingGutterItems(i,e);(0,l.Rn)((e=>{for(const s of r){if(!s.range.intersect(i))continue;n.delete(s.id);let r=this.views.get(s.id);if(r)r.item.set(s,e);else{const e=document.createElement("div");this._domNode.appendChild(e);const t=(0,l.FY)("item",s),i=this.itemProvider.createView(t,e);r=new Ke(t,i,e),this.views.set(s.id,r)}const a=s.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(s.range.startLineNumber,!0)-t:this._editor.getBottomForLineNumber(s.range.startLineNumber-1,!1)-t,c=1===s.range.endLineNumberExclusive?Math.max(a,this._editor.getTopForLineNumber(s.range.startLineNumber,!1)-t):Math.max(a,this._editor.getBottomForLineNumber(s.range.endLineNumberExclusive-1,!0)-t),d=c-a;r.domNode.style.top=`${a}px`,r.domNode.style.height=`${d}px`,r.gutterItemView.layout(x.L.ofStartAndLength(a,d),o)}}))}for(const s of n){const e=this.views.get(s);e.gutterItemView.dispose(),e.domNode.remove(),this.views.delete(s)}}}class Ke{constructor(e,t,i){this.item=e,this.gutterItemView=t,this.domNode=i}}var Ge=i(24878),Qe=i(362),Ye=i(33904);class Ze extends Qe.CO{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){const e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new Ye.W(e-1,t)}}var Xe=i(64164),Je=i(6330),et=i(18904),tt=i(41187),it=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},nt=function(e,t){return function(i,n){t(i,n,e)}};const ot=[],st=35;let rt=class extends a.jG{constructor(e,t,i,o,s,r,a,d,u){super(),this._diffModel=t,this._editors=i,this._options=o,this._sashLayout=s,this._boundarySashes=r,this._instantiationService=a,this._contextKeyService=d,this._menuService=u,this._menu=this._register(this._menuService.createMenu(Je.D8.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=(0,l.y0)(this,this._menu.onDidChange,(()=>this._menu.getActions())),this._hasActions=this._actions.map((e=>e.length>0)),this._showSash=(0,l.un)(this,(e=>this._options.renderSideBySide.read(e)&&this._hasActions.read(e))),this.width=(0,l.un)(this,(e=>this._hasActions.read(e)?st:0)),this.elements=(0,n.h)("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:st+"px"}},[]),this._currentDiff=(0,l.un)(this,(e=>{const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e)?.mappings,n=this._editors.modifiedCursor.read(e);return n?i?.find((e=>e.lineRangeMapping.modified.contains(n.lineNumber))):void 0})),this._selectedDiffs=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return ot;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return ot;const o=new k.S(n.map((e=>k.M.fromRangeInclusive(e)))),s=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&o.intersects(e.lineRangeMapping.modified))),r=s.map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>L.Q.areIntersecting(e.modifiedRange,t)))))})));return 0===r.length||r.every((e=>0===e.rangeMappings.length))?ot:r})),this._register((0,C.$y)(e,this.elements.root)),this._register((0,n.ko)(this.elements.root,"click",(()=>{this._editors.modified.focus()}))),this._register((0,C.AV)(this.elements.root,{display:this._hasActions.map((e=>e?"block":"none"))})),(0,c.a0)(this,(t=>{const i=this._showSash.read(t);return i?new $e(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,(0,c.dQ)(this,(e=>this._sashLayout.sashLeft.read(e)-st),((e,t)=>this._sashLayout.sashLeft.set(e+st,t))),(()=>this._sashLayout.resetSash())):void 0})).recomputeInitiallyAndOnChange(this._store),this._register(new qe(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(e,t)=>{const i=this._diffModel.read(t);if(!i)return[];const n=i.diff.read(t);if(!n)return[];const o=this._selectedDiffs.read(t);if(o.length>0){const e=T.wm.fromRangeMappings(o.flatMap((e=>e.rangeMappings)));return[new at(e,!0,Je.D8.DiffEditorSelectionToolbar,void 0,i.model.original.uri,i.model.modified.uri)]}const s=this._currentDiff.read(t);return n.mappings.map((e=>new at(e.lineRangeMapping.withInnerChangesFromLineRanges(),e.lineRangeMapping===s?.lineRangeMapping,Je.D8.DiffEditorHunkToolbar,void 0,i.model.original.uri,i.model.modified.uri)))},createView:(e,t)=>this._instantiationService.createInstance(lt,e,t,this)})),this._register((0,n.ko)(this.elements.gutter,n.Bx.MOUSE_WHEEL,(e=>{this._editors.modified.getOption(104).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1}))}computeStagedValue(e){const t=e.innerChanges??[],i=new Ze(this._editors.modifiedModel.get()),n=new Ze(this._editors.original.getModel()),o=new Qe.mF(t.map((e=>e.toTextEdit(i)))),s=o.apply(n);return s}layout(e){this.elements.gutter.style.left=e+"px"}};rt=it([nt(6,P._Y),nt(7,et.fN),nt(8,Je.ez)],rt);class at{constructor(e,t,i,n,o,s){this.mapping=e,this.showAlways=t,this.menuId=i,this.rangeOverride=n,this.originalUri=o,this.modifiedUri=s}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let lt=class extends a.jG{constructor(e,t,i,o){super(),this._item=e,this._elements=(0,n.h)("div.gutterItem",{style:{height:"20px",width:"34px"}},[(0,n.h)("div.background@background",{},[]),(0,n.h)("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,(e=>e.showAlways)),this._menuId=this._item.map(this,(e=>e.menuId)),this._isSmall=(0,l.FY)(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const s=this._register(o.createInstance(tt.fO,"element",!0,{position:{hoverPosition:1}}));this._register((0,C.rX)(t,this._elements.root)),this._register((0,l.fm)((e=>{const t=this._showAlways.read(e);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",t),setTimeout((()=>{this._elements.root.classList.toggle("noTransition",!1)}),0)}))),this._register((0,l.yC)(((e,t)=>{this._elements.buttons.replaceChildren();const n=t.add(o.createInstance(Xe.m,this._elements.buttons,this._menuId.read(e),{orientation:1,hoverDelegate:s,toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(e)?1:3},hiddenItemStrategy:0,actionRunner:new Ge.I((()=>{const e=this._item.get(),t=e.mapping;return{mapping:t,originalWithModifiedChanges:i.computeStagedValue(t),originalUri:e.originalUri,modifiedUri:e.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));t.add(n.onDidChangeMenuItems((()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)})))})))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let i=this._elements.buttons.clientHeight;this._isSmall.set(1===this._item.get().mapping.original.startLineNumber&&e.length<30,void 0),i=this._elements.buttons.clientHeight;const n=e.length/2-i/2,o=i;let s=e.start+n;const r=x.L.tryCreate(o,t.endExclusive-o-i),a=x.L.tryCreate(e.start+o,e.endExclusive-i-o);a&&r&&a.start=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_t=function(e,t){return function(i,n){t(i,n,e)}};let vt=class extends a.jG{static{ct=this}static{this.ONE_OVERVIEW_WIDTH=15}static{this.ENTIRE_DIFF_OVERVIEW_WIDTH=2*this.ONE_OVERVIEW_WIDTH}constructor(e,t,i,o,s,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=o,this._rootHeight=s,this._modifiedEditorLayoutInfo=r,this._themeService=a,this.width=ct.ENTIRE_DIFF_OVERVIEW_WIDTH;const c=(0,l.y0)(this._themeService.onDidColorThemeChange,(()=>this._themeService.getColorTheme())),d=(0,l.un)((e=>{const t=c.read(e),i=t.getColor(pt.ld8)||(t.getColor(pt.Gj6)||pt.EY1).transparent(2),n=t.getColor(pt.$BZ)||(t.getColor(pt.GNm)||pt.ZEf).transparent(2);return{insertColor:i,removeColor:n}})),u=(0,ut.Z)(document.createElement("div"));u.setClassName("diffViewport"),u.setPosition("absolute");const h=(0,n.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:ct.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register((0,C.rX)(h,u.domNode)),this._register((0,n.b2)(h,n.Bx.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),this._register((0,n.ko)(h,n.Bx.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),this._register((0,C.rX)(this._rootElement,h)),this._register((0,l.yC)(((e,t)=>{const i=this._diffModel.read(e),n=this._editors.original.createOverviewRuler("original diffOverviewRuler");n&&(t.add(n),t.add((0,C.rX)(h,n.getDomNode())));const o=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(o&&(t.add(o),t.add((0,C.rX)(h,o.getDomNode()))),!n||!o)return;const s=(0,l.yQ)("viewZoneChanged",this._editors.original.onDidChangeViewZones),r=(0,l.yQ)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),a=(0,l.yQ)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),c=(0,l.yQ)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add((0,l.fm)((e=>{s.read(e),r.read(e),a.read(e),c.read(e);const t=d.read(e),l=i?.diff.read(e)?.mappings;function u(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new E.y(e.startLineNumber,1)),o=n.coordinatesConverter.convertModelPositionToViewPosition(new E.y(e.endLineNumberExclusive,1)),s=o.lineNumber-i.lineNumber;return new gt.iE(i.lineNumber,o.lineNumber,s,t.toString())})):[]}const h=u((l||[]).map((e=>e.lineRangeMapping.original)),t.removeColor,this._editors.original),g=u((l||[]).map((e=>e.lineRangeMapping.modified)),t.insertColor,this._editors.modified);n?.setZones(h),o?.setZones(g)}))),t.add((0,l.fm)((e=>{const t=this._rootHeight.read(e),i=this._rootWidth.read(e),s=this._modifiedEditorLayoutInfo.read(e);if(s){const i=ct.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ct.ONE_OVERVIEW_WIDTH;n.setLayout({top:0,height:t,right:i+ct.ONE_OVERVIEW_WIDTH,width:ct.ONE_OVERVIEW_WIDTH}),o.setLayout({top:0,height:t,right:0,width:ct.ONE_OVERVIEW_WIDTH});const r=this._editors.modifiedScrollTop.read(e),a=this._editors.modifiedScrollHeight.read(e),l=this._editors.modified.getOption(104),c=new ht.m(l.verticalHasArrows?l.arrowSize:0,l.verticalScrollbarSize,0,s.height,a,r);u.setTop(c.getSliderPosition()),u.setHeight(c.getSliderSize())}else u.setTop(0),u.setHeight(0);h.style.height=t+"px",h.style.left=i-ct.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",u.setWidth(ct.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))}};vt=ct=mt([_t(6,ft.Gy)],vt);var bt=i(84653),yt=i(9322);const wt=[];class Ct extends a.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return wt;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return wt;const o=new k.S(n.map((e=>k.M.fromRangeInclusive(e)))),s=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&o.intersects(e.lineRangeMapping.modified))),r=s.map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>L.Q.areIntersecting(e.modifiedRange,t)))))})));return 0===r.length||r.every((e=>0===e.rangeMappings.length))?wt:r})),this._register((0,l.yC)(((e,t)=>{if(!this._options.shouldRenderOldRevertArrows.read(e))return;const i=this._diffModel.read(e),n=i?.diff.read(e);if(!i||!n)return;if(i.movedTextToCompare.read(e))return;const o=[],s=this._selectedDiffs.read(e),r=new Set(s.map((e=>e.mapping)));if(s.length>0){const i=this._editors.modifiedSelections.read(e),n=t.add(new St(i[i.length-1].positionLineNumber,this._widget,s.flatMap((e=>e.rangeMappings)),!0));this._editors.modified.addGlyphMarginWidget(n),o.push(n)}for(const a of n.mappings)if(!r.has(a)&&!a.lineRangeMapping.modified.isEmpty&&a.lineRangeMapping.innerChanges){const e=t.add(new St(a.lineRangeMapping.modified.startLineNumber,this._widget,a.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(e),o.push(e)}t.add((0,a.s)((()=>{for(const e of o)this._editors.modified.removeGlyphMarginWidget(e)})))})))}}class St extends a.jG{static{this.counter=0}getId(){return this._id}constructor(e,t,i,o){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=o,this._id="revertButton"+St.counter++,this._domNode=(0,n.h)("div.revertButton",{title:this._revertSelection?(0,A.kg)("revertSelectedChanges","Revert Selected Changes"):(0,A.kg)("revertChange","Revert Change")},[(0,bt.s)(b.W.arrowRight)]).root,this._register((0,n.ko)(this._domNode,n.Bx.MOUSE_DOWN,(e=>{2!==e.button&&(e.stopPropagation(),e.preventDefault())}))),this._register((0,n.ko)(this._domNode,n.Bx.MOUSE_UP,(e=>{e.stopPropagation(),e.preventDefault()}))),this._register((0,n.ko)(this._domNode,n.Bx.CLICK,(e=>{this._diffs instanceof T.WL?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),e.stopPropagation(),e.preventDefault()})))}getDomNode(){return this._domNode}getPosition(){return{lane:yt.ZS.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}var kt=i(5480),xt=i(69483),Et=i(57479),Lt=i(48836),Tt=i(44838),It=i(55745),Rt=i(13046),Dt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Nt=function(e,t){return function(i,n){t(i,n,e)}};let At=class extends a.jG{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,o,s,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._argCodeEditorWidgetOptions=n,this._createInnerEditor=o,this._instantiationService=s,this._keybindingService=a,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new r.vl),this.modifiedScrollTop=(0,l.y0)(this,this.modified.onDidScrollChange,(()=>this.modified.getScrollTop())),this.modifiedScrollHeight=(0,l.y0)(this,this.modified.onDidScrollChange,(()=>this.modified.getScrollHeight())),this.modifiedObs=(0,It.Ud)(this.modified),this.originalObs=(0,It.Ud)(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=(0,l.y0)(this,this.modified.onDidChangeCursorSelection,(()=>this.modified.getSelections()??[])),this.modifiedCursor=(0,l.C)({owner:this,equalsFn:E.y.equals},(e=>this.modifiedSelections.read(e)[0]?.getPosition()??new E.y(1,1))),this.originalCursor=(0,l.y0)(this,this.original.onDidChangeCursorPosition,(()=>this.original.getPosition()??new E.y(1,1))),this._argCodeEditorWidgetOptions=null,this._register((0,l.Y)({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const o=this._createInnerEditor(e,t,i,n);return this._register(o.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+vt.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),o}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=S.qB.revealHorizontalRightPadding.defaultValue+vt.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");const t=(0,A.kg)("diff-aria-navigation-tip"," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};At=Dt([Nt(5,P._Y),Nt(6,Rt.b)],At);class Ot extends a.jG{constructor(){super(...arguments),this._id=++Ot.idCounter,this._onDidDispose=this._register(new r.vl),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}var Pt=i(79741),Mt=i(20670),Ft=i(17300),Bt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Wt=function(e,t){return function(i,n){t(i,n,e)}};let Ht=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=(0,l.FY)(this,0),this._screenReaderMode=(0,l.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this.couldShowInlineViewBecauseOfSize=(0,l.un)(this,(e=>this._options.read(e).renderSideBySide&&this._diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=(0,l.un)(this,(e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=(0,l.un)(this,(e=>(!this.compactMode.read(e)||!this.shouldRenderInlineViewInSmartMode.read(e))&&(this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)&&!this._screenReaderMode.read(e))))),this.readOnly=(0,l.un)(this,(e=>this._options.read(e).readOnly)),this.shouldRenderOldRevertArrows=(0,l.un)(this,(e=>!!this._options.read(e).renderMarginRevertIcon&&(!!this.renderSideBySide.read(e)&&(!this.readOnly.read(e)&&!this.shouldRenderGutterMenu.read(e))))),this.shouldRenderGutterMenu=(0,l.un)(this,(e=>this._options.read(e).renderGutterMenu)),this.renderIndicators=(0,l.un)(this,(e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=(0,l.un)(this,(e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=(0,l.un)(this,(e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=(0,l.un)(this,(e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=(0,l.un)(this,(e=>this._options.read(e).maxComputationTime)),this.showMoves=(0,l.un)(this,(e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=(0,l.un)(this,(e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=(0,l.un)(this,(e=>this._options.read(e).diffWordWrap)),this.originalEditable=(0,l.un)(this,(e=>this._options.read(e).originalEditable)),this.diffCodeLens=(0,l.un)(this,(e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=(0,l.un)(this,(e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=(0,l.un)(this,(e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=(0,l.un)(this,(e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=(0,l.un)(this,(e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.compactMode=(0,l.un)(this,(e=>this._options.read(e).compactMode)),this.trueInlineDiffRenderingEnabled=(0,l.un)(this,(e=>this._options.read(e).experimental.useTrueInlineView)),this.useTrueInlineDiffRendering=(0,l.un)(this,(e=>!this.renderSideBySide.read(e)&&this.trueInlineDiffRenderingEnabled.read(e))),this.hideUnchangedRegions=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsMinimumLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.minimumLineCount)),this._model=(0,l.FY)(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,(e=>(0,Pt.t)(this,(t=>{const i=e?.diff.read(t);return i?Vt(i,this.trueInlineDiffRenderingEnabled.read(t)):void 0})))).flatten().map(this,(e=>!!e)),this.inlineViewHideOriginalLineNumbers=this.compactMode;const i={...e,...Ut(e,Mt.q)};this._options=(0,l.FY)(this,i)}updateOptions(e){const t=Ut(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};function Vt(e,t){return e.mappings.every((e=>jt(e.lineRangeMapping)||zt(e.lineRangeMapping)||t&&Fe(e.lineRangeMapping)))}function jt(e){return 0===e.original.length}function zt(e){return 0===e.modified.length}function Ut(e,t){return{enableSplitViewResizing:(0,S.zM)(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:(0,S.ls)(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,S.zM)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,S.zM)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,S.wA)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,S.wA)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,S.zM)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,S.zM)(e.renderIndicators,t.renderIndicators),originalEditable:(0,S.zM)(e.originalEditable,t.originalEditable),diffCodeLens:(0,S.zM)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,S.zM)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(0,S.O4)(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,S.O4)(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,S.zM)(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:(0,S.zM)(e.experimental?.showMoves,t.experimental.showMoves),showEmptyDecorations:(0,S.zM)(e.experimental?.showEmptyDecorations,t.experimental.showEmptyDecorations),useTrueInlineView:(0,S.zM)(e.experimental?.useTrueInlineView,t.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:(0,S.zM)(e.hideUnchangedRegions?.enabled??e.experimental?.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:(0,S.wA)(e.hideUnchangedRegions?.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,S.wA)(e.hideUnchangedRegions?.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,S.wA)(e.hideUnchangedRegions?.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,S.zM)(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,S.zM)(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,S.wA)(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,S.zM)(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited),renderGutterMenu:(0,S.zM)(e.renderGutterMenu,t.renderGutterMenu),compactMode:(0,S.zM)(e.compactMode,t.compactMode)}}Ht=Bt([Wt(1,Ft.j)],Ht);var $t=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},qt=function(e,t){return function(i,n){t(i,n,e)}};let Kt=class extends Ot{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,o,d,u,g,p){super(),this._domElement=e,this._parentContextKeyService=o,this._parentInstantiationService=d,this._accessibilitySignalService=g,this._editorProgressService=p,this.elements=(0,n.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,n.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register((0,l.X2)(this,void 0)),this._diffModel=(0,l.un)(this,(e=>this._diffModelSrc.read(e)?.object)),this.onDidChangeModel=r.Jh.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new Lt.a([et.fN,this._contextKeyService]))),this._boundarySashes=(0,l.FY)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,l.FY)(this,!1),this._accessibleDiffViewerVisible=(0,l.un)(this,(e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this._movedBlocksLinesPart=(0,l.FY)(this,void 0),this._layoutInfo=(0,l.un)(this,(e=>{const t=this._rootSizeObserver.width.read(e),i=this._rootSizeObserver.height.read(e);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=i+"px";const n=this._sash.read(e),o=this._gutter.read(e),s=o?.width.read(e)??0,r=this._overviewRulerPart.read(e)?.width??0;let a,l,c,d,u;const h=!!n;if(h){const i=n.sashLeft.read(e),o=this._movedBlocksLinesPart.read(e)?.width.read(e)??0;a=0,l=i-s-o,u=i-s,c=i,d=t-c-r}else{u=0;const i=this._options.inlineViewHideOriginalLineNumbers.read(e);a=s,l=i?0:Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(e)),c=s+l,d=t-c-r}return this.elements.original.style.left=a+"px",this.elements.original.style.width=l+"px",this._editors.original.layout({width:l,height:i},!0),o?.layout(u),this.elements.modified.style.left=c+"px",this.elements.modified.style.width=d+"px",this._editors.modified.layout({width:d,height:i},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>e?.diff.read(t))),this.onDidUpdateDiff=r.Jh.fromObservableLight(this._diffValue),u.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,a.s)((()=>this.elements.root.remove()))),this._rootSizeObserver=this._register(new C.pN(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(Ht,t),this._register((0,l.fm)((e=>{this._options.setWidth(this._rootSizeObserver.width.read(e))}))),this._contextKeyService.createKey(Et.R.isEmbeddedDiffEditor.key,!1),this._register((0,kt.w)(Et.R.isEmbeddedDiffEditor,this._contextKeyService,(e=>this._options.isInEmbeddedEditor.read(e)))),this._register((0,kt.w)(Et.R.comparingMovedCode,this._contextKeyService,(e=>!!this._diffModel.read(e)?.movedTextToCompare.read(e)))),this._register((0,kt.w)(Et.R.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,(e=>this._options.couldShowInlineViewBecauseOfSize.read(e)))),this._register((0,kt.w)(Et.R.diffEditorInlineMode,this._contextKeyService,(e=>!this._options.renderSideBySide.read(e)))),this._register((0,kt.w)(Et.R.hasChanges,this._contextKeyService,(e=>(this._diffModel.read(e)?.diff.read(e)?.mappings.length??0)>0))),this._editors=this._register(this._instantiationService.createInstance(At,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._register((0,kt.w)(Et.R.diffEditorOriginalWritable,this._contextKeyService,(e=>this._options.originalEditable.read(e)))),this._register((0,kt.w)(Et.R.diffEditorModifiedWritable,this._contextKeyService,(e=>!this._options.readOnly.read(e)))),this._register((0,kt.w)(Et.R.diffEditorOriginalUri,this._contextKeyService,(e=>this._diffModel.read(e)?.model.original.uri.toString()??""))),this._register((0,kt.w)(Et.R.diffEditorModifiedUri,this._contextKeyService,(e=>this._diffModel.read(e)?.model.modified.uri.toString()??""))),this._overviewRulerPart=(0,c.a0)(this,(e=>this._options.renderOverviewRuler.read(e)?this._instantiationService.createInstance((0,se.b)(vt,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor))):void 0)).recomputeInitiallyAndOnChange(this._store);const f={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>e-(this._overviewRulerPart.read(t)?.width??0)))};this._sashLayout=new Ue(this._options,f),this._sash=(0,c.a0)(this,(e=>{const t=this._options.renderSideBySide.read(e);return this.elements.root.classList.toggle("side-by-side",t),t?new $e(this.elements.root,f,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,(()=>this._sashLayout.resetSash())):void 0})).recomputeInitiallyAndOnChange(this._store);const m=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(dt.N,e),this._editors,this._diffModel,this._options))).recomputeInitiallyAndOnChange(this._store);(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(je,e),this._editors,this._diffModel,this._options,this))).recomputeInitiallyAndOnChange(this._store);const _=new Set,v=new Set;let b=!1;const y=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(Oe,e),(0,n.zk)(this._domElement),this._editors,this._diffModel,this._options,this,(()=>b||m.get().isUpdatingHiddenAreas),_,v))).recomputeInitiallyAndOnChange(this._store),w=(0,l.un)(this,(e=>{const t=y.read(e).viewZones.read(e).orig,i=m.read(e).viewZones.read(e).origViewZones;return t.concat(i)})),S=(0,l.un)(this,(e=>{const t=y.read(e).viewZones.read(e).mod,i=m.read(e).viewZones.read(e).modViewZones;return t.concat(i)}));let k;this._register((0,C.Vs)(this._editors.original,w,(e=>{b=e}),_)),this._register((0,C.Vs)(this._editors.modified,S,(e=>{b=e,b?k=h.D.capture(this._editors.modified):(k?.restore(this._editors.modified),k=void 0)}),v)),this._accessibleDiffViewer=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(j,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>e?.diff.read(t)?.mappings.map((e=>e.lineRangeMapping)))),new J(this._editors)))).recomputeInitiallyAndOnChange(this._store);const x=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register((0,C.AV)(this.elements.modified,{visibility:x})),this._register((0,C.AV)(this.elements.original,{visibility:x})),this._createDiffEditorContributions(),u.addDiffEditor(this),this._gutter=(0,c.a0)(this,(e=>this._options.shouldRenderGutterMenu.read(e)?this._instantiationService.createInstance((0,se.b)(rt,e),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0)),this._register((0,l.OI)(this._layoutInfo)),(0,c.a0)(this,(e=>new((0,se.b)(We,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors))).recomputeInitiallyAndOnChange(this._store,(e=>{this._movedBlocksLinesPart.set(e,void 0)})),this._register(r.Jh.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!0)))),this._register(r.Jh.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!1))));const E=this._diffModel.map(this,((e,t)=>{if(e)return void 0===e.diff.read(t)&&!e.isDiffUpToDate.read(t)}));this._register((0,l.yC)(((e,t)=>{if(!0===E.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add((0,a.s)((()=>e.done())))}}))),this._register((0,l.yC)(((e,t)=>{t.add(new((0,se.b)(Ct,e))(this._editors,this._diffModel,this._options,this))}))),this._register((0,l.yC)(((e,t)=>{const i=this._diffModel.read(e);if(i)for(const n of[i.model.original,i.model.modified])t.add(n.onWillDispose((e=>{(0,s.dz)(new s.D7("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)})))}))),this._register((0,l.fm)((e=>{this._options.setModel(this._diffModel.read(e))})))}_createInnerEditor(e,t,i,n){const o=e.createInstance(g.x,t,i,n);return o}_createDiffEditorContributions(){const e=d.dS.getDiffEditorContributions();for(const i of e)try{this._register(this._instantiationService.createInstance(i.ctor,this))}catch(t){(0,s.dz)(t)}}get _targetEditor(){return this._editors.modified}getEditorType(){return xt._.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){const e=this._editors.original.saveViewState(),t=this._editors.modified.saveViewState();return{original:e,modified:t,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._editors.original.restoreViewState(t.original),this._editors.modified.restoreViewState(t.modified),t.modelState&&this._diffModel.get()?.restoreSerializedState(t.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(ge,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){const t=e?"model"in e?C.O8.create(e).createNewRef(this):C.O8.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){const i=this._diffModel.get();!e&&i&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&(0,l.PO)(t,(t=>{const i=e?.object;l.y0.batchEventsGlobally(t,(()=>{this._editors.original.setModel(i?i.model.original:null),this._editors.modified.setModel(i?i.model.modified:null)}));const n=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),t),setTimeout((()=>{n?.dispose()}),0)}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){const e=this._diffModel.get()?.diff.get();return e?Gt(e):null}revert(e){const t=this._diffModel.get();t&&t.isDiffUpToDate.get()&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map((e=>({range:e.modifiedRange,text:t.model.original.getValueInRange(e.originalRange)})));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new E.y(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){const t=this._diffModel.get()?.diff.get()?.mappings;if(!t||0===t.length)return;const i=this._editors.modified.getPosition().lineNumber;let n;n="next"===e?t.find((e=>e.lineRangeMapping.modified.startLineNumber>i))??t[0]:(0,o.Uk)(t,(e=>e.lineRangeMapping.modified.startLineNumber{const t=e.diff.get()?.mappings;t&&0!==t.length&&this._goTo(t[0])}))}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){const e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,i=e?this._editors.original:this._editors.modified;let n;const o=t.getSelection();if(o){const t=this._diffModel.get()?.diff.get()?.mappings.map((t=>e?t.lineRangeMapping.flip():t.lineRangeMapping));if(t){const e=(0,C.Mu)(o.getStartPosition(),t),i=(0,C.Mu)(o.getEndPosition(),t);n=L.Q.plusRange(e,i)}}return{destination:i,destinationSelection:n}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&(0,l.Rn)((t=>{for(const i of e)i.collapseAll(t)}))}showAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&(0,l.Rn)((t=>{for(const i of e)i.showAll(t)}))}_handleCursorPositionChange(e,t){if(3===e?.reason){const i=this._diffModel.get()?.diff.get()?.mappings.find((i=>t?i.lineRangeMapping.modified.contains(e.position.lineNumber):i.lineRangeMapping.original.contains(e.position.lineNumber)));i?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(O.Rh.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):i?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(O.Rh.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):i&&this._accessibilitySignalService.playSignal(O.Rh.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};function Gt(e){return e.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,o,s,r=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,r=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(o=t.modified.startLineNumber-1,s=0,r=void 0):(o=t.modified.startLineNumber,s=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:o,modifiedEndLineNumber:s,charChanges:r?.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}}))}Kt=$t([qt(3,et.fN),qt(4,P._Y),qt(5,u.T),qt(6,O.Nt),qt(7,Tt.N8)],Kt)},41843:(e,t,i)=>{"use strict";i.d(t,{Hg:()=>p});var n,o=i(59857),s=i(87778),r=i(40231),a=i(84240),l=i(44544),c=i(93866),d=i(4117),u=i(11086),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};const p=(0,s.u1)("diffProviderFactoryService");let f=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(m,e)}};f=h([g(0,s._Y)],f),(0,o.v)(p,f,1);let m=class{static{n=this}static{this.diffCache=new Map}constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new r.vl,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,i,o){if("string"!==typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,o);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new c.wm(new l.M(1,2),new l.M(1,t.getLineCount()+1),[new c.q6(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const s=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),d=n.diffCache.get(s);if(d&&d.context===r)return d.result;const u=a.W.create(),h=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),g=u.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:g,timedOut:h?.quitEarly??!0,detectedMoves:i.computeMoves?h?.moves.length??0:-1}),o.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!h)throw new Error("no diff result available");return n.diffCache.size>10&&n.diffCache.delete(n.diffCache.keys().next().value),n.diffCache.set(s,{result:h,context:r}),h}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!==typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),t=!0),t&&this.onDidChangeEventEmitter.fire()}};m=n=h([g(1,d.IEditorWorkerService),g(2,u.k)],m)},39352:(e,t,i)=>{"use strict";i.d(t,{N:()=>S});var n,o=i(2150),s=i(84653),r=i(25923),a=i(42325),l=i(5091),c=i(39751),d=i(42389),u=i(23740),h=i(50322),g=i(55745),p=i(78787),f=i(44544),m=i(36788),_=i(8690),v=i(35350),b=i(41337),y=i(87778),w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};let S=class extends l.jG{static{n=this}static{this._breadcrumbsSourceFactory=(0,c.FY)(n,(()=>({dispose(){},getBreadcrumbItems(e,t){return[]}})))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,o){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=o,this._modifiedOutlineSource=(0,d.a0)(this,(e=>{const t=this._editors.modifiedModel.read(e),i=n._breadcrumbsSourceFactory.read(e);return t&&i?i(t,this._instantiationService):void 0})),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();(0,c.Rn)((e=>{for(const i of this._editors.original.getSelections()||[])t?.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,0,e)}))}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();(0,c.Rn)((e=>{for(const i of this._editors.modified.getSelections()||[])t?.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,0,e)}))})));const s=this._diffModel.map(((e,t)=>{const i=e?.unchangedRegions.read(t)??[];return 1===i.length&&1===i[0].modifiedLineNumber&&i[0].lineCount===this._editors.modifiedModel.read(t)?.getLineCount()?[]:i}));this.viewZones=(0,c.rm)(this,((e,t)=>{const i=this._modifiedOutlineSource.read(e);if(!i)return{origViewZones:[],modViewZones:[]};const n=[],o=[],r=this._options.renderSideBySide.read(e),a=this._options.compactMode.read(e),l=s.read(e);for(let s=0;sd.getHiddenOriginalRange(e).startLineNumber-1)),i=new p.D1(e,12);n.push(i),t.add(new k(this._editors.original,i,d,!r))}{const e=(0,c.un)(this,(e=>d.getHiddenModifiedRange(e).startLineNumber-1)),i=new p.D1(e,12);o.push(i),t.add(new k(this._editors.modified,i,d))}}else{{const e=(0,c.un)(this,(e=>d.getHiddenOriginalRange(e).startLineNumber-1)),o=new p.D1(e,24);n.push(o),t.add(new x(this._editors.original,o,d,d.originalUnchangedRange,!r,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}{const e=(0,c.un)(this,(e=>d.getHiddenModifiedRange(e).startLineNumber-1)),n=new p.D1(e,24);o.push(n),t.add(new x(this._editors.modified,n,d,d.modifiedUnchangedRange,!1,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}}}return{origViewZones:n,modViewZones:o}}));const l={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},g={description:"Fold Unchanged",glyphMarginHoverMessage:new a.Bc(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,b.kg)("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+u.L.asClassName(r.W.fold),zIndex:10001};this._register((0,p.pY)(this._editors.original,(0,c.un)(this,(e=>{const t=s.read(e),i=t.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:_.Q.fromPositions(new m.y(n.originalLineNumber,1)),options:g});return i})))),this._register((0,p.pY)(this._editors.modified,(0,c.un)(this,(e=>{const t=s.read(e),i=t.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:f.M.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:g});return i})))),this._register((0,c.fm)((e=>{const t=s.read(e);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(h.O9)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(h.O9))}finally{this._isUpdatingHiddenAreas=!1}}))),this._register(this._editors.modified.onMouseUp((e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};S=n=w([C(3,y._Y)],S);class k extends p.uN{constructor(e,t,i,n=!1){const s=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,s.root),this._unchangedRegion=i,this._hide=n,this._nodes=(0,o.h)("div.diff-hidden-lines-compact",[(0,o.h)("div.line-left",[]),(0,o.h)("div.text@text",[]),(0,o.h)("div.line-right",[])]),s.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register((0,c.fm)((e=>{if(!this._hide){const t=this._unchangedRegion.getHiddenModifiedRange(e).length,i=(0,b.kg)("hiddenLines","{0} hidden lines",t);this._nodes.text.innerText=i}})))}}class x extends p.uN{constructor(e,t,i,n,a,l,d,u){const h=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,h.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=a,this._modifiedOutlineSource=l,this._revealModifiedHiddenLine=d,this._options=u,this._nodes=(0,o.h)("div.diff-hidden-lines",[(0,o.h)("div.top@top",{title:(0,b.kg)("diff.hiddenLines.top","Click or drag to show more above")}),(0,o.h)("div.center@content",{style:{display:"flex"}},[(0,o.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,o.$)("a",{title:(0,b.kg)("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,s.n)("$(unfold)"))]),(0,o.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,o.h)("div.bottom@bottom",{title:(0,b.kg)("diff.bottom","Click or drag to show more below"),role:"button"})]),h.root.appendChild(this._nodes.root),this._hide?(0,o.Ln)(this._nodes.first):this._register((0,p.AV)(this._nodes.first,{width:(0,g.Ud)(this._editor).layoutInfoContentLeft})),this._register((0,c.fm)((e=>{const t=this._unchangedRegion.visibleLineCountTop.read(e)+this._unchangedRegion.visibleLineCountBottom.read(e)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!t),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),this._nodes.top.classList.toggle("canMoveBottom",!t);const i=this._unchangedRegion.isDragged.read(e),n=this._editor.getDomNode();n&&(n.classList.toggle("draggingUnchangedRegion",!!i),"top"===i?(n.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),n.classList.toggle("canMoveBottom",!t)):"bottom"===i?(n.classList.toggle("canMoveTop",!t),n.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0)):(n.classList.toggle("canMoveTop",!1),n.classList.toggle("canMoveBottom",!1)))})));const f=this._editor;this._register((0,o.ko)(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const s=(0,o.zk)(this._nodes.top),r=(0,o.ko)(s,"mousemove",(e=>{const o=e.clientY,s=o-t;i=i||Math.abs(s)>2;const r=Math.round(s/f.getOption(67)),a=Math.max(0,Math.min(n+r,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(a,void 0)})),a=(0,o.ko)(s,"mouseup",(e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),r.dispose(),a.dispose()}))}))),this._register((0,o.ko)(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const s=(0,o.zk)(this._nodes.bottom),r=(0,o.ko)(s,"mousemove",(e=>{const o=e.clientY,s=o-t;i=i||Math.abs(s)>2;const r=Math.round(s/f.getOption(67)),a=Math.max(0,Math.min(n-r,this._unchangedRegion.getMaxVisibleLineCountBottom())),l=this._unchangedRegionRange.endLineNumberExclusive>f.getModel().getLineCount()?f.getContentHeight():f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(a,void 0);const c=this._unchangedRegionRange.endLineNumberExclusive>f.getModel().getLineCount()?f.getContentHeight():f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);f.setScrollTop(f.getScrollTop()+(c-l))})),a=(0,o.ko)(s,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!i){const e=f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);f.setScrollTop(f.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),r.dispose(),a.dispose()}))}))),this._register((0,c.fm)((e=>{const t=[];if(!this._hide){const n=i.getHiddenModifiedRange(e).length,a=(0,b.kg)("hiddenLines","{0} hidden lines",n),l=(0,o.$)("span",{title:(0,b.kg)("diff.hiddenLines.expandAll","Double click to unfold")},a);l.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))})),t.push(l);const c=this._unchangedRegion.getHiddenModifiedRange(e),d=this._modifiedOutlineSource.getBreadcrumbItems(c,e);if(d.length>0){t.push((0,o.$)("span",void 0,"  |  "));for(let e=0;e{this._revealModifiedHiddenLine(i.startLineNumber)}}}}(0,o.Ln)(this._nodes.others,...t)})))}}},88402:(e,t,i)=>{"use strict";i.d(t,{GM:()=>_,KL:()=>b,Kl:()=>u,Ob:()=>h,Ou:()=>m,XT:()=>p,Zb:()=>v,Zw:()=>g,bk:()=>f,dv:()=>d,wp:()=>y});var n=i(25923),o=i(23740),s=i(35037),r=i(41337),a=i(66344),l=i(48401);(0,a.x1A)("diffEditor.move.border","#8b8b8b9c",(0,r.kg)("diffEditor.move.border","The border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.moveActive.border","#FFA500",(0,r.kg)("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},(0,r.kg)("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));const c=(0,l.pU)("diff-insert",n.W.add,(0,r.kg)("diffInsertIcon","Line decoration for inserts in the diff editor.")),d=(0,l.pU)("diff-remove",n.W.remove,(0,r.kg)("diffRemoveIcon","Line decoration for removals in the diff editor.")),u=s.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+o.L.asClassName(c),marginClassName:"gutter-insert"}),h=s.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+o.L.asClassName(d),marginClassName:"gutter-delete"}),g=s.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),p=s.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),f=s.kI.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),m=s.kI.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),_=s.kI.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),v=s.kI.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),b=s.kI.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),y=s.kI.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})},78787:(e,t,i)=>{"use strict";i.d(t,{$y:()=>p,AV:()=>w,Am:()=>u,D1:()=>b,EK:()=>E,MZ:()=>S,Mu:()=>k,Nu:()=>m,O8:()=>L,Vs:()=>C,pN:()=>f,pY:()=>h,rX:()=>g,uN:()=>v});var n=i(43654),o=i(67792),s=i(5091),r=i(39751),a=i(87550),l=i(36788),c=i(8690),d=i(33904);function u(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const o=[];let s=0,r=0;while(sd?(o.push(l),r++):(o.push(n(a,l)),s++,r++)}while(s`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function g(e,t){return e.appendChild(t),(0,s.s)((()=>{t.remove()}))}function p(e,t){return e.prepend(t),(0,s.s)((()=>{t.remove()}))}class f extends s.jG{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new a.u(e,t)),this._width=(0,r.FY)(this,this.elementSizeObserver.getWidth()),this._height=(0,r.FY)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>(0,r.Rn)((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function m(e,t,i){let n=t.get(),o=n,s=n;const a=(0,r.FY)("animatedValue",n);let l=-1;const c=300;let d;function u(){const t=Date.now()-l;s=Math.floor(_(t,o,n-o,c)),t({animate:!1}),handleChange:(e,i)=>(e.didChange(t)&&(i.animate=i.animate||e.change),!0)},((i,r)=>{void 0!==d&&(e.cancelAnimationFrame(d),d=void 0),o=s,n=t.read(i),l=Date.now()-(r.animate?0:c),u()}))),a}function _(e,t,i,n){return e===n?t+i:i*(1-Math.pow(2,-10*e/n))+t}class v extends s.jG{constructor(e,t,i){super(),this._register(new y(e,i)),this._register(w(i,{height:t.actualHeight,top:t.actualTop}))}}class b{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=(0,r.FY)(this,void 0),this._actualHeight=(0,r.FY)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class y{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+y._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function w(e,t){return(0,r.fm)((i=>{for(let[n,o]of Object.entries(t))o&&"object"===typeof o&&"read"in o&&(o=o.read(i)),"number"===typeof o&&(o=`${o}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=o}))}function C(e,t,i,n){const o=new s.Cm,a=[];return o.add((0,r.yC)(((o,s)=>{const l=t.read(o),c=new Map,d=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of a)e.removeZone(t),n?.delete(t);a.length=0;for(const t of l){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),a.push(i),n?.add(i),c.set(t,i)}})),i&&i(!1),s.add((0,r.Y)({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(e,t){const i=d.get(e.changedObservable);return void 0!==i&&t.zoneIds.push(i),!0}},((t,n)=>{for(const e of l)e.onChange&&(d.set(e.onChange,c.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n.zoneIds)e.layoutZone(t)})),i&&i(!1)})))}))),o.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of a)e.removeZone(t)})),n?.clear(),i&&i(!1)}}),o}class S extends o.Qi{dispose(){super.dispose(!0)}}function k(e,t){const i=(0,n.Uk)(t,(t=>t.original.startLineNumber<=e.lineNumber));if(!i)return c.Q.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){const t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return c.Q.fromPositions(new l.y(t,e.column))}if(!i.innerChanges)return c.Q.fromPositions(new l.y(i.modified.startLineNumber,1));const o=(0,n.Uk)(i.innerChanges,(t=>t.originalRange.getStartPosition().isBeforeOrEqual(e)));if(!o){const t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return c.Q.fromPositions(new l.y(t,e.column))}if(o.originalRange.containsPosition(e))return o.modifiedRange;{const t=x(o.originalRange.getEndPosition(),e);return c.Q.fromPositions(t.addToPosition(o.modifiedRange.getEndPosition()))}}function x(e,t){return e.lineNumber===t.lineNumber?new d.W(0,t.column-e.column):new d.W(t.lineNumber-e.lineNumber,t.column-1)}function E(e,t){let i;return e.filter((e=>{const n=t(e,i);return i=e,n}))}class L{static create(e,t=void 0){return new T(e,e,t)}static createWithDisposable(e,t,i=void 0){const n=new s.Cm;return n.add(t),n.add(e),new T(e,n,i)}}class T extends L{constructor(e,t,i){super(),this.object=e,this._disposable=t,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new I(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,0===this._refCount&&this._disposable.dispose(),e){const t=this._owners.indexOf(e);-1!==t&&this._owners.splice(t,1)}}}class I extends L{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}},36511:(e,t,i)=>{"use strict";i.d(t,{T:()=>m,i:()=>_});var n,o=i(44964),s=i(21776),r=i(14396),a=i(40231),l=i(5091),c=i(11320),d=i(14573),u=i(65764),h=i(82931),g=i(10170),p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f=function(e,t){return function(i,n){t(i,n,e)}};let m=class{static{n=this}static{this._ttpTokenizer=(0,s.H)("tokenizeToString",{createHTML(e){return e}})}constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new a.vl,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e){const e=document.createElement("span");return{element:e,dispose:()=>{}}}const n=new l.Cm,s=n.add((0,o.Gc)(e,{...this._getRenderOptions(e,n),...t},i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(e,t)=>{let i;e?i=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(i=this._options.editor.getModel()?.getLanguageId()),i||(i=u.vH);const o=await(0,h.Yj)(this._languageService,t,i),s=document.createElement("span");if(s.innerHTML=n._ttpTokenizer?.createHTML(o)??o,this._options.editor){const e=this._options.editor.getOption(50);(0,c.M)(s,e)}else this._options.codeBlockFontFamily&&(s.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(s.style.fontSize=this._options.codeBlockFontSize),s},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>_(this._openerService,t,e.isTrusted),disposables:t}}}};async function _(e,t,i){try{return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:v(i)})}catch(n){return(0,r.dz)(n),!1}}function v(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}m=n=p([f(1,d.L),f(2,g.C)],m)},24878:(e,t,i)=>{"use strict";i.d(t,{I:()=>o});var n=i(55664);class o extends n.LN{constructor(e){super(),this._getContext=e}runAction(e,t){const i=this._getContext();return super.runAction(e,i)}}},50793:(e,t,i)=>{"use strict";i.d(t,{iP:()=>a,iu:()=>o,q2:()=>r,tA:()=>s,ui:()=>l});var n=i(98581);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),o=i[0].range;return n.L.fromPositions(o.getEndPosition())}}class s{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),o=i[0].range;return n.L.fromRange(o,0)}}class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),o=i[0].range;return n.L.fromPositions(o.getStartPosition())}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),o=i[0].range;return n.L.fromPositions(o.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},27461:(e,t,i)=>{"use strict";i.d(t,{Y:()=>p});var n,o=i(20601),s=i(32142),r=i(8690),a=i(98581),l=i(41411),c=i(50395),d=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},u=function(e,t){return function(i,n){t(i,n,e)}};const h=Object.create(null);function g(e,t){if(t<=0)return"";h[e]||(h[e]=["",e]);const i=h[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let p=n=class{static unshiftIndent(e,t,i,n,o){const r=s.A.visibleColumnFromColumn(e,t,i);if(o){const e=g(" ",n),t=s.A.prevIndentTabStop(r,n),i=t/n;return g(e,i)}{const e="\t",t=s.A.prevRenderTabStop(r,i),n=t/i;return g(e,n)}}static shiftIndent(e,t,i,n,o){const r=s.A.visibleColumnFromColumn(e,t,i);if(o){const e=g(" ",n),t=s.A.nextIndentTabStop(r,n),i=t/n;return g(e,i)}{const e="\t",t=s.A.nextRenderTabStop(r,i),n=t/i;return g(e,n)}}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let a=this._selection.endLineNumber;1===this._selection.endColumn&&i!==a&&(a-=1);const{tabSize:c,indentSize:d,insertSpaces:u}=this._opts,h=i===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let g=0,p=0;for(let f=i;f<=a;f++,g=p){p=0;const a=e.getLineContent(f);let m,_=o.HG(a);if((!this._opts.isUnshift||0!==a.length&&0!==_)&&(h||this._opts.isUnshift||0!==a.length)){if(-1===_&&(_=a.length),f>1){const t=s.A.visibleColumnFromColumn(a,_+1,c);if(t%d!==0&&e.tokenization.isCheapToTokenize(f-1)){const t=(0,l.h)(this._opts.autoIndent,e,new r.Q(f-1,e.getLineMaxColumn(f-1),f-1,e.getLineMaxColumn(f-1)),this._languageConfigurationService);if(t){if(p=g,t.appendText)for(let e=0,i=t.appendText.length;e{"use strict";i.d(t,{i:()=>s,y:()=>r});var n=i(8690),o=i(98581);class s{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new n.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,s=i[1].range;return new o.L(n.endLineNumber,n.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}}class r{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range;return new o.L(n.endLineNumber,n.startColumn,n.endLineNumber,n.endColumn-this._charAfter.length)}}},20670:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});const n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}},97744:(e,t,i)=>{"use strict";i.d(t,{Gn:()=>f,JJ:()=>c,vf:()=>p});var n=i(20670),o=i(35011),s=i(99989),r=i(41337),a=i(27503),l=i(16374);const c=Object.freeze({id:"editor",order:5,type:"object",title:r.kg("editorConfigurationTitle","Editor"),scope:5}),d={...c,properties:{"editor.tabSize":{type:"number",default:s.R.tabSize,minimum:1,markdownDescription:r.kg("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:r.kg("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:s.R.insertSpaces,markdownDescription:r.kg("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:s.R.detectIndentation,markdownDescription:r.kg("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:s.R.trimAutoWhitespace,description:r.kg("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:s.R.largeFileOptimizations,description:r.kg("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[r.kg("wordBasedSuggestions.off","Turn off Word Based Suggestions."),r.kg("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),r.kg("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),r.kg("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:r.kg("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[r.kg("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),r.kg("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),r.kg("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:r.kg("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r.kg("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r.kg("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:r.kg("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:r.kg("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:r.kg("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:r.kg("editor.experimental.treeSitterTelemetry","Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `editor.experimental.preferTreeSitter` for specific languages will take precedence."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:r.kg("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:r.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:r.kg("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:r.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:n.q.maxComputationTime,description:r.kg("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:n.q.maxFileSize,description:r.kg("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:n.q.renderSideBySide,description:r.kg("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:n.q.renderSideBySideInlineBreakpoint,description:r.kg("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:n.q.useInlineViewWhenSpaceIsLimited,description:r.kg("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:n.q.renderMarginRevertIcon,description:r.kg("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:n.q.renderGutterMenu,description:r.kg("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:n.q.ignoreTrimWhitespace,description:r.kg("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:n.q.renderIndicators,description:r.kg("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:n.q.diffCodeLens,description:r.kg("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:n.q.diffWordWrap,markdownEnumDescriptions:[r.kg("wordWrap.off","Lines will never wrap."),r.kg("wordWrap.on","Lines will wrap at the viewport width."),r.kg("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:n.q.diffAlgorithm,markdownEnumDescriptions:[r.kg("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),r.kg("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:n.q.hideUnchangedRegions.enabled,markdownDescription:r.kg("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:n.q.hideUnchangedRegions.revealLineCount,markdownDescription:r.kg("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:n.q.hideUnchangedRegions.minimumLineCount,markdownDescription:r.kg("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:n.q.hideUnchangedRegions.contextLineCount,markdownDescription:r.kg("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:n.q.experimental.showMoves,markdownDescription:r.kg("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:n.q.experimental.showEmptyDecorations,description:r.kg("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:n.q.experimental.useTrueInlineView,description:r.kg("useTrueInlineView","If enabled and the editor uses the inline view, word changes are rendered inline.")}}};function u(e){return"undefined"!==typeof e.type||"undefined"!==typeof e.anyOf}for(const _ of o.BE){const e=_.schema;if("undefined"!==typeof e)if(u(e))d.properties[`editor.${_.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(d.properties[t]=e[t])}let h=null;function g(){return null===h&&(h=Object.create(null),Object.keys(d.properties).forEach((e=>{h[e]=!0}))),h}function p(e){const t=g();return t[`editor.${e}`]||!1}function f(e){const t=g();return t[`diffEditor.${e}`]||!1}const m=l.O.as(a.Fd.Configuration);m.registerConfiguration(d)},35011:(e,t,i)=>{"use strict";i.d(t,{$C:()=>se,BE:()=>Ie,Bc:()=>F,O4:()=>k,Of:()=>ue,XR:()=>de,hZ:()=>g,jT:()=>N,jU:()=>Te,ls:()=>w,lw:()=>d,m9:()=>D,n0:()=>u,qB:()=>De,r_:()=>B,wA:()=>b,xZ:()=>U,xq:()=>c,zM:()=>_});var n=i(85053),o=i(85603),s=i(25160),r=i(99989),a=i(60939),l=i(41337);const c=8;class d{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class u{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class h{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}compute(e,t,i){return i}}class g{constructor(e,t){this.newValue=e,this.didChange=t}}function p(e,t){if("object"!==typeof e||"object"!==typeof t||!e||!t)return new g(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&n.aI(e,t);return new g(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=p(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new g(e,i)}class f{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return p(e,t)}validate(e){return this.defaultValue}}class m{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}validate(e){return"undefined"===typeof e?this.defaultValue:e}compute(e,t,i){return i}}function _(e,t){return"undefined"===typeof e?t:"false"!==e&&Boolean(e)}class v extends m{constructor(e,t,i,n=void 0){"undefined"!==typeof n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _(e,this.defaultValue)}}function b(e,t,i,n){if("undefined"===typeof e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}class y extends m{static clampedInt(e,t,i,n){return b(e,t,i,n)}constructor(e,t,i,n,o,s=void 0){"undefined"!==typeof s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}validate(e){return y.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function w(e,t,i,n){if("undefined"===typeof e)return t;const o=C.float(e,t);return C.clamp(o,i,n)}class C extends m{static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"===typeof e)return e;if("undefined"===typeof e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,o){"undefined"!==typeof o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}validate(e){return this.validationFn(C.float(e,this.defaultValue))}}class S extends m{static string(e,t){return"string"!==typeof e?t:e}constructor(e,t,i,n=void 0){"undefined"!==typeof n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return S.string(e,this.defaultValue)}}function k(e,t,i,n){return"string"!==typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class x extends m{constructor(e,t,i,n,o=void 0){"undefined"!==typeof o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return k(e,this.defaultValue,this._allowedValues)}}class E extends h{constructor(e,t,i,n,o,s,r=void 0){"undefined"!==typeof r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!==typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}function L(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class T extends h{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[l.kg("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),l.kg("accessibilitySupport.on","Optimize for usage with a Screen Reader."),l.kg("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:l.kg("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}class I extends h{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:l.kg("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:l.kg("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertSpace:_(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function R(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var D,N;function A(e){switch(e){case"line":return D.Line;case"block":return D.Block;case"underline":return D.Underline;case"line-thin":return D.LineThin;case"block-outline":return D.BlockOutline;case"underline-thin":return D.UnderlineThin}}(function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"})(D||(D={}));class O extends f{constructor(){super(143)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(74)?n.push("mouse-default"):"copy"===t.get(74)&&n.push("mouse-copy"),t.get(112)&&n.push("showUnused"),t.get(141)&&n.push("showDeprecated"),n.join(" ")}}class P extends v{constructor(){super(37,"emptySelectionClipboard",!0,{description:l.kg("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class M extends h{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:l.kg("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[l.kg("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),l.kg("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),l.kg("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:l.kg("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[l.kg("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),l.kg("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),l.kg("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:l.kg("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:l.kg("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:s.zx},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:l.kg("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:l.kg("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"===typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":k(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"===typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":k(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_(t.loop,this.defaultValue.loop)}}}class F extends h{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(51,"fontLigatures",F.OFF,{anyOf:[{type:"boolean",description:l.kg("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:l.kg("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:l.kg("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e||0===e.length?F.OFF:"true"===e?F.ON:e:Boolean(e)?F.ON:F.OFF}}class B extends h{static{this.OFF="normal"}static{this.TRANSLATE="translate"}constructor(){super(54,"fontVariations",B.OFF,{anyOf:[{type:"boolean",description:l.kg("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:l.kg("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:l.kg("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e?B.OFF:"true"===e?B.TRANSLATE:e:Boolean(e)?B.TRANSLATE:B.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}class W extends f{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}class H extends m{constructor(){super(52,"fontSize",Te.fontSize,{type:"number",minimum:6,maximum:100,default:Te.fontSize,description:l.kg("fontSize","Controls the font size in pixels.")})}validate(e){const t=C.float(e,this.defaultValue);return 0===t?Te.fontSize:C.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class V extends h{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(53,"fontWeight",Te.fontWeight,{anyOf:[{type:"number",minimum:V.MINIMUM_VALUE,maximum:V.MAXIMUM_VALUE,errorMessage:l.kg("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:V.SUGGESTION_VALUES}],default:Te.fontWeight,description:l.kg("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(y.clampedInt(e,Te.fontWeight,V.MINIMUM_VALUE,V.MAXIMUM_VALUE))}}class j extends h{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[l.kg("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),l.kg("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),l.kg("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:l.kg("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:l.kg("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:l.kg("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:l.kg("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:l.kg("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:l.kg("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:l.kg("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:l.kg("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:l.kg("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:l.kg("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:l.kg("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{multiple:k(t.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:t.multipleDefinitions??k(t.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:t.multipleTypeDefinitions??k(t.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:t.multipleDeclarations??k(t.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:t.multipleImplementations??k(t.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:t.multipleReferences??k(t.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:t.multipleTests??k(t.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:S.string(t.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:S.string(t.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:S.string(t.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:S.string(t.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:S.string(t.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:S.string(t.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}}class z extends h{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:l.kg("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:l.kg("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:l.kg("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:l.kg("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:l.kg("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),delay:y.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_(t.sticky,this.defaultValue.sticky),hidingDelay:y.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:_(t.above,this.defaultValue.above)}}}class U extends f{constructor(){super(146)}compute(e,t,i){return U.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const o=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/o);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:o,minimapLineCount:s}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const s=t.stableMinimapLayoutInput,r=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let h=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,f=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,y=u?2:3;let w=Math.floor(o*n);const C=w/o;let S=!1,k=!1,x=y*h,E=h/o,L=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:s,extraLinesBeyondLastLine:l,desiredRatio:c,minimapLineCount:u}=U.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:o}),g=_/u;if(g>1)S=!0,k=!0,h=1,x=1,E=h/o;else{let n=!1,d=h+1;if("fit"===p){const e=Math.ceil((s+_+l)*x);b&&r&&v<=t.stableFitRemainingWidth?(n=!0,d=t.stableFitMaxMinimapScale):n=e>w}if("fill"===p||n){S=!0;const n=h;x=Math.min(a*o,Math.max(1,Math.floor(1/c))),b&&r&&v<=t.stableFitRemainingWidth&&(d=t.stableFitMaxMinimapScale),h=Math.min(d,Math.max(1,Math.floor(x/y))),h>n&&(L=Math.min(2,h/n)),E=h/o/L,w=Math.ceil(Math.max(i,s+_+l)*x),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const T=Math.floor(g*E),I=Math.min(T,Math.max(0,Math.floor((v-m-2)*E/(l+E)))+c);let R=Math.floor(o*I);const D=R/o;R=Math.floor(R*L);const N=u?1:2,A="left"===f?0:i-I-m;return{renderMinimap:N,minimapLeft:A,minimapWidth:I,minimapHeightIsEditorHeight:S,minimapIsSampling:k,minimapScale:h,minimapLineHeight:x,minimapCanvasInnerWidth:R,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:D,minimapCanvasOuterHeight:C}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(138),h="inherit"===d?e.get(137):d,g="inherit"===h?e.get(133):h,p=e.get(136),f=t.isDominatedByLongLines,m=e.get(57),_=0!==e.get(68).renderType,v=e.get(69),b=e.get(106),y=e.get(84),w=e.get(73),C=e.get(104),S=C.verticalScrollbarSize,k=C.verticalHasArrows,x=C.arrowSize,E=C.horizontalScrollbarSize,L=e.get(43),T="never"!==e.get(111);let I=e.get(66);L&&T&&(I+=16);let R=0;if(_){const e=Math.max(s,v);R=Math.round(e*a)}let D=0;m&&(D=o*t.glyphMarginDecorationLaneCount);let N=0,A=N+D,O=A+R,P=O+I;const M=i-D-R-I;let F=!1,B=!1,W=-1;"inherit"===h&&f?(F=!0,B=!0):"on"===g||"bounded"===g?B=!0:"wordWrapColumn"===g&&(W=p);const H=U._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,paddingTop:y.top,paddingBottom:y.bottom,minimap:w,verticalScrollbarWidth:S,viewLineCount:c,remainingWidth:M,isViewportWrapping:B},t.memory||new u);0!==H.renderMinimap&&0===H.minimapLeft&&(N+=H.minimapWidth,A+=H.minimapWidth,O+=H.minimapWidth,P+=H.minimapWidth);const V=M-H.minimapWidth,j=Math.max(1,Math.floor((V-S-2)/r)),z=k?x:0;return B&&(W=Math.max(1,j),"bounded"===g&&(W=Math.min(W,p))),{width:i,height:n,glyphMarginLeft:N,glyphMarginWidth:D,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:A,lineNumbersWidth:R,decorationsLeft:O,decorationsWidth:I,contentLeft:P,contentWidth:V,minimap:H,viewportColumn:j,isWordWrapMinified:F,isViewportWrapping:B,wrappingColumn:W,verticalScrollbarWidth:S,horizontalScrollbarHeight:E,overviewRuler:{top:z,width:S,height:n-2*z,right:0}}}}class $ extends h{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[l.kg("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),l.kg("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:l.kg("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return k(e,"simple",["simple","advanced"])}compute(e,t,i){const n=t.get(2);return 2===n?"advanced":i}}(function(e){e["Off"]="off",e["OnCode"]="onCode",e["On"]="on"})(N||(N={}));class q extends h{constructor(){const e={enabled:N.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[N.Off,N.OnCode,N.On],default:e.enabled,enumDescriptions:[l.kg("editor.lightbulb.enabled.off","Disable the code action menu."),l.kg("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),l.kg("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:l.kg("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:k(t.enabled,this.defaultValue.enabled,[N.Off,N.OnCode,N.On])}}}class K extends h{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:l.kg("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:l.kg("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:l.kg("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:l.kg("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),maxLineCount:y.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:k(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:_(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class G extends h{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:l.kg("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[l.kg("editor.inlayHints.on","Inlay hints are enabled"),l.kg("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",s.zx?"Ctrl+Option":"Ctrl+Alt"),l.kg("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",s.zx?"Ctrl+Option":"Ctrl+Alt"),l.kg("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:l.kg("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:l.kg("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:l.kg("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return"boolean"===typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:k(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:y.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),padding:_(t.padding,this.defaultValue.padding)}}}class Q extends h{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){if("string"===typeof e&&/^\d+(\.\d+)?ch$/.test(e)){const t=parseFloat(e.substring(0,e.length-2));return-t}return y.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?y.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class Y extends C{constructor(){super(67,"lineHeight",Te.lineHeight,(e=>C.clamp(e,0,150)),{markdownDescription:l.kg("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}class Z extends h{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:l.kg("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:l.kg("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[l.kg("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),l.kg("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),l.kg("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:l.kg("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:l.kg("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:l.kg("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:l.kg("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:l.kg("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:l.kg("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:l.kg("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:l.kg("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:l.kg("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:l.kg("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),autohide:_(t.autohide,this.defaultValue.autohide),size:k(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:k(t.side,this.defaultValue.side,["right","left"]),showSlider:k(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_(t.renderCharacters,this.defaultValue.renderCharacters),scale:y.clampedInt(t.scale,1,1,3),maxColumn:y.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:_(t.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:_(t.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:C.clamp(t.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:C.clamp(t.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}function X(e){return"ctrlCmd"===e?s.zx?"metaKey":"ctrlKey":"altKey"}class J extends h{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:l.kg("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:l.kg("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{top:y.clampedInt(t.top,0,0,1e3),bottom:y.clampedInt(t.bottom,0,0,1e3)}}}class ee extends h{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:l.kg("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:l.kg("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),cycle:_(t.cycle,this.defaultValue.cycle)}}}class te extends f{constructor(){super(144)}compute(e,t,i){return e.pixelRatio}}class ie extends h{constructor(){super(88,"placeholder",void 0)}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?e:this.defaultValue}}class ne extends h{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[l.kg("on","Quick suggestions show inside the suggest widget"),l.kg("inline","Quick suggestions show as ghost text"),l.kg("off","Quick suggestions are disabled")]}];super(90,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:l.kg("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:l.kg("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:l.kg("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:l.kg("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.","`#editor.suggestOnTriggerCharacters#`")}),this.defaultValue=e}validate(e){if("boolean"===typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!==typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,o=["on","inline","off"];let s,r,a;return s="boolean"===typeof t?t?"on":"off":k(t,this.defaultValue.other,o),r="boolean"===typeof i?i?"on":"off":k(i,this.defaultValue.comments,o),a="boolean"===typeof n?n?"on":"off":k(n,this.defaultValue.strings,o),{other:s,comments:r,strings:a}}}class oe extends h{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[l.kg("lineNumbers.off","Line numbers are not rendered."),l.kg("lineNumbers.on","Line numbers are rendered as absolute number."),l.kg("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),l.kg("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:l.kg("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return"undefined"!==typeof e&&("function"===typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}function se(e){const t=e.get(99);return"editable"===t?e.get(92):"on"!==t}class re extends h{constructor(){const e=[],t={type:"number",description:l.kg("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(103,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:l.kg("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:l.kg("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"===typeof i)t.push({column:y.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"===typeof i){const e=i;t.push({column:y.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}class ae extends h{constructor(){const e=void 0;super(93,"readOnlyMessage",e)}validate(e){return e&&"object"===typeof e?e:this.defaultValue}}function le(e,t){if("string"!==typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}class ce extends h{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(104,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.kg("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),l.kg("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),l.kg("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:l.kg("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.kg("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),l.kg("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),l.kg("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:l.kg("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:l.kg("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:l.kg("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:l.kg("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:l.kg("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e,i=y.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=y.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:y.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:le(t.vertical,this.defaultValue.vertical),horizontal:le(t.horizontal,this.defaultValue.horizontal),useShadows:_(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:y.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:y.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:_(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}}const de="inUntrustedWorkspace",ue={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class he extends h{constructor(){const e={nonBasicASCII:de,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:de,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(126,"unicodeHighlight",e,{[ue.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,de],default:e.nonBasicASCII,description:l.kg("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[ue.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:l.kg("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[ue.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:l.kg("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[ue.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,de],default:e.includeComments,description:l.kg("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[ue.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,de],default:e.includeStrings,description:l.kg("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[ue.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:l.kg("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[ue.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:l.kg("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(o.aI(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(o.aI(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new g(n.newValue,!0):n}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:_e(t.nonBasicASCII,de,[!0,!1,de]),invisibleCharacters:_(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:_e(t.includeComments,de,[!0,!1,de]),includeStrings:_e(t.includeStrings,de,[!0,!1,de]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!==typeof e||!e)return t;const i={};for(const[n,o]of Object.entries(e))!0===o&&(i[n]=!0);return i}}class ge extends h{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:l.kg("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.kg("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),l.kg("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),l.kg("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:l.kg("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:l.kg("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:l.kg("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),mode:k(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:k(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:_(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily)}}}class pe extends h{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:l.kg("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.kg("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),l.kg("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),l.kg("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:l.kg("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:l.kg("inlineEdit.fontFamily","Controls the font family of the inline edit.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showToolbar:k(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}class fe extends h{constructor(){const e={enabled:r.R.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:r.R.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:l.kg("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:_(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class me extends h{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.kg("editor.guides.bracketPairs.true","Enables bracket pair guides."),l.kg("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),l.kg("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:l.kg("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.kg("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),l.kg("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),l.kg("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:l.kg("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:l.kg("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:l.kg("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[l.kg("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),l.kg("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),l.kg("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:l.kg("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{bracketPairs:_e(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:_e(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:_e(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function _e(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}class ve extends h{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(119,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[l.kg("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),l.kg("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:l.kg("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:l.kg("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:l.kg("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:l.kg("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[l.kg("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),l.kg("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),l.kg("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),l.kg("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:l.kg("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions ({0} and {1}) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:l.kg("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:l.kg("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:l.kg("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:l.kg("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:l.kg("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:l.kg("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:l.kg("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertMode:k(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:k(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:_(t.showIcons,this.defaultValue.showIcons),showStatusBar:_(t.showStatusBar,this.defaultValue.showStatusBar),preview:_(t.preview,this.defaultValue.preview),previewMode:k(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_(t.showMethods,this.defaultValue.showMethods),showFunctions:_(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:_(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:_(t.showFields,this.defaultValue.showFields),showVariables:_(t.showVariables,this.defaultValue.showVariables),showClasses:_(t.showClasses,this.defaultValue.showClasses),showStructs:_(t.showStructs,this.defaultValue.showStructs),showInterfaces:_(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_(t.showModules,this.defaultValue.showModules),showProperties:_(t.showProperties,this.defaultValue.showProperties),showEvents:_(t.showEvents,this.defaultValue.showEvents),showOperators:_(t.showOperators,this.defaultValue.showOperators),showUnits:_(t.showUnits,this.defaultValue.showUnits),showValues:_(t.showValues,this.defaultValue.showValues),showConstants:_(t.showConstants,this.defaultValue.showConstants),showEnums:_(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_(t.showKeywords,this.defaultValue.showKeywords),showWords:_(t.showWords,this.defaultValue.showWords),showColors:_(t.showColors,this.defaultValue.showColors),showFiles:_(t.showFiles,this.defaultValue.showFiles),showReferences:_(t.showReferences,this.defaultValue.showReferences),showFolders:_(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_(t.showSnippets,this.defaultValue.showSnippets),showUsers:_(t.showUsers,this.defaultValue.showUsers),showIssues:_(t.showIssues,this.defaultValue.showIssues)}}}class be extends h{constructor(){super(114,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:l.kg("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:l.kg("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"===typeof e?{selectLeadingAndTrailingWhitespace:_(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:_(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}class ye extends h{constructor(){const e=[];super(131,"wordSegmenterLocales",e,{anyOf:[{description:l.kg("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:l.kg("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if("string"===typeof e&&(e=[e]),Array.isArray(e)){const t=[];for(const i of e)if("string"===typeof i)try{Intl.Segmenter.supportedLocalesOf(i).length>0&&t.push(i)}catch{}return t}return this.defaultValue}}class we extends h{constructor(){super(139,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[l.kg("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),l.kg("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),l.kg("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),l.kg("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:l.kg("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){const n=t.get(2);return 2===n?0:i}}class Ce extends f{constructor(){super(147)}compute(e,t,i){const n=t.get(146);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}class Se extends h{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:l.kg("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[l.kg("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),l.kg("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showDropSelector:k(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class ke extends h{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:l.kg("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[l.kg("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),l.kg("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showPasteSelector:k(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const xe="Consolas, 'Courier New', monospace",Ee="Menlo, Monaco, 'Courier New', monospace",Le="'Droid Sans Mono', 'monospace', monospace",Te={fontFamily:s.zx?Ee:s.j9?Le:xe,fontWeight:"normal",fontSize:s.zx?12:14,lineHeight:0,letterSpacing:0},Ie=[];function Re(e){return Ie[e.id]=e,e}const De={acceptSuggestionOnCommitCharacter:Re(new v(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:l.kg("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Re(new x(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",l.kg("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:l.kg("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Re(new T),accessibilityPageSize:Re(new y(3,"accessibilityPageSize",10,1,1073741824,{description:l.kg("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:Re(new S(4,"ariaLabel",l.kg("editorViewAccessibleLabel","Editor content"))),ariaRequired:Re(new v(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Re(new v(8,"screenReaderAnnounceInlineSuggestion",!0,{description:l.kg("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:Re(new x(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),l.kg("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:Re(new x(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),l.kg("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:Re(new x(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",l.kg("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:l.kg("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Re(new x(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",l.kg("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:l.kg("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Re(new x(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),l.kg("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Re(new E(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],L,{enumDescriptions:[l.kg("editor.autoIndent.none","The editor will not insert indentation automatically."),l.kg("editor.autoIndent.keep","The editor will keep the current line's indentation."),l.kg("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),l.kg("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),l.kg("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:l.kg("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Re(new v(13,"automaticLayout",!1)),autoSurround:Re(new x(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[l.kg("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),l.kg("editor.autoSurround.quotes","Surround with quotes but not brackets."),l.kg("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:l.kg("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Re(new fe),bracketPairGuides:Re(new me),stickyTabStops:Re(new v(117,"stickyTabStops",!1,{description:l.kg("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Re(new v(17,"codeLens",!0,{description:l.kg("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Re(new S(18,"codeLensFontFamily","",{description:l.kg("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Re(new y(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:l.kg("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Re(new v(20,"colorDecorators",!0,{description:l.kg("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:Re(new x(149,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[l.kg("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),l.kg("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),l.kg("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:l.kg("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:Re(new y(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:l.kg("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Re(new v(22,"columnSelection",!1,{description:l.kg("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Re(new I),contextmenu:Re(new v(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Re(new v(25,"copyWithSyntaxHighlighting",!0,{description:l.kg("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Re(new E(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],R,{description:l.kg("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Re(new x(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[l.kg("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),l.kg("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),l.kg("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:l.kg("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Re(new E(28,"cursorStyle",D.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],A,{description:l.kg("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Re(new y(29,"cursorSurroundingLines",0,0,1073741824,{description:l.kg("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Re(new x(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[l.kg("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),l.kg("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:l.kg("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:Re(new y(31,"cursorWidth",0,0,1073741824,{markdownDescription:l.kg("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Re(new v(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Re(new v(33,"disableMonospaceOptimizations",!1)),domReadOnly:Re(new v(34,"domReadOnly",!1)),dragAndDrop:Re(new v(35,"dragAndDrop",!0,{description:l.kg("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Re(new P),dropIntoEditor:Re(new Se),stickyScroll:Re(new K),experimentalWhitespaceRendering:Re(new x(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[l.kg("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),l.kg("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),l.kg("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:l.kg("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Re(new S(39,"extraEditorClassName","")),fastScrollSensitivity:Re(new C(40,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:l.kg("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Re(new M),fixedOverflowWidgets:Re(new v(42,"fixedOverflowWidgets",!1)),folding:Re(new v(43,"folding",!0,{description:l.kg("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Re(new x(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[l.kg("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),l.kg("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:l.kg("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Re(new v(45,"foldingHighlight",!0,{description:l.kg("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Re(new v(46,"foldingImportsByDefault",!1,{description:l.kg("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Re(new y(47,"foldingMaximumRegions",5e3,10,65e3,{description:l.kg("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:Re(new v(48,"unfoldOnClickAfterEndOfLine",!1,{description:l.kg("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Re(new S(49,"fontFamily",Te.fontFamily,{description:l.kg("fontFamily","Controls the font family.")})),fontInfo:Re(new W),fontLigatures2:Re(new F),fontSize:Re(new H),fontWeight:Re(new V),fontVariations:Re(new B),formatOnPaste:Re(new v(55,"formatOnPaste",!1,{description:l.kg("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Re(new v(56,"formatOnType",!1,{description:l.kg("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Re(new v(57,"glyphMargin",!0,{description:l.kg("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Re(new j),hideCursorInOverviewRuler:Re(new v(59,"hideCursorInOverviewRuler",!1,{description:l.kg("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Re(new z),inDiffEditor:Re(new v(61,"inDiffEditor",!1)),letterSpacing:Re(new C(64,"letterSpacing",Te.letterSpacing,(e=>C.clamp(e,-5,20)),{description:l.kg("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Re(new q),lineDecorationsWidth:Re(new Q),lineHeight:Re(new Y),lineNumbers:Re(new oe),lineNumbersMinChars:Re(new y(69,"lineNumbersMinChars",5,1,300)),linkedEditing:Re(new v(70,"linkedEditing",!1,{description:l.kg("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Re(new v(71,"links",!0,{description:l.kg("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Re(new x(72,"matchBrackets","always",["always","near","never"],{description:l.kg("matchBrackets","Highlight matching brackets.")})),minimap:Re(new Z),mouseStyle:Re(new x(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Re(new C(75,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:l.kg("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Re(new v(76,"mouseWheelZoom",!1,{markdownDescription:s.zx?l.kg("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):l.kg("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Re(new v(77,"multiCursorMergeOverlapping",!0,{description:l.kg("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Re(new E(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],X,{markdownEnumDescriptions:[l.kg("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),l.kg("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:l.kg({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Re(new x(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[l.kg("multiCursorPaste.spread","Each cursor pastes a single line of the text."),l.kg("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:l.kg("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Re(new y(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:l.kg("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Re(new x(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[l.kg("occurrencesHighlight.off","Does not highlight occurrences."),l.kg("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),l.kg("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:l.kg("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:Re(new v(82,"overviewRulerBorder",!0,{description:l.kg("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Re(new y(83,"overviewRulerLanes",3,0,3)),padding:Re(new J),pasteAs:Re(new ke),parameterHints:Re(new ee),peekWidgetDefaultFocus:Re(new x(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[l.kg("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),l.kg("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:l.kg("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),placeholder:Re(new ie),definitionLinkOpensInPeek:Re(new v(89,"definitionLinkOpensInPeek",!1,{description:l.kg("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Re(new ne),quickSuggestionsDelay:Re(new y(91,"quickSuggestionsDelay",10,0,1073741824,{description:l.kg("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Re(new v(92,"readOnly",!1)),readOnlyMessage:Re(new ae),renameOnType:Re(new v(94,"renameOnType",!1,{description:l.kg("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:l.kg("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Re(new v(95,"renderControlCharacters",!0,{description:l.kg("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Re(new x(96,"renderFinalNewline",s.j9?"dimmed":"on",["off","on","dimmed"],{description:l.kg("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Re(new x(97,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",l.kg("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:l.kg("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Re(new v(98,"renderLineHighlightOnlyWhenFocus",!1,{description:l.kg("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Re(new x(99,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Re(new x(100,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",l.kg("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),l.kg("renderWhitespace.selection","Render whitespace characters only on selected text."),l.kg("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:l.kg("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Re(new y(101,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Re(new v(102,"roundedSelection",!0,{description:l.kg("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Re(new re),scrollbar:Re(new ce),scrollBeyondLastColumn:Re(new y(105,"scrollBeyondLastColumn",4,0,1073741824,{description:l.kg("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Re(new v(106,"scrollBeyondLastLine",!0,{description:l.kg("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Re(new v(107,"scrollPredominantAxis",!0,{description:l.kg("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Re(new v(108,"selectionClipboard",!0,{description:l.kg("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:s.j9})),selectionHighlight:Re(new v(109,"selectionHighlight",!0,{description:l.kg("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Re(new v(110,"selectOnLineNumbers",!0)),showFoldingControls:Re(new x(111,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[l.kg("showFoldingControls.always","Always show the folding controls."),l.kg("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),l.kg("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:l.kg("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Re(new v(112,"showUnused",!0,{description:l.kg("showUnused","Controls fading out of unused code.")})),showDeprecated:Re(new v(141,"showDeprecated",!0,{description:l.kg("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Re(new G),snippetSuggestions:Re(new x(113,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[l.kg("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),l.kg("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),l.kg("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),l.kg("snippetSuggestions.none","Do not show snippet suggestions.")],description:l.kg("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Re(new be),smoothScrolling:Re(new v(115,"smoothScrolling",!1,{description:l.kg("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Re(new y(118,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Re(new ve),inlineSuggest:Re(new ge),inlineEdit:Re(new pe),inlineCompletionsAccessibilityVerbose:Re(new v(150,"inlineCompletionsAccessibilityVerbose",!1,{description:l.kg("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:Re(new y(120,"suggestFontSize",0,0,1e3,{markdownDescription:l.kg("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Re(new y(121,"suggestLineHeight",0,0,1e3,{markdownDescription:l.kg("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:Re(new v(122,"suggestOnTriggerCharacters",!0,{description:l.kg("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Re(new x(123,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[l.kg("suggestSelection.first","Always select the first suggestion."),l.kg("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),l.kg("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:l.kg("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Re(new x(124,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[l.kg("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),l.kg("tabCompletion.off","Disable tab completions."),l.kg("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:l.kg("tabCompletion","Enables tab completions.")})),tabIndex:Re(new y(125,"tabIndex",0,-1,1073741824)),unicodeHighlight:Re(new he),unusualLineTerminators:Re(new x(127,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[l.kg("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),l.kg("unusualLineTerminators.off","Unusual line terminators are ignored."),l.kg("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:l.kg("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Re(new v(128,"useShadowDOM",!0)),useTabStops:Re(new v(129,"useTabStops",!0,{description:l.kg("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:Re(new x(130,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[l.kg("wordBreak.normal","Use the default line break rule."),l.kg("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:l.kg("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:Re(new ye),wordSeparators:Re(new S(132,"wordSeparators",a.J3,{description:l.kg("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Re(new x(133,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[l.kg("wordWrap.off","Lines will never wrap."),l.kg("wordWrap.on","Lines will wrap at the viewport width."),l.kg({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),l.kg({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:l.kg({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Re(new S(134,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:Re(new S(135,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:Re(new y(136,"wordWrapColumn",80,1,1073741824,{markdownDescription:l.kg({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Re(new x(137,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Re(new x(138,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Re(new O),defaultColorDecorators:Re(new v(148,"defaultColorDecorators",!1,{markdownDescription:l.kg("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:Re(new te),tabFocusMode:Re(new v(145,"tabFocusMode",!1,{markdownDescription:l.kg("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Re(new U),wrappingInfo:Re(new Ce),wrappingIndent:Re(new we),wrappingStrategy:Re(new $)}},17522:(e,t,i)=>{"use strict";i.d(t,{D:()=>o});var n=i(40231);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},86817:(e,t,i)=>{"use strict";i.d(t,{YJ:()=>d,_8:()=>l});var n=i(25160),o=i(35011),s=i(17522);const r=n.zx?1.5:1.35,a=8;class l{static createFromValidatedSettings(e,t,i){const n=e.get(49),o=e.get(53),s=e.get(52),r=e.get(51),a=e.get(54),c=e.get(67),d=e.get(64);return l._create(n,o,s,r,a,c,d,t,i)}static _create(e,t,i,n,c,d,u,h,g){0===d?d=r*i:d{"use strict";i.d(t,{V:()=>o,y:()=>s});var n=i(62647);class o{constructor(e){const t=(0,n.W)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=(0,n.W)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class s{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},32142:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(20601);class o{static _nextVisibleColumn(e,t,i){return 9===e?o.nextRenderTabStop(t,i):n.ne(e)||n.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const o=Math.min(t-1,e.length),s=e.substring(0,o),r=new n.km(s);let a=0;while(!r.eol()){const e=n.Z5(s,o,r.offset);r.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const o=e.length,s=new n.km(e);let r=0,a=1;while(!s.eol()){const l=n.Z5(e,o,s.offset);s.nextGraphemeLength();const c=this._nextVisibleColumn(l,r,i),d=s.offset+1;if(c>=t){const e=t-r,i=c-t;return i{"use strict";i.d(t,{k:()=>o});var n=i(8690);class o{static insert(e,t){return{range:new n.Q(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},52764:(e,t,i)=>{"use strict";i.d(t,{A3:()=>T,AQ:()=>V,Am:()=>E,As:()=>R,BD:()=>J,Bo:()=>Z,CM:()=>k,D0:()=>c,Ek:()=>M,H0:()=>x,I2:()=>Y,IW:()=>ee,If:()=>X,JB:()=>N,L0:()=>p,Mf:()=>l,P1:()=>se,Pe:()=>ne,Qt:()=>m,WD:()=>oe,WS:()=>ie,WY:()=>re,Xr:()=>O,aZ:()=>H,bB:()=>te,hz:()=>w,je:()=>h,kG:()=>a,kM:()=>d,l5:()=>$,lQ:()=>z,n4:()=>Q,ob:()=>y,ow:()=>C,s7:()=>G,sC:()=>u,sH:()=>q,sN:()=>j,ss:()=>U,tK:()=>L,tp:()=>I,vP:()=>S,vV:()=>b,vp:()=>B,w4:()=>f,we:()=>g,x9:()=>A,yI:()=>W,yw:()=>P,zp:()=>K});var n=i(41337),o=i(85476),s=i(66344),r=i(15911);const a=(0,s.x1A)("editor.lineHighlightBackground",null,n.kg("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,s.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.b1q},n.kg("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=((0,s.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},n.kg("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},n.kg("rangeHighlightBorder","Background color of the border around highlighted ranges.")),(0,s.x1A)("editor.symbolHighlightBackground",{dark:s.Ubg,light:s.Ubg,hcDark:null,hcLight:null},n.kg("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},n.kg("symbolHighlightBorder","Background color of the border around highlighted symbols.")),(0,s.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Q1.black,hcDark:o.Q1.white,hcLight:"#0F4A85"},n.kg("caret","Color of the editor cursor."))),d=(0,s.x1A)("editorCursor.background",null,n.kg("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),u=(0,s.x1A)("editorMultiCursor.primary.foreground",c,n.kg("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),h=(0,s.x1A)("editorMultiCursor.primary.background",d,n.kg("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),g=(0,s.x1A)("editorMultiCursor.secondary.foreground",c,n.kg("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),p=(0,s.x1A)("editorMultiCursor.secondary.background",d,n.kg("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),f=(0,s.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},n.kg("editorWhitespaces","Color of whitespace characters in the editor.")),m=(0,s.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:o.Q1.white,hcLight:"#292929"},n.kg("editorLineNumbers","Color of editor line numbers.")),_=(0,s.x1A)("editorIndentGuide.background",f,n.kg("editorIndentGuides","Color of the editor indentation guides."),!1,n.kg("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),v=(0,s.x1A)("editorIndentGuide.activeBackground",f,n.kg("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,n.kg("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),b=(0,s.x1A)("editorIndentGuide.background1",_,n.kg("editorIndentGuides1","Color of the editor indentation guides (1).")),y=(0,s.x1A)("editorIndentGuide.background2","#00000000",n.kg("editorIndentGuides2","Color of the editor indentation guides (2).")),w=(0,s.x1A)("editorIndentGuide.background3","#00000000",n.kg("editorIndentGuides3","Color of the editor indentation guides (3).")),C=(0,s.x1A)("editorIndentGuide.background4","#00000000",n.kg("editorIndentGuides4","Color of the editor indentation guides (4).")),S=(0,s.x1A)("editorIndentGuide.background5","#00000000",n.kg("editorIndentGuides5","Color of the editor indentation guides (5).")),k=(0,s.x1A)("editorIndentGuide.background6","#00000000",n.kg("editorIndentGuides6","Color of the editor indentation guides (6).")),x=(0,s.x1A)("editorIndentGuide.activeBackground1",v,n.kg("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),E=(0,s.x1A)("editorIndentGuide.activeBackground2","#00000000",n.kg("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),L=(0,s.x1A)("editorIndentGuide.activeBackground3","#00000000",n.kg("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),T=(0,s.x1A)("editorIndentGuide.activeBackground4","#00000000",n.kg("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),I=(0,s.x1A)("editorIndentGuide.activeBackground5","#00000000",n.kg("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),R=(0,s.x1A)("editorIndentGuide.activeBackground6","#00000000",n.kg("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),D=(0,s.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.buw,hcLight:s.buw},n.kg("editorActiveLineNumber","Color of editor active line number"),!1,n.kg("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),N=((0,s.x1A)("editorLineNumber.activeForeground",D,n.kg("editorActiveLineNumber","Color of editor active line number")),(0,s.x1A)("editorLineNumber.dimmedForeground",null,n.kg("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."))),A=((0,s.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Q1.lightgrey,hcDark:o.Q1.white,hcLight:"#292929"},n.kg("editorRuler","Color of the editor rulers.")),(0,s.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},n.kg("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},n.kg("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.b1q,hcLight:s.b1q},n.kg("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},n.kg("editorOverviewRulerBorder","Color of the overview ruler border."))),O=(0,s.x1A)("editorOverviewRuler.background",null,n.kg("editorOverviewRulerBackground","Background color of the editor overview ruler.")),P=((0,s.x1A)("editorGutter.background",s.YtV,n.kg("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#fff").transparent(.8),hcLight:s.b1q},n.kg("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.x1A)("editorUnnecessaryCode.opacity",{dark:o.Q1.fromHex("#000a"),light:o.Q1.fromHex("#0007"),hcDark:null,hcLight:null},n.kg("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."))),M=((0,s.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#fff").transparent(.8),hcLight:o.Q1.fromHex("#292929").transparent(.8)},n.kg("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.x1A)("editorGhostText.foreground",{dark:o.Q1.fromHex("#ffffff56"),light:o.Q1.fromHex("#0007"),hcDark:null,hcLight:null},n.kg("editorGhostTextForeground","Foreground color of the ghost text in the editor."))),F=((0,s.x1A)("editorGhostText.background",null,n.kg("editorGhostTextBackground","Background color of the ghost text in the editor.")),new o.Q1(new o.bU(0,122,204,.6))),B=(0,s.x1A)("editorOverviewRuler.rangeHighlightForeground",F,n.kg("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),W=(0,s.x1A)("editorOverviewRuler.errorForeground",{dark:new o.Q1(new o.bU(255,18,18,.7)),light:new o.Q1(new o.bU(255,18,18,.7)),hcDark:new o.Q1(new o.bU(255,50,50,1)),hcLight:"#B5200D"},n.kg("overviewRuleError","Overview ruler marker color for errors.")),H=(0,s.x1A)("editorOverviewRuler.warningForeground",{dark:s.Hng,light:s.Hng,hcDark:s.Stt,hcLight:s.Stt},n.kg("overviewRuleWarning","Overview ruler marker color for warnings.")),V=(0,s.x1A)("editorOverviewRuler.infoForeground",{dark:s.pOz,light:s.pOz,hcDark:s.IIb,hcLight:s.IIb},n.kg("overviewRuleInfo","Overview ruler marker color for infos.")),j=(0,s.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},n.kg("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),z=(0,s.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},n.kg("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),U=(0,s.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},n.kg("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),$=(0,s.x1A)("editorBracketHighlight.foreground4","#00000000",n.kg("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),q=(0,s.x1A)("editorBracketHighlight.foreground5","#00000000",n.kg("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),K=(0,s.x1A)("editorBracketHighlight.foreground6","#00000000",n.kg("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),G=(0,s.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new o.Q1(new o.bU(255,18,18,.8)),light:new o.Q1(new o.bU(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},n.kg("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Q=(0,s.x1A)("editorBracketPairGuide.background1","#00000000",n.kg("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Y=(0,s.x1A)("editorBracketPairGuide.background2","#00000000",n.kg("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Z=(0,s.x1A)("editorBracketPairGuide.background3","#00000000",n.kg("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),X=(0,s.x1A)("editorBracketPairGuide.background4","#00000000",n.kg("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),J=(0,s.x1A)("editorBracketPairGuide.background5","#00000000",n.kg("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),ee=(0,s.x1A)("editorBracketPairGuide.background6","#00000000",n.kg("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),te=(0,s.x1A)("editorBracketPairGuide.activeBackground1","#00000000",n.kg("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),ie=(0,s.x1A)("editorBracketPairGuide.activeBackground2","#00000000",n.kg("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),ne=(0,s.x1A)("editorBracketPairGuide.activeBackground3","#00000000",n.kg("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),oe=(0,s.x1A)("editorBracketPairGuide.activeBackground4","#00000000",n.kg("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),se=(0,s.x1A)("editorBracketPairGuide.activeBackground5","#00000000",n.kg("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),re=(0,s.x1A)("editorBracketPairGuide.activeBackground6","#00000000",n.kg("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,s.x1A)("editorUnicodeHighlight.border",s.Hng,n.kg("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.x1A)("editorUnicodeHighlight.background",s.whs,n.kg("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));(0,r.zy)(((e,t)=>{const i=e.getColor(s.YtV),n=e.getColor(a),o=n&&!n.isTransparent()?n:i;o&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)}))},36627:(e,t,i)=>{"use strict";function n(e){let t=0,i=0,n=0,o=0;for(let s=0,r=e.length;sn})},79680:(e,t,i)=>{"use strict";i.d(t,{P:()=>r});var n=i(20601),o=i(32142);function s(e,t,i){let n=0;for(let r=0;r{"use strict";i.d(t,{M:()=>a,S:()=>l});var n=i(14396),o=i(50371),s=i(8690),r=i(43654);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let i=1;it)throw new n.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=(0,r.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,r.lx)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let i=0,n=0,o=null;while(i=s.startLineNumber?o=new a(o.startLineNumber,Math.max(o.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(o),o=s)}return null!==o&&t.push(o),new l(t)}subtractFrom(e){const t=(0,r.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return new l([e]);const n=[];let o=e.startLineNumber;for(let s=t;so&&n.push(new a(o,e.startLineNumber)),o=e.endLineNumberExclusive}return oe.toString())).join(", ")}getIntersection(e){const t=[];let i=0,n=0;while(it.delta(e))))}}},50371:(e,t,i)=>{"use strict";i.d(t,{L:()=>o,h:()=>s});var n=i(14396);class o{static addRange(e,t){let i=0;while(it))return new o(e,t)}static ofLength(e){return new o(0,e)}static ofStartAndLength(e,t){return new o(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new n.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new o(this.start+e,this.endExclusive+e)}deltaStart(e){return new o(this.start+e,this.endExclusive)}deltaEnd(e){return new o(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString())).join(", ")}intersectsStrict(e){let t=0;while(te+t.length),0)}}},36788:(e,t,i)=>{"use strict";i.d(t,{y:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";i.d(t,{Q:()=>o});var n=i(36788);class o{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,s,r;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new o(i,n,s,r)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn;return ic?(s=c,r=d):s===c&&(r=Math.min(r,d)),i>s||i===s&&n>r?null:new o(i,n,s,r)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.y(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return o.collapseToEnd(this)}static collapseToEnd(e){return new o(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new o(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},98581:(e,t,i)=>{"use strict";i.d(t,{L:()=>s});var n=i(36788),o=i(8690);class s extends o.Q{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{"use strict";i.d(t,{Su:()=>h,b7:()=>u,fe:()=>p});var n=i(20601),o=i(25160),s=i(87885);let r,a,l;function c(){return r||(r=new TextDecoder("UTF-16LE")),r}function d(){return a||(a=new TextDecoder("UTF-16BE")),a}function u(){return l||(l=o.cm()?c():d()),l}function h(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?g(e,t,i):c().decode(n)}function g(e,t,i){const n=[];let o=0;for(let r=0;r=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i{"use strict";i.d(t,{k:()=>r,x:()=>a});var n=i(87885),o=i(13647);function s(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class r{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${s(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${s(this.oldText)}")`:`(replace@${this.oldPosition} "${s(this.oldText)}" with "${s(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const o=t.length;n.Sw(e,o,i),i+=4;for(let s=0;s{"use strict";i.d(t,{CO:()=>g,WR:()=>u,mF:()=>d});var n=i(79109),o=i(14396),s=i(36788),r=i(50371),a=i(33904);class l{constructor(e){this.text=e,this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t(0,n.Xo)(e,((e,t)=>e.range.getEndPosition().isBeforeOrEqual(t.range.getStartPosition())))))}apply(e){let t="",i=new s.y(1,1);for(const o of this.edits){const n=o.range,s=n.getStartPosition(),r=n.getEndPosition(),a=h(i,s);a.isEmpty()||(t+=e.getValueOfRange(a)),t+=o.text,i=r}const n=h(i,e.endPositionExclusive);return n.isEmpty()||(t+=e.getValueOfRange(n)),t}applyToString(e){const t=new p(e);return this.apply(t)}getNewRanges(){const e=[];let t=0,i=0,n=0;for(const o of this.edits){const r=a.W.ofText(o.text),l=s.y.lift({lineNumber:o.range.startLineNumber+i,column:o.range.startColumn+(o.range.startLineNumber===t?n:0)}),c=r.createRange(l);e.push(c),i=c.endLineNumber-o.range.endLineNumber,n=c.endColumn-o.range.endColumn,t=o.range.endLineNumber}return e}}class u{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}function h(e,t){if(e.lineNumber===t.lineNumber&&e.column===Number.MAX_SAFE_INTEGER)return c.Q.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new o.D7("start must be before end");return new c.Q(e.lineNumber,e.column,t.lineNumber,t.column)}class g{get endPositionExclusive(){return this.length.addToPosition(new s.y(1,1))}}class p extends g{constructor(e){super(),this.value=e,this._t=new l(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}},33904:(e,t,i)=>{"use strict";i.d(t,{W:()=>s});var n=i(36788),o=i(8690);class s{static{this.zero=new s(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new s(0,t.column-e.column):new s(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return s.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,i=0;for(const n of e)"\n"===n?(t++,i=0):i++;return new s(t,i)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new o.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new o.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new n.y(e.lineNumber,e.column+this.columnCount):new n.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},99989:(e,t,i)=>{"use strict";i.d(t,{R:()=>n});const n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}},90385:(e,t,i)=>{"use strict";i.d(t,{i:()=>a});var n=i(21553),o=i(94529);class s extends o.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let i=0,n=e.length;it)break;i=n}return i}findNextIntlWordAtOrAfterOffset(e,t){for(const i of this._getIntlSegmenterWordsOnLine(e))if(!(i.index{"use strict";i.d(t,{Io:()=>l,J3:()=>s,Ld:()=>a,Th:()=>d});var n=i(5837),o=i(67806);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function r(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of s)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}const a=r();function l(e){let t=a;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const c=new o.w;function d(e,t,i,o,s){if(t=l(t),s||(s=n.f.first(c)),i.length>s.maxLen){let n=e-s.maxLen/2;return n<0?n=0:o+=n,i=i.substring(n,e+s.maxLen/2),d(e,t,i,o,s)}const r=Date.now(),a=e-1-o;let h=-1,g=null;for(let n=1;;n++){if(Date.now()-r>=s.timeBudget)break;const e=a-s.windowSize*n;t.lastIndex=Math.max(0,e);const o=u(t,i,a,h);if(!o&&g)break;if(g=o,e<=0)break;h=e}if(g){const e={word:g[0],startColumn:o+1+g.index,endColumn:o+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function u(e,t,i,n){let o;while(o=e.exec(t)){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}c.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},37200:(e,t,i)=>{"use strict";i.d(t,{s:()=>o});var n=i(32142);class o{static whitespaceVisibleColumn(e,t,i){const o=e.length;let s=0,r=-1,a=-1;for(let l=0;l{"use strict";i.d(t,{g:()=>d});var n=i(20601),o=i(50793),s=i(332),r=i(32142),a=i(31161),l=i(8690),c=i(36788);class d{static deleteRight(e,t,i,n){const s=[];let r=3!==e;for(let c=0,d=n.length;c=u.length+1)return!1;const h=u.charAt(d.column-2),g=n.get(h);if(!g)return!1;if((0,s.vG)(h)){if("never"===i)return!1}else if("never"===t)return!1;const p=u.charAt(d.column-1);let f=!1;for(const e of g)e.open===h&&e.close===p&&(f=!0);if(!f)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){const e=t.getLineContent(o.lineNumber),s=n.HG(e),a=-1===s?e.length+1:s+1;if(o.column<=a){const e=i.visibleColumnFromColumn(t,o),n=r.A.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,o.lineNumber,n);return new l.Q(o.lineNumber,s,o.lineNumber,o.column)}}return l.Q.fromPositions(d.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.Wd(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new c.y(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let r=null;i.sort(((e,t)=>c.y.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,a=i.length;s1&&r?.endLineNumber!==e.lineNumber?(i=e.lineNumber-1,c=t.getLineMaxColumn(e.lineNumber-1),d=e.lineNumber,u=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,c=1,d=e.lineNumber,u=t.getLineMaxColumn(e.lineNumber));const h=new l.Q(i,c,d,u);r=h,h.isEmpty()?n[s]=null:n[s]=new o.iu(h,"")}else n[s]=null;else n[s]=new o.iu(a,"")}return new s.vY(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},7657:(e,t,i)=>{"use strict";i.d(t,{S:()=>n,c:()=>d});var n,o=i(50322),s=i(332),r=i(31161),a=i(51232),l=i(36788),c=i(8690);class d{static addCursorDown(e,t,i){const n=[];let o=0;for(let a=0,l=t.length;at&&(i=t,n=e.model.getLineMaxColumn(i)),s.MF.fromModelState(new s.mG(new c.Q(r.lineNumber,1,i,n),2,0,new l.y(i,n),0))}const d=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberd){const i=e.getLineCount();let n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),s.MF.fromViewState(t.viewState.move(!0,n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return s.MF.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return s.MF.fromModelState(a.z.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new s.MF(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return s.MF.fromViewState(new s.mG(new c.Q(i,n,i,n),0,0,new l.y(i,n),0))}static moveTo(e,t,i,n,o){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,o)}const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.y(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return s.MF.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===a?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===a?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===a?t.map((t=>s.MF.fromViewState(r.I.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.MF.fromModelState(r.I.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>s.MF.fromViewState(r.I.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.MF.fromModelState(r.I.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{const i=[];for(let o=0,r=t.length;oi.endLineNumber-1?i.endLineNumber-1:os.MF.fromViewState(r.I.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,a=t.length;os.MF.fromViewState(r.I.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,a=t.length;o{"use strict";i.d(t,{I:()=>d});var n=i(20601),o=i(32142),s=i(36788),r=i(8690),a=i(37200),l=i(332);class c{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class d{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-n.MV(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new s.y(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),r=a.s.atomicPosition(o,t.column-1,i,0);if(-1!==r&&r+1>=n)return new s.y(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,i,e.tabSize):d.leftPosition(t,i);return new c(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(d.clipPositionColumn(n,t),0),l=d.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new s.y(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ih?(i=h,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,u),r=f?0:u-o.A.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==d){const e=new s.y(i,n),o=t.normalizePosition(e,d);r+=n-o.column,i=o.lineNumber,n=o.column}return new c(i,n,r)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,4)}static moveDown(e,t,i,n,o){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l,c=0;do{l=d.down(e,t,r+c,a,i.leftoverVisibleColumns,o,!0);const n=t.normalizePosition(new s.y(l.lineNumber,l.column),2);if(n.lineNumber>r)break}while(c++<10&&r+c1&&this._isBlankLine(t,o))o--;while(o>1&&!this._isBlankLine(t,o))o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let s=i.position.lineNumber;while(s{"use strict";i.d(t,{AO:()=>k,Dr:()=>x,Hs:()=>I,K4:()=>b,Ls:()=>S,UN:()=>L,YA:()=>E,dU:()=>_,ey:()=>H,h0:()=>T,is:()=>w,kr:()=>C,oi:()=>y,sx:()=>v});var n=i(14396),o=i(20601),s=i(50793),r=i(27461),a=i(59025),l=i(332),c=i(90385),d=i(8690),u=i(36788),h=i(98831),g=i(50395),p=i(23099),f=i(67502),m=i(41411);class _{static getEdits(e,t,i,n,o){if(!o&&this._isAutoIndentType(e,t,i)){const o=[];for(const r of i){const i=this._findActualIndentationForSelection(e,t,r,n);if(null===i)return;o.push({selection:r,indentation:i})}const s=y.getAutoClosingPairClose(e,t,i,n,!1);return this._getIndentationAndAutoClosingPairEdits(e,t,o,n,s)}}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,o=i.length;nB(e,t),unshiftIndent:t=>W(e,t)},e.languageConfigurationService);if(null===o)return null;const s=(0,g.Cw)(t,i.startLineNumber,i.startColumn);return o===e.normalizeIndentation(s)?null:o}static _getIndentationAndAutoClosingPairEdits(e,t,i,n,o){const s=i.map((({selection:i,indentation:s})=>{if(null!==o){const r=this._getEditFromIndentationAndSelection(e,t,s,i,n,!1);return new D(r,i,n,o)}{const o=this._getEditFromIndentationAndSelection(e,t,s,i,n,!0);return F(o.range,o.text,!1)}})),r={shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1};return new l.vY(4,s,r)}static _getEditFromIndentationAndSelection(e,t,i,n,o,s=!0){const r=n.startLineNumber,a=t.getLineFirstNonWhitespaceColumn(r);let l=e.normalizeIndentation(i);if(0!==a){const e=t.getLineContent(r);l+=e.substring(a-1,n.startColumn-1)}l+=s?o:"";const c=new d.Q(r,1,n.endLineNumber,n.endColumn);return{range:c,text:l}}}class v{static getEdits(e,t,i,n,o,s){if(M(t,i,n,o,s))return this._runAutoClosingOvertype(e,n,s)}static _runAutoClosingOvertype(e,t,i){const n=[];for(let o=0,r=t.length;onew s.iu(new d.Q(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new l.vY(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}}class y{static getEdits(e,t,i,n,o,s){if(!s){const s=this.getAutoClosingPairClose(e,t,i,n,o);if(null!==s)return this._runAutoClosingOpenCharType(i,n,o,s)}}static _runAutoClosingOpenCharType(e,t,i,n){const o=[];for(let s=0,r=e.length;s{const t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),r=this._findAutoClosingPairOpen(e,t,s.map((e=>new u.y(e.lineNumber,e.beforeColumn))),n);if(!r)return null;let a,d;const h=(0,l.vG)(n);if(h)a=e.autoClosingQuotes,d=e.shouldAutoCloseBefore.quote;else{const t=!!e.blockCommentStartToken&&r.open.includes(e.blockCommentStartToken);t?(a=e.autoClosingComments,d=e.shouldAutoCloseBefore.comment):(a=e.autoClosingBrackets,d=e.shouldAutoCloseBefore.bracket)}if("never"===a)return null;const g=this._findContainedAutoClosingPair(e,r),f=g?g.close:"";let m=!0;for(const l of s){const{lineNumber:i,beforeColumn:o,afterColumn:s}=l,u=t.getLineContent(i),h=u.substring(0,o-1),g=u.substring(s-1);if(g.startsWith(f)||(m=!1),g.length>0){const t=g.charAt(0),i=this._isBeforeClosingBrace(e,g);if(!i&&!d(t))return null}if(1===r.open.length&&("'"===n||'"'===n)&&"always"!==a){const t=(0,c.i)(e.wordSeparators,[]);if(h.length>0){const e=h.charCodeAt(h.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(i))return null;t.tokenization.forceTokenization(i);const _=t.tokenization.getLineTokens(i),v=(0,p.BQ)(_,o-1);if(!r.shouldAutoClose(v,o-v.firstCharOffset))return null;const b=r.findNeutralCharacter();if(b){const e=t.tokenization.getTokenTypeIfInsertingCharacter(i,o,b);if(!r.isOK(e))return null}}return m?r.close.substring(0,r.close.length-f.length):r.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const s of n)s.open!==t.open&&t.open.includes(s.open)&&t.close.endsWith(s.close)&&(!o||s.open.length>o.open.length)&&(o=s);return o}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let s=null;for(const r of o)if(null===s||r.open.length>s.open.length){let e=!0;for(const o of i){const i=t.getValueInRange(new d.Q(o.lineNumber,o.column-r.open.length+1,o.lineNumber,o.column));if(i+n!==r.open){e=!1;break}}e&&(s=r)}return s}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],s=n.some((e=>t.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}}class w{static getEdits(e,t,i,n,o){if(!o&&this._isSurroundSelectionType(e,t,i,n))return this._runSurroundSelectionType(e,i,n)}static _runSurroundSelectionType(e,t,i){const n=[];for(let o=0,s=t.length;o=4){const r=(0,f.MU)(e.autoIndent,t,n,{unshiftIndent:t=>W(e,t),shiftIndent:t=>B(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition());const l=n.endColumn,c=t.getLineContent(n.endLineNumber),d=o.HG(c);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new s.q2(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new s.iP(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return F(n,"\n"+e.normalizeIndentation(l),i)}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];const n=[];for(let o=0,r=i.length;othis._compositionType(i,e,o,s,r,a)));return new l.vY(4,c,{shouldPushStackElementBefore:A(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,r){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+o),u=new d.Q(a.lineNumber,l,a.lineNumber,c),h=e.getValueInRange(u);return h===i&&0===r?null:new s.iP(u,i,0,r)}}class L{static getEdits(e,t,i){const n=[];for(let r=0,a=t.length;r1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n),i=o.lT(e);if(i>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),a=(0,m.h)(e.autoIndent,t,new d.Q(n,r,n,r),e.languageConfigurationService);a&&(s=a.indentation+a.appendText)}return n&&(n===h.l.Indent&&(s=B(e,s)),n===h.l.Outdent&&(s=W(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const r=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,r),n=e.indentSize,s=n-i%n;for(let e=0;e2?c.charCodeAt(a.column-2):0;if(92===h&&u)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t{"use strict";i.d(t,{T:()=>a,v:()=>l});var n=i(27461),o=i(59025),s=i(332),r=i(52220);class a{static indent(e,t,i){if(null===t||null===i)return[];const o=[];for(let s=0,r=i.length;s{"use strict";i.d(t,{c:()=>d,z:()=>c});var n=i(20601),o=i(332),s=i(38471),r=i(90385),a=i(36788),l=i(8690);class c{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _createIntlWord(e,t){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:t}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;const o=t.findPrevIntlWordBeforeOrAtOffset(e,i.column-2);for(let s=i.column-2;s>=0;s--){const i=e.charCodeAt(s),r=t.get(i);if(o&&s===o.index)return this._createIntlWord(o,r);if(0===r){if(2===n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const o=t.findNextIntlWordAtOrAfterOffset(e,n),s=e.length;for(let r=n;r=0;s--){const n=e.charCodeAt(s),r=t.get(n);if(o&&s===o.index)return s;if(1===r)return s+1;if(1===i&&2===r)return s+1;if(2===i&&0===r)return s+1}return 0}static moveWordLeft(e,t,i,n,o){let s=i.lineNumber,r=i.column;1===r&&s>1&&(s-=1,r=t.getLineMaxColumn(s));let l=c._findPreviousWordOnLine(e,t,new a.y(s,r));if(0===n)return new a.y(s,l?l.start+1:1);if(1===n)return!o&&l&&2===l.wordType&&l.end-l.start===1&&0===l.nextCharClass&&(l=c._findPreviousWordOnLine(e,t,new a.y(s,l.start+1))),new a.y(s,l?l.start+1:1);if(3===n){while(l&&2===l.wordType)l=c._findPreviousWordOnLine(e,t,new a.y(s,l.start+1));return new a.y(s,l?l.start+1:1)}return l&&r<=l.end+1&&(l=c._findPreviousWordOnLine(e,t,new a.y(s,l.start+1))),new a.y(s,l?l.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.y(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let r=t.column-1;r>1;r--){const e=s.charCodeAt(r-2),t=s.charCodeAt(r-1);if(95===e&&95!==t)return new a.y(i,r);if(45===e&&45!==t)return new a.y(i,r);if((n.Lv(e)||n.DB(e))&&n.Wv(t))return new a.y(i,r);if(n.Wv(e)&&n.Wv(t)&&r+1=l.start+1&&(l=c._findNextWordOnLine(e,t,new a.y(o,l.end+1))),s=l?l.start+1:t.getLineMaxColumn(o);return new a.y(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i1?h=1:(u--,h=n.getLineMaxColumn(u)):(g&&h<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new a.y(u,g.start+1))),g?h=g.end+1:h>1?h=1:(u--,h=n.getLineMaxColumn(u))),new l.Q(u,h,d.lineNumber,d.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.y(i.positionLineNumber,i.positionColumn),o=this._deleteInsideWordWhitespace(t,n);return o||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,s))return null;while(o>0&&this._charAtIsWhitespace(i,o-1))o--;while(s+11?new l.Q(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.Q(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;while(i-11&&this._charAtIsWhitespace(n,t-2))t--;return r(t,i)},d=c._findPreviousWordOnLine(e,t,i);if(d&&s(d))return a(d);const u=c._findNextWordOnLine(e,t,i);return u&&s(u)?a(u):d&&u?r(d.end+1,u.start+1):d?r(d.start+1,d.end+1):u?r(u.start+1,u.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new l.Q(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=p.start+1&&(p=c._findNextWordOnLine(i,n,new a.y(d,p.end+1))),p?u=p.start+1:uBoolean(e)))}},332:(e,t,i)=>{"use strict";i.d(t,{MF:()=>g,d$:()=>h,mG:()=>m,vG:()=>v,vY:()=>_});var n=i(36788),o=i(8690),s=i(98581),r=i(23099),a=i(32142),l=i(79680);const c=()=>!0,d=()=>!1,u=e=>" "===e||"\t"===e;class h{static shouldRecreate(e){return e.hasChanged(146)||e.hasChanged(132)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(129)||e.hasChanged(50)||e.hasChanged(92)||e.hasChanged(131)}constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,s=o.get(146),r=o.get(50);this.readOnly=o.get(92),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(117),this.lineHeight=r.lineHeight,this.typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(129),this.wordSeparators=o.get(132),this.emptySelectionClipboard=o.get(37),this.copyWithSyntaxHighlighting=o.get(25),this.multiCursorMergeOverlapping=o.get(77),this.multiCursorPaste=o.get(79),this.multiCursorLimit=o.get(80),this.autoClosingBrackets=o.get(6),this.autoClosingComments=o.get(7),this.autoClosingQuotes=o.get(11),this.autoClosingDelete=o.get(9),this.autoClosingOvertype=o.get(10),this.autoSurround=o.get(14),this.autoIndent=o.get(12),this.wordSegmenterLocales=o.get(131),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const a=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(a)for(const c of a)this.surroundingPairs[c.open]=c.close;const l=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=l?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};const e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=(0,r.BQ)(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.P)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return u;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return c;case"never":return d}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return a.A.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=a.A.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(ns?s:n}}class g{static fromModelState(e){return new p(e)}static fromViewState(e){return new f(e)}static fromModelSelection(e){const t=s.L.liftSelection(e),i=new m(o.Q.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i{"use strict";i.d(t,{$8:()=>a,SL:()=>r,_3:()=>l,aY:()=>d,uY:()=>c});var n=i(85053),o=i(14396),s=i(50371);class r{static trivial(e,t){return new r([new a(s.L.ofLength(e.length),s.L.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new r([new a(s.L.ofLength(e.length),s.L.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}}class a{static invert(e,t){const i=[];return(0,n.pN)(e,((e,n)=>{i.push(a.fromOffsetPairs(e?e.getEndExclusives():l.zero,n?n.getStarts():new l(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),i}static fromOffsetPairs(e,t){return new a(new s.L(e.offset1,t.offset1),new s.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const i of e){if(t&&!(t.seq1Range.endExclusive<=i.seq1Range.start&&t.seq2Range.endExclusive<=i.seq2Range.start))throw new o.D7("Sequence diffs must be sorted");t=i}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new a(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new a(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new a(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new a(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new a(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(t&&i)return new a(t,i)}getStarts(){return new l(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new l(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class l{static{this.zero=new l(0,0)}static{this.max=new l(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new l(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class c{static{this.instance=new c}isValid(){return!0}}class d{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new o.D7("timeout must be positive")}isValid(){const e=Date.now()-this.startTime{"use strict";i.d(t,{D8:()=>F});var n=i(85053),o=i(79109),s=i(44544),r=i(50371),a=i(8690),l=i(45889);class c{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,i){this.array[e+t*this.width]=i}}function d(e){return 32===e||9===e}class u{static{this.chrKeys=new Map}static getKey(e){let t=this.chrKeys.get(e);return void 0===t&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(e,t,i){this.range=e,this.lines=t,this.source=i,this.histogram=[];let n=0;for(let o=e.startLineNumber-1;o0&&c>0&&3===s.get(r-1,c-1)&&(h+=a.get(r-1,c-1)),h+=n?n(r,c):1):h=-1;const g=Math.max(d,u,h);if(g===h){const e=r>0&&c>0?a.get(r-1,c-1):0;a.set(r,c,e+1),s.set(r,c,3)}else g===d?(a.set(r,c,0),s.set(r,c,1)):g===u&&(a.set(r,c,0),s.set(r,c,2));o.set(r,c,g)}const d=[];let u=e.length,h=t.length;function g(e,t){e+1===u&&t+1===h||d.push(new l.$8(new r.L(e+1,u),new r.L(t+1,h))),u=e,h=t}let p=e.length-1,f=t.length-1;while(p>=0&&f>=0)3===s.get(p,f)?(g(p,f),p--,f--):1===s.get(p,f)?p--:f--;return g(-1,-1),d.reverse(),new l.SL(d,!1)}}class g{compute(e,t,i=l.uY.instance){if(0===e.length||0===t.length)return l.SL.trivial(e,t);const n=e,o=t;function s(e,t){while(en.length||h>o.length)continue;const g=s(l,h);c.set(u,g);const f=l===r?d.get(u+1):d.get(u-1);if(d.set(u,g!==l?new p(f,l,h,g-l):f),c.get(u)===n.length&&c.get(u)-u===o.length)break e}}let h=d.get(u);const g=[];let _=n.length,v=o.length;while(1){const e=h?h.x+h.length:0,t=h?h.y+h.length:0;if(e===_&&t===v||g.push(new l.$8(new r.L(e,_),new r.L(t,v))),!h)break;_=h.x,v=h.y,h=h.prev}return g.reverse(),new l.SL(g,!1)}}class p{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class f{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class m{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var _=i(93866),v=i(43654),b=i(21553),y=i(36788);class w{constructor(e,t,i){this.lines=e,this.range=t,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let n=this.range.startLineNumber;n<=this.range.endLineNumber;n++){let t=e[n-1],o=0;n===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,t=t.substring(o)),this.lineStartOffsets.push(o);let s=0;if(!i){const e=t.trimStart();s=t.length-e.length,t=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const r=n===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-s,t.length):t.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=x(e>0?this.elements[e-1]:-1),i=x(et<=e)),n=e-this.firstElementOffsetByLineIdx[i];return new y.y(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+n+(0===n&&"left"===t?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const t=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(t)?a.Q.fromPositions(i,i):a.Q.fromPositions(t,i)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!C(this.elements[e]))return;let t=e;while(t>0&&C(this.elements[t-1]))t--;let i=e;while(it<=e.start))??0,i=(0,v.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new r.L(t,i)}}function C(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const S={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:30,[6]:3,[7]:10,[8]:10};function k(e){return S[e]}function x(e){return 10===e?8:13===e?7:d(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function E(e,t,i,o,s,r){let{moves:a,excludedChanges:l}=T(e,t,i,r);if(!r.isValid())return[];const c=e.filter((e=>!l.has(e))),d=I(c,o,s,t,i,r);return(0,n.E4)(a,d),a=D(a),a=a.filter((e=>{const i=e.original.toOffsetRange().slice(t).map((e=>e.trim())),n=i.join("\n");return n.length>=15&&L(i,(e=>e.length>=2))>=2})),a=N(e,a),a}function L(e,t){let i=0;for(const n of e)t(n)&&i++;return i}function T(e,t,i,n){const o=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new u(e.original,t,e))),r=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new u(e.modified,i,e)))),a=new Set;for(const l of s){let e,t=-1;for(const i of r){const n=l.computeSimilarity(i);n>t&&(t=n,e=i)}if(t>.9&&e&&(r.delete(e),o.push(new _.WL(l.range,e.range)),a.add(l.source),a.add(e.source)),!n.isValid())return{moves:o,excludedChanges:a}}return{moves:o,excludedChanges:a}}function I(e,t,i,o,r,a){const l=[],c=new b.db;for(const n of e)for(let e=n.original.startLineNumber;ee.modified.startLineNumber),n.U9));for(const n of e){let e=[];for(let t=n.modified.startLineNumber;t{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===o.endLineNumberExclusive)return n.originalLineRange=new s.M(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new s.M(n.modifiedLineRange.startLineNumber,o.endLineNumberExclusive),void r.push(n);const i={modifiedLineRange:o,originalLineRange:t};d.push(i),r.push(i)})),e=r}if(!a.isValid())return[]}d.sort((0,n.Hw)((0,n.VE)((e=>e.modifiedLineRange.length),n.U9)));const u=new s.S,h=new s.S;for(const n of d){const e=n.modifiedLineRange.startLineNumber-n.originalLineRange.startLineNumber,t=u.subtractFrom(n.modifiedLineRange),i=h.subtractFrom(n.originalLineRange).getWithDelta(e),o=t.getIntersection(i);for(const n of o.ranges){if(n.length<3)continue;const t=n,i=n.delta(-e);l.push(new _.WL(i,t)),u.addRange(t),h.addRange(i)}}l.sort((0,n.VE)((e=>e.original.startLineNumber),n.U9));const g=new v.vJ(e);for(let n=0;ne.original.startLineNumber<=t.original.startLineNumber)),c=(0,v.lx)(e,(e=>e.modified.startLineNumber<=t.modified.startLineNumber)),d=Math.max(t.original.startLineNumber-i.original.startLineNumber,t.modified.startLineNumber-c.modified.startLineNumber),p=g.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbero.length||i>r.length)break;if(u.contains(i)||h.contains(e))break;if(!R(o[e-1],r[i-1],a))break}for(b>0&&(h.addRange(new s.M(t.original.startLineNumber-b,t.original.startLineNumber)),u.addRange(new s.M(t.modified.startLineNumber-b,t.modified.startLineNumber))),y=0;yo.length||i>r.length)break;if(u.contains(i)||h.contains(e))break;if(!R(o[e-1],r[i-1],a))break}y>0&&(h.addRange(new s.M(t.original.endLineNumberExclusive,t.original.endLineNumberExclusive+y)),u.addRange(new s.M(t.modified.endLineNumberExclusive,t.modified.endLineNumberExclusive+y))),(b>0||y>0)&&(l[n]=new _.WL(new s.M(t.original.startLineNumber-b,t.original.endLineNumberExclusive+y),new s.M(t.modified.startLineNumber-b,t.modified.endLineNumberExclusive+y)))}return l}function R(e,t,i){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const n=new g,o=n.compute(new w([e],new a.Q(1,1,1,e.length),!1),new w([t],new a.Q(1,1,1,t.length),!1),i);let s=0;const r=l.$8.invert(o.diffs,e.length);for(const a of r)a.seq1Range.forEach((t=>{d(e.charCodeAt(t))||s++}));function c(t){let i=0;for(let n=0;nt.length?e:t),h=s/u>.6&&u>10;return h}function D(e){if(0===e.length)return e;e.sort((0,n.VE)((e=>e.original.startLineNumber),n.U9));const t=[e[0]];for(let i=1;i=0&&r>=0;a&&s+r<=2?t[t.length-1]=n.join(o):t.push(o)}return t}function N(e,t){const i=new v.vJ(e);return t=t.filter((t=>{const n=i.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbere===t)))return new M.p([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new M.p([new _.wm(new s.M(1,e.length+1),new s.M(1,t.length+1),[new _.q6(new a.Q(1,1,e.length,e[e.length-1].length+1),new a.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const c=0===i.maxComputationTimeMs?l.uY.instance:new l.aY(i.maxComputationTimeMs),d=!i.ignoreTrimWhitespace,u=new Map;function h(e){let t=u.get(e);return void 0===t&&(t=u.size,u.set(e,t)),t}const g=e.map((e=>h(e.trim()))),p=t.map((e=>h(e.trim()))),f=new O(g,e),m=new O(p,t),v=(()=>f.length+m.length<1700?this.dynamicProgrammingDiffing.compute(f,m,c,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(f,m,c))();let b=v.diffs,y=v.hitTimeout;b=(0,A.NC)(f,m,b),b=(0,A.X5)(f,m,b);const w=[],C=i=>{if(d)for(let n=0;nn.seq1Range.start-S===n.seq2Range.start-k));const i=n.seq1Range.start-S;C(i),S=n.seq1Range.endExclusive,k=n.seq2Range.endExclusive;const s=this.refineDiff(e,t,n,c,d);s.hitTimeout&&(y=!0);for(const e of s.mappings)w.push(e)}C(e.length-S);const x=B(w,e,t);let E=[];return i.computeMoves&&(E=this.computeMoves(x,e,t,g,p,c,d)),(0,o.Ft)((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const o of x){if(!o.innerChanges)return!1;for(const n of o.innerChanges){const o=i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e);if(!o)return!1}if(!n(o.modified,t)||!n(o.original,e))return!1}return!0})),new M.p(x,E,y)}computeMoves(e,t,i,n,o,s,r){const a=E(e,t,i,n,o,s),c=a.map((e=>{const n=this.refineDiff(t,i,new l.$8(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,r),o=B(n.mappings,t,i,!0);return new M.t(e,o)}));return c}refineDiff(e,t,i,n,o){const s=H(i),r=s.toRangeMapping2(e,t),a=new w(e,r.originalRange,o),c=new w(t,r.modifiedRange,o),d=a.length+c.length<500?this.dynamicProgrammingDiffing.compute(a,c,n):this.myersDiffingAlgorithm.compute(a,c,n),u=!1;let h=d.diffs;u&&l.$8.assertSorted(h),h=(0,A.NC)(a,c,h),u&&l.$8.assertSorted(h),h=(0,A.Lk)(a,c,h),u&&l.$8.assertSorted(h),h=(0,A.sq)(a,c,h),u&&l.$8.assertSorted(h),h=(0,A.Rl)(a,c,h),u&&l.$8.assertSorted(h);const g=h.map((e=>new _.q6(a.translateRange(e.seq1Range),c.translateRange(e.seq2Range))));return u&&_.q6.assertSorted(g),{mappings:g,hitTimeout:d.hitTimeout}}}function B(e,t,i,s=!1){const r=[];for(const o of(0,n.n)(e.map((e=>W(e,t,i))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=o[0],t=o[o.length-1];r.push(new _.wm(e.original.join(t.original),e.modified.join(t.modified),o.map((e=>e.innerChanges[0]))))}return(0,o.Ft)((()=>{if(!s&&r.length>0){if(r[0].modified.startLineNumber!==r[0].original.startLineNumber)return!1;if(i.length-r[r.length-1].modified.endLineNumberExclusive!==t.length-r[r.length-1].original.endLineNumberExclusive)return!1}return(0,o.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+o&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+o&&(n=1);const r=new s.M(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+o),a=new s.M(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+o);return new _.wm(r,a,[e])}function H(e){return new _.WL(new s.M(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new s.M(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}},79233:(e,t,i)=>{"use strict";i.d(t,{Lk:()=>u,NC:()=>r,Rl:()=>p,X5:()=>g,sq:()=>d});var n=i(85053),o=i(50371),s=i(45889);function r(e,t,i){let n=i;return n=a(e,t,n),n=a(e,t,n),n=l(e,t,n),n}function a(e,t,i){if(0===i.length)return i;const n=[];n.push(i[0]);for(let a=1;a0&&(l=l.delta(c))}r.push(l)}return n.length>0&&r.push(n[n.length-1]),r}function l(e,t,i){if(!e.getBoundaryScore||!t.getBoundaryScore)return i;for(let n=0;n0?i[n-1]:void 0,r=i[n],a=n+1=n.start&&e.seq2Range.start-r>=o.start&&i.isStronglyEqual(e.seq2Range.start-r,e.seq2Range.endExclusive-r)&&rc&&(c=r,l=d)}return e.delta(l)}function d(e,t,i){const n=[];for(const o of i){const e=n[n.length-1];e?o.seq1Range.start-e.seq1Range.endExclusive<=2||o.seq2Range.start-e.seq2Range.endExclusive<=2?n[n.length-1]=new s.$8(e.seq1Range.join(o.seq1Range),e.seq2Range.join(o.seq2Range)):n.push(o):n.push(o)}return n}function u(e,t,i){const n=s.$8.invert(i,e.length),o=[];let r=new s._3(0,0);function a(i,a){if(i.offset10){const i=n[0],o=i.seq1Range.intersects(d.seq1Range)||i.seq2Range.intersects(d.seq2Range);if(!o)break;const r=e.findWordContaining(i.seq1Range.start),a=t.findWordContaining(i.seq2Range.start),l=new s.$8(r,a),c=l.intersect(i);if(h+=c.seq1Range.length,g+=c.seq2Range.length,d=d.join(l),!(d.seq1Range.endExclusive>=i.seq1Range.endExclusive))break;n.shift()}h+g<2*(d.seq1Range.length+d.seq2Range.length)/3&&o.push(d),r=d.getEndExclusives()}while(n.length>0){const e=n.shift();e.seq1Range.isEmpty||(a(e.getStarts(),e),a(e.getEndExclusives().delta(-1),e))}const l=h(i,o);return l}function h(e,t){const i=[];while(e.length>0||t.length>0){const n=e[0],o=t[0];let s;s=n&&(!o||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=s.seq1Range.start?i[i.length-1]=i[i.length-1].join(s):i.push(s)}return i}function g(e,t,i){let n=i;if(0===n.length)return n;let s,r=0;do{s=!1;const a=[n[0]];for(let l=1;l5||i.seq1Range.length+i.seq2Range.length>5)}const h=u(d,c);h?(s=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(r++<10&&s);return n}function p(e,t,i){let r=i;if(0===r.length)return r;let a,l=0;do{a=!1;const d=[r[0]];for(let u=1;u5||s.length>500)return!1;const a=e.getText(s).trim();if(a.length>20||a.split(/\r\n|\r|\n/).length>1)return!1;const l=e.countLinesIn(i.seq1Range),c=i.seq1Range.length,d=t.countLinesIn(i.seq2Range),u=i.seq2Range.length,p=e.countLinesIn(n.seq1Range),f=n.seq1Range.length,m=t.countLinesIn(n.seq2Range),_=n.seq2Range.length,v=130;function b(e){return Math.min(e,v)}return Math.pow(Math.pow(b(40*l+c),1.5)+Math.pow(b(40*d+u),1.5),1.5)+Math.pow(Math.pow(b(40*p+f),1.5)+Math.pow(b(40*m+_),1.5),1.5)>(v**1.5)**1.5*1.3}const f=p(g,h);f?(a=!0,d[d.length-1]=d[d.length-1].join(h)):d.push(h)}r=d}while(l++<10&&a);const c=[];return(0,n.kj)(r,((t,i,n)=>{let r=i;function a(e){return e.length>0&&e.trim().length<=3&&i.seq1Range.length+i.seq2Range.length>100}const l=e.extendToFullLines(i.seq1Range),d=e.getText(new o.L(l.start,i.seq1Range.start));a(d)&&(r=r.deltaStart(-d.length));const u=e.getText(new o.L(i.seq1Range.endExclusive,l.endExclusive));a(u)&&(r=r.deltaEnd(u.length));const h=s.$8.fromOffsetPairs(t?t.getEndExclusives():s._3.zero,n?n.getStarts():s._3.max),g=r.intersect(h);c.length>0&&g.getStarts().equals(c[c.length-1].getEndExclusives())?c[c.length-1]=c[c.length-1].join(g):c.push(g)})),c}},42198:(e,t,i)=>{"use strict";i.d(t,{p:()=>n,t:()=>o});class n{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class o{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}},93866:(e,t,i)=>{"use strict";i.d(t,{WL:()=>l,q6:()=>h,wm:()=>u});var n=i(14396),o=i(44544),s=i(36788),r=i(8690),a=i(362);class l{static inverse(e,t,i){const n=[];let s=1,r=1;for(const c of e){const e=new l(new o.M(s,c.original.startLineNumber),new o.M(r,c.modified.startLineNumber));e.modified.isEmpty||n.push(e),s=c.original.endLineNumberExclusive,r=c.modified.endLineNumberExclusive}const a=new l(new o.M(s,t+1),new o.M(r,i+1));return a.modified.isEmpty||n.push(a),n}static clip(e,t,i){const n=[];for(const o of e){const e=o.original.intersect(t),s=o.modified.intersect(i);e&&!e.isEmpty&&s&&!s.isEmpty&&n.push(new l(e,s))}return n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new l(this.modified,this.original)}join(e){return new l(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new h(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new n.D7("not a valid diff");return new h(new r.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new r.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new h(new r.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new r.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(d(this.original.endLineNumberExclusive,e)&&d(this.modified.endLineNumberExclusive,t))return new h(new r.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new r.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new h(r.Q.fromPositions(new s.y(this.original.startLineNumber,1),c(new s.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),r.Q.fromPositions(new s.y(this.modified.startLineNumber,1),c(new s.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new h(r.Q.fromPositions(c(new s.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),c(new s.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),r.Q.fromPositions(c(new s.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),c(new s.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new n.D7}}function c(e,t){if(e.lineNumber<1)return new s.y(1,1);if(e.lineNumber>t.length)return new s.y(t.length,t[t.length-1].length+1);const i=t[e.lineNumber-1];return e.column>i.length+1?new s.y(e.lineNumber,i.length+1):e}function d(e,t){return e>=1&&e<=t.length}class u extends l{static fromRangeMappings(e){const t=o.M.join(e.map((e=>o.M.fromRangeInclusive(e.originalRange)))),i=o.M.join(e.map((e=>o.M.fromRangeInclusive(e.modifiedRange))));return new u(t,i,e)}constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){return new u(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new u(this.original,this.modified,[this.toRangeMapping()])}}class h{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new h(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new a.WR(this.originalRange,t)}}},5868:(e,t,i)=>{"use strict";i.d(t,{f:()=>n});class n{constructor(e,t,i,n,o,s,r){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=o,this._run=s,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}},69483:(e,t,i)=>{"use strict";i.d(t,{_:()=>n});const n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},57479:(e,t,i)=>{"use strict";i.d(t,{R:()=>n});var n,o=i(41337),s=i(18904);(function(e){e.editorSimpleInput=new s.N1("editorSimpleInput",!1,!0),e.editorTextFocus=new s.N1("editorTextFocus",!1,o.kg("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new s.N1("editorFocus",!1,o.kg("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new s.N1("textInputFocus",!1,o.kg("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new s.N1("editorReadonly",!1,o.kg("editorReadonly","Whether the editor is read-only")),e.inDiffEditor=new s.N1("inDiffEditor",!1,o.kg("inDiffEditor","Whether the context is a diff editor")),e.isEmbeddedDiffEditor=new s.N1("isEmbeddedDiffEditor",!1,o.kg("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),e.inMultiDiffEditor=new s.N1("inMultiDiffEditor",!1,o.kg("inMultiDiffEditor","Whether the context is a multi diff editor")),e.multiDiffEditorAllCollapsed=new s.N1("multiDiffEditorAllCollapsed",void 0,o.kg("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),e.hasChanges=new s.N1("diffEditorHasChanges",!1,o.kg("diffEditorHasChanges","Whether the diff editor has changes")),e.comparingMovedCode=new s.N1("comparingMovedCode",!1,o.kg("comparingMovedCode","Whether a moved code block is selected for comparison")),e.accessibleDiffViewerVisible=new s.N1("accessibleDiffViewerVisible",!1,o.kg("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),e.diffEditorRenderSideBySideInlineBreakpointReached=new s.N1("diffEditorRenderSideBySideInlineBreakpointReached",!1,o.kg("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),e.diffEditorInlineMode=new s.N1("diffEditorInlineMode",!1,o.kg("diffEditorInlineMode","Whether inline mode is active")),e.diffEditorOriginalWritable=new s.N1("diffEditorOriginalWritable",!1,o.kg("diffEditorOriginalWritable","Whether modified is writable in the diff editor")),e.diffEditorModifiedWritable=new s.N1("diffEditorModifiedWritable",!1,o.kg("diffEditorModifiedWritable","Whether modified is writable in the diff editor")),e.diffEditorOriginalUri=new s.N1("diffEditorOriginalUri","",o.kg("diffEditorOriginalUri","The uri of the original document")),e.diffEditorModifiedUri=new s.N1("diffEditorModifiedUri","",o.kg("diffEditorModifiedUri","The uri of the modified document")),e.columnSelection=new s.N1("editorColumnSelection",!1,o.kg("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new s.N1("editorHasSelection",!1,o.kg("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new s.N1("editorHasMultipleSelections",!1,o.kg("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new s.N1("editorTabMovesFocus",!1,o.kg("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new s.N1("isInEmbeddedEditor",!1,!0),e.canUndo=new s.N1("canUndo",!1,!0),e.canRedo=new s.N1("canRedo",!1,!0),e.hoverVisible=new s.N1("editorHoverVisible",!1,o.kg("editorHoverVisible","Whether the editor hover is visible")),e.hoverFocused=new s.N1("editorHoverFocused",!1,o.kg("editorHoverFocused","Whether the editor hover is focused")),e.stickyScrollFocused=new s.N1("stickyScrollFocused",!1,o.kg("stickyScrollFocused","Whether the sticky scroll is focused")),e.stickyScrollVisible=new s.N1("stickyScrollVisible",!1,o.kg("stickyScrollVisible","Whether the sticky scroll is visible")),e.standaloneColorPickerVisible=new s.N1("standaloneColorPickerVisible",!1,o.kg("standaloneColorPickerVisible","Whether the standalone color picker is visible")),e.standaloneColorPickerFocused=new s.N1("standaloneColorPickerFocused",!1,o.kg("standaloneColorPickerFocused","Whether the standalone color picker is focused")),e.inCompositeEditor=new s.N1("inCompositeEditor",void 0,o.kg("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new s.N1("editorLangId","",o.kg("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new s.N1("editorHasCompletionItemProvider",!1,o.kg("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new s.N1("editorHasCodeActionsProvider",!1,o.kg("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new s.N1("editorHasCodeLensProvider",!1,o.kg("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new s.N1("editorHasDefinitionProvider",!1,o.kg("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new s.N1("editorHasDeclarationProvider",!1,o.kg("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new s.N1("editorHasImplementationProvider",!1,o.kg("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new s.N1("editorHasTypeDefinitionProvider",!1,o.kg("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new s.N1("editorHasHoverProvider",!1,o.kg("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new s.N1("editorHasDocumentHighlightProvider",!1,o.kg("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new s.N1("editorHasDocumentSymbolProvider",!1,o.kg("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new s.N1("editorHasReferenceProvider",!1,o.kg("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new s.N1("editorHasRenameProvider",!1,o.kg("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new s.N1("editorHasSignatureHelpProvider",!1,o.kg("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new s.N1("editorHasInlayHintsProvider",!1,o.kg("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new s.N1("editorHasDocumentFormattingProvider",!1,o.kg("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new s.N1("editorHasDocumentSelectionFormattingProvider",!1,o.kg("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new s.N1("editorHasMultipleDocumentFormattingProvider",!1,o.kg("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new s.N1("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.kg("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(n||(n={}))},36285:(e,t,i)=>{"use strict";i.d(t,{T:()=>s,x:()=>o});const n=[];function o(e){n.push(e)}function s(){return n.slice(0)}},4577:(e,t,i)=>{"use strict";i.d(t,{x:()=>n});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!==(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){const t=this.getForeground(e);let i="mtk"+t;const n=this.getFontStyle(e);return 1&n&&(i+=" mtki"),2&n&&(i+=" mtkb"),4&n&&(i+=" mtku"),8&n&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let s="";return 4&n&&(s+=" underline"),8&n&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}},35784:(e,t,i)=>{"use strict";i.d(t,{f:()=>s});var n=i(13589),o=i(52444);function s(e,t,i,r,a,l){if(Array.isArray(e)){let n=0;for(const o of e){const e=s(o,t,i,r,a,l);if(10===e)return e;e>n&&(n=e)}return n}if("string"===typeof e)return r?"*"===e?5:e===i?10:0:0;if(e){const{language:s,pattern:c,scheme:d,hasAccessToAllModels:u,notebookType:h}=e;if(!r&&!u)return 0;h&&a&&(t=a);let g=0;if(d)if(d===t.scheme)g=10;else{if("*"!==d)return 0;g=5}if(s)if(s===i)g=10;else{if("*"!==s)return 0;g=Math.max(g,5)}if(h)if(h===l)g=10;else{if("*"!==h||void 0===l)return 0;g=Math.max(g,5)}if(c){let e;if(e="string"===typeof c?c:{...c,base:(0,o.S8)(c.base)},e!==t.fsPath&&!(0,n.YW)(e,t.fsPath))return 0;g=10}return g}return 0}},35350:(e,t,i)=>{"use strict";i.d(t,{uB:()=>L,HC:()=>u,Kb:()=>f,FX:()=>g,rY:()=>b,lO:()=>I,M$:()=>d,r4:()=>T,qw:()=>h,sm:()=>A,v_:()=>R,OV:()=>x,YT:()=>E,GE:()=>y,WA:()=>p,gP:()=>k,ou:()=>_,dG:()=>D,$M:()=>v,OB:()=>N,PK:()=>S,Iu:()=>w});var n=i(25923),o=i(29133),s=i(8690),r=i(40231),a=i(5091);class l{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,a.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const i=new c(this,e,t);return this._factories.set(e,i),(0,a.s)((()=>{const t=this._factories.get(e);t&&t===i&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){const t=this.get(e);if(t)return!0;const i=this._factories.get(e);return!(i&&!i.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class c extends a.jG{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var d,u,h,g,p,f,m=i(41337);class _{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class v{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class b{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}(function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"})(d||(d={})),function(e){const t=new Map;function i(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=n.W.symbolProperty),i}t.set(0,n.W.symbolMethod),t.set(1,n.W.symbolFunction),t.set(2,n.W.symbolConstructor),t.set(3,n.W.symbolField),t.set(4,n.W.symbolVariable),t.set(5,n.W.symbolClass),t.set(6,n.W.symbolStruct),t.set(7,n.W.symbolInterface),t.set(8,n.W.symbolModule),t.set(9,n.W.symbolProperty),t.set(10,n.W.symbolEvent),t.set(11,n.W.symbolOperator),t.set(12,n.W.symbolUnit),t.set(13,n.W.symbolValue),t.set(15,n.W.symbolEnum),t.set(14,n.W.symbolConstant),t.set(15,n.W.symbolEnum),t.set(16,n.W.symbolEnumMember),t.set(17,n.W.symbolKeyword),t.set(27,n.W.symbolSnippet),t.set(18,n.W.symbolText),t.set(19,n.W.symbolColor),t.set(20,n.W.symbolFile),t.set(21,n.W.symbolReference),t.set(22,n.W.symbolCustomColor),t.set(23,n.W.symbolFolder),t.set(24,n.W.symbolTypeParameter),t.set(25,n.W.account),t.set(26,n.W.issues),e.toIcon=i;const o=new Map;function s(e,t){let i=o.get(e);return"undefined"!==typeof i||t||(i=9),i}o.set("method",0),o.set("function",1),o.set("constructor",2),o.set("field",3),o.set("variable",4),o.set("class",5),o.set("struct",6),o.set("interface",7),o.set("module",8),o.set("property",9),o.set("event",10),o.set("operator",11),o.set("unit",12),o.set("value",13),o.set("constant",14),o.set("enum",15),o.set("enum-member",16),o.set("enumMember",16),o.set("keyword",17),o.set("snippet",27),o.set("text",18),o.set("color",19),o.set("file",20),o.set("reference",21),o.set("customcolor",22),o.set("folder",23),o.set("type-parameter",24),o.set("typeParameter",24),o.set("account",25),o.set("issue",26),e.fromString=s}(u||(u={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(h||(h={}));class y{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return s.Q.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}function w(e){return e&&o.r.isUri(e.uri)&&s.Q.isIRange(e.range)&&(s.Q.isIRange(e.originSelectionRange)||s.Q.isIRange(e.targetSelectionRange))}(function(e){e[e["Automatic"]=0]="Automatic",e[e["PasteAs"]=1]="PasteAs"})(g||(g={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(p||(p={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(f||(f={}));const C={[17]:(0,m.kg)("Array","array"),[16]:(0,m.kg)("Boolean","boolean"),[4]:(0,m.kg)("Class","class"),[13]:(0,m.kg)("Constant","constant"),[8]:(0,m.kg)("Constructor","constructor"),[9]:(0,m.kg)("Enum","enumeration"),[21]:(0,m.kg)("EnumMember","enumeration member"),[23]:(0,m.kg)("Event","event"),[7]:(0,m.kg)("Field","field"),[0]:(0,m.kg)("File","file"),[11]:(0,m.kg)("Function","function"),[10]:(0,m.kg)("Interface","interface"),[19]:(0,m.kg)("Key","key"),[5]:(0,m.kg)("Method","method"),[1]:(0,m.kg)("Module","module"),[2]:(0,m.kg)("Namespace","namespace"),[20]:(0,m.kg)("Null","null"),[15]:(0,m.kg)("Number","number"),[18]:(0,m.kg)("Object","object"),[24]:(0,m.kg)("Operator","operator"),[3]:(0,m.kg)("Package","package"),[6]:(0,m.kg)("Property","property"),[14]:(0,m.kg)("String","string"),[22]:(0,m.kg)("Struct","struct"),[25]:(0,m.kg)("TypeParameter","type parameter"),[12]:(0,m.kg)("Variable","variable")};function S(e,t){return(0,m.kg)("symbolAriaLabel","{0} ({1})",e,C[t])}var k,x,E,L,T;(function(e){const t=new Map;function i(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=n.W.symbolProperty),i}t.set(0,n.W.symbolFile),t.set(1,n.W.symbolModule),t.set(2,n.W.symbolNamespace),t.set(3,n.W.symbolPackage),t.set(4,n.W.symbolClass),t.set(5,n.W.symbolMethod),t.set(6,n.W.symbolProperty),t.set(7,n.W.symbolField),t.set(8,n.W.symbolConstructor),t.set(9,n.W.symbolEnum),t.set(10,n.W.symbolInterface),t.set(11,n.W.symbolFunction),t.set(12,n.W.symbolVariable),t.set(13,n.W.symbolConstant),t.set(14,n.W.symbolString),t.set(15,n.W.symbolNumber),t.set(16,n.W.symbolBoolean),t.set(17,n.W.symbolArray),t.set(18,n.W.symbolObject),t.set(19,n.W.symbolKey),t.set(20,n.W.symbolNull),t.set(21,n.W.symbolEnumMember),t.set(22,n.W.symbolStruct),t.set(23,n.W.symbolEvent),t.set(24,n.W.symbolOperator),t.set(25,n.W.symbolTypeParameter),e.toIcon=i})(k||(k={}));class I{static{this.Comment=new I("comment")}static{this.Imports=new I("imports")}static{this.Region=new I("region")}static fromValue(e){switch(e){case"comment":return I.Comment;case"imports":return I.Imports;case"region":return I.Region}return new I(e)}constructor(e){this.value=e}}(function(e){e[e["AIGenerated"]=1]="AIGenerated"})(x||(x={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(E||(E={})),function(e){function t(e){return!(!e||"object"!==typeof e)&&("string"===typeof e.id&&"string"===typeof e.title)}e.is=t}(L||(L={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(T||(T={}));class R{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then((e=>{e&&e.dispose()}))}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const D=new l,N=new l;var A;(function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"})(A||(A={}))},67502:(e,t,i)=>{"use strict";i.d(t,{$f:()=>l,MU:()=>c,Yb:()=>u,_t:()=>d,vn:()=>a});var n=i(20601),o=i(98831),s=i(56973);function r(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.tokenization.getLanguageIdAtPosition(o,0)!==n)return s;const t=e.getLineContent(o);if(!i.shouldIgnore(o)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}function a(e,t,i,a=!0,l){if(e<4)return null;const c=l.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!c)return null;const d=new s.no(t,c,l);if(i<=1)return{indentation:"",action:null};for(let n=i-1;n>0;n--){if(""!==t.getLineContent(n))break;if(1===n)return{indentation:"",action:null}}const u=r(t,i,d);if(u<0)return null;if(u<1)return{indentation:"",action:null};if(d.shouldIncrease(u)||d.shouldIndentNextLine(u)){const e=t.getLineContent(u);return{indentation:n.UU(e),action:o.l.Indent,line:u}}if(d.shouldDecrease(u)){const e=t.getLineContent(u);return{indentation:n.UU(e),action:null,line:u}}{if(1===u)return{indentation:n.UU(t.getLineContent(u)),action:null,line:u};const e=u-1,i=c.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let t=e-1;t>0;t--)if(!d.shouldIndentNextLine(t)){i=t;break}return{indentation:n.UU(t.getLineContent(i+1)),action:null,line:i+1}}if(a)return{indentation:n.UU(t.getLineContent(u)),action:null,line:u};for(let s=u;s>0;s--){if(d.shouldIncrease(s))return{indentation:n.UU(t.getLineContent(s)),action:o.l.Indent,line:s};if(d.shouldIndentNextLine(s)){let e=0;for(let t=s-1;t>0;t--)if(!d.shouldIndentNextLine(s)){e=t;break}return{indentation:n.UU(t.getLineContent(e+1)),action:null,line:e+1}}if(d.shouldDecrease(s))return{indentation:n.UU(t.getLineContent(s)),action:null,line:s}}return{indentation:n.UU(t.getLineContent(1)),action:null,line:1}}}function l(e,t,i,r,l,c){if(e<4)return null;const d=c.getLanguageConfiguration(i);if(!d)return null;const u=c.getLanguageConfiguration(i).indentRulesSupport;if(!u)return null;const h=new s.no(t,u,c),g=a(e,t,r,void 0,c);if(g){const i=g.line;if(void 0!==i){let s=!0;for(let e=i;e0){const o=t.getLineContent(y);if(g.shouldIndentNextLine(o)&&g.shouldIncrease(b)){const o=a(d,t,i.startLineNumber,!1,c),s=o?.indentation;if(void 0!==s){const o=t.getLineContent(i.startLineNumber),a=n.UU(o),c=l.shiftIndent(s),d=c===a,u=/^\s*$/.test(v),h=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(r),g=h&&h.length>0,p=g&&u;if(d&&p)return s}}}return null}function u(e,t,i){const n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}function h(e,t,i){const n={tokenization:{getLineTokens:n=>n===t?i:e.tokenization.getLineTokens(n),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:n=>n===t?i.getLineContent():e.getLineContent(n)};return n}},41411:(e,t,i)=>{"use strict";i.d(t,{h:()=>r});var n=i(98831),o=i(50395),s=i(56973);function r(e,t,i,r){t.tokenization.forceTokenization(i.startLineNumber);const a=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),l=r.getLanguageConfiguration(a);if(!l)return null;const c=new s.V(t,r),d=c.getProcessedTokenContextAroundRange(i),u=d.previousLineProcessedTokens.getLineContent(),h=d.beforeRangeProcessedTokens.getLineContent(),g=d.afterRangeProcessedTokens.getLineContent(),p=l.onEnter(e,u,h,g);if(!p)return null;const f=p.indentAction;let m=p.appendText;const _=p.removeText||0;m?f===n.l.Indent&&(m="\t"+m):m=f===n.l.Indent||f===n.l.IndentOutdent?"\t":"";let v=(0,o.Cw)(t,i.startLineNumber,i.startColumn);return _&&(v=v.substring(0,v.length-_)),{indentAction:f,appendText:m,removeText:_,indentation:v}}},14573:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(87778);const o=(0,n.u1)("languageService")},98831:(e,t,i)=>{"use strict";var n;i.d(t,{GB:()=>s,i3:()=>o,l:()=>n}),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(n||(n={}));class o{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t{"use strict";i.d(t,{JZ:()=>D,Cw:()=>F});var n=i(40231),o=i(5091),s=i(20601),r=i(60939),a=i(98831);class l{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t"}static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.i3(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.i3({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.i3({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"===typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"===typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}var c=i(85053),d=i(23099),u=i(28889);class h{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return(0,c.dM)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,d.Yo)(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=u.Fu.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase(),l=this._richEditBrackets.textIsOpenBracket[a];if(l)return null;const c=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var f=i(14396);class m{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=m._createOpenBracketRegExp(e[0]),i=m._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let o=0,s=this._regExpRules.length;o!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))));if(s)return e.action}if(e>=2&&i.length>0&&n.length>0)for(let o=0,s=this._brackets.length;o=2&&i.length>0)for(let o=0,s=this._brackets.length;o{const t=new Set;return{info:new E(this,e,t),closing:t}})),o=new C.VV((e=>{const t=new Set,i=new Set;return{info:new L(this,e,t,i),opening:t,openingColorized:i}}));for(const[r,a]of i){const e=n.get(r),t=o.get(a);e.closing.add(t.info),t.opening.add(e.info)}const s=t.colorizedBracketPairs?k(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[r,a]of s){const e=n.get(r),t=o.get(a);e.closing.add(t.info),t.openingColorized.add(e.info),t.opening.add(e.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...o.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return(0,u.xb)(t,e)}}function k(e){return e.filter((([e,t])=>""!==e&&""!==t))}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class E extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class L extends x{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e["config"]===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e["config"]===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};class R{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const D=(0,_.u1)("languageConfigurationService");let N=class extends o.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new j),this.onDidChangeEmitter=this._register(new n.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(O));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new R(void 0));else for(const i of n)this.languageService.isRegisteredLanguageId(i)&&(this.configurations.delete(i),this.onDidChangeEmitter.fire(new R(i)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new R(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=A(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};function A(e,t,i,n){let o=t.getLanguageConfiguration(e);if(!o){if(!n.isRegisteredLanguageId(e))return new z(e,{});o=new z(e,{})}const s=P(o.languageId,i),r=W([o.underlyingConfig,s]),a=new z(o.languageId,r);return a}N=T([I(0,v.pG),I(1,b.L)],N);const O={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function P(e,t){const i=t.getValue(O.brackets,{overrideIdentifier:e}),n=t.getValue(O.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:M(i),colorizedBracketPairs:M(n)}}function M(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function F(e,t,i){const n=e.getLineContent(t);let o=s.UU(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}class B{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new H(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,o.s)((()=>{for(let e=0;ee.configuration))))}}function W(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class H{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class V{constructor(e){this.languageId=e}}class j extends o.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(w.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new B(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new V(e)),(0,o.s)((()=>{s.dispose(),this._onDidChange.fire(new V(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class z{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new m(this.underlyingConfig):null,this.comments=z._handleComments(this.underlyingConfig),this.characterPair=new l(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new u.az(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new h(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.GB(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,y.v)(D,N,1)},65764:(e,t,i)=>{"use strict";i.d(t,{W6:()=>d,vH:()=>u});var n=i(41337),o=i(40231),s=i(16374),r=i(33911),a=i(27503);const l={ModesRegistry:"editor.modesRegistry"};class c{constructor(){this._onDidChangeLanguages=new o.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{"use strict";i.d(t,{$H:()=>s,Lh:()=>r,r3:()=>o});var n=i(35350);const o=new class{clone(){return this}equals(e){return this===e}};function s(e,t){return new n.$M([new n.ou(0,"",e)],t)}function r(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(32768|e|2<<24)>>>0,new n.rY(i,null===t?o:t)}},23099:(e,t,i)=>{"use strict";function n(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),s=e.getLanguageId(n);let r=n;while(r+10&&e.getLanguageId(a-1)===s)a--;return new o(e,s,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{BQ:()=>n,Yo:()=>s});class o{constructor(e,t,i,n,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s,this.languageIdCodec=e.languageIdCodec}getLineContent(){const e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){const t=this._actual.getLineContent();return t.substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function s(e){return 0!==(3&e)}},56973:(e,t,i)=>{"use strict";i.d(t,{V:()=>a,WR:()=>c,no:()=>r});var n=i(20601),o=i(23099),s=i(70164);class r{constructor(e,t,i){this._indentRulesSupport=t,this._indentationLineProcessor=new l(e,i)}shouldIncrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(i)}shouldDecrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(i)}shouldIgnore(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(i)}shouldIndentNextLine(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(i)}}class a{constructor(e,t){this.model=e,this.indentationLineProcessor=new l(e,t)}getProcessedTokenContextAroundRange(e){const t=this._getProcessedTokensBeforeRange(e),i=this._getProcessedTokensAfterRange(e),n=this._getProcessedPreviousLineTokens(e);return{beforeRangeProcessedTokens:t,afterRangeProcessedTokens:i,previousLineProcessedTokens:n}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);const t=this.model.tokenization.getLineTokens(e.startLineNumber),i=(0,o.BQ)(t,e.startColumn-1);let n;if(c(this.model,e.getStartPosition())){const o=e.startColumn-1-i.firstCharOffset,s=i.firstCharOffset,r=s+o;n=t.sliceAndInflate(s,r,0)}else{const i=e.startColumn-1;n=t.sliceAndInflate(0,i,0)}const s=this.indentationLineProcessor.getProcessedTokens(n);return s}_getProcessedTokensAfterRange(e){const t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);const i=this.model.tokenization.getLineTokens(t.lineNumber),n=(0,o.BQ)(i,t.column-1),s=t.column-1-n.firstCharOffset,r=n.firstCharOffset+s,a=n.firstCharOffset+n.getLineLength(),l=i.sliceAndInflate(r,a,0),c=this.indentationLineProcessor.getProcessedTokens(l);return c}_getProcessedPreviousLineTokens(e){const t=e=>{this.model.tokenization.forceTokenization(e);const t=this.model.tokenization.getLineTokens(e),i=this.model.getLineMaxColumn(e)-1,n=(0,o.BQ)(t,i);return n};this.model.tokenization.forceTokenization(e.startLineNumber);const i=this.model.tokenization.getLineTokens(e.startLineNumber),n=(0,o.BQ)(i,e.startColumn-1),r=s.f.createEmpty("",n.languageIdCodec),a=e.startLineNumber-1,l=0===a;if(l)return r;const c=0===n.firstCharOffset;if(!c)return r;const d=t(a),u=n.languageId===d.languageId;if(!u)return r;const h=d.toIViewLineTokens(),g=this.indentationLineProcessor.getProcessedTokens(h);return g}}class l{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){const i=(e,t)=>{const i=n.UU(e),o=t+e.substring(i.length);return o};this.model.tokenization.forceTokenization?.(e);const o=this.model.tokenization.getLineTokens(e);let s=this.getProcessedTokens(o).getLineContent();return void 0!==t&&(s=i(s,t)),s}getProcessedTokens(e){const t=e=>2===e||3===e||1===e,i=e.getLanguageId(0),n=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew,o=n.getBracketRegExp({global:!0}),r=[];e.forEach((i=>{const n=e.getStandardTokenType(i);let s=e.getTokenText(i);t(n)&&(s=s.replace(o,""));const a=e.getMetadata(i);r.push({text:s,metadata:a})}));const a=s.f.createFromTextAndMetadata(r,e.languageIdCodec);return a}}function c(e,t){e.tokenization.forceTokenization(t.lineNumber);const i=e.tokenization.getLineTokens(t.lineNumber),n=(0,o.BQ)(i,t.column-1),s=0===n.firstCharOffset,r=i.getLanguageId(0)===n.languageId,a=!s&&!r;return a}},28889:(e,t,i)=>{"use strict";i.d(t,{Fu:()=>b,az:()=>l,xb:()=>_});var n=i(20601),o=i(13647),s=i(8690);class r{constructor(e,t,i,n,o,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=s,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function a(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let r=0;r{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let r=0;r0&&s.push({open:n,close:o})}return s}class l{constructor(e,t){this._richEditBracketsBrand=void 0;const i=a(t);this.brackets=i.map(((t,n)=>new r(e,n,t.open,t.close,h(t.open,t.close,i,n),g(t.open,t.close,i,n)))),this.forwardRegex=p(this.brackets),this.reversedRegex=f(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const e of n.open)this.textIsBracket[e]=n,this.textIsOpenBracket[e]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,e.length);for(const e of n.close)this.textIsBracket[e]=n,this.textIsOpenBracket[e]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,e.length)}}}function c(e,t,i,n){for(let o=0,s=t.length;o=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function d(e,t){return e.length-t.length}function u(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function h(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let s=0,r=o.length;s=0;n--)t[i++]=e.charCodeAt(n);return o.b7().decode(t)}let t=null,i=null;return function(n){return t!==n&&(t=n,i=e(t)),i}}();class b{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=i.length-(o.index||0),a=o[0].length,l=n+r;return new s.Q(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const s=v(i),r=s.substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,r,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=o.index||0,a=o[0].length;if(0===a)return null;const l=n+r;return new s.Q(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}},82931:(e,t,i)=>{"use strict";i.d(t,{Yj:()=>l,s0:()=>c});var n=i(20601),o=i(70164),s=i(35350),r=i(58403);const a={getInitialState:()=>r.r3,tokenizeEncoded:(e,t,i)=>(0,r.Lh)(0,i)};async function l(e,t,i){if(!i)return d(t,e.languageIdCodec,a);const n=await s.dG.getOrCreate(i);return d(t,e.languageIdCodec,n||a)}function c(e,t,i,n,o,s,r){let a="
    ",l=n,c=0,d=!0;for(let u=0,h=t.getCount();u0)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,h>o||l>=o)break}return a+="
    ",a}function d(e,t,i){let s='
    ';const r=n.uz(e);let a=i.getInitialState();for(let l=0,c=r.length;l0&&(s+="
    ");const c=i.tokenizeEncoded(e,!0,a);o.f.convertToEndOffset(c.tokens,e.length);const d=new o.f(c.tokens,e,t),u=d.inflate();let h=0;for(let t=0,i=u.getCount();t${n.ih(e.substring(h,o))}`,h=o}a=c.endState}return s+="
    ",s}},9322:(e,t,i)=>{"use strict";i.d(t,{A5:()=>n,Dg:()=>l,F4:()=>h,L5:()=>u,VW:()=>s,Wo:()=>d,X2:()=>a,ZS:()=>o,nk:()=>c,vd:()=>g});var n,o,s,r=i(85603);(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(n||(n={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(o||(o={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,r.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"===typeof e.read}class d{constructor(e,t,i,n,o,s){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=s}}class u{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class h{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},82584:(e,t,i)=>{"use strict";i.d(t,{Gc:()=>v,Nn:()=>l,Xw:()=>c,rh:()=>_,yF:()=>m});var n=i(14396),o=i(32142),s=i(94150),r=i(55239);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,s.QB)(n,t.length)),i&&(n=(0,s.QB)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.gV.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,s.QB)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class c extends a{static create23(e,t,i,n=!1){let o=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=(0,s.QB)(o,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=(0,s.QB)(o,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new u(o,e.listHeight+1,e,t,i,r):new d(o,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(s.Vp,0,[],r.gV.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(0),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(0,i),i}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;while(4===t.kind){const e=t.childrenLength;if(0===e)throw new n.D7;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n{"use strict";i.d(t,{W:()=>r,c:()=>s});var n=i(8690),o=i(94150);class s{static fromModelContentChanges(e){const t=e.map((e=>{const t=n.Q.lift(e.range);return new s((0,o.VL)(t.getStartPosition()),(0,o.VL)(t.getEndPosition()),(0,o.rR)(e.text))})).reverse();return t}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${(0,o.l4)(this.startOffset)}...${(0,o.l4)(this.endOffset)}) -> ${(0,o.l4)(this.newLength)}`}}class r{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>a.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:(0,o.MS)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,o.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,o.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=(0,o.l4)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,o.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,o.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){while(this.nextEditIdx{"use strict";i.d(t,{Z:()=>d});var n=i(20601),o=i(82584),s=i(94150),r=i(55239),a=i(39029);class l{static createFromLanguage(e,t){function i(e){return t.getKey(`${e.languageId}:::${e.bracketText}`)}const n=new Map;for(const l of e.bracketsNew.openingBrackets){const e=(0,s.qe)(0,l.bracketText.length),t=i(l),c=r.gV.getEmpty().add(t,r.FD);n.set(l.bracketText,new a.ou(e,1,t,c,o.rh.create(e,l,c)))}for(const l of e.bracketsNew.closingBrackets){const e=(0,s.qe)(0,l.bracketText.length);let t=r.gV.getEmpty();const c=l.getOpeningBrackets();for(const n of c)t=t.add(i(n),r.FD);n.set(l.bracketText,new a.ou(e,2,i(c[0]),t,o.rh.create(e,l,t)))}return new l(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>c(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}function c(e){let t=(0,n.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}class d{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},18485:(e,t,i)=>{"use strict";i.d(t,{M:()=>r});var n=i(85053),o=i(95239),s=i(94150);function r(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new n.j3(l(e)),r=l(t);r.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let c=i.dequeue();function d(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return c&&e.unshift(c),e}const t=[];while(c&&!(0,s.Vh)(e)){const[n,o]=c.splitAt(e);t.push(n),e=(0,s.MS)(n.lengthAfter,e),c=o??i.dequeue()}return(0,s.Vh)(e)||t.push(new a(!1,e,e)),t}const u=[];function h(e,t,i){if(u.length>0&&(0,s.wP)(u[u.length-1].endOffset,e)){const e=u[u.length-1];u[u.length-1]=new o.c(e.startOffset,t,(0,s.QB)(e.newLength,i))}else u.push({startOffset:e,endOffset:t,newLength:i})}let g=s.Vp;for(const n of r){const e=d(n.lengthBefore);if(n.modified){const t=(0,s.pW)(e,(e=>e.lengthBefore)),i=(0,s.QB)(g,t);h(g,i,n.lengthAfter),g=i}else for(const t of e){const e=g;g=(0,s.QB)(g,t.lengthBefore),t.modified&&h(e,g,t.lengthAfter)}}return u}class a{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=(0,s.MS)(e,this.lengthAfter);return(0,s.wP)(t,s.Vp)?[this,void 0]:this.modified?[new a(this.modified,this.lengthBefore,e),new a(this.modified,s.Vp,t)]:[new a(this.modified,e,e),new a(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${(0,s.l4)(this.lengthBefore)} -> ${(0,s.l4)(this.lengthAfter)}`}}function l(e){const t=[];let i=s.Vp;for(const n of e){const e=(0,s.MS)(i,n.startOffset);(0,s.Vh)(e)||t.push(new a(!1,e,e));const o=(0,s.MS)(n.startOffset,n.endOffset);t.push(new a(!0,o,n.newLength)),i=n.endOffset}return t}},94150:(e,t,i)=>{"use strict";i.d(t,{C7:()=>r,MS:()=>_,QB:()=>p,Qx:()=>C,VL:()=>w,Vh:()=>l,Vp:()=>a,eu:()=>h,l4:()=>u,o0:()=>y,pW:()=>f,qe:()=>d,rR:()=>S,sS:()=>g,vr:()=>b,wP:()=>m,zG:()=>v});var n=i(20601),o=i(8690),s=i(33904);function r(e,t,i,n){return e!==i?d(i-e,n):d(0,n-t)}const a=0;function l(e){return 0===e}const c=2**26;function d(e,t){return e*c+t}function u(e){const t=e,i=Math.floor(t/c),n=t-i*c;return new s.W(i,n)}function h(e){return Math.floor(e/c)}function g(e){return e}function p(e,t){let i=e+t;return t>=c&&(i-=e%c),i}function f(e,t){return e.reduce(((e,i)=>p(e,t(i))),a)}function m(e,t){return e===t}function _(e,t){const i=e,n=t,o=n-i;if(o<=0)return a;const s=Math.floor(i/c),r=Math.floor(n/c),l=n-r*c;if(s===r){const e=i-s*c;return d(0,l-e)}return d(r-s,l)}function v(e,t){return e=t}function w(e){return d(e.lineNumber-1,e.column-1)}function C(e,t){const i=e,n=Math.floor(i/c),s=i-n*c,r=t,a=Math.floor(r/c),l=r-a*c;return new o.Q(n+1,s+1,a+1,l+1)}function S(e){const t=(0,n.uz)(e);return d(t.length-1,t[t.length-1].length)}},87867:(e,t,i)=>{"use strict";i.d(t,{T:()=>m});var n=i(82584),o=i(95239),s=i(55239),r=i(94150);function a(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;t++;while(t=2?l(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let r=i();r;r=i())c(n,o)<=c(o,r)?(n=d(n,o),o=r):o=d(o,r);const s=d(n,o);return s}function l(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;while(i>3){const o=i>>1;for(let s=0;s=3?e[2]:null,t)}function c(e,t){return Math.abs(e.listHeight-t.listHeight)}function d(e,t){return e.listHeight===t.listHeight?n.Xw.create23(e,t,null,!1):e.listHeight>t.listHeight?u(e,t):h(t,e)}function u(e,t){e=e.toMutable();let i=e;const o=[];let s;while(1){if(t.listHeight===i.listHeight){s=t;break}if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeLastElementMutable()}for(let r=o.length-1;r>=0;r--){const e=o[r];s?e.childrenLength>=3?s=n.Xw.create23(e.unappendChild(),s,null,!1):(e.appendChildOfSameHeight(s),s=void 0):e.handleChildrenChanged()}return s?n.Xw.create23(e,s,null,!1):e}function h(e,t){e=e.toMutable();let i=e;const o=[];while(t.listHeight!==i.listHeight){if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeFirstElementMutable()}let s=t;for(let r=o.length-1;r>=0;r--){const e=o[r];s?e.childrenLength>=3?s=n.Xw.create23(s,e.unprependChild(),null,!1):(e.prependChildOfSameHeight(s),s=void 0):e.handleChildrenChanged()}return s?n.Xw.create23(s,e,null,!1):e}class g{constructor(e){this.lastOffset=r.Vp,this.nextNodes=[e],this.offsets=[r.Vp],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.zG)(e,this.lastOffset))throw new Error("Invalid offset");this.lastOffset=e;while(1){const i=f(this.nextNodes);if(!i)return;const n=f(this.offsets);if((0,r.zG)(e,n))return;if((0,r.zG)(n,e))if((0,r.QB)(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=p(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=p(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){while(1){const e=f(this.offsets),t=f(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=f(this.nextNodes),n=p(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.QB)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function p(e,t=-1){while(1){if(t++,t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function f(e){return e.length>0?e[e.length-1]:void 0}function m(e,t,i,n){const o=new _(e,t,i,n);return o.parseDocument()}class _{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new g(i):void 0,this.positionMapper=new o.W(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(s.gV.getEmpty(),0);return e||(e=n.Xw.getEmpty()),e}parseList(e,t){const i=[];while(1){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?a(i):l(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.Vh)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>{if(null!==t&&!(0,r.zG)(i.length,t))return!1;const n=i.canBeReused(e);return n}));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new n.Gc(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new n.yF(i.length);const o=e.merge(i.bracketIds),s=this.parseList(o,t+1),r=this.tokenizer.peek();return r&&2===r.kind&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),n.Nn.create(i.astNode,s,r.astNode)):n.Nn.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}},55239:(e,t,i)=>{"use strict";i.d(t,{FD:()=>s,Mg:()=>r,gV:()=>o});const n=[];class o{static{this.cache=new Array(129)}static create(e,t){if(e<=128&&0===t.length){let i=o.cache[e];return i||(i=new o(e,t),o.cache[e]=i),i}return new o(e,t)}static{this.empty=o.create(0,n)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<{"use strict";i.d(t,{_:()=>u,ou:()=>l,tk:()=>c});var n=i(14396),o=i(4577),s=i(82584),r=i(94150),a=i(55239);class l{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class c{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new d(this.textModel,this.bracketTokens),this._offset=r.Vp,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,r.qe)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,r.QB)(this._offset,e);const t=(0,r.l4)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,r.QB)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class d{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,r.sS)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;while(1){const n=this.lineTokens,s=n.getCount();let a=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(0,r.C7)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.gV.getEmpty(),new s.yF(n))}}class u{constructor(e,t){this.text=e,this._offset=r.Vp,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,o=[];let c,d=0,u=0,h=0,g=0;const p=[];for(let _=0;_<60;_++)p.push(new l((0,r.qe)(0,_),0,-1,a.gV.getEmpty(),new s.yF((0,r.qe)(0,_))));const f=[];for(let _=0;_<60;_++)f.push(new l((0,r.qe)(1,_),0,-1,a.gV.getEmpty(),new s.yF((0,r.qe)(1,_))));if(n){n.lastIndex=0;while(null!==(c=n.exec(e))){const e=c.index,i=c[0];if("\n"===i)d++,u=e+1;else{if(h!==e){let t;if(g===d){const i=e-h;if(i{"use strict";i.d(t,{Th:()=>f,z8:()=>m});var n=i(41337),o=i(14396),s=i(98581),r=i(29133),a=i(14020),l=i(87885),c=i(84366);function d(e){return e.toString()}class u{static create(e,t){const i=e.getAlternativeVersionId(),n=p(e);return new u(i,i,n,n,t,t,[])}constructor(e,t,i,n,o,s,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=s,this.changes=r}append(e,t,i,n,o){t.length>0&&(this.changes=(0,a.x)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.Sw(e,t?t.length:0,i),i+=4,t)for(const n of t)l.Sw(e,n.selectionStartLineNumber,i),i+=4,l.Sw(e,n.selectionStartColumn,i),i+=4,l.Sw(e,n.positionLineNumber,i),i+=4,l.Sw(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.bb(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){const t=r.r.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof u}append(e,t,i,n,o){this._data instanceof u&&this._data.append(e,t,i,n,o)}close(){this._data instanceof u&&(this._data=this._data.serialize())}open(){this._data instanceof u||(this._data=u.deserialize(this._data))}undo(){if(r.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());const e=u.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());const e=u.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof u&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const e=d(n.resource);this._editStackElementsMap.set(e,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=d(e);return this._editStackElementsMap.has(t)}setModel(e){const t=d(r.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=d(e.uri);if(this._editStackElementsMap.has(t)){const i=this._editStackElementsMap.get(t);return i.canAppend(e)}return!1}append(e,t,i,n,o){const s=d(e.uri),r=this._editStackElementsMap.get(s);r.append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=d(e);if(this._editStackElementsMap.has(t)){const e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,c.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){const t=e.getEOL();return"\n"===t?0:1}function f(e){return!!e&&(e instanceof h||e instanceof g)}class m{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(f(i)&&i.canAppend(this._model))return i;const o=new h(n.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(o,t),o}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const o=this._getOrCreateEditStackElement(e,n),s=this._model.applyEdits(t,!0),r=m._computeCursorState(i,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),o.append(this._model,a.map((e=>e.textChange)),p(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return(0,o.dz)(i),null}}}},26783:(e,t,i)=>{"use strict";i.d(t,{P:()=>u,k:()=>h});var n=i(43654),o=i(20601),s=i(32142),r=i(8690),a=i(65148),l=i(47172),c=i(26530),d=i(14396);class u extends a._{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.G)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new d.D7("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,c=-1;const u=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let h=-2,g=-1,p=-2,f=-1;const m=e=>{if(-2===h){h=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){h=t,g=e;break}}}if(-1!==p&&(-2===p||p=0){p=t,f=e;break}}}};let _=0,v=!0,b=0,y=!0,w=0,C=0;for(let d=0;v||y;d++){const o=e-d,r=e+d;d>1&&(o<1||o1&&(r>n||r>i)&&(y=!1),d>5e4&&(v=!1,y=!1);let p=-1;if(v&&o>=1){const e=this._computeIndentLevel(o-1);e>=0?(l=o-1,c=e,p=Math.ceil(e/this.textModel.getOptions().indentSize)):(u(o),p=this._getIndentLevelForWhitespaceLine(s,a,c))}let S=-1;if(y&&r<=n){const e=this._computeIndentLevel(r-1);e>=0?(h=r-1,g=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(r),S=this._getIndentLevelForWhitespaceLine(s,g,f))}if(0!==d){if(1===d){if(r<=n&&S>=0&&C+1===S){v=!1,_=r,b=r,w=S;continue}if(o>=1&&p>=0&&p-1===C){y=!1,_=o,b=o,w=p;continue}if(_=e,b=e,w=C,0===w)return{startLineNumber:_,endLineNumber:b,indent:w}}v&&(p>=w?_=o:v=!1),y&&(S>=w?b=r:y=!1)}else C=p}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,i,s){const a=[];for(let n=e;n<=t;n++)a.push([]);const l=!0,d=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let u;if(i&&d.length>0){const o=(e<=i.lineNumber&&i.lineNumber<=t?d:this.textModel.bracketPairs.getBracketPairsInRange(r.Q.fromPositions(i)).toArray()).filter((e=>r.Q.strictContainsPosition(e.range,i)));u=(0,n.Uk)(o,(e=>l||e.range.startLineNumber!==e.range.endLineNumber))?.range}const g=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,p=new h;for(const n of d){if(!n.closingBracketRange)continue;const i=u&&n.range.equalsRange(u);if(!i&&!s.includeInactive)continue;const r=p.getInlineClassName(n.nestingLevel,n.nestingLevelOfEqualBracketType,g)+(s.highlightActive&&i?" "+p.activeClassName:""),d=n.openingBracketRange.getStartPosition(),h=n.closingBracketRange.getStartPosition(),f=s.horizontalGuides===c.N6.Enabled||s.horizontalGuides===c.N6.EnabledForActive&&i;if(n.range.startLineNumber===n.range.endLineNumber){l&&f&&a[n.range.startLineNumber-e].push(new c.TH(-1,n.openingBracketRange.getEndPosition().column,r,new c.pv(!1,h.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(h),_=this.getVisibleColumnFromPosition(n.openingBracketRange.getStartPosition()),v=Math.min(_,m,n.minVisibleColumnIndentation+1);let b=!1;const y=o.HG(this.textModel.getLineContent(n.closingBracketRange.startLineNumber)),w=y=e&&_>v&&a[d.lineNumber-e].push(new c.TH(v,-1,r,new c.pv(!1,d.column),-1,-1)),h.lineNumber<=t&&m>v&&a[h.lineNumber-e].push(new c.TH(v,-1,r,new c.pv(!b,h.column),-1,-1)))}for(const n of a)n.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return a}getVisibleColumnFromPosition(e){return s.A.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide),r=new Array(t-e+1);let a=-2,l=-1,c=-2,d=-1;for(let u=e;u<=t;u++){const t=u-e,o=this._computeIndentLevel(u-1);if(o>=0)a=u-1,l=o,r[t]=Math.ceil(o/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=u-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t{"use strict";i.d(t,{N:()=>s,c2:()=>r});var n=i(85053),o=i(62647);class s{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,o.j)(e);const i=this.values,n=this.prefixSum,s=t.length;return 0!==s&&(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,o.j)(e),t=(0,o.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,o.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,s=0;while(t<=i)if(n=t+(i-t)/2|0,o=this.prefixSum[n],s=o-this.values[n],e=o))break;t=n+1}return new a(n,e-s)}}class r{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.nK)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;n{"use strict";i.d(t,{Ho:()=>mi,kI:()=>_i,Bz:()=>si});var n=i(85053),o=i(85476),s=i(14396),r=i(40231),a=i(5091),l=i(20601),c=i(29133),d=i(36627),u=i(79680),h=i(36788),g=i(8690),p=i(98581),f=i(99989),m=i(14573),_=i(50395),v=i(9322),b=i(23099),y=i(28889);class w{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class C{constructor(e,t,i,n,o,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=o,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class S extends C{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o,s),this.minVisibleColumnIndentation=r}}var k=i(95239),x=i(39399),E=i(94150),L=i(87867),T=i(55239),I=i(39029),R=i(18485);class D extends a.jG{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new r.vl,this.denseKeyProvider=new T.Mg,this.brackets=new x.Z(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new I._(this.textModel.getValue(),e);this.initialAstWithoutTokens=(0,L.T)(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new k.c((0,E.qe)(e.fromLineNumber-1,0),(0,E.qe)(e.toLineNumber,0),(0,E.qe)(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=k.c.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=(0,R.M)(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,R.M)(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=!1,o=n?t?.deepClone():t,s=new I.tk(this.textModel,this.brackets),r=(0,L.T)(s,e,o,i);return r}getBracketsInRange(e,t){this.flushQueue();const i=(0,E.qe)(e.startLineNumber-1,e.startColumn-1),o=(0,E.qe)(e.endLineNumber-1,e.endColumn-1);return new n.c1((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens;O(n,E.Vp,n.length,i,o,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=(0,E.VL)(e.getStartPosition()),o=(0,E.VL)(e.getEndPosition());return new n.c1((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens,s=new P(e,t,this.textModel);M(n,E.Vp,n.length,i,o,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return A(t,E.Vp,t.length,(0,E.VL)(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return N(t,E.Vp,t.length,(0,E.VL)(e))}}function N(e,t,i,n){if(4===e.kind||2===e.kind){const o=[];for(const n of e.children)i=(0,E.QB)(t,n.length),o.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=o.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:s}=o[t];if((0,E.zG)(i,n)){const o=N(e.children[t],i,s,n);if(o)return o}}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,E.Qx)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function A(e,t,i,n){if(4===e.kind||2===e.kind){for(const o of e.children){if(i=(0,E.QB)(t,o.length),(0,E.zG)(n,i)){const e=A(o,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,E.Qx)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function O(e,t,i,n,o,s,r,a,l,c,d=!1){if(r>200)return!0;e:while(1)switch(e.kind){case 4:{const a=e.childrenLength;for(let d=0;d200)return!0;let l=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const d=(0,E.QB)(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),l=s.push(new S((0,E.Qx)(t,i),(0,E.Qx)(t,d),e.closingBracket?(0,E.Qx)((0,E.QB)(d,e.child?.length||E.Vp),i):void 0,r,c,e,u)),t=d,l&&e.child){const c=e.child;if(i=(0,E.QB)(t,c.length),(0,E.vr)(t,o)&&(0,E.o0)(i,n)&&(l=M(c,t,i,n,o,s,r+1,a),!l))return!1}a?.set(e.openingBracket.text,c)}else{let i=t;for(const t of e.children){const e=i;if(i=(0,E.QB)(i,t.length),(0,E.vr)(e,o)&&(0,E.vr)(n,i)&&(l=M(t,e,i,n,o,s,r,a),!l))return!1}}return l}class F extends a.jG{get canBuildAST(){const e=5e6;return this.textModel.getValueLength()<=e}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.HE),this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new a.Cm;this.bracketPairsTree.value=B(e.add(new D(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),e),e.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||n.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||n.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||n.c1.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(g.Q.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!s)return null;const r=s.textIsBracket[t];return r?V(this._findMatchingBracketUp(r,n,W(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(g.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,n.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),g.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=W(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),s=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let l=n-1;l>=0;l--){const e=t.getEndOffset(l);if(e<=r)break;if((0,b.Yo)(t.getStandardTokenType(l))||t.getLanguageId(l)!==s){r=e;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let l=n+1;l=a)break;if((0,b.Yo)(t.getStandardTokenType(l))||t.getLanguageId(l)!==s){a=e;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),s=n.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(r&&!(0,b.Yo)(n.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,s),c=null;while(1){const n=y.Fu.findNextBracketInRange(r.forwardRegex,i,o,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=o.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof H)return null;c=i}}a=n.endColumn-1}if(c)return c}if(s>0&&n.getStartOffset(s)===e.column-1){const r=s-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!(0,b.Yo)(n.getStandardTokenType(r))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),c=y.Fu.findPrevBracketInRange(a.reversedRegex,i,o,s,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=o.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),i=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof H?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof H?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{while(1){if(i&&++r%100===0&&!i())return H.INSTANCE;const c=y.Fu.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this.textModel.tokenization.getLineTokens(l),i=e.getCount(),o=this.textModel.getLineContent(l);let s=i-1,r=o.length,c=o.length;l===t.lineNumber&&(s=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,c=t.column-1);let d=!0;for(;s>=0;s--){const t=e.getLanguageId(s)===n&&!(0,b.Yo)(e.getStandardTokenType(s));if(t)d?r=e.getStartOffset(s):(r=e.getStartOffset(s),c=e.getEndOffset(s));else if(d&&r!==c){const e=a(l,o,r,c);if(e)return e}d=t}if(d&&r!==c){const e=a(l,o,r,c);if(e)return e}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{while(1){if(i&&++r%100===0&&!i())return H.INSTANCE;const c=y.Fu.findNextBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let c=t.lineNumber;c<=l;c++){const e=this.textModel.tokenization.getLineTokens(c),i=e.getCount(),o=this.textModel.getLineContent(c);let s=0,r=0,l=0;c===t.lineNumber&&(s=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,l=t.column-1);let d=!0;for(;s=1;s--){const e=this.textModel.tokenization.getLineTokens(s),r=e.getCount(),a=this.textModel.getLineContent(s);let l=r-1,c=a.length,d=a.length;if(s===t.lineNumber){l=e.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1;const s=e.getLanguageId(l);i!==s&&(i=s,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,o=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let u=!0;for(;l>=0;l--){const t=e.getLanguageId(l);if(i!==t){if(n&&o&&u&&c!==d){const e=y.Fu.findPrevBracketInRange(n.reversedRegex,s,a,c,d);if(e)return this._toFoundBracket(o,e);u=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,o=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const r=!!n&&!(0,b.Yo)(e.getStandardTokenType(l));if(r)u?c=e.getStartOffset(l):(c=e.getStartOffset(l),d=e.getEndOffset(l));else if(o&&n&&u&&c!==d){const e=y.Fu.findPrevBracketInRange(n.reversedRegex,s,a,c,d);if(e)return this._toFoundBracket(o,e)}u=r}if(o&&n&&u&&c!==d){const e=y.Fu.findPrevBracketInRange(n.reversedRegex,s,a,c,d);if(e)return this._toFoundBracket(o,e)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const i=this.textModel.getLineCount();let n=null,o=null,s=null;for(let r=t.lineNumber;r<=i;r++){const e=this.textModel.tokenization.getLineTokens(r),i=e.getCount(),a=this.textModel.getLineContent(r);let l=0,c=0,d=0;if(r===t.lineNumber){l=e.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1;const i=e.getLanguageId(l);n!==i&&(n=i,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let u=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=W(t),o=this.textModel.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{while(1){if(n&&++l%100===0&&!n())return H.INSTANCE;const a=y.Fu.findNextBracketInRange(e.forwardRegex,t,i,o,s);if(!a)break;const c=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?r[d.index]++:d.isClose(c)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,n);o=a.endColumn-1}return null};let d=null,u=null;for(let h=i.lineNumber;h<=o;h++){const e=this.textModel.tokenization.getLineTokens(h),t=e.getCount(),n=this.textModel.getLineContent(h);let o=0,s=0,r=0;if(h===i.lineNumber){o=e.findTokenIndexAtOffset(i.column-1),s=i.column-1,r=i.column-1;const t=e.getLanguageId(o);d!==t&&(d=t,u=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,u))}let l=!0;for(;ot?.dispose()}}function W(e){if("undefined"===typeof e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class H{static{this.INSTANCE=new H}constructor(){this._searchCanceledBrand=void 0}}function V(e){return e instanceof H?null:e}var j=i(52764),z=i(15911);class U extends a.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new $,this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){if(n)return[];if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const o=this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray();return o}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new g.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class ${constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,z.zy)(((e,t)=>{const i=[j.sN,j.lQ,j.ss,j.l5,j.sH,j.zp],n=new $;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(j.s7)}; }`);const o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let s=0;s<30;s++){const e=o[s%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(s)} { color: ${e}; }`)}}));var q=i(18217),K=i(26783);class G{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Q(e,t,i,n,o){let s;for(o.spacesDiff=0,o.looksLikeAlignment=!1,s=0;s0&&a>0)return;if(l>0&&c>0)return;const d=Math.abs(a-c),u=Math.abs(r-l);if(0===d)return o.spacesDiff=u,void(u>0&&0<=l-1&&l-10?o++:m>1&&s++,Q(r,a,l,f,u),u.looksLikeAlignment&&(!i||t!==u.spacesDiff))continue;const v=u.spacesDiff;v<=c&&d[v]++,r=l,a=f}let h=i;o!==s&&(h=o{const i=d[t];i>e&&(e=i,g=t)})),4===g&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(g=2)}return{insertSpaces:h,tabSize:g}}function Z(e){return(1&e.metadata)>>>0}function X(e,t){e.metadata=254&e.metadata|t}function J(e){return(2&e.metadata)>>>1===1}function ee(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function te(e){return(4&e.metadata)>>>2===1}function ie(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function ne(e){return(64&e.metadata)>>>6===1}function oe(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function se(e){return(24&e.metadata)>>>3}function re(e,t){e.metadata=231&e.metadata|t<<3}function ae(e){return(32&e.metadata)>>>5===1}function le(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class ce{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,X(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,ie(this,!1),oe(this,!1),re(this,1),le(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,ee(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;ie(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),oe(this,null!==this.options.glyphMarginClassName),re(this,this.options.stickiness),le(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const de=new ce(null,0,0);de.parent=de,de.left=de,de.right=de,X(de,0);class ue{constructor(){this.root=de,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o,s){return this.root===de?[]:ye(this,e,t,i,n,o,s)}search(e,t,i,n){return this.root===de?[]:be(this,e,t,i,n)}collectNodesFromOwner(e){return _e(this,e)}collectNodesPostOrder(){return ve(this)}insert(e){we(this,e),this._normalizeDeltaIfNecessary()}delete(e){Se(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;while(e!==this.root)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,t,i,n){const o=fe(this,e,e+t);for(let s=0,r=o.length;si)&&(1!==n&&(2===n||t))}function pe(e,t,i,n,o){const s=se(e),r=0===s||2===s,a=1===s||2===s,l=i-t,c=n,d=Math.min(l,c),u=e.start;let h=!1;const g=e.end;let p=!1;t<=u&&g<=i&&ae(e)&&(e.start=t,h=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!h&&ge(u,r,t,e)&&(h=!0),!p&&ge(g,a,t,e)&&(p=!0)}if(d>0&&!o){const e=l>c?2:0;!h&&ge(u,r,t+d,e)&&(h=!0),!p&&ge(g,a,t+d,e)&&(p=!0)}{const n=o?1:0;!h&&ge(u,r,i,n)&&(e.start=t+c,h=!0),!p&&ge(g,a,i,n)&&(e.end=t+c,p=!0)}const f=c-l;h||(e.start=Math.max(0,u+f)),p||(e.end=Math.max(0,g+f)),e.start>e.end&&(e.end=e.start)}function fe(e,t,i){let n=e.root,o=0,s=0,r=0,a=0;const l=[];let c=0;while(n!==de)if(J(n))ee(n.left,!1),ee(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!J(n.left)){if(s=o+n.maxEnd,si?ee(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[c++]=n),ee(n,!0),n.right===de||J(n.right)||(o+=n.delta,n=n.right))}return ee(e.root,!1),l}function me(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=n-(i-t);while(o!==de)if(J(o))ee(o.left,!1),ee(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),Ie(o),o=o.parent;else{if(!J(o.left)){if(r=s+o.maxEnd,ri?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),ee(o,!0)):(ee(o,!0),o.right===de||J(o.right)||(s+=o.delta,o=o.right))}ee(e.root,!1)}function _e(e,t){let i=e.root;const n=[];let o=0;while(i!==de)J(i)?(ee(i.left,!1),ee(i.right,!1),i=i.parent):i.left===de||J(i.left)?(i.ownerId===t&&(n[o++]=i),ee(i,!0),i.right===de||J(i.right)||(i=i.right)):i=i.left;return ee(e.root,!1),n}function ve(e){let t=e.root;const i=[];let n=0;while(t!==de)J(t)?(ee(t.left,!1),ee(t.right,!1),t=t.parent):t.left===de||J(t.left)?t.right===de||J(t.right)?(i[n++]=t,ee(t,!0)):t=t.right:t=t.left;return ee(e.root,!1),i}function be(e,t,i,n,o){let s=e.root,r=0,a=0,l=0;const c=[];let d=0;while(s!==de){if(J(s)){ee(s.left,!1),ee(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s=s.parent;continue}if(s.left!==de&&!J(s.left)){s=s.left;continue}a=r+s.start,l=r+s.end,s.setCachedOffsets(a,l,n);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),i&&te(s)&&(e=!1),o&&!ne(s)&&(e=!1),e&&(c[d++]=s),ee(s,!0),s.right===de||J(s.right)||(r+=s.delta,s=s.right)}return ee(e.root,!1),c}function ye(e,t,i,n,o,s,r){let a=e.root,l=0,c=0,d=0,u=0;const h=[];let g=0;while(a!==de)if(J(a))ee(a.left,!1),ee(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!J(a.left)){if(c=l+a.maxEnd,ci)ee(a,!0);else{if(u=l+a.end,u>=t){a.setCachedOffsets(d,u,s);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),o&&te(a)&&(e=!1),r&&!ne(a)&&(e=!1),e&&(h[g++]=a)}ee(a,!0),a.right===de||J(a.right)||(l+=a.delta,a=a.right)}}return ee(e.root,!1),h}function we(e,t){if(e.root===de)return t.parent=de,t.left=de,t.right=de,X(t,0),e.root=t,e.root;Ce(e,t),Re(t.parent);let i=t;while(i!==e.root&&1===Z(i.parent))if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===Z(t)?(X(i.parent,0),X(t,0),X(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,Ee(e,i)),X(i.parent,0),X(i.parent.parent,1),Le(e,i.parent.parent))}else{const t=i.parent.parent.left;1===Z(t)?(X(i.parent,0),X(t,0),X(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,Le(e,i)),X(i.parent,0),X(i.parent.parent,1),Ee(e,i.parent.parent))}return X(e.root,0),t}function Ce(e,t){let i=0,n=e.root;const o=t.start,s=t.end;while(1){const e=De(o,s,n.start+i,n.end+i);if(e<0){if(n.left===de){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===de){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=de,t.right=de,X(t,1)}function Se(e,t){let i,n;if(t.left===de?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===de?(i=t.left,n=t):(n=ke(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,X(i,0),t.detach(),xe(),Ie(i),void(e.root.parent=de);const o=1===Z(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,X(n,Z(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==de&&(n.left.parent=n),n.right!==de&&(n.right.parent=n)),t.detach(),o)return Re(i.parent),n!==t&&(Re(n),Re(n.parent)),void xe();let s;Re(i),Re(i.parent),n!==t&&(Re(n),Re(n.parent));while(i!==e.root&&0===Z(i))i===i.parent.left?(s=i.parent.right,1===Z(s)&&(X(s,0),X(i.parent,1),Ee(e,i.parent),s=i.parent.right),0===Z(s.left)&&0===Z(s.right)?(X(s,1),i=i.parent):(0===Z(s.right)&&(X(s.left,0),X(s,1),Le(e,s),s=i.parent.right),X(s,Z(i.parent)),X(i.parent,0),X(s.right,0),Ee(e,i.parent),i=e.root)):(s=i.parent.left,1===Z(s)&&(X(s,0),X(i.parent,1),Le(e,i.parent),s=i.parent.left),0===Z(s.left)&&0===Z(s.right)?(X(s,1),i=i.parent):(0===Z(s.left)&&(X(s.right,0),X(s,1),Ee(e,s),s=i.parent.left),X(s,Z(i.parent)),X(i.parent,0),X(s.left,0),Le(e,i.parent),i=e.root));X(i,0),xe()}function ke(e){while(e.left!==de)e=e.left;return e}function xe(){de.parent=de,de.delta=0,de.start=0,de.end=0}function Ee(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==de&&(i.left.parent=t),i.parent=t.parent,t.parent===de?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,Ie(t),Ie(i)}function Le(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==de&&(i.right.parent=t),i.parent=t.parent,t.parent===de?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,Ie(t),Ie(i)}function Te(e){let t=e.end;if(e.left!==de){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==de){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function Ie(e){e.maxEnd=Te(e)}function Re(e){while(e!==de){const t=Te(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function De(e,t,i,n){return e===i?t-n:e-i}class Ne{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Ae)return Oe(this.right);let e=this;while(e.parent!==Ae){if(e.parent.left===e)break;e=e.parent}return e.parent===Ae?Ae:e.parent}prev(){if(this.left!==Ae)return Pe(this.left);let e=this;while(e.parent!==Ae){if(e.parent.right===e)break;e=e.parent}return e.parent===Ae?Ae:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Ae=new Ne(null,0);function Oe(e){while(e.left!==Ae)e=e.left;return e}function Pe(e){while(e.right!==Ae)e=e.right;return e}function Me(e){return e===Ae?0:e.size_left+e.piece.length+Me(e.right)}function Fe(e){return e===Ae?0:e.lf_left+e.piece.lineFeedCnt+Fe(e.right)}function Be(){Ae.parent=Ae}function We(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==Ae&&(i.left.parent=t),i.parent=t.parent,t.parent===Ae?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function He(e,t){const i=t.left;t.left=i.right,i.right!==Ae&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===Ae?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Ve(e,t){let i,n;if(t.left===Ae?(n=t,i=n.right):t.right===Ae?(n=t,i=n.left):(n=Oe(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),Be(),void(e.root.parent=Ae);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Ue(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Ue(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==Ae&&(n.left.parent=n),n.right!==Ae&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Ue(e,n)),t.detach(),i.parent.left===i){const t=Me(i),n=Fe(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const o=t-i.parent.size_left,s=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,ze(e,i.parent,o,s)}}if(Ue(e,i.parent),o)return void Be();let s;while(i!==e.root&&0===i.color)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,We(e,i.parent),s=i.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.right.color&&(s.left.color=0,s.color=1,He(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,We(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,He(e,i.parent),s=i.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.left.color&&(s.right.color=0,s.color=1,We(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,He(e,i.parent),i=e.root));i.color=0,Be()}function je(e,t){Ue(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,We(e,t)),t.parent.color=0,t.parent.parent.color=1,He(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,He(e,t)),t.parent.color=0,t.parent.parent.color=1,We(e,t.parent.parent))}e.root.color=0}function ze(e,t,i,n){while(t!==e.root&&t!==Ae)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Ue(e,t){let i=0,n=0;if(t!==e.root){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t!==e.root){t=t.parent,i=Me(t.left)-t.size_left,n=Fe(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;while(t!==e.root&&(0!==i||0!==n))t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}}Ae.parent=Ae,Ae.left=Ae,Ae.right=Ae,Ae.color=0;var $e=i(13569);const qe=65535;function Ke(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Ge{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function Qe(e,t=!0){const i=[0];let n=1;for(let o=0,s=e.length;o126)&&(r=!1)}const a=new Ge(Ke(e),n,o,s,r);return e.length=0,a}class Ze{constructor(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}class Xe{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Je{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Ae&&e.iterate(e.root,(e=>(e!==Ae&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class et{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class tt{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Xe("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Ae,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let o=0,s=e.length;o0){e[o].lineStarts||(e[o].lineStarts=Qe(e[o].buffer));const t=new Ze(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),n=this.rbInsertRight(n,t)}this._searchCache=new et(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=qe,i=t-Math.floor(t/3),n=2*i;let o="",s=0;const r=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(s<=i||s+l0){const t=o.replace(/\r\n|\r|\n/g,e);r.push(new Xe(t,Qe(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Je(this,e)}getOffsetAt(e,t){let i=0,n=this.root;while(n!==Ae)if(n.left!==Ae&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;const o=this.getAccumulatedValue(n,e-n.lf_left-2);return i+(o+t-1)}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;while(t!==Ae)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){const e=this.getOffsetAt(i+1,1),t=n-e;return new h.y(i+1,t+1)}return new h.y(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Ae){const t=this.getOffsetAt(i+1,1),o=n-e-t;return new h.y(i+1,o+1)}t=t.right}return new h.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let s=n.substring(o+e.remainder,o+i.piece.length);i=i.next();while(i!==Ae){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){s+=e.substring(n,n+t.remainder);break}s+=e.substr(n,i.piece.length),i=i.next()}return s}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===Ae)return!0;const s=o.piece;let r=s.length;if(0===r)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,c=s.start.line,d=s.end.line;let u=l[c]+s.start.column;if(n&&(10===a.charCodeAt(u)&&(u++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(c===d)return this._EOLNormalized||13!==a.charCodeAt(u+r-1)?i+=a.substr(u,r):(n=!0,i+=a.substr(u,r-1)),!0;i+=this._EOLNormalized?a.substring(u,Math.max(u,l[c+1]-this._EOLLength)):a.substring(u,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+p,t.reset(0)):(v=u.buffer,b=e=>e,t.reset(p));do{if(m=t.next(v),m){if(b(m.index)>=f)return c;this.positionInBuffer(e,b(m.index)-h,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,_),s=_.line===o.line?_.column-o.column+n:_.column+1,r=s+m[0].length;if(d[c++]=(0,$e.dr)(new g.Q(i+t,s,i+t,r),m,a),b(m.index)+m[0].length>=f)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new $e.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,c,d,t,i,n,s,o),o;let u=e.startLineNumber,h=a.node;while(h!==l.node){const l=this.getLineFeedCnt(h.piece.bufferIndex,c,h.piece.end);if(l>=1){const a=this._buffers[h.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),g=a[c.line+l],p=u===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(h,r,u,p,c,this.positionInBuffer(h,g-d),t,i,n,s,o),s>=n)return o;u+=l}const d=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const a=this.getLineContent(u).substring(d,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,d,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(u).substr(d),u,d,s,o,i,n),s>=n)return o;u++,a=this.nodeAt2(u,1),h=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){const a=u===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(u).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}const g=u===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,u,g,c,d,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let u=-a;while(-1!==(u=i.indexOf(t,u+a)))if((!c||(0,$e.wC)(c,i,d,u,a))&&(r[s++]=new v.Dg(new g.Q(n,u+1+o,n,u+1+a+o),null),s>=l))return s;return s}let d;t.reset(0);do{if(d=t.next(i),d&&(r[s++]=(0,$e.dr)(new g.Q(n,d.index+1+o,n,d.index+1+d[0].length+o),d,a),s>=l))return s}while(d);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Ae){const{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),s=i.piece,r=s.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&o+s.length===e&&t.lengthe){const e=[];let o=new Ze(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(r,s.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){const e=this.nodeCharCodeAt(i,n);if(10===e){const e={line:o.start.line+1,column:0};o=new Ze(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){const o=this.nodeCharCodeAt(i,n-1);if(13===o){const o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let c=i;for(let t=0;t=0;s--)o=this.rbInsertLeft(o,n[s]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let s=1;s=u))break;l=d+1}}return i?(i.line=d,i.column=a-h,null):{line:d,column:a-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;const r=s-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){const i=this._buffers[e].lineStarts;return i[t.line]+t.column}deleteNodes(e){for(let t=0;tqe){const t=[];while(e.length>qe){const i=e.charCodeAt(qe-1);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,qe-1),e=e.substring(qe-1)):(n=e.substring(0,qe),e=e.substring(qe));const o=Qe(n);t.push(new Ze(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new Xe(n,o))}const i=Qe(e);return t.push(new Ze(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new Xe(e,i)),t}let t=this._buffers[0].buffer.length;const i=Qe(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:s-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}i=i.next();while(i!==Ae){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;while(e!==Ae)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,r=this.offsetInBuffer(i.bufferIndex,s),a=this.getLineFeedCnt(i.bufferIndex,i.start,s),l=a-n,c=r-o,d=i.length+c;e.piece=new Ze(i.bufferIndex,i.start,s,a,d),ze(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,r=this.getLineFeedCnt(i.bufferIndex,s,i.end),a=this.offsetInBuffer(i.bufferIndex,s),l=r-n,c=o-a,d=i.length+c;e.piece=new Ze(i.bufferIndex,s,i.end,r,d),ze(this,e,c,l)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new Ze(n.bufferIndex,n.start,l,c,d),ze(this,e,d-r,c-a);const u=new Ze(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),h=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(h)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=Qe(t,!1);for(let h=0;he)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;while(i!==Ae)if(i.left!==Ae&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}i=i.next();while(i!==Ae){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){const e=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:e}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===Ae||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;if(n===i.length-1)return!1;const s=i[n+1];return!(s>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==Ae&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let o;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new Ze(e.piece.bufferIndex,e.piece.start,o,r,s),ze(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Ze(t.piece.bufferIndex,a,t.piece.end,c,l),ze(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let u=0;ue.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const p=this._doApplyEdits(a);let f=null;if(t&&h.length>0){h.sort(((e,t)=>t.lineNumber-e.lineNumber)),f=[];for(let e=0,t=h.length;e0&&h[e-1].lineNumber===t)continue;const i=h[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.HG(n)&&f.push(t)}}return this._onDidChangeContent.fire(),new v.F4(g,p,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new g.Q(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let s=i.startLineNumber,r=i.startColumn;const a=[];for(let d=0,p=e.length;d0&&a.push(i.text),s=n.endLineNumber,r=n.endColumn}const l=a.join(""),[c,u,h]=(0,d.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:c,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(nt._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;c=1===e?new g.Q(a,l,a,l+r.firstLineLength):new g.Q(a,l,a+e-1,r.lastLineLength+1)}else c=new g.Q(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),o=r}return t}static _sortOpsAscending(e,t){const i=g.Q.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=g.Q.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class ot{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let o=0,s=i.length;o=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=Ye(this._tmpLineStarts,e);this.chunks.push(new Xe(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=l.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.$X(e)))}finish(e=!0){return this._finish(),new ot(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Qe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var rt=i(44544),at=i(60939),lt=i(35350),ct=i(65148),dt=i(9659),ut=i(25160),ht=i(84240),gt=i(50371),pt=i(58403);class ft{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),o=this._store.slice(e+t),s=mt(i,this._default);this._store=n.concat(s,o)}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let n=0;n0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new _t(e,[t]))}finalize(){return this._tokens}}var bt=i(70164);class yt{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new Ct(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class wt extends yt{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();while(1){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const o=this._textModel.getLineContent(n.lineNumber),s=xt(this._languageIdCodec,i,this.tokenizationSupport,o,!0,n.startState);e.add(n.lineNumber,s.tokens),this.store.setEndState(n.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+t+o.substring(e.column-1),r=xt(this._languageIdCodec,n,this.tokenizationSupport,s,!0,i),a=new bt.f(r.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,o=e.column,s=this.getStartState(n);if(!s)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,o-1)+i+r.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),c=xt(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s),d=new bt.f(c.tokens,a,this._languageIdCodec);return d}hasAccurateTokensForLine(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&r>=1;r--){const e=this._textModel.getLineFirstNonWhitespaceColumn(r);if(0!==e&&(e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class kt{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new gt.L(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new gt.L(i.start,e):this._ranges.splice(t,1,new gt.L(i.start,e),new gt.L(e+1,i.endExclusive))}}addRange(e){gt.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;while(!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive))i++;let n=i;while(!(n>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function xt(e,t,i,n,o,r){let a=null;if(i)try{a=i.tokenizeEncoded(n,o,r.clone())}catch(l){(0,s.dz)(l)}return a||(a=(0,pt.Lh)(e.encodeLanguageId(t),r)),bt.f.convertToEndOffset(a.tokens,n.length),a}class Et{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,dt.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;const n=this._tokenizeOneInvalidLine(t);if(n>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new rt.M(e,t))}}class Lt{constructor(){this._onDidChangeVisibleRanges=new r.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Tt((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Tt{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new rt.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}class It extends a.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new dt.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,n.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class Rt extends a.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,i){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=i,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new r.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class Dt extends Rt{constructor(e,t,i,n){super(t,i,n),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=lt.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const i=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(i)return new bt.f(i,t,this._languageIdCodec)}return bt.f.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,i){return 0}tokenizeLineWithEdit(e,t,i){return null}get hasTokens(){const e=void 0!==this._treeSitterService.getParseResult(this._textModel);return e}}var Nt=i(15863);const At=new Uint32Array(0).buffer;class Ot{static deleteBeginning(e,t){return null===e||e===At?e:Ot.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===At)return e;const i=Pt(e),n=i[i.length-2];return Ot.delete(e,t,n)}static delete(e,t,i){if(null===e||e===At||t===i)return e;const n=Pt(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return At;const s=bt.f.findIndexInTokensArray(n,t),r=s>0?n[s-1<<1]:0,a=n[s<<1];if(ic&&(n[l++]=e,n[l++]=n[1+(h<<1)],c=e)}if(l===n.length)return e;const u=new Uint32Array(l);return u.set(n.subarray(0,l),0),u.buffer}static append(e,t){if(t===At)return e;if(e===At)return t;if(null===e)return e;if(null===t)return null;const i=Pt(e),n=Pt(t),o=n.length>>>1,s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let l=0;l>>1;let s=bt.f.findIndexInTokensArray(n,t);if(s>0){const e=n[s-1<<1];e===t&&s--}for(let r=s;r0}getTokens(e,t,i){let n=null;if(t1&&(t=Mt.x.getLanguageId(n[1])!==e),!t)return At}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=Bt(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=Ot.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=Ot.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=Ot.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Ot.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=Ot.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,o=e.length;n>>0}class Wt{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let n=0,s=this._pieces.length;ni.endLineNumber){o=o||{index:n};break}if(e.removeTokens(i),e.isEmpty()){this._pieces.splice(n,1),n--,s--;continue}if(e.endLineNumberi.endLineNumber){o=o||{index:n};continue}const[t,r]=e.split(i);t.isEmpty()?o=o||{index:n}:r.isEmpty()||(this._pieces.splice(n,1,t,r),n++,s++,o=o||{index:n})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.nK(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=Wt._findFirstPieceWithLine(i,e),o=i[n].getLineTokens(e);if(!o)return t;const s=t.getCount(),r=o.getCount();let a=0;const l=[];let c=0,d=0;const u=(e,t)=>{e!==d&&(d=e,l[c++]=e,l[c++]=t)};for(let h=0;h>>0,l=~r>>>0;while(at)){while(o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}var Ht,Vt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},jt=function(e,t){return function(i,n){t(i,n,e)}};let zt=Ht=class extends ct._{constructor(e,t,i,n,o,s,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=i,this._attachedViews=n,this._languageService=o,this._languageConfigurationService=s,this._treeSitterService=l,this._semanticTokens=new Wt(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new r.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new a.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(r.Jh.filter(lt.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new Ut(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new Dt(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){lt.OB.get(this._languageId)?this._tokens instanceof Dt||this.createTokens(!0):this._tokens instanceof Ut||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=(0,d.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new s.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this._tokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[s,r]=Ht._findLanguageBoundaries(n,o),a=(0,at.Th)(t.column,this.getLanguageConfiguration(n.getLanguageId(o)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&s===t.column-1){const[s,r]=Ht._findLanguageBoundaries(n,o-1),a=(0,at.Th)(t.column,this.getLanguageConfiguration(n.getLanguageId(o-1)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let s=t;s>=0&&e.getLanguageId(s)===i;s--)n=e.getStartOffset(s);let o=e.getLineContent().length;for(let s=t,r=e.getCount();s{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new It((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new Ct(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=lt.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(i){return(0,s.dz)(i),[null,null]}return[e,t]},[i,n]=t();if(this._tokenizer=i&&n?new wt(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{if(2===this._backgroundTokenizationState)return;const e=2;this._backgroundTokenizationState=e,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(e,t)=>{if(!this._tokenizer)return;const i=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==i&&e>=i&&this._tokenizer?.store.setEndState(e,t)}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Et(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),i?.backgroundTokenizerShouldOnlyVerifyTokens&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new Ft(this._languageIdCodec),this._debugBackgroundStates=new Ct(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,i]=(0,d.W)(t.text);this._tokens.acceptEdit(t.range,e,i),this._debugBackgroundTokens?.acceptEdit(t.range,e,i)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=rt.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const i=new vt,{heuristicTokens:n}=this._tokenizer.tokenizeHeuristically(i,e,t),o=this.setTokens(i.finalize());if(n)for(const s of o.changes)this._backgroundTokenizer.value?.requestTokens(s.fromLineNumber,s.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new vt;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const n=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!i.equals(n)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return i}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new h.y(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}var $t,qt=i(50410),Kt=i(87778),Gt=i(57642),Qt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Yt=function(e,t){return function(i,n){t(i,n,e)}};function Zt(e){const t=new st;return t.acceptChunk(e),t.finish()}function Xt(e){const t=new st;let i;while("string"===typeof(i=e.read()))t.acceptChunk(i);return t.finish()}function Jt(e,t){let i;return i="string"===typeof e?Zt(e):v.nk(e)?Xt(e):e,i.create(t)}let ei=0;const ti=999,ii=1e4;class ni{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;do{const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}while(1)}}const oi=()=>{throw new Error("Invalid change accessor")};let si=class extends a.jG{static{$t=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:f.R.tabSize,indentSize:f.R.indentSize,insertSpaces:f.R.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:f.R.trimAutoWhitespace,largeFileOptimizations:f.R.largeFileOptimizations,bracketPairColorizationOptions:f.R.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const i=Y(e,t.tabSize,t.insertSpaces);return new v.X2({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new v.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,a.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,o,s,d,u){super(),this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=d,this.instantiationService=u,this._onWillDispose=this._register(new r.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new yi((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new r.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new r.vl),this._eventEmitter=this._register(new wi),this._languageSelectionListener=this._register(new a.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new Lt,ei++,this.id="$model"+ei,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource="undefined"===typeof n||null===n?c.r.parse("inmemory://model/"+ei):n,this._attachedEditorCount=0;const{textBuffer:h,disposable:p}=Jt(e,i.defaultEOL);this._buffer=h,this._bufferDisposable=p,this._options=$t.resolveOptions(this._buffer,i);const f="string"===typeof t?t:t.languageId;"string"!==typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new F(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new K.P(this,this._languageConfigurationService)),this._decorationProvider=this._register(new U(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(zt,this,this._bracketPairs,f,this._attachedViews);const m=this._buffer.getLineCount(),_=this._buffer.getValueLengthInRange(new g.Q(1,1,m,this._buffer.getLineLength(m)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=_>$t.LARGE_FILE_SIZE_THRESHOLD||m>$t.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=_>$t.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=_>$t._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.tk(ei),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new di,this._commandManager=new q.z8(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new nt([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new s.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new qt.Ic(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e||void 0===e)throw(0,s.Qg)();const{textBuffer:t,disposable:i}=Jt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new di,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new qt.HP([new qt.Wn],this._versionId,!1,!1),this._createContentChanged2(new g.Q(1,1,o,s),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new qt.HP([new qt.mS],this._versionId,!1,!1),this._createContentChanged2(new g.Q(1,1,o,s),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=ii?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,i="undefined"!==typeof e.indentSize?e.indentSize:this._options.originalIndentSize,n="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s="undefined"!==typeof e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new v.X2({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=Y(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,u.P)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new s.D7("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new ni(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new s.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!==typeof i||isNaN(i)?1:i),s=Math.floor("number"!==typeof n||isNaN(n)?1:n);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(o);s>=e&&(s=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!==typeof r||isNaN(r)?1:r),c=Math.floor("number"!==typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===o&&n===s&&r===l&&a===c&&e instanceof g.Q&&!(e instanceof p.L)?e:new g.Q(o,s,l,c)}_isValidPosition(e,t,i){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(1===t)return!0;const o=this.getLineMaxColumn(e);if(t>o)return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(l.pc(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!==typeof e||isNaN(e)?1:e),o=Math.floor("number"!==typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(n<1)return new h.y(1,1);if(n>s)return new h.y(s,this.getLineMaxColumn(s));if(o<=1)return new h.y(n,1);const r=this.getLineMaxColumn(n);if(o>=r)return new h.y(n,r);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(l.pc(e))return new h.y(n,o-1)}return new h.y(n,o)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof h.y&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,s,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,r=l.pc(e),a=l.pc(t);return!r&&!a}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof g.Q&&!(e instanceof p.L)&&this._isValidRange(e,t))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),o=i.lineNumber,s=i.column,r=n.lineNumber,a=n.column;if(1===t){const e=s>1?this._buffer.getLineCharCode(o,s-2):0,t=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,i=l.pc(e),n=l.pc(t);return i||n?o===r&&s===a?new g.Q(o,s-1,r,a-1):i&&n?new g.Q(o,s-1,r,a+1):i?new g.Q(o,s-1,r,a):new g.Q(o,s,r,a+1):new g.Q(o,s,r,a)}return new g.Q(o,s,r,a)}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new g.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=ti){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>g.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>g.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new $e.lt(e,i,n,o),a=t.parseSearchRequest();if(!a)return[];c=e=>this.findMatchesLineByLine(e,a,s,r)}else c=t=>$e.hB.findMatches(this,new $e.lt(e,i,n,o),t,s,r);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new $e.lt(e,i,n,o),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let c=new g.Q(r.lineNumber,r.column,l,this.getLineMaxColumn(l)),d=this.findMatchesLineByLine(c,a,s,1);return $e.hB.findNextMatch(this,new $e.lt(e,i,n,o),r,s),d.length>0?d[0]:(c=new g.Q(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),d=this.findMatchesLineByLine(c,a,s,1),d.length>0?d[0]:null)}return $e.hB.findNextMatch(this,new $e.lt(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return $e.hB.findPreviousMatch(this,new $e.lt(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof v.Wo?e:new v.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,o=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&(!(n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0))&&!(n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1)))){s=!1;break}}if(s){const e=new g.Q(n,1,n,o);t.push(new v.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new g.Q(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new g.Q(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,0!==r.length){for(let i=0,n=r.length;i=0;t--){const i=l+t,n=m+t;w.takeFromEndWhile((e=>e.lineNumber>n));const o=w.takeFromEndWhile((e=>e.lineNumber===n));e.push(new qt.U0(i,this.getLineContent(n),o))}if(pe.lineNumbere.lineNumber===t))}e.push(new qt.bg(o+1,l+g,d,c))}t+=f}this._emitContentChangedEvent(new qt.HP(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===o.reverseEdits?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e),i=t.map((e=>new qt.U0(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new qt.vn(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,bi(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(o){(0,s.dz)(o)}return i.addDecoration=oi,i.changeDecoration=oi,i.changeDecorationOptions=oi,i.removeDecoration=oi,i.deltaDecorations=oi,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,s.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:vi[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(vi[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,o=!1,s=!1){const r=this.getLineCount(),a=Math.min(r,Math.max(1,e)),l=Math.min(r,Math.max(1,t)),c=this.getLineMaxColumn(l),d=new g.Q(a,1,l,c),u=this._getDecorationsInRange(d,i,o,s);return(0,n.E4)(u,this._decorationProvider.getDecorationsInRange(d,i,o)),u}getDecorationsInRange(e,t=0,i=!1,o=!1,s=!1){const r=this.validateRange(e),a=this._getDecorationsInRange(r,t,i,s);return(0,n.E4)(a,this._decorationProvider.getDecorationsInRange(r,t,i,o)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return qt.uK.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const o=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,o,s,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),s=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=n!==o,r=li(t)!==ci(i);s||r?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const o=this.getVersionId(),s=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(a);while(rthis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return ri(this.getLineContent(e))+1}};function ri(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}function ai(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function li(e){return!!e.after||!!e.before}function ci(e){return!!e.options.after||!!e.options.before}si=$t=Qt([Yt(4,Gt.$D),Yt(5,m.L),Yt(6,_.JZ),Yt(7,Kt._Y)],si);class di{constructor(){this._decorationsTree0=new ue,this._decorationsTree1=new ue,this._injectedTextDecorationsTree=new ue}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o,s){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,o,r,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,o,s){const r=this._decorationsTree0.intervalSearch(e,t,i,n,o,s),a=this._decorationsTree1.intervalSearch(e,t,i,n,o,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o,s);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,o){const s=e.getVersionId(),r=this._search(t,i,n,s,o);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,o){if(i)return this._decorationsTree1.search(e,t,n,o);{const i=this._decorationsTree0.search(e,t,n,o),s=this._decorationsTree1.search(e,t,n,o),r=this._injectedTextDecorationsTree.search(e,t,n,o);return i.concat(s).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){ci(e)?this._injectedTextDecorationsTree.insert(e):ai(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){ci(e)?this._injectedTextDecorationsTree.delete(e):ai(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){ci(e)?this._injectedTextDecorationsTree.resolveNode(e,t):ai(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function ui(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class hi{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class gi extends hi{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:v.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class pi{constructor(e){this.position=e?.position??v.ZS.Center,this.persistLane=e?.persistLane}}class fi extends hi{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?o.Q1.fromHex(e):t.getColor(e.id)}}class mi{static from(e){return e instanceof mi?e:new mi(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class _i{static register(e){return new _i(e)}static createDynamic(e){return new _i(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?ui(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?ui(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new gi(e.overviewRuler):null,this.minimap=e.minimap?new fi(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new pi(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?ui(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?ui(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?ui(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?l.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?ui(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?ui(e.marginClassName):null,this.inlineClassName=e.inlineClassName?ui(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?ui(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?ui(e.afterContentClassName):null,this.after=e.after?mi.from(e.after):null,this.before=e.before?mi.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}_i.EMPTY=_i.register({description:"empty"});const vi=[_i.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),_i.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),_i.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),_i.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function bi(e){return e instanceof _i?e:_i.createDynamic(e)}class yi extends a.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new r.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class wi extends a.jG{constructor(){super(),this._fastEmitter=this._register(new r.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new r.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},65148:(e,t,i)=>{"use strict";i.d(t,{_:()=>o});var n=i(5091);class o extends n.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}},13569:(e,t,i)=>{"use strict";i.d(t,{W5:()=>_,dr:()=>u,hB:()=>g,lt:()=>c,wC:()=>m});var n=i(20601),o=i(90385),s=i(36788),r=i(8690),a=i(9322);const l=999;class c{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?d(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(s){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.L5(t,this.wordSeparators?(0,o.i)(this.wordSeparators,[]):null,i?this.searchString:null)}}function d(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}function u(e,t,i){if(!i)return new a.Dg(e,null);const n=[];for(let o=0,s=t.length;o=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class g{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new _(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let a,l,c=0;if(n?(c=n.findLineFeedCountBeforeOffset(o),a=t+o+c):a=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+s.length),t=e-c;l=a+s.length+t}else l=a+s.length;const d=e.getPositionAt(a),u=e.getPositionAt(l);return new r.Q(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(r):null,l=[];let c,d=0;i.reset(0);while(c=i.next(r))if(l[d++]=u(this._getMultilineMatchRange(e,s,r,a,c.index,c[0]),c,n),d>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let l=t.startLineNumber+1;l=c))return o;return o}const h=new _(e.wordSeparators,e.regex);let g;h.reset(0);do{if(g=h.next(t),g&&(s[o++]=u(new r.Q(i,g.index+1+n,i,g.index+1+g[0].length+n),g,l),o>=c))return o}while(g);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new _(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new s.y(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),c=e.getValueInRange(new r.Q(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),d="\r\n"===e.getEOL()?new h(c):null;i.reset(t.column-1);const g=i.next(c);return g?u(this._getMultilineMatchRange(e,a,c,d,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new s.y(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let l=1;l<=o;l++){const t=(s+l-1)%o,r=e.getLineContent(t+1),a=this._findFirstMatchInLine(i,r,t+1,1,n);if(a)return a}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const s=e.next(t);return s?u(new r.Q(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new _(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),i,n,10*l);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new s.y(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let l=1;l<=o;l++){const t=(o+s-l-1)%o,r=e.getLineContent(t+1),a=this._findLastMatchInLine(i,r,t+1,n);if(a)return a}return null}static _findLastMatchInLine(e,t,i,n){let o,s=null;e.reset(0);while(o=e.next(t))s=u(new r.Q(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function p(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}function f(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}function m(e,t,i,n,o){return p(e,t,i,n,o)&&f(e,t,i,n,o)}class _{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const o=i.index,s=i[0].length;if(o===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){n.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=s,!this._wordSeparators||m(this._wordSeparators,e,t,o,s))return i}while(i);return null}}},47172:(e,t,i)=>{"use strict";function n(e,t){let i=0,n=0;const o=e.length;while(nn})},79184:(e,t,i)=>{"use strict";i.r(t),i.d(t,{KeyMod:()=>h,createMonacoBaseAPI:()=>g});var n=i(67792),o=i(40231),s=i(91348),r=i(29133),a=i(36788),l=i(8690),c=i(98581),d=i(35350),u=i(84296);class h{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return(0,s.m5)(e,t)}}function g(){return{editor:void 0,languages:void 0,CancellationTokenSource:n.Qi,Emitter:o.vl,KeyCode:u.DD,KeyMod:h,Position:a.y,Range:l.Q,Selection:c.L,SelectionDirection:u.SB,MarkerSeverity:u.cj,MarkerTag:u.d_,Uri:r.r,Token:d.ou}}},92341:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BaseEditorSimpleWorker:()=>J,EditorSimpleWorker:()=>ee,create:()=>te});var n=i(40651),o=i(8690),s=i(94529);class r{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,s=e*t;ot&&(t=s),n>i&&(i=n),r>i&&(i=r)}t++,i++;const n=new r(i,t,0);for(let o=0,s=e.length;o=this._maxCharCode?0:this._states.get(e,t)}}let l=null;function c(){return null===l&&(l=new a([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),l}let d=null;function u(){if(null===d){d=new s.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let i=0;in);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=c()){const i=u(),n=[];for(let o=1,s=e.getLineCount();o<=s;o++){const s=e.getLineContent(o),r=s.length;let a=0,l=0,c=0,d=1,u=!1,g=!1,p=!1,f=!1;while(a=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}var f=i(79184),m=i(32899),_=i(84240),v=i(97412),b=i(42198),y=i(93866),w=i(20601),C=i(79109),S=i(44544);const k=3;class x{computeDiff(e,t,i){const n=new N(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}),s=n.computeDiff(),r=[];let a=null;for(const l of s.changes){let e,t;e=0===l.originalEndLineNumber?new S.M(l.originalStartLineNumber+1,l.originalStartLineNumber+1):new S.M(l.originalStartLineNumber,l.originalEndLineNumber+1),t=0===l.modifiedEndLineNumber?new S.M(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):new S.M(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let i=new y.wm(e,t,l.charChanges?.map((e=>new y.q6(new o.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new o.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));a&&(a.modified.endLineNumberExclusive!==i.modified.startLineNumber&&a.original.endLineNumberExclusive!==i.original.startLineNumber||(i=new y.wm(a.original.join(i.original),a.modified.join(i.modified),a.innerChanges&&i.innerChanges?a.innerChanges.concat(i.innerChanges):void 0),r.pop())),r.push(i),a=i}return(0,C.Ft)((()=>(0,C.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class I{constructor(e,t,i,n,o,s,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new I(n,o,s,r,a,l,c,d)}}function R(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const s=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=E(s,a,o,!0).changes;r&&(e=R(e)),u=[];for(let t=0,i=e.length;t1&&r>1){const n=e.charCodeAt(i-2),o=t.charCodeAt(r-2);if(n!==o)break;i--,r--}(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,s+1,1,r)}{let i=O(e,1),r=O(t,1);const a=e.length+1,l=t.length+1;while(i!0;const t=Date.now();return()=>Date.now()-tnew x,getDefault:()=>new M.D8};var B=i(85603),W=i(6657),H=i(85476);function V(e){const t=[];for(const i of e){const e=Number(i);(e||0===e&&""!==i.replace(/\s/g,""))&&t.push(e)}return t}function j(e,t,i,n){return{red:e/255,blue:i/255,green:t/255,alpha:n}}function z(e,t){const i=t.index,n=t[0].length;if(!i)return;const o=e.positionAt(i),s={startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:o.lineNumber,endColumn:o.column+n};return s}function U(e,t){if(!e)return;const i=H.Q1.Format.CSS.parseHex(t);return i?{range:e,color:j(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}:void 0}function $(e,t,i){if(!e||1!==t.length)return;const n=t[0],o=n.values(),s=V(o);return{range:e,color:j(s[0],s[1],s[2],i?s[3]:1)}}function q(e,t,i){if(!e||1!==t.length)return;const n=t[0],o=n.values(),s=V(o),r=new H.Q1(new H.hB(s[0],s[1]/100,s[2]/100,i?s[3]:1));return{range:e,color:j(r.rgba.r,r.rgba.g,r.rgba.b,r.rgba.a)}}function K(e,t){return"string"===typeof e?[...e.matchAll(t)]:e.findMatches(t)}function G(e){const t=[],i=/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm,n=K(e,i);if(n.length>0)for(const o of n){const i=o.filter((e=>void 0!==e)),n=i[1],s=i[2];if(!s)continue;let r;if("rgb"===n){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=$(z(e,o),K(s,t),!1)}else if("rgba"===n){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=$(z(e,o),K(s,t),!0)}else if("hsl"===n){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=q(z(e,o),K(s,t),!1)}else if("hsla"===n){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=q(z(e,o),K(s,t),!0)}else"#"===n&&(r=U(z(e,o),n+s));r&&t.push(r)}return t}function Q(e){return e&&"function"===typeof e.getValue&&"function"===typeof e.positionAt?G(e):[]}var Y=i(76198),Z=i(11955);const X=!0;class J{constructor(){this._workerTextModelSyncServer=new Z.WorkerTextModelSyncServer}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,i){const n=this._getModel(e);return n?v.UnicodeTextModelHighlighter.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const i=this._getModel(e);return i?(0,Y.findSectionHeaders)(i,t):[]}async $computeDiff(e,t,i,n){const o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;const r=ee.computeDiff(o,s,i,n);return r}static computeDiff(e,t,i,n){const o="advanced"===n?F.getDefault():F.getLegacy(),s=e.getLinesContent(),r=t.getLinesContent(),a=o.computeDiff(s,r,i),l=!(a.changes.length>0)&&this._modelsAreIdentical(e,t);function c(e){return e.map((e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:l,quitEarly:a.hitTimeout,changes:c(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,c(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let o=1;o<=i;o++){const i=e.getLineContent(o),n=t.getLineContent(o);if(i!==n)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,i){const s=this._getModel(e);if(!s)return t;const r=[];let a;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return o.Q.compareRangesUsingStarts(e.range,t.range);const i=e.range?0:1,n=t.range?0:1;return i-n}));let l=0;for(let n=1;nee._diffLimit){r.push({range:c,text:d});continue}const t=(0,n.F1)(e,d,i),l=s.offsetAt(o.Q.lift(c).getStartPosition());for(const i of t){const e=s.positionAt(l+i.originalStart),t=s.positionAt(l+i.originalStart+i.originalLength),n={text:d.substr(i.modifiedStart,i.modifiedLength),range:{startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:t.lineNumber,endColumn:t.column}};s.getValueInRange(n.range)!==n.text&&r.push(n)}}return"number"===typeof a&&r.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?g(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?Q(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,i,n){const o=new _.W,s=new RegExp(i,n),r=new Set;e:for(const a of e){const e=this._getModel(a);if(e)for(const i of e.words(s))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>ee._suggestionsLimit))break e}return{words:Array.from(r),duration:o.elapsed()}}async $computeWordRanges(e,t,i,n){const o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let a=t.startLineNumber;athis._host.$fhr(e,t),s=(0,B.kT)(n,o),r={host:s,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,t),Promise.resolve((0,B.V0)(this._foreignModule))):new Promise(((n,o)=>{const s=e=>{this._foreignModule=e.create(r,t),n((0,B.V0)(this._foreignModule))};if(X){const t=W.zl.asBrowserUri(`${e}.js`).toString(!0);i(9204)(`${t}`).then(s).catch(o)}else Promise.all([i.e(121),i.e(614)]).then(function(){var t=[i(47614)(`${e}`)];s.apply(null,t)}.bind(this))["catch"](o.bind(this))}))}$fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(i){return Promise.reject(i)}}}function te(e){return new ee(m.EditorWorkerHost.getChannel(e),null)}"function"===typeof importScripts&&(globalThis.monaco=(0,f.createMonacoBaseAPI)())},4117:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IEditorWorkerService:()=>o});var n=i(87778);const o=(0,n.u1)("editorWorkerService")},32899:(e,t,i)=>{"use strict";i.r(t),i.d(t,{EditorWorkerHost:()=>n});class n{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(n.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(n.CHANNEL_NAME,t)}}},76198:(e,t,i)=>{"use strict";i.r(t),i.d(t,{findSectionHeaders:()=>s});const n=new RegExp("\\bMARK:\\s*(.*)$","d"),o=/^-+|-+$/g;function s(e,t){let i=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const n=r(e,t);i=i.concat(n)}if(t.findMarkSectionHeaders){const t=a(e);i=i.concat(t)}return i}function r(e,t){const i=[],n=e.getLineCount();for(let o=1;o<=n;o++){const n=e.getLineContent(o),s=n.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:o,startColumn:s[0].length+1,endLineNumber:o,endColumn:n.length+1};if(e.endColumn>e.startColumn){const t={range:e,...c(n.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&i.push(t)}}}return i}function a(e){const t=[],i=e.getLineCount();for(let n=1;n<=i;n++){const i=e.getLineContent(n);l(i,n,t)}return t}function l(e,t,i){n.lastIndex=0;const o=n.exec(e);if(o){const e=o.indices[1][0]+1,n=o.indices[1][1]+1,s={startLineNumber:t,startColumn:e,endLineNumber:t,endColumn:n};if(s.endColumn>s.startColumn){const e={range:s,...c(o[1]),shouldBeInComments:!0};(e.text||e.hasSeparatorLine)&&i.push(e)}}}function c(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(o,""),{text:e,hasSeparatorLine:t}}},55885:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getIconClasses:()=>d});var n=i(6657),o=i(84366),s=i(29133),r=i(65764),a=i(12082),l=i(23740);const c=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,i,r,d){if(l.L.isThemeIcon(d))return[`codicon-${d.id}`,"predefined-file-icon"];if(s.r.isUri(d))return[];const g=r===a.p.ROOT_FOLDER?["rootfolder-icon"]:r===a.p.FOLDER?["folder-icon"]:["file-icon"];if(i){let s;if(i.scheme===n.ny.data){const e=o.B6.parseMetaData(i);s=e.get(o.B6.META_DATA_LABEL)}else{const e=i.path.match(c);e?(s=h(e[2].toLowerCase()),e[1]&&g.push(`${h(e[1].toLowerCase())}-name-dir-icon`)):s=h(i.authority.toLowerCase())}if(r===a.p.ROOT_FOLDER)g.push(`${s}-root-name-folder-icon`);else if(r===a.p.FOLDER)g.push(`${s}-name-folder-icon`);else{if(s){if(g.push(`${s}-name-file-icon`),g.push("name-file-icon"),s.length<=255){const e=s.split(".");for(let t=1;t{"use strict";i.r(t),i.d(t,{ILanguageFeatureDebounceService:()=>g,LanguageFeatureDebounceService:()=>_});var n=i(65647),o=i(21553),s=i(19977),r=i(31554),a=i(59857),l=i(87778),c=i(12660),d=i(6657),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},h=function(e,t){return function(i,n){t(i,n,e)}};const g=(0,l.u1)("ILanguageFeatureDebounceService");var p;(function(e){const t=new WeakMap;let i=0;function n(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}e.of=n})(p||(p={}));class f{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class m{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new o.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,n.sN)(p.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?(0,s.qE)(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new s.mu(6),this._cache.set(i,n));const o=(0,s.qE)(n.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new s.Uq;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return(0,s.qE)(e,this._min,this._max)}}let _=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){const n=i?.min??50,o=i?.max??n**2,s=i?.key??void 0,r=`${p.of(e)},${n}${s?","+s:""}`;let a=this._data.get(r);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new f(1.5*n)):a=new m(this._logService,t,e,0|this._overallAverage()||1.5*n,n,o),this._data.set(r,a)),a}_overallAverage(){const e=new s.Uq;for(const t of this._data.values())e.update(t.default());return e.value}};_=u([h(0,c.rr),h(1,r.k)],_),(0,a.v)(g,_,1)},12847:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ILanguageFeaturesService:()=>o});var n=i(87778);const o=(0,n.u1)("ILanguageFeaturesService")},43207:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LanguageFeaturesService:()=>g});var n=i(40231),o=i(5091),s=i(9322),r=i(35784);function a(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(a):!!e.exclusive)}class l{constructor(e,t,i,n,o){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n,this.recursive=o}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class c{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new n.vl,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,o.s)((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e,t=!1){const i=[];return this._orderedForEach(e,t,(e=>i.push(e.provider))),i}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,!1,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t,i){this._updateScores(e,t);for(const n of this._entries)n._score>0&&i(n)}_updateScores(e,t){const i=this._notebookInfoResolver?.(e.uri),n=i?new l(e.uri,e.getLanguageId(),i.uri,i.type,t):new l(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(n)){this._lastCandidate=n;for(const i of this._entries)if(i._score=(0,r.f)(i.selector,n.uri,n.languageId,(0,s.vd)(e),n.notebookUri,n.notebookType),a(i.selector)&&i._score>0){if(!t){for(const e of this._entries)e._score=0;i._score=1e3;break}i._score=0}this._entries.sort(c._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._timet._time?-1:0}}function d(e){return"string"!==typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var u=i(12847),h=i(59857);class g{constructor(){this.referenceProvider=new c(this._score.bind(this)),this.renameProvider=new c(this._score.bind(this)),this.newSymbolNamesProvider=new c(this._score.bind(this)),this.codeActionProvider=new c(this._score.bind(this)),this.definitionProvider=new c(this._score.bind(this)),this.typeDefinitionProvider=new c(this._score.bind(this)),this.declarationProvider=new c(this._score.bind(this)),this.implementationProvider=new c(this._score.bind(this)),this.documentSymbolProvider=new c(this._score.bind(this)),this.inlayHintsProvider=new c(this._score.bind(this)),this.colorProvider=new c(this._score.bind(this)),this.codeLensProvider=new c(this._score.bind(this)),this.documentFormattingEditProvider=new c(this._score.bind(this)),this.documentRangeFormattingEditProvider=new c(this._score.bind(this)),this.onTypeFormattingEditProvider=new c(this._score.bind(this)),this.signatureHelpProvider=new c(this._score.bind(this)),this.hoverProvider=new c(this._score.bind(this)),this.documentHighlightProvider=new c(this._score.bind(this)),this.multiDocumentHighlightProvider=new c(this._score.bind(this)),this.selectionRangeProvider=new c(this._score.bind(this)),this.foldingRangeProvider=new c(this._score.bind(this)),this.linkProvider=new c(this._score.bind(this)),this.inlineCompletionsProvider=new c(this._score.bind(this)),this.inlineEditProvider=new c(this._score.bind(this)),this.completionProvider=new c(this._score.bind(this)),this.linkedEditingRangeProvider=new c(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new c(this._score.bind(this)),this.documentSemanticTokensProvider=new c(this._score.bind(this)),this.documentDropEditProvider=new c(this._score.bind(this)),this.documentPasteEditProvider=new c(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,h.v)(u.ILanguageFeaturesService,g,1)},64189:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LanguageService:()=>d});var n=i(40231),o=i(5091),s=i(77024),r=i(85053),a=i(35350),l=i(65764),c=i(39751);class d extends o.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new n.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new n.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new n.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,d.instanceCount++,this._registry=this._register(new s.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){d.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,r.Fy)(i,null)}createById(e){return new u(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new u(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class u{constructor(e,t){this._value=(0,c.y0)(this,e,(()=>t())),this.onDidChange=n.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},85911:(e,t,i)=>{"use strict";i.r(t),i.d(t,{clearPlatformLanguageAssociations:()=>m,getLanguageIds:()=>_,registerPlatformLanguageAssociation:()=>g});var n=i(13589),o=i(33911),s=i(6657),r=i(52444),a=i(84366),l=i(20601),c=i(65764);let d=[],u=[],h=[];function g(e,t=!1){p(e,!1,t)}function p(e,t,i){const n=f(e,t);d.push(n),n.userConfigured?h.push(n):u.push(n),i&&!n.userConfigured&&d.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}function f(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:t,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,n.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(r.SA.sep)>=0}}function m(){d=d.filter((e=>e.userConfigured)),u=[]}function _(e,t){return v(e,t).map((e=>e.id))}function v(e,t){let i;if(e)switch(e.scheme){case s.ny.file:i=e.fsPath;break;case s.ny.data:{const t=a.B6.parseMetaData(e);i=t.get(a.B6.META_DATA_LABEL);break}case s.ny.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:o.K.unknown}];i=i.toLowerCase();const n=(0,r.P8)(i),l=b(i,n,h);if(l)return[l,{id:c.vH,mime:o.K.text}];const d=b(i,n,u);if(d)return[d,{id:c.vH,mime:o.K.text}];if(t){const e=y(t);if(e)return[e,{id:c.vH,mime:o.K.text}]}return[{id:"unknown",mime:o.K.unknown}]}function b(e,t,i){let n,o,s;for(let r=i.length-1;r>=0;r--){const a=i[r];if(t===a.filenameLowercase){n=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){const i=a.filepatternOnPath?e:t;a.filepatternLowercase?.(i)&&(o=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&t.endsWith(a.extensionLowercase)&&(s=a)}return n||(o||(s||void 0))}function y(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=d.length-1;t>=0;t--){const i=d[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}}},77024:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LanguageIdCodec:()=>h,LanguagesRegistry:()=>g});var n=i(40231),o=i(5091),s=i(20601),r=i(85911),a=i(65764),l=i(27503),c=i(16374);const d=Object.prototype.hasOwnProperty,u="vs.editor.nullLanguage";class h{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(u,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||u}}class g extends o.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new h,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,r.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),c.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;d.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const s of t.filenames)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,filename:s},this._warnOnOverwrite),e.filenames.push(s);if(Array.isArray(t.filenamePatterns))for(const s of t.filenamePatterns)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,filepattern:s},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,s.eY)(t)||(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,l)}}e.aliases.push(i);let o=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const s of o)s&&0!==s.length&&e.aliases.push(s);const a=null!==o&&o.length>0;if(a&&null===o[0]);else{const t=(a?o[0]:null)||i;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&d.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return d.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&d.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,r.getLanguageIds)(e,t):[]}}},63637:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IMarkerDecorationsService:()=>o});var n=i(87778);const o=(0,n.u1)("markerDecorationsService")},23938:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MarkerDecorationsService:()=>_});var n=i(45658),o=i(5091),s=i(9322),r=i(15911),a=i(52764),l=i(69361),c=i(8690),d=i(6657),u=i(40231),h=i(66344),g=i(21553),p=i(52782),f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};let _=class extends o.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new u.vl),this._markerDecorations=new g.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new v(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==d.ny.inMemory&&e.uri.scheme!==d.ny.internal&&e.uri.scheme!==d.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};_=f([m(0,l.IModelService),m(1,n.DR)],_);class v extends o.jG{constructor(e){super(),this.model=e,this._map=new g.cO,this._register((0,o.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:i}=(0,p.Z)(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===i.length)return!1;const n=i.map((e=>this._map.get(e))),o=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(n,o);for(const r of i)this._map.delete(r);for(let r=0;r=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new c.Q(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}}},69361:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IModelService:()=>o});var n=i(87778);const o=(0,n.u1)("modelService")},96174:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DefaultModelSHA1Computer:()=>x,ModelService:()=>k});var n,o=i(40231),s=i(5091),r=i(25160),a=i(35037),l=i(99989),c=i(65764),d=i(56151),u=i(32828),h=i(57642),g=i(65647),p=i(18217),f=i(6657),m=i(85603),_=i(87778),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};function y(e){return e.toString()}class w{constructor(e,t,i){this.model=e,this._modelEventListeners=new s.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const C=r.j9||r.zx?1:2;class S{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let k=class extends s.jG{static{n=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,i,n){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._instantiationService=n,this._onModelAdded=this._register(new o.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new o.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new o.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let i=l.R.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n="tabSize";if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=Math.max(t,1))}let o=l.R.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=C;const r=e.eol;"\r\n"===r?s=2:"\n"===r&&(s=1);let a=l.R.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=l.R.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=l.R.largeFileOptimizations;e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let u=l.R.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"===typeof e.editor.bracketPairColorization&&(u={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:o,detectIndentation:c,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:d,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"===typeof i&&"auto"!==i?i:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}getCreationOptions(e,t,i){const o="string"===typeof e?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[o+t];if(!s){const e=this._configurationService.getValue("editor",{overrideIdentifier:o,resource:t}),r=this._getEOL(t,o);s=n._readModelOptions({editor:e,eol:r},i),this._modelCreationOptionsByLanguageAndResource[o+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let o=0,s=i.length;oe){const t=[];this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));while(t.length>0&&this._disposedModelsHeapSize>e){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),s=this._instantiationService.createInstance(a.Bz,e,t,o,i);if(i&&this._disposedModels.has(y(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=this._getSHA1Computer(),o=!!n.canComputeSHA1(s)&&n.computeSHA1(s)===e.sha1;if(o||e.sharesUndoRedoStack){for(const e of t.past)(0,p.Th)(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)(0,p.Th)(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,p.Th)(e)&&e.matchesResource(i))),o&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=y(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const l=new w(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=l,l}createModel(e,t,i,n=!1){let o;return o=t?this._createModelData(e,t,i,n):this._createModelData(e,c.vH,i,n),this._onModelAdded.fire(o.model),o.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||t.future.length>0){for(const i of t.past)(0,p.Th)(i)&&i.matchesResource(e.uri)&&(s=!0,r+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)(0,p.Th)(i)&&i.matchesResource(e.uri)&&(s=!0,r+=i.heapSize(e.uri),i.setModel(e.uri))}}const a=n.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(s)if(o||!(r>a)&&l.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>(0,p.Th)(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new S(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),o,r,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!o){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,o=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(o,e.uri,e.isForSimpleWidget);n._setModelOptionsForModel(e,r,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new x}};k=n=v([b(0,u.pG),b(1,d.ITextResourcePropertiesService),b(2,h.$D),b(3,_._Y)],k);class x{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=x.MAX_MODEL_SIZE}computeSHA1(e){const t=new g.v7,i=e.createSnapshot();let n;while(n=i.read())t.update(n);return t.digest()}}},64037:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ITextModelService:()=>o});var n=i(87778);const o=(0,n.u1)("textModelService")},33699:(e,t,i)=>{"use strict";i.r(t),i.d(t,{encodeSemanticTokensDto:()=>a});var n=i(87885),o=i(25160);function s(e){for(let t=0,i=e.length;t{"use strict";i.r(t),i.d(t,{SemanticTokensProviderStyling:()=>m,toMultilineTokens2:()=>_});var n=i(4577),o=i(15911),s=i(12660),r=i(36788),a=i(8690),l=i(36627);class c{static create(e,t){return new c(e,new d(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.Q(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,o,s]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new c(this._startLineNumber,n),new c(this._startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=(0,l.W)(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new r.y(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const s=e.lineNumber-this._startLineNumber;if(s<0)return void(this._startLineNumber+=t);const r=this._tokens.getMaxDeltaLine();s>=r+1||this._tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class d{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let o=n;while(o>t&&this._getDeltaLine(o-1)===e)o--;let s=n;while(se||d===e&&h>=t)&&(de||r===e&&g>=t){if(ro?p-=o-i:p=i;else if(h===t&&g===i){if(!(h===n&&p>o)){c=!0;continue}p-=o-i}else if(ho)){c=!0;continue}h=t,g=i,p=g+(p-o)}else if(h>n){if(0===a&&!c){l=r;break}h-=a}else{if(!(h===n&&g>=o))throw new Error("Not possible!");e&&0===h&&(g+=e,p+=e),h-=a,g-=o-i,p-=o-i}const m=4*l;s[m]=h,s[m+1]=g,s[m+2]=p,s[m+3]=f,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let c=0;c=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}};const f=!1;let m=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new b}getMetadata(e,t,i){const o=this._languageService.languageIdCodec.encodeLanguageId(i),r=this._hashTable.get(e,t,o);let a;if(r)a=r.metadata,f&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${n.x.getForeground(a)}, fontStyle ${n.x.getFontStyle(a).toString(2)}`);else{let r=this._legend.tokenTypes[e];const l=[];if(r){let e=t;for(let t=0;e>0&&t>=1;f&&e>0&&this._logService.getLevel()===s.$b.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(r,l,i);if("undefined"===typeof n)a=2147483647;else{if(a=0,"undefined"!==typeof n.italic){const e=(n.italic?1:0)<<11;a|=1|e}if("undefined"!==typeof n.bold){const e=(n.bold?2:0)<<11;a|=2|e}if("undefined"!==typeof n.underline){const e=(n.underline?4:0)<<11;a|=4|e}if("undefined"!==typeof n.strikethrough){const e=(n.strikethrough?8:0)<<11;a|=8|e}if(n.foreground){const e=n.foreground<<15;a|=16|e}0===a&&(a=2147483647)}}else f&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,r="not-in-legend";this._hashTable.add(e,t,o,a),f&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${l.join(" ")}): foreground ${n.x.getForeground(a)}, fontStyle ${n.x.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${o}).`))}};function _(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),r=[];let a=0,l=1,d=0;while(ae&&0===n[5*t])t--;if(t-1===e){let e=u;while(e+1c)t.warnOverlappingSemanticTokens(r,c+1);else{const e=t.getMetadata(v,b,i);2147483647!==e&&(0===p&&(p=r),h[g]=r-p,h[g+1]=c,h[g+2]=_,h[g+3]=e,g+=4,f=r,m=_)}l=r,d=c,a++}g!==h.length&&(h=h.subarray(0,g));const _=c.create(p,h);r.push(_)}return r}m=g([p(1,o.Gy),p(2,h.L),p(3,s.rr)],m);class v{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class b{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=b._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=b._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";i.r(t),i.d(t,{ISemanticTokensStylingService:()=>o});var n=i(87778);const o=(0,n.u1)("semanticTokensStylingService")},12205:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SemanticTokensStylingService:()=>h});var n=i(5091),o=i(14573),s=i(15911),r=i(12660),a=i(4686),l=i(67284),c=i(59857),d=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},u=function(e,t){return function(i,n){t(i,n,e)}};let h=class extends n.jG{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};h=d([u(0,s.Gy),u(1,r.rr),u(2,o.L)],h),(0,c.v)(l.ISemanticTokensStylingService,h,1)},11955:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MirrorModel:()=>f,STOP_SYNC_MODEL_DELTA_TIME_MS:()=>h,WorkerTextModelSyncClient:()=>g,WorkerTextModelSyncServer:()=>p});var n=i(9659),o=i(5091),s=i(29133),r=i(36788),a=i(8690),l=i(60939),c=i(20601),d=i(73139);class u{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const i of t)this._acceptDeleteRange(i.range),this._acceptInsertText(new r.y(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;nthis._checkStopModelSync()),Math.round(h/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,o.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime){const n=e-this._syncedModelsLastUsedTime[i];n>h&&t.push(i)}for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.$acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new o.Cm;s.add(i.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(n.toString(),e)}))),s.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),s.add((0,o.s)((()=>{this._proxy.$acceptRemovedModel(n)}))),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,o.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new f(s.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;const i=this._models[e];i.onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class f extends u{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}},74977:(e,t,i)=>{"use strict";i.r(t)},56151:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ITextResourceConfigurationService:()=>o,ITextResourcePropertiesService:()=>s});var n=i(87778);const o=(0,n.u1)("textResourceConfigurationService"),s=(0,n.u1)("textResourcePropertiesService")},15863:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ITreeSitterParserService:()=>o});var n=i(87778);const o=(0,n.u1)("treeSitterParserService")},61210:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DraggedTreeItemsIdentifier:()=>o,TreeViewsDnDService:()=>n});class n{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class o{constructor(e){this.identifier=e}}},95231:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ITreeViewsDnDService:()=>r});var n=i(59857),o=i(87778),s=i(61210);const r=(0,o.u1)("treeViewsDndService");(0,n.v)(r,s.TreeViewsDnDService,1)},97412:(e,t,i)=>{"use strict";i.r(t),i.d(t,{UnicodeTextModelHighlighter:()=>l});var n=i(8690),o=i(13569),s=i(20601),r=i(79109),a=i(60939);class l{static computeUnicodeHighlights(e,t,i){const l=i?i.startLineNumber:1,u=i?i.endLineNumber:e.getLineCount(),h=new d(t),g=h.getCandidateCodePoints();let p;p="allNonBasicAscii"===g?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(`${c(Array.from(g))}`,"g");const f=new o.W5(null,p),m=[];let _,v=!1,b=0,y=0,w=0;e:for(let o=l,c=u;o<=c;o++){const t=e.getLineContent(o),i=t.length;f.reset(0);do{if(_=f.next(t),_){let e=_.index,l=_.index+_[0].length;if(e>0){const i=t.charCodeAt(e-1);s.pc(i)&&e--}if(l+1=t){v=!0;break e}m.push(new n.Q(o,e+1,o,l+1))}}}while(_)}return{ranges:m,hasMore:v,ambiguousCharacterCount:b,invisibleCharacterCount:y,nonBasicAsciiCharacterCount:w}}static computeUnicodeHighlightReason(e,t){const i=new d(t),n=i.shouldHighlightNonBasicASCII(e,null);switch(n){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),r=s.tl.getLocales().filter((e=>!s.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}function c(e,t){const i=`[${s.bm(e.map((e=>String.fromCodePoint(e))).join(""))}]`;return i}class d{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.y_.codePoints)u(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(const r of t){const e=r.codePointAt(0),t=s.aC(r);n=n||t,t||this.ambiguousCharacters.isAmbiguous(e)||s.y_.isInvisibleCharacter(e)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!u(e)&&s.y_.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function u(e){return" "===e||"\n"===e||"\t"===e}},84296:(e,t,i)=>{"use strict";var n,o,s,r,a,l,c,d,u,h,g,p,f,m,_,v,b,y,w,C,S,k,x,E,L,T,I,R,D,N,A,O,P,M,F,B,W,H,V,j,z,U,$,q,K,G;i.d(t,{A5:()=>A,Ah:()=>O,DD:()=>k,DO:()=>M,Gn:()=>n,H_:()=>U,Ic:()=>P,Io:()=>r,Kb:()=>h,M$:()=>v,OV:()=>R,QP:()=>a,Qj:()=>c,R3:()=>L,SB:()=>H,U7:()=>$,VW:()=>y,VX:()=>T,WA:()=>j,WU:()=>m,XR:()=>W,YT:()=>D,ZS:()=>_,_E:()=>s,cj:()=>x,dE:()=>N,d_:()=>E,e0:()=>g,h5:()=>d,hS:()=>I,hW:()=>F,jT:()=>V,kK:()=>K,kf:()=>f,l:()=>b,m9:()=>q,of:()=>u,ok:()=>o,ov:()=>B,p2:()=>p,qw:()=>C,r4:()=>w,sm:()=>S,t7:()=>l,tJ:()=>G,v0:()=>z}),function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"}(n||(n={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["Auto"]=2]="Auto"}(o||(o={})),function(e){e[e["None"]=0]="None",e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(s||(s={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(r||(r={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(a||(a={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(l||(l={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(c||(c={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(d||(d={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(u||(u={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(h||(h={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(g||(g={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["ariaRequired"]=5]="ariaRequired",e[e["autoClosingBrackets"]=6]="autoClosingBrackets",e[e["autoClosingComments"]=7]="autoClosingComments",e[e["screenReaderAnnounceInlineSuggestion"]=8]="screenReaderAnnounceInlineSuggestion",e[e["autoClosingDelete"]=9]="autoClosingDelete",e[e["autoClosingOvertype"]=10]="autoClosingOvertype",e[e["autoClosingQuotes"]=11]="autoClosingQuotes",e[e["autoIndent"]=12]="autoIndent",e[e["automaticLayout"]=13]="automaticLayout",e[e["autoSurround"]=14]="autoSurround",e[e["bracketPairColorization"]=15]="bracketPairColorization",e[e["guides"]=16]="guides",e[e["codeLens"]=17]="codeLens",e[e["codeLensFontFamily"]=18]="codeLensFontFamily",e[e["codeLensFontSize"]=19]="codeLensFontSize",e[e["colorDecorators"]=20]="colorDecorators",e[e["colorDecoratorsLimit"]=21]="colorDecoratorsLimit",e[e["columnSelection"]=22]="columnSelection",e[e["comments"]=23]="comments",e[e["contextmenu"]=24]="contextmenu",e[e["copyWithSyntaxHighlighting"]=25]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=26]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=27]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=28]="cursorStyle",e[e["cursorSurroundingLines"]=29]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=30]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=31]="cursorWidth",e[e["disableLayerHinting"]=32]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=33]="disableMonospaceOptimizations",e[e["domReadOnly"]=34]="domReadOnly",e[e["dragAndDrop"]=35]="dragAndDrop",e[e["dropIntoEditor"]=36]="dropIntoEditor",e[e["emptySelectionClipboard"]=37]="emptySelectionClipboard",e[e["experimentalWhitespaceRendering"]=38]="experimentalWhitespaceRendering",e[e["extraEditorClassName"]=39]="extraEditorClassName",e[e["fastScrollSensitivity"]=40]="fastScrollSensitivity",e[e["find"]=41]="find",e[e["fixedOverflowWidgets"]=42]="fixedOverflowWidgets",e[e["folding"]=43]="folding",e[e["foldingStrategy"]=44]="foldingStrategy",e[e["foldingHighlight"]=45]="foldingHighlight",e[e["foldingImportsByDefault"]=46]="foldingImportsByDefault",e[e["foldingMaximumRegions"]=47]="foldingMaximumRegions",e[e["unfoldOnClickAfterEndOfLine"]=48]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=49]="fontFamily",e[e["fontInfo"]=50]="fontInfo",e[e["fontLigatures"]=51]="fontLigatures",e[e["fontSize"]=52]="fontSize",e[e["fontWeight"]=53]="fontWeight",e[e["fontVariations"]=54]="fontVariations",e[e["formatOnPaste"]=55]="formatOnPaste",e[e["formatOnType"]=56]="formatOnType",e[e["glyphMargin"]=57]="glyphMargin",e[e["gotoLocation"]=58]="gotoLocation",e[e["hideCursorInOverviewRuler"]=59]="hideCursorInOverviewRuler",e[e["hover"]=60]="hover",e[e["inDiffEditor"]=61]="inDiffEditor",e[e["inlineSuggest"]=62]="inlineSuggest",e[e["inlineEdit"]=63]="inlineEdit",e[e["letterSpacing"]=64]="letterSpacing",e[e["lightbulb"]=65]="lightbulb",e[e["lineDecorationsWidth"]=66]="lineDecorationsWidth",e[e["lineHeight"]=67]="lineHeight",e[e["lineNumbers"]=68]="lineNumbers",e[e["lineNumbersMinChars"]=69]="lineNumbersMinChars",e[e["linkedEditing"]=70]="linkedEditing",e[e["links"]=71]="links",e[e["matchBrackets"]=72]="matchBrackets",e[e["minimap"]=73]="minimap",e[e["mouseStyle"]=74]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=75]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=76]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=77]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=78]="multiCursorModifier",e[e["multiCursorPaste"]=79]="multiCursorPaste",e[e["multiCursorLimit"]=80]="multiCursorLimit",e[e["occurrencesHighlight"]=81]="occurrencesHighlight",e[e["overviewRulerBorder"]=82]="overviewRulerBorder",e[e["overviewRulerLanes"]=83]="overviewRulerLanes",e[e["padding"]=84]="padding",e[e["pasteAs"]=85]="pasteAs",e[e["parameterHints"]=86]="parameterHints",e[e["peekWidgetDefaultFocus"]=87]="peekWidgetDefaultFocus",e[e["placeholder"]=88]="placeholder",e[e["definitionLinkOpensInPeek"]=89]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=90]="quickSuggestions",e[e["quickSuggestionsDelay"]=91]="quickSuggestionsDelay",e[e["readOnly"]=92]="readOnly",e[e["readOnlyMessage"]=93]="readOnlyMessage",e[e["renameOnType"]=94]="renameOnType",e[e["renderControlCharacters"]=95]="renderControlCharacters",e[e["renderFinalNewline"]=96]="renderFinalNewline",e[e["renderLineHighlight"]=97]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=98]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=99]="renderValidationDecorations",e[e["renderWhitespace"]=100]="renderWhitespace",e[e["revealHorizontalRightPadding"]=101]="revealHorizontalRightPadding",e[e["roundedSelection"]=102]="roundedSelection",e[e["rulers"]=103]="rulers",e[e["scrollbar"]=104]="scrollbar",e[e["scrollBeyondLastColumn"]=105]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=106]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=107]="scrollPredominantAxis",e[e["selectionClipboard"]=108]="selectionClipboard",e[e["selectionHighlight"]=109]="selectionHighlight",e[e["selectOnLineNumbers"]=110]="selectOnLineNumbers",e[e["showFoldingControls"]=111]="showFoldingControls",e[e["showUnused"]=112]="showUnused",e[e["snippetSuggestions"]=113]="snippetSuggestions",e[e["smartSelect"]=114]="smartSelect",e[e["smoothScrolling"]=115]="smoothScrolling",e[e["stickyScroll"]=116]="stickyScroll",e[e["stickyTabStops"]=117]="stickyTabStops",e[e["stopRenderingLineAfter"]=118]="stopRenderingLineAfter",e[e["suggest"]=119]="suggest",e[e["suggestFontSize"]=120]="suggestFontSize",e[e["suggestLineHeight"]=121]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=122]="suggestOnTriggerCharacters",e[e["suggestSelection"]=123]="suggestSelection",e[e["tabCompletion"]=124]="tabCompletion",e[e["tabIndex"]=125]="tabIndex",e[e["unicodeHighlighting"]=126]="unicodeHighlighting",e[e["unusualLineTerminators"]=127]="unusualLineTerminators",e[e["useShadowDOM"]=128]="useShadowDOM",e[e["useTabStops"]=129]="useTabStops",e[e["wordBreak"]=130]="wordBreak",e[e["wordSegmenterLocales"]=131]="wordSegmenterLocales",e[e["wordSeparators"]=132]="wordSeparators",e[e["wordWrap"]=133]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=134]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=135]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=136]="wordWrapColumn",e[e["wordWrapOverride1"]=137]="wordWrapOverride1",e[e["wordWrapOverride2"]=138]="wordWrapOverride2",e[e["wrappingIndent"]=139]="wrappingIndent",e[e["wrappingStrategy"]=140]="wrappingStrategy",e[e["showDeprecated"]=141]="showDeprecated",e[e["inlayHints"]=142]="inlayHints",e[e["editorClassName"]=143]="editorClassName",e[e["pixelRatio"]=144]="pixelRatio",e[e["tabFocusMode"]=145]="tabFocusMode",e[e["layoutInfo"]=146]="layoutInfo",e[e["wrappingInfo"]=147]="wrappingInfo",e[e["defaultColorDecorators"]=148]="defaultColorDecorators",e[e["colorDecoratorsActivatedOn"]=149]="colorDecoratorsActivatedOn",e[e["inlineCompletionsAccessibilityVerbose"]=150]="inlineCompletionsAccessibilityVerbose"}(p||(p={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(f||(f={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(m||(m={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(_||(_={})),function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"}(v||(v={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(b||(b={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(y||(y={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(w||(w={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(C||(C={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(S||(S={})),function(e){e[e["DependsOnKbLayout"]=-1]="DependsOnKbLayout",e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["Digit0"]=21]="Digit0",e[e["Digit1"]=22]="Digit1",e[e["Digit2"]=23]="Digit2",e[e["Digit3"]=24]="Digit3",e[e["Digit4"]=25]="Digit4",e[e["Digit5"]=26]="Digit5",e[e["Digit6"]=27]="Digit6",e[e["Digit7"]=28]="Digit7",e[e["Digit8"]=29]="Digit8",e[e["Digit9"]=30]="Digit9",e[e["KeyA"]=31]="KeyA",e[e["KeyB"]=32]="KeyB",e[e["KeyC"]=33]="KeyC",e[e["KeyD"]=34]="KeyD",e[e["KeyE"]=35]="KeyE",e[e["KeyF"]=36]="KeyF",e[e["KeyG"]=37]="KeyG",e[e["KeyH"]=38]="KeyH",e[e["KeyI"]=39]="KeyI",e[e["KeyJ"]=40]="KeyJ",e[e["KeyK"]=41]="KeyK",e[e["KeyL"]=42]="KeyL",e[e["KeyM"]=43]="KeyM",e[e["KeyN"]=44]="KeyN",e[e["KeyO"]=45]="KeyO",e[e["KeyP"]=46]="KeyP",e[e["KeyQ"]=47]="KeyQ",e[e["KeyR"]=48]="KeyR",e[e["KeyS"]=49]="KeyS",e[e["KeyT"]=50]="KeyT",e[e["KeyU"]=51]="KeyU",e[e["KeyV"]=52]="KeyV",e[e["KeyW"]=53]="KeyW",e[e["KeyX"]=54]="KeyX",e[e["KeyY"]=55]="KeyY",e[e["KeyZ"]=56]="KeyZ",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["F20"]=78]="F20",e[e["F21"]=79]="F21",e[e["F22"]=80]="F22",e[e["F23"]=81]="F23",e[e["F24"]=82]="F24",e[e["NumLock"]=83]="NumLock",e[e["ScrollLock"]=84]="ScrollLock",e[e["Semicolon"]=85]="Semicolon",e[e["Equal"]=86]="Equal",e[e["Comma"]=87]="Comma",e[e["Minus"]=88]="Minus",e[e["Period"]=89]="Period",e[e["Slash"]=90]="Slash",e[e["Backquote"]=91]="Backquote",e[e["BracketLeft"]=92]="BracketLeft",e[e["Backslash"]=93]="Backslash",e[e["BracketRight"]=94]="BracketRight",e[e["Quote"]=95]="Quote",e[e["OEM_8"]=96]="OEM_8",e[e["IntlBackslash"]=97]="IntlBackslash",e[e["Numpad0"]=98]="Numpad0",e[e["Numpad1"]=99]="Numpad1",e[e["Numpad2"]=100]="Numpad2",e[e["Numpad3"]=101]="Numpad3",e[e["Numpad4"]=102]="Numpad4",e[e["Numpad5"]=103]="Numpad5",e[e["Numpad6"]=104]="Numpad6",e[e["Numpad7"]=105]="Numpad7",e[e["Numpad8"]=106]="Numpad8",e[e["Numpad9"]=107]="Numpad9",e[e["NumpadMultiply"]=108]="NumpadMultiply",e[e["NumpadAdd"]=109]="NumpadAdd",e[e["NUMPAD_SEPARATOR"]=110]="NUMPAD_SEPARATOR",e[e["NumpadSubtract"]=111]="NumpadSubtract",e[e["NumpadDecimal"]=112]="NumpadDecimal",e[e["NumpadDivide"]=113]="NumpadDivide",e[e["KEY_IN_COMPOSITION"]=114]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=115]="ABNT_C1",e[e["ABNT_C2"]=116]="ABNT_C2",e[e["AudioVolumeMute"]=117]="AudioVolumeMute",e[e["AudioVolumeUp"]=118]="AudioVolumeUp",e[e["AudioVolumeDown"]=119]="AudioVolumeDown",e[e["BrowserSearch"]=120]="BrowserSearch",e[e["BrowserHome"]=121]="BrowserHome",e[e["BrowserBack"]=122]="BrowserBack",e[e["BrowserForward"]=123]="BrowserForward",e[e["MediaTrackNext"]=124]="MediaTrackNext",e[e["MediaTrackPrevious"]=125]="MediaTrackPrevious",e[e["MediaStop"]=126]="MediaStop",e[e["MediaPlayPause"]=127]="MediaPlayPause",e[e["LaunchMediaPlayer"]=128]="LaunchMediaPlayer",e[e["LaunchMail"]=129]="LaunchMail",e[e["LaunchApp2"]=130]="LaunchApp2",e[e["Clear"]=131]="Clear",e[e["MAX_VALUE"]=132]="MAX_VALUE"}(k||(k={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(x||(x={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(E||(E={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(L||(L={})),function(e){e[e["Normal"]=1]="Normal",e[e["Underlined"]=2]="Underlined"}(T||(T={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(I||(I={})),function(e){e[e["AIGenerated"]=1]="AIGenerated"}(R||(R={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(D||(D={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(N||(N={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(A||(A={})),function(e){e[e["Word"]=0]="Word",e[e["Line"]=1]="Line",e[e["Suggest"]=2]="Suggest"}(O||(O={})),function(e){e[e["Left"]=0]="Left",e[e["Right"]=1]="Right",e[e["None"]=2]="None",e[e["LeftOfInjectedText"]=3]="LeftOfInjectedText",e[e["RightOfInjectedText"]=4]="RightOfInjectedText"}(P||(P={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(M||(M={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(F||(F={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(B||(B={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(W||(W={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(H||(H={})),function(e){e["Off"]="off",e["OnCode"]="onCode",e["On"]="on"}(V||(V={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(j||(j={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(z||(z={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(U||(U={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}($||($={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(q||(q={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(K||(K={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(G||(G={}))},340:(e,t,i)=>{"use strict";i.d(t,{E6:()=>c,Hw:()=>o,YN:()=>n,gf:()=>r,n9:()=>a,oq:()=>s,tu:()=>d,vp:()=>l});var n,o,s,r,a,l,c,d,u=i(41337);(function(e){e.inspectTokensAction=u.kg("inspectTokens","Developer: Inspect Tokens")})(n||(n={})),function(e){e.gotoLineActionLabel=u.kg("gotoLineActionLabel","Go to Line/Column...")}(o||(o={})),function(e){e.helpQuickAccessActionLabel=u.kg("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=u.kg("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=u.kg("quickCommandActionHelp","Show And Run Commands")}(r||(r={})),function(e){e.quickOutlineActionLabel=u.kg("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=u.kg("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(a||(a={})),function(e){e.editorViewAccessibleLabel=u.kg("editorViewAccessibleLabel","Editor content")}(l||(l={})),function(e){e.toggleHighContrast=u.kg("toggleHighContrast","Toggle High Contrast Theme")}(c||(c={})),function(e){e.bulkEditServiceSummary=u.kg("bulkEditServiceSummary","Made {0} edits in {1} files")}(d||(d={}))},50410:(e,t,i)=>{"use strict";i.d(t,{E$:()=>r,HP:()=>c,Ic:()=>u,U0:()=>s,Wn:()=>n,bg:()=>a,mS:()=>l,uK:()=>o,vn:()=>d});class n{constructor(){this.changeType=1}}class o{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}}class s{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class r{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class c{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t{"use strict";var n;i.d(t,{N6:()=>n,TH:()=>o,pv:()=>s}),function(e){e[e["Disabled"]=0]="Disabled",e[e["EnabledForActive"]=1]="EnabledForActive",e[e["Enabled"]=2]="Enabled"}(n||(n={}));class o{constructor(e,t,i,n,o,s){if(this.visibleColumn=e,this.column=t,this.className=i,this.horizontalLine=n,this.forWrappedLinesAfterColumn=o,this.forWrappedLinesBeforeOrAtColumn=s,-1!==e===(-1!==t))throw new Error}}class s{constructor(e,t){this.top=e,this.endColumn=t}}},70164:(e,t,i)=>{"use strict";i.d(t,{T:()=>r,f:()=>o});var n=i(4577);class o{static{this.defaultTokenMetadata=33587200}static createEmpty(e,t){const i=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new o(n,e,t)}static createFromTextAndMetadata(e,t){let i=0,n="";const s=new Array;for(const{text:o,metadata:r}of e)s.push(i+o.length,r),i+=o.length,n+=o;return new o(new Uint32Array(s),n,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=i}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let s=n;s0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.x.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return n.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new s(this,e,t,i)}static convertToEndOffset(e,t){const i=e.length>>>1,n=i-1;for(let o=0;o>>1)-1;while(it&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const s=new Array;let r=0;while(1){const o=tr){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];s.push(n.length,e),r=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}}return new o(new Uint32Array(s),n,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),i=this.getEndOffset(e),n=this._text.substring(t,i);return n}forEach(e){const t=this.getCount();for(let i=0;i=i)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof s&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,i=this._source.getStartOffset(t),n=this._source.getEndOffset(t);let o=this._source.getTokenText(t);return ithis._endOffset&&(o=o.substring(0,o.length-(n-this._endOffset))),o}forEach(e){for(let t=0;t{"use strict";i.d(t,{Bs:()=>a,d:()=>o});var n=i(20601);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s=s||(a[l++]=new o(Math.max(1,c.startColumn-n+1),Math.min(r+1,c.endColumn-n+1),c.className,c.type));return a}static filter(e,t,i,n){if(0===e.length)return[];const s=[];let r=0;for(let a=0,l=e.length;at)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const d=c.startLineNumber===t?c.startColumn:i,u=c.endLineNumber===t?c.endColumn:n;s[r++]=new o(d,u,l.inlineClassName,l.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=o._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];const i=[],o=new r;let s=0;for(let r=0,a=t.length;r1){const t=e.charCodeAt(l-2);n.pc(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);n.pc(t)&&c--}const h=l-1,g=c-2;s=o.consumeLowerThan(h,s,i),0===o.count&&(s=h),o.insert(g,d,u)}return o.consumeLowerThan(1073741824,s,i),i}}},20529:(e,t,i)=>{"use strict";i.d(t,{wZ:()=>d,MT:()=>l,zL:()=>c,UW:()=>g,Md:()=>f});var n=i(41337),o=i(20601),s=i(13647),r=i(1550);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class l{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class c{constructor(e,t,i,n,o,s,a,l,c,d,u,h,g,p,f,m,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(r.d.compare),this.tabSize=d,this.startVisibleColumn=u,this.spaceWidth=h,this.stopRenderingLineAfter=f,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const o=(t<<16|i)>>>0;this._data[e-1]=o,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=u.getPartIndex(t),n=u.getCharIndex(t);return new d(i,n)}getColumn(e,t){const i=this.partDataToCharOffset(e.partIndex,t,e.charIndex);return i+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i)>>>0;let o=0,s=this.length-1;while(o+1>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;const r=this._data[o],a=this._data[s];if(r===n)return o;if(a===n)return s;const l=u.getPartIndex(r),c=u.getCharIndex(r),d=u.getPartIndex(a);let h;h=l!==d?t:u.getCharIndex(a);const g=i-c,p=h-i;return g<=p?o:s}}class h{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("");let i=0,n=0,o=0;for(const r of e.lineDecorations)1!==r.type&&2!==r.type||(t.appendString(''),1===r.type&&(o|=1,i++),2===r.type&&(o|=2,n++));t.appendString("");const s=new u(1,i+n);return s.setColumnInfo(1,i,0,0),new h(s,!1,o)}return t.appendString(""),new h(new u(0,0),!1,0)}return k(_(e),t)}class p{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function f(e){const t=new s.fe(1e4),i=g(e,t);return new p(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)}class m{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h,g,p,f){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=o,this.overflowingCharCount=s,this.parts=r,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=c,this.startVisibleColumn=d,this.containsRTL=u,this.spaceWidth=h,this.renderSpaceCharCode=g,this.renderWhitespace=p,this.renderControlCharacters=f}}function _(e){const t=e.lineContent;let i,n,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0){for(let t=0,i=e.lineDecorations.length;t0&&(r[l++]=new a(n,"",0,!1));let c=n;for(let d=0,u=i.getCount();d=s){const i=!!t&&o.E_(e.substring(c,s));r[l++]=new a(s,h,0,i);break}const g=!!t&&o.E_(e.substring(c,u));r[l++]=new a(u,h,0,g),c=u}return r}function b(e,t,i){let n=0;const o=[];let s=0;if(i)for(let r=0,l=t.length;r=50&&(o[s++]=new a(d+1,t,r,c),u=d+1,d=-1);u!==l&&(o[s++]=new a(l,t,r,c))}else o[s++]=i;n=l}else for(let r=0,l=t.length;r50){const t=e.type,r=e.metadata,c=e.containsRTL,d=Math.ceil(l/50);for(let e=1;e=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e)}function w(e,t){const i=[];let n=new a(0,"",0,!1),o=0;for(const s of t){const t=s.endIndex;for(;on.endIndex&&(n=new a(o,s.type,s.metadata,s.containsRTL),i.push(n)),n=new a(o+1,"mtkcontrol",s.metadata,!1),i.push(n))}o>n.endIndex&&(n=new a(t,s.type,s.metadata,s.containsRTL),i.push(n))}return i}function C(e,t,i,n){const s=e.continuesWithWrappedLine,r=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,d=e.useMonospaceOptimizations,u=e.selectionsOnLine,h=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth,f=[];let m=0,_=0,v=n[_].type,b=n[_].containsRTL,y=n[_].endIndex;const w=n.length;let C,S=!1,k=o.HG(t);-1===k?(S=!0,k=i,C=i):C=o.lT(t);let x=!1,E=0,L=u&&u[E],T=c%l;for(let R=r;R=L.endOffset&&(E++,L=u&&u[E]),RC)s=!0;else if(9===e)s=!0;else if(32===e)if(h)if(x)s=!0;else{const e=R+1R),s&&g&&(s=S||R>C),s&&b&&R>=k&&R<=C&&(s=!1),x){if(!s||!d&&T>=l){if(p){const e=m>0?f[m-1].endIndex:r;for(let t=e+1;t<=R;t++)f[m++]=new a(t,"mtkw",1,!1)}else f[m++]=new a(R,"mtkw",1,!1);T%=l}}else(R===y||s&&R>r)&&(f[m++]=new a(R,v,0,b),T%=l);9===e?T=l:o.ne(e)?T+=2:T++,x=s;while(R===y){if(_++,!(_0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0,o=32===e&&32!==n&&9!==n;o||(I=!0)}else I=!0;if(I)if(p){const e=m>0?f[m-1].endIndex:r;for(let t=e+1;t<=i;t++)f[m++]=new a(t,"mtkw",1,!1)}else f[m++]=new a(i,"mtkw",1,!1);else f[m++]=new a(i,v,0,b);return f}function S(e,t,i,n){n.sort(r.d.compare);const o=r.Bs.normalize(e,n),s=o.length;let l=0;const c=[];let d=0,u=0;for(let r=0,g=i.length;ru&&(u=e.startOffset,c[d++]=new a(u,n,h,g)),!(e.endOffset+1<=t)){u=t,c[d++]=new a(u,n+" "+e.className,h|e.metadata,g);break}u=e.endOffset+1,c[d++]=new a(u,n+" "+e.className,h|e.metadata,g),l++}t>u&&(u=t,c[d++]=new a(u,n,h,g))}const h=i[i.length-1].endIndex;if(l'):t.appendString("");for(let n=0,u=g.length;n=p&&(i+=o)}}for(m&&(t.appendString(' style="width:'),t.appendString(String(v*e)),t.appendString('px"')),t.appendASCIICharCode(62);L1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=o;e++)t.appendCharCode(160)}else i=2,o=1,t.appendCharCode(b),t.appendCharCode(8204);I+=i,R+=o,L>=p&&(T+=o)}}else for(t.appendASCIICharCode(62);L=p&&(T+=s)}_?D++:D=0,L>=l&&!k&&e.isPseudoAfter()&&(k=!0,S.setColumnInfo(L+1,n,I,R)),t.appendString("")}return k||S.setColumnInfo(l+1,g.length-1,I,R),c&&(t.appendString(''),t.appendString(n.kg("showMore","Show more ({0})",E(d))),t.appendString("")),t.appendString(""),new h(S,_,r)}function x(e){return e.toString(16).toUpperCase().padStart(4,"0")}function E(e){return e<1024?n.kg("overflow.chars","{0} chars",e):e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}},90765:(e,t,i)=>{"use strict";i.d(t,{GP:()=>l,LM:()=>r,Uv:()=>g,kI:()=>d,nt:()=>a,or:()=>u,qL:()=>c,vo:()=>h});var n=i(85053),o=i(20601),s=i(8690);class r{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class a{constructor(e,t){this.tabSize=e,this.data=t}}class l{constructor(e,t,i,n,o,s,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=r}}class c{constructor(e,t,i,n,o,s,r,a,l,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=c.isBasicASCII(i,s),this.containsRTL=c.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||o.aC(e)}static containsRTL(e,t,i){return!(t||!i)&&o.E_(e)}}class d{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class u{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new d(new s.Q(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class h{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class g{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&n.aI(e.data,t.data)}static equalsArr(e,t){return n.aI(e,t,g.equals)}}},21934:(e,t,i)=>{"use strict";i.d(t,{iE:()=>o,rW:()=>s});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(g=i-p);const f=o.color;let m=this._color2Id[f];m||(m=++this._lastAssignedId,this._color2Id[f]=m,this._id2Color[m]=f);const _=new n(g-p,g+p,m);o.setColorZone(_),a.push(_)}return this._colorZonesInvalid=!1,a.sort(n.compare),a}}},10049:(e,t,i)=>{"use strict";i.d(t,{GN:()=>l,UB:()=>a,a6:()=>c,wc:()=>d});var n=i(36788),o=i(8690),s=i(90765),r=i(35011);class a{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const r=e.range,a=e.options;let l;if(a.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.y(r.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.y(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);l=new o.Q(e.lineNumber,e.column,t.lineNumber,t.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(r,1);i=new s.vo(l,a),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new o.Q(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,r.$C)(this.configuration.options),t,i),a=e.startLineNumber,c=e.endLineNumber,d=[];let u=0;const h=[];for(let o=a;o<=c;o++)h[o-a]=[];for(let r=0,g=n.length;r1===e))}function d(e,t){return u(e,t.range,(e=>2===e))}function u(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.tokenization.getLineTokens(n),s=n===t.startLineNumber,r=n===t.endLineNumber;let a=s?o.findTokenIndexAtOffset(t.startColumn-1):0;while(at.endColumn-1)break}const e=i(o.getStandardTokenType(a));if(!e)return!1;a++}}return!0}},90141:(e,t,i)=>{"use strict";var n,o=i(19950),s=i(42325),r=i(91348),a=i(16259),l=i(98581),c=i(57479),d=i(41337),u=i(18904),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};const p=new u.N1("selectionAnchorSet",!1);let f=class{static{n=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(n.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=p.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations((t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(l.L.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new s.Bc).appendText((0,d.kg)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,o.xE)((0,d.kg)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(l.L.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations((t=>{t.removeDecoration(e),this.decorationId=void 0})),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};f=n=h([g(1,u.fN)],f);class m extends a.ks{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,d.kg)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:(0,r.m5)(2089,2080),weight:100}})}async run(e,t){f.get(t)?.setSelectionAnchor()}}class _ extends a.ks{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,d.kg)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:p})}async run(e,t){f.get(t)?.goToSelectionAnchor()}}class v extends a.ks{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,d.kg)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:p,kbOpts:{kbExpr:c.R.editorTextFocus,primary:(0,r.m5)(2089,2089),weight:100}})}async run(e,t){f.get(t)?.selectFromAnchorToCursor()}}class b extends a.ks{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,d.kg)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:p,kbOpts:{kbExpr:c.R.editorTextFocus,primary:9,weight:100}})}async run(e,t){f.get(t)?.cancelSelectionAnchor()}}(0,a.HW)(f.ID,f,4),(0,a.Fl)(m),(0,a.Fl)(_),(0,a.Fl)(v),(0,a.Fl)(b)},92919:(e,t,i)=>{"use strict";var n=i(9659),o=i(5091),s=i(16259),r=i(36788),a=i(8690),l=i(98581),c=i(57479),d=i(9322),u=i(35037),h=i(41337),g=i(6330),p=i(66344),f=i(15911);const m=(0,p.x1A)("editorOverviewRuler.bracketMatchForeground","#A0A0A0",h.kg("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class _ extends s.ks{constructor(){super({id:"editor.action.jumpToBracket",label:h.kg("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3165,weight:100}})}run(e,t){w.get(t)?.jumpToBracket()}}class v extends s.ks{constructor(){super({id:"editor.action.selectToBracket",label:h.kg("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:h.aS("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let n=!0;i&&!1===i.selectBrackets&&(n=!1),w.get(t)?.selectToBracket(n)}}class b extends s.ks{constructor(){super({id:"editor.action.removeBrackets",label:h.kg("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:2561,weight:100}})}run(e,t){w.get(t)?.removeBrackets(this.id)}}class y{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class w extends o.jG{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(w.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.uC((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new l.L(o.lineNumber,o.column,o.lineNumber,o.column):new l.L(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const o=n.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const e=t.bracketPairs.findNextBracket(o);e&&e.range&&(s=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,c=null;if(s){s.sort(a.Q.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),c=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=c,c=e}}r&&c&&i.push(new l.L(r.lineNumber,r.column,c.lineNumber,c.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach((i=>{const n=i.getPosition();let o=t.bracketPairs.matchBracket(n);o||(o=t.bracketPairs.findEnclosingBrackets(n)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())}))}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=u.kI.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,f.Yf)(m),position:d.A5.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=u.kI.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const o=[];let s=0;for(let r=0,u=e.length;r1&&o.sort(r.y.compare);const a=[];let l=0,c=0;const d=n.length;for(let r=0,u=o.length;r{"use strict";var n=i(16259),o=i(57479),s=i(8690),r=i(98581);class a{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new s.Q(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.Q(i,o,i,o),a)}else{const r=new s.Q(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.Q(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new r.L(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new r.L(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var l=i(41337);class c extends n.ks{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const o of n)i.push(new a(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class d extends c{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:l.kg("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:o.R.writable})}}class u extends c{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:l.kg("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:o.R.writable})}}(0,n.Fl)(d),(0,n.Fl)(u)},50877:(e,t,i)=>{"use strict";var n=i(16259),o=i(50793),s=i(31161),r=i(8690),a=i(57479),l=i(41337);class c extends n.ks{constructor(){super({id:"editor.action.transposeLetters",label:l.kg("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.R.writable,kbOpts:{kbExpr:a.R.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],a=t.getSelections();for(const l of a){if(!l.isEmpty())continue;const e=l.startLineNumber,t=l.startColumn,a=i.getLineMaxColumn(e);if(1===e&&(1===t||2===t&&2===a))continue;const c=t===a?l.getPosition():s.I.rightPosition(i,l.getPosition().lineNumber,l.getPosition().column),d=s.I.leftPosition(i,c),u=s.I.leftPosition(i,d),h=i.getValueInRange(r.Q.fromPositions(u,d)),g=i.getValueInRange(r.Q.fromPositions(d,c)),p=r.Q.fromPositions(u,c);n.push(new o.iu(p,g+h))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Fl)(c)},14291:(e,t,i)=>{"use strict";var n=i(88758),o=i(2150),s=i(25160),r=i(169),a=i(16259),l=i(94728),c=i(57479),d=i(878),u=i(41337),h=i(6330),g=i(28753),p=i(18904);const f="9_cutcopypaste",m=s.ib||document.queryCommandSupported("cut"),_=s.ib||document.queryCommandSupported("copy"),v="undefined"!==typeof navigator.clipboard&&!n.gm||document.queryCommandSupported("paste");function b(e){return e.register(),e}const y=m?b(new a.fE({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:s.ib?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"2_ccp",title:u.kg({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:h.D8.EditorContext,group:f,title:u.kg("actions.clipboard.cutLabel","Cut"),when:c.R.writable,order:1},{menuId:h.D8.CommandPalette,group:"",title:u.kg("actions.clipboard.cutLabel","Cut"),order:1},{menuId:h.D8.SimpleEditorContext,group:f,title:u.kg("actions.clipboard.cutLabel","Cut"),when:c.R.writable,order:1}]})):void 0,w=_?b(new a.fE({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:s.ib?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"2_ccp",title:u.kg({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:h.D8.EditorContext,group:f,title:u.kg("actions.clipboard.copyLabel","Copy"),order:2},{menuId:h.D8.CommandPalette,group:"",title:u.kg("actions.clipboard.copyLabel","Copy"),order:1},{menuId:h.D8.SimpleEditorContext,group:f,title:u.kg("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;h.ZG.appendMenuItem(h.D8.MenubarEditMenu,{submenu:h.D8.MenubarCopy,title:u.aS("copy as","Copy As"),group:"2_ccp",order:3}),h.ZG.appendMenuItem(h.D8.EditorContext,{submenu:h.D8.EditorContextCopy,title:u.aS("copy as","Copy As"),group:f,order:3}),h.ZG.appendMenuItem(h.D8.EditorContext,{submenu:h.D8.EditorContextShare,title:u.aS("share","Share"),group:"11_share",order:-1,when:p.M$.and(p.M$.notEquals("resourceScheme","output"),c.R.editorTextFocus)}),h.ZG.appendMenuItem(h.D8.ExplorerContext,{submenu:h.D8.ExplorerContextShare,title:u.aS("share","Share"),group:"11_share",order:-1});const C=v?b(new a.fE({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:s.ib?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"2_ccp",title:u.kg({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:h.D8.EditorContext,group:f,title:u.kg("actions.clipboard.pasteLabel","Paste"),when:c.R.writable,order:4},{menuId:h.D8.CommandPalette,group:"",title:u.kg("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:h.D8.SimpleEditorContext,group:f,title:u.kg("actions.clipboard.pasteLabel","Paste"),when:c.R.writable,order:4}]})):void 0;class S extends a.ks{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:u.kg("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:c.R.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getOption(37);!i&&t.getSelection().isEmpty()||(r.Eq.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),r.Eq.forceCopyWithSyntaxHighlighting=!1)}}function k(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(l.T).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(37),i=n.getSelection();return i&&i.isEmpty()&&!e||n.getContainerDomNode().ownerDocument.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>((0,o.a)().execCommand(t),!0))))}k(y,"cut"),k(w,"copy"),C&&(C.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.T),n=e.get(g.h),o=i.getFocusedCodeEditor();if(o&&o.hasTextFocus()){const e=o.getContainerDomNode().ownerDocument.execCommand("paste");return e?d.Rj.get(o)?.finishedPaste()??Promise.resolve():!s.HZ||(async()=>{const e=await n.readText();if(""!==e){const t=r.bs.INSTANCE.get(e);let i=!1,n=null,s=null;t&&(i=o.getOption(37)&&!!t.isFromEmptySelection,n="undefined"!==typeof t.multicursorText?t.multicursorText:null,s=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:s})}})()}return!1})),C.addImplementation(0,"generic-dom",((e,t)=>((0,o.a)().execCommand("paste"),!0)))),_&&(0,a.Fl)(S)},51761:(e,t,i)=>{"use strict";i.d(t,{C9:()=>x,Qp:()=>O,Rw:()=>L,Uy:()=>E,W4:()=>P,Xj:()=>k,dU:()=>R,k_:()=>w,pQ:()=>C,pR:()=>S});var n=i(85053),o=i(67792),s=i(14396),r=i(5091),a=i(29133),l=i(3176),c=i(8690),d=i(98581),u=i(12847),h=i(69361),g=i(64339),p=i(41337),f=i(72786),m=i(95062),_=i(44838),v=i(11086),b=i(69432),y=i(59200);const w="editor.action.codeAction",C="editor.action.quickFix",S="editor.action.autoFix",k="editor.action.refactor",x="editor.action.sourceAction",E="editor.action.organizeImports",L="editor.action.fixAll";class T extends r.jG{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:(0,n.EI)(e.diagnostics)?(0,n.EI)(t.diagnostics)?T.codeActionsPreferredComparator(e,t):-1:(0,n.EI)(t.diagnostics)?1:T.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(T.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&b.gB.QuickFix.contains(new y.k(e.kind))&&!!e.isPreferred))}get hasAIFix(){return this.validActions.some((({action:e})=>!!e.isAI))}get allAIFixes(){return this.validActions.every((({action:e})=>!!e.isAI))}}const I={actions:[],documentation:void 0};async function R(e,t,i,o,a,l){const c=o.filter||{},d={...c,excludes:[...c.excludes||[],b.gB.Notebook]},u={only:c.include?.value,trigger:o.type},h=new g.ER(t,l),p=2===o.type,f=D(e,t,p?d:c),m=new r.Cm,_=f.map((async e=>{try{a.report(e);const n=await e.provideCodeActions(t,i,u,h.token);if(n&&m.add(n),h.token.isCancellationRequested)return I;const o=(n?.actions||[]).filter((e=>e&&(0,b.aF)(c,e))),s=A(e,o,c.include);return{actions:o.map((t=>new b.Vi(t,e))),documentation:s}}catch(n){if((0,s.MB)(n))throw n;return(0,s.M_)(n),I}})),v=e.onDidChange((()=>{const i=e.all(t);(0,n.aI)(i,f)||h.cancel()}));try{const i=await Promise.all(_),s=i.map((e=>e.actions)).flat(),r=[...(0,n.Yc)(i.map((e=>e.documentation))),...N(e,t,o,s)];return new T(s,r,m)}finally{v.dispose(),h.dispose()}}function D(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,b.uJ)(i,new y.k(e))))))}function*N(e,t,i,n){if(t&&n.length)for(const o of e.all(t))o._getAdditionalMenuItems&&(yield*o._getAdditionalMenuItems?.({trigger:i.type,only:i.filter?.include?.value},n.map((e=>e.action))))}function A(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new y.k(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return e?.command}for(const o of t)if(o.kind)for(const e of n)if(e.kind.contains(new y.k(o.kind)))return e.command}var O;async function P(e,t,i,n,s=o.XO.None){const r=e.get(l.nu),a=e.get(f.d),c=e.get(v.k),d=e.get(m.Ot);if(c.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),await t.resolve(s),!s.isCancellationRequested){if(t.action.edit?.edits.length){const e=await r.apply(t.action.edit,{editor:n?.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==O.OnSave,showPreview:n?.preview});if(!e.isApplied)return}if(t.action.command)try{await a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(u){const e=M(u);d.error("string"===typeof e?e:p.kg("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}}function M(e){return"string"===typeof e?e:e instanceof Error&&"string"===typeof e.message?e.message:void 0}(function(e){e["OnSave"]="onSave",e["FromProblemsView"]="fromProblemsView",e["FromCodeActions"]="fromCodeActions",e["FromAILightbulb"]="fromAILightbulb"})(O||(O={})),f.w.registerCommand("_executeCodeActionProvider",(async function(e,t,i,n,r){if(!(t instanceof a.r))throw(0,s.Qg)();const{codeActionProvider:l}=e.get(u.ILanguageFeaturesService),g=e.get(h.IModelService).getModel(t);if(!g)throw(0,s.Qg)();const p=d.L.isISelection(i)?d.L.liftSelection(i):c.Q.isIRange(i)?g.validateRange(i):void 0;if(!p)throw(0,s.Qg)();const f="string"===typeof n?new y.k(n):void 0,m=await R(l,g,p,{type:1,triggerAction:b.fo.Default,filter:{includeSourceActions:!0,include:f}},_.ke.None,o.XO.None),v=[],w=Math.min(m.validActions.length,"number"===typeof r?r:0);for(let s=0;se.action))}finally{setTimeout((()=>m.dispose()),100)}}))},65340:(e,t,i)=>{"use strict";var n=i(16259),o=i(97744),s=i(59200),r=i(20601),a=i(57479),l=i(51761),c=i(41337),d=i(18904),u=i(69432),h=i(98948),g=i(12776);function p(e){return d.M$.regex(g.D_.keys()[0],new RegExp("(\\s|^)"+(0,r.bm)(e.value)+"\\b"))}const f={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:c.kg("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:c.kg("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[c.kg("args.schema.apply.first","Always apply the first returned code action."),c.kg("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),c.kg("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:c.kg("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function m(e,t,i,n,o=u.fo.Default){if(e.hasModel()){const s=h.C.get(e);s?.manualTriggerAtCurrentPosition(t,o,i,n)}}class _ extends n.ks{constructor(){super({id:l.pQ,label:c.kg("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),kbOpts:{kbExpr:a.R.textInputFocus,primary:2137,weight:100}})}run(e,t){return m(t,c.kg("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,u.fo.QuickFix)}}class v extends n.DX{constructor(){super({id:l.k_,precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:f}]}})}runEditorCommand(e,t,i){const n=u.QA.fromUser(i,{kind:s.k.Empty,apply:"ifSingle"});return m(t,"string"===typeof i?.kind?n.preferred?c.kg("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):c.kg("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?c.kg("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):c.kg("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class b extends n.ks{constructor(){super({id:l.Xj,label:c.kg("refactor.label","Refactor..."),alias:"Refactor...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),kbOpts:{kbExpr:a.R.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:d.M$.and(a.R.writable,p(u.gB.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:f}]}})}run(e,t,i){const n=u.QA.fromUser(i,{kind:u.gB.Refactor,apply:"never"});return m(t,"string"===typeof i?.kind?n.preferred?c.kg("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):c.kg("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?c.kg("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):c.kg("editor.action.refactor.noneMessage","No refactorings available"),{include:u.gB.Refactor.contains(n.kind)?n.kind:s.k.None,onlyIncludePreferredActions:n.preferred},n.apply,u.fo.Refactor)}}class y extends n.ks{constructor(){super({id:l.C9,label:c.kg("source.label","Source Action..."),alias:"Source Action...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:d.M$.and(a.R.writable,p(u.gB.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:f}]}})}run(e,t,i){const n=u.QA.fromUser(i,{kind:u.gB.Source,apply:"never"});return m(t,"string"===typeof i?.kind?n.preferred?c.kg("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):c.kg("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?c.kg("editor.action.source.noneMessage.preferred","No preferred source actions available"):c.kg("editor.action.source.noneMessage","No source actions available"),{include:u.gB.Source.contains(n.kind)?n.kind:s.k.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,u.fo.SourceAction)}}class w extends n.ks{constructor(){super({id:l.Uy,label:c.kg("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:d.M$.and(a.R.writable,p(u.gB.SourceOrganizeImports)),kbOpts:{kbExpr:a.R.textInputFocus,primary:1581,weight:100}})}run(e,t){return m(t,c.kg("editor.action.organize.noneMessage","No organize imports action available"),{include:u.gB.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",u.fo.OrganizeImports)}}class C extends n.ks{constructor(){super({id:l.Rw,label:c.kg("fixAll.label","Fix All"),alias:"Fix All",precondition:d.M$.and(a.R.writable,p(u.gB.SourceFixAll))})}run(e,t){return m(t,c.kg("fixAll.noneMessage","No fix all action available"),{include:u.gB.SourceFixAll,includeSourceActions:!0},"ifSingle",u.fo.FixAll)}}class S extends n.ks{constructor(){super({id:l.pR,label:c.kg("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:d.M$.and(a.R.writable,p(u.gB.QuickFix)),kbOpts:{kbExpr:a.R.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return m(t,c.kg("editor.action.autoFix.noneMessage","No auto fixes available"),{include:u.gB.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",u.fo.AutoFix)}}var k=i(84207),x=i(27503),E=i(16374);(0,n.HW)(h.C.ID,h.C,3),(0,n.HW)(k.E.ID,k.E,4),(0,n.Fl)(_),(0,n.Fl)(b),(0,n.Fl)(y),(0,n.Fl)(w),(0,n.Fl)(S),(0,n.Fl)(C),(0,n.E_)(new v),E.O.as(x.Fd.Configuration).registerConfiguration({...o.JJ,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:c.kg("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}),E.O.as(x.Fd.Configuration).registerConfiguration({...o.JJ,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:c.kg("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}}),E.O.as(x.Fd.Configuration).registerConfiguration({...o.JJ,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:5,markdownDescription:c.kg("triggerOnFocusChange","Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}})},98948:(e,t,i)=>{"use strict";i.d(t,{C:()=>pe});var n,o=i(2150),s=i(19950),r=i(14396),a=i(85661),l=i(5091),c=i(36788),d=i(35037),u=i(12847),h=i(51761),g=i(59200),p=i(69432),f=i(13046),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{static{n=this}static{this.codeActionCommands=[h.Xj,h.k_,h.C9,h.Uy,h.Rw]}constructor(e){this.keybindingService=e}getResolver(){const e=new a.d((()=>this.keybindingService.getKeybindings().filter((e=>n.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===h.Uy?t={kind:p.gB.SourceOrganizeImports.value}:e.command===h.Rw&&(t={kind:p.gB.SourceFixAll.value}),{resolvedKeybinding:e.resolvedKeybinding,...p.QA.fromUser(t,{kind:g.k.None,apply:"never"})}}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i?.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new g.k(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};v=n=m([_(0,f.b)],v);var b=i(25923),y=(i(94423),i(41337));const w=Object.freeze({kind:g.k.Empty,title:(0,y.kg)("codeAction.widget.id.more","More Actions...")}),C=Object.freeze([{kind:p.gB.QuickFix,title:(0,y.kg)("codeAction.widget.id.quickfix","Quick Fix")},{kind:p.gB.RefactorExtract,title:(0,y.kg)("codeAction.widget.id.extract","Extract"),icon:b.W.wrench},{kind:p.gB.RefactorInline,title:(0,y.kg)("codeAction.widget.id.inline","Inline"),icon:b.W.wrench},{kind:p.gB.RefactorRewrite,title:(0,y.kg)("codeAction.widget.id.convert","Rewrite"),icon:b.W.wrench},{kind:p.gB.RefactorMove,title:(0,y.kg)("codeAction.widget.id.move","Move"),icon:b.W.wrench},{kind:p.gB.SurroundWith,title:(0,y.kg)("codeAction.widget.id.surround","Surround With"),icon:b.W.surroundWith},{kind:p.gB.Source,title:(0,y.kg)("codeAction.widget.id.source","Source Action"),icon:b.W.symbolFile},w]);function S(e,t,i){if(!t)return e.map((e=>({kind:"action",item:e,group:w,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!e.action.edit?.edits.length})));const n=C.map((e=>({group:e,actions:[]})));for(const s of e){const e=s.action.kind?new g.k(s.action.kind):g.k.None;for(const t of n)if(t.group.kind.contains(e)){t.actions.push(s);break}}const o=[];for(const s of n)if(s.actions.length){o.push({kind:"header",group:s.group});for(const e of s.actions){const t=s.group;o.push({kind:"action",item:e,group:e.action.isAI?{title:t.title,kind:t.kind,icon:b.W.sparkle}:t,label:e.action.title,disabled:!!e.action.disabled,keybinding:i(e.action)})}}return o}var k=i(84207),x=i(61307),E=i(48038),L=i(92678),T=i(31304),I=i(67792),R=i(25160),D=i(23740),N=i(46403),A=i(13153),O=i(66344),P=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},M=function(e,t){return function(i,n){t(i,n,e)}};const F="acceptSelectedCodeAction",B="previewSelectedCodeAction";class W{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??""}disposeTemplate(e){}}let H=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const n=new L.x(e,R.OS);return{container:e,icon:t,text:i,keybinding:n}}renderElement(e,t,i){if(e.group?.icon?(i.icon.className=D.L.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=(0,O.GuP)(e.group.icon.color.id))):(i.icon.className=D.L.asClassName(b.W.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=$(e.label),i.keybinding.set(e.keybinding),o.bo(!!e.keybinding,i.keybinding.element);const n=this._keybindingService.lookupKeybinding(F)?.getLabel(),s=this._keybindingService.lookupKeybinding(B)?.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:n&&s?this._supportsPreview&&e.canPreview?i.container.title=(0,y.kg)({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",n,s):i.container.title=(0,y.kg)({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",n):i.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};H=P([M(1,f.b)],H);class V extends UIEvent{constructor(){super("acceptSelectedAction")}}class j extends UIEvent{constructor(){super("previewSelectedAction")}}function z(e){if("action"===e.kind)return e.label}let U=class extends l.jG{constructor(e,t,i,n,o,s){super(),this._delegate=n,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new I.Qi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new T.B8(e,this.domNode,r,[new H(t,this._keybindingService),new W],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:z},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?$(e?.label):"";return e.disabled&&(t=(0,y.kg)({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>(0,y.kg)({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(A.IN),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this.onFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight,n=i+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);let o=e;if(this._allMenuItems.length>=50)o=380;else{const t=this._allMenuItems.map(((e,t)=>{const i=this.domNode.ownerDocument.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0}));o=Math.max(...t,e)}const s=.7,r=Math.min(n,this.domNode.ownerDocument.body.clientHeight*s);return this._list.layout(r,o),this.domNode.style.height=`${r}px`,this._list.domFocus(),o}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const o=e?new j:new V;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof j):this._list.setSelection([])}onFocus(){const e=this._list.getFocus();if(0===e.length)return;const t=e[0],i=this._list.element(t);this._delegate.onFocus?.(i.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&"action"===t.kind){const e=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=e?e.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus("number"===typeof e.index?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function $(e){return e.replace(/\r\n|\r|\n/g," ")}U=P([M(4,N.l),M(5,f.b)],U);var q=i(6330),K=i(18904),G=i(59857),Q=i(87778),Y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Z=function(e,t){return function(i,n){t(i,n,e)}};(0,O.x1A)("actionBar.toggledBackground",O.c1f,(0,y.kg)("actionBar.toggledBackground","Background color for toggled action items in action bar."));const X={Visible:new K.N1("codeActionMenuVisible",!1,(0,y.kg)("codeActionMenuVisible","Whether the action widget list is visible"))},J=(0,Q.u1)("actionWidgetService");let ee=class extends l.jG{get isVisible(){return X.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new l.HE)}show(e,t,i,n,o,s,r){const a=X.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(U,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>o,render:e=>(a.set(!0),this._renderWidget(e,l,r??[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},s,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,i){const n=document.createElement("div");if(n.classList.add("action-widget"),e.appendChild(n),this._list.value=t,!this._list.value)throw new Error("List has no value");n.appendChild(this._list.value.domNode);const s=new l.Cm,r=document.createElement("div"),a=e.appendChild(r);a.classList.add("context-view-block"),s.add(o.ko(a,o.Bx.MOUSE_DOWN,(e=>e.stopPropagation())));const c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(o.ko(d,o.Bx.POINTER_MOVE,(()=>d.remove()))),s.add(o.ko(d,o.Bx.MOUSE_DOWN,(()=>d.remove())));let u=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(n.appendChild(e.getContainer().parentElement),s.add(e),u=e.getContainer().offsetWidth)}const h=this._list.value?.layout(u);n.style.width=`${h}px`;const g=s.add(o.w5(e));return s.add(g.onDidBlur((()=>this.hide(!0)))),s}_createActionBar(e,t){if(!t.length)return;const i=o.$(e),n=new E.E(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){this._list.value?.hide(e)}};ee=Y([Z(0,N.l),Z(1,K.fN),Z(2,Q._Y)],ee),(0,G.v)(J,ee,1);const te=1100;(0,q.ug)(class extends q.L{constructor(){super({id:"hideCodeActionWidget",title:(0,y.aS)("hideCodeActionWidget.title","Hide action widget"),precondition:X.Visible,keybinding:{weight:te,primary:9,secondary:[1033]}})}run(e){e.get(J).hide(!0)}}),(0,q.ug)(class extends q.L{constructor(){super({id:"selectPrevCodeAction",title:(0,y.aS)("selectPrevCodeAction.title","Select previous action"),precondition:X.Visible,keybinding:{weight:te,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(J);t instanceof ee&&t.focusPrevious()}}),(0,q.ug)(class extends q.L{constructor(){super({id:"selectNextCodeAction",title:(0,y.aS)("selectNextCodeAction.title","Select next action"),precondition:X.Visible,keybinding:{weight:te,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(J);t instanceof ee&&t.focusNext()}}),(0,q.ug)(class extends q.L{constructor(){super({id:F,title:(0,y.aS)("acceptSelected.title","Accept selected action"),precondition:X.Visible,keybinding:{weight:te,primary:3,secondary:[2137]}})}run(e){const t=e.get(J);t instanceof ee&&t.acceptSelected()}}),(0,q.ug)(class extends q.L{constructor(){super({id:B,title:(0,y.aS)("previewSelected.title","Preview selected action"),precondition:X.Visible,keybinding:{weight:te,primary:2051}})}run(e){const t=e.get(J);t instanceof ee&&t.acceptSelected(!0)}});var ie,ne=i(72786),oe=i(32828),se=i(45658),re=i(44838),ae=i(1474),le=i(15911),ce=i(12776),de=i(11086),ue=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},he=function(e,t){return function(i,n){t(i,n,e)}};const ge="quickfix-edit-highlight";let pe=class extends l.jG{static{ie=this}static{this.ID="editor.contrib.codeActionController"}static get(e){return e.getContribution(ie.ID)}constructor(e,t,i,n,o,s,r,c,d,u,h){super(),this._commandService=r,this._configurationService=c,this._actionWidgetService=d,this._instantiationService=u,this._telemetryService=h,this._activeCodeActions=this._register(new l.HE),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new ce.Dc(this._editor,o.codeActionProvider,t,i,s,c,this._telemetryService)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new a.d((()=>{const e=this._editor.getContribution(k.E.ID);return e&&this._register(e.onClick((e=>this.showCodeActionsFromLightbulb(e.actions,e)))),e})),this._resolver=n.createInstance(v),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&1===e.validActions.length){const t=e.validActions[0],i=t.action.command;return i&&"inlineChat.start"===i.id&&i.arguments&&i.arguments.length>=1&&(i.arguments[0]={...i.arguments[0],autoSend:!1}),void await this._applyCodeAction(t,!1,!1,h.Qp.FromAILightbulb)}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){if(!this._editor.hasModel())return;x.k.get(this._editor)?.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,i,n){try{await this._instantiationService.invokeFunction(h.W4,e,n,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:p.fo.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(1!==e.type)return void this.hideLightBulbWidget();let t;try{t=await e.actions}catch(n){return void(0,r.dz)(n)}if(this._disposed)return;const i=this._editor.getSelection();if(i?.startLineNumber===e.position.lineNumber)if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),1===e.trigger.type){if(e.trigger.filter?.include){const i=this.tryGetValidActionToApply(e.trigger,t);if(i){try{this.hideLightBulbWidget(),await this._applyCodeAction(i,!1,!1,h.Qp.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){const i=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(i&&i.action.disabled)return x.k.get(this._editor)?.showMessage(i.action.disabled,e.trigger.context.position),void t.dispose()}}const i=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!i&&!t.validActions.length))return x.k.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,void t.dispose();this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:i,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}static{this.DECORATION=d.kI.register({description:"quickfix-highlight",className:ge})}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),o=this._editor.getDomNode();if(!o)return;const r=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!r.length)return;const a=c.y.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(e,t)=>{this._applyCodeAction(e,!0,!!t,i.fromLightbulb?h.Qp.FromAILightbulb:h.Qp.FromCodeActions),this._actionWidgetService.hide(!1),n.clear()},onHide:e=>{this._editor?.focus(),n.clear()},onHover:async(e,t)=>{if(t.isCancellationRequested)return;let i=!1;const n=e.action.kind;if(n){const e=new g.k(n),t=[p.gB.RefactorExtract,p.gB.RefactorInline,p.gB.RefactorRewrite,p.gB.RefactorMove,p.gB.Source];i=t.some((t=>t.contains(e)))}return{canPreview:i||!!e.action.edit?.edits.length}},onFocus:e=>{if(e&&e.action){const t=e.action.ranges,i=e.action.diagnostics;if(n.clear(),t&&t.length>0){const e=i&&i?.length>1?i.map((e=>({range:e,options:ie.DECORATION}))):t.map((e=>({range:e,options:ie.DECORATION})));n.set(e)}else if(i&&i.length>0){const e=i.map((e=>({range:e,options:ie.DECORATION})));n.set(e);const t=i[0];if(t.startLineNumber&&t.startColumn){const e=this._editor.getModel()?.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn})?.word;s.h5((0,y.kg)("editingNewSelection","Context: {0} at line {1} and column {2}.",e,t.startLineNumber,t.startColumn))}}}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,S(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,o,this._getActionBarActions(e,t,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,o.BK)(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}_shouldShowHeaders(){const e=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e?.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>({id:e.id,label:e.title,tooltip:e.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(e.id,...e.arguments??[])})));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:(0,y.kg)("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:(0,y.kg)("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};pe=ie=ue([he(1,se.DR),he(2,K.fN),he(3,Q._Y),he(4,u.ILanguageFeaturesService),he(5,re.N8),he(6,ne.d),he(7,oe.pG),he(8,J),he(9,Q._Y),he(10,de.k)],pe),(0,le.zy)(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".quickfix-edit-highlight",e.getColor(O.Ubg));const n=e.getColor(O.ECk);n&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,ae.Bb)(e.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)}))},12776:(e,t,i)=>{"use strict";i.d(t,{D_:()=>_,Dc:()=>C});var n=i(9659),o=i(14396),s=i(40231),r=i(5091),a=i(84366),l=i(35011),c=i(36788),d=i(98581),u=i(18904),h=i(44838),g=i(69432),p=i(51761),f=i(59200),m=i(84240);const _=new u.N1("supportedCodeAction",""),v="_typescript.applyFixAllCodeAction";class b extends r.jG{constructor(e,t,i,o=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=o,this._autoTriggerTimer=this._register(new n.pc),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._tryAutoTrigger())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,a.n4)(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:g.fo.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(1===e.type)return t;const i=this._editor.getOption(65).enabled;if(i!==l.jT.Off){if(i===l.jT.On)return t;if(i===l.jT.OnCode){const e=t.isEmpty();if(!e)return t;const i=this._editor.getModel(),{lineNumber:n,column:o}=t.getPosition(),s=i.getLineContent(n);if(0===s.length)return;if(1===o){if(/\s/.test(s[0]))return}else if(o===i.getLineMaxColumn(n)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return t}}}var y;(function(e){e.Empty={type:0};class t{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if((0,o.MB)(e))return w;throw e}))}cancel(){this._cancellablePromise.cancel()}}e.Triggered=t})(y||(y={}));const w=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class C extends r.jG{constructor(e,t,i,n,o,a,l){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._configurationService=a,this._telemetryService=l,this._codeActionOracle=this._register(new r.HE),this._state=y.Empty,this._onDidChangeState=this._register(new s.vl),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=_.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(65)&&this._update()}))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(y.Empty,!0))}_settingEnabledNearbyQuickfixes(){const e=this._editor?.getModel();return!!this._configurationService&&this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e?.uri})}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(y.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(92)){const t=this._registry.all(e).flatMap((e=>e.providedCodeActionKinds??[]));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new b(this._editor,this._markerService,(t=>{if(!t)return void this.setState(y.Empty);const i=t.selection.getStartPosition(),o=(0,n.SS)((async i=>{if(this._settingEnabledNearbyQuickfixes()&&1===t.trigger.type&&(t.trigger.triggerAction===g.fo.QuickFix||t.trigger.filter?.include?.contains(g.gB.QuickFix))){const n=await(0,p.dU)(this._registry,e,t.selection,t.trigger,h.ke.None,i),o=[...n.allActions];if(i.isCancellationRequested)return w;const s=n.validActions?.some((e=>!!e.action.kind&&g.gB.QuickFix.contains(new f.k(e.action.kind)))),r=this._markerService.read({resource:e.uri});if(s){for(const e of n.validActions)e.action.command?.arguments?.some((e=>"string"===typeof e&&e.includes(v)))&&(e.action.diagnostics=[...r.filter((e=>e.relatedInformation))]);return{validActions:n.validActions,allActions:o,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}if(!s&&r.length>0){const s=t.selection.getPosition();let a=s,l=Number.MAX_VALUE;const u=[...n.validActions];for(const m of r){const f=m.endColumn,_=m.endLineNumber,b=m.startLineNumber;if(_===s.lineNumber||b===s.lineNumber){a=new c.y(_,f);const m={type:t.trigger.type,triggerAction:t.trigger.triggerAction,filter:{include:t.trigger.filter?.include?t.trigger.filter?.include:g.gB.QuickFix},autoApply:t.trigger.autoApply,context:{notAvailableMessage:t.trigger.context?.notAvailableMessage||"",position:a}},b=new d.L(a.lineNumber,a.column,a.lineNumber,a.column),y=await(0,p.dU)(this._registry,e,b,m,h.ke.None,i);if(0!==y.validActions.length){for(const e of y.validActions)e.action.command?.arguments?.some((e=>"string"===typeof e&&e.includes(v)))&&(e.action.diagnostics=[...r.filter((e=>e.relatedInformation))]);0===n.allActions.length&&o.push(...y.allActions),Math.abs(s.column-f)i.findIndex((t=>t.action.title===e.action.title))===t));return f.sort(((e,t)=>e.action.isPreferred&&!t.action.isPreferred?-1:!e.action.isPreferred&&t.action.isPreferred||e.action.isAI&&!t.action.isAI?1:!e.action.isAI&&t.action.isAI?-1:0)),{validActions:f,allActions:o,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}}if(1===t.trigger.type){const n=new m.W,o=await(0,p.dU)(this._registry,e,t.selection,t.trigger,h.ke.None,i);return this._telemetryService&&this._telemetryService.publicLog2("codeAction.invokedDurations",{codeActions:o.validActions.length,duration:n.elapsed()}),o}return(0,p.dU)(this._registry,e,t.selection,t.trigger,h.ke.None,i)}));1===t.trigger.type&&this._progressService?.showWhile(o,250);const s=new y.Triggered(t.trigger,i,o);let r=!1;1===this._state.type&&(r=1===this._state.trigger.type&&1===s.type&&2===s.trigger.type&&this._state.position!==s.position),r?setTimeout((()=>{this.setState(s)}),500):this.setState(s)}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:g.fo.Default})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value?.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}},84207:(e,t,i)=>{"use strict";i.d(t,{E:()=>E});var n,o=i(2150),s=i(25201),r=i(25923),a=i(40231),l=i(5091),c=i(23740),d=i(9322),u=i(35037),h=i(47172),g=i(51761),p=i(41337),f=i(13046),m=i(48401),_=i(8690),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};const y=(0,m.pU)("gutter-lightbulb",r.W.lightBulb,p.kg("gutterLightbulbWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor.")),w=(0,m.pU)("gutter-lightbulb-auto-fix",r.W.lightbulbAutofix,p.kg("gutterLightbulbAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),C=(0,m.pU)("gutter-lightbulb-sparkle",r.W.lightbulbSparkle,p.kg("gutterLightbulbAIFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),S=(0,m.pU)("gutter-lightbulb-aifix-auto-fix",r.W.lightbulbSparkleAutofix,p.kg("gutterLightbulbAIFixAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),k=(0,m.pU)("gutter-lightbulb-sparkle-filled",r.W.sparkleFilled,p.kg("gutterLightbulbSparkleFilledWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var x;(function(e){e.Hidden={type:0};class t{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}e.Showing=t})(x||(x={}));let E=class extends l.jG{static{n=this}static{this.GUTTER_DECORATION=u.kI.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:c.L.asClassName(r.W.lightBulb),glyphMargin:{position:d.ZS.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new a.vl),this.onClick=this._onClick.event,this._state=x.Hidden,this._gutterState=x.Hidden,this._iconClasses=[],this.lightbulbClasses=["codicon-"+y.id,"codicon-"+S.id,"codicon-"+w.id,"codicon-"+C.id,"codicon-"+k.id],this.gutterDecoration=n.GUTTER_DECORATION,this._domNode=o.$("div.lightBulbWidget"),this._domNode.role="listbox",this._register(s.q.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide(),(1!==this.gutterState.type||!t||this.gutterState.editorPosition.lineNumber>=t.getLineCount())&&this.gutterHide()}))),this._register(o.Xc(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=o.BK(this._domNode),n=this._editor.getOption(67);let s=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{1===(1&e.buttons)&&this.hide()}))),this._register(a.Jh.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,(()=>{this._preferredKbLabel=this._keybindingService.lookupKeybinding(g.pR)?.getLabel()??void 0,this._quickFixKbLabel=this._keybindingService.lookupKeybinding(g.pQ)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()}))),this._register(this._editor.onMouseDown((async e=>{if(!e.target.element||!this.lightbulbClasses.some((t=>e.target.element&&e.target.element.classList.contains(t))))return;if(1!==this.gutterState.type)return;this._editor.focus();const{top:t,height:i}=o.BK(e.target.element),n=this._editor.getOption(67);let s=Math.floor(n/3);null!==this.gutterState.widgetPosition.position&&this.gutterState.widgetPosition.position.lineNumber22,f=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1),m=this._editor.getLineDecorations(a);let _=!1;if(m)for(const n of m){const e=n.options.glyphMarginClassName;if(e&&!this.lightbulbClasses.some((t=>e.includes(t)))){_=!0;break}}let v=a,b=1;if(!p){const o=e=>{const t=r.getLineContent(e);return/^\s*$|^\s+/.test(t)||t.length<=b};if(a>1&&!f(a-1)){const s=r.getLineCount(),l=a===s,c=a>1&&o(a-1),d=!l&&o(a+1),u=o(a),h=!d&&!c;if(!(d||c||_))return this.gutterState=new x.Showing(e,t,i,{position:{lineNumber:v,column:b},preference:n._posPref}),this.renderGutterLightbub(),this.hide();c||l||c&&!u?v-=1:(d||h&&u)&&(v+=1)}else if(1!==a||a!==r.getLineCount()&&(o(a+1)||o(a))){if(a{this._gutterDecorationID=t.addDecoration(new _.Q(e,0,e,0),this.gutterDecoration)}))}_removeGutterDecoration(e){this._editor.changeDecorations((t=>{t.removeDecoration(e),this._gutterDecorationID=void 0}))}_updateGutterDecoration(e,t){this._editor.changeDecorations((i=>{i.changeDecoration(e,new _.Q(t,0,t,0)),i.changeDecorationOptions(e,this.gutterDecoration)}))}_updateLightbulbTitle(e,t){1===this.state.type&&(t?this.title=p.kg("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=p.kg("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=p.kg("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=p.kg("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}};E=n=v([b(1,f.b)],E)},69432:(e,t,i)=>{"use strict";i.d(t,{QA:()=>d,Vi:()=>u,aF:()=>l,fo:()=>r,gB:()=>s,uJ:()=>a});var n=i(14396),o=i(59200);const s=new class{constructor(){this.QuickFix=new o.k("quickfix"),this.Refactor=new o.k("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new o.k("notebook"),this.Source=new o.k("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var r;function a(e,t){return!(e.include&&!e.include.intersects(t))&&((!e.excludes||!e.excludes.some((i=>c(t,i,e.include))))&&!(!e.includeSourceActions&&s.Source.contains(t)))}function l(e,t){const i=t.kind?new o.k(t.kind):void 0;return!!(!e.include||i&&e.include.contains(i))&&(!(e.excludes&&i&&e.excludes.some((t=>c(i,t,e.include))))&&(!(!e.includeSourceActions&&i&&s.Source.contains(i))&&!(e.onlyIncludePreferredActions&&!t.isPreferred)))}function c(e,t,i){return!!t.contains(e)&&(!i||!t.contains(i))}(function(e){e["Refactor"]="refactor",e["RefactorPreview"]="refactor preview",e["Lightbulb"]="lightbulb",e["Default"]="other (default)",e["SourceAction"]="source action",e["QuickFix"]="quick fix action",e["FixAll"]="fix all",e["OrganizeImports"]="organize imports",e["AutoFix"]="auto fix",e["QuickFixHover"]="quick fix hover window",e["OnSave"]="save participants",e["ProblemsView"]="problems view"})(r||(r={}));class d{static fromUser(e,t){return e&&"object"===typeof e?new d(d.getKindFromUser(e,t.kind),d.getApplyFromUser(e,t.apply),d.getPreferredUser(e)):new d(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"===typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"===typeof e.kind?new o.k(e.kind):t}static getPreferredUser(e){return"boolean"===typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class u{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){if(this.provider?.resolveCodeAction&&!this.action.edit){let i;try{i=await this.provider.resolveCodeAction(this.action,e)}catch(t){(0,n.M_)(t)}i&&(this.action.edit=i.edit)}return this}}},34588:(e,t,i)=>{"use strict";var n=i(9659),o=i(14396),s=i(5091),r=i(71203),a=i(16259),l=i(35011),c=i(57479),d=i(67792),u=i(50322),h=i(29133),g=i(69361),p=i(72786),f=i(12847);class m{constructor(){this.lenses=[],this._disposables=new s.Cm}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function _(e,t,i){const n=e.ordered(t),s=new Map,r=new m,a=n.map((async(e,n)=>{s.set(e,n);try{const n=await Promise.resolve(e.provideCodeLenses(t,i));n&&r.add(n,e)}catch(a){(0,o.M_)(a)}}));return await Promise.all(a),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:s.get(e.provider)s.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),r}p.w.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,u.j)(h.r.isUri(i)),(0,u.j)("number"===typeof n||!n);const{codeLensProvider:r}=e.get(f.ILanguageFeaturesService),a=e.get(g.IModelService).getModel(i);if(!a)throw(0,o.Qg)();const l=[],c=new s.Cm;return _(r,a,d.XO.None).then((e=>{c.add(e);const t=[];for(const i of e.lenses)void 0===n||null===n||Boolean(i.symbol.command)?l.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(a,i.symbol,d.XO.None)).then((e=>l.push(e||i.symbol))));return Promise.all(t)})).then((()=>l)).finally((()=>{setTimeout((()=>c.dispose()),100)}))}));var v=i(40231),b=i(21553),y=i(8690),w=i(59857),C=i(87778),S=i(94216),k=i(62484),x=i(2150),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};const T=(0,C.u1)("ICodeLensCache");class I{constructor(e,t){this.lineCount=e,this.data=t}}let R=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new b.qK(20,.75);const t="codelens/cache";(0,x.U3)(k.G,(()=>e.remove(t,1)));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n);const o=v.Jh.filter(e.onWillSaveState,(e=>e.reason===S.LP.SHUTDOWN));v.Jh.once(o)((t=>{e.store(i,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>({range:e.symbol.range,command:e.symbol.command&&{id:"",title:e.symbol.command?.title}}))),n=new m;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new I(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new y.Q(e,1,e,11)});const o=new m;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new I(i.lineCount,o))}}catch{}}};R=E([L(0,S.CS)],R),(0,w.v)(T,R,1);var D=i(84653),N=i(35037);class A{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class O{static{this._idPool=0}constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+O._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let o=0;o{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:M},(e=>this._decorationIds[t]=e)),r=r?y.Q.plusRange(r,e.symbol.range):y.Q.lift(e.symbol.range)})),this._viewZone=new A(r.startLineNumber-1,o,s),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new O(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||y.Q.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:M},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z=function(e,t){return function(i,n){t(i,n,e)}};let U=class{static{this.ID="css.editor.codeLens"}constructor(e,t,i,o,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=o,this._notificationService=r,this._codeLensCache=a,this._disposables=new s.Cm,this._localToDispose=new s.Cm,this._lenses=[],this._oldCodeLensModels=new s.Cm,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new n.uC((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(50)||e.hasChanged(19)||e.hasChanged(18))&&this._updateLensStyle(),e.hasChanged(17)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=.9*this._editor.getOption(52)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",l.jU.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&(0,n.EQ)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4,this._localToDispose));for(const n of this._languageFeaturesService.codeLensProvider.all(e))if("function"===typeof n.onDidChange){const e=n.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.uC((()=>{const t=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,n.SS)((t=>_(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((n=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=n,this._codeLensCache.put(e,n);const o=this._provideCodeLensDebounce.update(e,Date.now()-t);i.delay=o,this._renderCodeLensSymbols(n),this._resolveCodeLensesInViewportSoon()}),o.dz)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,s.s)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const o=new P;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorText((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidBlurEditorText((()=>{i.cancel()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,s.s)((()=>{if(this._editor.getModel()){const e=r.D.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===t?.tagName&&(t=t.parentElement),"A"===t?.tagName)for(const i of this._lenses){const e=i.getCommand(t);if(e){this._commandService.executeCommand(e.id,...e.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new P;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const r of e.lenses){const e=r.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(r):(n=[r],i.push(n)))}if(!i.length&&!this._lenses.length)return;const o=r.D.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new P;let o=0,r=0;while(rthis._resolveCodeLensesInViewportSoon()))),o++,r++)}while(othis._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){const e=this._editor.getModel();e&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const t=[],i=[];if(this._lenses.forEach((n=>{const o=n.computeIfNecessary(e);o&&(t.push(o),i.push(n))})),0===t.length)return;const s=Date.now(),r=(0,n.SS)((n=>{const s=t.map(((t,s)=>{const r=new Array(t.length),a=t.map(((t,i)=>t.symbol.command||"function"!==typeof t.provider.resolveCodeLens?(r[i]=t.symbol,Promise.resolve(void 0)):Promise.resolve(t.provider.resolveCodeLens(e,t.symbol,n)).then((e=>{r[i]=e}),o.M_)));return Promise.all(a).then((()=>{n.isCancellationRequested||i[s].isDisposed()||i[s].updateCommands(r)}))}));return Promise.all(s)}));this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then((()=>{const t=this._resolveCodeLensesDebounce.update(e,Date.now()-s);this._resolveCodeLensesScheduler.delay=t,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dz)(e),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};U=j([z(1,f.ILanguageFeaturesService),z(2,V.ILanguageFeatureDebounceService),z(3,p.d),z(4,W.Ot),z(5,T)],U),(0,a.HW)(U.ID,U,1),(0,a.Fl)(class extends a.ks{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:c.R.hasCodeLensProvider,label:(0,B.kg)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(H.GK),n=e.get(p.d),o=e.get(W.Ot),s=t.getSelection().positionLineNumber,r=t.getContribution(U.ID);if(!r)return;const a=await r.getModel();if(!a)return;const l=[];for(const h of a.lenses)h.symbol.command&&h.symbol.range.startLineNumber===s&&l.push({label:h.symbol.command.title,command:h.symbol.command});if(0===l.length)return;const c=await i.pick(l,{canPickMany:!1,placeHolder:(0,B.kg)("placeHolder","Select a command")});if(!c)return;let d=c.command;if(a.isDisposed){const e=await r.getModel(),t=e?.lenses.find((e=>e.symbol.range.startLineNumber===s&&e.symbol.command?.title===d.title));if(!t||!t.symbol.command)return;d=t.symbol.command}try{await n.executeCommand(d.id,...d.arguments||[])}catch(u){o.error(u)}}})},68385:(e,t,i)=>{"use strict";i.d(t,{R:()=>g,j:()=>h});var n=i(67792),o=i(14396),s=i(29133),r=i(8690),a=i(69361),l=i(72786),c=i(12847),d=i(21922),u=i(32828);async function h(e,t,i,n=!0){return _(new p,e,t,i,n)}function g(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}class p{constructor(){}async compute(e,t,i,n){const o=await e.provideDocumentColors(t,i);if(Array.isArray(o))for(const s of o)n.push({colorInfo:s,provider:e});return Array.isArray(o)}}class f{constructor(){}async compute(e,t,i,n){const o=await e.provideDocumentColors(t,i);if(Array.isArray(o))for(const s of o)n.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)}}class m{constructor(e){this.colorInfo=e}async compute(e,t,i,o){const s=await e.provideColorPresentations(t,this.colorInfo,n.XO.None);return Array.isArray(s)&&o.push(...s),Array.isArray(s)}}async function _(e,t,i,n,s){let r,a=!1;const l=[],c=t.ordered(i);for(let h=c.length-1;h>=0;h--){const t=c[h];if(t instanceof d.L)r=t;else try{await e.compute(t,i,n,l)&&(a=!0)}catch(u){(0,o.M_)(u)}}return a?l:r&&s?(await e.compute(r,i,n,l),l):[]}function v(e,t){const{colorProvider:i}=e.get(c.ILanguageFeaturesService),n=e.get(a.IModelService).getModel(t);if(!n)throw(0,o.Qg)();const s=e.get(u.pG).getValue("editor.defaultColorDecorators",{resource:t});return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:s}}l.w.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof s.r))throw(0,o.Qg)();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=v(e,i);return _(new f,a,r,n.XO.None,l)})),l.w.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,a]=t,{uri:l,range:c}=a;if(!(l instanceof s.r)||!Array.isArray(i)||4!==i.length||!r.Q.isIRange(c))throw(0,o.Qg)();const{model:d,colorProviderRegistry:u,isDefaultColorDecoratorsEnabled:h}=v(e,l),[g,p,f,b]=i;return _(new m({range:c,color:{red:g,green:p,blue:f,alpha:b}}),u,d,n.XO.None,h)}))},29886:(e,t,i)=>{"use strict";var n=i(5091),o=i(16259),s=i(8690),r=i(17799),a=i(86367),l=i(81319),c=i(38570);class d extends n.jG{static{this.ID="editor.contrib.colorContribution"}constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(149);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==r.nM)return;if(!i.range)return;const n=this._editor.getContribution(l.A.ID);if(n&&!n.isColorPickerVisible){const e=new s.Q(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}(0,o.HW)(d.ID,d,2),c.B2.register(a.BJ)},17799:(e,t,i)=>{"use strict";i.d(t,{mn:()=>C,nM:()=>w});var n,o=i(9659),s=i(85476),r=i(14396),a=i(40231),l=i(5091),c=i(84240),d=i(20601),u=i(66621),h=i(16259),g=i(8690),p=i(35037),f=i(85983),m=i(12847),_=i(68385),v=i(32828),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};const w=Object.create({});let C=class extends l.jG{static{n=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(e,t,i,o){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new l.Cm),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new u.Qn(this._editor),this._decoratorLimitReporter=new S,this._colorDecorationClassRefs=this._register(new l.Cm),this._debounceInformation=o.for(i.colorProvider,"Document Colors",{min:n.RECOMPUTE_TIME}),this._register(e.onDidChangeModel((()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()}))),this._register(e.onDidChangeModelLanguage((()=>this.updateColors()))),this._register(i.colorProvider.onDidChange((()=>this.updateColors()))),this._register(e.onDidChangeConfiguration((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(21),n=e.hasChanged(148);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"===typeof i){const e=i["colorDecorators"];if(e&&void 0!==e["enable"]&&!e["enable"])return e["enable"]}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new o.pc,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}async beginCompute(){this._computePromise=(0,o.SS)((async e=>{const t=this._editor.getModel();if(!t)return[];const i=new c.W(!1),n=await(0,_.j)(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n}));try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){(0,r.dz)(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.kI.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let o=0;othis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};C=n=b([y(1,v.pG),y(2,m.ILanguageFeaturesService),y(3,f.ILanguageFeatureDebounceService)],C);class S{constructor(){this._onDidChange=new a.vl,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}(0,h.HW)(C.ID,C,1)},86367:(e,t,i)=>{"use strict";i.d(t,{BJ:()=>M,WE:()=>B});var n=i(9659),o=i(67792),s=i(85476),r=i(5091),a=i(8690),l=i(68385),c=i(17799),d=i(40231);class u{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new d.vl,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new d.vl,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let n=0;n{this.backgroundColor=e.getColor(b.WfR)||s.Q1.white}))),this._register(g.ko(this._pickedColorNode,g.Bx.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(g.ko(this._originalColorNode,g.Bx.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=s.Q1.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new S(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=s.Q1.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class S extends r.jG{constructor(e){super(),this._onClicked=this._register(new d.vl),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),g.BC(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),g.BC(this._button,t);const i=g.BC(t,w(".button"+_.L.asCSSSelector((0,y.pU)("color-picker-close",m.W.close,(0,v.kg)("closeIcon","Icon to close the color picker")))));i.classList.add("close-icon"),this._register(g.ko(this._button,g.Bx.CLICK,(()=>{this._onClicked.fire()})))}}class k extends r.jG{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=w(".colorpicker-body"),g.BC(e,this._domNode),this._saturationBox=new x(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new L(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new T(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new I(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new s.Q1(new s.$J(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new s.Q1(new s.$J(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new s.Q1(new s.$J(360===i?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class x extends r.jG{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,this._domNode=w(".saturation-wrap"),g.BC(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",g.BC(this._domNode,this._canvas),this.selection=w(".saturation-selection"),g.BC(this._domNode,this.selection),this.layout(),this._register(g.ko(this._domNode,g.Bx.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new p._);const t=g.BK(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=g.ko(e.target.ownerDocument,g.Bx.POINTER_UP,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new s.Q1(new s.$J(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=s.Q1.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class E extends r.jG{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=g.BC(e,w(".standalone-strip")),this.overlay=g.BC(this.domNode,w(".standalone-overlay"))):(this.domNode=g.BC(e,w(".strip")),this.overlay=g.BC(this.domNode,w(".overlay"))),this.slider=g.BC(this.domNode,w(".slider")),this.slider.style.top="0px",this._register(g.ko(this.domNode,g.Bx.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new p._),i=g.BK(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=g.ko(e.target.ownerDocument,g.Bx.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class L extends E{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,o=new s.Q1(new s.bU(t,i,n,1)),r=new s.Q1(new s.bU(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class T extends E{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class I extends r.jG{constructor(e){super(),this._onClicked=this._register(new d.vl),this.onClicked=this._onClicked.event,this._button=g.BC(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(g.ko(this._button,g.Bx.CLICK,(()=>{this._onClicked.fire()})))}get button(){return this._button}}class R extends f.x{constructor(e,t,i,n,o=!1){super(),this.model=t,this.pixelRatio=i,this._register(h.c.getInstance(g.zk(e)).onDidChange((()=>this.layout()))),this._domNode=w(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new C(this._domNode,this.model,n,o)),this.body=this._register(new k(this._domNode,this.model,this.pixelRatio,o))}layout(){this.body.layout()}get domNode(){return this._domNode}}var D=i(38570),N=i(15911),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=function(e,t){return function(i,n){t(i,n,e)}};class P{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let M=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return n.AE.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=c.mn.get(this._editor);if(!n)return[];for(const o of t){if(!n.isColorDecoration(o))continue;const e=n.getColorData(o.range.getStartPosition());if(e){const t=await W(this,this._editor.getModel(),e.colorInfo,e.provider);return[t]}}return[]}renderHoverParts(e,t){const i=H(this,this._editor,this._themeService,t,e);if(!i)return new D.Ke([]);this._colorPicker=i.colorPicker;const n={hoverPart:i.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){i.disposables.dispose()}};return new D.Ke([n])}handleResize(){this._colorPicker?.layout()}isColorPickerVisible(){return!!this._colorPicker}};M=A([O(1,N.Gy)],M);class F{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let B=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel())return null;const n=c.mn.get(this._editor);if(!n)return null;const s=await(0,l.j)(i,this._editor.getModel(),o.XO.None);let r=null,d=null;for(const o of s){const t=o.colorInfo;a.Q.containsRange(t.range,e.range)&&(r=t,d=o.provider)}const u=r??e,h=d??t,g=!!r;return{colorHover:await W(this,this._editor.getModel(),u,h),foundInEditor:g}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new a.Q(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await j(this._editor.getModel(),t,this._color,i,e),i=V(this._editor,i,t))}renderHoverParts(e,t){return H(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};async function W(e,t,i,n){const r=t.getValueInRange(i.range),{red:c,green:d,blue:h,alpha:g}=i.color,p=new s.bU(Math.round(255*c),Math.round(255*d),Math.round(255*h),g),f=new s.Q1(p),m=await(0,l.R)(t,i,n,o.XO.None),_=new u(f,[],0);return _.colorPresentations=m||[],_.guessColorPresentation(f,r),e instanceof M?new P(e,a.Q.lift(i.range),_,n):new F(e,a.Q.lift(i.range),_,n)}function H(e,t,i,n,o){if(0===n.length||!t.hasModel())return;if(o.setMinimumDimensions){const e=t.getOption(67)+8;o.setMinimumDimensions(new g.fg(302,e))}const s=new r.Cm,l=n[0],c=t.getModel(),d=l.model,u=s.add(new R(o.fragment,d,t.getOption(144),i,e instanceof B));let h=!1,p=new a.Q(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn);if(e instanceof B){const t=l.model.color;e.color=t,j(c,d,t,p,l),s.add(d.onColorFlushed((t=>{e.color=t})))}else s.add(d.onColorFlushed((async e=>{await j(c,d,e,p,l),h=!0,p=V(t,p,d)})));return s.add(d.onDidChangeColor((e=>{j(c,d,e,p,l)}))),s.add(t.onDidChangeModelContent((e=>{h?h=!1:(o.hide(),t.focus())}))),{hoverPart:l,colorPicker:u,disposables:s}}function V(e,t,i){const n=[],o=i.presentation.textEdit??{range:t,text:i.presentation.label,forceMoveMarkers:!1};n.push(o),i.presentation.additionalTextEdits&&n.push(...i.presentation.additionalTextEdits);const s=a.Q.lift(o.range),r=e.getModel()._setTrackedRange(null,s,3);return e.executeEdits("colorpicker",n),e.pushUndoStop(),e.getModel()._getTrackedRange(r)??s}async function j(e,t,i,n,s){const r=await(0,l.R)(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},s.provider,o.XO.None);t.colorPresentations=r||[]}B=A([O(1,N.Gy)],B)},21922:(e,t,i)=>{"use strict";i.d(t,{L:()=>d});var n=i(85476),o=i(5091),s=i(12847),r=i(36285),a=i(4117),l=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},c=function(e,t){return function(i,n){t(i,n,e)}};let d=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const o=t.range,s=t.color,r=s.alpha,a=new n.Q1(new n.bU(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?n.Q1.Format.CSS.formatRGB(a):n.Q1.Format.CSS.formatRGBA(a),c=r?n.Q1.Format.CSS.formatHSL(a):n.Q1.Format.CSS.formatHSLA(a),d=r?n.Q1.Format.CSS.formatHex(a):n.Q1.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:o,text:l}}),u.push({label:c,textEdit:{range:o,text:c}}),u.push({label:d,textEdit:{range:o,text:d}}),u}};d=l([c(0,a.IEditorWorkerService)],d);let u=class extends o.jG{constructor(e,t){super(),this._register(e.colorProvider.register("*",new d(t)))}};u=l([c(0,s.ILanguageFeaturesService),c(1,a.IEditorWorkerService)],u),(0,r.x)(u)},24655:(e,t,i)=>{"use strict";var n,o,s=i(16259),r=i(41337),a=i(5091),l=i(86367),c=i(87778),d=i(43505),u=i(13046),h=i(40231),g=i(12847),p=i(57479),f=i(18904),m=i(21922),_=i(2150),v=i(4117),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};let w=class extends a.jG{static{n=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(e,t,i){super(),this._editor=e,this._instantiationService=i,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.R.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=p.R.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(k,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(e){return e.getContribution(n.ID)}};w=n=b([y(1,f.fN),y(2,c._Y)],w),(0,s.HW)(w.ID,w,1);const C=8,S=22;let k=class extends a.jG{static{o=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._keybindingService=o,this._languageFeaturesService=s,this._editorWorkerService=r,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new h.vl),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(l.WE,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;const a=this._editor.getSelection(),c=a?{startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},d=this._register(_.w5(this._body));this._register(d.onDidBlur((e=>{this.hide()}))),this._register(d.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{const t=e.target.element?.classList;t&&t.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(c),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return o.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new x(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new m.L(this._editorWorkerService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment(),n=this._register(new d.L(this._keybindingService)),o={fragment:i,statusBar:n,onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=e;const s=this._standaloneColorPickerParticipant.renderHoverParts(o,[e]);if(!s)return;this._register(s.disposables);const r=s.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),r.layout();const a=r.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-S-C,u=r.body.enterButton;u?.onClicked((()=>{this.updateEditor(),this.hide()}));const h=r.header,g=h.pickedColorNode;g.style.width=l+C+"px";const p=h.originalColorNode;p.style.width=c+"px";const f=r.header.closeButton;f?.onClicked((()=>{this.hide()})),t&&(u&&(u.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};k=o=b([y(3,c._Y),y(4,u.b),y(5,g.ILanguageFeaturesService),y(6,v.IEditorWorkerService)],k);class x{constructor(e,t){this.value=e,this.foundInEditor=t}}var E=i(6330);class L extends s.qO{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...(0,r.aS)("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:(0,r.kg)({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:E.D8.CommandPalette}],metadata:{description:(0,r.aS)("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){w.get(t)?.showOrFocus()}}class T extends s.ks{constructor(){super({id:"editor.action.hideColorPicker",label:(0,r.kg)({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:p.R.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:(0,r.aS)("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,t){w.get(t)?.hide()}}class I extends s.ks{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,r.kg)({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:p.R.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:(0,r.aS)("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){w.get(t)?.insertColor()}}(0,s.Fl)(T),(0,s.Fl)(I),(0,E.ug)(L)},26271:(e,t,i)=>{"use strict";var n=i(91348),o=i(16259),s=i(8690),r=i(57479),a=i(50395),l=i(28346),c=i(36788),d=i(98581);class u{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,o=e.length;if(i+n>o)return!1;for(let s=0;s=65&&n<=90&&n+32===o)&&!(o>=65&&o<=90&&o+32===n)))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,r){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,h=o.getLineContent(a),g=o.getLineContent(c);let p,f=h.lastIndexOf(t,l-1+t.length),m=g.indexOf(i,d-1-i.length);if(-1!==f&&-1!==m)if(a===c){const e=h.substring(f+t.length,m);e.indexOf(i)>=0&&(f=-1,m=-1)}else{const e=h.substring(f+t.length),n=g.substring(0,m);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(f=-1,m=-1)}-1!==f&&-1!==m?(n&&f+t.length0&&32===g.charCodeAt(m-1)&&(i=" "+i,m-=1),p=u._createRemoveBlockCommentOperations(new s.Q(a,f+t.length+1,c,m+1),t,i)):(p=u._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===p.length?i:null);for(const s of p)r.addTrackedEditOperation(s.range,s.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return s.Q.isEmpty(e)?n.push(l.k.delete(new s.Q(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.k.delete(new s.Q(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.k.delete(new s.Q(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const o=[];return s.Q.isEmpty(e)?o.push(l.k.replace(new s.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(l.k.insert(new c.y(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(l.k.insert(new c.y(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;s&&s.blockCommentStartToken&&s.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new d.L(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new d.L(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var h=i(20601);class g{constructor(e,t,i,n,o,s,r){this.languageConfigurationService=e,this._selection=t,this._indentSize=i,this._type=n,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),s=n.getLanguageConfiguration(o).comments,r=s?s.lineCommentToken:null;if(!r)return null;const a=[];for(let l=0,c=i-t+1;lr?o-1:o}}}var p=i(41337),f=i(6330);class m extends o.ks{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(a.JZ);if(!t.hasModel())return;const n=t.getModel(),o=[],r=n.getOptions(),l=t.getOption(23),c=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));c.sort(((e,t)=>s.Q.compareRangesUsingStarts(e.selection,t.selection)));let d=c[0];for(let s=1;s{"use strict";i.d(t,{d:()=>y});var n,o=i(2150),s=i(64236),r=i(55664),a=i(5091),l=i(25160),c=i(16259),d=i(57479),u=i(41337),h=i(6330),g=i(18904),p=i(46403),f=i(13046),m=i(32828),_=i(81714),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};let y=class{static{n=this}static{this.ID="editor.contrib.contextmenu"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s,r,l,c){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=l,this._workspaceContextService=c,this._toDispose=new a.Cm,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&o.jG(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(24)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.getMenuActions(t,this._contextKeyService,{arg:e.uri});for(const o of n){const[,t]=o;let n=0;for(const o of t)if(o instanceof h.nI){const t=this._getMenuActions(e,o.item.submenu);t.length>0&&(i.push(new r.YH(o.id,o.label,t)),n++)}else i.push(o),n++;n&&i.push(new r.wv)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=o.BK(this._editor.getDomNode()),i=t.left+e.left,s=t.top+e.top+e.height;n={x:i,y:s}}const r=this._editor.getOption(128)&&!l.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new s.Z4(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"===typeof i.getActionViewItem?i.getActionViewItem():new s.Z4(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if((0,_.ct)(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(73);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:"undefined"===typeof e.enabled||e.enabled,checked:e.checked,run:e.run}),o=(e,t)=>new r.YH("menu-action-"+ ++i,e,t,void 0),s=(e,t,i,s,r)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const a=e=>()=>{this._configurationService.updateValue(i,e)},l=[];for(const o of r)l.push(n({label:o.label,checked:s===o.value,run:a(o.value)}));return o(e,l)},a=[];a.push(n({label:u.kg("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new r.wv),a.push(n({label:u.kg("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(u.kg("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:u.kg("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:u.kg("context.minimap.size.fill","Fill"),value:"fill"},{label:u.kg("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(u.kg("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:u.kg("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:u.kg("context.minimap.slider.always","Always"),value:"always"}]));const c=this._editor.getOption(128)&&!l.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:c?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};y=n=v([b(1,p.Z),b(2,p.l),b(3,g.fN),b(4,f.b),b(5,h.ez),b(6,m.pG),b(7,_.VR)],y);class w extends c.ks{constructor(){super({id:"editor.action.showContextMenu",label:u.kg("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:d.R.textInputFocus,primary:1092,weight:100}})}run(e,t){y.get(t)?.showContextMenu()}}(0,c.HW)(y.ID,y,2),(0,c.Fl)(w)},15943:(e,t,i)=>{"use strict";var n=i(5091),o=i(16259),s=i(57479),r=i(41337);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections),n=this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i);n||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}class d extends o.ks{constructor(){super({id:"cursorUndo",label:r.kg("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.R.textInputFocus,primary:2099,weight:100}})}run(e,t,i){c.get(t)?.cursorUndo()}}class u extends o.ks{constructor(){super({id:"cursorRedo",label:r.kg("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){c.get(t)?.cursorRedo()}}(0,o.HW)(c.ID,c,0),(0,o.Fl)(d),(0,o.Fl)(u)},32865:(e,t,i)=>{"use strict";var n=i(85053),o=i(39751),s=i(39352),r=i(78787),a=i(12847),l=i(83262),c=i(5091),d=i(40231),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},h=function(e,t){return function(i,n){t(i,n,e)}};let g=class extends c.jG{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=(0,o.FY)(this,void 0);const n=(0,o.yQ)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=(0,o.yQ)("_textModel.onDidChangeContent",d.Jh.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register((0,o.yC)((async(e,t)=>{n.read(e),s.read(e);const i=t.add(new r.MZ),o=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(o,void 0)})))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const o=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return o.sort((0,n.Hw)((0,n.VE)((e=>e.range.endLineNumber-e.range.startLineNumber),n.U9))),o.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};g=u([h(1,a.ILanguageFeaturesService),h(2,l.gW)],g),s.N.setBreadcrumbsSourceFactory(((e,t)=>t.createInstance(g,e)))},6132:(e,t,i)=>{"use strict";var n=i(5091),o=i(25160),s=i(16259),r=i(36788),a=i(8690),l=i(98581),c=i(35037);class d{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.Q(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.L(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.L(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(u(e)&&(this._modifierPressed=!0),this._mouseDown&&u(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(u(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===h.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(null===this._dragSelection){const e=this._editor.getSelections()||[],i=e.filter((e=>t.position&&e.containsPosition(t.position)));if(1!==i.length)return;this._dragSelection=i[0]}u(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new r.y(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new l.L(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new l.L(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(u(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(h.ID,new d(this._dragSelection,t,u(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=c.kI.register({description:"dnd-target",className:"dnd-target"})}showAt(e){this._dndDecorationIds.set([{range:new a.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:h._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}(0,s.HW)(h.ID,h,2)},23631:(e,t,i)=>{"use strict";var n=i(67792),o=i(50322),s=i(29133),r=i(64037),a=i(83262),l=i(72786);l.w.registerCommand("_executeDocumentSymbolProvider",(async function(e,...t){const[i]=t;(0,o.j)(s.r.isUri(i));const l=e.get(a.gW),c=e.get(r.ITextModelService),d=await c.createModelReference(i);try{return(await l.getOrCreate(d.object.textEditorModel,n.XO.None)).getTopLevelSymbols()}finally{d.dispose()}}))},83262:(e,t,i)=>{"use strict";i.d(t,{LC:()=>b,e0:()=>y,gW:()=>C,i9:()=>w});var n=i(85053),o=i(67792),s=i(14396),r=i(5837),a=i(21553),l=i(36788),c=i(8690),d=i(85983),u=i(87778),h=i(59857),g=i(69361),p=i(5091),f=i(12847),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};class v{remove(){this.parent?.children.delete(this.id)}static findId(e,t){let i;"string"===typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let o=0;void 0!==t.children.get(n);o++)n=`${i}_${o}`;return n}static empty(e){return 0===e.children.size}}class b extends v{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class y extends v{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class w extends v{static create(e,t,i){const r=new o.Qi(i),a=new w(t.uri),l=e.ordered(t),c=l.map(((e,i)=>{const n=v.findId(`provider_${i}`,a),o=new y(n,a,e.displayName??"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,r.token)).then((e=>{for(const t of e||[])w._makeOutlineElement(t,o);return o}),(e=>((0,s.M_)(e),o))).then((e=>{v.empty(e)?e.remove():a._groups.set(n,e)}))})),d=e.onDidChange((()=>{const i=e.ordered(t);(0,n.aI)(i,l)||r.cancel()}));return Promise.all(c).then((()=>r.token.isCancellationRequested&&!i.isCancellationRequested?w.create(e,t,i):a._compact())).finally((()=>{r.dispose(),d.dispose(),r.dispose()}))}static _makeOutlineElement(e,t){const i=v.findId(e,t),n=new b(i,t,e);if(e.children)for(const o of e.children)w._makeOutlineElement(o,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=r.f.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof b?e.push(t.symbol):e.push(...r.f.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>c.Q.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return w._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>l.y.compare(c.Q.getStartPosition(e.range),c.Q.getStartPosition(t.range))||l.y.compare(c.Q.getEndPosition(t.range),c.Q.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&w._flattenDocumentSymbols(e,n.children,n.name)}}const C=(0,u.u1)("IOutlineModelService");let S=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new p.Cm,this._cache=new a.qK(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,s=i.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!(0,n.aI)(r.provider,s)){const t=new o.Qi;r={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:t,promise:w.create(i,e,t.token),model:void 0},this._cache.set(e.id,r);const n=Date.now();r.promise.then((t=>{r.model=t,this._debounceInformation.update(e,Date.now()-n)})).catch((t=>{this._cache.delete(e.id)}))}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested((()=>{0===--r.promiseCnt&&(r.source.cancel(),this._cache.delete(e.id))}));try{return await r.promise}finally{a.dispose()}}};S=m([_(0,f.ILanguageFeaturesService),_(1,d.ILanguageFeatureDebounceService),_(2,g.IModelService)],S),(0,h.v)(C,S,1)},50416:(e,t,i)=>{"use strict";var n=i(59200),o=i(16259),s=i(57479),r=i(36285),a=i(878),l=i(49309),c=i(41337);(0,o.HW)(a.Rj.ID,a.Rj,0),(0,r.x)(l.L9),(0,o.E_)(new class extends o.DX{constructor(){super({id:a.qs,precondition:a.lr,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t){return a.Rj.get(t)?.changePasteType()}}),(0,o.E_)(new class extends o.DX{constructor(){super({id:"editor.hidePasteWidget",precondition:a.lr,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t){a.Rj.get(t)?.clearWidgets()}}),(0,o.Fl)(class e extends o.ks{static{this.argsSchema={type:"object",properties:{kind:{type:"string",description:c.kg("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}}}constructor(){super({id:"editor.action.pasteAs",label:c.kg("pasteAs","Paste As..."),alias:"Paste As...",precondition:s.R.writable,metadata:{description:"Paste as",args:[{name:"args",schema:e.argsSchema}]}})}run(e,t,i){let o="string"===typeof i?.kind?i.kind:void 0;return!o&&i&&(o="string"===typeof i.id?i.id:void 0),a.Rj.get(t)?.pasteAs(o?new n.k(o):void 0)}}),(0,o.Fl)(class extends o.ks{constructor(){super({id:"editor.action.pasteAsText",label:c.kg("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:s.R.writable})}run(e,t){return a.Rj.get(t)?.pasteAs({providerId:l.LR.id})}})},878:(e,t,i)=>{"use strict";i.d(t,{Rj:()=>B,lr:()=>M,qs:()=>P});var n,o=i(2150),s=i(85053),r=i(9659),a=i(67792),l=i(65312),c=i(59200),d=i(5091),u=i(33911),h=i(25160),g=i(23264),p=i(169),f=i(35524),m=i(3176),_=i(8690),v=i(35350),b=i(12847),y=i(49309),w=i(92728),C=i(64339),S=i(31903),k=i(61307),x=i(41337),E=i(28753),L=i(18904),T=i(87778),I=i(44838),R=i(3874),D=i(95566),N=i(14396),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=function(e,t){return function(i,n){t(i,n,e)}};const P="editor.changePasteType",M=new L.N1("pasteWidgetVisible",!1,(0,x.kg)("pasteWidgetVisible","Whether the paste widget is showing")),F="application/vnd.code.copyMetadata";let B=class extends d.jG{static{n=this}static{this.ID="editor.contrib.copyPasteActionController"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register((0,o.ko)(l,"copy",(e=>this.handleCopy(e)))),this._register((0,o.ko)(l,"cut",(e=>this.handleCopy(e)))),this._register((0,o.ko)(l,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new S.I("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(D.G,"pasteIntoEditor",e,M,{id:P,label:(0,x.kg)("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},(0,o.a)().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(!this._editor.hasTextFocus())return;if(this._clipboardService.clearInternalState?.(),!e.clipboardData||!this.isPasteAsEnabled())return;const t=this._editor.getModel(),i=this._editor.getSelections();if(!t||!i?.length)return;const o=this._editor.getOption(37);let a=i;const l=1===i.length&&i[0].isEmpty();if(l){if(!o)return;a=[new _.Q(a[0].startLineNumber,1,a[0].startLineNumber,1+t.getLineLength(a[0].startLineNumber))]}const c=this._editor._getViewModel()?.getPlainTextToCopy(i,o,h.uF),d=Array.isArray(c)?c:null,u={multicursorText:d,pasteOnNewLine:l,mode:null},p=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e=>!!e.prepareDocumentPaste));if(!p.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});const m=(0,f.q)(e.clipboardData),v=p.flatMap((e=>e.copyMimeTypes??[])),b=(0,g.b)();this.setCopyMetadata(e.clipboardData,{id:b,providerCopyMimeTypes:v,defaultPastePayload:u});const y=(0,r.SS)((async e=>{const i=(0,s.Yc)(await Promise.all(p.map((async i=>{try{return await i.prepareDocumentPaste(t,a,m,e)}catch(n){return void console.error(n)}}))));i.reverse();for(const t of i)for(const[e,i]of t)m.replace(e,i);return m}));n._currentCopyOperation?.dataTransferPromise.cancel(),n._currentCopyOperation={handle:b,dataTransferPromise:y}}async handlePaste(e){if(!e.clipboardData||!this._editor.hasTextFocus())return;k.k.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;const t=this._editor.getModel(),i=this._editor.getSelections();if(!i?.length||!t)return;if(this._editor.getOption(92)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const n=this.fetchCopyMetadata(e),o=(0,f.l)(e.clipboardData);o.delete(F);const s=[...e.clipboardData.types,...n?.providerCopyMimeTypes??[],u.K.uriList],r=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e=>{const t=this._pasteAsActionContext?.preferred;return!(t&&e.providedPasteEditKinds&&!this.providerMatchesPreference(e,t))&&e.pasteMimeTypes?.some((e=>(0,l.Y)(e,s)))}));r.length?(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,r,i,o,n):this.doPasteInline(r,i,o,n,e)):this._pasteAsActionContext?.preferred&&this.showPasteAsNoEditMessage(i,this._pasteAsActionContext.preferred)}showPasteAsNoEditMessage(e,t){k.k.get(this._editor)?.showMessage((0,x.kg)("pasteAsError","No paste edits for '{0}' found",t instanceof c.k?t.value:t.providerId),e[0].getStartPosition())}doPasteInline(e,t,i,n,o){const s=this._editor;if(!s.hasModel())return;const l=new C.gI(s,3,void 0),c=(0,r.SS)((async s=>{const u=this._editor;if(!u.hasModel())return;const h=u.getModel(),g=new d.Cm,p=g.add(new a.Qi(s));g.add(l.token.onCancellationRequested((()=>p.cancel())));const f=p.token;try{if(await this.mergeInDataFromCopy(i,n,f),f.isCancellationRequested)return;const s=e.filter((e=>this.isSupportedPasteProvider(e,i)));if(!s.length||1===s.length&&s[0]instanceof y.LR)return this.applyDefaultPasteHandler(i,n,f,o);const a={triggerKind:v.FX.Automatic},l=await this.getPasteEdits(s,i,h,t,a,f);if(g.add(l),f.isCancellationRequested)return;if(1===l.edits.length&&l.edits[0].provider instanceof y.LR)return this.applyDefaultPasteHandler(i,n,f,o);if(l.edits.length){const e="afterPaste"===u.getOption(85).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:l.edits},e,((e,i)=>new Promise(((n,o)=>{(async()=>{try{const s=e.provider.resolveDocumentPasteEdit?.(e,i),a=new r.Zv,l=s&&await this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,x.kg)("resolveProcess","Resolving paste edit. Click to cancel"),Promise.race([a.p,s]),{cancel:()=>(a.cancel(),o(new N.AL))},0);return l&&(e.additionalEdit=l.additionalEdit),n(e)}catch(s){return o(s)}})()}))),f)}await this.applyDefaultPasteHandler(i,n,f,o)}finally{g.dispose(),this._currentPasteOperation===c&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,x.kg)("pasteIntoEditorProgress","Running paste handlers. Click to cancel and do basic paste"),c,{cancel:async()=>{try{if(c.cancel(),l.token.isCancellationRequested)return;await this.applyDefaultPasteHandler(i,n,l.token,o)}finally{l.dispose()}}}).then((()=>{l.dispose()})),this._currentPasteOperation=c}showPasteAsPick(e,t,i,n,o){const s=(0,r.SS)((async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),u=new d.Cm,h=u.add(new C.gI(a,3,void 0,r));try{if(await this.mergeInDataFromCopy(n,o,h.token),h.token.isCancellationRequested)return;let s=t.filter((t=>this.isSupportedPasteProvider(t,n,e)));e&&(s=s.filter((t=>this.providerMatchesPreference(t,e))));const r={triggerKind:v.FX.PasteAs,only:e&&e instanceof c.k?e:void 0};let a,d=u.add(await this.getPasteEdits(s,n,l,i,r,h.token));if(h.token.isCancellationRequested)return;if(e&&(d={edits:d.edits.filter((t=>e instanceof c.k?e.contains(t.kind):e.providerId===t.provider.id)),dispose:d.dispose}),!d.edits.length)return void(r.only&&this.showPasteAsNoEditMessage(i,r.only));if(e)a=d.edits.at(0);else{const e=await this._quickInputService.pick(d.edits.map((e=>({label:e.title,description:e.kind?.value,edit:e}))),{placeHolder:(0,x.kg)("pasteAsPickerPlaceholder","Select Paste Action")});a=e?.edit}if(!a)return;const g=(0,w.v)(l.uri,i,a);await this._bulkEditService.apply(g,{editor:this._editor})}finally{u.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:(0,x.kg)("pasteAsProgress","Running paste handlers")},(()=>s))}setCopyMetadata(e,t){e.setData(F,JSON.stringify(t))}fetchCopyMetadata(e){if(!e.clipboardData)return;const t=e.clipboardData.getData(F);if(t)try{return JSON.parse(t)}catch{return}const[i,n]=p.Mz.getTextData(e.clipboardData);return n?{defaultPastePayload:{mode:n.mode,multicursorText:n.multicursorText??null,pasteOnNewLine:!!n.isFromEmptySelection}}:void 0}async mergeInDataFromCopy(e,t,i){if(t?.id&&n._currentCopyOperation?.handle===t.id){const t=await n._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(u.K.uriList)){const t=await this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(u.K.uriList,(0,l.gf)(l.jt.create(t)))}}async getPasteEdits(e,t,i,n,o,a){const l=new d.Cm,c=await(0,r.PK)(Promise.all(e.map((async e=>{try{const s=await(e.provideDocumentPasteEdits?.(i,n,t,o,a));return s&&l.add(s),s?.edits?.map((t=>({...t,provider:e})))}catch(s){return void((0,N.MB)(s)||console.error(s))}}))),a),u=(0,s.Yc)(c??[]).flat().filter((e=>!o.only||o.only.contains(e.kind)));return{edits:(0,w.H)(u),dispose:()=>l.dispose()}}async applyDefaultPasteHandler(e,t,i,n){const o=e.get(u.K.text)??e.get("text"),s=await(o?.asString())??"";if(i.isCancellationRequested)return;const r={clipboardEvent:n,text:s,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._editor.trigger("keyboard","paste",r)}isSupportedPasteProvider(e,t,i){return!!e.pasteMimeTypes?.some((e=>t.matches(e)))&&(!i||this.providerMatchesPreference(e,i))}providerMatchesPreference(e,t){return t instanceof c.k?!e.providedPasteEditKinds||e.providedPasteEditKinds.some((e=>t.contains(e))):e.id===t.providerId}};B=n=A([O(1,T._Y),O(2,m.nu),O(3,E.h),O(4,b.ILanguageFeaturesService),O(5,R.GK),O(6,I.G5)],B)},49309:(e,t,i)=>{"use strict";i.d(t,{L9:()=>k,LR:()=>v,ZR:()=>S});var n=i(85053),o=i(65312),s=i(59200),r=i(5091),a=i(33911),l=i(6657),c=i(84366),d=i(29133),u=i(35350),h=i(12847),g=i(41337),p=i(81714),f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};class _{async provideDocumentPasteEdits(e,t,i,n,o){const s=await this.getEdit(i,o);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,n){const o=await this.getEdit(i,n);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}}class v extends _{constructor(){super(...arguments),this.kind=v.kind,this.dropMimeTypes=[a.K.text],this.pasteMimeTypes=[a.K.text]}static{this.id="text"}static{this.kind=new s.k("text.plain")}async getEdit(e,t){const i=e.get(a.K.text);if(!i)return;if(e.has(a.K.uriList))return;const n=await i.asString();return{handledMimeType:a.K.text,title:(0,g.kg)("text.label","Insert Plain Text"),insertText:n,kind:this.kind}}}class b extends _{constructor(){super(...arguments),this.kind=new s.k("uri.absolute"),this.dropMimeTypes=[a.K.uriList],this.pasteMimeTypes=[a.K.uriList]}async getEdit(e,t){const i=await C(e);if(!i.length||t.isCancellationRequested)return;let n=0;const o=i.map((({uri:e,originalText:t})=>e.scheme===l.ny.file?e.fsPath:(n++,t))).join(" ");let s;return s=n>0?i.length>1?(0,g.kg)("defaultDropProvider.uriList.uris","Insert Uris"):(0,g.kg)("defaultDropProvider.uriList.uri","Insert Uri"):i.length>1?(0,g.kg)("defaultDropProvider.uriList.paths","Insert Paths"):(0,g.kg)("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:a.K.uriList,insertText:o,title:s,kind:this.kind}}}let y=class extends _{constructor(e){super(),this._workspaceContextService=e,this.kind=new s.k("uri.relative"),this.dropMimeTypes=[a.K.uriList],this.pasteMimeTypes=[a.K.uriList]}async getEdit(e,t){const i=await C(e);if(!i.length||t.isCancellationRequested)return;const o=(0,n.Yc)(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?(0,c.iZ)(t.uri,e):void 0})));return o.length?{handledMimeType:a.K.uriList,insertText:o.join(" "),title:i.length>1?(0,g.kg)("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):(0,g.kg)("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}:void 0}};y=f([m(0,p.VR)],y);class w{constructor(){this.kind=new s.k("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:a.K.text}]}async provideDocumentPasteEdits(e,t,i,n,o){if(n.triggerKind!==u.FX.PasteAs&&!n.only?.contains(this.kind))return;const s=i.get("text/html"),r=await(s?.asString());return r&&!o.isCancellationRequested?{dispose(){},edits:[{insertText:r,yieldTo:this._yieldTo,title:(0,g.kg)("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}:void 0}}async function C(e){const t=e.get(a.K.uriList);if(!t)return[];const i=await t.asString(),n=[];for(const s of o.jt.parse(i))try{n.push({uri:d.r.parse(s),originalText:s})}catch{}return n}let S=class extends r.jG{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new v)),this._register(e.documentDropEditProvider.register("*",new b)),this._register(e.documentDropEditProvider.register("*",new y(t)))}};S=f([m(0,h.ILanguageFeaturesService),m(1,p.VR)],S);let k=class extends r.jG{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new v)),this._register(e.documentPasteEditProvider.register("*",new b)),this._register(e.documentPasteEditProvider.register("*",new y(t))),this._register(e.documentPasteEditProvider.register("*",new w))}};k=f([m(0,h.ILanguageFeaturesService),m(1,p.VR)],k)},8454:(e,t,i)=>{"use strict";var n,o=i(16259),s=i(97744),r=i(36285),a=i(49309),l=i(41337),c=i(27503),d=i(16374),u=i(85053),h=i(9659),g=i(65312),p=i(59200),f=i(5091),m=i(35524),_=i(8690),v=i(12847),b=i(61210),y=i(95231),w=i(64339),C=i(31903),S=i(32828),k=i(18904),x=i(47747),E=i(87778),L=i(92728),T=i(95566),I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};const D="editor.experimental.dropIntoEditor.defaultProvider",N="editor.changeDropType",A=new k.N1("dropWidgetVisible",!1,(0,l.kg)("dropWidgetVisible","Whether the drop widget is showing"));let O=class extends f.jG{static{n=this}static{this.ID="editor.contrib.dropIntoEditorController"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,o){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=x.PD.getInstance(),this._dropProgressManager=this._register(t.createInstance(C.I,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(T.G,"dropIntoEditor",e,A,{id:N,label:(0,l.kg)("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){if(!i.dataTransfer||!e.hasModel())return;this._currentOperation?.cancel(),e.focus(),e.setPosition(t);const n=(0,h.SS)((async o=>{const s=new f.Cm,r=s.add(new w.gI(e,1,void 0,o));try{const n=await this.extractDataTransferData(i);if(0===n.size||r.token.isCancellationRequested)return;const a=e.getModel();if(!a)return;const l=this._languageFeaturesService.documentDropEditProvider.ordered(a).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>n.matches(e))))),c=s.add(await this.getDropEdits(l,a,t,n,r));if(r.token.isCancellationRequested)return;if(c.edits.length){const i=this.getInitialActiveEditIndex(a,c.edits),n="afterDrop"===e.getOption(36).showDropSelector;await this._postDropWidgetManager.applyEditAndShowIfNeeded([_.Q.fromPositions(t)],{activeEditIndex:i,allEdits:c.edits},n,(async e=>e),o)}}finally{s.dispose(),this._currentOperation===n&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,(0,l.kg)("dropIntoEditorProgress","Running drop handlers. Click to cancel"),n,{cancel:()=>n.cancel()}),this._currentOperation=n}async getDropEdits(e,t,i,n,o){const s=new f.Cm,r=await(0,h.PK)(Promise.all(e.map((async e=>{try{const r=await e.provideDocumentDropEdits(t,i,n,o.token);return r&&s.add(r),r?.edits.map((t=>({...t,providerId:e.id})))}catch(r){console.error(r)}}))),o.token),a=(0,u.Yc)(r??[]).flat();return{edits:(0,L.H)(a),dispose:()=>s.dispose()}}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(D,{resource:e.uri});for(const[n,o]of Object.entries(i)){const e=new p.k(o),i=t.findIndex((t=>e.value===t.providerId&&t.handledMimeType&&(0,g.Y)(n,[t.handledMimeType])));if(i>=0)return i}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new g.Vq;const t=(0,m.l)(e.dataTransfer);if(this.treeItemsTransfer.hasData(b.DraggedTreeItemsIdentifier.prototype)){const e=this.treeItemsTransfer.getData(b.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(e))for(const i of e){const e=await this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}};O=n=I([R(1,E._Y),R(2,S.pG),R(3,v.ILanguageFeaturesService),R(4,y.ITreeViewsDnDService)],O),(0,o.HW)(O.ID,O,2),(0,r.x)(a.ZR),(0,o.E_)(new class extends o.DX{constructor(){super({id:N,precondition:A,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){O.get(t)?.changeDropType()}}),(0,o.E_)(new class extends o.DX{constructor(){super({id:"editor.hideDropWidget",precondition:A,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t,i){O.get(t)?.clearWidgets()}}),d.O.as(c.Fd.Configuration).registerConfiguration({...s.JJ,properties:{[D]:{type:"object",scope:5,description:l.kg("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}})},92728:(e,t,i)=>{"use strict";i.d(t,{H:()=>r,v:()=>s});var n=i(3176),o=i(18760);function s(e,t,i){return("string"===typeof i.insertText?""===i.insertText:""===i.insertText.snippet)?{edits:i.additionalEdit?.edits??[]}:{edits:[...t.map((t=>new n.cw(e,{range:t,text:"string"===typeof i.insertText?o.fr.escape(i.insertText)+"$0":i.insertText.snippet,insertAsSnippet:!0}))),...i.additionalEdit?.edits??[]]}}function r(e){function t(e,t){return"mimeType"in e?e.mimeType===t.handledMimeType:!!t.kind&&e.kind.contains(t.kind)}const i=new Map;for(const r of e)for(const n of r.yieldTo??[])for(const o of e)if(o!==r&&t(n,o)){let e=i.get(r);e||(e=[],i.set(r,e)),e.push(o)}if(!i.size)return Array.from(e);const n=new Set,o=[];function s(e){if(!e.length)return[];const t=e[0];if(o.includes(t))return console.warn("Yield to cycle detected",t),e;if(n.has(t))return s(e.slice(1));let r=[];const a=i.get(t);return a&&(o.push(t),r=s(a),o.pop()),n.add(t),[...r,t,...s(e.slice(1))]}return s(Array.from(e))}},95566:(e,t,i)=>{"use strict";i.d(t,{G:()=>C});var n,o=i(2150),s=i(42312),r=i(55664),a=i(28438),l=i(14396),c=i(40231),d=i(5091),u=i(3176),h=i(92728),g=i(41337),p=i(18904),f=i(46403),m=i(87778),_=i(13046),v=i(95062),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};let w=class extends d.jG{static{n=this}static{this.baseId="editor.widget.postEditWidget"}constructor(e,t,i,n,o,s,r,a,l,u){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=o,this.edits=s,this.onSelectNewEdit=r,this._contextMenuService=a,this._keybindingService=u,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(l),this.visibleContext.set(!0),this._register((0,d.s)((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,d.s)((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{o.containsPosition(e.position)||this.dispose()}))),this._register(c.Jh.runAndSubscribe(u.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){const e=this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=o.$(".post-edit-widget"),this.button=this._register(new s.$(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(o.ko(this.domNode,o.Bx.CLICK,(()=>this.showSelector())))}getId(){return n.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=o.BK(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>(0,r.ih)({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};w=n=b([y(7,f.Z),y(8,p.fN),y(9,_.b)],w);let C=class extends d.jG{constructor(e,t,i,n,o,s,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=o,this._bulkEditService=s,this._notificationService=r,this._currentWidget=this._register(new d.HE),this._register(c.Jh.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}async applyEditAndShowIfNeeded(e,t,i,n,o){const s=this._editor.getModel();if(!s||!e.length)return;const r=t.allEdits.at(t.activeEditIndex);if(!r)return;const c=async s=>{const r=this._editor.getModel();r&&(await r.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:s,allEdits:t.allEdits},i,n,o))},d=(n,o)=>{(0,l.MB)(n)||(this._notificationService.error(o),i&&this.show(e[0],t,c))};let u;try{u=await n(r,o)}catch(b){return d(b,(0,g.kg)("resolveError","Error resolving edit '{0}':\n{1}",r.title,(0,a.r)(b)))}if(o.isCancellationRequested)return;const p=(0,h.v)(s.uri,e,u),f=e[0],m=s.deltaDecorations([],[{range:f,options:{description:"paste-line-suffix",stickiness:0}}]);let _,v;this._editor.focus();try{_=await this._bulkEditService.apply(p,{editor:this._editor,token:o}),v=s.getDecorationRange(m[0])}catch(b){return d(b,(0,g.kg)("applyError","Error applying edit '{0}':\n{1}",r.title,(0,a.r)(b)))}finally{s.deltaDecorations(m,[])}o.isCancellationRequested||i&&_.isApplied&&t.allEdits.length>1&&this.show(v??f,t,c)}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(w,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};C=b([y(4,m._Y),y(5,u.nu),y(6,v.Ot)],C)},64339:(e,t,i)=>{"use strict";i.d(t,{$t:()=>m,gI:()=>_,ER:()=>v});var n=i(20601),o=i(8690),s=i(67792),r=i(5091),a=i(16259),l=i(18904),c=i(67806),d=i(87778),u=i(59857),h=i(41337);const g=(0,d.u1)("IEditorCancelService"),p=new l.N1("cancellableOperation",!1,(0,h.kg)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,u.v)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>{const t=p.bindTo(e.get(l.fN)),i=new c.w;return{key:t,tokens:i}})),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class f extends s.Qi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.E_)(new class extends a.DX{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class m{constructor(e,t){if(this.flags=t,0!==(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.GP("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!==(4&this.flags)?this.position=e.getPosition():this.position=null,0!==(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!==(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof m))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&(this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&(!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))))}validate(e){return this._equals(new m(e,this.flags))}}class _ extends f{constructor(e,t,i,n){super(e,n),this._listener=new r.Cm,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&o.Q.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&o.Q.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends s.Qi{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}},28369:(e,t,i)=>{"use strict";i.d(t,{z0:()=>ot});var n=i(9659),o=i(5091),s=i(20601),r=i(16259),a=i(52764),l=i(57479),c=i(9322),d=i(43654),u=i(50793),h=i(36788),g=i(8690),p=i(98581),f=i(13569),m=i(35037),_=i(66344),v=i(15911);class b{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new g.Q(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=b._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){n=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height,s=i/t,r=Math.max(2,Math.ceil(3/s));let a=e[0].range.startLineNumber,l=e[0].range.endLineNumber;for(let n=1,c=e.length;n=t.startLineNumber?t.endLineNumber>l&&(l=t.endLineNumber):(o.push({range:new g.Q(a,1,l,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),a=t.startLineNumber,l=t.endLineNumber)}o.push({range:new g.Q(a,1,l,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let t=0,r=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,b._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){const e=[];for(let t=0;tg.Q.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function C(e,t,i){const n=-1!==e[0].indexOf(i)&&-1!==t.indexOf(i);return n&&e[0].split(i).length===t.split(i).length}function S(e,t,i){const n=t.split(i),o=e[0].split(i);let s="";return n.forEach(((e,t)=>{s+=w([o[t]],e)+i})),s.slice(0,-1)}class k{constructor(e){this.staticValue=e,this.kind=0}}class x{constructor(e){this.pieces=e,this.kind=1}}class E{static fromStaticValue(e){return new E([L.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new k(e[0].staticValue):this._state=new x(e):this._state=new k("")}buildReplaceString(e,t){if(0===this._state.kind)return t?w(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,o=this._state.pieces.length;n0){const e=[],i=t.caseOps.length;let n=0;for(let s=0,r=o.length;s=i){e.push(o.slice(s));break}switch(t.caseOps[n]){case"U":e.push(o[s].toUpperCase());break;case"u":e.push(o[s].toUpperCase()),n++;break;case"L":e.push(o[s].toLowerCase());break;case"l":e.push(o[s].toLowerCase()),n++;break;default:e.push(o[s])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";while(e>0){if(e=o)break;const s=e.charCodeAt(n);if(36===s){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===s||38===s){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=s&&s<=57){let r=s-48;if(n+1=o)break;const s=e.charCodeAt(n);switch(s){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(s));break}}}return i.finalize()}var R=i(18904);const D=new R.N1("findWidgetVisible",!1),N=(D.toNegated(),new R.N1("findInputFocussed",!1)),A=new R.N1("replaceInputFocussed",!1),O={primary:545,mac:{primary:2593}},P={primary:565,mac:{primary:2613}},M={primary:560,mac:{primary:2608}},F={primary:554,mac:{primary:2602}},B={primary:558,mac:{primary:2606}},W={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},H=19999,V=240;class j{constructor(e,t){this._toDispose=new o.Cm,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new n.pc,this._decorations=new b(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new n.uC((()=>{if(this._editor.hasModel())return this.research(!1)}),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,o.AS)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){if(!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)){const t=this._editor.getModel();t.isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),V)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;"undefined"!==typeof t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new g.Q(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,H);this._decorations.set(n,i);const o=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(o);if(0===s&&n.length>0){const e=(0,d.hw)(n.map((e=>e.range)),(e=>g.Q.compareRangesUsingStarts(e,o)>=0));s=e>0?e-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new h.y(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new h.y(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()j._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=H?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new f.lt(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null),t=e.parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let e="mu";i.ignoreCase&&(e+="i"),i.global&&(e+="g"),i=new RegExp(i.source,e)}const n=this._editor.getModel(),o=n.getValue(1),s=n.getFullModelRange(),r=this._getReplacePattern();let a;const l=this._state.preserveCase;a=r.hasReplacementPatterns||l?o.replace(i,(function(){return r.buildReplaceString(arguments,l)})):o.replace(i,r.buildReplaceString(null,l));const c=new u.ui(s,a,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let s=0,r=i.length;se.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824);let i=t.map((e=>new p.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const n=this._editor.getSelection();for(let o=0,s=i.length;othis._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o={inputActiveOptionBorder:(0,_.GuP)(_.uNK),inputActiveOptionForeground:(0,_.GuP)(_.$$0),inputActiveOptionBackground:(0,_.GuP)(_.c1f)},s=this._register((0,q.bW)());this.caseSensitive=this._register(new U.bc({appendTitle:this._keybindingLabelFor(W.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:s,...o})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new U.nV({appendTitle:this._keybindingLabelFor(W.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:s,...o})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new U.Ix({appendTitle:this._keybindingLabelFor(W.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:s,...o})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(z.ko(this._domNode,z.Bx.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(z.ko(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return K.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}var G=i(40231);function Q(e,t){return 1===e||2!==e&&t}class Y extends o.jG{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Q(this._isRegexOverride,this._isRegex)}get wholeWord(){return Q(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Q(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Q(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new G.vl),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),"undefined"!==typeof i&&(g.Q.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){const n={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;const s=this.isRegex,r=this.wholeWord,a=this.matchCase,l=this.preserveCase;"undefined"!==typeof e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,n.searchString=!0,o=!0),"undefined"!==typeof e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,n.replaceString=!0,o=!0),"undefined"!==typeof e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,n.isRevealed=!0,o=!0),"undefined"!==typeof e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,n.isReplaceRevealed=!0,o=!0),"undefined"!==typeof e.isRegex&&(this._isRegex=e.isRegex),"undefined"!==typeof e.wholeWord&&(this._wholeWord=e.wholeWord),"undefined"!==typeof e.matchCase&&(this._matchCase=e.matchCase),"undefined"!==typeof e.preserveCase&&(this._preserveCase=e.preserveCase),"undefined"!==typeof e.searchScope&&(e.searchScope?.every((e=>this._searchScope?.some((t=>!g.Q.equalsRange(t,e)))))||(this._searchScope=e.searchScope,n.searchScope=!0,o=!0)),"undefined"!==typeof e.loop&&this._loop!==e.loop&&(this._loop=e.loop,n.loop=!0,o=!0),"undefined"!==typeof e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,n.isSearching=!0,o=!0),"undefined"!==typeof e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,n.filters=!0,o=!0),this._isRegexOverride="undefined"!==typeof e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride="undefined"!==typeof e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride="undefined"!==typeof e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride="undefined"!==typeof e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(o=!0,n.isRegex=!0),r!==this.wholeWord&&(o=!0,n.wholeWord=!0),a!==this.matchCase&&(o=!0,n.matchCase=!0),l!==this.preserveCase&&(o=!0,n.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(n)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=H}}var Z=i(19950),X=i(83092),J=i(53062),ee=i(25923),te=i(14396),ie=i(25160),ne=i(41337),oe=i(73075);function se(e){return"Up"===e.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()&&"Down"===e.lookupKeybinding("history.showNext")?.getElectronAccelerator()}var re=i(48401),ae=i(23740),le=i(1474),ce=i(50322),de=i(13153);const ue=(0,re.pU)("find-collapsed",ee.W.chevronRight,ne.kg("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),he=(0,re.pU)("find-expanded",ee.W.chevronDown,ne.kg("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),ge=(0,re.pU)("find-selection",ee.W.selection,ne.kg("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),pe=(0,re.pU)("find-replace",ee.W.replace,ne.kg("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),fe=(0,re.pU)("find-replace-all",ee.W.replaceAll,ne.kg("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),me=(0,re.pU)("find-previous-match",ee.W.arrowUp,ne.kg("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),_e=(0,re.pU)("find-next-match",ee.W.arrowDown,ne.kg("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),ve=ne.kg("label.findDialog","Find / Replace"),be=ne.kg("label.find","Find"),ye=ne.kg("placeholder.find","Find"),we=ne.kg("label.previousMatchButton","Previous Match"),Ce=ne.kg("label.nextMatchButton","Next Match"),Se=ne.kg("label.toggleSelectionFind","Find in Selection"),ke=ne.kg("label.closeButton","Close"),xe=ne.kg("label.replace","Replace"),Ee=ne.kg("placeholder.replace","Replace"),Le=ne.kg("label.replaceButton","Replace"),Te=ne.kg("label.replaceAllButton","Replace All"),Ie=ne.kg("label.toggleReplaceButton","Toggle Replace"),Re=ne.kg("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",H),De=ne.kg("label.matchesLocation","{0} of {1}"),Ne=ne.kg("label.noResults","No results"),Ae=419,Oe=275,Pe=Oe-54;let Me=69;const Fe=33,Be="ctrlEnterReplaceAll.windows.donotask",We=ie.zx?256:2048;class He{constructor(e){this.afterLineNumber=e,this.heightInPx=Fe,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function Ve(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function je(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(146)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(41)){const e=this._codeEditor.getOption(41).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new He(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((async()=>{if(this._isVisible){const e=await this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}}))),this._findInputFocused=N.bindTo(a),this._findFocusTracker=this._register(z.w5(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=A.bindTo(a),this._replaceFocusTracker=this._register(z.w5(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new He(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return ze.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(92)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=z.Tr(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,te.dz)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Me+"px",this._state.matchesCount>=H?this._matchesCount.title=Re:this._matchesCount.title="",this._matchesCount.firstChild?.remove(),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=H&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=s.GP(De,i,t)}else e=Ne;this._matchesCount.appendChild(document.createTextNode(e)),(0,Z.xE)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Me=Math.max(Me,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===Ne)return""===i?ne.kg("ariaSearchNoResultEmpty","{0} found",e):ne.kg("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=ne.kg("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();if(o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1){const e=o.getLineContent(t.startLineNumber);return`${e}, ${n}`}return n}return ne.kg("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=z.BK(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),r=o?o.top:0;if(this._viewZone&&re.startLineNumber&&(t=!1);const i=z.cL(this._domNode).left;s>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition()),r=n.left+(o?o.left:0);r>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;if(!t)return void this._removeViewZone();if(!this._isVisible)return;const i=this._viewZone;void 0===this._viewZoneId&&i&&this._codeEditor.changeViewZones((t=>{i.heightInPx=this._getHeight(),this._viewZoneId=t.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;if(!t)return;void 0===this._viewZone&&(this._viewZone=new He(0));const i=this._viewZone;this._codeEditor.changeViewZones((t=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===i.heightInPx)return;const o=n-i.heightInPx;return i.heightInPx=n,t.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(84).top,n<=0)return;i.heightInPx=n,this._viewZoneId=t.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo(),t=e.contentWidth;if(t<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let o=!1,s=!1,r=!1;if(this._resized){const e=z.Tr(this._domNode);if(e>Ae)return this._domNode.style.maxWidth=i-28-n-15+"px",void(this._replaceInput.width=z.Tr(this._findInput.domNode))}if(Ae+28+n>=i&&(s=!0),Ae+28+n-Me>=i&&(r=!0),Ae+28+n-Me>=i+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",r),this._domNode.classList.toggle("reduced-find-widget",s),r||o||(this._domNode.style.maxWidth=i-28-n-15+"px"),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:r,reducedFindWidget:s}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=z.Tr(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||g.Q.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|We)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Ve(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?je(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|We)?(this._keybindingService.dispatchEvent(e,e.target)||(ie.uF&&ie.ib&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(ne.kg("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Be,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Ve(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?je(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const e=!0,t=!0;this._findInput=this._register(new oe.pG(null,this._contextViewProvider,{width:Pe,label:be,placeholder:ye,appendCaseSensitiveLabel:this._keybindingLabelFor(W.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(W.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(W.ToggleRegexCommand),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(t){return{content:t.message}}},flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>se(this._keybindingService),inputBoxStyles:de.ho,toggleStyles:de.mk},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),ie.j9&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const i=this._register((0,q.bW)());this._prevBtn=this._register(new Ue({label:we+this._keybindingLabelFor(W.PreviousMatchFindAction),icon:me,hoverDelegate:i,onTrigger:()=>{(0,ce.eU)(this._codeEditor.getAction(W.PreviousMatchFindAction)).run().then(void 0,te.dz)}},this._hoverService)),this._nextBtn=this._register(new Ue({label:Ce+this._keybindingLabelFor(W.NextMatchFindAction),icon:_e,hoverDelegate:i,onTrigger:()=>{(0,ce.eU)(this._codeEditor.getAction(W.NextMatchFindAction)).run().then(void 0,te.dz)}},this._hoverService));const n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);const o=document.createElement("div");o.className="find-actions",n.appendChild(o),o.appendChild(this._matchesCount),o.appendChild(this._prevBtn.domNode),o.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new X.l({icon:ge,title:Se+this._keybindingLabelFor(W.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:i,inputActiveOptionBackground:(0,_.GuP)(_.c1f),inputActiveOptionBorder:(0,_.GuP)(_.uNK),inputActiveOptionForeground:(0,_.GuP)(_.$$0)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),o.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Ue({label:ke+this._keybindingLabelFor(W.CloseFindWidgetCommand),icon:re.$_,hoverDelegate:i,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new oe._Q(null,void 0,{label:xe,placeholder:Ee,appendPreserveCaseLabel:this._keybindingLabelFor(W.TogglePreserveCaseCommand),history:[],flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showHistoryHint:()=>se(this._keybindingService),inputBoxStyles:de.ho,toggleStyles:de.mk},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())})));const s=this._register((0,q.bW)());this._replaceBtn=this._register(new Ue({label:Le+this._keybindingLabelFor(W.ReplaceOneAction),icon:pe,hoverDelegate:s,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new Ue({label:Te+this._keybindingLabelFor(W.ReplaceAllAction),icon:fe,hoverDelegate:s,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const r=document.createElement("div");r.className="replace-part",r.appendChild(this._replaceInput.domNode);const a=document.createElement("div");a.className="replace-actions",r.appendChild(a),a.appendChild(this._replaceBtn.domNode),a.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Ue({label:Ie,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=z.Tr(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=ve,this._domNode.role="dialog",this._domNode.style.width=`${Ae}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(r),this._resizeSash=this._register(new J.m(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let l=Ae;this._register(this._resizeSash.onDidStart((()=>{l=z.Tr(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=l+e.startX-e.currentX;if(ti||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=z.Tr(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=z.Tr(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown?.(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...ae.L.asClassNameArray(ue)),this._domNode.classList.add(...ae.L.asClassNameArray(he))):(this._domNode.classList.remove(...ae.L.asClassNameArray(he)),this._domNode.classList.add(...ae.L.asClassNameArray(ue)))}}(0,v.zy)(((e,t)=>{const i=e.getColor(_.ECk);i&&t.addRule(`.monaco-editor .findMatch { border: 1px ${(0,le.Bb)(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`);const n=e.getColor(_.S5J);n&&t.addRule(`.monaco-editor .findScope { border: 1px ${(0,le.Bb)(e.type)?"dashed":"solid"} ${n}; }`);const o=e.getColor(_.b1q);o&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${o}; }`);const s=e.getColor(_.f3U);s&&t.addRule(`.monaco-editor .findMatchInline { color: ${s}; }`);const r=e.getColor(_.p8Y);r&&t.addRule(`.monaco-editor .currentFindMatchInline { color: ${r}; }`)}));var $e,qe=i(6330),Ke=i(28753),Ge=i(46403),Qe=i(13046),Ye=i(95062),Ze=i(3874),Xe=i(94216),Je=i(41187),et=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},tt=function(e,t){return function(i,n){t(i,n,e)}};const it=524288;function nt(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!N.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.bm(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const i={...t,isRevealed:!0};if("single"===e.seedSearchStringFromSelection){const t=nt(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=s.bm(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=nt(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new j(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._editor.getModel()?.isTooLargeForHeapOperation()?(this._notificationService.warn(ne.kg("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0))}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};ot=$e=et([tt(1,R.fN),tt(2,Xe.CS),tt(3,Ke.h),tt(4,Ye.Ot),tt(5,Je.TN)],ot);let st=class extends ot{constructor(e,t,i,n,o,s,r,a,l){super(e,i,r,a,s,l),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":{const e=!!i&&i.startLineNumber!==i.endLineNumber;n=e;break}default:break}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new ze(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new K(this._editor,this._state,this._keybindingService))}};st=et([tt(1,Ge.l),tt(2,R.fN),tt(3,Qe.b),tt(4,v.Gy),tt(5,Ye.Ot),tt(6,Xe.CS),tt(7,Ke.h),tt(8,Je.TN)],st);const rt=(0,r.gW)(new r.PF({id:W.StartFindAction,label:ne.kg("startFindAction","Find"),alias:"Find",precondition:R.M$.or(l.R.focus,R.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:qe.D8.MenubarEditMenu,group:"3_find",title:ne.kg({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));rt.addImplementation(0,((e,t,i)=>{const n=ot.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})}));const at={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class lt extends r.ks{constructor(){super({id:W.StartFindWithArgs,label:ne.kg("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:at})}async run(e,t,i){const n=ot.get(t);if(n){const e=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:i?.findInSelection||!1,loop:t.getOption(41).loop},e),n.setGlobalBufferTerm(n.getState().searchString)}}}class ct extends r.ks{constructor(){super({id:W.StartFindWithSelection,label:ne.kg("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=ot.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}class dt extends r.ks{async run(e,t){const i=ot.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===i.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class ut extends dt{constructor(){super({id:W.NextMatchFindAction,label:ne.kg("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.R.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:R.M$.and(l.R.focus,N),primary:3,weight:100}]})}_run(e){const t=e.moveToNextMatch();return!!t&&(e.editor.pushUndoStop(),!0)}}class ht extends dt{constructor(){super({id:W.PreviousMatchFindAction,label:ne.kg("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.R.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:R.M$.and(l.R.focus,N),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class gt extends r.ks{constructor(){super({id:W.GoToMatchFindAction,label:ne.kg("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:D}),this._highlightDecorations=[]}run(e,t,i){const n=ot.get(t);if(!n)return;const s=n.getState().matchesCount;if(s<1){const t=e.get(Ye.Ot);return void t.notify({severity:Ye.AI.Warning,message:ne.kg("findMatchAction.noResults","No matches. Try searching for something else.")})}const r=e.get(Ze.GK),a=new o.Cm,l=a.add(r.createInputBox());l.placeholder=ne.kg("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",s);const c=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},d=e=>{const i=c(e);if("number"===typeof i){l.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else l.validationMessage=ne.kg("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};a.add(l.onDidChangeValue((e=>{d(e)}))),a.add(l.onDidAccept((()=>{const e=c(l.value);"number"===typeof e?(n.goToMatch(e),l.hide()):l.validationMessage=ne.kg("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)}))),a.add(l.onDidHide((()=>{this.clearDecorations(t),a.dispose()}))),l.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,v.Yf)(a.vp),position:c.A5.Full}}}])}))}}class pt extends r.ks{async run(e,t){const i=ot.get(t);if(!i)return;const n=nt(t,"single",!1);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class ft extends pt{constructor(){super({id:W.NextSelectionMatchFindAction,label:ne.kg("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.R.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class mt extends pt{constructor(){super({id:W.PreviousSelectionMatchFindAction,label:ne.kg("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.R.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const _t=(0,r.gW)(new r.PF({id:W.StartFindReplaceAction,label:ne.kg("startReplace","Replace"),alias:"Replace",precondition:R.M$.or(l.R.focus,R.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:qe.D8.MenubarEditMenu,group:"3_find",title:ne.kg({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));_t.addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(92))return!1;const n=ot.get(t);if(!n)return!1;const o=t.getSelection(),s=n.isFindInputFocused(),r=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&"never"!==t.getOption(41).seedSearchStringFromSelection&&!s,a=s||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(41).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})})),(0,r.HW)(ot.ID,st,0),(0,r.Fl)(lt),(0,r.Fl)(ct),(0,r.Fl)(ut),(0,r.Fl)(ht),(0,r.Fl)(gt),(0,r.Fl)(ft),(0,r.Fl)(mt);const vt=r.DX.bindToContribution(ot.get);(0,r.E_)(new vt({id:W.CloseFindWidgetCommand,precondition:D,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:R.M$.and(l.R.focus,R.M$.not("isComposing")),primary:9,secondary:[1033]}})),(0,r.E_)(new vt({id:W.ToggleCaseSensitiveCommand,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,r.E_)(new vt({id:W.ToggleWholeWordCommand,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,r.E_)(new vt({id:W.ToggleRegexCommand,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:M.primary,mac:M.mac,win:M.win,linux:M.linux}})),(0,r.E_)(new vt({id:W.ToggleSearchScopeCommand,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),(0,r.E_)(new vt({id:W.TogglePreserveCaseCommand,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:B.primary,mac:B.mac,win:B.win,linux:B.linux}})),(0,r.E_)(new vt({id:W.ReplaceOneAction,precondition:D,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:3094}})),(0,r.E_)(new vt({id:W.ReplaceOneAction,precondition:D,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:R.M$.and(l.R.focus,A),primary:3}})),(0,r.E_)(new vt({id:W.ReplaceAllAction,precondition:D,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:2563}})),(0,r.E_)(new vt({id:W.ReplaceAllAction,precondition:D,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:R.M$.and(l.R.focus,A),primary:void 0,mac:{primary:2051}}})),(0,r.E_)(new vt({id:W.SelectAllMatchesAction,precondition:D,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:515}}))},23358:(e,t,i)=>{"use strict";i.d(t,{WR:()=>V,BP:()=>j});var n=i(9659),o=i(67792),s=i(14396),r=i(91348),a=i(5091),l=i(20601),c=i(50322),d=i(71203),u=i(16259),h=i(57479),g=i(35350),p=i(50395),f=i(17662),m=i(43654),_=i(40231),v=i(8690),b=i(36627);class y{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new _.vl,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==(0,b.W)(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,o=Number.MAX_VALUE,s=-1;const r=this._foldingModel.regions;for(;i0}isHidden(e){return null!==C(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const o=e=>(n&&w(e,n)||(n=C(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let s=0,r=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function w(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}function C(e,t){const i=(0,m.hw)(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}var S,k=i(8568),x=i(41337),E=i(18904),L=i(45292),T=i(4989),I=i(13387),R=i(95062),D=i(85983),N=i(84240),A=i(12847),O=i(72786),P=i(29133),M=i(69361),F=i(32828),B=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},W=function(e,t){return function(i,n){t(i,n,e)}};const H=new E.N1("foldingEnabled",!1);let V=class extends a.jG{static{S=this}static{this.ID="editor.contrib.folding"}static get(e){return e.getContribution(S.ID)}static getFoldingRangeProviders(e,t){const i=e.foldingRangeProvider.ordered(t);return S._foldingRangeSelector?.(i,t)??i}constructor(e,t,i,n,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=s,this.localToDispose=this._register(new a.Cm),this.editor=e,this._foldingLimitReporter=new j(e);const r=this.editor.getOptions();this._isEnabled=r.get(43),this._useFoldingProviders="indentation"!==r.get(44),this._unfoldOnClickAfterEndOfLine=r.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=r.get(46),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new L.rv(e),this.foldingDecorationProvider.showFoldingControls=r.get(111),this.foldingDecorationProvider.showFoldingHighlights=r.get(45),this.foldingEnabled=H.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(47)&&this.onModelChanged(),e.hasChanged(111)||e.hasChanged(45)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(111),this.foldingDecorationProvider.showFoldingHighlights=e.get(45),this.triggerFoldingModelChanged()}e.hasChanged(44)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(44),this.onFoldingStrategyChanged()),e.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),e.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new f.pN(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new y(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new n.ve(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new n.uC((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new k.hW(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=S.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new I.M(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){this.hiddenRangeModel?.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new N.W,i=this.getRangeProvider(e.textModel),o=this.foldingRegionPromise=(0,n.SS)((e=>i.compute(e)));return o.then((i=>{if(i&&o===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(g.lO.Imports.value,!0);e&&(n=d.D.capture(this.editor),this._currentModelHasFoldedImports=e)}const o=this.editor.getSelections();e.update(i,U(o)),n?.restore(this.editor);const s=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=s)}return e}))})).then(void 0,(e=>((0,s.dz)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,s.dz)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft,o=t.offsetX-n;if(o<4)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()){const t=e.target.detail;if(!t.isAfterLines)break}return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}const s=t.getRegionAtLine(i);if(s&&s.startLineNumber===i){const o=s.isCollapsed;if(n||o){const n=e.event.altKey;let r=[];if(n){const e=e=>!e.containedBy(s)&&!s.containedBy(e),i=t.getRegionsInside(null,e);for(const t of i)t.isCollapsed&&r.push(t);0===r.length&&(r=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(s))e.isCollapsed===o&&r.push(e);!o&&i&&0!==r.length||r.push(s)}t.toggleCollapseState(r),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};V=S=B([W(1,E.fN),W(2,p.JZ),W(3,R.Ot),W(4,D.ILanguageFeatureDebounceService),W(5,A.ILanguageFeaturesService)],V);class j{constructor(e){this.editor=e,this._onDidChange=new _.vl,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class z extends u.ks{runEditorCommand(e,t,i){const n=e.get(p.JZ),o=V.get(t);if(!o)return;const s=o.getFoldingModel();return s?(this.reportTelemetry(e,t),s.then((e=>{if(e){this.invoke(o,e,t,i,n);const s=t.getSelection();s&&o.reveal(s.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function U(e){return e&&0!==e.length?{startsInside(t,i){for(const n of e){const e=n.startLineNumber;if(e>=t&&e<=i)return!0}return!1}}:{startsInside:()=>!1}}function $(e){if(!c.b0(e)){if(!c.Gv(e))return!1;const t=e;if(!c.b0(t.levels)&&!c.Et(t.levels))return!1;if(!c.b0(t.direction)&&!c.Kg(t.direction))return!1;if(!c.b0(t.selectionLines)&&(!Array.isArray(t.selectionLines)||!t.selectionLines.every(c.Et)))return!1}return!0}class q extends z{constructor(){super({id:"editor.unfold",label:x.kg("unfoldAction.label","Unfold"),alias:"Unfold",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:$,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=n&&n.levels||1,s=this.getLineNumbers(n,i);n&&"up"===n.direction?(0,f.dN)(t,!1,o,s):(0,f.uV)(t,!1,o,s)}}class K extends z{constructor(){super({id:"editor.unfoldRecursively",label:x.kg("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2142),weight:100}})}invoke(e,t,i,n){(0,f.uV)(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class G extends z{constructor(){super({id:"editor.fold",label:x.kg("foldAction.label","Fold"),alias:"Fold",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:$,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=this.getLineNumbers(n,i),s=n&&n.levels,r=n&&n.direction;"number"!==typeof s&&"string"!==typeof r?(0,f.W8)(t,!0,o):"up"===r?(0,f.dN)(t,!0,s||1,o):(0,f.uV)(t,!0,s||1,o)}}class Q extends z{constructor(){super({id:"editor.toggleFold",label:x.kg("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.bC)(t,1,n)}}class Y extends z{constructor(){super({id:"editor.foldRecursively",label:x.kg("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.uV)(t,!0,Number.MAX_VALUE,n)}}class Z extends z{constructor(){super({id:"editor.toggleFoldRecursively",label:x.kg("toggleFoldRecursivelyAction.label","Toggle Fold Recursively"),alias:"Toggle Fold Recursively",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,3114),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.bC)(t,Number.MAX_VALUE,n)}}class X extends z{constructor(){super({id:"editor.foldAllBlockComments",label:x.kg("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2138),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).comments;if(n&&n.blockCommentStartToken){const e=new RegExp("^\\s*"+(0,l.bm)(n.blockCommentStartToken));(0,f.AI)(t,e,!0)}}}}class J extends z{constructor(){super({id:"editor.foldAllMarkerRegions",label:x.kg("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2077),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,f.AI)(t,e,!0)}}}}class ee extends z{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:x.kg("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2078),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,f.AI)(t,e,!1)}}}}class te extends z{constructor(){super({id:"editor.foldAllExcept",label:x.kg("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.GR)(t,!0,n)}}class ie extends z{constructor(){super({id:"editor.unfoldAllExcept",label:x.kg("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.GR)(t,!1,n)}}class ne extends z{constructor(){super({id:"editor.foldAll",label:x.kg("foldAllAction.label","Fold All"),alias:"Fold All",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2069),weight:100}})}invoke(e,t,i){(0,f.uV)(t,!0)}}class oe extends z{constructor(){super({id:"editor.unfoldAll",label:x.kg("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2088),weight:100}})}invoke(e,t,i){(0,f.uV)(t,!1)}}class se extends z{static{this.ID_PREFIX="editor.foldLevel"}static{this.ID=e=>se.ID_PREFIX+e}getFoldingLevel(){return parseInt(this.id.substr(se.ID_PREFIX.length))}invoke(e,t,i){(0,f.sO)(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}class re extends z{constructor(){super({id:"editor.gotoParentFold",label:x.kg("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.kK)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}class ae extends z{constructor(){super({id:"editor.gotoPreviousFold",label:x.kg("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.JX)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}class le extends z{constructor(){super({id:"editor.gotoNextFold",label:x.kg("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.pr)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}class ce extends z{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:x.kg("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2135),weight:100}})}invoke(e,t,i){const n=[],o=i.getSelections();if(o){for(const e of o){let t=e.endLineNumber;1===e.endColumn&&--t,t>e.startLineNumber&&(n.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(n.length>0){n.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=T.tz.sanitizeAndMerge(t.regions,n,i.getModel()?.getLineCount());t.updatePost(T.tz.fromFoldRanges(e))}}}}class de extends z{constructor(){super({id:"editor.removeManualFoldingRanges",label:x.kg("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}}(0,u.HW)(V.ID,V,0),(0,u.Fl)(q),(0,u.Fl)(K),(0,u.Fl)(G),(0,u.Fl)(Y),(0,u.Fl)(Z),(0,u.Fl)(ne),(0,u.Fl)(oe),(0,u.Fl)(X),(0,u.Fl)(J),(0,u.Fl)(ee),(0,u.Fl)(te),(0,u.Fl)(ie),(0,u.Fl)(Q),(0,u.Fl)(re),(0,u.Fl)(ae),(0,u.Fl)(le),(0,u.Fl)(ce),(0,u.Fl)(de);for(let ue=1;ue<=7;ue++)(0,u.xX)(new se({id:se.ID(ue),label:x.kg("foldLevelAction.label","Fold Level {0}",ue),alias:`Fold Level ${ue}`,precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2048|21+ue),weight:100}}));O.w.registerCommand("_executeFoldingRangeProvider",(async function(e,...t){const[i]=t;if(!(i instanceof P.r))throw(0,s.Qg)();const n=e.get(A.ILanguageFeaturesService),r=e.get(M.IModelService).getModel(i);if(!r)throw(0,s.Qg)();const a=e.get(F.pG);if(!a.getValue("editor.folding",{resource:i}))return[];const l=e.get(p.JZ),c=a.getValue("editor.foldingStrategy",{resource:i}),d={get limit(){return a.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},u=new k.hW(r,l,d);let h=u;if("indentation"!==c){const e=V.getFoldingRangeProviders(n,r);e.length&&(h=new I.M(r,e,(()=>{}),d,u))}const f=await h.compute(o.XO.None),m=[];try{if(f)for(let e=0;e{"use strict";i.d(t,{E0:()=>u,k0:()=>h,rv:()=>v});var n=i(25923),o=i(35037),s=i(41337),r=i(66344),a=i(48401),l=i(15911),c=i(23740);const d=(0,r.x1A)("editor.foldBackground",{light:(0,r.JO0)(r.seu,.3),dark:(0,r.JO0)(r.seu,.3),hcDark:null,hcLight:null},(0,s.kg)("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);(0,r.x1A)("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},(0,s.kg)("collapsedTextColor","Color of the collapsed text after the first line of a folded range.")),(0,r.x1A)("editorGutter.foldingControlForeground",r.t4B,(0,s.kg)("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const u=(0,a.pU)("folding-expanded",n.W.chevronDown,(0,s.kg)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),h=(0,a.pU)("folding-collapsed",n.W.chevronRight,(0,s.kg)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),g=(0,a.pU)("folding-manual-collapsed",h,(0,s.kg)("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),p=(0,a.pU)("folding-manual-expanded",u,(0,s.kg)("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),f={color:(0,l.Yf)(d),position:1},m=(0,s.kg)("linesCollapsed","Click to expand the range."),_=(0,s.kg)("linesExpanded","Click to collapse the range.");class v{static{this.COLLAPSED_VISUAL_DECORATION=o.kI.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:m,firstLineDecorationClassName:c.L.asClassName(h)})}static{this.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=o.kI.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:m,firstLineDecorationClassName:c.L.asClassName(h)})}static{this.MANUALLY_COLLAPSED_VISUAL_DECORATION=o.kI.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:m,firstLineDecorationClassName:c.L.asClassName(g)})}static{this.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=o.kI.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:m,firstLineDecorationClassName:c.L.asClassName(g)})}static{this.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=o.kI.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:m})}static{this.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=o.kI.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:m})}static{this.EXPANDED_VISUAL_DECORATION=o.kI.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+c.L.asClassName(u),linesDecorationsTooltip:_})}static{this.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=o.kI.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:c.L.asClassName(u),linesDecorationsTooltip:_})}static{this.MANUALLY_EXPANDED_VISUAL_DECORATION=o.kI.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+c.L.asClassName(p),linesDecorationsTooltip:_})}static{this.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=o.kI.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:c.L.asClassName(p),linesDecorationsTooltip:_})}static{this.NO_CONTROLS_EXPANDED_RANGE_DECORATION=o.kI.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0})}static{this.HIDDEN_RANGE_DECORATION=o.kI.register({description:"folding-hidden-range-decoration",stickiness:1})}constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?v.HIDDEN_RANGE_DECORATION:"never"===this.showFoldingControls?e?this.showFoldingHighlights?v.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:v.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:v.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?v.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:v.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?v.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:v.COLLAPSED_VISUAL_DECORATION:"mouseover"===this.showFoldingControls?i?v.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:v.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?v.MANUALLY_EXPANDED_VISUAL_DECORATION:v.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}},17662:(e,t,i)=>{"use strict";i.d(t,{AI:()=>g,GR:()=>h,JX:()=>m,W8:()=>d,bC:()=>a,cL:()=>p,dN:()=>c,kK:()=>f,pN:()=>r,pr:()=>_,sO:()=>u,uV:()=>l});var n=i(40231),o=i(4989),s=i(65647);class r{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new n.vl,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new o.tz(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,s=-1;const r=e=>{while(ns&&(s=e),n++}};for(const a of e){const e=a.regionIndex,i=this._editorDecorationIds[e];if(i&&!t[i]){t[i]=!0,r(e);const n=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,n),o=Math.max(o,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let n=0;ni&&(i=s)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){const t=[];for(let i=0,n=this._regions.length;i=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>i)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:s})}return t.length>0?t:void 0}applyMemento(e){if(!Array.isArray(e))return;const t=[],i=this._textModel.getLineCount();for(const o of e){if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>i)continue;const e=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);o.checksum&&e!==o.checksum||t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,type:void 0,isCollapsed:o.isCollapsed??!0,source:o.source??0})}const n=o.tz.sanitizeAndMerge(this._regions,t,i);this.updatePost(o.tz.fromFoldRanges(n))}_getLinesChecksum(e,t){const i=(0,s.tW)(this._textModel.getLineContent(e)+this._textModel.getLineContent(t));return i%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),o=1;while(n>=0){const e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let s=n,r=this._regions.length;s0&&!n.containedBy(e[e.length-1]))e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let s=n,r=this._regions.length;s1){const s=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==o&&i0)for(const s of n){const n=e.getRegionAtLine(s);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){const s=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function d(e,t,i){const n=[];for(const o of i){const i=e.getAllRegionsAtLine(o,(e=>e.isCollapsed!==t));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}function u(e,t,i,n){const o=(e,o)=>o===t&&e.isCollapsed!==i&&!n.some((t=>e.containsLine(t))),s=e.getRegionsInside(null,o);e.toggleCollapseState(s)}function h(e,t,i){const n=[];for(const r of i){const t=e.getAllRegionsAtLine(r,void 0);t.length>0&&n.push(t[0])}const o=e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t,s=e.getRegionsInside(null,o);e.toggleCollapseState(s)}function g(e,t,i){const n=e.textModel,o=e.regions,s=[];for(let r=o.length-1;r>=0;r--)if(i!==o.isCollapsed(r)){const e=o.getStartLineNumber(r);t.test(n.getLineContent(e))&&s.push(o.toRegion(r))}e.toggleCollapseState(s)}function p(e,t,i){const n=e.regions,o=[];for(let s=n.length-1;s>=0;s--)i!==n.isCollapsed(s)&&t===n.getType(s)&&o.push(n.toRegion(s));e.toggleCollapseState(o)}function f(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}function m(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));while(null!==i){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0){i=t.regions.toRegion(t.regions.length-1);while(null!==i){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}}return null}function _(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}while(null!==i){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0){i=t.regions.toRegion(0);while(null!==i){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex{"use strict";i.d(t,{tz:()=>l,yy:()=>s});const n={[0]:" ",[1]:"u",[2]:"r"},o=65535,s=16777215,r=4278190080;class a{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return 0!==(this._states[t]&1<o)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new a(e.length),this._userDefinedStates=new a(e.length),this._recoveredStates=new a(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;is||o>s)throw new Error("startLineNumber or endLineNumber must not exceed "+s);while(e.length>0&&!t(n,o))e.pop();const r=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&r)<<24),this._endIndexes[i]=o+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&s}getEndLineNumber(e){return this._endIndexes[e]&s}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&r)>>>16);return t===o?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;while(t=0){const i=this.getEndLineNumber(t);if(i>=e)return t;t=this.getParentIndex(t);while(-1!==t){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(e)?i=>ii=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(1===d.source?e=d:(e=c,e.isCollapsed=d.isCollapsed&&(c.endLineNumber===d.endLineNumber||!n?.startsInside(c.startLineNumber+1,c.endLineNumber+1)),e.source=0),c=s(++a)):(e=d,d.isCollapsed&&0===d.source&&(e.source=2)),d=r(++l);else{let t=l,i=d;while(1){if(!i||i.startLineNumber>c.endLineNumber){e=c;break}if(1===i.source&&i.endLineNumber>c.endLineNumber)break;i=r(++t)}c=s(++a)}if(e){while(h&&h.endLineNumbere.startLineNumber&&e.startLineNumber>g&&e.endLineNumber<=i&&(!h||h.endLineNumber>=e.endLineNumber)&&(p.push(e),g=e.startLineNumber,h&&u.push(h),h=e)}}return p}}class c{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}},8568:(e,t,i)=>{"use strict";i.d(t,{hW:()=>a});var n=i(47172),o=i(4989);const s=5e3,r="indent";class a{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id=r}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(d(this.editorModel,i,n,this.foldingRangesLimit))}}class l{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>o.yy||t>o.yy)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new o.tz(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,s=this._indentOccurrences.length;for(let e=0;et){s=e;break}i+=n}}const r=e.getOptions().tabSize,a=new Uint32Array(t),l=new Uint32Array(t);for(let o=this._length-1,c=0;o>=0;o--){const d=this._startIndexes[o],u=e.getLineContent(d),h=(0,n.G)(u,r);(h{}};function d(e,t,i,o=c){const s=e.getOptions().tabSize,r=new l(o);let a;i&&(a=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const d=[],u=e.getLineCount()+1;d.push({indent:-1,endAbove:u,line:u});for(let l=e.getLineCount();l>0;l--){const i=e.getLineContent(l),o=(0,n.G)(i,s);let c,u=d[d.length-1];if(-1!==o){if(a&&(c=i.match(a))){if(!c[1]){d.push({indent:-2,endAbove:l,line:l});continue}{let e=d.length-1;while(e>0&&-2!==d[e].indent)e--;if(e>0){d.length=e+1,u=d[e],r.insertFirst(l,u.line,o),u.line=l,u.indent=o,u.endAbove=l;continue}}}if(u.indent>o){do{d.pop(),u=d[d.length-1]}while(u.indent>o);const e=u.endAbove-1;e-l>=1&&r.insertFirst(l,e,o)}u.indent===o?u.endAbove=l:d.push({indent:o,endAbove:l,line:l})}else t&&(u.endAbove=l)}return r.toIndentRanges(e)}},13387:(e,t,i)=>{"use strict";i.d(t,{M:()=>l});var n=i(14396),o=i(5091),s=i(4989);const r={},a="syntax";class l{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id=a,this.disposables=new o.Cm,s&&this.disposables.add(s);for(const o of t)"function"===typeof o.onDidChange&&this.disposables.add(o.onDidChange(i))}compute(e){return c(this.providers,this.editorModel,e).then((t=>{if(t){const e=u(t,this.foldingRangesLimit);return e}return this.fallbackRangeProvider?.compute(e)??null}))}dispose(){this.disposables.dispose()}}function c(e,t,i){let o=null;const s=e.map(((e,s)=>Promise.resolve(e.provideFoldingRanges(t,r,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(o)||(o=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&o.push({start:t.start,end:t.end,rank:s,kind:t.kind})}}),n.M_)));return Promise.all(s).then((e=>o))}class d{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>s.yy||t>s.yy)return;const o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ie){i=s;break}t+=n}}const n=new Uint32Array(e),o=new Uint32Array(e),r=[];for(let s=0,a=0;s{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new d(t);let o;const s=[];for(const r of i)if(o){if(r.start>o.start)if(r.end<=o.end)s.push(o),o=r,n.add(r.start,r.end,r.kind&&r.kind.value,s.length);else{if(r.start>o.end){do{o=s.pop()}while(o&&r.start>o.end);o&&s.push(o),o=r}n.add(r.start,r.end,r.kind&&r.kind.value,s.length)}}else o=r,n.add(r.start,r.end,r.kind&&r.kind.value,s.length);return n.toIndentRanges()}},50239:(e,t,i)=>{"use strict";var n=i(16259),o=i(17522),s=i(41337);class r extends n.ks{constructor(){super({id:"editor.action.fontZoomIn",label:s.kg("EditorFontZoomIn.label","Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(e,t){o.D.setZoomLevel(o.D.getZoomLevel()+1)}}class a extends n.ks{constructor(){super({id:"editor.action.fontZoomOut",label:s.kg("EditorFontZoomOut.label","Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(e,t){o.D.setZoomLevel(o.D.getZoomLevel()-1)}}class l extends n.ks{constructor(){super({id:"editor.action.fontZoomReset",label:s.kg("EditorFontZoomReset.label","Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(e,t){o.D.setZoomLevel(0)}}(0,n.Fl)(r),(0,n.Fl)(a),(0,n.Fl)(l)},88996:(e,t,i)=>{"use strict";i.d(t,{Pj:()=>E,jX:()=>L,vg:()=>I,_V:()=>A});var n=i(85053),o=i(67792),s=i(14396),r=i(5837),a=i(67806),l=i(50322),c=i(29133),d=i(64339),u=i(55413),h=i(36788),g=i(8690),p=i(98581),f=i(4117),m=i(64037),_=i(98977),v=i(72786);class b{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"===typeof e?e.toLowerCase():e._lower}}class y{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(b.toKey(e))}has(e){return this._set.has(b.toKey(e))}}var w=i(87778),C=i(12847),S=i(12660),k=i(4380);function x(e,t,i){const n=[],o=new y,s=e.ordered(i);for(const a of s)n.push(a),a.extensionId&&o.add(a.extensionId);const r=t.ordered(i);for(const a of r){if(a.extensionId){if(o.has(a.extensionId))continue;o.add(a.extensionId)}n.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(e,t,i){return a.provideDocumentRangeFormattingEdits(e,e.getFullModelRange(),t,i)}})}return n}class E{static{this._selectors=new a.w}static setFormatterSelector(e){const t=E._selectors.unshift(e);return{dispose:t}}static async select(e,t,i,n){if(0===e.length)return;const o=r.f.first(E._selectors);return o?await o(e,t,i,n):void 0}}async function L(e,t,i,n,o,s,r){const a=e.get(w._Y),{documentRangeFormattingEditProvider:l}=e.get(C.ILanguageFeaturesService),c=(0,u.z9)(t)?t.getModel():t,d=l.ordered(c),h=await E.select(d,c,n,2);h&&(o.report(h),await a.invokeFunction(T,h,t,i,s,r))}async function T(e,t,i,o,s,r){const a=e.get(f.IEditorWorkerService),l=e.get(S.rr),c=e.get(k.Nt);let h,m;(0,u.z9)(i)?(h=i.getModel(),m=new d.gI(i,5,void 0,s)):(h=i,m=new d.ER(i,s));const v=[];let b=0;for(const d of(0,n._j)(o).sort(g.Q.compareRangesUsingStarts))b>0&&g.Q.areIntersectingOrTouching(v[b-1],d)?v[b-1]=g.Q.fromPositions(v[b-1].getStartPosition(),d.getEndPosition()):b=v.push(d);const y=async e=>{l.trace("[format][provideDocumentRangeFormattingEdits] (request)",t.extensionId?.value,e);const i=await t.provideDocumentRangeFormattingEdits(h,e,h.getFormattingOptions(),m.token)||[];return l.trace("[format][provideDocumentRangeFormattingEdits] (response)",t.extensionId?.value,i),i},w=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>g.Q.plusRange(e,t.range)),e[0].range);if(!t.some((e=>g.Q.intersectRanges(i,e.range))))return!1;for(const n of e)for(const e of t)if(g.Q.intersectRanges(n.range,e.range))return!0;return!1},C=[],x=[];try{if("function"===typeof t.provideDocumentRangesFormattingEdits){l.trace("[format][provideDocumentRangeFormattingEdits] (request)",t.extensionId?.value,v);const e=await t.provideDocumentRangesFormattingEdits(h,v,h.getFormattingOptions(),m.token)||[];l.trace("[format][provideDocumentRangeFormattingEdits] (response)",t.extensionId?.value,e),x.push(e)}else{for(const e of v){if(m.token.isCancellationRequested)return!0;x.push(await y(e))}for(let e=0;e({text:e.text,range:g.Q.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.Q.areIntersectingOrTouching(i,t))return[new p.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return c.playSignal(k.Rh.format,{userGesture:r}),!0}async function I(e,t,i,n,o,s){const r=e.get(w._Y),a=e.get(C.ILanguageFeaturesService),l=(0,u.z9)(t)?t.getModel():t,c=x(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),d=await E.select(c,l,i,1);d&&(n.report(d),await r.invokeFunction(R,d,t,i,o,s))}async function R(e,t,i,n,o,s){const r=e.get(f.IEditorWorkerService),a=e.get(k.Nt);let l,c,h;(0,u.z9)(i)?(l=i.getModel(),c=new d.gI(i,5,void 0,o)):(l=i,c=new d.ER(i,o));try{const e=await t.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(h=await r.computeMoreMinimalEdits(l.uri,e),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!h||0===h.length)return!1;if((0,u.z9)(i))_.c.execute(i,h,2!==n),2!==n&&i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=h,t=new p.L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);l.pushEditOperations([t],h.map((e=>({text:e.text,range:g.Q.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.Q.areIntersectingOrTouching(i,t))return[new p.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return a.playSignal(k.Rh.format,{userGesture:s}),!0}async function D(e,t,i,o,r,a){const l=t.documentRangeFormattingEditProvider.ordered(i);for(const c of l){const t=await Promise.resolve(c.provideDocumentRangeFormattingEdits(i,o,r,a)).catch(s.M_);if((0,n.EI)(t))return await e.computeMoreMinimalEdits(i.uri,t)}}async function N(e,t,i,o,r){const a=x(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const l of a){const t=await Promise.resolve(l.provideDocumentFormattingEdits(i,o,r)).catch(s.M_);if((0,n.EI)(t))return await e.computeMoreMinimalEdits(i.uri,t)}}function A(e,t,i,n,o,r,a){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,o,r,a)).catch(s.M_).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}v.w.registerCommand("_executeFormatRangeProvider",(async function(e,...t){const[i,n,s]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(g.Q.isIRange(n));const r=e.get(m.ITextModelService),a=e.get(f.IEditorWorkerService),d=e.get(C.ILanguageFeaturesService),u=await r.createModelReference(i);try{return D(a,d,u.object.textEditorModel,g.Q.lift(n),s,o.XO.None)}finally{u.dispose()}})),v.w.registerCommand("_executeFormatDocumentProvider",(async function(e,...t){const[i,n]=t;(0,l.j)(c.r.isUri(i));const s=e.get(m.ITextModelService),r=e.get(f.IEditorWorkerService),a=e.get(C.ILanguageFeaturesService),d=await s.createModelReference(i);try{return N(r,a,d.object.textEditorModel,n,o.XO.None)}finally{d.dispose()}})),v.w.registerCommand("_executeFormatOnTypeProvider",(async function(e,...t){const[i,n,s,r]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(h.y.isIPosition(n)),(0,l.j)("string"===typeof s);const a=e.get(m.ITextModelService),d=e.get(f.IEditorWorkerService),u=e.get(C.ILanguageFeaturesService),g=await a.createModelReference(i);try{return A(d,u,g.object.textEditorModel,h.y.lift(n),s,r,o.XO.None)}finally{g.dispose()}}))},15342:(e,t,i)=>{"use strict";var n=i(85053),o=i(67792),s=i(14396),r=i(91348),a=i(5091),l=i(16259),c=i(94728),d=i(94529),u=i(8690),h=i(57479),g=i(4117),p=i(12847),f=i(88996),m=i(98977),_=i(41337),v=i(4380),b=i(72786),y=i(18904),w=i(87778),C=i(44838),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},k=function(e,t){return function(i,n){t(i,n,e)}};let x=class{static{this.ID="editor.contrib.autoFormat"}constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibilitySignalService=n,this._disposables=new a.Cm,this._sessionDisposables=new a.Cm,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(56)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new d.y;for(const n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),s=new o.Qi,r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return s.cancel(),void r.dispose();for(let t=0,n=e.changes.length;t{s.token.isCancellationRequested||(0,n.EI)(e)&&(this._accessibilitySignalService.playSignal(v.Rh.format,{userGesture:!1}),m.c.execute(this._editor,e,!0))})).finally((()=>{r.dispose()}))}};x=S([k(1,p.ILanguageFeaturesService),k(2,g.IEditorWorkerService),k(3,v.Nt)],x);let E=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.Cm,this._callOnModel=new a.Cm,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(f.jX,this.editor,e,2,C.ke.None,o.XO.None,!1).catch(s.dz))}};E=S([k(1,p.ILanguageFeaturesService),k(2,w._Y)],E);class L extends l.ks{constructor(){super({id:"editor.action.formatDocument",label:_.kg("formatDocument.label","Format Document"),alias:"Format Document",precondition:y.M$.and(h.R.notInCompositeEditor,h.R.writable,h.R.hasDocumentFormattingProvider),kbOpts:{kbExpr:h.R.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(w._Y),n=e.get(C.N8);await n.showWhile(i.invokeFunction(f.vg,t,1,C.ke.None,o.XO.None,!0),250)}}}class T extends l.ks{constructor(){super({id:"editor.action.formatSelection",label:_.kg("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:y.M$.and(h.R.writable,h.R.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2084),weight:100},contextMenuOpts:{when:h.R.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(w._Y),n=t.getModel(),s=t.getSelections().map((e=>e.isEmpty()?new u.Q(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),r=e.get(C.N8);await r.showWhile(i.invokeFunction(f.jX,t,s,1,C.ke.None,o.XO.None,!0),250)}}(0,l.HW)(x.ID,x,2),(0,l.HW)(E.ID,E,2),(0,l.Fl)(L),(0,l.Fl)(T),b.w.registerCommand("editor.action.format",(async e=>{const t=e.get(c.T).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(b.d);t.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")}))},98977:(e,t,i)=>{"use strict";i.d(t,{c:()=>r});var n=i(28346),o=i(8690),s=i(71203);class r{static _handleEolEdits(e,t){let i;const n=[];for(const o of t)"number"===typeof o.eol&&(i=o.eol),o.range&&"string"===typeof o.text&&n.push(o);return"number"===typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range),o=i.getFullModelRange();return o.equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const a=s.D.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map((e=>n.k.replace(o.Q.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",l.map((e=>n.k.replaceMove(o.Q.lift(e.range),e.text)))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},13977:(e,t,i)=>{"use strict";i.d(t,{j:()=>re,i:()=>le});var n=i(25923),o=i(5091),s=i(16259),r=i(94728),a=i(36788),l=i(8690),c=i(57479),d=i(85053),u=i(40231),h=i(67806),g=i(20601),p=i(29133),f=i(59857),m=i(87778),_=i(45658),v=i(32828),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};class w{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let C=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new u.vl,this.onDidChange=this._onDidChange.event,this._dispoables=new o.Cm,this._markers=[],this._nextIdx=-1,p.r.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=(0,g.UD)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?l.Q.compareRangesUsingStarts(e,t)||_.cj.compare(e.severity,t.severity):_.cj.compare(e.severity,t.severity)||l.Q.compareRangesUsingStarts(e,t)),i},r=()=>{this._markers=this._markerService.read({resource:p.r.isUri(e)?e:void 0,severities:_.cj.Error|_.cj.Warning|_.cj.Info}),"function"===typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(r(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new w(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,d.El)(this._markers,{resource:e.uri},((e,t)=>(0,g.UD)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let s=o;st.resource.toString()===e.toString()));if(!(i<0))for(;i=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},U=function(e,t){return function(i,n){t(i,n,e)}};class ${constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new o.Cm,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(R.b2(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new D.Se(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,o.AS)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let s=(t?.length||0)+2;o&&(s+="string"===typeof o?o.length:o.value.length);const r=(0,g.uz)(i);this._lines=r.length,this._longestLineLength=0;for(const d of r)this._longestLineLength=Math.max(d.length+s,this._longestLineLength);R.w_(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const d of r)a=document.createElement("div"),a.innerText=d,""===d&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"===typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else{this._codeLink=R.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()};const t=R.BC(this._codeLink,R.$("span"));t.innerText=o.value,e.appendChild(this._codeLink)}}if(R.w_(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,d.EI)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(67))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(50),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case _.cj.Error:t=E.kg("Error","Error");break;case _.cj.Warning:t=E.kg("Warning","Warning");break;case _.cj.Info:t=E.kg("Info","Info");break;case _.cj.Hint:t=E.kg("Hint","Hint");break}let i=E.kg("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();if(n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1){const t=n.getLineContent(e.startLineNumber);i=`${t}, ${i}`}return i}}let q=class extends O.j6{static{H=this}static{this.TitleMenu=new L.D8("gotoErrorTitleMenu")}constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new o.Cm,this._onDidSelectRelatedInformation=new u.vl,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=_.cj.Warning,this._backgroundColor=N.Q1.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(ie);let t=Y,i=Z;this._severity===_.cj.Warning?(t=X,i=J):this._severity===_.cj.Info&&(t=ee,i=te);const n=e.getColor(t),o=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor(O._X),secondaryHeadingColor:e.getColor(O.e3)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const t=[],i=this._menuService.getMenuActions(H.TitleMenu,this._contextKeyService);(0,P.Ot)(i,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=R.BC(e,R.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new $(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=l.Q.lift(e),o=this.editor.getPosition(),s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=i>1?E.kg("problems","{0} of {1} problems",t,i):E.kg("change","{0} of {1} problem",t,i);this.setTitle((0,A.P8)(r.uri),e)}this._icon.className=`codicon ${x.className(_.cj.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};q=H=z([U(1,j.Gy),U(2,F.C),U(3,L.ez),U(4,m._Y),U(5,T.fN),U(6,M.L)],q);const K=(0,V.yLr)(V.Rbi,V.AN$),G=(0,V.yLr)(V.Hng,V.Stt),Q=(0,V.yLr)(V.pOz,V.IIb),Y=(0,V.x1A)("editorMarkerNavigationError.background",{dark:K,light:K,hcDark:V.b1q,hcLight:V.b1q},E.kg("editorMarkerNavigationError","Editor marker navigation widget error color.")),Z=(0,V.x1A)("editorMarkerNavigationError.headerBackground",{dark:(0,V.JO0)(Y,.1),light:(0,V.JO0)(Y,.1),hcDark:null,hcLight:null},E.kg("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),X=(0,V.x1A)("editorMarkerNavigationWarning.background",{dark:G,light:G,hcDark:V.b1q,hcLight:V.b1q},E.kg("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),J=(0,V.x1A)("editorMarkerNavigationWarning.headerBackground",{dark:(0,V.JO0)(X,.1),light:(0,V.JO0)(X,.1),hcDark:"#0C141F",hcLight:(0,V.JO0)(X,.2)},E.kg("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ee=(0,V.x1A)("editorMarkerNavigationInfo.background",{dark:Q,light:Q,hcDark:V.b1q,hcLight:V.b1q},E.kg("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),te=(0,V.x1A)("editorMarkerNavigationInfo.headerBackground",{dark:(0,V.JO0)(ee,.1),light:(0,V.JO0)(ee,.1),hcDark:null,hcLight:null},E.kg("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),ie=(0,V.x1A)("editorMarkerNavigation.background",V.YtV,E.kg("editorMarkerNavigationBackground","Editor marker navigation widget background."));var ne,oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},se=function(e,t){return function(i,n){t(i,n,e)}};let re=class{static{ne=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(ne.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new o.Cm,this._editor=e,this._widgetVisible=he.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(q,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{this._model?.selected&&l.Q.containsPosition(this._model?.selected.marker,e.position)||this._model?.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.Q.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.y(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){if(this._editor.hasModel()){const i=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(i.move(e,this._editor.getModel(),this._editor.getPosition()),!i.selected)return;if(i.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const n=await this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);n&&(ne.get(n)?.close(),ne.get(n)?.nagivate(e,t))}else this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}};re=ne=oe([se(1,S),se(2,T.fN),se(3,r.T),se(4,m._Y)],re);class ae extends s.ks{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&re.get(t)?.nagivate(this._next,this._multiFile)}}class le extends ae{static{this.ID="editor.action.marker.next"}static{this.LABEL=E.kg("markerAction.next.label","Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:le.ID,label:le.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:578,weight:100},menuOpts:{menuId:q.TitleMenu,title:le.LABEL,icon:(0,I.pU)("marker-navigation-next",n.W.arrowDown,E.kg("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}class ce extends ae{static{this.ID="editor.action.marker.prev"}static{this.LABEL=E.kg("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:ce.ID,label:ce.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:1602,weight:100},menuOpts:{menuId:q.TitleMenu,title:ce.LABEL,icon:(0,I.pU)("marker-navigation-previous",n.W.arrowUp,E.kg("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}class de extends ae{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:E.kg("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:66,weight:100},menuOpts:{menuId:L.D8.MenubarGoMenu,title:E.kg({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class ue extends ae{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:E.kg("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:1090,weight:100},menuOpts:{menuId:L.D8.MenubarGoMenu,title:E.kg({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}(0,s.HW)(re.ID,re,4),(0,s.Fl)(le),(0,s.Fl)(ce),(0,s.Fl)(de),(0,s.Fl)(ue);const he=new T.N1("markersNavigationVisible",!1),ge=s.DX.bindToContribution(re.get);(0,s.E_)(new ge({id:"closeMarkersNavigation",precondition:he,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:c.R.focus,primary:9,secondary:[1033]}}))},3815:(e,t,i)=>{"use strict";i.d(t,{mR:()=>q,bn:()=>$,QS:()=>U});var n=i(19950),o=i(9659),s=i(91348),r=i(50322),a=i(29133),l=i(64339),c=i(55413),d=i(16259),u=i(94728),h=i(50576),g=i(36788),p=i(8690),f=i(57479),m=i(35350),_=i(12443),v=i(30667),b=i(40231),y=i(5091),w=i(84366),C=i(41337),S=i(18904),k=i(59857),x=i(87778),E=i(13046),L=i(78386),T=i(95062),I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};const D=new S.N1("hasSymbols",!1,(0,C.kg)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),N=(0,x.u1)("ISymbolNavigationService");let A=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=D.bindTo(e)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new O(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const a of t.references)if((0,w.n4)(a.uri,n.uri))s=!0,r=r||p.Q.containsPosition(a.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=(0,y.qE)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:p.Q.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){this._currentMessage?.dispose();const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?(0,C.kg)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):(0,C.kg)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};A=I([R(0,S.fN),R(1,u.T),R(2,T.Ot),R(3,E.b)],A),(0,k.v)(N,A,1),(0,d.E_)(new class extends d.DX{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:D,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(N).revealNext(t)}}),L.f.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:D,primary:9,handler(e){e.get(N).reset()}});let O=class{constructor(e){this._listener=new Map,this._disposables=new y.Cm,this._onDidChange=new b.vl,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,y.AS)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,y.qE)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){this._listener.get(e)?.dispose(),this._listener.delete(e)}};O=I([R(0,u.T)],O);var P=i(61307),M=i(55571),F=i(6330),B=i(72786),W=i(44838),H=i(85901),V=i(12847),j=i(5837),z=i(5045);F.ZG.appendMenuItem(F.D8.EditorContext,{submenu:F.D8.EditorContextPeek,title:C.kg("peek.submenu","Peek"),group:"navigation",order:100});class U{static is(e){return!(!e||"object"!==typeof e)&&(e instanceof U||!(!g.y.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class $ extends d.qO{static{this._allSymbolNavigationCommands=new Map}static{this._activeAlternativeCommands=new Set}static all(){return $._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of j.f.wrap(t.menu))i.id!==F.D8.EditorContext&&i.id!==F.D8.EditorContextPeek||(i.when=S.M$.and(e.precondition,i.when));return t}constructor(e,t){super($._patchConfig(t)),this.configuration=e,$._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,s){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(T.Ot),a=e.get(u.T),c=e.get(W.N8),d=e.get(N),h=e.get(V.ILanguageFeaturesService),g=e.get(x._Y),p=t.getModel(),f=t.getPosition(),m=U.is(i)?i:new U(p,f),_=new l.gI(t,5),v=(0,o.PK)(this._getLocationModel(h,m.model,m.position,_.token),_.token).then((async e=>{if(!e||_.token.isCancellationRequested)return;let o;if((0,n.xE)(e.ariaMessage),e.referenceAt(p.uri,f)){const e=this._getAlternativeCommand(t);!$._activeAlternativeCommands.has(e)&&$._allSymbolNavigationCommands.has(e)&&(o=$._allSymbolNavigationCommands.get(e))}const r=e.references.length;if(0===r){if(!this.configuration.muteMessage){const e=p.getWordAtPosition(f);P.k.get(t)?.showMessage(this._getNoResultFoundMessage(e),f)}}else{if(1!==r||!o)return this._onResult(a,d,t,e,s);$._activeAlternativeCommands.add(this.desc.id),g.invokeFunction((e=>o.runEditorCommand(e,t,i,s).finally((()=>{$._activeAlternativeCommands.delete(this.desc.id)}))))}}),(e=>{r.error(e)})).finally((()=>{_.dispose()}));return c.showWhile(v,250),v}async _onResult(e,t,i,n,o){const s=this._getGoToPreference(i);if(i instanceof h.t||!(this.configuration.openInPeek||"peek"===s&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===s,l=await this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,o):n.dispose(),"goto"===s&&t.put(r)}else this._openInPeek(i,n,o)}async _openReference(e,t,i,n,o){let s;if((0,m.Iu)(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const r=await t.openCodeEditor({resource:i.uri,options:{selection:p.Q.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(r){if(o){const e=r.getModel(),t=r.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&t.clear()}),350)}return r}}_openInPeek(e,t,i){const n=_.X.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),(0,o.SS)((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}class q extends ${async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.hE)(e.definitionProvider,t,i,!1,n),C.kg("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?C.kg("noResultWord","No definition found for '{0}'",e.word):C.kg("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}(0,F.ug)(class e extends q{static{this.id="editor.action.revealDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{...C.aS("actions.goToDecl.label","Go to Definition"),mnemonicTitle:C.kg({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:f.R.hasDefinitionProvider,keybinding:[{when:f.R.editorTextFocus,primary:70,weight:100},{when:S.M$.and(f.R.editorTextFocus,z.W0),primary:2118,weight:100}],menu:[{id:F.D8.EditorContext,group:"navigation",order:1.1},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),B.w.registerCommandAlias("editor.action.goToDeclaration",e.id)}}),(0,F.ug)(class e extends q{static{this.id="editor.action.revealDefinitionAside"}constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,title:C.aS("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:S.M$.and(f.R.hasDefinitionProvider,f.R.isInEmbeddedEditor.toNegated()),keybinding:[{when:f.R.editorTextFocus,primary:(0,s.m5)(2089,70),weight:100},{when:S.M$.and(f.R.editorTextFocus,z.W0),primary:(0,s.m5)(2089,2118),weight:100}]}),B.w.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}),(0,F.ug)(class e extends q{static{this.id="editor.action.peekDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,title:C.aS("actions.previewDecl.label","Peek Definition"),precondition:S.M$.and(f.R.hasDefinitionProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:F.D8.EditorContextPeek,group:"peek",order:2}}),B.w.registerCommandAlias("editor.action.previewDeclaration",e.id)}});class K extends ${async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.sv)(e.declarationProvider,t,i,!1,n),C.kg("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?C.kg("decl.noResultWord","No declaration found for '{0}'",e.word):C.kg("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}(0,F.ug)(class e extends K{static{this.id="editor.action.revealDeclaration"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{...C.aS("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:C.kg({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:S.M$.and(f.R.hasDeclarationProvider,f.R.isInEmbeddedEditor.toNegated()),menu:[{id:F.D8.EditorContext,group:"navigation",order:1.3},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?C.kg("decl.noResultWord","No declaration found for '{0}'",e.word):C.kg("decl.generic.noResults","No declaration found")}}),(0,F.ug)(class extends K{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:C.aS("actions.peekDecl.label","Peek Declaration"),precondition:S.M$.and(f.R.hasDeclarationProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:3}})}});class G extends ${async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.f9)(e.typeDefinitionProvider,t,i,!1,n),C.kg("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?C.kg("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):C.kg("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}(0,F.ug)(class e extends G{static{this.ID="editor.action.goToTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{...C.aS("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:C.kg({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:f.R.hasTypeDefinitionProvider,keybinding:{when:f.R.editorTextFocus,primary:0,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.4},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}),(0,F.ug)(class e extends G{static{this.ID="editor.action.peekTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:C.aS("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:S.M$.and(f.R.hasTypeDefinitionProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:4}})}});class Q extends ${async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.eS)(e.implementationProvider,t,i,!1,n),C.kg("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?C.kg("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):C.kg("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}(0,F.ug)(class e extends Q{static{this.ID="editor.action.goToImplementation"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{...C.aS("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:C.kg({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:f.R.hasImplementationProvider,keybinding:{when:f.R.editorTextFocus,primary:2118,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.45},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}),(0,F.ug)(class e extends Q{static{this.ID="editor.action.peekImplementation"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:C.aS("actions.peekImplementation.label","Peek Implementations"),precondition:S.M$.and(f.R.hasImplementationProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:3142,weight:100},menu:{id:F.D8.EditorContextPeek,group:"peek",order:5}})}});class Y extends ${_getNoResultFoundMessage(e){return e?C.kg("references.no","No references found for '{0}'",e.word):C.kg("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}(0,F.ug)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...C.aS("goToReferences.label","Go to References"),mnemonicTitle:C.kg({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:S.M$.and(f.R.hasReferenceProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:1094,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.45},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.NN)(e.referenceProvider,t,i,!0,!1,n),C.kg("ref.title","References"))}}),(0,F.ug)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:C.aS("references.action.label","Peek References"),precondition:S.M$.and(f.R.hasReferenceProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.NN)(e.referenceProvider,t,i,!1,!1,n),C.kg("ref.title","References"))}});class Z extends ${constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:C.aS("label.generic","Go to Any Symbol"),precondition:S.M$.and(M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new v.y4(this._references,C.kg("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&C.kg("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}B.w.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.r},{name:"position",description:"The position at which to start",constraint:g.y.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(e,t,i,n,o,s,l)=>{(0,r.j)(a.r.isUri(t)),(0,r.j)(g.y.isIPosition(i)),(0,r.j)(Array.isArray(n)),(0,r.j)("undefined"===typeof o||"string"===typeof o),(0,r.j)("undefined"===typeof l||"boolean"===typeof l);const d=e.get(u.T),h=await d.openCodeEditor({resource:t},d.getFocusedCodeEditor());if((0,c.z9)(h))return h.setPosition(i),h.revealPositionInCenterIfOutsideViewport(i,0),h.invokeWithinContext((e=>{const t=new class extends Z{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(l),openToSide:!1},n,o);e.get(x._Y).invokeFunction(t.run.bind(t),h)}))}}),B.w.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.r},{name:"position",description:"The position at which to start",constraint:g.y.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(e,t,i,n,o)=>{e.get(B.d).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}}),B.w.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,r.j)(a.r.isUri(t)),(0,r.j)(g.y.isIPosition(i));const n=e.get(V.ILanguageFeaturesService),s=e.get(u.T);return s.openCodeEditor({resource:t},s.getFocusedCodeEditor()).then((e=>{if(!(0,c.z9)(e)||!e.hasModel())return;const t=_.X.get(e);if(!t)return;const s=(0,o.SS)((t=>(0,H.NN)(n.referenceProvider,e.getModel(),g.y.lift(i),!1,!1,t).then((e=>new v.y4(e,C.kg("ref.title","References")))))),r=new p.Q(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,s,!1))}))}}),B.w.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},85901:(e,t,i)=>{"use strict";i.d(t,{NN:()=>m,eS:()=>p,f9:()=>f,hE:()=>h,sv:()=>g});var n=i(85053),o=i(67792),s=i(14396),r=i(6657),a=i(16259),l=i(12847),c=i(30667);function d(e,t){return t.uri.scheme===e.uri.scheme||!(0,r.fV)(t.uri,r.ny.walkThroughSnippet,r.ny.vscodeChatCodeBlock,r.ny.vscodeChatCodeCompareBlock)}async function u(e,t,i,o,r){const a=i.ordered(e,o),l=a.map((i=>Promise.resolve(r(i,e,t)).then(void 0,(e=>{(0,s.M_)(e)})))),c=await Promise.all(l);return(0,n.Yc)(c.flat()).filter((t=>d(e,t)))}function h(e,t,i,n,o){return u(t,i,e,n,((e,t,i)=>e.provideDefinition(t,i,o)))}function g(e,t,i,n,o){return u(t,i,e,n,((e,t,i)=>e.provideDeclaration(t,i,o)))}function p(e,t,i,n,o){return u(t,i,e,n,((e,t,i)=>e.provideImplementation(t,i,o)))}function f(e,t,i,n,o){return u(t,i,e,n,((e,t,i)=>e.provideTypeDefinition(t,i,o)))}function m(e,t,i,n,o,s){return u(t,i,e,o,(async(e,t,i)=>{const o=(await e.provideReferences(t,i,{includeDeclaration:!0},s))?.filter((e=>d(t,e)));if(!n||!o||2!==o.length)return o;const r=(await e.provideReferences(t,i,{includeDeclaration:!1},s))?.filter((e=>d(t,e)));return r&&1===r.length?r:o}))}async function _(e){const t=await e(),i=new c.y4(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}(0,a.ke)("_executeDefinitionProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=h(n.definitionProvider,t,i,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeDefinitionProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=h(n.definitionProvider,t,i,!0,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeTypeDefinitionProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=f(n.typeDefinitionProvider,t,i,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeTypeDefinitionProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=f(n.typeDefinitionProvider,t,i,!0,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeDeclarationProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=g(n.declarationProvider,t,i,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeDeclarationProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=g(n.declarationProvider,t,i,!0,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeReferenceProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=m(n.referenceProvider,t,i,!1,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeReferenceProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=m(n.referenceProvider,t,i,!1,!0,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeImplementationProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=p(n.implementationProvider,t,i,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeImplementationProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=p(n.implementationProvider,t,i,!0,o.XO.None);return _((()=>s))}))},51170:(e,t,i)=>{"use strict";i.d(t,{gi:()=>u});var n=i(40231),o=i(5091),s=i(25160);function r(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=r(e.event,t.triggerModifier),this.hasSideBySideModifier=r(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=r(e,t.triggerModifier)}}class c{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function d(e){return"altKey"===e?s.zx?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):s.zx?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class u extends o.jG{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.vl),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.vl),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.vl),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=t?.extractLineNumberFromMouseEvent??(e=>e.target.position?e.target.position.lineNumber:0),this._opts=d(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(78)){const e=d(this._editor.getOption(78));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},39405:(e,t,i)=>{"use strict";i.d(t,{k:()=>S});var n,o=i(9659),s=i(14396),r=i(42325),a=i(5091),l=i(64339),c=i(16259),d=i(8690),u=i(14573),h=i(64037),g=i(51170),p=i(55571),f=i(41337),m=i(18904),_=i(3815),v=i(85901),b=i(12847),y=i(35037),w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};let S=class{static{n=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new a.Cm,this.toUnhookForKeyboard=new a.Cm,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new g.gi(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,t??void 0)}))),this.toUnhook.add(o.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{(0,s.dz)(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(o.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(n.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){this.toUnhookForKeyboard.clear();const t=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!t)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===t.startColumn&&this.currentWordAtPosition.endColumn===t.endColumn&&this.currentWordAtPosition.word===t.word)return;this.currentWordAtPosition=t;const i=new l.$t(this.editor,15);let n;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,o.SS)((t=>this.findDefinition(e,t)));try{n=await this.previousPromise}catch(c){return void(0,s.dz)(c)}if(!n||!n.length||!i.validate(this.editor))return void this.removeLinkDecorations();const a=n[0].originSelectionRange?d.Q.lift(n[0].originSelectionRange):new d.Q(e.lineNumber,t.startColumn,e.lineNumber,t.endColumn);if(n.length>1){let e=a;for(const{originSelectionRange:t}of n)t&&(e=d.Q.plusRange(e,t));this.addDecoration(e,(new r.Bc).appendText(f.kg("multipleResults","Click to show {0} definitions.",n.length)))}else{const e=n[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const o=this.getPreviewValue(i,n,e),s=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(a,o?(new r.Bc).appendCodeblock(s||"",o):void 0),t.dispose()}))}}getPreviewValue(e,t,i){let o=i.range;const s=o.endLineNumber-o.startLineNumber;s>=n.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(e,t));const r=this.stripIndentationFromPreviewRange(e,t,o);return r}stripIndentationFromPreviewRange(e,t,i){const n=e.getLineFirstNonWhitespaceColumn(t);let o=n;for(let r=t+1;r{const i=!t&&this.editor.getOption(89)&&!this.isInPeekEditor(e),n=new _.mR({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0});return n.run(e)}))}isInPeekEditor(e){const t=e.get(m.fN);return p.x2.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};S=n=w([C(1,h.ITextModelService),C(2,u.L),C(3,b.ILanguageFeaturesService)],S),(0,c.HW)(S.ID,S,2)},12443:(e,t,i)=>{"use strict";i.d(t,{X:()=>ce});var n,o=i(9659),s=i(14396),r=i(91348),a=i(5091),l=i(94728),c=i(36788),d=i(8690),u=i(55571),h=i(41337),g=i(72786),p=i(32828),f=i(18904),m=i(87778),_=i(78386),v=i(72033),b=i(95062),y=i(94216),w=i(30667),C=i(2150),S=i(90154),k=i(85476),x=i(40231),E=i(6657),L=i(84366),T=i(50576),I=i(35037),R=i(65764),D=i(64037),N=i(70604),A=i(4518),O=i(50278),P=i(10695),M=i(13046),F=i(48056),B=i(13153),W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},H=function(e,t){return function(i,n){t(i,n,e)}};let V=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof w.y4||e instanceof w.$L}getChildren(e){if(e instanceof w.y4)return e.groups;if(e instanceof w.$L)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};V=W([H(0,D.ITextModelService)],V);class j{getHeight(){return 23}getTemplateId(e){return e instanceof w.$L?q.id:G.id}}let z=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){if(e instanceof w.yc){const t=e.parent.getPreview(e)?.preview(e.range);if(t)return t.value}return(0,L.P8)(e.uri)}};z=W([H(0,M.b)],z);class U{getId(e){return e instanceof w.yc?e.id:e.uri}}let $=class extends a.jG{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new O.s(i,{supportHighlights:!0})),this.badge=new N.x(C.BC(i,C.$(".count")),{},B.m$),e.appendChild(i)}set(e,t){const i=(0,L.pD)(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat((0,h.kg)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,h.kg)("referenceCount","{0} reference",n))}};$=W([H(1,F.L)],$);let q=class{static{n=this}static{this.id="FileReferencesRenderer"}constructor(e){this._instantiationService=e,this.templateId=n.id}renderTemplate(e){return this._instantiationService.createInstance($,e)}renderElement(e,t,i){i.set(e.element,(0,P.WJ)(e.filterData))}disposeTemplate(e){e.dispose()}};q=n=W([H(0,m._Y)],q);class K extends a.jG{constructor(e){super(),this.label=this._register(new A._(e))}set(e,t){const i=e.parent.getPreview(e)?.preview(e.range);if(i&&i.value){const{value:e,highlight:n}=i;t&&!P.ne.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,P.WJ)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[n]))}else this.label.set(`${(0,L.P8)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class G{constructor(){this.templateId=G.id}static{this.id="OneReferenceRenderer"}renderTemplate(e){return new K(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}}class Q{getWidgetAriaLabel(){return(0,h.kg)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Y=i(15911),Z=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},X=function(e,t){return function(i,n){t(i,n,e)}};class J{static{this.DecorationOptions=I.kI.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"})}constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new a.Cm,this._callOnModelChange=new a.Cm,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(const t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n{const o=n.deltaDecorations([],t);for(let t=0;t{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(te,"ReferencesWidget",this._treeContainer,new j,[this._instantiationService.createInstance(q),this._instantiationService.createInstance(G)],this._instantiationService.createInstance(V),i),this._splitView.addView({onDidChange:x.Jh.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},S.X.Distribute),this._splitView.addView({onDidChange:x.Jh.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},S.X.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const n=(e,t)=>{e instanceof w.yc&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._disposables.add(this._tree.onDidOpen((e=>{e.sideBySide?n(e.element,"side"):e.editorOptions.pinned?n(e.element,"goto"):n(e.element,"show")}))),C.jD(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new C.fg(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=h.kg("noResults","No results"),C.WU(this._messageContainer),Promise.resolve(void 0)):(C.jD(this._messageContainer),this._decorationsManager=new J(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),C.WU(this._treeContainer),C.WU(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof w.yc?e:e instanceof w.$L&&e.children.length>0?e.children[0]:void 0}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==E.ny.inMemory?this.setTitle((0,L.Pi)(e.uri),this._uriLabel.getUriLabel((0,L.pD)(e.uri))):this.setTitle(h.kg("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent)),this._tree.reveal(e);const n=await i;if(!this._model)return void n.dispose();(0,a.AS)(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=d.Q.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};ie=Z([X(3,Y.Gy),X(4,D.ITextModelService),X(5,m._Y),X(6,u.zn),X(7,F.L),X(8,M.b)],ie);var ne,oe=i(57479),se=i(5045),re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};const le=new f.N1("referenceSearchVisible",!1,h.kg("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let ce=class{static{ne=this}static{this.ID="editor.contrib.referencesController"}static get(e){return e.getContribution(ne.ID)}constructor(e,t,i,n,o,s,r,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=r,this._configurationService=l,this._disposables=new a.Cm,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=le.bindTo(i)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const o="peekViewLayout",s=ee.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(ie,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(h.kg("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget?(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0);break}})));const r=++this._requestIdPool;t.then((t=>{if(r===this._requestIdPool&&this._widget)return this._model?.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(h.kg("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new c.y(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(87)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){this._editor.hasModel()&&this._model&&this._widget&&await this._widget.revealReference(e)}closeWidget(e=!0){this._widget?.dispose(),this._model?.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){this._widget?.hide(),this._ignoreModelChangeEvent=!0;const i=d.Q.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(i),this._widget.focusOnReferenceTree();else{const t=ne.get(e),n=this._model.clone();this.closeWidget(),e.focus(),t?.toggleWidget(i,(0,o.SS)((e=>Promise.resolve(n))),this._peekMode??!1)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,s.dz)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function de(e,t){const i=(0,u.RL)(e);if(!i)return;const n=ce.get(i);n&&t(n)}ce=ne=re([ae(2,f.fN),ae(3,l.T),ae(4,b.Ot),ae(5,m._Y),ae(6,y.CS),ae(7,p.pG)],ce),_.f.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,r.m5)(2089,60),when:f.M$.or(le,u.x2.inPeekEditor),handler(e){de(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),_.f.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:f.M$.or(le,u.x2.inPeekEditor),handler(e){de(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),_.f.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:f.M$.or(le,u.x2.inPeekEditor),handler(e){de(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),g.w.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),g.w.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),g.w.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),g.w.registerCommand("closeReferenceSearch",(e=>de(e,(e=>e.closeWidget())))),_.f.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:f.M$.and(u.x2.inPeekEditor,f.M$.not("config.editor.stablePeek"))}),_.f.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:f.M$.and(le,f.M$.not("config.editor.stablePeek"),f.M$.or(oe.R.editorTextFocus,se.J7.negate()))}),_.f.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:f.M$.and(le,v.YD,v.Nf.negate(),v.cH.negate()),handler(e){const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof w.yc&&de(e,(e=>e.revealReference(i[0])))}}),_.f.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:f.M$.and(le,v.YD,v.Nf.negate(),v.cH.negate()),handler(e){const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof w.yc&&de(e,(e=>e.openReference(i[0],!0,!0)))}}),g.w.registerCommand("openReference",(e=>{const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof w.yc&&de(e,(e=>e.openReference(i[0],!1,!0)))}))},30667:(e,t,i)=>{"use strict";i.d(t,{$L:()=>p,y4:()=>f,yc:()=>h});var n=i(14396),o=i(40231),s=i(23453),r=i(5091),a=i(21553),l=i(84366),c=i(20601),d=i(8690),u=i(41337);class h{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=s.r.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){const e=this.parent.getPreview(this)?.preview(this.range);return e?(0,u.kg)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",e.value,(0,l.P8)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,u.kg)("aria.oneReference","in {0} on line {1} at column {2}",(0,l.P8)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new d.Q(n,a.startColumn,n,o),c=new d.Q(s,r,s,1073741824),u=i.getValueInRange(l).replace(/^\s+/,""),h=i.getValueInRange(e),g=i.getValueInRange(c).replace(/\s+$/,"");return{value:u+h+g,highlight:{start:u.length,end:u.length+h.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.fT}dispose(){(0,r.AS)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,u.kg)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,l.P8)(this.uri),this.uri.fsPath):(0,u.kg)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,l.P8)(this.uri),this.uri.fsPath)}async resolve(e){if(0!==this._previews.size)return this;for(const i of this.children)if(!this._previews.has(i.uri))try{const t=await e.createModelReference(i.uri);this._previews.set(i.uri,new g(t))}catch(t){(0,n.dz)(t)}return this}}class f{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new o.vl,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(f._compareReferences);for(const o of e)if(n&&l.er.isEqual(n.uri,o.uri,!0)||(n=new p(this,o.uri),this.groups.push(n)),0===n.children.length||0!==f._compareReferences(o,n.children[n.children.length-1])){const e=new h(i===o,n,o,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,r.AS)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new f(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,u.kg)("aria.result.0","No results found"):1===this.references.length?(0,u.kg)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,u.kg)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,u.kg)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+10?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:c.Qp(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&d.Q.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return l.er.compare(e.uri,t.uri)||d.Q.compareRangesUsingStarts(e.range,t.range)}}},81319:(e,t,i)=>{"use strict";i.d(t,{A:()=>J});var n=i(63907),o=i(5091),s=i(87778),r=i(27982),a=i(13046),l=i(9659),c=i(74742),d=i(2150),u=i(35350),h=i(77850),g=i(38570),p=i(1606),f=i(36788);const m=30,_=24;class v extends o.jG{constructor(e,t=new d.fg(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new p.v),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=d.fg.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new d.fg(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)}))),this._register(this._resizableNode.onDidWillResize((()=>{this._isResizing=!0})))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){return this._contentPosition?.position?f.y.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=d.BK(t);return n.top+i.top-m}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=d.BK(t),o=d.tG(t.ownerDocument.body),s=n.top+i.top+i.height;return o.height-s-_}_findPositionPreference(e,t){const i=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),n=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),o=Math.min(Math.max(n,i),e),s=Math.min(e,o);let r;return r=this._editor.getOption(60).above?s<=n?1:2:s<=i?2:1,1===r?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),r}_resize(e){this._resizableNode.layout(e.height,e.width)}}var b,y=i(18904),w=i(32828),C=i(17300),S=i(57479),k=i(44726),x=i(40231),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};const T=30,I=6;let R=class extends v{static{b=this}static{this.ID="editor.contrib.resizableContentHoverWidget"}static{this._lastDimensions=new d.fg(0,0)}get isVisibleFromKeyboard(){return 1===this._renderedHover?.source}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,i,n,o){const s=e.getOption(67)+8,r=150,a=new d.fg(r,s);super(e,a),this._configurationService=i,this._accessibilityService=n,this._keybindingService=o,this._hover=this._register(new k.N4),this._onDidResize=this._register(new x.vl),this.onDidResize=this._onDidResize.event,this._minimumSize=a,this._hoverVisibleKey=S.R.hoverVisible.bindTo(t),this._hoverFocusedKey=S.R.hoverFocused.bindTo(t),d.BC(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>{this.isVisible&&this._updateMaxDimensions()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()})));const l=this._register(d.w5(this._resizableNode.domNode));this._register(l.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(l.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return b.ID}static _applyDimensions(e,t,i){const n="number"===typeof t?`${t}px`:t,o="number"===typeof i?`${i}px`:i;e.style.width=n,e.style.height=o}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return b._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return b._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"===typeof t?`${t}px`:t,o="number"===typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){b._applyMaxDimensions(this._hover.contentsDomNode,e,t),b._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"===typeof e?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new d.fg(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){b._lastDimensions=new d.fg(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){const e=this._renderedHover?.showAtPosition;if(e)return 1===this._positionPreference?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=I;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some((e=>e.scrollWidth>e.clientWidth));return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t="undefined"===typeof this._contentWidth?0:this._contentWidth-2;if(e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4)&&(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,n),!0)}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e;const n=Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code"));n.forEach((e=>this._editor.applyFontInfo(e)))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,b._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,b._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);const t=d.OK(this._hover.containerDomNode),i=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,i)??1,this.onContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const n=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode,o=n&&(0,k.vr)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");o&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+o)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new d.fg(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new d.fg(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e="undefined"===typeof this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new d.fg(e,this._minimumSize.height)}onContentsChanged(){this._removeConstraintsRenderNormally();const e=this._hover.containerDomNode;let t=d.OK(e),i=d.Tr(e);if(this._resizableNode.layout(t,i),this._setHoverWidgetDimensions(i,t),t=d.OK(e),i=d.Tr(e),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(t,i),this._renderedHover?.showAtPosition){const e=d.OK(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._renderedHover.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-T})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+T})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};function D(e,t,i,n,o,s){const r=i+o/2,a=n+s/2,l=Math.max(Math.abs(e-r)-o/2,0),c=Math.max(Math.abs(t-a)-s/2,0);return Math.sqrt(l*l+c*c)}R=b=E([L(1,y.fN),L(2,w.pG),L(3,C.j),L(4,a.b)],R);var N=i(85053);class A{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,s=e.range.endLineNumber===n?e.range.endColumn:o;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(i>t.range.startColumn||t.range.endColumn>s)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return l.AE.EMPTY;const i=A._getLineDecorations(this._editor,t);return l.AE.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):l.AE.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=A._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,N.Yc)(t)}}class O{constructor(e,t,i){this.anchor=e,this.hoverParts=t,this.isComplete=i}filter(e){const t=this.hoverParts.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.hoverParts.length?this:new P(this,this.anchor,t,this.isComplete)}}class P extends O{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}var M=i(43505),F=i(35037),B=i(8690),W=i(76035),H=i(86367),V=i(50127),j=i(14396);class z extends o.jG{constructor(e,t,i,n,o,s){super();const r=t.anchor,a=t.hoverParts;this._renderedHoverParts=this._register(new $(e,i,a,s,o));const{showAtPosition:l,showAtSecondaryPosition:c}=z.computeHoverPositions(e,r.range,a);this.shouldAppearBeforeContent=a.some((e=>e.isBeforeContent)),this.showAtPosition=l,this.showAtSecondaryPosition=c,this.initialMousePosX=r.initialMousePosX,this.initialMousePosY=r.initialMousePosY,this.shouldFocus=n.shouldFocus,this.source=n.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}async updateHoverVerbosityLevel(e,t,i){this._renderedHoverParts.updateHoverVerbosityLevel(e,t,i)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),o=i.coordinatesConverter,s=o.convertModelRangeToViewRange(t),r=i.getLineMinColumn(s.startLineNumber),a=new f.y(s.startLineNumber,r);n=o.convertViewPositionToModelPosition(a).column}const o=t.startLineNumber;let s,r,a,l=t.startColumn;for(const c of i){const e=c.range,t=e.startLineNumber===o,i=e.endLineNumber===o,r=t&&i;if(r){const t=e.startColumn,i=Math.min(l,t);l=Math.max(i,n)}c.forceShowAtRange&&(s=e)}if(s){const e=s.getStartPosition();r=e,a=e}else r=t.getStartPosition(),a=new f.y(o,l);return{showAtPosition:r,showAtSecondaryPosition:a}}}class U{constructor(e,t){this._statusBar=t,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}}class $ extends o.jG{static{this._DECORATION_OPTIONS=F.kI.register({description:"content-hover-highlight",className:"hoverHighlight"})}constructor(e,t,i,n,o){super(),this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=o,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(t,i,o,n)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,i)),this._updateMarkdownAndColorParticipantInfo(t)}_createEditorDecorations(e,t){if(0===t.length)return o.jG.None;let i=t[0].range;for(const o of t){const e=o.range;i=B.Q.plusRange(i,e)}const n=e.createDecorationsCollection();return n.set([{range:i,options:$._DECORATION_OPTIONS}]),(0,o.s)((()=>{n.clear()}))}_renderParts(e,t,i,n){const s=new M.L(n),r={fragment:this._fragment,statusBar:s,...i},a=new o.Cm;for(const o of e){const e=this._renderHoverPartsForParticipant(t,o,r);a.add(e);for(const t of e.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:o,hoverPart:t.hoverPart,hoverElement:t.hoverElement})}const l=this._renderStatusBar(this._fragment,s);return l&&(a.add(l),this._renderedParts.push({type:"statusBar",hoverElement:l.hoverElement,actions:l.actions})),(0,o.s)((()=>{a.dispose()}))}_renderHoverPartsForParticipant(e,t,i){const n=e.filter((e=>e.owner===t)),o=n.length>0;return o?t.renderHoverParts(i,n):new g.Ke([])}_renderStatusBar(e,t){if(t.hasContent)return new U(e,t)}_registerListenersOnRenderedParts(){const e=new o.Cm;return this._renderedParts.forEach(((t,i)=>{const n=t.hoverElement;n.tabIndex=0,e.add(d.ko(n,d.Bx.FOCUS_IN,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=i}))),e.add(d.ko(n,d.Bx.FOCUS_OUT,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=-1})))})),e}_updateMarkdownAndColorParticipantInfo(e){const t=e.find((e=>e instanceof W.xJ&&!(e instanceof V.u)));t&&(this._markdownHoverParticipant=t),this._colorHoverParticipant=e.find((e=>e instanceof H.BJ))}async updateHoverVerbosityLevel(e,t,i){if(!this._markdownHoverParticipant)return;const n=this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant,t);if(void 0===n)return;const o=await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e,n,i);o&&(this._renderedParts[t]={type:"hoverPart",participant:this._markdownHoverParticipant,hoverPart:o.hoverPart,hoverElement:o.hoverElement},this._context.onContentsChanged())}isColorPickerVisible(){return this._colorHoverParticipant?.isColorPickerVisible()??!1}_normalizedIndexToMarkdownHoverIndexRange(e,t){const i=this._renderedParts[t];if(!i||"hoverPart"!==i.type)return;const n=i.participant===e;if(!n)return;const o=this._renderedParts.findIndex((t=>"hoverPart"===t.type&&t.participant===e));if(-1===o)throw new j.D7;return t-o}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}}var q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},K=function(e,t){return function(i,n){t(i,n,e)}};let G=class extends o.jG{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._onContentsChanged=this._register(new x.vl),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(R,this._editor)),this._participants=this._initializeHoverParticipants(),this._computer=new A(this._editor,this._participants),this._hoverOperation=this._register(new h.w(this._editor,this._computer)),this._registerListeners()}_initializeHoverParticipants(){const e=[];for(const t of g.B2.getAll()){const i=this._instantiationService.createInstance(t,this._editor);e.push(i)}return e.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._register(this._contentHoverWidget.onDidResize((()=>{this._participants.forEach((e=>e.handleResize?.()))}))),e}_registerListeners(){this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new O(this._computer.anchor,t,e.isComplete))})));const e=this._contentHoverWidget.getDomNode();this._register(d.b2(e,"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(d.b2(e,"mouseleave",(e=>{this._onMouseLeave(e)}))),this._register(u.dG.onDidChange((()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}_startShowingOrUpdateHover(e,t,i,n,o){const s=this._contentHoverWidget.position&&this._currentResult;if(!s)return!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0);const r=this._editor.getOption(60).sticky,a=o&&this._contentHoverWidget.isMouseGettingCloser(o.event.posx,o.event.posy),l=r&&a;if(l)return e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0;if(!e)return this._setCurrentResult(null),!1;const c=this._currentResult.anchor.equals(e);if(c)return!0;const d=e.canAdoptVisibleHover(this._currentResult.anchor,this._contentHoverWidget.position);return d?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)}_startHoverOperationIfNecessary(e,t,i,n,o){const s=this._computer.anchor&&this._computer.anchor.equals(e);s||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){let t=e;const i=this._currentResult===t;if(i)return;const n=t&&0===t.hoverParts.length;n&&(t=null),this._currentResult=t,this._currentResult?this._showHover(this._currentResult):this._hideHover()}_addLoadingMessage(e){if(!this._computer.anchor)return e;for(const t of this._participants){if(!t.createLoadingMessage)continue;const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){const t=this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete;t||this._setCurrentResult(e);const i=e.isComplete;if(!i)return;const n=0===e.hoverParts.length,o=this._computer.insistOnKeepingHoverVisible,s=n&&o;s||this._setCurrentResult(e)}_showHover(e){const t=this._getHoverContext();this._renderedContentHover=new z(this._editor,e,this._participants,this._computer,t,this._keybindingService),this._renderedContentHover.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover):this._renderedContentHover.dispose()}_hideHover(){this._contentHoverWidget.hide()}_getHoverContext(){const e=()=>{this.hide()},t=()=>{this._onContentsChanged.fire(),this._contentHoverWidget.onContentsChanged()},i=e=>{this._contentHoverWidget.setMinimumDimensions(e)};return{hide:e,onContentsChanged:t,setMinimumDimensions:i}}showsOrWillShow(e){const t=this._contentHoverWidget.isResizing;if(t)return!0;const i=this._findHoverAnchorCandidates(e),n=i.length>0;if(!n)return this._startShowingOrUpdateHover(null,0,0,!1,e);const o=i[0];return this._startShowingOrUpdateHover(o,0,0,!1,e)}_findHoverAnchorCandidates(e){const t=[];for(const n of this._participants){if(!n.suggestHoverAnchor)continue;const i=n.suggestHoverAnchor(e);i&&t.push(i)}const i=e.target;switch(i.type){case 6:t.push(new g.hx(0,i.range,e.event.posx,e.event.posy));break;case 7:{const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2,o=!i.detail.isAfterLines&&"number"===typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),t}_onMouseLeave(e){const t=this._editor.getDomNode(),i=!t||!(0,c.U)(t,e.x,e.y);i&&this.hide()}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new g.hx(0,e,void 0,void 0),t,i,n,null)}async updateHoverVerbosityLevel(e,t,i){this._renderedContentHover?.updateHoverVerbosityLevel(e,t,i)}focusedHoverPartIndex(){return this._renderedContentHover?.focusedHoverPartIndex??-1}containsNode(e){return!!e&&this._contentHoverWidget.getDomNode().contains(e)}focus(){this._contentHoverWidget.focus()}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){return this._renderedContentHover?.isColorPickerVisible()??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};G=q([K(1,s._Y),K(2,a.b)],G);var Q,Y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Z=function(e,t){return function(i,n){t(i,n,e)}};const X=!1;let J=class extends o.jG{static{Q=this}static{this.ID="editor.contrib.contentHover"}constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._onHoverContentsChanged=this._register(new x.vl),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new o.Cm,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new l.uC((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}static get(e){return e.getContribution(Q.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0;const t=this._shouldNotHideCurrentHoverWidget(e);t||this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()}_isMouseOnContentHoverWidget(e){const t=this._contentWidget?.getDomNode();return!!t&&(0,c.U)(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;this._cancelScheduler();const t=this._shouldNotHideCurrentHoverWidget(e);t||X||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,i=(e,t)=>{const i=this._isMouseOnContentHoverWidget(e);return t&&i},n=e=>{const t=this._isMouseOnContentHoverWidget(e),i=this._contentWidget?.isColorPickerVisible??!1;return t&&i},o=(e,t)=>(t&&this._contentWidget?.containsNode(e.event.browserEvent.view?.document.activeElement)&&!e.event.browserEvent.view?.getSelection()?.isCollapsed)??!1;return i(e,t)||n(e)||o(e,t)}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._contentWidget?.isFocused||this._contentWidget?.isResizing)return;const t=this._hoverSettings.sticky;if(t&&this._contentWidget?.isVisibleFromKeyboard)return;const i=this._shouldNotRecomputeCurrentHoverWidget(e);if(i)return void this._reactToEditorMouseMoveRunner.cancel();const n=this._hoverSettings.hidingDelay,o=this._contentWidget?.isVisible,s=o&&t&&n>0;s?this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(n):this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;const t=e.target,i=t.element?.classList.contains("colorpicker-color-decoration"),n=this._editor.getOption(149),o=this._hoverSettings.enabled,s=this._hoverState.activatedByDecoratorClick;if(i&&("click"===n&&!s||"hover"===n&&!o&&!X||"clickAndHover"===n&&!o&&!s)||!i&&!o&&!s)return void this._hideWidgets();const r=this._tryShowHoverWidget(e);r||X||this._hideWidgets()}_tryShowHoverWidget(e){const t=this._getOrCreateContentWidget();return t.showsOrWillShow(e)}_onKeyDown(e){if(!this._editor.hasModel())return;const t=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=1===t.kind||2===t.kind&&(t.commandId===n.jA||t.commandId===n.jq||t.commandId===n.Zp)&&this._contentWidget?.isVisible;5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||i||this._hideWidgets()}_hideWidgets(){X||this._hoverState.mouseDown&&this._contentWidget?.isColorPickerVisible||r.bo.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._contentWidget?.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(G,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged((()=>this._onHoverContentsChanged.fire())))),this._contentWidget}showContentHover(e,t,i,n,o=!1){this._hoverState.activatedByDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}_isContentWidgetResizing(){return this._contentWidget?.widget.isResizing||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,t,i){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,t,i)}focus(){this._contentWidget?.focus()}scrollUp(){this._contentWidget?.scrollUp()}scrollDown(){this._contentWidget?.scrollDown()}scrollLeft(){this._contentWidget?.scrollLeft()}scrollRight(){this._contentWidget?.scrollRight()}pageUp(){this._contentWidget?.pageUp()}pageDown(){this._contentWidget?.pageDown()}goToTop(){this._contentWidget?.goToTop()}goToBottom(){this._contentWidget?.goToBottom()}get isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible}get isHoverVisible(){return this._contentWidget?.isVisible}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._contentWidget?.dispose()}};J=Q=Y([Z(1,s._Y),Z(2,a.b)],J)},43505:(e,t,i)=>{"use strict";i.d(t,{L:()=>d});var n=i(2150),o=i(44726),s=i(5091),r=i(13046),a=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},l=function(e,t){return function(i,n){t(i,n,e)}};const c=n.$;let d=class extends s.jG{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this.actions=[],this._hasContent=!1,this.hoverElement=c("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=n.BC(this.hoverElement,c("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;this._hasContent=!0;const n=this._register(o.jQ.render(this.actionsElement,e,i));return this.actions.push(n),n}append(e){const t=n.BC(this.actionsElement,e);return this._hasContent=!0,t}};d=a([l(0,r.b)],d)},35403:(e,t,i)=>{"use strict";i.d(t,{U:()=>d});var n=i(9659),o=i(67792),s=i(14396),r=i(16259),a=i(12847);class l{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}async function c(e,t,i,n,o){const r=await Promise.resolve(e.provideHover(i,n,o)).catch(s.M_);if(r&&h(r))return new l(e,r,t)}function d(e,t,i,o,s=!1){const r=e.ordered(t,s),a=r.map(((e,n)=>c(e,n,t,i,o)));return n.AE.fromPromises(a).coalesce()}function u(e,t,i,n,o=!1){return d(e,t,i,n,o).map((e=>e.hover)).toPromise()}function h(e){const t="undefined"!==typeof e.range,i="undefined"!==typeof e.contents&&e.contents&&e.contents.length>0;return t&&i}(0,r.ke)("_executeHoverProvider",((e,t,i)=>{const n=e.get(a.ILanguageFeaturesService);return u(n.hoverProvider,t,i,o.XO.None)})),(0,r.ke)("_executeHoverProvider_recursive",((e,t,i)=>{const n=e.get(a.ILanguageFeaturesService);return u(n.hoverProvider,t,i,o.XO.None,!0)}))},63907:(e,t,i)=>{"use strict";i.d(t,{G8:()=>_,Hm:()=>u,Hp:()=>a,K6:()=>r,MB:()=>l,Xp:()=>h,Zp:()=>m,dV:()=>s,iM:()=>f,ih:()=>d,jA:()=>o,jq:()=>p,vf:()=>c,vx:()=>g});var n=i(41337);const o="editor.action.showHover",s="editor.action.showDefinitionPreviewHover",r="editor.action.scrollUpHover",a="editor.action.scrollDownHover",l="editor.action.scrollLeftHover",c="editor.action.scrollRightHover",d="editor.action.pageUpHover",u="editor.action.pageDownHover",h="editor.action.goToTopHover",g="editor.action.goToBottomHover",p="editor.action.increaseHoverVerbosityLevel",f=n.kg({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),m="editor.action.decreaseHoverVerbosityLevel",_=n.kg({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level")},92048:(e,t,i)=>{"use strict";var n,o=i(63907),s=i(91348),r=i(16259),a=i(8690),l=i(57479),c=i(39405),d=i(81319),u=i(35350),h=i(41337);(function(e){e["NoAutoFocus"]="noAutoFocus",e["FocusIfVisible"]="focusIfVisible",e["AutoFocusImmediately"]="autoFocusImmediately"})(n||(n={}));class g extends r.ks{constructor(){super({id:o.jA,label:h.kg({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:h.aS("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[n.NoAutoFocus,n.FocusIfVisible,n.AutoFocusImmediately],enumDescriptions:[h.kg("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),h.kg("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),h.kg("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:n.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:l.R.editorTextFocus,primary:(0,s.m5)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const o=d.A.get(t);if(!o)return;const s=i?.focus;let r=n.FocusIfVisible;Object.values(n).includes(s)?r=s:"boolean"===typeof s&&s&&(r=n.AutoFocusImmediately);const l=e=>{const i=t.getPosition(),n=new a.Q(i.lineNumber,i.column,i.lineNumber,i.column);o.showContentHover(n,1,1,e)},c=2===t.getOption(2);o.isHoverVisible?r!==n.NoAutoFocus?o.focus():l(c):l(c||r===n.AutoFocusImmediately)}}class p extends r.ks{constructor(){super({id:o.dV,label:h.kg({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:h.aS("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,t){const i=d.A.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new a.Q(n.lineNumber,n.column,n.lineNumber,n.column),s=c.k.get(t);if(!s)return;const r=s.startFindDefinitionFromCursor(n);r.then((()=>{i.showContentHover(o,1,1,!0)}))}}class f extends r.ks{constructor(){super({id:o.K6,label:h.kg({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:16,weight:100},metadata:{description:h.aS("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollUp()}}class m extends r.ks{constructor(){super({id:o.Hp,label:h.kg({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:18,weight:100},metadata:{description:h.aS("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollDown()}}class _ extends r.ks{constructor(){super({id:o.MB,label:h.kg({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:15,weight:100},metadata:{description:h.aS("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollLeft()}}class v extends r.ks{constructor(){super({id:o.vf,label:h.kg({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:17,weight:100},metadata:{description:h.aS("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollRight()}}class b extends r.ks{constructor(){super({id:o.ih,label:h.kg({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:h.aS("pageUpHoverDescription","Page up the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.pageUp()}}class y extends r.ks{constructor(){super({id:o.Hm,label:h.kg({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:h.aS("pageDownHoverDescription","Page down the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.pageDown()}}class w extends r.ks{constructor(){super({id:o.Xp,label:h.kg({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:h.aS("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.goToTop()}}class C extends r.ks{constructor(){super({id:o.vx,label:h.kg({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:h.aS("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.goToBottom()}}class S extends r.ks{constructor(){super({id:o.jq,label:o.iM,alias:"Increase Hover Verbosity Level",precondition:l.R.hoverVisible})}run(e,t,i){const n=d.A.get(t);if(!n)return;const o=void 0!==i?.index?i.index:n.focusedHoverPartIndex();n.updateHoverVerbosityLevel(u.M$.Increase,o,i?.focus)}}class k extends r.ks{constructor(){super({id:o.Zp,label:o.G8,alias:"Decrease Hover Verbosity Level",precondition:l.R.hoverVisible})}run(e,t,i){const n=d.A.get(t);if(!n)return;const o=void 0!==i?.index?i.index:n.focusedHoverPartIndex();d.A.get(t)?.updateHoverVerbosityLevel(u.M$.Decrease,o,i?.focus)}}var x=i(66344),E=i(15911),L=i(38570),T=i(76035),I=i(2150),R=i(85053),D=i(9659),N=i(14396),A=i(5091),O=i(84366),P=i(12847),M=i(63637),F=i(51761),B=i(98948),W=i(69432),H=i(13977),V=i(45658),j=i(10170),z=i(44838),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$=function(e,t){return function(i,n){t(i,n,e)}};const q=I.$;class K{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const G={type:1,filter:{include:W.gB.QuickFix},triggerAction:W.fo.QuickFixHover};let Q=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const r of t){const t=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:o,c=this._markerDecorationsService.getMarker(i.uri,r);if(!c)continue;const d=new a.Q(e.range.startLineNumber,t,e.range.startLineNumber,l);s.push(new K(this,d,c))}return s}renderHoverParts(e,t){if(!t.length)return new L.Ke([]);const i=new A.Cm,n=[];t.forEach((t=>{const i=this._renderMarkerHover(t);e.fragment.appendChild(i.hoverElement),n.push(i)}));const o=1===t.length?t[0]:t.sort(((e,t)=>V.cj.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,o,i),new L.Ke(n)}_renderMarkerHover(e){const t=new A.Cm,i=q("div.hover-row"),n=I.BC(i,q("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=I.BC(n,q("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!==typeof r){const e=q("span");if(o){const t=I.BC(e,q("span"));t.innerText=o}const i=I.BC(e,q("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(I.ko(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()})));const s=I.BC(i,q("span"));s.innerText=r.value;const a=I.BC(n,e);a.style.opacity="0.6",a.style.paddingLeft="6px"}else{const e=I.BC(n,q("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`}if((0,R.EI)(a))for(const{message:d,resource:u,startLineNumber:h,startColumn:g}of a){const e=I.BC(n,q("div"));e.style.marginTop="8px";const i=I.BC(e,q("a"));i.innerText=`${(0,O.P8)(u)}(${h}, ${g}): `,i.style.cursor="pointer",t.add(I.ko(i,"click",(e=>{if(e.stopPropagation(),e.preventDefault(),this._openerService){const e={selection:{startLineNumber:h,startColumn:g}};this._openerService.open(u,{fromUserGesture:!0,editorOptions:e}).catch(N.dz)}})));const o=I.BC(e,q("span"));o.innerText=d,this._editor.applyFontInfo(o)}const c={hoverPart:e,hoverElement:i,dispose:()=>t.dispose()};return c}renderMarkerStatusbar(e,t,i){if(t.marker.severity===V.cj.Error||t.marker.severity===V.cj.Warning||t.marker.severity===V.cj.Info){const i=H.j.get(this._editor);i&&e.statusBar.addAction({label:h.kg("view problem","View Problem"),commandId:H.i.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(92)){const n=e.statusBar.append(q("div"));this.recentMarkerCodeActionsInfo&&(V.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===V.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=h.kg("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?A.jG.None:(0,D.EQ)((()=>n.textContent=h.kg("checkingForQuickFixes","Checking for quick fixes...")),200,i);n.textContent||(n.textContent=String.fromCharCode(160));const s=this.getCodeActions(t.marker);i.add((0,A.s)((()=>s.cancel()))),s.then((s=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:s.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return s.dispose(),void(n.textContent=h.kg("noQuickFixes","No quick fixes available"));n.style.display="none";let r=!1;i.add((0,A.s)((()=>{r||s.dispose()}))),e.statusBar.addAction({label:h.kg("quick fixes","Quick Fix..."),commandId:F.pQ,run:t=>{r=!0;const i=B.C.get(this._editor),n=I.BK(t);e.hide(),i?.showCodeActions(G,s,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),N.dz)}}getCodeActions(e){return(0,D.SS)((t=>(0,F.dU)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new a.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),G,z.ke.None,t)))}};Q=U([$(1,M.IMarkerDecorationsService),$(2,j.C),$(3,P.ILanguageFeaturesService)],Q);var Y=i(87778),Z=i(74742),X=i(36511),J=i(14573),ee=i(77850),te=i(44726),ie=i(42325),ne=i(9322);class oe{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=ne.ZS.Center}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[],n="lineNo"===this._laneOrLine;if(!t)return i;for(const o of t){const t=o.options.glyphMargin?.position??ne.ZS.Center;if(!n&&t!==this._laneOrLine)continue;const s=n?o.options.lineNumberHoverMessage:o.options.glyphMarginHoverMessage;s&&!(0,ie.it)(s)&&i.push(...(0,R._j)(s).map(e))}return i}}var se,re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};const le=I.$;let ce=class extends A.jG{static{se=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,i){super(),this._renderDisposeables=this._register(new A.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new te.N4),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new X.T({editor:this._editor},t,i)),this._computer=new oe(this._editor),this._hoverOperation=this._register(new ee.w(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._register(I.b2(this._hover.containerDomNode,"mouseleave",(e=>{this._onMouseLeave(e)}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return se.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){const e=Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code"));e.forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}showsOrWillShow(e){const t=e.target;return 2===t.type&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):3===t.type&&(this._startShowingAt(t.position.lineNumber,"lineNo"),!0)}_startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const e=le("div.hover-row.markdown-hover"),t=I.BC(e,le("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(n.value));t.appendChild(o.element),i.appendChild(e)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(67),s=this._hover.containerDomNode.clientHeight,r=i-n-(s-o)/2,a=t.glyphMarginLeft+t.glyphMarginWidth+("lineNo"===this._computer.lane?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${a}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(r),0)}px`}_onMouseLeave(e){const t=this._editor.getDomNode(),i=!t||!(0,Z.U)(t,e.x,e.y);i&&this.hide()}};ce=se=re([ae(1,J.L),ae(2,j.C)],ce);var de=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ue=function(e,t){return function(i,n){t(i,n,e)}};const he=!1;let ge=class extends A.jG{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new A.Cm,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new D.uC((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0;const t=this._isMouseOnMarginHoverWidget(e);t||this._hideWidgets()}_isMouseOnMarginHoverWidget(e){const t=this._glyphWidget?.getDomNode();return!!t&&(0,Z.U)(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;this._cancelScheduler();const t=this._isMouseOnMarginHoverWidget(e);t||he||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,i=this._isMouseOnMarginHoverWidget(e);return t&&i}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;this._mouseMoveEvent=e;const t=this._shouldNotRecomputeCurrentHoverWidget(e);t?this._reactToEditorMouseMoveRunner.cancel():this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;const t=this._tryShowHoverWidget(e);t||he||this._hideWidgets()}_tryShowHoverWidget(e){const t=this._getOrCreateGlyphWidget();return t.showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){he||this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(ce,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};ge=de([ue(1,Y._Y)],ge);var pe=i(3115);class fe{}class me{}class _e{}(0,r.HW)(d.A.ID,d.A,2),(0,r.HW)(ge.ID,ge,2),(0,r.Fl)(g),(0,r.Fl)(p),(0,r.Fl)(f),(0,r.Fl)(m),(0,r.Fl)(_),(0,r.Fl)(v),(0,r.Fl)(b),(0,r.Fl)(y),(0,r.Fl)(w),(0,r.Fl)(C),(0,r.Fl)(S),(0,r.Fl)(k),L.B2.register(T.xJ),L.B2.register(Q),(0,E.zy)(((e,t)=>{const i=e.getColor(x.oZ8);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))})),pe.Z.register(new fe),pe.Z.register(new me),pe.Z.register(new _e)},77850:(e,t,i)=>{"use strict";i.d(t,{w:()=>l});var n=i(9659),o=i(14396),s=i(40231),r=i(5091);class a{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class l extends r.jG{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new s.vl),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new n.uC((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new n.uC((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new n.uC((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,n.bI)((e=>this._computer.computeAsync(e))),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){(0,o.dz)(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new a(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}},38570:(e,t,i)=>{"use strict";i.d(t,{B2:()=>r,Ke:()=>s,hx:()=>n,mm:()=>o});class n{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class o{constructor(e,t,i,n,o,s){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}class s{constructor(e){this.renderedHoverParts=e}dispose(){for(const e of this.renderedHoverParts)e.dispose()}}const r=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},74742:(e,t,i)=>{"use strict";i.d(t,{U:()=>o});var n=i(2150);function o(e,t,i){const o=n.BK(e);return!(to.left+o.width||io.top+o.height)}},76035:(e,t,i)=>{"use strict";i.d(t,{eH:()=>A,fm:()=>B,xJ:()=>P});var n=i(2150),o=i(85053),s=i(67792),r=i(42325),a=i(5091),l=i(36511),c=i(63907),d=i(8690),u=i(14573),h=i(38570),g=i(41337),p=i(32828),f=i(10170),m=i(12847),_=i(35350),v=i(48401),b=i(25923),y=i(23740),w=i(14396),C=i(13046),S=i(44726),k=i(41187),x=i(9659),E=i(35403),L=i(72786),T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};const R=n.$,D=(0,v.pU)("hover-increase-verbosity",b.W.add,g.kg("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),N=(0,v.pU)("hover-decrease-verbosity",b.W.remove,g.kg("decreaseHoverVerbosity","Icon for decreasing hover verbosity."));class A{constructor(e,t,i,n,o,s=void 0){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=o,this.source=s}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class O{constructor(e,t,i){this.hover=e,this.hoverProvider=t,this.hoverPosition=i}supportsVerbosityAction(e){switch(e){case _.M$.Increase:return this.hover.canIncreaseVerbosity??!1;case _.M$.Decrease:return this.hover.canDecreaseVerbosity??!1}}}let P=class{constructor(e,t,i,n,o,s,r,a){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=o,this._keybindingService=s,this._hoverService=r,this._commandService=a,this.hoverOrdinal=3}createLoadingMessage(e){return new A(this,e.range,[(new r.Bc).appendText(g.kg("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),a=[];let l=1e3;const c=i.getLineLength(n),u=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),h=this._editor.getOption(118),p=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:u});let f=!1;h>=0&&c>h&&e.range.startColumn>=h&&(f=!0,a.push(new A(this,e.range,[{value:g.kg("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,l++))),!f&&"number"===typeof p&&c>=p&&a.push(new A(this,e.range,[{value:g.kg("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,l++));let m=!1;for(const g of t){const t=g.range.startLineNumber===n?g.range.startColumn:1,i=g.range.endLineNumber===n?g.range.endColumn:s,c=g.options.hoverMessage;if(!c||(0,r.it)(c))continue;g.options.beforeContentClassName&&(m=!0);const u=new d.Q(e.range.startLineNumber,t,e.range.startLineNumber,i);a.push(new A(this,u,(0,o._j)(c),m,l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return x.AE.EMPTY;const n=this._editor.getModel(),o=this._languageFeaturesService.hoverProvider;if(!o.has(n))return x.AE.EMPTY;const s=this._getMarkdownHovers(o,n,e,i);return s}_getMarkdownHovers(e,t,i,n){const o=i.range.getStartPosition(),s=(0,E.U)(e,t,o,n),a=s.filter((e=>!(0,r.it)(e.hover.contents))).map((e=>{const t=e.hover.range?d.Q.lift(e.hover.range):i.range,n=new O(e.hover,e.provider,o);return new A(this,t,e.hover.contents,!1,e.ordinal,n)}));return a}renderHoverParts(e,t){return this._renderedHoverParts=new F(t,e.fragment,this,this._editor,this._languageService,this._openerService,this._commandService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}updateMarkdownHoverVerbosityLevel(e,t,i){return Promise.resolve(this._renderedHoverParts?.updateMarkdownHoverPartVerbosityLevel(e,t,i))}};P=T([I(1,u.L),I(2,f.C),I(3,p.pG),I(4,m.ILanguageFeaturesService),I(5,C.b),I(6,k.TN),I(7,L.d)],P);class M{constructor(e,t,i){this.hoverPart=e,this.hoverElement=t,this.disposables=i}dispose(){this.disposables.dispose()}}class F{constructor(e,t,i,n,o,s,r,l,c,d,u){this._hoverParticipant=i,this._editor=n,this._languageService=o,this._openerService=s,this._commandService=r,this._keybindingService=l,this._hoverService=c,this._configurationService=d,this._onFinishedRendering=u,this._ongoingHoverOperations=new Map,this._disposables=new a.Cm,this.renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._disposables.add((0,a.s)((()=>{this.renderedHoverParts.forEach((e=>{e.dispose()})),this._ongoingHoverOperations.forEach((e=>{e.tokenSource.dispose(!0)}))})))}_renderHoverParts(e,t,i){return e.sort((0,o.VE)((e=>e.ordinal),o.U9)),e.map((e=>{const n=this._renderHoverPart(e,i);return t.appendChild(n.hoverElement),n}))}_renderHoverPart(e,t){const i=this._renderMarkdownHover(e,t),n=i.hoverElement,o=e.source,s=new a.Cm;if(s.add(i),!o)return new M(e,n,s);const r=o.supportsVerbosityAction(_.M$.Increase),l=o.supportsVerbosityAction(_.M$.Decrease);if(!r&&!l)return new M(e,n,s);const c=R("div.verbosity-actions");return n.prepend(c),s.add(this._renderHoverExpansionAction(c,_.M$.Increase,r)),s.add(this._renderHoverExpansionAction(c,_.M$.Decrease,l)),new M(e,n,s)}_renderMarkdownHover(e,t){const i=W(this._editor,e,this._languageService,this._openerService,t);return i}_renderHoverExpansionAction(e,t,i){const o=new a.Cm,s=t===_.M$.Increase,r=n.BC(e,R(y.L.asCSSSelector(s?D:N)));r.tabIndex=0;const l=new k.fO("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(o.add(this._hoverService.setupManagedHover(l,r,H(this._keybindingService,t))),!i)return r.classList.add("disabled"),o;r.classList.add("enabled");const d=()=>this._commandService.executeCommand(t===_.M$.Increase?c.jq:c.Zp);return o.add(new S.vV(r,d)),o.add(new S.M4(r,d,[3,10])),o}async updateMarkdownHoverPartVerbosityLevel(e,t,i=!0){const n=this._editor.getModel();if(!n)return;const o=this._getRenderedHoverPartAtIndex(t),s=o?.hoverPart.source;if(!o||!s?.supportsVerbosityAction(e))return;const r=await this._fetchHover(s,n,e);if(!r)return;const a=new O(r,s.hoverProvider,s.hoverPosition),l=o.hoverPart,c=new A(this._hoverParticipant,l.range,r.contents,l.isBeforeContent,l.ordinal,a),d=this._renderHoverPart(c,this._onFinishedRendering);return this._replaceRenderedHoverPartAtIndex(t,d,c),i&&this._focusOnHoverPartWithIndex(t),{hoverPart:c,hoverElement:d.hoverElement}}async _fetchHover(e,t,i){let n=i===_.M$.Increase?1:-1;const o=e.hoverProvider,r=this._ongoingHoverOperations.get(o);r&&(r.tokenSource.cancel(),n+=r.verbosityDelta);const a=new s.Qi;this._ongoingHoverOperations.set(o,{verbosityDelta:n,tokenSource:a});const l={verbosityRequest:{verbosityDelta:n,previousHover:e.hover}};let c;try{c=await Promise.resolve(o.provideHover(t,e.hoverPosition,a.token,l))}catch(d){(0,w.M_)(d)}return a.dispose(),this._ongoingHoverOperations.delete(o),c}_replaceRenderedHoverPartAtIndex(e,t,i){if(e>=this.renderedHoverParts.length||e<0)return;const n=this.renderedHoverParts[e],o=n.hoverElement,s=t.hoverElement,r=Array.from(s.children);o.replaceChildren(...r);const a=new M(i,o,t.disposables);o.focus(),n.dispose(),this.renderedHoverParts[e]=a}_focusOnHoverPartWithIndex(e){this.renderedHoverParts[e].hoverElement.focus()}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}function B(e,t,i,n,s){t.sort((0,o.VE)((e=>e.ordinal),o.U9));const r=[];for(const o of t)r.push(W(i,o,n,s,e.onContentsChanged));return new h.Ke(r)}function W(e,t,i,o,s){const c=new a.Cm,d=R("div.hover-row"),u=R("div.hover-row-contents");d.appendChild(u);const h=t.contents;for(const a of h){if((0,r.it)(a))continue;const t=R("div.markdown-hover"),d=n.BC(t,R("div.hover-contents")),h=c.add(new l.T({editor:e},i,o));c.add(h.onDidRenderAsync((()=>{d.className="hover-contents code-hover-contents",s()})));const g=c.add(h.render(a));d.appendChild(g.element),u.appendChild(t)}const g={hoverPart:t,hoverElement:d,dispose(){c.dispose()}};return g}function H(e,t){switch(t){case _.M$.Increase:{const t=e.lookupKeybinding(c.jq);return t?g.kg("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",t.getLabel()):g.kg("increaseVerbosity","Increase Hover Verbosity")}case _.M$.Decrease:{const t=e.lookupKeybinding(c.Zp);return t?g.kg("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",t.getLabel()):g.kg("decreaseVerbosity","Decrease Hover Verbosity")}}}},29754:(e,t,i)=>{"use strict";var n=i(9659),o=i(14396),s=i(64339),r=i(16259),a=i(8690),l=i(98581),c=i(57479),d=i(35037),u=i(4117),h=i(41337);class g{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range;return this._originalSelection.isEmpty()?new l.L(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new l.L(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var p,f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};let _=class{static{p=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(p.ID)}static{this.DECORATION=d.kI.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();const i=this.editor.getSelection(),r=this.editor.getModel();if(!r||!i)return;let c=i;if(c.startLineNumber!==c.endLineNumber)return;const d=new s.$t(this.editor,5),u=r.uri;return this.editorWorkerService.canNavigateValueSet(u)?(this.currentRequest=(0,n.SS)((e=>this.editorWorkerService.navigateValueSet(u,c,t))),this.currentRequest.then((t=>{if(!t||!t.range||!t.value)return;if(!d.validate(this.editor))return;const i=a.Q.lift(t.range);let s=t.range;const r=t.value.length-(c.endColumn-c.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+t.value.length},r>1&&(c=new l.L(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn+r-1));const u=new g(i,c,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,u),this.editor.pushUndoStop(),this.decorations.set([{range:s,options:p.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,n.wR)(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(o.dz)})).catch(o.dz)):Promise.resolve(void 0)}};_=p=f([m(1,u.IEditorWorkerService)],_);class v extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:h.kg("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:c.R.writable,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=_.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class b extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:h.kg("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:c.R.writable,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=_.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,r.HW)(_.ID,_,4),(0,r.Fl)(v),(0,r.Fl)(b)},54289:(e,t,i)=>{"use strict";var n=i(5091),o=i(20601),s=i(16259),r=i(27461),a=i(8690),l=i(57479),c=i(50395),d=i(69361),u=i(9286),h=i(41337),g=i(3874),p=i(67502),f=i(28346),m=i(79680),_=i(98581),v=i(56973);function b(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const s=t.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;if(!s)return[];const a=new v.no(e,s,t);n=Math.min(n,e.getLineCount());while(i<=n){if(!a.shouldIgnore(i))break;i++}if(i>n-1)return[];const{tabSize:l,indentSize:c,insertSpaces:d}=e.getOptions(),u=(e,t)=>(t=t||1,r.Y.shiftIndent(e,e.length+t,l,c,d)),h=(e,t)=>(t=t||1,r.Y.unshiftIndent(e,e.length+t,l,c,d)),g=[],p=e.getLineContent(i);let b=o.UU(p),w=b;a.shouldIncrease(i)?(w=u(w),b=u(b)):a.shouldIndentNextLine(i)&&(w=u(w)),i++;for(let r=i;r<=n;r++){if(y(e,r))continue;const t=e.getLineContent(r),i=o.UU(t),n=w;a.shouldDecrease(r,n)&&(w=h(w),b=h(b)),i!==w&&g.push(f.k.replaceMove(new _.L(r,1,r,i.length+1),(0,m.P)(w,c,d))),a.shouldIgnore(r)||(a.shouldIncrease(r,n)?(b=u(b),w=b):w=a.shouldIndentNextLine(r,n)?u(w):b)}return g}function y(e,t){if(!e.tokenization.isCheapToTokenize(t))return!1;const i=e.tokenization.getLineTokens(t);return 2===i.getStandardTokenType(0)}var w=i(70164),C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},S=function(e,t){return function(i,n){t(i,n,e)}};class k extends s.ks{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:k.ID,label:h.kg("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:l.R.writable,metadata:{description:h.aS("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new F(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}class x extends s.ks{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:x.ID,label:h.kg("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:l.R.writable,metadata:{description:h.aS("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new B(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}class E extends s.ks{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(g.GK),n=e.get(d.IModelService),o=t.getModel();if(!o)return;const s=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),r=o.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize&&e===r.tabSize?h.kg("configuredTabSize","Configured Tab Size"):e===s.tabSize?h.kg("defaultTabSize","Default Tab Size"):e===r.tabSize?h.kg("currentTabSize","Current Tab Size"):void 0}))),l=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:h.kg({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&o&&!o.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?o.updateOptions({tabSize:t}):o.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class L extends E{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:L.ID,label:h.kg("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:h.aS("indentUsingTabsDescription","Use indentation with tabs.")}})}}class T extends E{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:T.ID,label:h.kg("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:h.aS("indentUsingSpacesDescription","Use indentation with spaces.")}})}}class I extends E{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:I.ID,label:h.kg("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:h.aS("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}}class R extends s.ks{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:R.ID,label:h.kg("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:h.aS("detectIndentationDescription","Detect the indentation from content.")}})}run(e,t){const i=e.get(d.IModelService),n=t.getModel();if(!n)return;const o=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}class D extends s.ks{constructor(){super({id:"editor.action.reindentlines",label:h.kg("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:l.R.writable,metadata:{description:h.aS("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,t){const i=e.get(c.JZ),n=t.getModel();if(!n)return;const o=b(n,i,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class N extends s.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:h.kg("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:l.R.writable,metadata:{description:h.aS("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,t){const i=e.get(c.JZ),n=t.getModel();if(!n)return;const o=t.getSelections();if(null===o)return;const s=[];for(const r of o){let e=r.startLineNumber,t=r.endLineNumber;if(e!==t&&1===r.endColumn&&t--,1===e){if(e===t)continue}else e--;const o=b(n,i,e,t);s.push(...o)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class A{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&"string"===typeof i.text&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(a.Q.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let O=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new n.Cm,this.callOnModel=new n.Cm,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(12)<4||this.editor.getOption(55)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;const n=this.rangeContainsOnlyWhitespaceCharacters(i,e);if(n)return;if(P(i,e))return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const s=this.editor.getOption(12),{tabSize:l,indentSize:c,insertSpaces:d}=i.getOptions(),h=[],g={shiftIndent:e=>r.Y.shiftIndent(e,e.length+1,l,c,d),unshiftIndent:e=>r.Y.unshiftIndent(e,e.length+1,l,c,d)};let f=e.startLineNumber;while(f<=e.endLineNumber){if(!this.shouldIgnoreLine(i,f))break;f++}if(f>e.endLineNumber)return;let m=i.getLineContent(f);if(!/\S/.test(m.substring(0,e.startColumn-1))){const e=(0,p.$f)(s,i,i.getLanguageId(),f,g,this._languageConfigurationService);if(null!==e){const t=o.UU(m),n=u.c(e,l),s=u.c(t,l);if(n!==s){const e=u.k(n,l,d);h.push({range:new a.Q(f,1,f,t.length+1),text:e}),m=e+m.substring(t.length)}else{const e=(0,p.Yb)(i,f,this._languageConfigurationService);if(0===e||8===e)return}}}const _=f;while(fi.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===_?m:i.getLineContent(e)},n=(0,p.$f)(s,t,i.getLanguageId(),f+1,g,this._languageConfigurationService);if(null!==n){const t=u.c(n,l),s=u.c(o.UU(i.getLineContent(f+1)),l);if(t!==s){const n=t-s;for(let t=f+1;t<=e.endLineNumber;t++){const e=i.getLineContent(t),s=o.UU(e),r=u.c(s,l),c=r+n,g=u.k(c,l,d);g!==s&&h.push({range:new a.Q(t,1,t,s.length+1),text:g})}}}}if(h.length>0){this.editor.pushUndoStop();const e=new A(h,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){const i=e=>0===e.trim().length;let n=!0;if(t.startLineNumber===t.endLineNumber){const o=e.getLineContent(t.startLineNumber),s=o.substring(t.startColumn-1,t.endColumn-1);n=i(s)}else for(let o=t.startLineNumber;o<=t.endLineNumber;o++){const s=e.getLineContent(o);if(o===t.startLineNumber){const e=s.substring(t.startColumn-1);n=i(e)}else if(o===t.endLineNumber){const e=s.substring(0,t.endColumn-1);n=i(e)}else n=0===e.getLineFirstNonWhitespaceColumn(o);if(!n)break}return n}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function P(e,t){const i=t=>{const i=(0,w.T)(e,t);return 2===i};return i(t.getStartPosition())||i(t.getEndPosition())}function M(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let r=0;r{"use strict";function n(e,t){let i=0;for(let n=0;nn,k:()=>o})},9945:(e,t,i)=>{"use strict";i.d(t,{CN:()=>h,EP:()=>c,P8:()=>u});var n=i(14396),o=i(5091),s=i(36788),r=i(8690),a=i(6657),l=i(29133);class c{constructor(e,t){this.range=e,this.direction=t}}class d{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new d(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(e){if("function"===typeof this.provider.resolveInlayHint){if(this._currentResolve){if(await this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),await this._currentResolve}}async _doResolve(e){try{const t=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=t?.tooltip??this.hint.tooltip,this.hint.label=t?.label??this.hint.label,this.hint.textEdits=t?.textEdits??this.hint.textEdits,this._isResolved=!0}catch(t){(0,n.M_)(t),this._isResolved=!1}}}class u{static{this._emptyInlayHintList=Object.freeze({dispose(){},hints:[]})}static async create(e,t,i,o){const s=[],r=e.ordered(t).reverse().map((e=>i.map((async i=>{try{const n=await e.provideInlayHints(t,i,o);(n?.hints.length||e.onDidChangeInlayHints)&&s.push([n??u._emptyInlayHintList,e])}catch(r){(0,n.M_)(r)}}))));if(await Promise.all(r.flat()),o.isCancellationRequested||t.isDisposed())throw new n.AL;return new u(i,s,t)}constructor(e,t,i){this._disposables=new o.Cm,this.ranges=e,this.provider=new Set;const n=[];for(const[o,s]of t){this._disposables.add(o),this.provider.add(s);for(const e of o.hints){const t=i.validatePosition(e.position);let o="before";const a=u._getRangeAtPosition(i,t);let l;a.getStartPosition().isBefore(t)?(l=r.Q.fromPositions(a.getStartPosition(),t),o="after"):(l=r.Q.fromPositions(t,a.getEndPosition()),o="before"),n.push(new d(e,new c(l,o),s))}}this.items=n.sort(((e,t)=>s.y.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new r.Q(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),s=t.column-1,a=o.findTokenIndexAtOffset(s);let l=o.getStartOffset(a),c=o.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=o.getStartOffset(a-1),c=o.getEndOffset(a-1)):c===s&&a{"use strict";var n=i(16259),o=i(38570),s=i(10753),r=i(50127);(0,n.HW)(s.M.ID,s.M,1),o.B2.register(r.u)},10753:(e,t,i)=>{"use strict";i.d(t,{M:()=>W,z:()=>F});var n,o=i(2150),s=i(85053),r=i(9659),a=i(67792),l=i(14396),c=i(5091),d=i(21553),u=i(50322),h=i(29133),g=i(66621),p=i(71203),f=i(35011),m=i(28346),_=i(8690),v=i(35350),b=i(9322),y=i(35037),w=i(85983),C=i(12847),S=i(64037),k=i(51170),x=i(9945),E=i(26805),L=i(72786),T=i(59857),I=i(87778),R=i(95062),D=i(66344),N=i(15911),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=function(e,t){return function(i,n){t(i,n,e)}};class P{constructor(){this._entries=new d.qK(50)}get(e){const t=P._key(e);return this._entries.get(t)}set(e,t){const i=P._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const M=(0,I.u1)("IInlayHintsCache");(0,T.v)(M,P,1);class F{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"===typeof e?{label:e}:e[this.index]}}class B{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let W=class{static{n=this}static{this.ID="editor.contrib.InlayHints"}static{this._MAX_DECORATORS=1500}static{this._MAX_LABEL_LEN=43}static get(e){return e.getContribution(n.ID)??void 0}constructor(e,t,i,n,o,s,r){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=o,this._notificationService=s,this._instaService=r,this._disposables=new c.Cm,this._sessionDisposables=new c.Cm,this._decorationsMetadata=new Map,this._ruleFactory=new g.Qn(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(142)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(142);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if("on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(o.Di.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),d.schedule(0)}})))}const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,c.s)((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const s=new Set,d=new r.uC((async()=>{const e=Date.now();n?.dispose(!0),n=new a.Qi;const i=t.onWillDispose((()=>n?.cancel()));try{const i=n.token,o=await x.P8.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(d.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void o.dispose();for(const e of o.provider)"function"!==typeof e.onDidChangeInlayHints||s.has(e)||(s.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{d.isScheduled()||d.schedule()}))));this._sessionDisposables.add(o),this._updateHintsDecorators(o.ranges,o.items),this._cacheHintsForFastRestore(t)}catch(o){(0,l.dz)(o)}finally{n.dispose(),i.dispose()}}),this._debounceInfo.get(t));this._sessionDisposables.add(d),this._sessionDisposables.add((0,c.s)((()=>n?.dispose(!0)))),d.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&d.isScheduled()||d.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{n?.cancel();const t=Math.max(d.delay,1250);d.schedule(t)}))),this._sessionDisposables.add(this._installDblClickGesture((()=>d.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new c.Cm,t=e.add(new k.gi(this._editor)),i=new c.Cm;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),o=this._editor.getModel();if(!n||!o)return void i.clear();const s=new a.Qi;i.add((0,c.s)((()=>s.dispose(!0)))),n.item.resolve(s.token),this._activeInlayHintPart=n.part.command||n.part.location?new B(n,t.hasTriggerModifier):void 0;const r=o.validatePosition(n.item.hint.position).lineNumber,l=new _.Q(r,1,r,o.getLineMaxColumn(r)),d=this._getInlineHintsForRange(l);this._updateHintsDecorators([l],d),i.add((0,c.s)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([l],d)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((async e=>{const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(E.U,e,this._editor,i.location):v.uB.is(i.command)&&await this._invokeCommand(i.command,t.item)}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((async t=>{if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(a.XO.None),(0,s.EI)(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>m.k.replace(_.Q.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))}_installContextMenu(){return this._editor.onContextMenu((async e=>{if(!(0,o.sb)(e.event.target))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(E.h,this._editor,e.event.target,t)}))}_getInlayHintLabelPart(e){if(6!==e.target.type)return;const t=e.target.detail.injectedText?.options;return t instanceof y.Ho&&t?.attachedData instanceof F?t.attachedData:void 0}async _invokeCommand(e,t){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(i){this._notificationService.notify({severity:R.AI.Error,source:t.provider.displayName,message:i})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const o=e.getDecorationRange(i);if(o){const e=new x.EP(o,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=30,t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const o of i.sort(_.Q.compareRangesUsingStarts)){const i=t.validateRange(new _.Q(o.startLineNumber-e,o.startColumn,o.endLineNumber+e,o.endColumn));0!==n.length&&_.Q.areIntersectingOrTouching(n[n.length-1],i)?n[n.length-1]=_.Q.plusRange(n[n.length-1],i):n.push(i)}return n}_updateHintsDecorators(e,t){const i=[],o=(e,t,n,o,s)=>{const r={content:n,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:o,attachedData:s};i.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},r=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(a/3|0)+"px",display:"inline-block"});o(e,i," ",t?b.VW.Right:b.VW.None)},{fontSize:a,fontFamily:l,padding:c,isUniform:d}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,l);let h={line:0,totalLen:0};for(const p of t){if(h.line!==p.anchor.range.startLineNumber&&(h={line:p.anchor.range.startLineNumber,totalLen:0}),h.totalLen>n._MAX_LABEL_LEN)continue;p.hint.paddingLeft&&r(p,!1);const e="string"===typeof p.hint.label?[{label:p.hint.label}]:p.hint.label;for(let t=0;t0&&(m=m.slice(0,-v)+"…",_=!0),o(p,this._ruleFactory.createClassNameRef(g),H(m),l&&!p.hint.paddingRight?b.VW.Right:b.VW.None,new F(p,t)),_)break}if(p.hint.paddingRight&&r(p,!0),i.length>n._MAX_DECORATORS)break}const g=[];for(const[n,s]of this._decorationsMetadata){const t=this._editor.getModel()?.getDecorationRange(n);t&&e.some((e=>e.containsRange(t)))&&(g.push(n),s.classNameRef.dispose(),this._decorationsMetadata.delete(n))}const m=p.D.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(g,i.map((e=>e.decoration)));for(let n=0;ni)&&(o=i);const s=e.fontFamily||n,r=!t&&s===n&&o===i;return{fontSize:o,fontFamily:s,padding:t,isUniform:r}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};function H(e){const t=" ";return e.replace(/[ \t]/g,t)}W=n=A([O(1,C.ILanguageFeaturesService),O(2,w.ILanguageFeatureDebounceService),O(3,M),O(4,L.d),O(5,R.Ot),O(6,I._Y)],W),L.w.registerCommand("_executeInlayHintProvider",(async(e,...t)=>{const[i,n]=t;(0,u.j)(h.r.isUri(i)),(0,u.j)(_.Q.isIRange(n));const{inlayHintsProvider:o}=e.get(C.ILanguageFeaturesService),s=await e.get(S.ITextModelService).createModelReference(i);try{const e=await x.P8.create(o,s.object.textEditorModel,[_.Q.lift(n)],a.XO.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{s.dispose()}}))},50127:(e,t,i)=>{"use strict";i.d(t,{u:()=>E});var n=i(9659),o=i(42325),s=i(36788),r=i(35037),a=i(38570),l=i(14573),c=i(64037),d=i(35403),u=i(76035),h=i(10753),g=i(32828),p=i(10170),f=i(12847),m=i(41337),_=i(25160),v=i(9945),b=i(85053),y=i(13046),w=i(41187),C=i(72786),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},k=function(e,t){return function(i,n){t(i,n,e)}};class x extends a.mm{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let E=class extends u.xJ{constructor(e,t,i,n,o,s,r,a,l){super(e,t,i,s,a,n,o,l),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){const t=h.M.get(this._editor);if(!t)return null;if(6!==e.target.type)return null;const i=e.target.detail.injectedText?.options;return i instanceof r.Ho&&i.attachedData instanceof h.z?new x(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof x?new n.AE((async t=>{const{part:n}=e;if(await n.item.resolve(i),i.isCancellationRequested)return;let s,r;if("string"===typeof n.item.hint.tooltip?s=(new o.Bc).appendText(n.item.hint.tooltip):n.item.hint.tooltip&&(s=n.item.hint.tooltip),s&&t.emitOne(new u.eH(this,e.range,[s],!1,0)),(0,b.EI)(n.item.hint.textEdits)&&t.emitOne(new u.eH(this,e.range,[(new o.Bc).appendText((0,m.kg)("hint.dbl","Double-click to insert"))],!1,10001)),"string"===typeof n.part.tooltip?r=(new o.Bc).appendText(n.part.tooltip):n.part.tooltip&&(r=n.part.tooltip),r&&t.emitOne(new u.eH(this,e.range,[r],!1,1)),n.part.location||n.part.command){let i;const s="altKey"===this._editor.getOption(78),r=s?_.zx?(0,m.kg)("links.navigate.kb.meta.mac","cmd + click"):(0,m.kg)("links.navigate.kb.meta","ctrl + click"):_.zx?(0,m.kg)("links.navigate.kb.alt.mac","option + click"):(0,m.kg)("links.navigate.kb.alt","alt + click");n.part.location&&n.part.command?i=(new o.Bc).appendText((0,m.kg)("hint.defAndCommand","Go to Definition ({0}), right click for more",r)):n.part.location?i=(new o.Bc).appendText((0,m.kg)("hint.def","Go to Definition ({0})",r)):n.part.command&&(i=new o.Bc(`[${(0,m.kg)("hint.cmd","Execute Command")}](${(0,v.CN)(n.part.command)} "${n.part.command.title}") (${r})`,{isTrusted:!0})),i&&t.emitOne(new u.eH(this,e.range,[i],!1,1e4))}const a=await this._resolveInlayHintLabelPartHover(n,i);for await(const e of a)t.emitOne(e)})):n.AE.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return n.AE.EMPTY;const{uri:i,range:r}=e.part.location,a=await this._resolverService.createModelReference(i);try{const i=a.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,d.U)(this._languageFeaturesService.hoverProvider,i,new s.y(r.startLineNumber,r.startColumn),t).filter((e=>!(0,o.it)(e.hover.contents))).map((t=>new u.eH(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):n.AE.EMPTY}finally{a.dispose()}}};E=S([k(1,l.L),k(2,p.C),k(3,y.b),k(4,w.TN),k(5,g.pG),k(6,c.ITextModelService),k(7,f.ILanguageFeaturesService),k(8,C.d)],E)},26805:(e,t,i)=>{"use strict";i.d(t,{U:()=>v,h:()=>_});var n=i(2150),o=i(55664),s=i(67792),r=i(23264),a=i(8690),l=i(64037),c=i(3815),d=i(55571),u=i(6330),h=i(72786),g=i(18904),p=i(46403),f=i(87778),m=i(95062);async function _(e,t,i,d){const g=e.get(l.ITextModelService),_=e.get(p.Z),v=e.get(h.d),b=e.get(f._Y),y=e.get(m.Ot);if(await d.item.resolve(s.XO.None),!d.part.location)return;const w=d.part.location,C=[],S=new Set(u.ZG.getMenuItems(u.D8.EditorContext).map((e=>(0,u.is)(e)?e.command.id:(0,r.b)())));for(const n of c.bn.all())S.has(n.desc.id)&&C.push(new o.rc(n.desc.id,u.Xe.label(n.desc,{renderShortTitle:!0}),void 0,!0,(async()=>{const e=await g.createModelReference(w.uri);try{const i=new c.QS(e.object.textEditorModel,a.Q.getStartPosition(w.range)),o=d.item.anchor.range;await b.invokeFunction(n.runEditorCommand.bind(n),t,i,o)}finally{e.dispose()}})));if(d.part.command){const{command:e}=d.part;C.push(new o.wv),C.push(new o.rc(e.id,e.title,void 0,!0,(async()=>{try{await v.executeCommand(e.id,...e.arguments??[])}catch(t){y.notify({severity:m.AI.Error,source:d.item.provider.displayName,message:t})}})))}const k=t.getOption(128);_.showContextMenu({domForShadowRoot:k?t.getDomNode()??void 0:void 0,getAnchor:()=>{const e=n.BK(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>C,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}async function v(e,t,i,n){const o=e.get(l.ITextModelService),s=await o.createModelReference(n.uri);await i.invokeWithinContext((async e=>{const o=t.hasSideBySideModifier,r=e.get(g.fN),l=d.x2.inPeekEditor.getValue(r),u=!o&&i.getOption(89)&&!l,h=new c.mR({openToSide:o,openInPeek:u,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0});return h.run(e,new c.QS(s.object.textEditorModel,a.Q.getStartPosition(n.range)),a.Q.lift(n.range))})),s.dispose()}},25695:(e,t,i)=>{"use strict";i.d(t,{PA:()=>s,Vl:()=>o,Wt:()=>n});const n="editor.action.inlineSuggest.commit",o="editor.action.inlineSuggest.showPrevious",s="editor.action.inlineSuggest.showNext"},74706:(e,t,i)=>{"use strict";i.d(t,{p:()=>c});var n=i(39751),o=i(20601),s=i(32142),r=i(18904),a=i(5091),l=i(41337);class c extends a.jG{static{this.inlineSuggestionVisible=new r.N1("inlineSuggestionVisible",!1,(0,l.kg)("inlineSuggestionVisible","Whether an inline suggestion is visible"))}static{this.inlineSuggestionHasIndentation=new r.N1("inlineSuggestionHasIndentation",!1,(0,l.kg)("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"))}static{this.inlineSuggestionHasIndentationLessThanTabSize=new r.N1("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,l.kg)("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"))}static{this.suppressSuggestions=new r.N1("inlineSuggestionSuppressSuggestions",void 0,(0,l.kg)("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))}constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=c.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=c.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=c.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=c.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,n.fm)((e=>{const t=this.model.read(e),i=t?.state.read(e),n=!!i?.inlineCompletion&&void 0!==i?.primaryGhostText&&!i?.primaryGhostText.isEmpty();this.inlineCompletionVisible.set(n),i?.primaryGhostText&&i?.inlineCompletion&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register((0,n.fm)((e=>{const t=this.model.read(e);let i=!1,n=!0;const r=t?.primaryGhostText.read(e);if(t?.selectedSuggestItem&&r&&r.parts.length>0){const{column:e,lines:a}=r.parts[0],l=a[0],c=t.textModel.getLineIndentColumn(r.lineNumber),d=e<=c;if(d){let e=(0,o.HG)(l);-1===e&&(e=l.length-1),i=e>0;const r=t.textModel.getOptions().tabSize,a=s.A.visibleColumnFromColumn(l,e+1,r);n=a{"use strict";i.d(t,{Pm:()=>N,bo:()=>P});var n,o=i(2150),s=i(64236),r=i(92678),a=i(55664),l=i(85053),c=i(9659),d=i(25923),u=i(5091),h=i(39751),g=i(42389),p=i(25160),f=i(23740),m=i(36788),_=i(35350),v=i(25695),b=i(41337),y=i(85141),w=i(64164),C=i(6330),S=i(72786),k=i(18904),x=i(46403),E=i(87778),L=i(13046),T=i(11086),I=i(48401),R=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},D=function(e,t){return function(i,n){t(i,n,e)}};let N=class extends u.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,h.y0)(this,this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(62).showToolbar)),this.sessionPosition=void 0,this.position=(0,h.un)(this,(e=>{const t=this.model.read(e)?.primaryGhostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||0===t.parts.length)return this.sessionPosition=void 0,null;const i=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);const n=new m.y(t.lineNumber,Math.min(i,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=n,n})),this._register((0,h.yC)(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const o=(0,g.rm)(((t,i)=>{const o=i.add(this.instantiationService.createInstance(P,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.activeCommands));return e.addContentWidget(o),i.add((0,u.s)((()=>e.removeContentWidget(o)))),i.add((0,h.fm)((e=>{const t=this.position.read(e);t&&n.lastTriggerKind.read(e)!==_.qw.Explicit&&n.triggerExplicitly()}))),o})),s=(0,h.ZX)(this,((e,t)=>!!this.position.read(e)||!!t));i.add((0,h.fm)((e=>{s.read(e)&&o.read(e)})))})))}};N=R([D(2,E._Y)],N);const A=(0,I.pU)("inline-suggestion-hints-next",d.W.chevronRight,(0,b.kg)("parameterHintsNextIcon","Icon for show next parameter hint.")),O=(0,I.pU)("inline-suggestion-hints-previous",d.W.chevronLeft,(0,b.kg)("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let P=class extends u.jG{static{n=this}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(e,t,i){const n=new a.rc(e,t,i,!0,(()=>this._commandService.executeCommand(e))),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return o&&(s=(0,b.kg)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),n.tooltip=s,n}constructor(e,t,i,s,r,l,d,u,g,p,m){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=s,this._suggestionCount=r,this._extraCommands=l,this._commandService=d,this.keybindingService=g,this._contextKeyService=p,this._menuService=m,this.id="InlineSuggestionHintsContentWidget"+n.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,o.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,o.h)("div@toolBar")]),this.previousAction=this.createCommandAction(v.Vl,(0,b.kg)("previous","Previous"),f.L.asClassName(O)),this.availableSuggestionCountAction=new a.rc("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(v.PA,(0,b.kg)("next","Next"),f.L.asClassName(A)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(C.D8.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new c.uC((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new c.uC((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.toolBar=this._register(u.createInstance(B,this.nodes.toolBar,C.D8.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof C.Xe)return u.createInstance(F,e,void 0);if(e===this.availableSuggestionCountAction){const t=new M(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{n._dropDownVisible=e}))),this._register((0,h.fm)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,h.fm)((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register((0,h.fm)((e=>{const t=this._extraCommands.read(e),i=t.map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[n,o]of this.inlineCompletionsActionsMenus.getActions())for(const e of o)e instanceof C.Xe&&i.push(e);i.length>0&&i.unshift(new a.wv),this.toolBar.setAdditionalSecondaryActions(i)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};P=n=R([D(6,S.d),D(7,E._Y),D(8,L.b),D(9,k.fN),D(10,C.ez)],P);class M extends s.Z4{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}class F extends y.oq{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,o.h)("div.keybinding").root,i=this._register(new r.x(t,p.OS,{disableTitle:!0,...r.l}));i.set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let B=class extends w.p{constructor(e,t,i,n,o,s,r,a,l){super(e,{resetMenu:t,...i},n,o,s,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){const e=[],t=[];(0,y.Ot)(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){(0,l.aI)(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){(0,l.aI)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};B=R([D(3,C.ez),D(4,k.fN),D(5,x.Z),D(6,L.b),D(7,S.d),D(8,T.k)],B)},97798:(e,t,i)=>{"use strict";var n=i(16259),o=i(38570),s=i(39751),r=i(81275),a=i(57479),l=i(25695),c=i(74706),d=i(2150),u=i(5091);function h(e){const t=new u.Cm,i=t.add((0,d.jh)());return t.add((0,s.fm)((t=>{i.setStyle(e.read(t))}))),t}var g=i(19950),p=i(9659),f=i(67792),m=i(42389),_=i(79741),v=i(50322),b=i(32378),y=i(55745),w=i(36788),C=i(85983),S=i(12847),k=i(21776),x=i(40231),E=i(20601),L=i(11320),T=i(35011),I=i(8690),R=i(13647),D=i(14573),N=i(9322),A=i(70164),O=i(1550),P=i(20529),M=i(85029),F=i(39842),B=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},W=function(e,t){return function(i,n){t(i,n,e)}};const H="ghost-text";let V=class extends u.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,s.FY)(this,!1),this.currentTextModel=(0,s.y0)(this,this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,s.un)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof M.Vs?i.columnRange:void 0,o=[],s=[];function r(e,t){if(s.length>0){const i=s[s.length-1];t&&i.decorations.push(new O.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)s.push({content:i,decorations:t?[new O.d(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,c=0;for(const u of i.parts){let e=u.lines;void 0===l?(o.push({column:u.column,text:e[0],preview:u.preview}),e=e.slice(1)):r([a.substring(c,u.column-1)],void 0),e.length>0&&(r(e,H),void 0===l&&u.column<=a.length&&(l=u.column)),c=u.column-1}void 0!==l&&r([a.substring(c)],void 0);const d=void 0!==l?new F.GM(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:o,additionalLines:s,hiddenRange:d,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=(0,s.un)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const n of t.inlineTexts)i.push({range:I.Q.fromPositions(new w.y(t.lineNumber,n.column)),options:{description:H,after:{content:n.text,inlineClassName:n.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:N.VW.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new j(this.editor,this.languageService.languageIdCodec,(0,s.un)((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register((0,u.s)((()=>{this.isDisposed.set(!0,void 0)}))),this._register((0,F.pY)(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};V=B([W(2,D.L)],V);class j extends u.jG{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=(0,s.yQ)("editorOptionChanged",x.Jh.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(33)||e.hasChanged(118)||e.hasChanged(100)||e.hasChanged(95)||e.hasChanged(51)||e.hasChanged(50)||e.hasChanged(67)))),this._register((0,s.fm)((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");z(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i,afterColumnAffinity:1})}}))}}function z(e,t,i,n,o){const s=n.get(33),r=n.get(118),a="none",l=n.get(95),c=n.get(51),d=n.get(50),u=n.get(67),h=new R.fe(1e4);h.appendString('
    ');for(let f=0,m=i.length;f');const g=E.aC(n),p=E.E_(n),m=A.f.createEmpty(n,o);(0,P.UW)(new P.zL(d.isMonospace&&!s,d.canUseHalfwidthRightwardsArrow,n,!1,g,p,0,m,e.decorations,t,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,a,l,c!==T.Bc.OFF,null),h),h.appendString("
    ")}h.appendString(""),(0,L.M)(e,d);const g=h.build(),p=U?U.createHTML(g):g;e.innerHTML=p}const U=(0,k.H)("editorGhostText",{createHTML:e=>e});var $=i(27982),q=i(85053),K=i(43654),G=i(45746),Q=i(14396),Y=i(28346),Z=i(98581),X=i(362),J=i(33904),ee=i(35350),te=i(50395),ie=i(10695),ne=i(46576),oe=i(40651);function se(e,t,i){const n=i?e.range.intersectRanges(i):e.range;if(!n)return e;const o=t.getValueInRange(n,1),s=(0,E.Qp)(o,e.text),r=J.W.ofText(o.substring(0,s)).addToPosition(e.range.getStartPosition()),a=e.text.substring(s),l=I.Q.fromPositions(r,e.range.getEndPosition());return new X.WR(l,a)}function re(e,t){return e.text.startsWith(t.text)&&le(e.range,t.range)}function ae(e,t,i,n,o=0){let s=se(e,t);if(s.range.endLineNumber!==s.range.startLineNumber)return;const r=t.getLineContent(s.range.startLineNumber),a=(0,E.UU)(r).length,l=s.range.startColumn-1<=a;if(l){const e=(0,E.UU)(s.text).length,t=r.substring(s.range.startColumn-1,a),[i,n]=[s.range.getStartPosition(),s.range.getEndPosition()],o=i.column+t.length<=n.column?i.delta(0,t.length):n,l=I.Q.fromPositions(o,n),c=s.text.startsWith(t)?s.text.substring(t.length):s.text.substring(e);s=new X.WR(l,c)}const c=t.getValueInRange(s.range),d=de(c,s.text);if(!d)return;const u=s.range.startLineNumber,h=new Array;if("prefix"===i){const e=d.filter((e=>0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==c.length)return}const g=s.text.length-o;for(const p of d){const e=s.range.startColumn+p.originalStart+p.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===s.range.startLineNumber&&e0)return;if(0===p.modifiedLength)continue;const t=p.modifiedStart+p.modifiedLength,o=Math.max(p.modifiedStart,Math.min(t,g)),r=s.text.substring(p.modifiedStart,o),a=s.text.substring(o,Math.max(p.modifiedStart,t));r.length>0&&h.push(new M.yP(e,r,!1)),a.length>0&&h.push(new M.yP(e,a,!0))}return new M.xD(u,h)}function le(e,t){return t.getStartPosition().equals(e.getStartPosition())&&t.getEndPosition().isBeforeOrEqual(e.getEndPosition())}let ce;function de(e,t){if(ce?.originalValue===e&&ce?.newValue===t)return ce?.changes;{let i=he(e,t,!0);if(i){const n=ue(i);if(n>0){const o=he(e,t,!1);o&&ue(o)5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const o=Math.max(n(e),n(t));function s(e){if(e<0)throw new Error("unexpected");return o+e+1}function r(e){let t=0,n=0;const o=new Int32Array(e.length);for(let r=0,a=e.length;ra},{getElements:()=>l}).ComputeDiff(!1).changes}var ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},pe=function(e,t){return function(i,n){t(i,n,e)}};let fe=class extends u.jG{constructor(e,t,i,n,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=o,this._updateOperation=this._register(new u.HE),this.inlineCompletions=(0,s.X2)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,s.X2)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){const n=new _e(e,t,this.textModel.getVersionId()),o=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(this._updateOperation.value?.request.satisfies(n))return this._updateOperation.value.promise;if(o.get()?.request.satisfies(n))return Promise.resolve(!0);const r=!!this._updateOperation.value;this._updateOperation.clear();const a=new f.Qi,l=(async()=>{const l=r||t.triggerKind===ee.qw.Automatic;if(l&&await me(this._debounceValue.get(this.textModel),a.token),a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==n.versionId)return!1;const c=new Date,d=await(0,ne.Yk)(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,a.token,this.languageConfigurationService);if(a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==n.versionId)return!1;const u=new Date;this._debounceValue.update(this.textModel,u.getTime()-c.getTime());const h=new be(d,n,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!d.has(t)&&h.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),(0,s.Rn)((e=>{o.set(h,e)})),!0})(),c=new ve(n,a,l);return this._updateOperation.value=c,l}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){this._updateOperation.value?.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};function me(e,t){return new Promise((i=>{let n;const o=setTimeout((()=>{n&&n.dispose(),i()}),e);t&&(n=t.onCancellationRequested((()=>{clearTimeout(o),n&&n.dispose(),i()})))}))}fe=ge([pe(3,S.ILanguageFeaturesService),pe(4,te.JZ)],fe);class _e{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&(0,G.KC)(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(0,G.r)())&&(e.context.triggerKind===ee.qw.Automatic||this.context.triggerKind===ee.qw.Explicit)&&this.versionId===e.versionId}}class ve{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class be{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this._textModel=i,this._versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[];const o=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new ye(e,o[t],this._textModel,this._versionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this._textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new ye(e,n,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}}class ye{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this._textModel=i,this._modelVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=(0,s.C)({owner:this,equalsFn:I.Q.equalsRange},(e=>(this._modelVersion.read(e),this._textModel.getDecorationRange(this.decorationId))))}toInlineCompletion(e){return this.inlineCompletion.withRange(this._updatedRange.read(e)??we)}toSingleTextEdit(e){return new X.WR(this._updatedRange.read(e)??we,this.inlineCompletion.insertText)}isVisible(e,t,i){const n=se(this._toFilterTextReplacement(i),e),o=this._updatedRange.read(i);if(!o||!this.inlineCompletion.range.getStartPosition().equals(o.getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const s=e.getValueInRange(n.range,1),r=n.text,a=Math.max(0,t.column-n.range.startColumn);let l=r.substring(0,a),c=r.substring(a),d=s.substring(0,a),u=s.substring(a);const h=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=h&&(d=d.trimStart(),0===d.length&&(u=u.trimStart()),l=l.trimStart(),0===l.length&&(c=c.trimStart())),l.startsWith(d)&&!!(0,ie.dE)(u,c)}canBeReused(e,t){const i=this._updatedRange.read(void 0),n=!!i&&i.containsPosition(t)&&this.isVisible(e,t,void 0)&&J.W.ofRange(i).isGreaterThanOrEqualTo(J.W.ofRange(this.inlineCompletion.range));return n}_toFilterTextReplacement(e){return new X.WR(this._updatedRange.read(e)??we,this.inlineCompletion.filterText)}}const we=new I.Q(1,1,1,1);var Ce=i(82397),Se=i(72786),ke=i(87778),xe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ee=function(e,t){return function(i,n){t(i,n,e)}};let Le=class extends u.jG{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,o,r,a,l,c,d,u,h){let g;super(),this.textModel=e,this.selectedSuggestItem=t,this._textModelVersionId=i,this._positions=n,this._debounceValue=o,this._suggestPreviewEnabled=r,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=u,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(fe,this.textModel,this._textModelVersionId,this._debounceValue)),this._isActive=(0,s.FY)(this,!1),this._forceUpdateExplicitlySignal=(0,s.Yd)(this),this._selectedInlineCompletionId=(0,s.FY)(this,void 0),this._primaryPosition=(0,s.un)(this,(e=>this._positions.read(e)[0]??new w.y(1,1))),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([Te.Redo,Te.Undo,Te.AcceptWord]),this._fetchInlineCompletionsPromise=(0,s.nb)({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:ee.qw.Automatic}),handleChange:(e,t)=>(e.didChange(this._textModelVersionId)&&this._preserveCurrentCompletionReasons.has(this._getReason(e.change))?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=ee.qw.Explicit),!0)},((e,t)=>{this._forceUpdateExplicitlySignal.read(e);const i=this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e);if(!i)return void this._source.cancelUpdate();this._textModelVersionId.read(e);const n=this._source.suggestWidgetInlineCompletions.get(),o=this.selectedSuggestItem.read(e);if(n&&!o){const e=this._source.inlineCompletions.get();(0,s.Rn)((t=>{(!e||n.request.versionId>e.request.versionId)&&this._source.inlineCompletions.set(n.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const r=this._primaryPosition.read(e),a={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:o?.toSelectedSuggestionInfo()},l=this.selectedInlineCompletion.get(),c=t.preserveCurrentCompletion||l?.forwardStable?l:void 0;return this._source.fetch(r,a,c)})),this._filteredInlineCompletionItems=(0,s.C)({owner:this,equalsFn:(0,G.S3)()},(e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this._primaryPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=(0,s.un)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=(0,s.un)(this,(e=>{const t=this._filteredInlineCompletionItems.read(e),i=this.selectedInlineCompletionIndex.read(e);return t[i]})),this.activeCommands=(0,s.C)({owner:this,equalsFn:(0,G.S3)()},(e=>this.selectedInlineCompletion.read(e)?.inlineCompletion.source.inlineCompletions.commands??[])),this.lastTriggerKind=this._source.inlineCompletions.map(this,(e=>e?.request.context.triggerKind)),this.inlineCompletionsCount=(0,s.un)(this,(e=>this.lastTriggerKind.read(e)===ee.qw.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=(0,s.C)({owner:this,equalsFn:(e,t)=>e&&t?(0,M.AL)(e.ghostTexts,t.ghostTexts)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{const t=this.textModel,i=this.selectedSuggestItem.read(e);if(i){const n=se(i.toSingleTextEdit(),t),o=this._computeAugmentation(n,e),s=this._suggestPreviewEnabled.read(e);if(!s&&!o)return;const r=o?.edit??n,a=o?o.edit.text.length-n.text.length:0,l=this._suggestPreviewMode.read(e),c=this._positions.read(e),d=[r,...Ie(this.textModel,c,r)],u=d.map(((e,i)=>ae(e,t,l,c[i],a))).filter(v.O9),h=u[0]??new M.xD(r.range.endLineNumber,[]);return{edits:d,primaryGhostText:h,ghostTexts:u,inlineCompletion:o?.completion,suggestItem:i}}{if(!this._isActive.read(e))return;const i=this.selectedInlineCompletion.read(e);if(!i)return;const n=i.toSingleTextEdit(e),o=this._inlineSuggestMode.read(e),s=this._positions.read(e),r=[n,...Ie(this.textModel,s,n)],a=r.map(((e,i)=>ae(e,t,o,s[i],0))).filter(v.O9);if(!a[0])return;return{edits:r,primaryGhostText:a[0],ghostTexts:a,inlineCompletion:i,suggestItem:void 0}}})),this.ghostTexts=(0,s.C)({owner:this,equalsFn:M.AL},(e=>{const t=this.state.read(e);if(t)return t.ghostTexts})),this.primaryGhostText=(0,s.C)({owner:this,equalsFn:M.x9},(e=>{const t=this.state.read(e);if(t)return t?.primaryGhostText})),this._register((0,s.OI)(this._fetchInlineCompletionsPromise)),this._register((0,s.fm)((e=>{const t=this.state.read(e),i=t?.inlineCompletion;if(i?.semanticId!==g?.semanticId&&(g=i,i)){const e=i.inlineCompletion,t=e.source;t.provider.handleItemDidShow?.(t.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}_getReason(e){return e?.isUndoing?Te.Undo:e?.isRedoing?Te.Redo:this.isAcceptingPartially?Te.AcceptWord:Te.Other}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){(0,s.PO)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineCompletionsPromise.get()}stop(e){(0,s.PO)(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentation(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),o=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(v.O9),s=(0,K.oH)(o,(n=>{let o=n.toSingleTextEdit(t);return o=se(o,i,I.Q.fromPositions(o.range.getStartPosition(),e.range.getEndPosition())),re(o,e)?{completion:n,edit:o}:void 0}));return s}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new Q.D7;const t=this.state.get();if(!t||t.primaryGhostText.isEmpty()||!t.inlineCompletion)return;const i=t.inlineCompletion.toInlineCompletion(void 0);if(i.command&&i.source.addRef(),e.pushUndoStop(),i.snippetInfo)e.executeEdits("inlineSuggestion.accept",[Y.k.replace(i.range,""),...i.additionalTextEdits]),e.setPosition(i.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),Ce.O.get(e)?.insert(i.snippetInfo.snippet,{undoStopBefore:!1});else{const n=t.edits,o=De(n).map((e=>Z.L.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",[...n.map((e=>Y.k.replace(e.range,e.text))),...i.additionalTextEdits]),e.setSelections(o,"inlineCompletionAccept")}this.stop(),i.command&&(await this._commandService.executeCommand(i.command.id,...i.command.arguments||[]).then(void 0,Q.M_),i.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),o=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),s=t.match(o);let r=0;r=s&&void 0!==s.index?0===s.index?s[0].length:s.index:t.length;const a=/\s+/g,l=a.exec(t);return l&&void 0!==l.index&&l.index+l[0].length{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}),1)}async _acceptNext(e,t,i){if(e.getModel()!==this.textModel)throw new Q.D7;const n=this.state.get();if(!n||n.primaryGhostText.isEmpty()||!n.inlineCompletion)return;const o=n.primaryGhostText,s=n.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText)return void await this.accept(e);const r=o.parts[0],a=new w.y(o.lineNumber,r.column),l=r.text,c=t(a,l);if(c===l.length&&1===o.parts.length)return void this.accept(e);const d=l.substring(0,c),u=this._positions.get(),h=u[0];s.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const t=I.Q.fromPositions(h,a),i=e.getModel().getValueInRange(t)+d,n=new X.WR(t,i),o=[n,...Ie(this.textModel,u,n)],s=De(o).map((e=>Z.L.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",o.map((e=>Y.k.replace(e.range,e.text)))),e.setSelections(s,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){const t=I.Q.fromPositions(s.range.getStartPosition(),J.W.ofText(d).addToPosition(a)),n=e.getModel().getValueInRange(t,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,n.length,{kind:i})}}finally{s.source.removeRef()}}handleSuggestAccepted(e){const t=se(e.toSingleTextEdit(),this.textModel),i=this._computeAugmentation(t,void 0);if(!i)return;const n=i.completion.inlineCompletion;n.source.provider.handlePartialAccept?.(n.source.inlineCompletions,n.sourceInlineCompletion,t.text.length,{kind:2})}};var Te;function Ie(e,t,i){if(1===t.length)return[];const n=t[0],o=t.slice(1),s=i.range.getStartPosition(),r=i.range.getEndPosition(),a=e.getValueInRange(I.Q.fromPositions(n,r)),l=(0,F.tN)(n,s);if(l.lineNumber<1)return(0,Q.dz)(new Q.D7(`positionWithinTextEdit line number should be bigger than 0.\n\t\t\tInvalid subtraction between ${n.toString()} and ${s.toString()}`)),[];const c=Re(i.text,l);return o.map((t=>{const i=(0,F.OA)((0,F.tN)(t,s),r),n=e.getValueInRange(I.Q.fromPositions(t,i)),o=(0,E.Qp)(a,n),l=I.Q.fromPositions(t,t.delta(0,o));return new X.WR(l,c)}))}function Re(e,t){let i="";const n=(0,E.en)(e);for(let o=t.lineNumber-1;oe.range),I.Q.compareRangesUsingStarts)),i=new X.mF(t.apply(e)),n=i.getNewRanges(),o=t.inverse().apply(n);return o.map((e=>e.getEndPosition()))}Le=xe([Ee(9,ke._Y),Ee(10,Se.d),Ee(11,te.JZ)],Le),function(e){e[e["Undo"]=0]="Undo",e[e["Redo"]=1]="Redo",e[e["AcceptWord"]=2]="AcceptWord",e[e["Other"]=3]="Other"}(Te||(Te={}));var Ne=i(18760),Ae=i(2463),Oe=i(79266);class Pe extends u.jG{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,t,i){super(),this.editor=e,this.suggestControllerPreselector=t,this.onWillAccept=i,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new x.vl),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const n=Oe.D.get(this.editor);if(n){this._register(n.registerSelector({priority:100,select:(e,t,i)=>{const o=this.editor.getModel();if(!o)return-1;const s=this.suggestControllerPreselector(),r=s?se(s,o):void 0;if(!r)return-1;const a=w.y.lift(t),l=i.map(((e,t)=>{const i=Me.fromSuggestion(n,o,a,e,this.isShiftKeyPressed),s=se(i.toSingleTextEdit(),o),l=re(r,s);return{index:t,valid:l,prefixLength:s.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),c=(0,K.Cn)(l,(0,q.VE)((e=>e.prefixLength),q.U9));return c?c.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(n.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(n.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(n.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(x.Jh.once(n.model.onDidTrigger)((e=>{t()}))),this._register(n.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const o=Me.fromSuggestion(n,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(o)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();this._isActive===e&&Fe(this._currentSuggestItemInfo,t)||(this._isActive=e,this._currentSuggestItemInfo=t,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){const e=Oe.D.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?Me.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=Oe.D.get(this.editor);e?.stopForceRenderingAbove()}forceRenderingAbove(){const e=Oe.D.get(this.editor);e?.forceRenderingAbove()}}class Me{static fromSuggestion(e,t,i,n,o){let{insertText:s}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new Ne.fr).parse(s);e.children.length<100&&Ae.O.adjustWhitespace(t,i,!0,e),s=e.toString(),r=!0}const a=e.getOverwriteInfo(n,o);return new Me(I.Q.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),s,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new ee.GE(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new X.WR(this.range,this.insertText)}}function Fe(e,t){return e===t||!(!e||!t)&&e.equals(t)}var Be,We=i(41337),He=i(17300),Ve=i(4380),je=i(32828),ze=i(18904),Ue=i(13046),$e=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},qe=function(e,t){return function(i,n){t(i,n,e)}};let Ke=class extends u.jG{static{Be=this}static{this.ID="editor.contrib.inlineCompletionsController"}static get(e){return e.getContribution(Be.ID)}constructor(e,t,i,n,o,r,a,d,g,C){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=o,this._debounceService=r,this._languageFeaturesService=a,this._accessibilitySignalService=d,this._keybindingService=g,this._accessibilityService=C,this._editorObs=(0,y.Ud)(this.editor),this._positions=(0,s.un)(this,(e=>this._editorObs.selections.read(e)?.map((e=>e.getEndPosition()))??[new w.y(1,1)])),this._suggestWidgetAdaptor=this._register(new Pe(this.editor,(()=>(this._editorObs.forceUpdate(),this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(void 0))),(e=>this._editorObs.forceUpdate((t=>{this.model.get()?.handleSuggestAccepted(e)}))))),this._suggestWidgetSelectedItem=(0,s.y0)(this,(e=>this._suggestWidgetAdaptor.onDidSelectedItemChange((()=>{this._editorObs.forceUpdate((t=>e(void 0)))}))),(()=>this._suggestWidgetAdaptor.selectedItem)),this._enabledInConfig=(0,s.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).enabled)),this._isScreenReaderEnabled=(0,s.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this._editorDictationInProgress=(0,s.y0)(this,this._contextKeyService.onDidChangeContext,(()=>!0===this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress"))),this._enabled=(0,s.un)(this,(e=>this._enabledInConfig.read(e)&&(!this._isScreenReaderEnabled.read(e)||!this._editorDictationInProgress.read(e)))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model=(0,m.a0)(this,(e=>{if(this._editorObs.isReadonly.read(e))return;const t=this._editorObs.model.read(e);if(!t)return;const i=this._instantiationService.createInstance(Le,t,this._suggestWidgetSelectedItem,this._editorObs.versionId,this._positions,this._debounceValue,(0,s.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(119).preview)),(0,s.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(119).previewMode)),(0,s.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).mode)),this._enabled);return i})).recomputeInitiallyAndOnChange(this._store),this._ghostTexts=(0,s.un)(this,(e=>{const t=this.model.read(e);return t?.ghostTexts.read(e)??[]})),this._stablizedGhostTexts=Ge(this._ghostTexts,this._store),this._ghostTextWidgets=(0,_.Rl)(this,this._stablizedGhostTexts,((e,t)=>t.add(this._instantiationService.createInstance(V,this.editor,{ghostText:e,minReservedLineCount:(0,s.lk)(0),targetTextModel:this.model.map((e=>e?.textModel))})))).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=(0,s.Yd)(this),this._fontFamily=(0,s.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).fontFamily)),this._register(new c.p(this._contextKeyService,this.model)),this._register((0,y.jD)(this._editorObs.onDidType,((e,t)=>{this._enabled.get()&&this.model.get()?.trigger()}))),this._register(this._commandService.onDidExecuteCommand((t=>{const i=new Set([b.Yh.Tab.id,b.Yh.DeleteLeft.id,b.Yh.DeleteRight.id,l.Wt,"acceptSelectedSuggestion"]);i.has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&this._editorObs.forceUpdate((e=>{this.model.get()?.trigger(e)}))}))),this._register((0,y.jD)(this._editorObs.selections,((e,t)=>{t.some((e=>3===e.reason||"api"===e.source))&&this.model.get()?.stop()}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||$.bo.dropDownVisible||(0,s.Rn)((e=>{this.model.get()?.stop(e)}))}))),this._register((0,s.fm)((e=>{const t=this.model.read(e)?.state.read(e);t?.suggestItem?t.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register((0,u.s)((()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()})));const S=(0,_.ZX)(this,((e,t)=>{const i=this.model.read(e),n=i?.state.read(e);return this._suggestWidgetSelectedItem.get()?t:n?.inlineCompletion?.semanticId}));this._register((0,y.Qg)((0,s.un)((e=>(this._playAccessibilitySignal.read(e),S.read(e),{}))),(async(e,t,i)=>{const n=this.model.get(),o=n?.state.get();if(!o||!n)return;const r=n.textModel.getLineContent(o.primaryGhostText.lineNumber);await(0,p.wR)(50,(0,f.bs)(i)),await(0,s.oJ)(this._suggestWidgetSelectedItem,v.b0,(()=>!1),(0,f.bs)(i)),await this._accessibilitySignalService.playSignal(Ve.Rh.inlineSuggestion),this.editor.getOption(8)&&this._provideScreenReaderUpdate(o.primaryGhostText.renderForScreenReader(r))}))),this._register(new $.Pm(this.editor,this.model,this._instantiationService)),this._register(h((0,s.un)((e=>{const t=this._fontFamily.read(e);return""===t||"default"===t?"":`\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${t};\n}`})))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(150)&&(n=(0,We.kg)("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),(0,g.xE)(n?e+", "+n:e)}shouldShowHoverAt(e){const t=this.model.get()?.primaryGhostText.get();return!!t&&t.parts.some((i=>e.containsPosition(new w.y(t.lineNumber,i.column))))}shouldShowHoverAtViewZone(e){return this._ghostTextWidgets.get()[0]?.ownsViewZone(e)??!1}};function Ge(e,t){const i=(0,s.FY)("result",[]),n=[];return t.add((0,s.fm)((t=>{const o=e.read(t);(0,s.Rn)((e=>{if(o.length!==n.length){n.length=o.length;for(let e=0;et.set(o[i],e)))}))}))),i}Ke=Be=$e([qe(1,ke._Y),qe(2,ze.fN),qe(3,je.pG),qe(4,Se.d),qe(5,C.ILanguageFeatureDebounceService),qe(6,S.ILanguageFeaturesService),qe(7,Ve.Nt),qe(8,Ue.b),qe(9,He.j)],Ke);var Qe=i(69547),Ye=i(6330);class Ze extends n.ks{static{this.ID=l.PA}constructor(){super({id:Ze.ID,label:We.kg("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){const i=Ke.get(t);i?.model.get()?.next()}}class Xe extends n.ks{static{this.ID=l.Vl}constructor(){super({id:Xe.ID,label:We.kg("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){const i=Ke.get(t);i?.model.get()?.previous()}}class Je extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:We.kg("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:a.R.writable})}async run(e,t){const i=Ke.get(t);await(0,r.fL)((async e=>{await(i?.model.get()?.triggerExplicitly(e)),i?.playAccessibilitySignal(e)}))}}class et extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:We.kg("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible)},menuOpts:[{menuId:Ye.D8.InlineSuggestionToolbar,title:We.kg("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){const i=Ke.get(t);await(i?.model.get()?.acceptNextWord(i.editor))}}class tt extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:We.kg("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:Ye.D8.InlineSuggestionToolbar,title:We.kg("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){const i=Ke.get(t);await(i?.model.get()?.acceptNextLine(i.editor))}}class it extends n.ks{constructor(){super({id:l.Wt,label:We.kg("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:c.p.inlineSuggestionVisible,menuOpts:[{menuId:Ye.D8.InlineSuggestionToolbar,title:We.kg("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ze.M$.and(c.p.inlineSuggestionVisible,a.R.tabMovesFocus.toNegated(),c.p.inlineSuggestionHasIndentationLessThanTabSize,Qe.ob.Visible.toNegated(),a.R.hoverFocused.toNegated())}})}async run(e,t){const i=Ke.get(t);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}class nt extends n.ks{static{this.ID="editor.action.inlineSuggest.hide"}constructor(){super({id:nt.ID,label:We.kg("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:c.p.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=Ke.get(t);(0,s.Rn)((e=>{i?.model.get()?.stop(e)}))}}class ot extends Ye.L{static{this.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}constructor(){super({id:ot.ID,title:We.kg("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Ye.D8.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ze.M$.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){const i=e.get(je.pG),n=i.getValue("editor.inlineSuggest.showToolbar"),o="always"===n?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",o)}}var st=i(42325),rt=i(36511),at=i(10170),lt=i(11086),ct=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},dt=function(e,t){return function(i,n){t(i,n,e)}};class ut{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let ht=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Ke.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new o.mm(1e3,this,I.Q.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(7===i.type&&t.shouldShowHoverAt(i.range))return new o.mm(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(6===i.type){const n=i.detail.mightBeForeignElement;if(n&&t.shouldShowHoverAt(i.range))return new o.mm(1e3,this,i.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if("onHover"!==this._editor.getOption(62).showToolbar)return[];const i=Ke.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new ut(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new u.Cm,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&i.add(this.renderScreenReaderText(e,n));const r=n.controller.model.get(),a=this._instantiationService.createInstance($.bo,this._editor,!1,(0,s.lk)(null),r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands),l=a.getDomNode();e.fragment.appendChild(l),r.triggerExplicitly(),i.add(a);const c={hoverPart:n,hoverElement:l,dispose(){i.dispose()}};return new o.Ke([c])}renderScreenReaderText(e,t){const i=new u.Cm,n=d.$,o=n("div.hover-row.markdown-hover"),r=d.BC(o,n("div.hover-contents",{["aria-live"]:"assertive"})),a=i.add(new rt.T({editor:this._editor},this._languageService,this._openerService)),l=t=>{i.add(a.onDidRenderAsync((()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=We.kg("inlineSuggestionFollows","Suggestion:"),o=i.add(a.render((new st.Bc).appendText(n).appendCodeblock("text",t)));r.replaceChildren(o.element)};return i.add((0,s.fm)((e=>{const i=t.controller.model.read(e)?.primaryGhostText.read(e);if(i){const e=this._editor.getModel().getLineContent(i.lineNumber);l(i.renderForScreenReader(e))}else d.Ln(r)}))),e.fragment.appendChild(o),i}};ht=ct([dt(1,D.L),dt(2,at.C),dt(3,He.j),dt(4,ke._Y),dt(5,lt.k)],ht);class gt{}var pt=i(3115);(0,n.HW)(Ke.ID,Ke,3),(0,n.Fl)(Je),(0,n.Fl)(Ze),(0,n.Fl)(Xe),(0,n.Fl)(et),(0,n.Fl)(tt),(0,n.Fl)(it),(0,n.Fl)(nt),(0,Ye.ug)(ot),o.B2.register(ht),pt.Z.register(new gt)},85029:(e,t,i)=>{"use strict";i.d(t,{AL:()=>u,Vs:()=>d,x9:()=>h,xD:()=>l,yP:()=>c});var n=i(85053),o=i(20601),s=i(36788),r=i(8690),a=i(362);class l{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every(((t,i)=>t.equals(e.parts[i])))}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1),n=new a.mF([...this.parts.map((e=>new a.WR(r.Q.fromPositions(new s.y(1,e.column)),e.lines.join("\n"))))]).applyToString(i);return n.substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class c{constructor(e,t,i){this.column=e,this.text=t,this.preview=i,this.lines=(0,o.uz)(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class d{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.text=i,this.additionalReservedLineCount=n,this.parts=[new c(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=(0,o.uz)(this.text)}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every(((t,i)=>t===e.newLines[i]))&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function u(e,t){return(0,n.aI)(e,t,h)}function h(e,t){return e===t||!(!e||!t)&&((e instanceof l&&t instanceof l||e instanceof d&&t instanceof d)&&e.equals(t))}},46576:(e,t,i)=>{"use strict";i.d(t,{Yk:()=>y});var n=i(79109),o=i(9659),s=i(67792),r=i(21553),a=i(14396),l=i(36788),c=i(8690),d=i(39399),u=i(94150),h=i(87867),g=i(55239),p=i(39029);function f(e,t){const i=new g.Mg,n=new d.Z(i,(e=>t.getLanguageConfiguration(e))),o=new p.tk(new m([e]),n),s=(0,h.T)(o,[],void 0,!0);let r="";const a=e.getLineContent();function l(e,t){if(2===e.kind)if(l(e.openingBracket,t),t=(0,u.QB)(t,e.openingBracket.length),e.child&&(l(e.child,t),t=(0,u.QB)(t,e.child.length)),e.closingBracket)l(e.closingBracket,t),t=(0,u.QB)(t,e.closingBracket.length);else{const t=n.getSingleLanguageBracketTokens(e.openingBracket.languageId),i=t.findClosingTokenText(e.openingBracket.bracketIds);r+=i}else if(3===e.kind);else if(0===e.kind||1===e.kind)r+=a.substring((0,u.sS)(t),(0,u.sS)((0,u.QB)(t,e.length)));else if(4===e.kind)for(const i of e.children)l(i,t),t=(0,u.QB)(t,i.length)}return l(s,u.Vp),r}class m{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var _=i(362),v=i(39842),b=i(18760);async function y(e,t,i,n,c=s.XO.None,d){const u=t instanceof l.y?k(t,i):t,h=e.all(i),g=new r.db;for(const o of h)o.groupId&&g.add(o.groupId,o);function p(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=g.get(i);for(const i of e)t.push(i)}return t}const f=new Map,m=new Set;function _(e,t){if(t=[...t,e],m.has(e))return t;m.add(e);try{const i=p(e);for(const e of i){const i=_(e,t);if(i)return i}}finally{m.delete(e)}}function v(e){const s=f.get(e);if(s)return s;const r=_(e,[]);r&&(0,a.M_)(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const d=new o.Zv;return f.set(e,d.p),(async()=>{if(!r){const t=p(e);for(const e of t){const t=await v(e);if(t&&t.items.length>0)return}}try{if(t instanceof l.y){const o=await e.provideInlineCompletions(i,t,n,c);return o}{const o=await(e.provideInlineEdits?.(i,t,n,c));return o}}catch(o){return void(0,a.M_)(o)}})().then((e=>d.complete(e)),(e=>d.error(e))),d.p}const b=await Promise.all(h.map((async e=>({provider:e,completions:await v(e)})))),y=new Map,x=[];for(const o of b){const e=o.completions;if(!e)continue;const t=new C(e,o.provider);x.push(t);for(const n of e.items){const e=S.from(n,t,u,i,d);y.set(e.hash(),e)}}return new w(Array.from(y.values()),new Set(y.keys()),x)}class w{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class C{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class S{static from(e,t,i,o,s){let r,a,l=e.range?c.Q.lift(e.range):i;if("string"===typeof e.insertText){if(r=e.insertText,s&&e.completeBracketPairs){r=x(r,l.getStartPosition(),o,s);const t=r.length-e.insertText.length;0!==t&&(l=new c.Q(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+t))}a=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(s&&e.completeBracketPairs){e.insertText.snippet=x(e.insertText.snippet,l.getStartPosition(),o,s);const i=e.insertText.snippet.length-t;0!==i&&(l=new c.Q(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+i))}const i=(new b.fr).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof b.EY?(r=i.children[0].value,a=void 0):(r=i.toString(),a={snippet:e.insertText.snippet,range:l})}else(0,n.xb)(e.insertText);return new S(r,e.command,l,r,a,e.additionalTextEdits||(0,v.zk)(),e,t)}constructor(e,t,i,n,o,s,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=r,this.source=a,e=e.replace(/\r\n|\r/g,"\n"),n=e.replace(/\r\n|\r/g,"\n")}withRange(e){return new S(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new _.WR(this.range,this.insertText)}}function k(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new c.Q(e.lineNumber,i.startColumn,e.lineNumber,n):c.Q.fromPositions(e,e.with(void 0,n))}function x(e,t,i,n){const o=i.getLineContent(t.lineNumber).substring(0,t.column-1),s=o+e,r=i.tokenization.tokenizeLineWithEdit(t,s.length-(t.column-1),e),a=r?.sliceAndInflate(t.column-1,s.length,0);if(!a)return e;const l=f(a,n);return l}},39842:(e,t,i)=>{"use strict";i.d(t,{GM:()=>d,OA:()=>h,pY:()=>u,tN:()=>g,zk:()=>c});var n=i(14396),o=i(5091),s=i(39751),r=i(36788),a=i(8690);const l=[];function c(){return l}class d{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new n.D7(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new a.Q(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function u(e,t){const i=new o.Cm,n=e.createDecorationsCollection();return i.add((0,s.zL)({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function h(e,t){return new r.y(e.lineNumber+t.lineNumber-1,1===t.lineNumber?e.column+t.column-1:t.column)}function g(e,t){return new r.y(e.lineNumber-t.lineNumber+1,e.lineNumber-t.lineNumber===0?e.column-t.column+1:e.column)}},26642:(e,t,i)=>{"use strict";var n=i(16259),o=i(57479);const s="editor.action.inlineEdit.accept",r="editor.action.inlineEdit.reject",a="editor.action.inlineEdit.jumpTo",l="editor.action.inlineEdit.jumpBack";var c=i(5091),d=i(39751),u=i(28346),h=i(36788),g=i(8690),p=i(14573),f=i(9322),m=i(1550),_=i(39842),v=i(88402),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};const w="inline-edit";let C=class extends c.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,d.FY)(this,!1),this.currentTextModel=(0,d.y0)(this,this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,d.un)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;let n=this.model.range?.read(e);n&&n.startLineNumber===n.endLineNumber&&n.startColumn===n.endColumn&&(n=void 0);const o=(!n||n.startLineNumber===n.endLineNumber)&&1===i.parts.length&&1===i.parts[0].lines.length,s=1===i.parts.length&&i.parts[0].lines.every((e=>0===e.length)),r=[],a=[];function l(e,t){if(a.length>0){const i=a[a.length-1];t&&i.decorations.push(new m.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)a.push({content:i,decorations:t?[new m.d(1,i.length+1,t,0)]:[]})}const c=t.getLineContent(i.lineNumber);let d,u=0;if(!s&&(o||!n)){for(const e of i.parts){let t=e.lines;n&&!o&&(l(t,w),t=[]),void 0===d?(r.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):l([c.substring(u,e.column-1)],void 0),t.length>0&&(l(t,w),void 0===d&&e.column<=c.length&&(d=e.column)),u=e.column-1}void 0!==d&&l([c.substring(u)],void 0)}const h=void 0!==d?new _.GM(d,c.length+1):void 0,g=o||!n?i.lineNumber:n.endLineNumber-1;return{inlineTexts:r,additionalLines:a,hiddenRange:h,lineNumber:g,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t,range:n,isSingleLine:o,isPureRemove:s}})),this.decorations=(0,d.un)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];if(t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),t.range){const e=[];if(t.isSingleLine)e.push(t.range);else if(!t.isPureRemove){const i=t.range.endLineNumber-t.range.startLineNumber;for(let n=0;n{this.isDisposed.set(!0,void 0)}))),this._register((0,_.pY)(this.editor,this.decorations))}};C=b([y(2,p.L)],C);var S,k=i(18904),x=i(87778),E=i(35350),L=i(12847),T=i(67792),I=i(85029),R=i(72786),D=i(2150),N=i(92678),A=i(55664),O=i(85053),P=i(25160),M=i(85141),F=i(64164),B=i(6330),W=i(46403),H=i(13046),V=i(11086),j=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z=function(e,t){return function(i,n){t(i,n,e)}};let U=class extends c.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,d.y0)(this,this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(63).showToolbar)),this.sessionPosition=void 0,this.position=(0,d.un)(this,(e=>{const t=this.model.read(e)?.model.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||0===t.parts.length)return this.sessionPosition=void 0,null;const i=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);const n=new h.y(t.lineNumber,Math.min(i,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=n,n})),this._register((0,d.yC)(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const o=i.add(this.instantiationService.createInstance($,this.editor,!0,this.position));e.addContentWidget(o),i.add((0,c.s)((()=>e.removeContentWidget(o))))})))}};U=j([z(2,x._Y)],U);let $=class extends c.jG{static{S=this}static{this._dropDownVisible=!1}static{this.id=0}constructor(e,t,i,n,o,s){super(),this.editor=e,this.withBorder=t,this._position=i,this._contextKeyService=o,this._menuService=s,this.id="InlineEditHintsContentWidget"+S.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,D.h)("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[(0,D.h)("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(B.D8.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(n.createInstance(K,this.nodes.toolBar,this.editor,B.D8.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof B.Xe)return n.createInstance(q,e,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{S._dropDownVisible=e}))),this._register((0,d.fm)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,d.fm)((e=>{const t=[];for(const[i,n]of this.inlineCompletionsActionsMenus.getActions())for(const e of n)e instanceof B.Xe&&t.push(e);t.length>0&&t.unshift(new A.wv),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};$=S=j([z(3,x._Y),z(4,k.fN),z(5,B.ez)],$);class q extends M.oq{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,D.h)("div.keybinding").root,i=this._register(new N.x(t,P.OS,{disableTitle:!0,...N.l}));i.set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let K=class extends F.p{constructor(e,t,i,n,o,s,r,a,l,c){super(e,{resetMenu:i,...n},o,s,r,a,l,c),this.editor=t,this.menuId=i,this.options2=n,this.menuService=o,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this._store.add(this.editor.onDidChangeCursorPosition((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){const e=[],t=[];(0,M.Ot)(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setAdditionalSecondaryActions(e){(0,O.aI)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};K=j([z(4,B.ez),z(5,k.fN),z(6,W.Z),z(7,H.b),z(8,R.d),z(9,V.k)],K);var G,Q,Y=i(32828),Z=i(14396),X=i(42389),J=i(29133),ee=i(55745),te=i(50576),ie=i(41843),ne=i(65764),oe=i(35037),se=i(69361),re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};function*le(e,t,i=1){void 0===t&&([t,e]=[e,0]);for(let n=e;ne.replace(new RegExp("^"+t),""))),shift:i}}let de=class extends c.jG{static{G=this}static{this._modelId=0}static _createUniqueUri(){return J.r.from({scheme:"inline-edit-widget",path:(new Date).toString()+String(G._modelId++)})}constructor(e,t,i,n,o){super(),this._editor=e,this._model=t,this._instantiationService=i,this._diffProviderFactoryService=n,this._modelService=o,this._position=(0,d.un)(this,(e=>{const t=this._model.read(e);if(!t||0===t.text.length)return null;if(t.range.startLineNumber===t.range.endLineNumber&&(t.range.startColumn!==t.range.endColumn||1!==t.range.startColumn))return null;const i=this._editor.getModel();if(!i)return null;const n=Array.from(le(t.range.startLineNumber,t.range.endLineNumber+1)),o=n.map((e=>i.getLineLastNonWhitespaceColumn(e))),s=Math.max(...o),r=n[o.indexOf(s)],a=new h.y(r,s),l={top:t.range.startLineNumber,left:a};return l})),this._text=(0,d.un)(this,(e=>{const t=this._model.read(e);if(!t)return{text:"",shift:0};const i=ce(t.text.split("\n"));return{text:i.text.join("\n"),shift:i.shift}})),this._originalModel=(0,X.a0)((()=>this._modelService.createModel("",null,G._createUniqueUri()))).keepObserved(this._store),this._modifiedModel=(0,X.a0)((()=>this._modelService.createModel("",null,G._createUniqueUri()))).keepObserved(this._store),this._diff=(0,d.un)(this,(e=>this._diffPromise.read(e)?.promiseResult.read(e)?.data)),this._diffPromise=(0,d.un)(this,(e=>{const t=this._model.read(e);if(!t)return;const i=this._editor.getModel();if(!i)return;const n=ce(i.getValueInRange(t.range).split("\n")).text.join("\n"),o=ce(t.text.split("\n")).text.join("\n");this._originalModel.get().setValue(n),this._modifiedModel.get().setValue(o);const s=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return d.BK.fromFn((async()=>{const e=await s.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},T.XO.None);if(!e.identical)return e.changes}))})),this._register((0,d.yC)(((t,i)=>{const n=this._model.read(t);if(!n)return;if(null===this._position.get())return;const o=i.add(this._instantiationService.createInstance(ue,this._editor,this._position,this._text.map((e=>e.text)),this._text.map((e=>e.shift)),this._diff));e.addOverlayWidget(o),i.add((0,c.s)((()=>e.removeOverlayWidget(o))))})))}};de=G=re([ae(2,x._Y),ae(3,ie.Hg),ae(4,se.IModelService)],de);let ue=class extends c.jG{static{Q=this}static{this.id=0}constructor(e,t,i,n,o,s){super(),this._editor=e,this._position=t,this._text=i,this._shift=n,this._diff=o,this._instantiationService=s,this.id="InlineEditSideBySideContentWidget"+Q.id++,this.allowEditorOverflow=!1,this._nodes=(0,D.$)("div.inlineEditSideBySide",void 0),this._scrollChanged=(0,d.yQ)("editor.onDidScrollChange",this._editor.onDidScrollChange),this._previewEditor=this._register(this._instantiationService.createInstance(te.t,this._nodes,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1,handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off",wrappingIndent:"none",wrappingStrategy:void 0},{contributions:[],isSimpleWidget:!0},this._editor)),this._previewEditorObs=(0,ee.Ud)(this._previewEditor),this._editorObs=(0,ee.Ud)(this._editor),this._previewTextModel=this._register(this._instantiationService.createInstance(oe.Bz,"",this._editor.getModel()?.getLanguageId()??ne.vH,oe.Bz.DEFAULT_CREATION_OPTIONS,null)),this._setText=(0,d.un)((e=>{const t=this._text.read(e);t&&this._previewTextModel.setValue(t)})).recomputeInitiallyAndOnChange(this._store),this._decorations=(0,d.un)(this,(e=>{this._setText.read(e);const t=this._position.read(e);if(!t)return{org:[],mod:[]};const i=this._diff.read(e);if(!i)return{org:[],mod:[]};const n=[],o=[];if(1===i.length&&i[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return{org:[],mod:[]};const s=this._shift.get(),r=e=>new g.Q(e.startLineNumber+t.top-1,e.startColumn+s,e.endLineNumber+t.top-1,e.endColumn+s);for(const a of i)if(a.original.isEmpty||n.push({range:r(a.original.toInclusiveRange()),options:v.Ob}),a.modified.isEmpty||o.push({range:a.modified.toInclusiveRange(),options:v.Kl}),a.modified.isEmpty||a.original.isEmpty)a.original.isEmpty||n.push({range:r(a.original.toInclusiveRange()),options:v.KL}),a.modified.isEmpty||o.push({range:a.modified.toInclusiveRange(),options:v.Ou});else for(const e of a.innerChanges||[])a.original.contains(e.originalRange.startLineNumber)&&n.push({range:r(e.originalRange),options:e.originalRange.isEmpty()?v.wp:v.Zb}),a.modified.contains(e.modifiedRange.startLineNumber)&&o.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()?v.GM:v.bk});return{org:n,mod:o}})),this._originalDecorations=(0,d.un)(this,(e=>this._decorations.read(e).org)),this._modifiedDecorations=(0,d.un)(this,(e=>this._decorations.read(e).mod)),this._previewEditor.setModel(this._previewTextModel),this._register(this._editorObs.setDecorations(this._originalDecorations)),this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)),this._register((0,d.fm)((e=>{const t=this._previewEditorObs.contentWidth.read(e),i=this._text.read(e).split("\n").length-1,n=this._editor.getOption(67)*i;t<=0||this._previewEditor.layout({height:n,width:t})}))),this._register((0,d.fm)((e=>{this._position.read(e),this._editor.layoutOverlayWidget(this)}))),this._register((0,d.fm)((e=>{this._scrollChanged.read(e);const t=this._position.read(e);t&&this._editor.layoutOverlayWidget(this)})))}getId(){return this.id}getDomNode(){return this._nodes}getPosition(){const e=this._position.get();if(!e)return null;const t=this._editor.getLayoutInfo(),i=this._editor.getScrolledVisiblePosition(new h.y(e.top,1));if(!i)return null;const n=i.top-1,o=this._editor.getOffsetForColumn(e.left.lineNumber,e.left.column),s=t.contentLeft+o+10;return{preference:{left:s,top:n}}}};ue=Q=re([ae(5,x._Y)],ue);var he,ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},pe=function(e,t){return function(i,n){t(i,n,e)}};let fe=class extends c.jG{static{he=this}static{this.ID="editor.contrib.inlineEditController"}static{this.inlineEditVisibleKey="inlineEditVisible"}static{this.inlineEditVisibleContext=new k.N1(this.inlineEditVisibleKey,!1)}static{this.cursorAtInlineEditKey="cursorAtInlineEdit"}static{this.cursorAtInlineEditContext=new k.N1(this.cursorAtInlineEditKey,!1)}static get(e){return e.getContribution(he.ID)}constructor(e,t,i,n,o,s,r,a){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.languageFeaturesService=n,this._commandService=o,this._configurationService=s,this._diffProviderFactoryService=r,this._modelService=a,this._isVisibleContext=he.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=he.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=(0,d.FY)(this,void 0),this._currentWidget=(0,X.a0)(this._currentEdit,(e=>{const t=this._currentEdit.read(e);if(!t)return;const i=t.range.endLineNumber,n=t.range.endColumn,o=!t.text.endsWith("\n")||t.range.startLineNumber===t.range.endLineNumber&&t.range.startColumn===t.range.endColumn?t.text:t.text.slice(0,-1),s=new I.xD(i,[new I.yP(n,o,!1)]),r=t.range.startLineNumber===t.range.endLineNumber&&1===s.parts.length&&1===s.parts[0].lines.length,a=""===t.text;if(!r&&!a)return;const l=this.instantiationService.createInstance(C,this.editor,{ghostText:(0,d.lk)(s),minReservedLineCount:(0,d.lk)(0),targetTextModel:(0,d.lk)(this.editor.getModel()??void 0),range:(0,d.lk)(t.range)});return l})),this._isAccepting=(0,d.FY)(this,!1),this._enabled=(0,d.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).enabled)),this._fontFamily=(0,d.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).fontFamily));const l=(0,d.yQ)("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register((0,d.fm)((t=>{this._enabled.read(t)&&(l.read(t),this._isAccepting.read(t)||this.getInlineEdit(e,!0))})));const c=(0,d.y0)(this,e.onDidChangeCursorPosition,(()=>e.getPosition()));this._register((0,d.fm)((e=>{if(!this._enabled.read(e))return;const t=c.read(e);t&&this.checkCursorPosition(t)}))),this._register((0,d.fm)((t=>{const i=this._currentEdit.read(t);if(this._isCursorAtInlineEditContext.set(!1),!i)return void this._isVisibleContext.set(!1);this._isVisibleContext.set(!0);const n=e.getPosition();n&&this.checkCursorPosition(n)})));const u=(0,d.yQ)("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register((0,d.fm)((async t=>{this._enabled.read(t)&&(u.read(t),this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur||(this._currentRequestCts?.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))})));const h=(0,d.yQ)("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register((0,d.fm)((t=>{this._enabled.read(t)&&(h.read(t),this.getInlineEdit(e,!0))})));const g=this._register((0,D.jh)());this._register((0,d.fm)((e=>{const t=this._fontFamily.read(e);g.setStyle(""===t||"default"===t?"":`\n.monaco-editor .inline-edit-decoration,\n.monaco-editor .inline-edit-decoration-preview,\n.monaco-editor .inline-edit {\n\tfont-family: ${t};\n}`)}))),this._register(new U(this.editor,this._currentWidget,this.instantiationService)),this._register(new de(this.editor,this._currentEdit,this.instantiationService,this._diffProviderFactoryService,this._modelService))}checkCursorPosition(e){if(!this._currentEdit)return void this._isCursorAtInlineEditContext.set(!1);const t=this._currentEdit.get();t?this._isCursorAtInlineEditContext.set(g.Q.containsPosition(t.range,e)):this._isCursorAtInlineEditContext.set(!1)}validateInlineEdit(e,t){if(t.text.includes("\n")&&t.range.startLineNumber!==t.range.endLineNumber&&t.range.startColumn!==t.range.endColumn){const i=t.range.startColumn;if(1!==i)return!1;const n=t.range.endLineNumber,o=t.range.endColumn,s=e.getModel()?.getLineLength(n)??0;if(o!==s+1)return!1}return!0}async fetchInlineEdit(e,t){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const i=e.getModel();if(!i)return;const n=i.getVersionId(),o=this.languageFeaturesService.inlineEditProvider.all(i);if(0===o.length)return;const s=o[0];this._currentRequestCts=new T.Qi;const r=this._currentRequestCts.token,a=t?E.sm.Automatic:E.sm.Invoke,l=t;if(l&&await me(50,r),r.isCancellationRequested||i.isDisposed()||i.getVersionId()!==n)return;const c=await s.provideInlineEdit(i,{triggerKind:a},r);return c&&!r.isCancellationRequested&&!i.isDisposed()&&i.getVersionId()===n&&this.validateInlineEdit(e,c)?c:void 0}async getInlineEdit(e,t){this._isCursorAtInlineEditContext.set(!1),await this.clear();const i=await this.fetchInlineEdit(e,t);i&&this._currentEdit.set(i,void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){this._isAccepting.set(!0,void 0);const e=this._currentEdit.get();if(!e)return;let t=e.text;e.text.startsWith("\n")&&(t=e.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[u.k.replace(g.Q.lift(e.range),t)]),e.accepted&&await this._commandService.executeCommand(e.accepted.id,...e.accepted.arguments||[]).then(void 0,Z.M_),this.freeEdit(e),(0,d.Rn)((e=>{this._currentEdit.set(void 0,e),this._isAccepting.set(!1,e)}))}jumpToCurrent(){this._jumpBackPosition=this.editor.getSelection()?.getStartPosition();const e=this._currentEdit.get();if(!e)return;const t=h.y.lift({lineNumber:e.range.startLineNumber,column:e.range.startColumn});this.editor.setPosition(t),this.editor.revealPositionInCenterIfOutsideViewport(t)}async clear(e=!0){const t=this._currentEdit.get();t&&t?.rejected&&e&&await this._commandService.executeCommand(t.rejected.id,...t.rejected.arguments||[]).then(void 0,Z.M_),t&&this.freeEdit(t),this._currentEdit.set(void 0,void 0)}freeEdit(e){const t=this.editor.getModel();if(!t)return;const i=this.languageFeaturesService.inlineEditProvider.all(t);0!==i.length&&i[0].freeInlineEdit(e)}};function me(e,t){return new Promise((i=>{let n;const o=setTimeout((()=>{n&&n.dispose(),i()}),e);t&&(n=t.onCancellationRequested((()=>{clearTimeout(o),n&&n.dispose(),i()})))}))}fe=he=ge([pe(1,x._Y),pe(2,k.fN),pe(3,L.ILanguageFeaturesService),pe(4,R.d),pe(5,Y.pG),pe(6,ie.Hg),pe(7,se.IModelService)],fe);class _e extends n.ks{constructor(){super({id:s,label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:k.M$.and(o.R.writable,fe.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:k.M$.and(o.R.writable,fe.inlineEditVisibleContext,fe.cursorAtInlineEditContext)}],menuOpts:[{menuId:B.D8.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,t){const i=fe.get(t);await(i?.accept())}}class ve extends n.ks{constructor(){const e=k.M$.and(o.R.writable,k.M$.not(fe.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,t){const i=fe.get(t);i?.trigger()}}class be extends n.ks{constructor(){const e=k.M$.and(o.R.writable,fe.inlineEditVisibleContext,k.M$.not(fe.cursorAtInlineEditKey));super({id:a,label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:B.D8.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,t){const i=fe.get(t);i?.jumpToCurrent()}}class ye extends n.ks{constructor(){const e=k.M$.and(o.R.writable,fe.cursorAtInlineEditContext);super({id:l,label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:B.D8.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,t){const i=fe.get(t);i?.jumpBack()}}class we extends n.ks{constructor(){const e=k.M$.and(o.R.writable,fe.inlineEditVisibleContext);super({id:r,label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:B.D8.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,t){const i=fe.get(t);await(i?.clear())}}(0,n.Fl)(_e),(0,n.Fl)(we),(0,n.Fl)(be),(0,n.Fl)(ye),(0,n.Fl)(ve),(0,n.HW)(fe.ID,fe,3)},12842:(e,t,i)=>{"use strict";var n=i(16259),o=i(25923),s=i(39751),r=i(81275),a=i(50576),l=i(57479),c=i(41337),d=i(18904);const u="editor.action.inlineEdits.accept",h="editor.action.inlineEdits.showPrevious",g="editor.action.inlineEdits.showNext",p=new d.N1("inlineEditsVisible",!1,(0,c.kg)("inlineEditsVisible","Whether an inline edit is visible")),f=new d.N1("inlineEditsIsPinned",!1,(0,c.kg)("isPinned","Whether an inline edit is visible"));var m=i(5091),_=i(42389),v=i(55745),b=i(34956),y=i(98581),w=i(85983),C=i(12847),S=i(9659),k=i(67792),x=i(45746),E=i(14396),L=i(29133),T=i(41843),I=i(44544),R=i(35350),D=i(69361),N=i(46576),A=i(2150),O=i(40628),P=i(88402),M=i(78787),F=i(65764),B=i(35037),W=i(10111),H=i(47805),V=i(79266),j=i(87778),z=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},U=function(e,t){return function(i,n){t(i,n,e)}};class ${constructor(e,t,i){this.range=e,this.newLines=t,this.changes=i}}let q=class extends m.jG{constructor(e,t,i,o){super(),this._editor=e,this._edit=t,this._userPrompt=i,this._instantiationService=o,this._editorObs=(0,v.Ud)(this._editor),this._elements=(0,A.h)("div.inline-edits-widget",{style:{position:"absolute",overflow:"visible",top:"0px",left:"0px"}},[(0,A.h)("div@editorContainer",{style:{position:"absolute",top:"0px",left:"0px",width:"500px",height:"500px"}},[(0,A.h)("div.toolbar@toolbar",{style:{position:"absolute",top:"-25px",left:"0px"}}),(0,A.h)("div.promptEditor@promptEditor",{style:{position:"absolute",top:"-25px",left:"80px",width:"300px",height:"22px"}}),(0,A.h)("div.preview@editor",{style:{position:"absolute",top:"0px",left:"0px"}})]),(0,A.Mc)("svg",{style:{overflow:"visible",pointerEvents:"none"}},[(0,A.Mc)("defs",[(0,A.Mc)("linearGradient",{id:"Gradient2",x1:"0",y1:"0",x2:"1",y2:"0"},[(0,A.Mc)("stop",{offset:"0%",class:"gradient-stop"}),(0,A.Mc)("stop",{offset:"100%",class:"gradient-stop"})])]),(0,A.Mc)("path@path",{d:"",fill:"url(#Gradient2)"})])]),this._previewTextModel=this._register(this._instantiationService.createInstance(B.Bz,"",F.vH,B.Bz.DEFAULT_CREATION_OPTIONS,null)),this._setText=(0,s.un)((e=>{const t=this._edit.read(e);t&&this._previewTextModel.setValue(t.newLines.join("\n"))})).recomputeInitiallyAndOnChange(this._store),this._promptTextModel=this._register(this._instantiationService.createInstance(B.Bz,"",F.vH,B.Bz.DEFAULT_CREATION_OPTIONS,null)),this._promptEditor=this._register(this._instantiationService.createInstance(a.t,this._elements.promptEditor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,placeholder:"Describe the change you want...",fontFamily:O.z},{contributions:n.dS.getSomeEditorContributions([V.D.ID,H.X.ID,W.d.ID]),isSimpleWidget:!0},this._editor)),this._previewEditor=this._register(this._instantiationService.createInstance(a.t,this._elements.editor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0},{contributions:[]},this._editor)),this._previewEditorObs=(0,v.Ud)(this._previewEditor),this._decorations=(0,s.un)(this,(e=>{this._setText.read(e);const t=this._edit.read(e)?.changes;if(!t)return[];const i=[],n=[];if(1===t.length&&t[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return[];for(const o of t)if(o.original.isEmpty||i.push({range:o.original.toInclusiveRange(),options:P.Ob}),o.modified.isEmpty||n.push({range:o.modified.toInclusiveRange(),options:P.Kl}),o.modified.isEmpty||o.original.isEmpty)o.original.isEmpty||i.push({range:o.original.toInclusiveRange(),options:P.KL}),o.modified.isEmpty||n.push({range:o.modified.toInclusiveRange(),options:P.Ou});else for(const e of o.innerChanges||[])o.original.contains(e.originalRange.startLineNumber)&&i.push({range:e.originalRange,options:e.originalRange.isEmpty()?P.wp:P.Zb}),o.modified.contains(e.modifiedRange.startLineNumber)&&n.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()?P.GM:P.bk});return n})),this._layout1=(0,s.un)(this,(e=>{const t=this._editor.getModel(),i=this._edit.read(e);if(!i)return null;const n=i.range;let o=0;for(let a=n.startLineNumber;a{const t=this._edit.read(e);if(!t)return null;const i=t.range,n=this._editorObs.scrollLeft.read(e),o=this._layout1.read(e).left+20-n,s=this._editor.getTopForLineNumber(i.startLineNumber)-this._editorObs.scrollTop.read(e),r=this._editor.getTopForLineNumber(i.endLineNumberExclusive)-this._editorObs.scrollTop.read(e),a=new G(o,s),l=new G(o,r),c=r-s,d=50,u=this._editor.getOption(67)*t.newLines.length,h=c-u,g=new G(o+d,s+h/2),p=new G(o+d,r-h/2);return{topCode:a,bottomCode:l,codeHeight:c,topEdit:g,bottomEdit:p,editHeight:u}}));const r=(0,s.un)(this,(e=>void 0!==this._edit.read(e)||void 0!==this._userPrompt.read(e)));this._register((0,M.AV)(this._elements.root,{display:(0,s.un)(this,(e=>r.read(e)?"block":"none"))})),this._register((0,M.rX)(this._editor.getDomNode(),this._elements.root)),this._register((0,v.Ud)(e).createOverlayWidget({domNode:this._elements.root,position:(0,s.lk)(null),allowEditorOverflow:!1,minContentWidthInPx:(0,s.un)((e=>{const t=this._layout1.read(e)?.left;if(void 0===t)return 0;const i=this._previewEditorObs.contentWidth.read(e);return t+i}))})),this._previewEditor.setModel(this._previewTextModel),this._register(this._previewEditorObs.setDecorations(this._decorations)),this._register((0,s.fm)((e=>{const t=this._layout.read(e);if(!t)return;const{topCode:i,bottomCode:n,topEdit:o,bottomEdit:s,editHeight:r}=t,a=10,l=0,c=40,d=(new Q).moveTo(i).lineTo(i.deltaX(a)).curveTo(i.deltaX(a+c),o.deltaX(-c-l),o.deltaX(-l)).lineTo(o).lineTo(s).lineTo(s.deltaX(-l)).curveTo(s.deltaX(-c-l),n.deltaX(a+c),n.deltaX(a)).lineTo(n).build();this._elements.path.setAttribute("d",d),this._elements.editorContainer.style.top=`${o.y}px`,this._elements.editorContainer.style.left=`${o.x}px`,this._elements.editorContainer.style.height=`${r}px`;const u=this._previewEditorObs.contentWidth.read(e);this._previewEditor.layout({height:r,width:u})}))),this._promptEditor.setModel(this._promptTextModel),this._promptEditor.layout(),this._register(Y(K(this._userPrompt,(e=>e??""),(e=>e)),(0,v.Ud)(this._promptEditor).value)),this._register((0,s.fm)((e=>{const t=(0,v.Ud)(this._promptEditor).isFocused.read(e);this._elements.root.classList.toggle("focused",t)})))}};function K(e,t,i){return(0,_.dQ)(void 0,(i=>t(e.read(i))),((t,n)=>e.set(i(t),n)))}q=z([U(3,j._Y)],q);class G{constructor(e,t){this.x=e,this.y=t}deltaX(e){return new G(this.x+e,this.y)}}class Q{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}curveTo(e,t,i){return this._data+=`C ${e.x} ${e.y} ${t.x} ${t.y} ${i.x} ${i.y} `,this}build(){return this._data}}function Y(e,t){const i=new m.Cm;return i.add((0,s.fm)((i=>{const n=e.read(i);t.set(n,void 0)}))),i.add((0,s.fm)((i=>{const n=t.read(i);e.set(n,void 0)}))),i}var Z,X=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},J=function(e,t){return function(i,n){t(i,n,e)}};let ee=class extends m.jG{static{Z=this}static{this._modelId=0}static _createUniqueUri(){return L.r.from({scheme:"inline-edits",path:(new Date).toString()+String(Z._modelId++)})}constructor(e,t,i,n,o,r,a){super(),this.textModel=e,this._textModelVersionId=t,this._selection=i,this._debounceValue=n,this.languageFeaturesService=o,this._diffProviderFactoryService=r,this._modelService=a,this._forceUpdateExplicitlySignal=(0,s.Yd)(this),this._selectedInlineCompletionId=(0,s.FY)(this,void 0),this._isActive=(0,s.FY)(this,!1),this._originalModel=(0,_.a0)((()=>this._modelService.createModel("",null,Z._createUniqueUri()))).keepObserved(this._store),this._modifiedModel=(0,_.a0)((()=>this._modelService.createModel("",null,Z._createUniqueUri()))).keepObserved(this._store),this._pinnedRange=new ie(this.textModel,this._textModelVersionId),this.isPinned=this._pinnedRange.range.map((e=>!!e)),this.userPrompt=(0,s.FY)(this,void 0),this.inlineEdit=(0,s.un)(this,(e=>this._inlineEdit.read(e)?.promiseResult.read(e)?.data)),this._inlineEdit=(0,s.un)(this,(e=>{const t=this.selectedInlineEdit.read(e);if(!t)return;const i=t.inlineCompletion.range;if(""===t.inlineCompletion.insertText.trim())return;let n=t.inlineCompletion.insertText.split(/\r\n|\r|\n/);function o(e){const t=e[0].match(/^\s*/)?.[0]??"";return e.map((e=>e.replace(new RegExp("^"+t),"")))}n=o(n);const r=this.textModel.getValueInRange(i);let a=r.split(/\r\n|\r|\n/);a=o(a),this._originalModel.get().setValue(a.join("\n")),this._modifiedModel.get().setValue(n.join("\n"));const l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return s.BK.fromFn((async()=>{const e=await l.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},k.XO.None);if(!e.identical)return new $(I.M.fromRangeInclusive(i),o(n),e.changes)}))})),this._fetchStore=this._register(new m.Cm),this._inlineEditsFetchResult=(0,s.X2)(this,void 0),this._inlineEdits=(0,s.C)({owner:this,equalsFn:x.dB},(e=>this._inlineEditsFetchResult.read(e)?.completions.map((e=>new te(e)))??[])),this._fetchInlineEditsPromise=(0,s.nb)({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:R.qw.Automatic}),handleChange:(e,t)=>(e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=R.qw.Explicit),!0)},(async(e,t)=>{function i(e,t){return t(e)}this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(e),this._textModelVersionId.read(e);const n=this._pinnedRange.range.read(e)??i(this._selection.read(e),(e=>e.isEmpty()?void 0:e));if(!n)return this._inlineEditsFetchResult.set(void 0,void 0),void this.userPrompt.set(void 0,void 0);const o={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(e)},s=(0,k.bs)(this._fetchStore);await(0,S.wR)(200,s);const r=await(0,N.Yk)(this.languageFeaturesService.inlineCompletionsProvider,n,this.textModel,o,s);s.isCancellationRequested||this._inlineEditsFetchResult.set(r,void 0)})),this._filteredInlineEditItems=(0,s.C)({owner:this,equalsFn:(0,x.S3)()},(e=>this._inlineEdits.read(e))),this.selectedInlineCompletionIndex=(0,s.un)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineEditItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineEdit=(0,s.un)(this,(e=>{const t=this._filteredInlineEditItems.read(e),i=this.selectedInlineCompletionIndex.read(e);return t[i]})),this._register((0,s.OI)(this._fetchInlineEditsPromise))}async triggerExplicitly(e){(0,s.PO)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineEditsPromise.get()}stop(e){(0,s.PO)(e,(e=>{this.userPrompt.set(void 0,e),this._isActive.set(!1,e),this._inlineEditsFetchResult.set(void 0,e),this._pinnedRange.setRange(void 0,e)}))}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineEditItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new E.D7;const t=this.selectedInlineEdit.get();t&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[t.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}};ee=Z=X([J(4,C.ILanguageFeaturesService),J(5,T.Hg),J(6,D.IModelService)],ee);class te{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}}class ie extends m.jG{constructor(e,t){super(),this._textModel=e,this._versionId=t,this._decorations=(0,s.FY)(this,[]),this.range=(0,s.un)(this,(e=>{this._versionId.read(e);const t=this._decorations.read(e)[0];return t?this._textModel.getDecorationRange(t)??null:null})),this._register((0,m.s)((()=>{this._textModel.deltaDecorations(this._decorations.get(),[])})))}setRange(e,t){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),t)}}var ne,oe=i(32828),se=i(5480),re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};let le=class extends m.jG{static{ne=this}static{this.ID="editor.contrib.inlineEditsController"}static get(e){return e.getContribution(ne.ID)}constructor(e,t,i,n,o,r){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._debounceService=n,this._languageFeaturesService=o,this._configurationService=r,this._enabled=(0,se.V)("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=(0,v.Ud)(this.editor),this._selection=(0,s.un)(this,(e=>this._editorObs.cursorSelection.read(e)??new y.L(1,1,1,1))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=(0,_.a0)(this,(e=>{if(!this._enabled.read(e))return;if(this._editorObs.isReadonly.read(e))return;const t=this._editorObs.model.read(e);if(!t)return;const i=this._instantiationService.createInstance((0,b.b)(ee,e),t,this._editorObs.versionId,this._selection,this._debounceValue);return i})),this._hadInlineEdit=(0,s.ZX)(this,((e,t)=>t||void 0!==this.model.read(e)?.inlineEdit.read(e))),this._widget=(0,_.a0)(this,(e=>{if(this._hadInlineEdit.read(e))return this._instantiationService.createInstance((0,b.b)(q,e),this.editor,this.model.map(((e,t)=>e?.inlineEdit.read(t))),ce((e=>this.model.read(e)?.userPrompt??(0,s.FY)("empty",""))))})),this._register((0,se.w)(p,this._contextKeyService,(e=>!!this.model.read(e)?.inlineEdit.read(e)))),this._register((0,se.w)(f,this._contextKeyService,(e=>!!this.model.read(e)?.isPinned.read(e)))),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}};function ce(e){return(0,_.dQ)(void 0,(t=>{const i=e(t);return i.read(t)}),((t,i)=>{e(void 0).set(t,i)}))}le=ne=re([ae(1,j._Y),ae(2,d.fN),ae(3,w.ILanguageFeatureDebounceService),ae(4,C.ILanguageFeaturesService),ae(5,oe.pG)],le);var de=i(6330);function ue(e){return{label:e.value,alias:e.original}}class he extends n.ks{static{this.ID=g}constructor(){super({id:he.ID,...ue(c.aS("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:d.M$.and(l.R.writable,p),kbOpts:{weight:100,primary:606}})}async run(e,t){const i=le.get(t);i?.model.get()?.next()}}class ge extends n.ks{static{this.ID=h}constructor(){super({id:ge.ID,...ue(c.aS("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:d.M$.and(l.R.writable,p),kbOpts:{weight:100,primary:604}})}async run(e,t){const i=le.get(t);i?.model.get()?.previous()}}class pe extends n.ks{constructor(){super({id:"editor.action.inlineEdits.trigger",...ue(c.aS("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:l.R.writable})}async run(e,t){const i=le.get(t);await(0,r.fL)((async e=>{await(i?.model.get()?.triggerExplicitly(e))}))}}class fe extends n.ks{constructor(){super({id:u,...ue(c.aS("action.inlineEdits.accept","Accept Inline Edit")),precondition:p,menuOpts:{menuId:de.D8.InlineEditsActions,title:c.kg("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:o.W.check},kbOpts:{primary:2058,weight:2e4,kbExpr:p}})}async run(e,t){t instanceof a.t&&(t=t.getParentEditor());const i=le.get(t);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}class me extends n.ks{static{this.ID="editor.action.inlineEdits.hide"}constructor(){super({id:me.ID,...ue(c.aS("action.inlineEdits.hide","Hide Inline Edit")),precondition:p,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=le.get(t);(0,s.Rn)((e=>{i?.model.get()?.stop(e)}))}}(0,n.HW)(le.ID,le,3),(0,n.Fl)(pe),(0,n.Fl)(he),(0,n.Fl)(ge),(0,n.Fl)(fe),(0,n.Fl)(me)},31903:(e,t,i)=>{"use strict";i.d(t,{I:()=>m});var n=i(2150),o=i(9659),s=i(25923),r=i(5091),a=i(20601),l=i(23740),c=i(8690),d=i(35037),u=i(87778),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};const p=d.kI.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:a.S8,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class f extends r.jG{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,n,o){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=n.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=n.$("span.icon");this.domNode.append(t),t.classList.add(...l.L.asClassNameArray(s.W.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(67);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(52)||e.hasChanged(67))&&i()}))),this._register(n.ko(this.domNode,n.Bx.CLICK,(e=>{this.delegate.cancel()})))}getId(){return f.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}let m=class extends r.jG{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new r.HE),this._currentWidget=this._register(new r.HE),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,n,s){const r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=(0,o.EQ)((()=>{const i=c.Q.fromPositions(e),o=this._currentDecorations.set([{range:i,options:p}]);o.length>0&&(this._currentWidget.value=this._instantiationService.createInstance(f,this.id,this._editor,i,t,n))}),s??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};m=h([g(2,u._Y)],m)},25135:(e,t,i)=>{"use strict";var n=i(16259),o=i(7657),s=i(57479),r=i(41337);class a extends n.ks{constructor(){super({id:"expandLineSelection",label:r.kg("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:s.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,o.c.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(i.source,!0)}}(0,n.Fl)(a)},70732:(e,t,i)=>{"use strict";var n=i(91348),o=i(32378),s=i(16259),r=i(50793),a=i(20601),l=i(28346),c=i(8690);class d{constructor(e,t,i){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,t){const i=u(e,this._cursors,this._trimInRegexesAndStrings);for(let n=0,o=i.length;ne.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let a=t.length-2;a>=0;a--)t[a].lineNumber===t[a+1].lineNumber&&t.splice(a,1);const n=[];let o=0,s=0;const r=t.length;for(let d=1,u=e.getLineCount();d<=u;d++){const u=e.getLineContent(d),h=u.length+1;let g=0;if(s=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t){return function(i,n){t(i,n,e)}};let E=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=()=>e.getLanguageId(),n=(t,i)=>e.getLanguageIdAtPosition(t,i),o=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===o)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let s=this._selection;s.startLineNumbert===s.startLineNumber?e.tokenization.getLineTokens(o):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s.startLineNumber?e.getLineContent(o):e.getLineContent(t)},c=(0,C.$f)(this._autoIndent,t,e.getLanguageIdAtPosition(o,1),s.startLineNumber,u,this._languageConfigurationService);if(null!==c){const t=a.UU(e.getLineContent(o)),i=w.c(c,r),n=w.c(t,r);if(i!==n){const e=w.k(i,r,d);h=e+this.trimStart(l)}}}t.addEditOperation(new c.Q(s.startLineNumber,1,s.startLineNumber,1),h+"\n");const p=this.matchEnterRuleMovingDown(e,u,r,s.startLineNumber,o,h);if(null!==p)0!==p&&this.getIndentEditsOfMovingBlock(e,t,s,r,d,p);else{const l={tokenization:{getLineTokens:t=>t===s.startLineNumber?e.tokenization.getLineTokens(o):t>=s.startLineNumber+1&&t<=s.endLineNumber+1?e.tokenization.getLineTokens(t-1):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s.startLineNumber?h:t>=s.startLineNumber+1&&t<=s.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)},c=(0,C.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(o,1),s.startLineNumber+1,u,this._languageConfigurationService);if(null!==c){const i=a.UU(e.getLineContent(s.startLineNumber)),n=w.c(c,r),o=w.c(i,r);if(n!==o){const i=n-o;this.getIndentEditsOfMovingBlock(e,t,s,r,d,i)}}}}else t.addEditOperation(new c.Q(s.startLineNumber,1,s.startLineNumber,1),h+"\n")}else if(o=s.startLineNumber-1,l=e.getLineContent(o),t.addEditOperation(new c.Q(o,1,o+1,1),null),t.addEditOperation(new c.Q(s.endLineNumber,e.getLineMaxColumn(s.endLineNumber),s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),"\n"+l),this.shouldAutoIndent(e,s)){const l={tokenization:{getLineTokens:t=>t===o?e.tokenization.getLineTokens(s.startLineNumber):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o?e.getLineContent(s.startLineNumber):e.getLineContent(t)},c=this.matchEnterRule(e,u,r,s.startLineNumber,s.startLineNumber-2);if(null!==c)0!==c&&this.getIndentEditsOfMovingBlock(e,t,s,r,d,c);else{const i=(0,C.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(s.startLineNumber,1),o,u,this._languageConfigurationService);if(null!==i){const n=a.UU(e.getLineContent(s.startLineNumber)),o=w.c(i,r),l=w.c(n,r);if(o!==l){const i=o-l;this.getIndentEditsOfMovingBlock(e,t,s,r,d,i)}}}}}this._selectionId=t.trackSelection(s)}buildIndentConverter(e,t,i){return{shiftIndent:n=>v.Y.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>v.Y.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===b.l.None||o.indentAction===b.l.Indent?s=o.indentation+o.appendText:o.indentAction===b.l.IndentOutdent?s=o.indentation:o.indentAction===b.l.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(s))>=0){const o=a.UU(e.getLineContent(n));let r=a.UU(s);const l=(0,C.Yb)(e,n,this._languageConfigurationService);null!==l&&2&l&&(r=t.unshiftIndent(r));const c=w.c(r,i),d=w.c(o,i);return c-d}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(a.lT(s)>=0){const s=e.getLineMaxColumn(o),r=(0,S.h)(this._autoIndent,e,new c.Q(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;while(o>=1){const t=e.getLineContent(o),i=a.lT(t);if(i>=0)break;o--}if(o<1||n>e.getLineCount())return null;const s=e.getLineMaxColumn(o),r=(0,S.h)(this._autoIndent,e,new c.Q(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;while(r>=1){let t;t=r===o&&void 0!==s?s:e.getLineContent(r);const i=a.lT(t);if(i>=0)break;r--}if(r<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(r),d=(0,S.h)(this._autoIndent,e,new c.Q(r,l,r,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return i===n&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const l=e.getLineContent(r),d=a.UU(l),u=w.c(d,n),h=u+s,g=w.k(h,n,o);g!==d&&(t.addEditOperation(new c.Q(r,1,r,d.length+1),g),r===i.endLineNumber&&i.endColumn<=d.length+1&&""===g&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=o)return null;const s=[];for(let a=n;a<=o;a++)s.push(e.getLineContent(a));let r=s.slice(0);return r.sort(L.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}function I(e,t,i){const n=T(e,t,i);return n?l.k.replace(new c.Q(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}var R=i(41337),D=i(6330),N=i(32828);class A extends s.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>c.Q.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let s=1;snew p.y(e.positionLineNumber,e.positionColumn))));const o=t.getSelection();if(null===o)return;const s=e.get(N.pG),r=t.getModel(),a=s.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:r?.getLanguageId(),resource:r?.uri}),l=new d(o,n,a);t.pushUndoStop(),t.executeCommands(this.id,[l]),t.pushUndoStop()}}class $ extends s.ks{constructor(){super({id:"editor.action.deleteLines",label:R.kg("lines.delete","Delete Line"),alias:"Delete Line",precondition:m.R.writable,kbOpts:{kbExpr:m.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0;const s=[],r=[];for(let a=0,c=i.length;a1&&(t-=1,d=n.getLineMaxColumn(t)),s.push(l.k.replace(new f.L(t,d,c,u),"")),r.push(new f.L(t-o,e.positionColumn,t-o,e.positionColumn)),o+=e.endLineNumber-e.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let o=1;o=t[o].startLineNumber?n.endLineNumber=t[o].endLineNumber:(i.push(n),n=t[o]);return i.push(n),i}}class q extends s.ks{constructor(){super({id:"editor.action.indentLines",label:R.kg("lines.indent","Indent Line"),alias:"Indent Line",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,h.T.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class K extends s.ks{constructor(){super({id:"editor.action.outdentLines",label:R.kg("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:2140,weight:100}})}run(e,t){o.Yh.Outdent.runEditorCommand(e,t,null)}}class G extends s.ks{constructor(){super({id:"editor.action.insertLineBefore",label:R.kg("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,g.AO.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class Q extends s.ks{constructor(){super({id:"editor.action.insertLineAfter",label:R.kg("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,g.AO.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class Y extends s.ks{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let a=0,l=n.length-1;al.k.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class Z extends Y{constructor(){super({id:"deleteAllLeft",label:R.kg("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:m.R.writable,kbOpts:{kbExpr:m.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let o=0;return t.forEach((t=>{let s;if(1===t.endColumn&&o>0){const e=t.startLineNumber-o;s=new f.L(e,t.startColumn,e,t.startColumn)}else s=new f.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(c.Q.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new c.Q(t,i,e.startLineNumber,1)}return new c.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.Q(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}class X extends Y{constructor(){super({id:"deleteAllRight",label:R.kg("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:m.R.writable,kbOpts:{kbExpr:m.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let o=0,s=t.length,r=0;o{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new c.Q(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new c.Q(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(c.Q.compareRangesUsingStarts),n}}class J extends s.ks{constructor(){super({id:"editor.action.joinLines",label:R.kg("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(c.Q.compareRangesUsingStarts);const o=[],s=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new f.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new f.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(s);const r=t.getModel();if(null===r)return;const a=[],d=[];let u=n,h=0;for(let g=0,p=o.length;g=1){let i=!0;""===v&&(i=!1),!i||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(i=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));const n=e.substr(t-1);v+=(i?" ":"")+n,m=i?n.length+1:n.length}else m=0}const b=new c.Q(t,i,s,p);if(!b.isEmpty()){let i;e.isEmpty()?(a.push(l.k.replace(b,v)),i=new f.L(b.startLineNumber-h,v.length-m+1,t-h,v.length-m+1)):e.startLineNumber===e.endLineNumber?(a.push(l.k.replace(b,v)),i=new f.L(e.startLineNumber-h,e.startColumn,e.endLineNumber-h,e.endColumn)):(a.push(l.k.replace(b,v)),i=new f.L(e.startLineNumber-h,e.startColumn,e.startLineNumber-h,v.length-_)),null!==c.Q.intersectRanges(b,n)?u=i:d.push(i)}h+=b.endLineNumber-b.startLineNumber}d.unshift(u),t.pushUndoStop(),t.executeEdits(this.id,a,d),t.pushUndoStop()}}class ee extends s.ks{constructor(){super({id:"editor.action.transpose",label:R.kg("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:m.R.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=[];for(let s=0,a=i.length;s=a){if(t.lineNumber===n.getLineCount())continue;const e=new c.Q(t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i=n.getValueInRange(e).split("").reverse().join("");o.push(new r.iu(new f.L(t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i))}else{const e=new c.Q(t.lineNumber,Math.max(1,t.column-1),t.lineNumber,t.column+1),i=n.getValueInRange(e).split("").reverse().join("");o.push(new r.ui(e,i,new f.L(t.lineNumber,t.column+1,t.lineNumber,t.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class te extends s.ks{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(132),s=[];for(const r of i)if(r.isEmpty()){const e=r.getStartPosition(),i=t.getConfiguredWordAtPosition(e);if(!i)continue;const a=new c.Q(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),d=n.getValueInRange(a);s.push(l.k.replace(a,this._modifyText(d,o)))}else{const e=n.getValueInRange(r);s.push(l.k.replace(r,this._modifyText(e,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class ie extends te{constructor(){super({id:"editor.action.transformToUppercase",label:R.kg("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:m.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class ne extends te{constructor(){super({id:"editor.action.transformToLowercase",label:R.kg("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:m.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class oe{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class se extends te{static{this.titleBoundary=new oe("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:R.kg("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:m.R.writable})}_modifyText(e,t){const i=se.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}class re extends te{static{this.caseBoundary=new oe("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new oe("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:R.kg("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:m.R.writable})}_modifyText(e,t){const i=re.caseBoundary.get(),n=re.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}class ae extends te{static{this.wordBoundary=new oe("[_\\s-]","gm")}constructor(){super({id:"editor.action.transformToCamelcase",label:R.kg("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:m.R.writable})}_modifyText(e,t){const i=ae.wordBoundary.get();if(!i)return e;const n=e.split(i),o=n.shift();return o+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}class le extends te{static{this.wordBoundary=new oe("[_\\s-]","gm")}static{this.wordBoundaryToMaintain=new oe("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:R.kg("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:m.R.writable})}_modifyText(e,t){const i=le.wordBoundary.get(),n=le.wordBoundaryToMaintain.get();if(!i||!n)return e;const o=e.split(n),s=o.map((e=>e.split(i))).flat();return s.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}class ce extends te{static isSupported(){const e=[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()));return e}static{this.caseBoundary=new oe("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new oe("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new oe("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:R.kg("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:m.R.writable})}_modifyText(e,t){const i=ce.caseBoundary.get(),n=ce.singleLetters.get(),o=ce.underscoreBoundary.get();return i&&n&&o?e.replace(o,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}(0,s.Fl)(O),(0,s.Fl)(P),(0,s.Fl)(M),(0,s.Fl)(B),(0,s.Fl)(W),(0,s.Fl)(V),(0,s.Fl)(j),(0,s.Fl)(z),(0,s.Fl)(U),(0,s.Fl)($),(0,s.Fl)(q),(0,s.Fl)(K),(0,s.Fl)(G),(0,s.Fl)(Q),(0,s.Fl)(Z),(0,s.Fl)(X),(0,s.Fl)(J),(0,s.Fl)(ee),(0,s.Fl)(ie),(0,s.Fl)(ne),re.caseBoundary.isSupported()&&re.singleLetters.isSupported()&&(0,s.Fl)(re),ae.wordBoundary.isSupported()&&(0,s.Fl)(ae),le.wordBoundary.isSupported()&&(0,s.Fl)(le),se.titleBoundary.isSupported()&&(0,s.Fl)(se),ce.isSupported()&&(0,s.Fl)(ce)},41439:(e,t,i)=>{"use strict";var n,o=i(85053),s=i(9659),r=i(67792),a=i(85476),l=i(14396),c=i(40231),d=i(5091),u=i(20601),h=i(29133),g=i(16259),p=i(94728),f=i(36788),m=i(8690),_=i(57479),v=i(35037),b=i(50395),y=i(41337),w=i(18904),C=i(12847),S=i(66344),k=i(85983),x=i(84240),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};const T=new w.N1("LinkedEditingInputVisible",!1),I="linked-editing-decoration";let R=class extends d.jG{static{n=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=v.kI.register({description:"linked-editing",stickiness:0,className:I})}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new d.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=T.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new d.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(70)||e.hasChanged(94))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(70)||this._editor.getOption(94))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(c.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new s.ve(this._debounceInformation.get(t)),o=()=>{this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),this._debounceDuration??this._debounceInformation.get(t))},r=new s.ve(0),a=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{o()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void a(this._syncRangesToken)}o()}))),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern),t=e?e[0].length:0;if(t!==n.length)return this.clearRanges()}const o=[];for(let s=1,r=this._currentDecorations.length;s1)return void this.clearRanges();const i=this._editor.getModel(),o=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=o;const s=this._currentRequestCts=new r.Qi;try{const e=new x.W(!1),r=await A(this._providers,i,t,s.token);if(this._debounceInformation.update(i,e.elapsed()),s!==this._currentRequestCts)return;if(this._currentRequestCts=null,o!==i.getVersionId())return;let a=[];r?.ranges&&(a=r.ranges),this._currentWordPattern=r?.wordPattern||this._languageWordPattern;let l=!1;for(let i=0,n=a.length;i({range:e,options:n.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(c),this._syncRangesToken++}catch(a){(0,l.MB)(a)||(0,l.dz)(a),this._currentRequestCts!==s&&this._currentRequestCts||this.clearRanges()}}};R=n=E([L(1,w.fN),L(2,C.ILanguageFeaturesService),L(3,b.JZ),L(4,k.ILanguageFeatureDebounceService)],R);class D extends g.ks{constructor(){super({id:"editor.action.linkedEditing",label:y.kg("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:w.M$.and(_.R.writable,_.R.hasRenameProvider),kbOpts:{kbExpr:_.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(p.T),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return h.r.isUri(n)&&f.y.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),l.dz):super.runCommand(e,t)}run(e,t){const i=R.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const N=g.DX.bindToContribution(R.get);function A(e,t,i,n){const r=e.ordered(t);return(0,s.$1)(r.map((e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,n)}catch(o){return void(0,l.M_)(o)}})),(e=>!!e&&o.EI(e?.ranges)))}(0,g.E_)(new N({id:"cancelLinkedEditingInput",precondition:T,handler:e=>e.clearRanges(),kbOpts:{kbExpr:_.R.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));(0,S.x1A)("editor.linkedEditingBackground",{dark:a.Q1.fromHex("#f00").transparent(.3),light:a.Q1.fromHex("#f00").transparent(.3),hcDark:a.Q1.fromHex("#f00").transparent(.3),hcLight:a.Q1.white},y.kg("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,g.ke)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(C.ILanguageFeaturesService);return A(n,t,i,r.XO.None)})),(0,g.HW)(R.ID,R,1),(0,g.Fl)(D)},35245:(e,t,i)=>{"use strict";var n=i(9659),o=i(67792),s=i(14396),r=i(42325),a=i(5091),l=i(6657),c=i(25160),d=i(84366),u=i(84240),h=i(29133),g=i(16259),p=i(35037),f=i(85983),m=i(12847),_=i(51170),v=i(85053),b=i(50322),y=i(8690),w=i(69361),C=i(72786);class S{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:"function"===typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}}class k{constructor(e){this._disposables=new a.Cm;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new S(e,n)));t=k._union(t,e),(0,a.Xm)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,o,s,r;for(n=0,s=0,o=e.length,r=t.length;nPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[o]=[t,e])}),s.M_)));return Promise.all(o).then((()=>{const e=new k((0,v.Yc)(n));return i.isCancellationRequested?(e.dispose(),new k([])):e}))}C.w.registerCommand("_executeLinkProvider",(async(e,...t)=>{let[i,n]=t;(0,b.j)(i instanceof h.r),"number"!==typeof n&&(n=0);const{linkProvider:s}=e.get(m.ILanguageFeaturesService),r=e.get(w.IModelService).getModel(i);if(!r)return[];const a=await x(s,r,o.XO.None);if(!a)return[];for(let c=0;c=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},D=function(e,t){return function(i,n){t(i,n,e)}};let N=class extends a.jG{static{E=this}static{this.ID="editor.linkDetector"}static get(e){return e.getContribution(E.ID)}constructor(e,t,i,o,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=o,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new n.uC((()=>this.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new _.gi(e));this._register(r.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(r.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(r.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,n.SS)((t=>x(this.providers,e,t)));try{const t=new u.W(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){(0,s.dz)(t)}finally{this.computePromise=null}}}updateDecorations(e){const t="altKey"===this.editor.getOption(78),i=[],n=Object.keys(this.currentOccurrences);for(const s of n){const e=this.currentOccurrences[s];i.push(e.decorationId)}const o=[];if(e)for(const s of e)o.push(O.decoration(s,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let i=0,o=n.length;i{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(78);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(o.XO.None).then((e=>{if("string"===typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l.ny.file&&e.startsWith(`${l.ny.file}:`)){const i=h.r.parse(e);if(i.scheme===l.ny.file){const n=d.su(i);let o=null;n.startsWith("/./")||n.startsWith("\\.\\")?o=`.${n.substr(1)}`:(n.startsWith("//./")||n.startsWith("\\\\.\\"))&&(o=`.${n.substr(2)}`),o&&(e=d.uJ(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(L.kg("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(L.kg("missing.url","Failed to open this link because its target is missing.")):(0,s.dz)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const e=this.currentOccurrences[i.id];if(e)return e}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};N=E=R([D(1,I.C),D(2,T.Ot),D(3,m.ILanguageFeaturesService),D(4,f.ILanguageFeatureDebounceService)],N);const A={general:p.kI.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:p.kI.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class O{static decoration(e,t){return{range:e.range,options:O._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?A.active:A.general};return n.hoverMessage=P(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,O._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,O._getOptions(this.link,t,!1))}}function P(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?L.kg("links.navigate.executeCmd","Execute command"):L.kg("links.navigate.follow","Follow link"),o=t?c.zx?L.kg("links.navigate.kb.meta.mac","cmd + click"):L.kg("links.navigate.kb.meta","ctrl + click"):c.zx?L.kg("links.navigate.kb.alt.mac","option + click"):L.kg("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=L.kg("tooltip.explanation","Execute command {0}",e)}}const i=new r.Bc("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${o})`);return i}return(new r.Bc).appendText(`${n} (${o})`)}class M extends g.ks{constructor(){super({id:"editor.action.openLink",label:L.kg("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=N.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const o of n){const e=i.getLinkOccurrence(o.getEndPosition());e&&i.openLinkOccurrence(e,!1)}}}(0,g.HW)(N.ID,N,1),(0,g.Fl)(M)},72239:(e,t,i)=>{"use strict";var n=i(5091),o=i(16259);class s extends n.jG{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(118);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}(0,o.HW)(s.ID,s,2)},61307:(e,t,i)=>{"use strict";i.d(t,{k:()=>v});var n,o=i(44964),s=i(19950),r=i(40231),a=i(42325),l=i(5091),c=i(16259),d=i(8690),u=i(36511),h=i(41337),g=i(18904),p=i(10170),f=i(2150),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{static{n=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new g.N1("messageVisible",!1,h.kg("messageVisible","Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(n.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new l.HE,this._messageListeners=new l.Cm,this._mouseOverMessage=!1,this._editor=e,this._visible=n.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._message?.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,s.xE)((0,a.VS)(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,a.VS)(e)?(0,o.Gc)(e,{actionHandler:{callback:t=>{this.closeMessage(),(0,u.i)(this._openerService,t,(0,a.VS)(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new y(this._editor,t,"string"===typeof e?e:this._message.element),this._messageListeners.add(r.Jh.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&f.QX(f.bq(),this._messageWidget.value.getDomNode())||this.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(f.ko(this._messageWidget.value.getDomNode(),f.Bx.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(f.ko(this._messageWidget.value.getDomNode(),f.Bx.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new d.Q(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(y.fadeOut(this._messageWidget.value))}};v=n=m([_(1,g.fN),_(2,p.C)],v);const b=c.DX.bindToContribution(v.get);(0,c.E_)(new b({id:"leaveEditorMessage",precondition:v.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class y{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");"string"===typeof n?(s.classList.add("message"),s.textContent=n):(n.classList.add("message"),s.appendChild(n)),this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,c.HW)(v.ID,v,4)},27471:(e,t,i)=>{"use strict";var n,o=i(19950),s=i(9659),r=i(91348),a=i(5091),l=i(16259),c=i(7657),d=i(8690),u=i(98581),h=i(57479),g=i(28369),p=i(41337),f=i(6330),m=i(18904),_=i(12847),v=i(12321),b=i(87778),y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};function C(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?p.kg("cursorAdded","Cursor added: {0}",e):p.kg("cursorsAdded","Cursors added: {0}",e);(0,o.h5)(t)}}class S extends l.ks{constructor(){super({id:"editor.action.insertCursorAbove",label:p.kg("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:h.R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,c.c.addCursorUp(o,s,n)),o.revealTopMostCursor(i.source),C(s,o.getCursorStates())}}class k extends l.ks{constructor(){super({id:"editor.action.insertCursorBelow",label:p.kg("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:h.R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,c.c.addCursorDown(o,s,n)),o.revealBottomMostCursor(i.source),C(s,o.getCursorStates())}}class x extends l.ks{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:p.kg("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:h.R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new u.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),C(s,o.getCursorStates())}}class E extends l.ks{constructor(){super({id:"editor.action.addCursorsToBottom",label:p.kg("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),o=[];for(let a=i[0].startLineNumber;a<=n;a++)o.push(new u.L(a,i[0].startColumn,a,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();o.length>0&&t.setSelections(o),C(r,s.getCursorStates())}}class L extends l.ks{constructor(){super({id:"editor.action.addCursorsToTop",label:p.kg("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let r=i[0].startLineNumber;r>=1;r--)n.push(new u.L(r,i[0].startColumn,r,i[0].endColumn));const o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),C(s,o.getCursorStates())}}class T{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class I{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new I(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,s=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(s=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,c=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,c=new u.L(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new I(e,t,s,l,n,o,c)}constructor(e,t,i,n,o,s,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=s,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new T(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new T(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new u.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new T(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new T(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new u.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824)}}class R extends a.jG{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(R.ID)}constructor(e){super(),this._sessionDispose=this._register(new a.Cm),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=I.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new u.L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState(),n=i.matchCase,o=H(this._editor.getModel(),t,n);if(!o){const e=this._editor.getModel(),i=[];for(let n=0,o=t.length;n0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew u.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}class D extends l.ks{run(e,t){const i=R.get(t);if(!i)return;const n=t._getViewModel();if(n){const o=n.getCursorStates(),s=g.z0.get(t);if(s)this._run(i,s);else{const n=e.get(b._Y).createInstance(g.z0,t);this._run(i,n),n.dispose()}C(o,n.getCursorStates())}}}class N extends D{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p.kg("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:h.R.focus,primary:2082,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class A extends D{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p.kg("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class O extends D{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p.kg("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:h.R.focus,primary:(0,r.m5)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class P extends D{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p.kg("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class M extends D{constructor(){super({id:"editor.action.selectHighlights",label:p.kg("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:h.R.focus,primary:3114,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class F extends D{constructor(){super({id:"editor.action.changeAll",label:p.kg("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:m.M$.and(h.R.writable,h.R.editorTextFocus),kbOpts:{kbExpr:h.R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class B{constructor(e,t,i,n,o){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(d.Q.compareRangesUsingStarts)),this._cachedFindMatches}}let W=class extends a.jG{static{n=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(109),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new s.uC((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(109)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=g.z0.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(n._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const o=R.get(i);if(!o)return null;const s=g.z0.get(i);if(!s)return null;let r=o.getSession(s);if(!r){const e=i.getSelections();if(e.length>1){const t=s.getState(),n=t.matchCase,o=H(i.getModel(),e,n);if(!o)return null}r=I.create(i,s)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=s.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new B(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(132):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(d.Q.compareRangesUsingStarts);const o=[];for(let l=0,c=0,u=i.length,h=n.length;l=h)o.push(e),l++;else{const t=d.Q.compareRangesUsingStarts(e,n[c]);t<0?(!n[c].isEmpty()&&d.Q.areIntersecting(e,n[c])||o.push(e),l++):(t>0||l++,c++)}}const s="off"!==this.editor.getOption(81),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&s,a=o.map((e=>({range:e,options:(0,v.v)(r)})));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function H(e,t,i){const n=V(e,t[0],!i);for(let o=1,s=t.length;o{"use strict";var n=i(85661),o=i(5091),s=i(16259),r=i(57479),a=i(35350),l=i(12847),c=i(9659),d=i(14396),u=i(40231),h=i(94529),g=i(67792),p=i(50322),f=i(29133),m=i(36788),_=i(64037),v=i(72786),b=i(18904);const y={Visible:new b.N1("parameterHintsVisible",!1),MultipleSignatures:new b.N1("parameterHintsMultipleSignatures",!1)};async function w(e,t,i,n,o){const s=e.ordered(t);for(const a of s)try{const e=await a.provideSignatureHelp(t,i,o,n);if(e)return e}catch(r){(0,d.M_)(r)}}var C;v.w.registerCommand("_executeSignatureHelpProvider",(async(e,...t)=>{const[i,n,o]=t;(0,p.j)(f.r.isUri(i)),(0,p.j)(m.y.isIPosition(n)),(0,p.j)("string"===typeof o||!o);const s=e.get(l.ILanguageFeaturesService),r=await e.get(_.ITextModelService).createModelReference(i);try{const e=await w(s.signatureHelpProvider,r.object.textEditorModel,m.y.lift(n),{triggerKind:a.WA.Invoke,isRetrigger:!1,triggerCharacter:o},g.XO.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}})),function(e){e.Default={type:0};class t{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}}e.Pending=t;class i{constructor(e){this.hints=e,this.type=1}}e.Active=i}(C||(C={}));class S extends o.jG{static{this.DEFAULT_DELAY=120}constructor(e,t,i=S.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new u.vl),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=C.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new o.HE),this.triggerChars=new h.y,this.retriggerChars=new h.y,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new c.ve(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=C.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(d.dz)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new C.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(k);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),r=this.editor.getPosition();this.state=new C.Pending((0,c.SS)((e=>w(this.providers,s,r,o,e))),i);try{const t=await this.state.request;return e!==this.triggerId?(t?.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new C.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(t?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(a){return e===this.triggerId&&(this.state=C.Default),(0,d.dz)(a),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:a.WA.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.WA.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.WA.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function k(e,t){switch(t.triggerKind){case a.WA.Invoke:return t;case a.WA.ContentChange:return e;case a.WA.TriggerCharacter:default:return t}}var x,E=i(41337),L=i(87778),T=i(2150),I=i(19950),R=i(37800),D=i(25923),N=i(20601),A=i(35011),O=i(14573),P=i(36511),M=i(10170),F=i(66344),B=i(48401),W=i(23740),H=i(84240),V=i(11086),j=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z=function(e,t){return function(i,n){t(i,n,e)}};const U=T.$,$=(0,B.pU)("parameter-hints-next",D.W.chevronDown,E.kg("parameterHintsNextIcon","Icon for show next parameter hint.")),q=(0,B.pU)("parameter-hints-previous",D.W.chevronUp,E.kg("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let K=class extends o.jG{static{x=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,i,n,s,r){super(),this.editor=e,this.model=t,this.telemetryService=r,this.renderDisposeables=this._register(new o.Cm),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new P.T({editor:e},s,n)),this.keyVisible=y.Visible.bindTo(i),this.keyMultipleSignatures=y.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=U(".editor-widget.parameter-hints-widget"),t=T.BC(e,U(".phwrapper"));t.tabIndex=-1;const i=T.BC(t,U(".controls")),n=T.BC(i,U(".button"+W.L.asCSSSelector(q))),o=T.BC(i,U(".overloads")),s=T.BC(i,U(".button"+W.L.asCSSSelector($)));this._register(T.ko(n,"click",(e=>{T.fs.stop(e),this.previous()}))),this._register(T.ko(s,"click",(e=>{T.fs.stop(e),this.next()})));const r=U(".body"),a=new R.MU(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=T.BC(r,U(".signature")),c=T.BC(r,U(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:o,docs:c,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const d=()=>{if(!this.domNodes)return;const e=this.editor.getOption(50),t=this.domNodes.element;t.style.fontSize=`${e.fontSize}px`,t.style.lineHeight=""+e.lineHeight/e.fontSize,t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",e.fontFamily),t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",A.jU.fontFamily)};d(),this._register(u.Jh.chain(this.editor.onDidChangeConfiguration.bind(this.editor),(e=>e.filter((e=>e.hasChanged(50)))))(d)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{this.domNodes?.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const n=T.BC(this.domNodes.signature,U(".code")),o=i.parameters.length>0,s=i.activeParameter??e.activeParameter;if(o)this.renderParameters(n,i,s);else{const e=T.BC(n,U("span"));e.textContent=i.label}const r=i.parameters[s];if(r?.documentation){const e=U("span.documentation");if("string"===typeof r.documentation)e.textContent=r.documentation;else{const t=this.renderMarkdownDocs(r.documentation);e.appendChild(t.element)}T.BC(this.domNodes.docs,U("p",{},e))}if(void 0===i.documentation);else if("string"===typeof i.documentation)T.BC(this.domNodes.docs,U("p",{},i.documentation));else{const e=this.renderMarkdownDocs(i.documentation);T.BC(this.domNodes.docs,e.element)}const a=this.hasDocs(i,r);if(this.domNodes.signature.classList.toggle("has-docs",a),this.domNodes.docs.classList.toggle("empty",!a),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,r){let e="";const t=i.parameters[s];e=Array.isArray(t.label)?i.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"===typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),i.documentation&&(e+="string"===typeof i.documentation?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==e&&(I.xE(E.kg("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=new H.W,i=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));i.element.classList.add("markdown-docs");const n=t.elapsed();return n>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:n}),i}hasDocs(e,t){return!!(t&&"string"===typeof t.documentation&&(0,p.eU)(t.documentation).length>0)||(!!(t&&"object"===typeof t.documentation&&(0,p.eU)(t.documentation).value.length>0)||(!!(e.documentation&&"string"===typeof e.documentation&&(0,p.eU)(e.documentation).length>0)||!!(e.documentation&&"object"===typeof e.documentation&&(0,p.eU)(e.documentation.value).length>0)))}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),s=document.createElement("span");s.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,o),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),T.BC(e,s,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,N.bm)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return x.ID}updateMaxHeight(){if(!this.domNodes)return;const e=Math.max(this.editor.getLayoutInfo().height/4,250),t=`${e}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};K=x=j([z(2,b.fN),z(3,M.C),z(4,O.L),z(5,V.k)],K),(0,F.x1A)("editorHoverWidget.highlightForeground",F.QI5,E.kg("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var G,Q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Y=function(e,t){return function(i,n){t(i,n,e)}};let Z=class extends o.jG{static{G=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution(G.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new S(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{e?(this.widget.value.show(),this.widget.value.render(e)):this.widget.rawValue?.hide()}))),this.widget=new n.d((()=>this._register(t.createInstance(K,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};Z=G=Q([Y(1,L._Y),Y(2,l.ILanguageFeaturesService)],Z);class X extends s.ks{constructor(){super({id:"editor.action.triggerParameterHints",label:E.kg("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:r.R.hasSignatureHelpProvider,kbOpts:{kbExpr:r.R.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=Z.get(t);i?.trigger({triggerKind:a.WA.Invoke})}}(0,s.HW)(Z.ID,Z,2),(0,s.Fl)(X);const J=175,ee=s.DX.bindToContribution(Z.get);(0,s.E_)(new ee({id:"closeParameterHints",precondition:y.Visible,handler:e=>e.cancel(),kbOpts:{weight:J,kbExpr:r.R.focus,primary:9,secondary:[1033]}})),(0,s.E_)(new ee({id:"showPrevParameterHint",precondition:b.M$.and(y.Visible,y.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:J,kbExpr:r.R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,s.E_)(new ee({id:"showNextParameterHint",precondition:b.M$.and(y.Visible,y.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:J,kbExpr:r.R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},55571:(e,t,i)=>{"use strict";i.d(t,{zn:()=>O,x2:()=>P,j6:()=>W,RL:()=>F,zl:()=>z,n6:()=>U,z0:()=>H,_X:()=>V,e3:()=>j});var n=i(2150),o=i(48038),s=i(55664),r=i(25923),a=i(23740),l=i(85476),c=i(40231),d=i(85603),u=i(16259),h=i(94728),g=i(50576),p=i(53062),f=i(23453),m=i(5091),_=i(8690),v=i(35037);const b=new l.Q1(new l.bU(0,122,204)),y={showArrow:!0,showFrame:!0,className:"",frameColor:b,arrowColor:b,keepEditorSelection:!1},w="vs.editor.contrib.zoneWidget";class C{constructor(e,t,i,n,o,s,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class S{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class k{static{this._IdGenerator=new f.n(".arrow-decoration-")}constructor(e){this._editor=e,this._ruleName=k._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),n.U2(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){n.U2(this._ruleName),n.Wt(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:_.Q.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}class x{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new m.Cm,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=d.Go(t),d.co(this.options,y,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new k(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash?.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=_.Q.isIRange(e)?_.Q.lift(e):_.Q.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:v.kI.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new C(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new S(w+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const c=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,o),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const t=d.validateRange(new _.Q(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new p.m(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(67),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var E=i(41337),L=i(85141),T=i(18904),I=i(59857),R=i(87778),D=i(66344),N=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};const O=(0,R.u1)("IPeekViewService");var P;(0,I.v)(O,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());const n=()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))};this._widgets.set(e,{widget:t,listener:t.onDidClose(n)})}},1),function(e){e.inPeekEditor=new T.N1("inReferenceSearchEditor",!0,E.kg("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(P||(P={}));let M=class{static{this.ID="editor.contrib.referenceController"}constructor(e,t){e instanceof g.t&&P.inPeekEditor.bindTo(t)}dispose(){}};function F(e){const t=e.get(h.T).getFocusedCodeEditor();return t instanceof g.t?t.getParentEditor():t}M=N([A(1,T.fN)],M),(0,u.HW)(M.ID,M,0);const B={headerBackgroundColor:l.Q1.white,primaryHeadingColor:l.Q1.fromHex("#333333"),secondaryHeadingColor:l.Q1.fromHex("#6c6c6cb3")};let W=class extends x{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new c.vl,this.onDidClose=this._onDidClose.event,d.co(this.options,B,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=n.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),n.b2(this._titleElement,"click",(e=>this._onTitleClick(e)))),n.BC(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.BC(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=n.$(".peekview-actions");n.BC(this._headElement,i);const l=this._getActionBarOptions();this._actionbarWidget=new o.E(i,l),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new s.rc("peekview.close",E.kg("label.close","Close"),a.L.asClassName(r.W.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:L.rN.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:n.w_(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.WU(this._metaHeading)):n.jD(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(67)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};W=N([A(2,R._Y)],W);const H=(0,D.x1A)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Q1.black,hcLight:l.Q1.white},E.kg("peekViewTitleBackground","Background color of the peek view title area.")),V=(0,D.x1A)("peekViewTitleLabel.foreground",{dark:l.Q1.white,light:l.Q1.black,hcDark:l.Q1.white,hcLight:D.By2},E.kg("peekViewTitleForeground","Color of the peek view title.")),j=(0,D.x1A)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},E.kg("peekViewTitleInfoForeground","Color of the peek view title info.")),z=(0,D.x1A)("peekView.border",{dark:D.pOz,light:D.pOz,hcDark:D.b1q,hcLight:D.b1q},E.kg("peekViewBorder","Color of the peek view borders and arrow.")),U=(0,D.x1A)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Q1.black,hcLight:l.Q1.white},E.kg("peekViewResultsBackground","Background color of the peek view result list.")),$=((0,D.x1A)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:l.Q1.white,hcLight:D.By2},E.kg("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),(0,D.x1A)("peekViewResult.fileForeground",{dark:l.Q1.white,light:"#1E1E1E",hcDark:l.Q1.white,hcLight:D.By2},E.kg("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),(0,D.x1A)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},E.kg("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),(0,D.x1A)("peekViewResult.selectionForeground",{dark:l.Q1.white,light:"#6C6C6C",hcDark:l.Q1.white,hcLight:D.By2},E.kg("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),(0,D.x1A)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:l.Q1.black,hcLight:l.Q1.white},E.kg("peekViewEditorBackground","Background color of the peek view editor.")));(0,D.x1A)("peekViewEditorGutter.background",$,E.kg("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),(0,D.x1A)("peekViewEditorStickyScroll.background",$,E.kg("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),(0,D.x1A)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},E.kg("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),(0,D.x1A)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},E.kg("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),(0,D.x1A)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:D.buw,hcLight:D.buw},E.kg("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},26044:(e,t,i)=>{"use strict";var n=i(16259),o=i(52764),s=i(41337),r=i(75115),a=i(47805),l=i(44757),c=i(34956),d=i(39751),u=i(87778),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};class p{constructor(e){this.instantiationService=e}init(...e){}}function f(e,t){return class extends t{constructor(){super(...arguments),this._autorun=void 0}init(...t){this._autorun=(0,d.yC)(((i,n)=>{const o=(0,c.b)(e(),i);n.add(this.instantiationService.createInstance(o,...t))}))}dispose(){this._autorun?.dispose()}}}function m(e){return(0,l.e)()?f(e,_):e()}let _=class extends p{constructor(e,t){super(t),this.init(e)}};_=h([g(1,u._Y)],_),(0,n.HW)(a.X.ID,m((()=>a.X)),0),(0,r.x1)("editor.placeholder.foreground",o.Ek,(0,s.kg)("placeholderForeground","Foreground color of the placeholder text in the editor."))},47805:(e,t,i)=>{"use strict";i.d(t,{X:()=>c});var n=i(2150),o=i(45746),s=i(5091),r=i(39751),a=i(42389),l=i(55745);class c extends s.jG{static{this.ID="editor.contrib.placeholderText"}constructor(e){super(),this._editor=e,this._editorObs=(0,l.Ud)(this._editor),this._placeholderText=this._editorObs.getOption(88),this._state=(0,r.C)({owner:this,equalsFn:o.dB},(e=>{const t=this._placeholderText.read(e);if(t&&this._editorObs.valueIsEmpty.read(e))return{placeholder:t}})),this._shouldViewBeAlive=d(this,(e=>void 0!==this._state.read(e)?.placeholder)),this._view=(0,a.rm)(((e,t)=>{if(!this._shouldViewBeAlive.read(e))return;const i=(0,n.h)("div.editorPlaceholder");t.add((0,r.fm)((e=>{const t=this._state.read(e),n=void 0!==t?.placeholder;i.root.style.display=n?"block":"none",i.root.innerText=t?.placeholder??""}))),t.add((0,r.fm)((e=>{const t=this._editorObs.layoutInfo.read(e);i.root.style.left=`${t.contentLeft}px`,i.root.style.width=t.contentWidth-t.verticalScrollbarWidth+"px",i.root.style.top=`${this._editor.getTopForLineNumber(0)}px`}))),t.add((0,r.fm)((e=>{i.root.style.fontFamily=this._editorObs.getOption(49).read(e),i.root.style.fontSize=this._editorObs.getOption(52).read(e)+"px",i.root.style.lineHeight=this._editorObs.getOption(67).read(e)+"px"}))),t.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:(0,r.lk)(0),position:(0,r.lk)(null),domNode:i.root}))})),this._view.recomputeInitiallyAndOnChange(this._store)}}function d(e,t){return(0,r.ZX)(e,((e,i)=>!0===i||t(e)))}},24246:(e,t,i)=>{"use strict";i.d(t,{o:()=>d});var n=i(90702),o=i(5091),s=i(55413),r=i(9322),a=i(52764),l=i(15911),c=i(19950);class d{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){const n=new o.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new o.HE);return s.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange((()=>{s.value=void 0,s.value=this.doProvide(e,t)}))),n}doProvide(e,t,i){const r=new o.Cm,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const l={editor:a},c=(0,s.jA)(a);if(c){let e=a.saveViewState()??void 0;r.add(c.onDidChangeCursorPosition((()=>{e=a.saveViewState()??void 0}))),l.restoreViewState=()=>{e&&a===this.activeTextEditorControl&&a.restoreViewState(e)},r.add((0,n.P)(t.onCancellationRequested)((()=>l.restoreViewState?.())))}r.add((0,o.s)((()=>this.clearDecorations(a)))),r.add(this.provideWithTextEditor(l,e,t,i))}else r.add(this.provideWithoutTextEditor(e,t));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&(0,c.h5)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return(0,s.Np)(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,l.Yf)(a.vp),position:r.A5.Full}}}],[o,s]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:s}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},92910:(e,t,i)=>{"use strict";var n=i(42325),o=i(5091),s=i(16259),r=i(61307),a=i(41337);class l extends o.jG{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=r.k.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(93);t||(t=this.editor.isSimpleWidget?new n.Bc(a.kg("editor.simple.readonly","Cannot edit in read-only input")):new n.Bc(a.kg("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}(0,s.HW)(l.ID,l,2)},90709:(e,t,i)=>{"use strict";var n=i(19950),o=i(9659),s=i(67792),r=i(14396),a=i(42325),l=i(5091),c=i(50322),d=i(29133),u=i(16259),h=i(3176),g=i(94728),p=i(36788),f=i(8690),m=i(57479),_=i(35350),v=i(12847),b=i(56151),y=i(64339),w=i(61307),C=i(41337),S=i(6330),k=i(27503),x=i(18904),E=i(87778),L=i(12660),T=i(95062),I=i(44838),R=i(16374),D=i(11086),N=i(2150),A=i(68389),O=i(50799),P=i(96371),M=i(84653),F=i(31304),B=i(85053),W=i(25923),H=i(40231),V=i(84240),j=i(11320),z=i(13046),U=i(13153),$=i(66344),q=i(15911),K=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},G=function(e,t){return function(i,n){t(i,n,e)}};const Q=!1,Y=new x.N1("renameInputVisible",!1,C.kg("renameInputVisible","Whether the rename input widget is visible"));new x.N1("renameInputFocused",!1,C.kg("renameInputFocused","Whether the rename input widget is focused"));let Z=class{constructor(e,t,i,n,o,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=s,this.allowEditorOverflow=!0,this._disposables=new l.Cm,this._visibleContextKey=Y.bindTo(o),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new V.W,this._inputWithButton=new J,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new X(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange((()=>{void 0!==this._renameCandidateListView?.focusedCandidate&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),!1===this._renameCandidateProvidersCts?.token.isCancellationRequested&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()}))),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const t=e.getColor($.f9l),i=e.getColor($.DSL);this._domNode.style.backgroundColor=String(e.getColor($.CgL)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor($.cws)??"");const n=e.getColor($.Zgs);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor($.L4c)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor($.L4c)??""),this._inputWithButton.domNode.style.borderWidth=n?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=n?"solid":"none",this._inputWithButton.domNode.style.borderColor=n?.toString()??"none"}_updateFont(){if(void 0===this._domNode)return;(0,c.j)(void 0!==this._label,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return.8*e}getPosition(){if(!this._visible)return null;if(!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=N.tG(this.getDomNode().ownerDocument.body),t=N.BK(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const n=this._editor.getOption(67),{totalHeight:o}=ee.getLayoutInfo({lineHeight:n}),s=this._nPxAvailableBelow>6*o?[2,1]:[1,2];return{position:this._position,preference:s}}beforeRender(){const[e,t]=this._acceptKeybindings;return this._label.innerText=C.kg({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;(0,c.j)(this._renameCandidateListView),(0,c.j)(void 0!==this._nPxAvailableAbove),(0,c.j)(void 0!==this._nPxAvailableBelow);const t=N.OK(this._inputWithButton.domNode),i=N.OK(this._label);let n;n=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._renameCandidateListView.layout({height:n-i-t,width:N.Tr(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,s){const{start:r,end:a}=this._getSelection(e,t);this._renameCts=s;const d=new l.Cm;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,void 0===n?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),d.add(N.ko(this._inputWithButton.button,"click",(()=>this._requestRenameCandidates(t,!0)))),d.add(N.ko(this._inputWithButton.button,N.Bx.KEY_DOWN,(e=>{const i=new A.Z(e);(i.equals(3)||i.equals(10))&&(i.stopPropagation(),i.preventDefault(),this._requestRenameCandidates(t,!0))})))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new p.y(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",r.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max(1.1*(e.endColumn-e.startColumn),20),this._beforeFirstInputFieldEditSW.reset(),d.add((0,l.s)((()=>{this._renameCts=void 0,s.dispose(!0)}))),d.add((0,l.s)((()=>{void 0!==this._renameCandidateProvidersCts&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)}))),d.add((0,l.s)((()=>this._candidates.clear())));const u=new o.Zv;return u.p.finally((()=>{d.dispose(),this._hide()})),this._currentCancelInput=e=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),u.complete(e),!0),this._currentAcceptInput=e=>{this._trace("invoking _currentAcceptInput"),(0,c.j)(void 0!==this._renameCandidateListView);const n=this._renameCandidateListView.nCandidates;let o,s;const r=this._renameCandidateListView.focusedCandidate;void 0!==r?(this._trace("using new name from renameSuggestion"),o=r,s={k:"renameSuggestion"}):(this._trace("using new name from inputField"),o=this._inputWithButton.input.value,s=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),o!==t&&0!==o.trim().length?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),u.complete({newName:o,wantsPreview:i&&e,stats:{source:s,nRenameSuggestions:n,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})):this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)")},d.add(s.token.onCancellationRequested((()=>this.cancelInput(!0,"cts.token.onCancellationRequested")))),Q||d.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget")))),this._show(),u.p}_requestRenameCandidates(e,t){if(void 0!==this._requestRenameCandidatesOnce&&(void 0!==this._renameCandidateProvidersCts&&this._renameCandidateProvidersCts.dispose(!0),(0,c.j)(this._renameCts),"stop"!==this._inputWithButton.buttonState)){this._renameCandidateProvidersCts=new s.Qi;const i=t?_.YT.Invoke:_.YT.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(0===n.length)return void this._inputWithButton.setSparkleButton();t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){(0,c.j)(this._editor.hasModel());const i=this._editor.getSelection();let n=0,o=t.length;return f.Q.isEmpty(i)||f.Q.spansMultipleLines(i)||!f.Q.containsRange(e,i)||(n=Math.max(0,i.startColumn-e.startColumn),o=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:o}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))}),100)}async _updateRenameCandidates(e,t,i){const n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");const s=await(0,o.PK)(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),void 0===s)return void n("returning early - received updateRenameCandidates results - undefined");const r=s.flatMap((e=>"fulfilled"===e.status&&(0,c.O9)(e.value)?e.value:[]));n(`received updateRenameCandidates results - total (unfiltered) ${r.length} candidates.`);const a=B.dM(r,(e=>e.newSymbolName));n(`distinct candidates - ${a.length} candidates.`);const l=a.filter((({newSymbolName:e})=>e.trim().length>0&&e!==this._inputWithButton.input.value&&e!==t&&!this._candidates.has(e)));n(`valid distinct candidates - ${r.length} candidates.`),l.forEach((e=>this._candidates.add(e.newSymbolName))),l.length<1?n("returning early - no valid distinct candidates"):(n("setting candidates"),this._renameCandidateListView.setCandidates(l),n("asking editor to re-layout"),this._editor.layoutContentWidget(this))}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};Z=K([G(2,q.Gy),G(3,z.b),G(4,x.fN),G(5,L.rr)],Z);class X{constructor(e,t){this._disposables=new l.Cm,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=X._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._listWidget.onDidChangeFocus((e=>{1===e.elements.length&&t.onFocusChange(e.elements[0].newSymbolName)}),this._disposables),this._listWidget.onDidChangeSelection((e=>{1===e.elements.length&&t.onSelectionChange()}),this._disposables),this._disposables.add(this._listWidget.onDidBlur((e=>{this._listWidget.setFocus([])}))),this._listWidget.style((0,U.t8)({listInactiveFocusForeground:$.nH,listInactiveFocusBackground:$.AlL}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);const t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,n.h5(C.kg("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(0===this._listWidget.length)return;const e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];return void 0!==t?t.newSymbolName:void 0}focusNext(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}focusPrevious(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length){this._listWidget.focusLast();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}if(0===e[0])return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=ee.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e,i=7,n=Math.min(t,this._availableHeight,this._candidateViewHeight*i);return n}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map((e=>e.newSymbolName.length)))*this._typicalHalfwidthCharacterWidth),i=Math.max(this._minimumWidth,25+t+10);return i}static _createListWidget(e,t,i){const n=new class{getTemplateId(e){return"candidate"}getHeight(e){return t}},o=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new ee(e,i)}renderElement(e,t,i){i.populate(e)}disposeTemplate(e){e.dispose()}};return new F.B8("NewSymbolNameCandidates",e,n,[o],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class J{constructor(){this._onDidInputChange=new H.vl,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new l.Cm}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",C.kg("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=C.kg("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=C.kg("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=(0,O.i)().setupManagedHover((0,P.nZ)("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(N.ko(this.input,N.Bx.INPUT,(()=>this._onDidInputChange.fire()))),this._disposables.add(N.ko(this.input,N.Bx.KEY_DOWN,(e=>{const t=new A.Z(e);15!==t.keyCode&&17!==t.keyCode||this._onDidInputChange.fire()}))),this._disposables.add(N.ko(this.input,N.Bx.CLICK,(()=>this._onDidInputChange.fire()))),this._disposables.add(N.ko(this.input,N.Bx.FOCUS,(()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"}))),this._disposables.add(N.ko(this.input,N.Bx.BLUR,(()=>{this.domNode.style.outline="none"})))),this._domNode}get input(){return(0,c.j)(this._inputNode),this._inputNode}get button(){return(0,c.j)(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=(0,M.s)(W.W.sparkle),N.w_(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHover?.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=(0,M.s)(W.W.primitiveSquare),N.w_(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHover?.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}class ee{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${ee._PADDING}px`;const i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=.8*t.lineHeight+"px",this._domNode.appendChild(i),this._icon=(0,M.s)(W.W.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),j.M(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){const t=!!e.tags?.includes(_.OV.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){const t=e+2*ee._PADDING;return{totalHeight:t}}dispose(){}}var te,ie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ne=function(e,t){return function(i,n){t(i,n,e)}};class oe{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:f.Q.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join("\n")};const s=await o.provideRenameEdits(this.model,this.position,e,n);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),n):s:this._provideRenameEdits(e,t+1,i.concat(C.kg("no result","No result.")),n)}}async function se(e,t,i,n){const o=new oe(t,i,e),r=await o.resolveRenameLocation(s.XO.None);return r?.rejectReason?{edits:[],rejectReason:r.rejectReason}:o.provideRenameEdits(n,s.XO.None)}let re=class{static{te=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(te.ID)}constructor(e,t,i,n,o,r,a,c,d){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=a,this._languageFeaturesService=c,this._telemetryService=d,this._disposableStore=new l.Cm,this._cts=new s.Qi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(Z,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new s.Qi,!this.editor.hasModel())return void e("editor has no model");const t=this.editor.getPosition(),i=new oe(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!i.hasProvider())return void e("skeleton has no provider");const l=new y.gI(this.editor,5,void 0,this._cts.token);let c;try{e("resolving rename location");const t=i.resolveRenameLocation(l.token);this._progressService.showWhile(t,250),c=await t,e("resolved rename location")}catch(S){return void(S instanceof r.AL?e("resolve rename location cancelled",JSON.stringify(S,null,"\t")):(e("resolve rename location failed",S instanceof Error?S:JSON.stringify(S,null,"\t")),("string"===typeof S||(0,a.VS)(S))&&w.k.get(this.editor)?.showMessage(S||C.kg("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t)))}finally{l.dispose()}if(!c)return void e("returning early - no loc");if(c.rejectReason)return e(`returning early - rejected with reason: ${c.rejectReason}`,c.rejectReason),void w.k.get(this.editor)?.showMessage(c.rejectReason,t);if(l.token.isCancellationRequested)return void e("returning early - cts1 cancelled");const d=new y.gI(this.editor,5,c.range,this._cts.token),u=this.editor.getModel(),h=this._languageFeaturesService.newSymbolNamesProvider.all(u),g=await Promise.all(h.map((async e=>[e,await e.supportsAutomaticNewSymbolNamesTriggerKind??!1]))),p=(e,t)=>{let i=g.slice();return e===_.YT.Automatic&&(i=i.filter((([e,t])=>t))),i.map((([i])=>i.provideNewSymbolNames(u,c.range,e,t)))};e("creating rename input field and awaiting its result");const m=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),v=await this._renameWidget.getInput(c.range,c.text,m,h.length>0?p:void 0,d);if(e("received response from rename input field"),h.length>0&&this._reportTelemetry(h.length,u.getLanguageId(),v),"boolean"===typeof v)return e(`returning early - rename input field response - ${v}`),v&&this.editor.focus(),void d.dispose();this.editor.focus(),e("requesting rename edits");const b=(0,o.PK)(i.provideRenameEdits(v.newName,d.token),d.token).then((async t=>{if(t)if(this.editor.hasModel()){if(t.rejectReason)return e(`returning early - rejected with reason: ${t.rejectReason}`),void this._notificationService.info(t.rejectReason);this.editor.setSelection(f.Q.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(t,{editor:this.editor,showPreview:v.wantsPreview,label:C.kg("label","Renaming '{0}' to '{1}'",c?.text,v.newName),code:"undoredo.rename",quotableLabel:C.kg("quotableLabel","Renaming {0} to {1}",c?.text,v.newName),respectAutoSaveConfig:!0}).then((t=>{e("edits applied"),t.ariaSummary&&(0,n.xE)(C.kg("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",c.text,v.newName,t.ariaSummary))})).catch((t=>{e(`error when applying edits ${JSON.stringify(t,null,"\t")}`),this._notificationService.error(C.kg("rename.failedApply","Rename failed to apply edits")),this._logService.error(t)}))}else e("returning early - no model after rename edits are provided");else e("returning early - no rename edits result")}),(t=>{e("error when providing rename edits",JSON.stringify(t,null,"\t")),this._notificationService.error(C.kg("rename.failed","Rename failed to compute edits")),this._logService.error(t)})).finally((()=>{d.dispose()}));return e("returning rename operation"),this._progressService.showWhile(b,250),b}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,i){const n="boolean"===typeof i?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:i.stats.source.k,nRenameSuggestions:i.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:i.stats.timeBeforeFirstInputFieldEdit,wantsPreview:i.wantsPreview,nRenameSuggestionsInvocations:i.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:i.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",n)}};re=te=ie([ne(1,E._Y),ne(2,T.Ot),ne(3,h.nu),ne(4,I.N8),ne(5,L.rr),ne(6,b.ITextResourceConfigurationService),ne(7,v.ILanguageFeaturesService),ne(8,D.k)],re);class ae extends u.ks{constructor(){super({id:"editor.action.rename",label:C.kg("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:x.M$.and(m.R.writable,m.R.hasRenameProvider),kbOpts:{kbExpr:m.R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(g.T),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return d.r.isUri(n)&&p.y.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r.dz):super.runCommand(e,t)}run(e,t){const i=e.get(L.rr),n=re.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}(0,u.HW)(re.ID,re,4),(0,u.Fl)(ae);const le=u.DX.bindToContribution(re.get);(0,u.E_)(new le({id:"acceptRenameInput",precondition:Y,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:x.M$.and(m.R.focus,x.M$.not("isComposing")),primary:3}})),(0,u.E_)(new le({id:"acceptRenameInputWithPreview",precondition:x.M$.and(Y,x.M$.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:x.M$.and(m.R.focus,x.M$.not("isComposing")),primary:2051}})),(0,u.E_)(new le({id:"cancelRenameInput",precondition:Y,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:m.R.focus,primary:9,secondary:[1033]}})),(0,S.ug)(class extends S.L{constructor(){super({id:"focusNextRenameSuggestion",title:{...C.aS("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:Y,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(g.T).getFocusedCodeEditor();if(!t)return;const i=re.get(t);i&&i.focusNextRenameSuggestion()}}),(0,S.ug)(class extends S.L{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...C.aS("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:Y,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(g.T).getFocusedCodeEditor();if(!t)return;const i=re.get(t);i&&i.focusPreviousRenameSuggestion()}}),(0,u.ke)("_executeDocumentRenameProvider",(function(e,t,i,...n){const[o]=n;(0,c.j)("string"===typeof o);const{renameProvider:s}=e.get(v.ILanguageFeaturesService);return se(s,t,i,o)})),(0,u.ke)("_executePrepareRename",(async function(e,t,i){const{renameProvider:n}=e.get(v.ILanguageFeaturesService),o=new oe(t,i,n),r=await o.resolveRenameLocation(s.XO.None);if(r?.rejectReason)throw new Error(r.rejectReason);return r})),R.O.as(k.Fd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:C.kg("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},56673:(e,t,i)=>{"use strict";var n=i(9659),o=i(5091),s=i(16259),r=i(50395),a=i(35037),l=i(4117),c=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},d=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends o.jG{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(e.onDidChangeModelLanguage((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(t.onDidChange((t=>{const i=this.editor.getModel()?.getLanguageId();i&&t.affects(i)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(e.onDidChangeConfiguration((t=>{this.options&&!t.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(this.editor.onDidChangeModelContent((e=>{this.computeSectionHeaders.schedule()}))),this._register(e.onDidChangeModelTokens((e=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)}))),this.computeSectionHeaders=this._register(new n.uC((()=>{this.findSectionHeaders()}),250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;return i||n?.markers?{foldingRules:n,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}:void 0}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then((i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)}))}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter((e=>{if(!e.shouldBeInComments)return!0;const i=t.validateRange(e.range),n=t.tokenization.getLineTokens(i.startLineNumber),o=n.findTokenIndexAtOffset(i.startColumn-1),s=n.getStandardTokenType(o),r=n.getLanguageId(o);return r===t.getLanguageId()&&1===s})));const i=Object.values(this.currentOccurrences).map((e=>e.decorationId)),n=e.map((e=>h(e)));this.editor.changeDecorations((t=>{const o=t.deltaDecorations(i,n);this.currentOccurrences={};for(let i=0,n=o.length;i{"use strict";var n,o=i(5091),s=i(14396),r=i(69361),a=i(32828),l=i(9659),c=i(67792),d=i(15911),u=i(4686),h=i(27280),g=i(85983),p=i(84240),f=i(12847),m=i(67284),_=i(36285),v=i(38572),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};let w=class extends o.jG{constructor(e,t,i,n,o,s){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new C(t,e,i,o,s)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];(0,v.K)(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach((e=>{(0,v.K)(e,i,n)&&r(e)})),this._register(t.onModelAdded((e=>{(0,v.K)(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(v.r)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};w=b([y(0,m.ISemanticTokensStylingService),y(1,r.IModelService),y(2,d.Gy),y(3,a.pG),y(4,g.ILanguageFeatureDebounceService),y(5,f.ILanguageFeaturesService)],w);let C=class extends o.jG{static{n=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,s,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:n.REQUEST_MIN_DELAY,max:n.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new l.uC((()=>this._fetchDocumentSemanticTokensNow()),n.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeAttached((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const a=()=>{(0,o.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"===typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};a(),this._register(this._provider.onDidChange((()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,o.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,h.br)(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new c.Qi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,h.aw)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],r=this._model.onDidChangeContent((e=>{o.push(e)})),a=new p.W(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{const t=e&&(s.MB(e)||"string"===typeof e.message&&-1!==e.message.indexOf("busy"));t||s.dz(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let s=0;s{(o.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void r();if((0,h.yS)(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const o=s.data,r=new Uint32Array(o.length+e);let a=o.length,l=r.length;for(let c=t.edits.length-1;c>=0;c--){const e=t.edits[c];if(e.start>o.length)return i.warnInvalidEditStart(s.resultId,t.resultId,c,e.start,o.length),void this._model.tokenization.setSemanticTokens(null,!0);const d=a-(e.start+e.deleteCount);d>0&&(n._copy(o,a-d,r,l-d,d),l-=d),e.data&&(n._copy(e.data,0,r,l-e.data.length,e.data.length),l-=e.data.length),a=e.start}a>0&&n._copy(o,0,r,0,a),t={resultId:t.resultId,data:r}}}if((0,h.BB)(t)){this._currentDocumentResponse=new S(e,t.resultId,t.data);const n=(0,u.toMultilineTokens2)(t,i,this._model.getLanguageId());if(o.length>0)for(const e of o)for(const t of n)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(n,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}else this._model.tokenization.setSemanticTokens(null,!1)}};C=n=b([y(1,m.ISemanticTokensStylingService),y(2,d.Gy),y(3,g.ILanguageFeatureDebounceService),y(4,f.ILanguageFeaturesService)],C);class S{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,_.x)(w)},90445:(e,t,i)=>{"use strict";var n=i(9659),o=i(5091),s=i(16259),r=i(27280),a=i(38572),l=i(4686),c=i(32828),d=i(15911),u=i(85983),h=i(84240),g=i(12847),p=i(67284),f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};let _=class extends o.jG{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,i,o,s,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=o,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new n.uC((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const l=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{l()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),l()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),l()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),l()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(a.r)&&(this._cancelAll(),l())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),l()}))),l()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),o=(0,n.SS)((i=>Promise.resolve((0,r.nZ)(this._provider,e,t,i)))),s=new h.W(!1);return o.then((n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,(0,l.toMultilineTokens2)(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(o)),(()=>this._removeOutstandingRequest(o))),o}};_=f([m(1,p.ISemanticTokensStylingService),m(2,d.Gy),m(3,c.pG),m(4,u.ILanguageFeatureDebounceService),m(5,g.ILanguageFeaturesService)],_),(0,s.HW)(_.ID,_,1)},27280:(e,t,i)=>{"use strict";i.d(t,{BB:()=>h,WG:()=>y,aw:()=>_,br:()=>f,nZ:()=>C,yS:()=>g});var n=i(67792),o=i(14396),s=i(29133),r=i(69361),a=i(72786),l=i(50322),c=i(33699),d=i(8690),u=i(12847);function h(e){return e&&!!e.data}function g(e){return e&&Array.isArray(e.edits)}class p{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function f(e,t){return e.has(t)}function m(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function _(e,t,i,n,o){const s=m(e,t),r=await Promise.all(s.map((async e=>{let s,r=null;try{s=await e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(a){r=a,s=null}return s&&(h(s)||g(s))||(s=null),new p(e,s,r)})));for(const a of r){if(a.error)throw a.error;if(a.tokens)return a}return r.length>0?r[0]:null}function v(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}class b{constructor(e,t){this.provider=e,this.tokens=t}}function y(e,t){return e.has(t)}function w(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function C(e,t,i,n){const s=w(e,t),r=await Promise.all(s.map((async e=>{let s;try{s=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(r){(0,o.M_)(r),s=null}return s&&h(s)||(s=null),new b(e,s)})));for(const o of r)if(o.tokens)return o;return r.length>0?r[0]:null}a.w.registerCommand("_provideDocumentSemanticTokensLegend",(async(e,...t)=>{const[i]=t;(0,l.j)(i instanceof s.r);const n=e.get(r.IModelService).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(u.ILanguageFeaturesService),c=v(o,n);return c?c[0].getLegend():e.get(a.d).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})),a.w.registerCommand("_provideDocumentSemanticTokens",(async(e,...t)=>{const[i]=t;(0,l.j)(i instanceof s.r);const o=e.get(r.IModelService).getModel(i);if(!o)return;const{documentSemanticTokensProvider:d}=e.get(u.ILanguageFeaturesService);if(!f(d,o))return e.get(a.d).executeCommand("_provideDocumentRangeSemanticTokens",i,o.getFullModelRange());const g=await _(d,o,null,null,n.XO.None);if(!g)return;const{provider:p,tokens:m}=g;if(!m||!h(m))return;const v=(0,c.encodeSemanticTokensDto)({id:0,type:"full",data:m.data});return m.resultId&&p.releaseDocumentSemanticTokens(m.resultId),v})),a.w.registerCommand("_provideDocumentRangeSemanticTokensLegend",(async(e,...t)=>{const[i,o]=t;(0,l.j)(i instanceof s.r);const a=e.get(r.IModelService).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:c}=e.get(u.ILanguageFeaturesService),h=w(c,a);if(0===h.length)return;if(1===h.length)return h[0].getLegend();if(!o||!d.Q.isIRange(o))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),h[0].getLegend();const g=await C(c,a,d.Q.lift(o),n.XO.None);return g?g.provider.getLegend():void 0})),a.w.registerCommand("_provideDocumentRangeSemanticTokens",(async(e,...t)=>{const[i,o]=t;(0,l.j)(i instanceof s.r),(0,l.j)(d.Q.isIRange(o));const a=e.get(r.IModelService).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:h}=e.get(u.ILanguageFeaturesService),g=await C(h,a,d.Q.lift(o),n.XO.None);return g&&g.tokens?(0,c.encodeSemanticTokensDto)({id:0,type:"full",data:g.tokens.data}):void 0}))},38572:(e,t,i)=>{"use strict";i.d(t,{K:()=>o,r:()=>n});const n="editor.semanticHighlighting";function o(e,t,i){const o=i.getValue(n,{overrideIdentifier:e.getLanguageId(),resource:e.uri})?.enabled;return"boolean"===typeof o?o:t.getColorTheme().semanticHighlighting}},7205:(e,t,i)=>{"use strict";i.d(t,{n:()=>r});var n=i(67806),o=i(36788),s=i(8690);class r{async provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;await new Promise((t=>r._bracketsRightYield(t,0,e,n,o))),await new Promise((i=>r._bracketsLeftYield(i,0,e,n,o,t)))}return i}static{this._maxDuration=30}static{this._maxRounds=2}static _bracketsRightYield(e,t,i,o,s){const a=new Map,l=Date.now();while(1){if(t>=r._maxRounds){e();break}if(!o){e();break}const c=i.bracketPairs.findNextBracket(o);if(!c){e();break}const d=Date.now()-l;if(d>r._maxDuration){setTimeout((()=>r._bracketsRightYield(e,t+1,i,o,s)));break}if(c.bracketInfo.isOpeningBracket){const e=c.bracketInfo.bracketText,t=a.has(e)?a.get(e):0;a.set(e,t+1)}else{const e=c.bracketInfo.getOpeningBrackets()[0].bracketText;let t=a.has(e)?a.get(e):0;if(t-=1,a.set(e,Math.max(0,t)),t<0){let t=s.get(e);t||(t=new n.w,s.set(e,t)),t.push(c.range)}}o=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,o,a){const l=new Map,c=Date.now();while(1){if(t>=r._maxRounds&&0===o.size){e();break}if(!n){e();break}const d=i.bracketPairs.findPrevBracket(n);if(!d){e();break}const u=Date.now()-c;if(u>r._maxDuration){setTimeout((()=>r._bracketsLeftYield(e,t+1,i,n,o,a)));break}if(d.bracketInfo.isOpeningBracket){const e=d.bracketInfo.bracketText;let t=l.has(e)?l.get(e):0;if(t-=1,l.set(e,Math.max(0,t)),t<0){const t=o.get(e);if(t){const n=t.shift();0===t.size&&o.delete(e);const l=s.Q.fromPositions(d.range.getEndPosition(),n.getStartPosition()),c=s.Q.fromPositions(d.range.getStartPosition(),n.getEndPosition());a.push({range:l}),a.push({range:c}),r._addBracketLeading(i,c,a)}}}else{const e=d.bracketInfo.getOpeningBrackets()[0].bracketText,t=l.has(e)?l.get(e):0;l.set(e,t+1)}n=d.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(n);0!==r&&r!==t.startColumn&&(i.push({range:s.Q.fromPositions(new o.y(n,r),t.getEndPosition())}),i.push({range:s.Q.fromPositions(new o.y(n,1),t.getEndPosition())}));const a=n-1;if(a>0){const n=e.getLineFirstNonWhitespaceColumn(a);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:s.Q.fromPositions(new o.y(a,n),t.getEndPosition())}),i.push({range:s.Q.fromPositions(new o.y(a,1),t.getEndPosition())}))}}}},52335:(e,t,i)=>{"use strict";var n=i(85053),o=i(67792),s=i(14396),r=i(16259),a=i(36788),l=i(8690),c=i(98581),d=i(57479),u=i(7205),h=i(20601);class g{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:o,startColumn:s}=n,r=i.column-s;let a=r,c=r,d=0;for(;a>=0;a--){const e=o.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if((0,h.Lv)(e)&&(0,h.Wv)(d))break;d=e}for(a+=1;c0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new l.Q(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var p,f=i(41337),m=i(6330),_=i(72786),v=i(12847),b=i(64037),y=i(50322),w=i(29133),C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},S=function(e,t){return function(i,n){t(i,n,e)}};class k{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new k(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let x=class{static{p=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(p.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await I(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(114),o.XO.None).then((e=>{if(n.EI(e)&&e.length===t.length&&this._editor.hasModel()&&n.aI(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new k(0,e))),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)}))}})),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const s=this._state.map((e=>c.L.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}};x=p=C([S(1,v.ILanguageFeaturesService)],x);class E extends r.ks{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=x.get(t);i&&await i.run(this._forward)}}class L extends E{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:f.kg("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:d.R.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:m.D8.MenubarSelectionMenu,group:"1_basic",title:f.kg({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}_.w.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class T extends E{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:f.kg("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:d.R.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:m.D8.MenubarSelectionMenu,group:"1_basic",title:f.kg({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}async function I(e,t,i,o,r){const c=e.all(t).concat(new g(o.selectSubwords));1===c.length&&c.unshift(new u.n);const d=[],h=[];for(const a of c)d.push(Promise.resolve(a.provideSelectionRanges(t,i,r)).then((e=>{if(n.EI(e)&&e.length===i.length)for(let t=0;t{if(0===e.length)return[];e.sort(((e,t)=>a.y.isBefore(e.getStartPosition(),t.getStartPosition())?1:a.y.isBefore(t.getStartPosition(),e.getStartPosition())||a.y.isBefore(e.getEndPosition(),t.getEndPosition())?-1:a.y.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let n;for(const t of e)(!n||l.Q.containsRange(t,n)&&!l.Q.equalsRange(t,n))&&(i.push(t),n=t);if(!o.selectLeadingAndTrailingWhitespace)return i;const s=[i[0]];for(let o=1;o{"use strict";i.d(t,{O:()=>b});var n,o=i(5091),s=i(50322),r=i(16259),a=i(36788),l=i(57479),c=i(50395),d=i(12847),u=i(69547),h=i(41337),g=i(18904),p=i(12660),f=i(2463),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};const v={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let b=class{static{n=this}static{this.ID="snippetController2"}static get(e){return e.getContribution(n.ID)}static{this.InSnippetMode=new g.N1("inSnippetMode",!1,(0,h.kg)("inSnippetMode","Whether the editor in current in snippet mode"))}static{this.HasNextTabstop=new g.N1("hasNextTabstop",!1,(0,h.kg)("hasNextTabstop","Whether there is a next tab stop when in snippet mode"))}static{this.HasPrevTabstop=new g.N1("hasPrevTabstop",!1,(0,h.kg)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"))}constructor(e,t,i,s,r){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=r,this._snippetListener=new o.Cm,this._modelVersionId=-1,this._inSnippet=n.InSnippetMode.bindTo(s),this._hasNextTabstop=n.HasNextTabstop.bindTo(s),this._hasPrevTabstop=n.HasPrevTabstop.bindTo(s)}dispose(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._session?.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,"undefined"===typeof t?v:{...v,...t})}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!==typeof e&&this.cancel(),this._session?((0,s.j)("string"===typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new f.O(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!a.y.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),o=Boolean(i.choice.options.find((e=>e.value===n))),s=[];for(let r=0;r{i?.dispose(),n=!1},s=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:s,disable:o}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:e}=this._session;if(!e||!this._choiceCompletions)return this._choiceCompletions?.disable(),void(this._currentChoice=void 0);this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{(0,u.p3)(this._editor,this._choiceCompletions.provider)})))}finish(){while(this._inSnippet.get())this.next()}cancel(e=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};b=n=m([_(1,p.rr),_(2,d.ILanguageFeaturesService),_(3,g.fN),_(4,c.JZ)],b),(0,r.HW)(b.ID,b,4);const y=r.DX.bindToContribution(b.get);(0,r.E_)(new y({id:"jumpToNextSnippetPlaceholder",precondition:g.M$.and(b.InSnippetMode,b.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:2}})),(0,r.E_)(new y({id:"jumpToPrevSnippetPlaceholder",precondition:g.M$.and(b.InSnippetMode,b.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:1026}})),(0,r.E_)(new y({id:"leaveSnippet",precondition:b.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:9,secondary:[1033]}})),(0,r.E_)(new y({id:"acceptSnippet",precondition:b.InSnippetMode,handler:e=>e.finish()}))},18760:(e,t,i)=>{"use strict";i.d(t,{EY:()=>s,GR:()=>l,Or:()=>a,fr:()=>p,mQ:()=>g});class n{constructor(){this.value="",this.pos=0}static{this._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t,i=0,o=this.value.charCodeAt(e);if(t=n._table[o],"number"===typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(n.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(e+i)}while(n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}if(n.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(e+ ++i)}while(n.isVariableCharacter(o)||n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(e+i)}while(!isNaN(o)&&"undefined"===typeof n._table[o]&&!n.isDigitCharacter(o)&&!n.isVariableCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}}class o{constructor(){this._children=[]}appendChild(e){return e instanceof s&&this._children[this._children.length-1]instanceof s?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;while(1){if(!e)return;if(e instanceof g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class s extends o{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new s(this.value)}}class r extends o{}class a extends r{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){const e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends o{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof s&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new l;return this.options.forEach(e.appendChild,e),e}}class c extends o{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof d&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof d){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new c;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class d extends o{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"===typeof this.ifValue?this.ifValue:Boolean(e)||"string"!==typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){const e=new d(this.index,this.shorthandName,this.ifValue,this.elseValue);return e}}class u extends r{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new s(t)],!0)}clone(){const e=new u(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function h(e,t){const i=[...e];while(i.length>0){const e=i.shift(),n=t(e);if(!n)break;i.unshift(...e.children)}}class g extends o{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof a&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return h([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;while(i)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof u&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){h(this.children,e)}}class p{constructor(){this._scanner=new n,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new g;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;this._scanner.text(e),this._token=this._scanner.next();while(this._parse(t));const n=new Map,o=[];t.walk((e=>(e instanceof a&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):o.push(e)),!0)));const s=(e,i)=>{const o=n.get(e.index);if(!o)return;const r=new a(e.index);r.transform=e.transform;for(const t of o){const e=t.clone();r.appendChild(e),e instanceof a&&n.has(e.index)&&!i.has(e.index)&&(i.add(e.index),s(e,i),i.delete(e.index))}t.replace(e,[r])},r=new Set;for(const a of o)s(a,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){if(t||i&&e.placeholders.length>0){const t=e.placeholders.find((e=>0===e.index));t||e.appendChild(new a(0))}}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;while(this._token.type!==e){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new s(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token,n=this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0));return n?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new u(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token,n=this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0));if(!n)return this._backTo(i);const o=new a(Number(t));if(this._accept(1))while(1){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new s("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else{if(!(o.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i);{const t=new l;while(1){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(t),this._accept(4)))return e.appendChild(o),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];while(1){if(2===this._token.type||7===this._token.type)break;let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new s(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token,n=this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0));if(!n)return this._backTo(i);const o=new u(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i);while(1){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new s("${"+t+":")),o.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new c;let i="",n="";while(1){if(this._accept(6))break;let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}while(1){if(this._accept(6))break;let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new s(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}while(1){if(this._accept(4))break;if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(o){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new d(Number(n))),!0;if(this._accept(4))return e.appendChild(new d(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new d(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new d(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new s(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},2463:(e,t,i)=>{"use strict";i.d(t,{O:()=>M});var n=i(85053),o=i(5091),s=i(20601),r=i(28346),a=i(8690),l=i(98581),c=i(50395),d=i(35037),u=i(48056),h=i(81714),g=i(18760),p=i(37531),f=i(25160);function m(e,t=f.uF){return(0,p.No)(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var _=i(52444),v=i(84366),b=i(23264),y=i(41337),w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class S{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class k{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=(0,s.UU)(i,0,this._selection.startColumn-1);let o=n;e.snippet.walk((t=>t!==e&&(t instanceof g.EY&&(o=(0,s.UU)((0,s.uz)(t.value).pop())),!0)));const r=(0,s.Qp)(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${o.substr(r)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class x{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return _.P8(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=_.P8(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===_.pD(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,v.pD)(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class E{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,s.AV)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let L=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};L=w([C(2,c.JZ)],L);class T{constructor(){this._date=new Date}static{this.dayNames=[y.kg("Sunday","Sunday"),y.kg("Monday","Monday"),y.kg("Tuesday","Tuesday"),y.kg("Wednesday","Wednesday"),y.kg("Thursday","Thursday"),y.kg("Friday","Friday"),y.kg("Saturday","Saturday")]}static{this.dayNamesShort=[y.kg("SundayShort","Sun"),y.kg("MondayShort","Mon"),y.kg("TuesdayShort","Tue"),y.kg("WednesdayShort","Wed"),y.kg("ThursdayShort","Thu"),y.kg("FridayShort","Fri"),y.kg("SaturdayShort","Sat")]}static{this.monthNames=[y.kg("January","January"),y.kg("February","February"),y.kg("March","March"),y.kg("April","April"),y.kg("May","May"),y.kg("June","June"),y.kg("July","July"),y.kg("August","August"),y.kg("September","September"),y.kg("October","October"),y.kg("November","November"),y.kg("December","December")]}static{this.monthNamesShort=[y.kg("JanuaryShort","Jan"),y.kg("FebruaryShort","Feb"),y.kg("MarchShort","Mar"),y.kg("AprilShort","Apr"),y.kg("MayShort","May"),y.kg("JuneShort","Jun"),y.kg("JulyShort","Jul"),y.kg("AugustShort","Aug"),y.kg("SeptemberShort","Sep"),y.kg("OctoberShort","Oct"),y.kg("NovemberShort","Nov"),y.kg("DecemberShort","Dec")]}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return T.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return T.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return T.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return T.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,o=Math.abs(e)-60*i,s=o<10?"0"+o:o;return t+n+":"+s}}}class I{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=(0,h.Q_)(this._workspaceService.getWorkspace());return(0,h.A7)(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if((0,h.jB)(e))return _.P8(e.uri.path);let t=_.P8(e.configPath.path);return t.endsWith(h.kF)&&(t=t.substr(0,t.length-h.kF.length-1)),t}_resoveWorkspacePath(e){if((0,h.jB)(e))return m(e.uri.fsPath);const t=_.P8(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?m(i):"/"}}class R{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?(0,b.b)():void 0}}var D,N=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};class O{static{this._decor={active:d.kI.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:d.kI.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:d.kI.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:d.kI.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})}}constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,n.$z)(t.placeholders,g.Or.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),s=a.Q.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),r=i.isFinalTabstop?O._decor.inactiveFinal:O._decor.inactive,l=t.addDecoration(s,r);this._placeholderDecorations.set(i,l)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),s=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),r=this._editor.getModel().getDecorationRange(s);n.push(new l.L(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(s,o.isFinalTabstop?O._decor.activeFinal:O._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?O._decor.activeFinal:O._decor.active),i.add(t)}}for(const[t,o]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(o,t.isFinalTabstop?O._decor.inactiveFinal:O._decor.inactive);return n}));return t?this.move(e):i??[]}_hasPlaceholderBeenCollapsed(e){let t=e;while(t){if(t instanceof g.Or){const e=this._placeholderDecorations.get(t),i=this._editor.getModel().getDecorationRange(e);if(i.isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!e?.choice)return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof g.GR,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(-1!==o._offset),console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(s+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),s=o._snippet.fullLen(e),r=a.Q.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+s)),l=i.addDecoration(r,O._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=(0,n.$z)(this._snippet.placeholders,g.Or.compareByIndex)}))}}const P={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let M=D=class{static adjustWhitespace(e,t,i,n,o){const r=e.getLineContent(t.lineNumber),a=(0,s.UU)(r,0,t.column-1);let l;return n.walk((t=>{if(!(t instanceof g.EY)||t.parent instanceof g.GR)return!0;if(o&&!o.has(t))return!0;const s=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)s[0]=e.normalizeIndentation(s[0]);else{l=l??n.toString();const t=l.charCodeAt(i-1);10!==t&&13!==t||(s[0]=e.normalizeIndentation(a+s[0]))}for(let t=1;te.get(h.VR))),v=e.invokeWithinContext((e=>new x(e.get(u.L),m))),b=()=>l,y=m.getValueInRange(D.adjustSelection(m,e.getSelection(),i,0)),w=m.getValueInRange(D.adjustSelection(m,e.getSelection(),0,n)),C=m.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),N=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>a.Q.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:a,idx:u}of N){let l=D.adjustSelection(m,a,i,0),h=D.adjustSelection(m,a,0,n);y!==m.getValueInRange(l)&&(l=a),w!==m.getValueInRange(h)&&(h=a);const x=a.setStartPosition(l.startLineNumber,l.startColumn).setEndPosition(h.endLineNumber,h.endColumn),A=(new g.fr).parse(t,!0,o),P=x.getStartPosition(),M=D.adjustWhitespace(m,P,s||u>0&&C!==m.getLineFirstNonWhitespaceColumn(a.positionLineNumber),A);A.resolveVariables(new S([v,new E(b,u,N.length,"spread"===e.getOption(79)),new k(m,a,u,c),new L(m,a,d),new T,new I(_),new R])),p[u]=r.k.replace(x,A.toString()),p[u].identifier={major:u,minor:0},p[u]._isTracked=!0,f[u]=new O(e,A,M)}return{edits:p,snippets:f}}static createEditsAndSnippetsFromEdits(e,t,i,n,o,s,l){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const c=[],d=e.getModel(),p=new g.fr,f=new g.mQ,m=new S([e.invokeWithinContext((e=>new x(e.get(u.L),d))),new E((()=>o),0,e.getSelections().length,"spread"===e.getOption(79)),new k(d,e.getSelection(),0,s),new L(d,e.getSelection(),l),new T,new I(e.invokeWithinContext((e=>e.get(h.VR)))),new R]);t=t.sort(((e,t)=>a.Q.compareRangesUsingStarts(e.range,t.range)));let _=0;for(let u=0;u0){const i=t[u-1].range,n=a.Q.fromPositions(i.getEndPosition(),e.getStartPosition()),o=new g.EY(d.getValueInRange(n));f.appendChild(o),_+=o.value.length}const n=p.parseFragment(i,f);D.adjustWhitespace(d,e.getStartPosition(),!0,f,new Set(n)),f.resolveVariables(m);const o=f.toString(),s=o.slice(_);_=o.length;const l=r.k.replace(e,s);l.identifier={major:u,minor:0},l._isTracked=!0,c.push(l)}return p.ensureFinalTabstop(f,i,!0),{edits:c,snippets:[new O(e,f,"")]}}constructor(e,t,i=P,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){(0,o.AS)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"===typeof this._template?D.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):D.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let n=0;nl.L.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=P){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=D.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let o=0;ol.L.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(a.Q.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(a.Q.compareRangesUsingStarts);for(let o=0;o0}};M=D=N([A(3,c.JZ)],M)},71406:(e,t,i)=>{"use strict";var n=i(16259),o=i(41337);const s=Object.freeze({View:(0,o.aS)("view","View"),Help:(0,o.aS)("help","Help"),Test:(0,o.aS)("test","Test"),File:(0,o.aS)("file","File"),Preferences:(0,o.aS)("preferences","Preferences"),Developer:(0,o.aS)({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});var r=i(6330),a=i(32828),l=i(18904),c=i(57479),d=i(5091),u=i(12847),h=i(2150),g=i(21776),p=i(85053),f=i(23740),m=i(83660),_=i(50576),v=i(36788),b=i(13647),y=i(1550),w=i(20529),C=i(45292);class S{constructor(e,t,i,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=i,this.showEndForLine=n}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&(0,p.aI)(this.startLineNumbers,e.startLineNumbers)&&(0,p.aI)(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new S([],[],0)}}const k=(0,g.H)("stickyScrollViewLayer",{createHTML:e=>e}),x="data-sticky-line-index",E="data-sticky-is-line",L="data-sticky-is-line-number",T="data-sticky-is-folding-icon";class I extends d.jG{constructor(e){super(),this._editor=e,this._foldingIconStore=new d.Cm,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof _.t),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&t(),e.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{this._updateWidgetWidth()}))),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find((t=>t.lineNumber===e))}getCurrentLines(){return this._lineNumbers}setState(e,t,i){if(void 0===i&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const n=this._isWidgetHeightZero(e),o=n?void 0:e,s=n?0:this._findLineToRebuildWidgetFrom(e,i);this._renderRootNode(o,t,s),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];return 0===t}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(void 0!==t)return t;const i=this._previousState,n=e.startLineNumbers.findIndex((e=>!i.startLineNumbers.includes(e)));return-1===n?0:n}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",this._editor.getScrollWidth()-e.verticalScrollbarWidth+"px"),this._rootDomNode.style.width=e.width-e.verticalScrollbarWidth+"px"}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;te.scrollWidth)))+n.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){const e=this._editor.getOption(111);"mouseover"===e&&(this._foldingIconStore.add(h.ko(this._lineNumbersDomNode,h.Bx.MOUSE_ENTER,(()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(h.ko(this._lineNumbersDomNode,h.Bx.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const o=this._editor._getViewModel();if(!o)return;const s=o.coordinatesConverter.convertModelPositionToViewPosition(new v.y(t,1)).lineNumber,r=o.getViewLineRenderingData(s),a=this._editor.getOption(68);let l;try{l=y.d.filter(r.inlineDecorations,s,r.minColumn,r.maxColumn)}catch(S){l=[]}const c=new w.zL(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,l,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new b.fe(2e3),u=(0,w.UW)(c,d);let h;h=k?k.createHTML(d.build()):d.build();const g=document.createElement("span");g.setAttribute(x,String(e)),g.setAttribute(E,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=h;const p=document.createElement("span");p.setAttribute(x,String(e)),p.setAttribute(L,""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const f=n.contentLeft;p.style.width=`${f}px`;const m=document.createElement("span");1===a.renderType||3===a.renderType&&t%10===0?m.innerText=t.toString():2===a.renderType&&(m.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),m.className="sticky-line-number-inner",m.style.lineHeight=`${this._lineHeight}px`,m.style.width=`${n.lineNumbersWidth}px`,m.style.paddingLeft=`${n.lineNumbersLeft}px`,p.appendChild(m);const _=this._renderFoldingIconForLine(i,t);_&&p.appendChild(_.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(m),p.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const C=new R(e,t,g,p,_,u.characterMapping,g.scrollWidth);return this._updateTopAndZIndexOfStickyLine(C)}_updateTopAndZIndexOfStickyLine(e){const t=e.index,i=e.lineDomNode,n=e.lineNumberDomNode,o=t===this._lineNumbers.length-1,s="0",r="1";i.style.zIndex=o?s:r,n.style.zIndex=o?s:r;const a=`${t*this._lineHeight+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`,l=t*this._lineHeight+"px";return i.style.top=o?a:l,n.style.top=o?a:l,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(111);if(!e||"never"===i)return;const n=e.regions,o=n.findRange(t),s=n.getStartLineNumber(o),r=t===s;if(!r)return;const a=n.isCollapsed(o),l=new D(a,s,n.getEndLineNumber(o),this._lineHeight);return l.setVisible(!!this._isOnGlyphMargin||(a||"always"===i)),l.domNode.setAttribute(T,""),l}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=(0,m.rk)(t.characterMapping,e,0);return new v.y(t.lineNumber,i)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,x);return t?parseInt(t,10):null}isInStickyLine(e){const t=this._getAttributeValue(e,E);return void 0!==t}isInFoldingIconDomNode(e){const t=this._getAttributeValue(e,T);return void 0!==t}_getAttributeValue(e,t){while(e&&e!==this._rootDomNode){const i=e.getAttribute(t);if(null!==i)return i;e=e.parentElement}}}class R{constructor(e,t,i,n,o,s,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=o,this.characterMapping=s,this.scrollWidth=r}}class D{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=f.L.asClassName(e?C.k0:C.E0)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}var N=i(67792),A=i(9659),O=i(40231),P=i(50395),M=i(83262),F=i(23358),B=i(13387),W=i(8568),H=i(14396);class V{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class j{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class z{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var U,$,q=i(5837),K=i(87778),G=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Q=function(e,t){return function(i,n){t(i,n,e)}};(function(e){e["OUTLINE_MODEL"]="outlineModel",e["FOLDING_PROVIDER_MODEL"]="foldingProviderModel",e["INDENTATION_MODEL"]="indentationModel"})(U||(U={})),function(e){e[e["VALID"]=0]="VALID",e[e["INVALID"]=1]="INVALID",e[e["CANCELED"]=2]="CANCELED"}($||($={}));let Y=class extends d.jG{constructor(e,t,i,n){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new A.ve(300)),this._updateOperation=this._register(new d.Cm),this._editor.getOption(116).defaultModel){case U.OUTLINE_MODEL:this._modelProviders.push(new X(this._editor,n));case U.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new te(this._editor,t,n));case U.INDENTATION_MODEL:this._modelProviders.push(new ee(this._editor,i));break}}dispose(){this._modelProviders.forEach((e=>e.dispose())),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger((async()=>{for(const t of this._modelProviders){const{statusPromise:i,modelPromise:n}=t.computeStickyModel(e);this._modelPromise=n;const o=await i;if(this._modelPromise!==n)return null;switch(o){case $.CANCELED:return this._updateOperation.clear(),null;case $.VALID:return t.stickyModel}}return null})).catch((e=>((0,H.dz)(e),null)))}};Y=G([Q(2,K._Y),Q(3,u.ILanguageFeaturesService)],Y);class Z extends d.jG{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,$.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=(0,A.SS)((e=>this.createModelFromProvider(e)));return{statusPromise:t.then((t=>this.isModelValid(t)?e.isCancellationRequested?$.CANCELED:(this._stickyModel=this.createStickyModel(e,t),$.VALID):this._invalid())).then(void 0,(e=>((0,H.dz)(e),$.CANCELED))),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let X=class extends Z{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return M.i9.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){const{stickyOutlineElement:i,providerID:n}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),o=this._editor.getModel();return new z(o.uri,o.getVersionId(),i,n)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(q.f.first(e.children.values())instanceof M.e0){const n=q.f.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,o="",s=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>s&&(n=i,s=e,o=i.id)}t=o,i=n.children}}else i=e.children;const n=[],o=Array.from(i.values()).sort(((e,t)=>{const i=new V(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new V(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const r of o)n.push(this._stickyModelFromOutlineElement(r,r.symbol.selectionRange.startLineNumber));const s=new j(void 0,n,void 0);return{stickyOutlineElement:s,providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(const e of o.children.values())i.push(this._stickyModelFromOutlineElement(e,o.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new V(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new j(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof M.LC?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};X=G([Q(1,u.ILanguageFeaturesService)],X);class J extends Z{constructor(e){super(e),this._foldingLimitReporter=new F.BP(e)}createStickyModel(e,t){const i=this._fromFoldingRegions(t),n=this._editor.getModel();return new z(n.uri,n.getVersionId(),i,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new j(void 0,[],void 0);for(let o=0;o0&&(this.provider=this._register(new B.M(e.getModel(),n,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return void 0!==this.provider}async createModelFromProvider(e){return this.provider?.compute(e)??null}};te=G([Q(2,u.ILanguageFeaturesService)],te);var ie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ne=function(e,t){return function(i,n){t(i,n,e)}};class oe{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let se=class extends d.jG{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new O.vl),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new d.Cm),this._updateSoon=this._register(new A.uC((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._sessionStore.clear();const e=this._editor.getOption(116);e.enabled&&(this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>this.update()))),this._sessionStore.add((0,d.s)((()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null}))),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null;const e=this._editor;e.hasModel()&&(this._stickyModelProvider=new Y(e,(()=>this._updateSoon.schedule()),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new N.Qi,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization())return void(this._model=null);const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,o){if(0===t.children.length)return;let s=o;const r=[];for(let c=0;ce-t))),l=this.updateIndex((0,p.El)(r,e.startLineNumber+n,((e,t)=>e-t)));for(let c=a;c<=l;c++){const r=t.children[c];if(!r)return;if(r.range){const t=r.range.startLineNumber,o=r.range.endLineNumber;e.startLineNumber<=o+1&&t-1<=e.endLineNumber&&t!==s&&(s=t,i.push(new oe(t,o-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,r,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,r,i,n,o)}}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];let t=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,-1);const i=this._editor._getViewModel()?.getHiddenAreas();if(i)for(const n of i)t=t.filter((e=>!(e.startLineNumber>=n.startLineNumber&&e.endLineNumber<=n.endLineNumber+1)));return t}};se=ie([ne(1,u.ILanguageFeaturesService),ne(2,P.JZ)],se);var re,ae=i(46403),le=i(51170),ce=i(8690),de=i(85901),ue=i(26805),he=i(85983),ge=i(46274),pe=i(17662),fe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},me=function(e,t){return function(i,n){t(i,n,e)}};let _e=class extends d.jG{static{re=this}static{this.ID="store.contrib.stickyScrollController"}constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new d.Cm,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new I(this._editor),this._stickyLineCandidateProvider=new se(this._editor,i,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=S.Empty,this._onDidResize(),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{this._readConfigurationChange(e)}))),this._register(h.ko(a,h.Bx.CONTEXT_MENU,(async e=>{this._onContextMenu(h.zk(a),e)}))),this._stickyScrollFocusedContextKey=c.R.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=c.R.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(h.w5(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(h.ko(a,h.Bx.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(re.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();const e=this._stickyScrollFocusedContextKey.get();!0!==e&&(this._focused=!0,this._focusDisposableStore=new d.Cm,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,(()=>this._editor.revealPosition(e)))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,(()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0)))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(ce.Q.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new d.Cm),t=this._register(new le.gi(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new ce.Q(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(h.b2(n,h.Bx.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new v.y(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}const t=this._stickyScrollWidget.isInFoldingIconDomNode(e.target);if(t){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);return void this._toggleFoldingRegionForLine(t)}const i=this._stickyScrollWidget.isInStickyLine(e.target);if(!i)return;let n=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!n){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===t)return;n=new v.y(t,1)}this._revealPosition(n)}))),this._register(h.b2(n,h.Bx.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}void 0!==this._showEndForLine&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._register(h.ko(n,h.Bx.MOUSE_LEAVE,(e=>{void 0!==this._showEndForLine&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const o=i(t);if(!o||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:s,textElement:r}=o;if(s.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=s,e.clear();const a=new N.Qi;let l;e.add((0,d.s)((()=>a.dispose(!0)))),(0,de.hE)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new v.y(s.startLineNumber,s.startColumn+1),!1,a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add((0,d.s)((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add((0,d.s)((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((async e=>{if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&this._editor.hasModel()&&this._stickyRangeProjectedOnEditor&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(ue.U,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e,t){const i=new ge.P(e,t);this._contextMenuService.showContextMenu({menuId:r.D8.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||null===e)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),i=t?.foldingIcon;if(!i)return;(0,pe.bC)(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(116);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=void 0,this._renderStickyScroll()}))),this._enabled=!0);const t=this._editor.getOption(68);2===t.renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)})))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const e=this._editor.getLayoutInfo(),t=e.height/this._editor.getOption(67);this._maxStickyLines=Math.round(.25*t)}async _renderStickyScroll(e){const t=this._editor.getModel();if(!t||t.isTooLargeForTokenization())return void this._resetState();const i=this._updateAndGetMinRebuildFromLine(e),n=this._stickyLineCandidateProvider.getVersionId(),o=void 0===n||n===t.getVersionId();if(o)if(this._focused)if(-1===this._focusedStickyElementIndex)await this._updateState(i),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const e=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];if(await this._updateState(i),0===this._stickyScrollWidget.lineNumberCount)this._focusedStickyElementIndex=-1;else{const t=this._stickyScrollWidget.lineNumbers.includes(e);t||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}}else await this._updateState(i)}_updateAndGetMinRebuildFromLine(e){if(void 0!==e){const t=void 0!==this._minRebuildFromLine?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await(F.WR.get(this._editor)?.getFoldingModel())??void 0,this._widgetState=this.findScrollWidgetState();const t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=S.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),i=this._editor.getScrollTop();let n=0;const o=[],s=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new V(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,c=r.nestingDepth;if(l-a>0){const r=(c-1)*e,d=c*e,u=this._editor.getBottomForLineNumber(a)-i,h=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>h&&r<=g){o.push(a),s.push(l+1),n=g-d;break}if(d>u&&d<=g&&(o.push(a),s.push(l+1)),o.length===t)break}}}return this._endLineNumbers=s,new S(o,s,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};_e=re=fe([me(1,ae.Z),me(2,u.ILanguageFeaturesService),me(3,K._Y),me(4,P.JZ),me(5,he.ILanguageFeatureDebounceService),me(6,l.fN)],_e);class ve extends r.L{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...(0,o.aS)("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:(0,o.kg)({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:(0,o.aS)("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:s.View,toggled:{condition:l.M$.equals("config.editor.stickyScroll.enabled",!0),title:(0,o.kg)("stickyScroll","Sticky Scroll"),mnemonicTitle:(0,o.kg)({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:r.D8.CommandPalette},{id:r.D8.MenubarAppearanceMenu,group:"4_editor",order:3},{id:r.D8.StickyScrollContext}]})}async run(e){const t=e.get(a.pG),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}}const be=100;class ye extends n.qO{constructor(){super({id:"editor.action.focusStickyScroll",title:{...(0,o.aS)("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:(0,o.kg)({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:l.M$.and(l.M$.has("config.editor.stickyScroll.enabled"),c.R.stickyScrollVisible),menu:[{id:r.D8.CommandPalette}]})}runEditorCommand(e,t){_e.get(t)?.focus()}}class we extends n.qO{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:(0,o.aS)("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:be,primary:18}})}runEditorCommand(e,t){_e.get(t)?.focusNext()}}class Ce extends n.qO{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:(0,o.aS)("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:be,primary:16}})}runEditorCommand(e,t){_e.get(t)?.focusPrevious()}}class Se extends n.qO{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:(0,o.aS)("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:be,primary:3}})}runEditorCommand(e,t){_e.get(t)?.goToFocused()}}class ke extends n.qO{constructor(){super({id:"editor.action.selectEditor",title:(0,o.aS)("selectEditor.title","Select Editor"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:be,primary:9}})}runEditorCommand(e,t){_e.get(t)?.selectEditor()}}(0,n.HW)(_e.ID,_e,1),(0,r.ug)(ve),(0,r.ug)(ye),(0,r.ug)(Ce),(0,r.ug)(we),(0,r.ug)(Se),(0,r.ug)(ke)},85482:(e,t,i)=>{"use strict";i.d(t,{C:()=>a,O:()=>r});var n=i(85053),o=i(10695),s=i(20601);class r{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class a{constructor(e,t,i,n,s,r,l=o.Nd.default,c=void 0){this.clipboardText=c,this._snippetCompareFn=a._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=l,"top"===r?this._snippetCompareFn=a._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=a._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let r="",a="";const l=1===this._refilterKind?this._items:this._filteredItems,c=[],d=!this._options.filterGraceful||l.length>2e3?o.dt:o.uU;for(let n=0;n=p)u.score=o.ne.Default;else if("string"===typeof u.completion.filterText){const t=d(r,a,e,u.completion.filterText,u.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===(0,s.W1)(u.completion.filterText,u.textLabel)?u.score=t:(u.score=(0,o.Jo)(r,a,e,u.textLabel,u.labelLow,0),u.score[0]=t[0])}else{const t=d(r,a,e,u.textLabel,u.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;u.score=t}}u.idx=n,u.distance=this._wordDistance.distance(u.position,u.completion),c.push(u),e.push(u.textLabel.length)}this._filteredItems=c.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,n.SO)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return a._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return a._compareCompletionItems(e,t)}}},69547:(e,t,i)=>{"use strict";i.d(t,{aR:()=>L,dt:()=>w,f3:()=>x,l1:()=>S,ob:()=>y,p3:()=>A,r3:()=>O});var n=i(67792),o=i(14396),s=i(10695),r=i(5091),a=i(84240),l=i(50322),c=i(29133),d=i(36788),u=i(8690),h=i(64037),g=i(18760),p=i(41337),f=i(6330),m=i(72786),_=i(18904),v=i(12847),b=i(73075);const y={Visible:b.dg,HasFocusedSuggestion:new _.N1("suggestWidgetHasFocusedSuggestion",!1,(0,p.kg)("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new _.N1("suggestWidgetDetailsVisible",!1,(0,p.kg)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new _.N1("suggestWidgetMultipleSuggestions",!1,(0,p.kg)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new _.N1("suggestionMakesTextEdit",!0,(0,p.kg)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new _.N1("acceptSuggestionOnEnter",!0,(0,p.kg)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new _.N1("suggestionHasInsertAndReplaceRange",!1,(0,p.kg)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new _.N1("suggestionInsertMode",void 0,{type:"string",description:(0,p.kg)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new _.N1("suggestionCanResolve",!1,(0,p.kg)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new f.D8("suggestWidgetStatusBar");class C{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=s.ne.Default,this.distance=0,this.textLabel="string"===typeof t.label?t.label:t.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,u.Q.isIRange(t.range)?(this.editStart=new d.y(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new d.y(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new d.y(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||u.Q.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new d.y(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new d.y(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new d.y(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||u.Q.spansMultipleLines(t.range.insert)||u.Q.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!==typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new a.W(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed()}),(e=>{(0,o.MB)(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})).finally((()=>{t.dispose()}))}return this._resolveCache}}class S{static{this.default=new S}constructor(e=2,t=new Set,i=new Set,n=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=o}}let k;function x(){return k}class E{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function L(e,t,i,s=S.default,l={triggerKind:0},c=n.XO.None){const d=new a.W;i=i.clone();const h=t.getWordAtPosition(i),p=h?new u.Q(i.lineNumber,h.startColumn,i.lineNumber,h.endColumn):u.Q.fromPositions(i),f={replace:p,insert:p.setEndPosition(i.lineNumber,i.column)},m=[],_=new r.Cm,v=[];let b=!1;const y=(e,t,n)=>{let o=!1;if(!t)return o;for(const r of t.suggestions)if(!s.kindFilter.has(r.kind)){if(!s.showDeprecated&&r?.tags?.includes(1))continue;r.range||(r.range=f),r.sortText||(r.sortText="string"===typeof r.label?r.label:r.label.label),!b&&r.insertTextRules&&4&r.insertTextRules&&(b=g.fr.guessNeedsClipboard(r.insertText)),m.push(new C(i,r,t,e)),o=!0}return(0,r.Xm)(t)&&_.add(t),v.push({providerName:e._debugDisplayName??"unknown_provider",elapsedProvider:t.duration??-1,elapsedOverall:n.elapsed()}),o},w=(async()=>{if(!k||s.kindFilter.has(27))return;const e=s.providerItemsToReuse.get(k);if(e)return void e.forEach((e=>m.push(e)));if(s.providerFilter.size>0&&!s.providerFilter.has(k))return;const n=new a.W,o=await k.provideCompletionItems(t,i,l,c);y(k,o,n)})();for(const n of e.orderedGroups(t)){let e=!1;if(await Promise.all(n.map((async n=>{if(s.providerItemsToReuse.has(n)){const t=s.providerItemsToReuse.get(n);return t.forEach((e=>m.push(e))),void(e=e||t.length>0)}if(!(s.providerFilter.size>0)||s.providerFilter.has(n))try{const o=new a.W,s=await n.provideCompletionItems(t,i,l,c);e=y(n,s,o)||e}catch(r){(0,o.M_)(r)}}))),e||c.isCancellationRequested)break}return await w,c.isCancellationRequested?(_.dispose(),Promise.reject(new o.AL)):new E(m.sort(N(s.snippetSortOrder)),b,{entries:v,elapsed:d.elapsed()},_)}function T(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.textLabelt.textLabel?1:e.completion.kind-t.completion.kind}function I(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return T(e,t)}function R(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return T(e,t)}const D=new Map;function N(e){return D.get(e)}function A(e,t){e.getContribution("editor.contrib.suggestController")?.triggerSuggest((new Set).add(t),void 0,!0)}D.set(0,I),D.set(2,R),D.set(1,T),m.w.registerCommand("_executeCompletionItemProvider",(async(e,...t)=>{const[i,o,s,r]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(d.y.isIPosition(o)),(0,l.j)("string"===typeof s||!s),(0,l.j)("number"===typeof r||!r);const{completionProvider:a}=e.get(v.ILanguageFeaturesService),u=await e.get(h.ITextModelService).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=u.object.textEditorModel.validatePosition(o),l=await L(a,u.object.textEditorModel,i,void 0,{triggerCharacter:s??void 0,triggerKind:s?1:0});for(const o of l.items)t.length<(r??0)&&t.push(o.resolve(n.XO.None)),e.incomplete=e.incomplete||o.container.incomplete,e.suggestions.push(o.completion);try{return await Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{u.dispose()}}));class O{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}},79266:(e,t,i)=>{"use strict";i.d(t,{D:()=>Ke});var n,o=i(19950),s=i(85053),r=i(67792),a=i(14396),l=i(40231),c=i(48770),d=i(5091),u=i(25160),h=i(84240),g=i(50322),p=i(71203),f=i(16259),m=i(28346),_=i(36788),v=i(8690),b=i(57479),y=i(82397),w=i(18760),C=i(49364),S=i(18904),k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t){return function(i,n){t(i,n,e)}};let E=class{static{n=this}static{this.AtEnd=new S.N1("atEndOfWord",!1)}constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=n.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(124)&&this._update())),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(124);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};E=n=k([x(1,S.fN)],E);var L,T=i(41337),I=i(72786),R=i(87778),D=i(12660),N=i(69547),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=function(e,t){return function(i,n){t(i,n,e)}};let P=class{static{L=this}static{this.OtherSuggestions=new S.N1("hasOtherSuggestions",!1)}constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=L.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(0===e.items.length)return void this.reset();const n=L._moveIndex(!0,e,t);n!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let o=t.items.length;o>0;o--){if(n=(n+t.items.length+(e?1:-1))%t.items.length,n===i)break;if(!t.items[n].completion.additionalTextEdits)break}return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=L._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};P=L=A([O(1,S.fN)],P);var M=i(94529);class F{constructor(e,t,i,n){this._disposables=new d.Cm,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((o=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!(0,s.EI)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new M.y;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var B=i(18506);class W{static{this._maxSelectionLength=51200}constructor(e,t){this._disposables=new d.Cm,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eW._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Y=function(e,t){return function(i,n){t(i,n,e)}};let Z=class{constructor(e,t,i,n,o){this._menuId=t,this._menuService=n,this._contextKeyService=o,this._menuDisposables=new d.Cm,this.element=H.BC(e,H.$(".suggest-status-bar"));const s=e=>e instanceof G.Xe?i.createInstance(K.rr,e,{useComma:!0}):void 0;this._leftActions=new q.E(this.element,{actionViewItemProvider:s}),this._rightActions=new q.E(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};Z=Q([Y(2,R._Y),Y(3,G.ez),Y(4,S.fN)],Z);i(94423);var X=i(94216),J=i(66344),ee=i(1474),te=i(15911),ie=i(1606),ne=i(37800),oe=i(25923),se=i(23740),re=i(42325),ae=i(36511),le=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ce=function(e,t){return function(i,n){t(i,n,e)}};function de(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let ue=class{constructor(e,t){this._editor=e,this._onDidClose=new l.vl,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new l.vl,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new d.Cm,this._renderDisposeable=new d.Cm,this._borderWidth=1,this._size=new H.fg(330,0),this.domNode=H.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(ae.T,{editor:e}),this._body=H.$(".body"),this._scrollbar=new ne.MU(this._body,{alwaysConsumeMouseWheel:!0}),H.BC(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=H.BC(this._body,H.$(".header")),this._close=H.BC(this._header,H.$("span"+se.L.asCSSSelector(oe.W.close))),this._close.title=T.kg("details.close","Close"),this._type=H.BC(this._header,H.$("p.type")),this._docs=H.BC(this._body,H.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(120)||t.fontSize,o=e.get(121)||t.lineHeight,s=t.fontWeight,r=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+o/n,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(121)||this._editor.getOption(50).lineHeight,t=this._borderWidth,i=2*t;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=T.kg("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){this._renderDisposeable.clear();let{detail:i,documentation:n}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${e.word??"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${e.completion.commitCharacters?.join("")}\n`,n=(new re.Bc).appendCodeblock("empty",t),i=`Provider: ${e.provider._debugDisplayName}`}if(t||de(e)){if(this.domNode.classList.remove("no-docs","no-type"),i){const e=i.length>1e5?`${i.substr(0,1e5)}…`:i;this._type.textContent=e,this._type.title=e,H.WU(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else H.w_(this._type),this._type.title="",H.jD(this._type),this.domNode.classList.add("no-type");if(H.w_(this._docs),"string"===typeof n)this._docs.classList.remove("markdown-docs"),this._docs.textContent=n;else if(n){this._docs.classList.add("markdown-docs"),H.w_(this._docs);const e=this._markdownRenderer.render(n);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){const i=new H.fg(e,t);H.fg.equals(i,this._size)||(this._size=i,H.Ej(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};ue=le([ce(1,R._Y)],ue);class he{constructor(e,t){let i,n;this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new d.Cm,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new ie.v,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,s=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(s=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+s})}e.done&&(i=void 0,n=void 0,o=0,s=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,i){const n=H.tG(this.getDomNode().ownerDocument.body),o=this.widget.getLayoutInfo(),s=new H.fg(220,2*o.lineHeight),r=e.top,a=function(){const i=n.width-(e.left+e.width+o.borderWidth+o.horizontalPadding),a=-o.borderWidth+e.left+e.width,l=new H.fg(i,n.height-e.top-o.borderHeight-o.verticalPadding),c=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:s.with(Math.min(i,s.width))}}(),l=function(){const i=e.left-o.borderWidth-o.horizontalPadding,a=Math.max(o.horizontalPadding,e.left-t.width-o.borderWidth),l=new H.fg(i,n.height-e.top-o.borderHeight-o.verticalPadding),c=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:s.with(Math.min(i,s.width))}}(),c=function(){const i=e.left,r=-o.borderWidth+e.top+e.height,a=new H.fg(e.width-o.borderHeight,n.height-e.top-e.height-o.verticalPadding);return{top:r,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:s.with(a.width)}}(),d=[a,l,c],u=d.find((e=>e.fit>=0))??d.sort(((e,t)=>t.fit-e.fit))[0],h=e.top+e.height-o.borderHeight;let g,p=t.height;const f=Math.max(u.maxSizeTop.height,u.maxSizeBottom.height);let m;p>f&&(p=f),i?p<=u.maxSizeTop.height?(g=!0,m=u.maxSizeTop):(g=!1,m=u.maxSizeBottom):p<=u.maxSizeBottom.height?(g=!1,m=u.maxSizeBottom):(g=!0,m=u.maxSizeTop);let{top:_,left:v}=u;!g&&p>e.height&&(_=h-p);const b=this._editor.getDomNode();if(b){const e=b.getBoundingClientRect();_-=e.top,v-=e.left}this._applyTopLeft({left:v,top:_}),this._resizable.enableSashes(!g,u===a,g,u!==a),this._resizable.minSize=u.minSize,this._resizable.maxSize=m,this._resizable.layout(p,Math.min(m.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var ge=i(50278),pe=i(10695),fe=i(29133),me=i(35350),_e=i(55885),ve=i(69361),be=i(14573),ye=i(12082),we=i(48401),Ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Se=function(e,t){return function(i,n){t(i,n,e)}};function ke(e){return`suggest-aria-id:${e}`}const xe=(0,we.pU)("suggest-more-info",oe.W.chevronRight,T.kg("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),Ee=new class e{static{this._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/}static{this._regexStrict=new RegExp(`^${e._regexRelaxed.source}$`,"i")}extract(t,i){if(t.textLabel.match(e._regexStrict))return i[0]=t.textLabel,!0;if(t.completion.detail&&t.completion.detail.match(e._regexStrict))return i[0]=t.completion.detail,!0;if(t.completion.documentation){const n="string"===typeof t.completion.documentation?t.completion.documentation:t.completion.documentation.value,o=e._regexRelaxed.exec(n);if(o&&(0===o.index||o.index+o[0].length===n.length))return i[0]=o[0],!0}return!1}};let Le=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new l.vl,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new d.Cm,i=e;i.classList.add("show-file-icons");const n=(0,H.BC)(e,(0,H.$)(".icon")),o=(0,H.BC)(n,(0,H.$)("span.colorspan")),s=(0,H.BC)(e,(0,H.$)(".contents")),r=(0,H.BC)(s,(0,H.$)(".main")),a=(0,H.BC)(r,(0,H.$)(".icon-label.codicon")),l=(0,H.BC)(r,(0,H.$)("span.left")),c=(0,H.BC)(r,(0,H.$)("span.right")),u=new ge.s(l,{supportHighlights:!0,supportIcons:!0});t.add(u);const h=(0,H.BC)(l,(0,H.$)("span.signature-label")),g=(0,H.BC)(l,(0,H.$)("span.qualifier-label")),p=(0,H.BC)(c,(0,H.$)("span.details-label")),f=(0,H.BC)(c,(0,H.$)("span.readMore"+se.L.asCSSSelector(xe)));f.title=T.kg("readMore","Read More");const m=()=>{const e=this._editor.getOptions(),t=e.get(50),o=t.getMassagedFontFamily(),s=t.fontFeatureSettings,a=e.get(120)||t.fontSize,l=e.get(121)||t.lineHeight,c=t.fontWeight,d=t.letterSpacing,u=`${a}px`,h=`${l}px`,g=`${d}px`;i.style.fontSize=u,i.style.fontWeight=c,i.style.letterSpacing=g,r.style.fontFamily=o,r.style.fontFeatureSettings=s,r.style.lineHeight=h,n.style.height=h,n.style.width=h,f.style.height=h,f.style.width=h};return{root:i,left:l,right:c,icon:n,colorspan:o,iconLabel:u,iconContainer:a,parametersLabel:h,qualifierLabel:g,detailsLabel:p,readMore:f,disposables:t,configureFont:m}}renderElement(e,t,i){i.configureFont();const{completion:n}=e;i.root.id=ke(t),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:(0,pe.WJ)(e.score)},s=[];if(19===n.kind&&Ee.extract(e,s))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=s[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=(0,_e.getIconClasses)(this._modelService,this._languageService,fe.r.from({scheme:"fake",path:e.textLabel}),ye.p.FILE),s=(0,_e.getIconClasses)(this._modelService,this._languageService,fe.r.from({scheme:"fake",path:n.detail}),ye.p.FILE);o.extraClasses=t.length>s.length?t:s}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=[(0,_e.getIconClasses)(this._modelService,this._languageService,fe.r.from({scheme:"fake",path:e.textLabel}),ye.p.FOLDER),(0,_e.getIconClasses)(this._modelService,this._languageService,fe.r.from({scheme:"fake",path:n.detail}),ye.p.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...se.L.asClassNameArray(me.HC.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),"string"===typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=Te(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=Te(n.label.detail||""),i.detailsLabel.textContent=Te(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(119).showInlineDetails?(0,H.WU)(i.detailsLabel):(0,H.jD)(i.detailsLabel),de(e)?(i.right.classList.add("can-expand-details"),(0,H.WU)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,H.jD)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Te(e){return e.replace(/\r\n|\r|\n/g,"")}Le=Ce([Se(1,ve.IModelService),Se(2,be.L),Se(3,te.Gy)],Le);var Ie,Re=i(13153),De=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ne=function(e,t){return function(i,n){t(i,n,e)}};(0,J.x1A)("editorSuggestWidget.background",J.CgL,T.kg("editorSuggestWidgetBackground","Background color of the suggest widget.")),(0,J.x1A)("editorSuggestWidget.border",J.sIe,T.kg("editorSuggestWidgetBorder","Border color of the suggest widget."));const Ae=(0,J.x1A)("editorSuggestWidget.foreground",J.By2,T.kg("editorSuggestWidgetForeground","Foreground color of the suggest widget."));(0,J.x1A)("editorSuggestWidget.selectedForeground",J.nH,T.kg("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),(0,J.x1A)("editorSuggestWidget.selectedIconForeground",J.c7i,T.kg("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const Oe=(0,J.x1A)("editorSuggestWidget.selectedBackground",J.AlL,T.kg("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));(0,J.x1A)("editorSuggestWidget.highlightForeground",J.QI5,T.kg("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),(0,J.x1A)("editorSuggestWidget.focusHighlightForeground",J.eMz,T.kg("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused.")),(0,J.x1A)("editorSuggestWidgetStatus.foreground",(0,J.JO0)(Ae,.5),T.kg("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class Pe{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof $.t}`}restore(){const e=this._service.get(this._key,0)??"";try{const t=JSON.parse(e);if(H.fg.is(t))return H.fg.lift(t)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Me=class{static{Ie=this}static{this.LOADING_MESSAGE=T.kg("suggestWidget.loading","Loading...")}static{this.NO_SUGGESTIONS_MESSAGE=T.kg("suggestWidget.noSuggestions","No suggestions.")}constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new d.HE,this._pendingShowDetails=new d.HE,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new j.pc,this._disposables=new d.Cm,this._onDidSelect=new l.fV,this._onDidFocus=new l.fV,this._onDidHide=new l.vl,this._onDidShow=new l.vl,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new l.vl,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ie.v,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Fe(this,e),this._persistedSize=new Pe(t,e);class s{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new s(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:t}=this.getLayoutInfo(),i=Math.round(e/2);let{width:n,height:o}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-o)<=i)&&(o=r.persistedSize?.height??t.height),(!r.persistWidth||Math.abs(r.currentSize.width-n)<=i)&&(n=r.persistedSize?.width??t.width),this._persistedSize.store(new H.fg(n,o))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=H.BC(this.element.domNode,H.$(".message")),this._listElement=H.BC(this.element.domNode,H.$(".tree"));const a=this._disposables.add(o.createInstance(ue,this.editor));a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new he(a,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(119).showIcons);c();const u=o.createInstance(Le,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new V.B8("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>T.kg("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!==typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=T.kg("label.full","{0} {1}, {2}",t,i,n):i?t=T.kg("label.detail","{0} {1}",t,i):n&&(t=T.kg("label.desc","{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion,o=U.GP("{0}{1}",n||"",i?"string"===typeof i?i:i.value:"");return T.kg("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,o)}}}),this._list.style((0,Re.t8)({listInactiveFocusBackground:Oe,listInactiveFocusOutline:J.buw})),this._status=o.createInstance(Z,this.element.domNode,N.dt);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(119).showStatusBar);h(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(119)&&(h(),c()),this._completionModel&&(e.hasChanged(50)||e.hasChanged(120)||e.hasChanged(121))&&this._list.splice(0,this._list.length,this._completionModel.items)}))),this._ctxSuggestWidgetVisible=N.ob.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=N.ob.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=N.ob.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=N.ob.HasFocusedSuggestion.bindTo(i),this._disposables.add(H.b2(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){"undefined"!==typeof e.element&&"undefined"!==typeof e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=(0,ee.Bb)(e.type)?2:1}_onListFocus(e){if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const t=e.elements[0],i=e.indexes[0];t!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=t,this._list.reveal(i),this._currentSuggestionDetails=(0,j.SS)((async e=>{const i=(0,j.EQ)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>i.dispose()));try{return await t.resolve(e)}finally{i.dispose(),n.dispose()}})),this._currentSuggestionDetails.then((()=>{i>=this._list.length||t!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[t]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:ke(i)}))})).catch(a.dz)),this._onDidFocus.fire({item:t,index:i,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:H.jD(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ie.LOADING_MESSAGE,H.jD(this._listElement,this._status.element),H.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,o.h5)(Ie.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ie.NO_SUGGESTIONS_MESSAGE,H.jD(this._listElement,this._status.element),H.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,o.h5)(Ie.NO_SUGGESTIONS_MESSAGE);break;case 3:H.jD(this._messageElement),H.WU(this._listElement,this._status.element),this._show();break;case 4:H.jD(this._messageElement),H.WU(this._listElement,this._status.element),this._show();break;case 5:H.jD(this._messageElement),H.WU(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,j.EQ)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,o){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const s=this._completionModel.items.length,r=0===s;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),r)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=H.Oq(H.zk(this.element.domNode),(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!de(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=H.Oq(H.zk(this.element.domNode),(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._pendingLayout.clear(),this._pendingShowDetails.clear(),this._loadingTimeout?.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const e=this._persistedSize.restore(),t=Math.ceil(4.3*this.getLayoutInfo().itemHeight);e&&e.heights&&(o=s);const r=this._completionModel?this._completionModel.stats.pLabelLen*i.typicalHalfwidthCharacterWidth:o,a=i.statusBarHeight+this._list.contentHeight+i.borderHeight,l=i.itemHeight+i.statusBarHeight,c=H.BK(this.editor.getDomNode()),d=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),u=c.top+d.top+d.height,h=Math.min(t.height-u-i.verticalPadding,a),g=c.top+d.top-i.verticalPadding,p=Math.min(g,a);let f=Math.min(Math.max(p,h)+i.borderHeight,a);n===this._cappedHeight?.capped&&(n=this._cappedHeight.wanted),nf&&(n=f);const m=150;n>h||this._forceRenderingAbove&&g>m?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),f=p):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),f=h),this.element.preferredSize=new H.fg(r,i.defaultSize.height),this.element.maxSize=new H.fg(s,f),this.element.minSize=new H.fg(220,l),this._cappedHeight=n===a?{wanted:this._cappedHeight?.wanted??e.height,capped:n}:void 0}this._resize(o,n)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===this._contentWidget.getPosition()?.preference[0])}getLayoutInfo(){const e=this.editor.getOption(50),t=(0,z.qE)(this.editor.getOption(121)||e.lineHeight,8,1e3),i=this.editor.getOption(119).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new H.fg(430,i+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Me=Ie=De([Ne(1,X.CS),Ne(2,S.fN),Ne(3,te.Gy),Ne(4,R._Y)],Me);class Fe{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new H.fg(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Be,We=i(11086),He=i(84366),Ve=i(65647),je=i(35037),ze=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ue=function(e,t){return function(i,n){t(i,n,e)}};const $e=!1;class qe{constructor(e,t){this._model=e,this._position=t,this._decorationOptions=je.kI.register({description:"suggest-line-suffix",stickiness:1});const i=e.getLineMaxColumn(t.lineNumber);if(i!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);e.changeDecorations((e=>{this._marker&&e.removeDecoration(this._marker),this._marker=e.addDecoration(v.Q.fromPositions(t,n),this._decorationOptions)}))}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations((e=>{e.removeDecoration(this._marker),this._marker=void 0}))}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker),i=this._model.getOffsetAt(t.getStartPosition());return i-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Ke=class{static{Be=this}static{this.ID="editor.contrib.suggestController"}static get(e){return e.getContribution(Be.ID)}constructor(e,t,i,n,o,s,r){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=o,this._logService=s,this._telemetryService=r,this._lineSuffix=new d.HE,this._toDispose=new d.Cm,this._selectors=new Ge((e=>e.priority)),this._onWillInsertSuggestItem=new l.vl,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance(B.Y,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const a=N.ob.InsertMode.bindTo(n);a.set(e.getOption(119).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>a.set(e.getOption(119).insertMode)))),this.widget=this._toDispose.add(new H.Ij((0,H.zk)(e.getDomNode()),(()=>{const e=this._instantiationService.createInstance(Me,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new F(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=N.ob.MakesTextEdit.bindTo(this._contextKeyService),n=N.ob.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=N.ob.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,d.s)((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),s=e.editStart.column,r=t.column;let a=!0;if("smart"===this.editor.getOption(1)&&2===this.model.state&&!e.completion.additionalTextEdits&&!(4&e.completion.insertTextRules)&&r-s===e.completion.insertText.length){const i=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:s,endLineNumber:t.lineNumber,endColumn:r});a=i!==e.completion.insertText}i.set(a),n.set(!_.y.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new c.dG(!0,!1,!1,!1,33))||u.zx&&e.toKeyCodeChord().equals(new c.dG(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new H.Ij((0,H.zk)(e.getDomNode()),(()=>this._toDispose.add(new W(this.editor,this.model))))),this._alternatives=this._toDispose.add(new H.Ij((0,H.zk)(e.getDomNode()),(()=>this._toDispose.add(new P(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(E,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new qe(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const n of this._selectors.itemsOrderedByPriorityDesc)if(t=n.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;if(-1===t&&(t=0),0===this.model.state)return;let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(119);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{$e||(this.model.cancel(),this.model.clear())})));const h=N.ob.AcceptSuggestionsOnEnter.bindTo(n),g=()=>{const e=this.editor.getOption(1);h.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>g()))),g()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=y.O.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),o=n.getAlternativeVersionId(),{item:s}=e,l=[],c=new r.Qi;1&t||this.editor.pushUndoStop();const d=this.getOverwriteInfo(s,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),s);const u=s.isResolved;let g=-1,f=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();const e=p.D.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map((e=>{let t=v.Q.lift(e.range);if(t.startLineNumber===s.position.lineNumber&&t.startColumn>s.position.column){const e=this.editor.getPosition().column-s.position.column,i=e,n=v.Q.spansMultipleLines(t)?0:e;t=new v.Q(t.startLineNumber,t.startColumn+i,t.endLineNumber,t.endColumn+n)}return m.k.replaceMove(t,e.text)}))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!u){const e=new h.W;let i;const o=n.onDidChangeContent((e=>{if(e.isFlush)return c.cancel(),void o.dispose();for(const t of e.changes){const e=v.Q.getEndPosition(t.range);i&&!_.y.isBefore(e,i)||(i=e)}})),r=t;t|=2;let a=!1;const d=this.editor.onWillType((()=>{d.dispose(),a=!0,2&r||this.editor.pushUndoStop()}));l.push(s.resolve(c.token).then((()=>{if(!s.completion.additionalTextEdits||c.token.isCancellationRequested)return;if(i&&s.completion.additionalTextEdits.some((e=>_.y.isBefore(i,v.Q.getStartPosition(e.range)))))return!1;a&&this.editor.pushUndoStop();const e=p.D.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map((e=>m.k.replaceMove(v.Q.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!a&&2&r||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),f=!0===t?1:!1===t?0:-2})).finally((()=>{o.dispose(),d.dispose()})))}let{insertText:b}=s.completion;if(4&s.completion.insertTextRules||(b=w.fr.escape(b)),this.model.cancel(),i.insert(b,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&s.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===Qe.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new h.W;l.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch((e=>{s.completion.extensionId?(0,a.M_)(e):(0,a.dz)(e)})).finally((()=>{g=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{c.cancel();while(n.canUndo()){o!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(s),Promise.all(l).finally((()=>{this._reportSuggestionAcceptedTelemetry(s,n,u,g,f,e.index,e.model.items),this.model.clear(),c.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,o,s,r){if(0===Math.floor(100*Math.random()))return;const a=new Map;for(let u=0;u1,d=c?l[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:e.extensionId?.value??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:(0,Ve.tW)((0,He.P8)(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:(0,He.LC)(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:o,index:s,firstIndex:d})}getOverwriteInfo(e,t){(0,g.j)(this.editor.hasModel());let i="replace"===this.editor.getOption(119).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,r=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+s,overwriteAfter:o+r}}_alertCompletionItem(e){if((0,s.EI)(e.completion.additionalTextEdits)){const t=T.kg("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,o.xE)(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;if(n-i!==e.completion.insertText.length)return!0;const o=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n});return o!==e.completion.insertText};l.Jh.once(this.model.onDidTrigger)((e=>{const t=[];l.Jh.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,d.AS)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,d.AS)(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),s=e.items[o];n(s)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:s,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Ke=Be=ze([Ue(1,C.GS),Ue(2,I.d),Ue(3,S.fN),Ue(4,R._Y),Ue(5,D.rr),Ue(6,We.k)],Ke);class Ge{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class Qe extends f.ks{static{this.id="editor.action.triggerSuggest"}constructor(){super({id:Qe.id,label:T.kg("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:S.M$.and(b.R.writable,b.R.hasCompletionItemProvider,N.ob.Visible.toNegated()),kbOpts:{kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=Ke.get(t);if(!n)return;let o;i&&"object"===typeof i&&!0===i.auto&&(o=!0),n.triggerSuggest(void 0,o,void 0)}}(0,f.HW)(Ke.ID,Ke,2),(0,f.Fl)(Qe);const Ye=190,Ze=f.DX.bindToContribution(Ke.get);(0,f.E_)(new Ze({id:"acceptSelectedSuggestion",precondition:S.M$.and(N.ob.Visible,N.ob.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:S.M$.and(N.ob.Visible,b.R.textInputFocus),weight:Ye},{primary:3,kbExpr:S.M$.and(N.ob.Visible,b.R.textInputFocus,N.ob.AcceptSuggestionsOnEnter,N.ob.MakesTextEdit),weight:Ye}],menuOpts:[{menuId:N.dt,title:T.kg("accept.insert","Insert"),group:"left",order:1,when:N.ob.HasInsertAndReplaceRange.toNegated()},{menuId:N.dt,title:T.kg("accept.insert","Insert"),group:"left",order:1,when:S.M$.and(N.ob.HasInsertAndReplaceRange,N.ob.InsertMode.isEqualTo("insert"))},{menuId:N.dt,title:T.kg("accept.replace","Replace"),group:"left",order:1,when:S.M$.and(N.ob.HasInsertAndReplaceRange,N.ob.InsertMode.isEqualTo("replace"))}]})),(0,f.E_)(new Ze({id:"acceptAlternativeSelectedSuggestion",precondition:S.M$.and(N.ob.Visible,b.R.textInputFocus,N.ob.HasFocusedSuggestion),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:N.dt,group:"left",order:2,when:S.M$.and(N.ob.HasInsertAndReplaceRange,N.ob.InsertMode.isEqualTo("insert")),title:T.kg("accept.replace","Replace")},{menuId:N.dt,group:"left",order:2,when:S.M$.and(N.ob.HasInsertAndReplaceRange,N.ob.InsertMode.isEqualTo("replace")),title:T.kg("accept.insert","Insert")}]})),I.w.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,f.E_)(new Ze({id:"hideSuggestWidget",precondition:N.ob.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:9,secondary:[1033]}})),(0,f.E_)(new Ze({id:"selectNextSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,f.E_)(new Ze({id:"selectNextPageSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:12,secondary:[2060]}})),(0,f.E_)(new Ze({id:"selectLastSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),(0,f.E_)(new Ze({id:"selectPrevSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,f.E_)(new Ze({id:"selectPrevPageSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:11,secondary:[2059]}})),(0,f.E_)(new Ze({id:"selectFirstSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),(0,f.E_)(new Ze({id:"focusSuggestion",precondition:S.M$.and(N.ob.Visible,N.ob.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,f.E_)(new Ze({id:"focusAndAcceptSuggestion",precondition:S.M$.and(N.ob.Visible,N.ob.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),(0,f.E_)(new Ze({id:"toggleSuggestionDetails",precondition:S.M$.and(N.ob.Visible,N.ob.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:N.dt,group:"right",order:1,when:S.M$.and(N.ob.DetailsVisible,N.ob.CanResolve),title:T.kg("detail.more","Show Less")},{menuId:N.dt,group:"right",order:1,when:S.M$.and(N.ob.DetailsVisible.toNegated(),N.ob.CanResolve),title:T.kg("detail.less","Show More")}]})),(0,f.E_)(new Ze({id:"toggleExplainMode",precondition:N.ob.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,f.E_)(new Ze({id:"toggleSuggestionFocus",precondition:N.ob.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:2570,mac:{primary:778}}})),(0,f.E_)(new Ze({id:"insertBestCompletion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),E.AtEnd,N.ob.Visible.toNegated(),P.OtherSuggestions.toNegated(),y.O.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,g.Gv)(t)?{fallback:"tab",...t}:{fallback:"tab"})},kbOpts:{weight:Ye,primary:2}})),(0,f.E_)(new Ze({id:"insertNextSuggestion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),P.OtherSuggestions,N.ob.Visible.toNegated(),y.O.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:2}})),(0,f.E_)(new Ze({id:"insertPrevSuggestion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),P.OtherSuggestions,N.ob.Visible.toNegated(),y.O.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:1026}})),(0,f.Fl)(class extends f.ks{constructor(){super({id:"editor.action.resetSuggestSize",label:T.kg("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){Ke.get(t)?.resetWidgetSize()}})},21095:(e,t,i)=>{"use strict";var n=i(67792),o=i(10695),s=i(5837),r=i(5091),a=i(94728),l=i(8690),c=i(36285),d=i(12847),u=i(85482),h=i(69547),g=i(49364),p=i(18506),f=i(4338),m=i(28753),_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},v=function(e,t){return function(i,n){t(i,n,e)}};class b{constructor(e,t,i,n,o,s){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=o,this.completion=s}}let y=class extends r.mp{constructor(e,t,i,n,o,s){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=s}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&d.resolve(n.XO.None)}return e}};y=_([v(5,g.GS)],y);let w=class extends r.jG{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){if(i.selectedSuggestionInfo)return;let o;for(const l of this._editorService.listCodeEditors())if(l.getModel()===e){o=l;break}if(!o)return;const s=o.getOption(90);if(h.r3.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const r=e.tokenization.getLineTokens(t.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==h.r3.valueFor(s,a))return;let c,d,g=e.getWordAtPosition(t);if(g?.word||(c=this._getTriggerCharacterInfo(e,t)),!g?.word&&!c)return;if(g||(g=e.getWordUntilPosition(t)),g.endColumn!==t.column)return;const m=e.getValueInRange(new l.Q(t.lineNumber,1,t.lineNumber,t.column));if(!c&&this._lastResult?.canBeReused(e,t.lineNumber,g)){const e=new u.O(m,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),d=this._lastResult}else{const i=await(0,h.aR)(this._languageFeatureService.completionProvider,e,t,new h.l1(void 0,p.Y.createSuggestFilter(o).itemKind,c?.providers),c&&{triggerKind:1,triggerCharacter:c.ch},n);let s;i.needsClipboard&&(s=await this._clipboardService.readText());const r=new u.C(i.items,t.column,new u.O(m,0),f.S.None,o.getOption(119),o.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},s);d=new y(e,t.lineNumber,g,r,i,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,t){t.completion.resolve(n.XO.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const i=e.getValueInRange(l.Q.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(const o of this._languageFeatureService.completionProvider.all(e))o.triggerCharacters?.includes(i)&&n.add(o);if(0!==n.size)return{providers:n,ch:i}}};w=_([v(0,d.ILanguageFeaturesService),v(1,m.h),v(2,g.GS),v(3,a.T)],w),(0,c.x)(w)},49364:(e,t,i)=>{"use strict";i.d(t,{GS:()=>y});var n,o=i(9659),s=i(5091),r=i(21553),a=i(71268),l=i(35350),c=i(32828),d=i(59857),u=i(87778),h=i(94216),g=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}};class f{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let o=0;oa&&n.type===i[l].completion.kind&&n.insertText===i[l].completion.insertText&&(a=n.touch,r=l),i[l].completion.preselect&&-1===s)return l}return-1!==r?r:-1!==s?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[i,n]of e)n.touch=t,n.type="number"===typeof n.type?n.type:l.HC.fromString(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class v extends f{constructor(){super("recentlyUsedByPrefix"),this._trie=a.cB.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const o=`${e.getLanguageId()}/${n}`;let s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let r=0;re.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"===typeof i.type?i.type:l.HC.fromString(i.type),this._trie.set(t,i)}}}let b=class{static{n=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",v],["recentlyUsed",_],["first",m]])}static{this._storagePrefix="suggest/memories"}constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new s.Cm,this._persistSoon=new o.uC((()=>this._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===h.LP.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(this._strategy?.name!==i){this._saveState();const e=n._strategyCtors.get(i)||m;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections"),t=e?0:1,o=this._storageService.get(`${n._storagePrefix}/${i}`,t);o&&this._strategy.fromJSON(JSON.parse(o))}catch(o){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections"),t=e?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${n._storagePrefix}/${this._strategy.name}`,i,t,1)}}};b=n=g([p(0,h.CS),p(1,c.pG)],b);const y=(0,u.u1)("ISuggestMemories");(0,d.v)(y,b,1)},18506:(e,t,i)=>{"use strict";i.d(t,{Y:()=>D});var n,o=i(9659),s=i(67792),r=i(14396),a=i(40231),l=i(5091),c=i(20601),d=i(98581),u=i(4117),h=i(4338),g=i(28753),p=i(32828),f=i(18904),m=i(12660),_=i(11086),v=i(85482),b=i(69547),y=i(12847),w=i(10695),C=i(50322),S=i(74706),k=i(82397),x=i(31554),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};class T{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&((n.endColumn===i.column||n.startColumn+1===i.column)&&!!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}function I(e,t,i){if(!Boolean(t.getContextKeyValue(S.p.inlineSuggestionVisible.key)))return!0;const n=t.getContextKeyValue(S.p.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(62).suppressSuggestions}function R(e,t,i){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const n=t.getContextKeyValue(S.p.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(62).suppressSuggestions}let D=n=class{constructor(e,t,i,n,s,r,c,u,h){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=r,this._configurationService=c,this._languageFeaturesService=u,this._envService=h,this._toDispose=new l.Cm,this._triggerCharacterListener=new l.Cm,this._triggerQuickSuggest=new o.pc,this._triggerState=void 0,this._completionDisposables=new l.Cm,this._onDidCancel=new a.vl,this._onDidTrigger=new a.vl,this._onDidSuggest=new a.vl,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new d.L(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let g=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{g=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{g=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{g||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{g||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){(0,l.AS)(this._triggerCharacterListener),(0,l.AS)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(92)||!this._editor.hasModel()||!this._editor.getOption(122))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const t of i.triggerCharacters||[]){let n=e.get(t);if(!n){n=new Set;const i=(0,b.f3)();i&&n.add(i),e.set(t,n)}n.add(i)}const t=t=>{if(!R(this._editor,this._contextKeyService,this._configurationService))return;if(T.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition(),i=this._editor.getModel();t=i.getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";(0,c.LJ)(t.charCodeAt(t.length-1))?(0,c.pc)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const n=e.get(i);if(n){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())n.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:i,retrigger:Boolean(this._completionModel),clipboardText:this._completionModel?.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),this._requestToken?.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){b.r3.isAllOff(this._editor.getOption(90))||this._editor.getOption(119).snippetsPreventQuickSuggestions&&k.O.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!T.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(90);if(!b.r3.isAllOff(i)){if(!b.r3.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==b.r3.valueFor(i,o))return}I(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(91)))}_refilterCompletionItems(){(0,C.j)(this._editor.hasModel()),(0,C.j)(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new T(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=new T(t,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=i;let o={triggerKind:e.triggerKind??0};e.triggerCharacter&&(o={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new s.Qi;const a=this._editor.getOption(113);let l=1;switch(a){case"top":l=0;break;case"bottom":l=2;break}const{itemKind:c,showDeprecated:d}=n.createSuggestFilter(this._editor),u=new b.l1(l,e.completionOptions?.kindFilter??c,e.completionOptions?.providerFilter,e.completionOptions?.providerItemsToReuse,d),g=h.S.create(this._editorWorkerService,this._editor),p=(0,b.aR)(this._languageFeaturesService.completionProvider,t,this._editor.getPosition(),u,o,this._requestToken.token);Promise.all([p,g]).then((async([t,i])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let n=e?.clipboardText;if(!n&&t.needsClipboard&&(n=await this._clipboardService.readText()),void 0===this._triggerState)return;const o=this._editor.getModel(),s=new T(o,this._editor.getPosition(),e),r={...w.Nd.default,firstMatchCanBeWeak:!this._editor.getOption(119).matchOnWordStartOnly};if(this._completionModel=new v.C(t.items,this._context.column,{leadingLineContent:s.leadingLineContent,characterCountDelta:s.column-this._context.column},i,this._editor.getOption(119),this._editor.getOption(113),r,n),this._completionDisposables.add(t.disposable),this._onNewContext(s),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)})).catch(r.dz)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static createSuggestFilter(e){const t=new Set,i=e.getOption(113);"none"===i&&t.add(27);const n=e.getOption(119);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,c.UU)(e.leadingLineContent)===(0,c.UU)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){const e=T.shouldAutoTrigger(this._editor);if(e&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=T.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};D=n=E([L(1,u.IEditorWorkerService),L(2,g.h),L(3,_.k),L(4,m.rr),L(5,f.fN),L(6,p.pG),L(7,y.ILanguageFeaturesService),L(8,x.k)],D)},4338:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});var n=i(85053),o=i(8690),s=i(7205);class r{static{this.None=new class extends r{distance(){return 0}}}static async create(e,t){if(!t.getOption(119).localityBonus)return r.None;if(!t.hasModel())return r.None;const i=t.getModel(),a=t.getPosition();if(!e.canComputeWordRanges(i.uri))return r.None;const[l]=await(new s.n).provideSelectionRanges(i,[a]);if(0===l.length)return r.None;const c=await e.computeWordRanges(i.uri,l[0].range);if(!c)return r.None;const d=i.getWordUntilPosition(a);return delete c[d.word],new class extends r{distance(e,i){if(!a.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const s="string"===typeof i.label?i.label:i.label.label,r=c[s];if((0,n.Ct)(r))return 2<<20;const d=(0,n.El)(r,o.Q.fromPositions(e),o.Q.compareRangesUsingStarts),u=d>=0?r[d]:r[Math.max(0,~d-1)];let h=l.length;for(const t of l){if(!o.Q.containsRange(t.range,u))break;h-=1}return h}}}}},94423:(e,t,i)=>{"use strict";var n=i(41337),o=i(66344);(0,o.x1A)("symbolIcon.arrayForeground",o.CU6,(0,n.kg)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.booleanForeground",o.CU6,(0,n.kg)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.colorForeground",o.CU6,(0,n.kg)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.constantForeground",o.CU6,(0,n.kg)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.fileForeground",o.CU6,(0,n.kg)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.folderForeground",o.CU6,(0,n.kg)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.keyForeground",o.CU6,(0,n.kg)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.keywordForeground",o.CU6,(0,n.kg)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.moduleForeground",o.CU6,(0,n.kg)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.namespaceForeground",o.CU6,(0,n.kg)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.nullForeground",o.CU6,(0,n.kg)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.numberForeground",o.CU6,(0,n.kg)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.objectForeground",o.CU6,(0,n.kg)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.operatorForeground",o.CU6,(0,n.kg)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.packageForeground",o.CU6,(0,n.kg)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.propertyForeground",o.CU6,(0,n.kg)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.referenceForeground",o.CU6,(0,n.kg)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.snippetForeground",o.CU6,(0,n.kg)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.stringForeground",o.CU6,(0,n.kg)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.structForeground",o.CU6,(0,n.kg)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.textForeground",o.CU6,(0,n.kg)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.typeParameterForeground",o.CU6,(0,n.kg)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.unitForeground",o.CU6,(0,n.kg)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))},29587:(e,t,i)=>{"use strict";var n=i(19950),o=i(3692),s=i(41337),r=i(6330);class a extends r.L{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:a.ID,title:s.aS({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:s.aS("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const e=o.M.getTabFocusMode(),t=!e;o.M.setTabFocusMode(t),t?(0,n.xE)(s.kg("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,n.xE)(s.kg("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}(0,r.ug)(a)},47641:(e,t,i)=>{"use strict";var n=i(84240),o=i(16259),s=i(41337);class r extends o.ks{constructor(){super({id:"editor.action.forceRetokenize",label:s.kg("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const o=new n.W;i.tokenization.forceTokenization(i.getLineCount()),o.stop(),console.log(`tokenization took ${o.elapsed()}`)}}(0,o.Fl)(r)},92461:(e,t,i)=>{"use strict";var n=i(9659),o=i(25923),s=i(42325),r=i(5091),a=i(25160),l=i(20601),c=i(16259),d=i(35011),u=i(35037),h=i(97412),g=i(4117),p=i(14573),f=i(10049),m=i(38570),_=i(76035),v=i(2150),b=i(48038),y=i(55664),w=i(36511),C=i(87778),S=i(49822),k=i(68389),x=i(25201),E=i(40231),L=i(10170),T=i(96371),I=i(41187),R=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},D=function(e,t){return function(i,n){t(i,n,e)}};let N=class extends r.jG{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,o){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=(0,v.BC)(e,(0,v.$)("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??(0,T.nZ)("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const s=this._register(new S.f(this.el,"click")),r=this._register(new S.f(this.el,"keypress")),a=E.Jh.chain(r.event,(e=>e.map((e=>new k.Z(e))).filter((e=>3===e.keyCode)))),l=this._register(new S.f(this.el,x.B.Tap)).event;this._register(x.q.addTarget(this.el));const c=E.Jh.any(s.event,a,l);this._register(c((e=>{this.enabled&&(v.fs.stop(e,!0),i?.opener?i.opener(this._link.href):o.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};N=R([D(3,I.TN),D(4,L.C)],N);var A=i(48401),O=i(23740),P=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},M=function(e,t){return function(i,n){t(i,n,e)}};const F=26;let B=class extends r.jG{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(W))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,F)}};B=P([M(1,C._Y)],B);let W=class extends r.jG{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(w.T,{}),this.element=(0,v.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"===typeof e.message?e.message:void 0}getBannerMessage(e){if("string"===typeof e){const t=(0,v.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,v.w_)(this.element)}show(e){(0,v.w_)(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=(0,v.BC)(this.element,(0,v.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,v.$)(`div${O.L.asCSSSelector(e.icon)}`));const n=(0,v.BC)(this.element,(0,v.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,v.BC)(this.element,(0,v.$)("div.message-actions-container")),e.actions)for(const s of e.actions)this._register(this.instantiationService.createInstance(N,this.messageActionsContainer,{...s,tabIndex:-1},{}));const o=(0,v.BC)(this.element,(0,v.$)("div.action-container"));this.actionBar=this._register(new b.E(o)),this.actionBar.push(this._register(new y.rc("banner.close","Close Banner",O.L.asClassName(A.$_),!0,(()=>{"function"===typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};W=P([M(0,C._Y)],W);var H=i(41337),V=i(32828),j=i(3874),z=i(17602),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$=function(e,t){return function(i,n){t(i,n,e)}};const q=(0,A.pU)("extensions-warning-message",o.W.warning,H.kg("warningIcon","Icon shown with a warning message in the extensions editor."));let K=class extends r.jG{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:H.kg("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new le};else if(e.ambiguousCharacterCount>=t)i={message:H.kg("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new re};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:H.kg("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new ae}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:q,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(B,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(126),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())}))),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=G(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>{if("_os"===e){const e=(new Intl.NumberFormat).resolvedOptions().locale;return e}return"_vscode"===e?a.BH:e}))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new Q(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new Y(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};function G(e,t){return{nonBasicASCII:t.nonBasicASCII===d.XR?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===d.XR?!e:t.includeComments,includeStrings:t.includeStrings===d.XR?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}K=U([$(1,g.IEditorWorkerService),$(2,z.L),$(3,C._Y)],K);let Q=class extends r.jG{constructor(e,t,i,o){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=o,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.uC((()=>this._update()),250)),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:ne.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!(0,f.GN)(t,e))return null;const i=t.getValueInRange(e.range);return{reason:ie(i,this._options),inComment:(0,f.a6)(t,e),inString:(0,f.wc)(t,e)}}};Q=U([$(3,g.IEditorWorkerService)],Q);class Y extends r.jG{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.uC((()=>this._update()),250)),this._register(this._editor.onDidLayoutChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidScrollChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeHiddenAreas((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const e=h.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,n);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:ne.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,f.GN)(t,e)?{reason:ie(i,this._options),inComment:(0,f.a6)(t,e),inString:(0,f.wc)(t,e)}:null}}const Z=H.kg("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let X=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(K.ID);if(!n)return[];const o=[],r=new Set;let a=300;for(const c of t){const e=n.getDecorationInfo(c);if(!e)continue;const t=i.getValueInRange(c.range),d=t.codePointAt(0),u=ee(d);let h;switch(e.reason.kind){case 0:h=(0,l.aC)(e.reason.confusableWith)?H.kg("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",u,ee(e.reason.confusableWith.codePointAt(0))):H.kg("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",u,ee(e.reason.confusableWith.codePointAt(0)));break;case 1:h=H.kg("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",u);break;case 2:h=H.kg("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",u);break}if(r.has(h))continue;r.add(h);const g={codePoint:d,reason:e.reason,inComment:e.inComment,inString:e.inString},p=H.kg("unicodeHighlight.adjustSettings","Adjust settings"),f=`command:${ce.ID}?${encodeURIComponent(JSON.stringify(g))}`,m=new s.Bc("",!0).appendMarkdown(h).appendText(" ").appendLink(f,p,Z);o.push(new _.eH(this,c.range,[m],!1,a++))}return o}renderHoverParts(e,t){return(0,_.fm)(e,t,this._editor,this._languageService,this._openerService)}};function J(e){return`U+${e.toString(16).padStart(4,"0")}`}function ee(e){let t=`\`${J(e)}\``;return l.y_.isInvisibleCharacter(e)||(t+=` "${te(e)}"`),t}function te(e){return 96===e?"`` ` ``":"`"+String.fromCodePoint(e)+"`"}function ie(e,t){return h.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(e,t)}X=U([$(1,p.L),$(2,L.C)],X);class ne{constructor(){this.map=new Map}static{this.instance=new ne}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=u.kI.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}class oe extends c.ks{constructor(){super({id:re.ID,label:H.kg("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.includeComments,!1,2)}}class se extends c.ks{constructor(){super({id:re.ID,label:H.kg("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.includeStrings,!1,2)}}class re extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:re.ID,label:H.kg("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.ambiguousCharacters,!1,2)}}class ae extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:ae.ID,label:H.kg("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.invisibleCharacters,!1,2)}}class le extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:le.ID,label:H.kg("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.nonBasicASCII,!1,2)}}class ce extends c.ks{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:ce.ID,label:H.kg("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,i){const{codePoint:n,reason:o,inString:s,inComment:r}=i,a=String.fromCodePoint(n),c=e.get(j.GK),d=e.get(V.pG);function u(e){return l.y_.isInvisibleCharacter(e)?H.kg("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",J(e)):H.kg("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${J(e)} "${a}"`)}const h=[];if(0===o.kind)for(const l of o.notAmbiguousInLocales)h.push({label:H.kg("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',l),run:async()=>{ue(d,[l])}});if(h.push({label:u(n),run:()=>de(d,[n])}),r){const e=new oe;h.push({label:e.label,run:async()=>e.runAction(d)})}else if(s){const e=new se;h.push({label:e.label,run:async()=>e.runAction(d)})}if(0===o.kind){const e=new re;h.push({label:e.label,run:async()=>e.runAction(d)})}else if(1===o.kind){const e=new ae;h.push({label:e.label,run:async()=>e.runAction(d)})}else if(2===o.kind){const e=new le;h.push({label:e.label,run:async()=>e.runAction(d)})}else he(o);const g=await c.pick(h,{title:Z});g&&await g.run()}}async function de(e,t){const i=e.getValue(d.Of.allowedCharacters);let n;n="object"===typeof i&&i?i:{};for(const o of t)n[String.fromCodePoint(o)]=!0;await e.updateValue(d.Of.allowedCharacters,n,2)}async function ue(e,t){const i=e.inspect(d.Of.allowedLocales).user?.value;let n;n="object"===typeof i&&i?Object.assign({},i):{};for(const o of t)n[o]=!0;await e.updateValue(d.Of.allowedLocales,n,2)}function he(e){throw new Error(`Unexpected value: ${e}`)}(0,c.Fl)(re),(0,c.Fl)(ae),(0,c.Fl)(le),(0,c.Fl)(ce),(0,c.HW)(K.ID,K,1),m.B2.register(X)},11501:(e,t,i)=>{"use strict";var n=i(5091),o=i(84366),s=i(16259),r=i(94728),a=i(41337),l=i(63466),c=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},d=function(e,t){return function(i,n){t(i,n,e)}};const u="ignoreUnusualLineTerminators";function h(e,t,i){e.setModelProperty(t.uri,u,i)}function g(e,t){return e.getModelProperty(t.uri,u)}let p=class extends n.jG{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=g(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(92))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:a.kg("unusualLineTerminators.title","Unusual Line Terminators"),message:a.kg("unusualLineTerminators.message","Detected unusual line terminators"),detail:a.kg("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,o.P8)(e.uri)),primaryButton:a.kg({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:a.kg("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):h(this._codeEditorService,e,!0)}};p=c([d(1,l.X),d(2,r.T)],p),(0,s.HW)(p.ID,p,1)},12321:(e,t,i)=>{"use strict";i.d(t,{P:()=>b,v:()=>y});var n=i(9322),o=i(35037),s=i(35350),r=i(41337),a=i(66344),l=i(15911);const c=(0,a.x1A)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},r.kg("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,a.x1A)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},r.kg("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,a.x1A)("editor.wordHighlightTextBackground",c,r.kg("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const d=(0,a.x1A)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:a.buw,hcLight:a.buw},r.kg("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));(0,a.x1A)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:a.buw,hcLight:a.buw},r.kg("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),(0,a.x1A)("editor.wordHighlightTextBorder",d,r.kg("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const u=(0,a.x1A)("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",r.kg("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),h=(0,a.x1A)("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",r.kg("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),g=(0,a.x1A)("editorOverviewRuler.wordHighlightTextForeground",a.z5H,r.kg("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),p=o.kI.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,l.Yf)(h),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),f=o.kI.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,l.Yf)(g),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),m=o.kI.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,l.Yf)(a.z5H),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),_=o.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),v=o.kI.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,l.Yf)(u),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}});function b(e){return e===s.Kb.Write?p:e===s.Kb.Text?f:v}function y(e){return e?_:m}(0,l.zy)(((e,t)=>{const i=e.getColor(a.QwA);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}))},95168:(e,t,i)=>{"use strict";var n=i(41337),o=i(19950),s=i(9659),r=i(67792),a=i(14396),l=i(5091),c=i(55413),d=i(16259),u=i(94728),h=i(8690),g=i(57479),p=i(9322),f=i(12847),m=i(12321),_=i(18904),v=i(6657),b=i(21553),y=i(35784),w=i(84366),C=i(60939),S=i(35350),k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t){return function(i,n){t(i,n,e)}};class E{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){const n=[],o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(n);if(e.isDisposed())return;const s=e.findMatches(o.word,!0,!1,!0,C.J3,!1);return s.map((e=>({range:e.range,kind:S.Kb.Text})))}provideMultiDocumentHighlights(e,t,i,n){const o=new b.fT,s=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!s)return Promise.resolve(o);for(const r of[e,...i]){if(r.isDisposed())continue;const e=r.findMatches(s.word,!0,!1,!0,C.J3,!1),t=e.map((e=>({range:e.range,kind:S.Kb.Text})));t&&o.set(r.uri,t)}return o}}let L=class extends l.jG{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new E)),this._register(e.multiDocumentHighlightProvider.register("*",new E))}};L=k([x(0,f.ILanguageFeaturesService)],L);var T,I,R=i(36285),D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};const A=new _.N1("hasWordHighlights",!1);function O(e,t,i,n){const o=e.ordered(t);return(0,s.$1)(o.map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,a.M_))),(e=>void 0!==e&&null!==e)).then((e=>{if(e){const i=new b.fT;return i.set(t.uri,e),i}return new b.fT}))}function P(e,t,i,n,o,r){const l=e.ordered(t);return(0,s.$1)(l.map((e=>()=>{const n=r.filter((e=>(0,p.vd)(e))).filter((t=>(0,y.f)(e.selector,t.uri,t.getLanguageId(),!0,void 0,void 0)>0));return Promise.resolve(e.provideMultiDocumentHighlights(t,i,n,o)).then(void 0,a.M_)})),(e=>void 0!==e&&null!==e))}class M{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,s.SS)((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new h.Q(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,s=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let l=0,c=i.length;!a&&l=s&&(a=!0)}return a}cancel(){this.result.cancel()}}class F extends M{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return O(this._providers,e,t.getPosition(),n).then((e=>e||new b.fT))}}class B extends M{constructor(e,t,i,n,o){super(e,t,i),this._providers=n,this._otherModels=o}_compute(e,t,i,n){return P(this._providers,e,t.getPosition(),i,n,this._otherModels).then((e=>e||new b.fT))}}function W(e,t,i,n,o){return new F(t,i,o,e)}function H(e,t,i,n,o,s){return new B(t,i,o,e,s)}(0,d.ke)("_executeDocumentHighlights",(async(e,t,i)=>{const n=e.get(f.ILanguageFeaturesService),o=await O(n.documentHighlightProvider,t,i,r.XO.None);return o?.get(t.uri)}));let V=class{static{T=this}static{this.storedDecorationIDs=new b.fT}static{this.query=null}constructor(e,t,i,n,o){this.toUnhook=new l.Cm,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new b.fT,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new s.ve(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=o,this._hasWordHighlights=A.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlight&&this.runDelayer.trigger((()=>{this._onPositionChanged(e)}))}))),this.toUnhook.add(e.onDidFocusEditorText((e=>{"off"!==this.occurrencesHighlight&&(this.workerRequest||this.runDelayer.trigger((()=>{this._run()})))}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{(0,v.v$)(this.model.uri,"output")||this._stopAll()}))),this.toUnhook.add(e.onDidChangeModel((e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():T.query&&this._run()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(81);if(this.occurrencesHighlight!==t)switch(this.occurrencesHighlight=t,t){case"off":this._stopAll();break;case"singleFile":this._stopAll(T.query?.modelInfo?.model);break;case"multiFile":T.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",t);break}}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,T.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){"off"!==this.occurrencesHighlight&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(h.Q.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){const s=this.editor.getModel().getLineContent(n.startLineNumber);(0,o.xE)(`${s}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){const s=this.editor.getModel().getLineContent(n.startLineNumber);(0,o.xE)(`${s}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=T.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),T.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const n of t){if(!n.hasModel()||(0,w.n4)(n.getModel().uri,e?.uri))continue;const t=T.storedDecorationIDs.get(n.getModel().uri);if(!t)continue;n.removeDecorations(t),i.push(n.getModel().uri);const o=j.get(n);o?.wordHighlighter&&(o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter.workerRequest=null,o.wordHighlighter._hasWordHighlights.set(!1)))}for(const n of i)T.storedDecorationIDs.delete(n)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==v.ny.vscodeNotebookCell&&T.query?.modelInfo?.model.uri.scheme!==v.ny.vscodeNotebookCell?(T.query=null,this._run()):T.query?.modelInfo&&(T.query.modelInfo=null)),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){"off"!==this.occurrencesHighlight&&(3===e.reason||this.editor.getModel()?.uri.scheme===v.ny.vscodeNotebookCell)?this._run():this._stopAll()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];const t=e.uri.scheme===v.ny.vscodeNotebookCell;if(t){const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){const i=n.getModel();i&&i!==e&&i.uri.scheme===v.ny.vscodeNotebookCell&&t.push(i)}return t}const i=[],n=this.codeEditorService.listCodeEditors();for(const o of n){if(!(0,c.Np)(o))continue;const t=o.getModel();t&&(e===t.modified&&i.push(t.modified))}if(i.length)return i;if("singleFile"===this.occurrencesHighlight)return[];for(const o of n){const t=o.getModel(),n=t&&t!==e;n&&i.push(t)}return i}_run(e){let t;const i=this.editor.hasTextFocus();if(i){const e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber)return T.query=null,void this._stopAll();const i=e.startColumn,n=e.endColumn,o=this._getWord();if(!o||o.startColumn>i||o.endColumn{t===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations())}),a.dz)}}computeWithModel(e,t,i,n){return n.length?H(this.multiDocumentProviders,e,t,i,this.editor.getOption(132),n):W(this.providers,e,t,i,this.editor.getOption(132))}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=this.codeEditorService.listCodeEditors();for(const t of e){const e=j.get(t);if(!e)continue;const i=[],n=t.getModel()?.uri;if(n&&this.workerRequestValue.has(n)){const o=T.storedDecorationIDs.get(n),s=this.workerRequestValue.get(n);if(s)for(const e of s)e.range&&i.push({range:e.range,options:(0,m.P)(e.kind)});let r=[];t.changeDecorations((e=>{r=e.deltaDecorations(o??[],i)})),T.storedDecorationIDs=T.storedDecorationIDs.set(n,r),i.length>0&&(e.wordHighlighter?.decorations.set(i),e.wordHighlighter?._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};V=T=D([N(4,u.T)],V);let j=class extends l.jG{static{I=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(I.ID)}constructor(e,t,i,n){super(),this._wordHighlighter=null;const o=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new V(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,n))};this._register(e.onDidChangeModel((e=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),o()}))),o()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!(!this._wordHighlighter||!this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};j=I=D([N(1,_.fN),N(2,f.ILanguageFeaturesService),N(3,u.T)],j);class z extends d.ks{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=j.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class U extends z{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:n.kg("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:A,kbOpts:{kbExpr:g.R.editorTextFocus,primary:65,weight:100}})}}class $ extends z{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:n.kg("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:A,kbOpts:{kbExpr:g.R.editorTextFocus,primary:1089,weight:100}})}}class q extends d.ks{constructor(){super({id:"editor.action.wordHighlight.trigger",label:n.kg("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:g.R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=j.get(t);n&&n.restoreViewState(!0)}}(0,d.HW)(j.ID,j,0),(0,d.Fl)(U),(0,d.Fl)($),(0,d.Fl)(q),(0,R.x)(L)},23479:(e,t,i)=>{"use strict";i.d(t,{Jk:()=>v,R7:()=>F});var n=i(16259),o=i(50793),s=i(35011),r=i(332),a=i(51232),l=i(90385),c=i(36788),d=i(8690),u=i(98581),h=i(57479),g=i(50395),p=i(41337),f=i(17300),m=i(18904),_=i(5045);class v extends n.DX{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.i)(t.getOption(132),t.getOption(131)),o=t.getModel(),s=t.getSelections(),a=s.length>1,d=s.map((e=>{const t=new c.y(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType,a);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,d.map((e=>r.MF.fromModelSelection(e)))),1===d.length){const e=new c.y(d[0].positionLineNumber,d[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new u.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new u.L(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends v{_move(e,t,i,n,o){return a.z.moveWordLeft(e,t,i,n,o)}}class y extends v{_move(e,t,i,n,o){return a.z.moveWordRight(e,t,i,n)}}class w extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class C extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class S extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:m.M$.and(h.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class k extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class x extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class E extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:m.M$.and(h.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class L extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,o){return super._move((0,l.i)(s.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,o)}}class T extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,o){return super._move((0,l.i)(s.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,o)}}class I extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class R extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:m.M$.and(h.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class D extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class N extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class A extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:m.M$.and(h.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class O extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class P extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,o){return super._move((0,l.i)(s.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,o)}}class M extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,o){return super._move((0,l.i)(s.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,o)}}class F extends n.DX{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(g.JZ);if(!t.hasModel())return;const s=(0,l.i)(t.getOption(132),t.getOption(131)),r=t.getModel(),a=t.getSelections(),c=t.getOption(6),d=t.getOption(11),u=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),p=a.map((e=>{const i=this._delete({wordSeparators:s,model:r,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:c,autoClosingQuotes:d,autoClosingPairs:u,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new o.iu(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,p),t.pushUndoStop()}}class B extends F{_delete(e,t){const i=a.z.deleteWordLeft(e,t);return i||new d.Q(1,1,1,1)}}class W extends F{_delete(e,t){const i=a.z.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new d.Q(n,o,n,o)}}class H extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:h.R.writable})}}class V extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:h.R.writable})}}class j extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:h.R.writable,kbOpts:{kbExpr:h.R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class z extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:h.R.writable})}}class U extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:h.R.writable})}}class $ extends W{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:h.R.writable,kbOpts:{kbExpr:h.R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class q extends n.ks{constructor(){super({id:"deleteInsideWord",precondition:h.R.writable,label:p.kg("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.i)(t.getOption(132),t.getOption(131)),s=t.getModel(),r=t.getSelections(),c=r.map((e=>{const t=a.z.deleteInsideWord(n,s,e);return new o.iu(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}(0,n.E_)(new w),(0,n.E_)(new C),(0,n.E_)(new S),(0,n.E_)(new k),(0,n.E_)(new x),(0,n.E_)(new E),(0,n.E_)(new I),(0,n.E_)(new R),(0,n.E_)(new D),(0,n.E_)(new N),(0,n.E_)(new A),(0,n.E_)(new O),(0,n.E_)(new L),(0,n.E_)(new T),(0,n.E_)(new P),(0,n.E_)(new M),(0,n.E_)(new H),(0,n.E_)(new V),(0,n.E_)(new j),(0,n.E_)(new z),(0,n.E_)(new U),(0,n.E_)(new $),(0,n.Fl)(q)},18469:(e,t,i)=>{"use strict";var n=i(16259),o=i(51232),s=i(8690),r=i(57479),a=i(23479),l=i(72786);class c extends a.R7{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:r.R.writable,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=o.c.deleteWordPartLeft(e);return i||new s.Q(1,1,1,1)}}class d extends a.R7{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:r.R.writable,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=o.c.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),r=e.model.getLineMaxColumn(n);return new s.Q(n,r,n,r)}}class u extends a.Jk{_move(e,t,i,n,s){return o.c.moveWordPartLeft(e,t,i,s)}}class h extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}l.w.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class g extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}l.w.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class p extends a.Jk{_move(e,t,i,n,s){return o.c.moveWordPartRight(e,t,i)}}class f extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class m extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,n.E_)(new c),(0,n.E_)(new d),(0,n.E_)(new h),(0,n.E_)(new g),(0,n.E_)(new f),(0,n.E_)(new m)},87715:(e,t,i)=>{"use strict";var n=i(2150),o=i(5091),s=i(16259),r=i(25160);class a extends o.jG{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,r.un&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(92);!this.widget&&e?this.widget=new l(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}class l extends o.jG{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(n.ko(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(n.ko(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return l.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}(0,s.HW)(a.ID,a,3)},54357:(e,t,i)=>{"use strict";var n,o=i(2150),s=i(85476),r=i(5091),a=i(16259),l=i(35350),c=i(4577),d=i(58403),u=i(14573),h=i(55643),g=i(340),p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends r.jG{static{n=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(l.dG.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new y(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};m=n=p([f(1,h.L),f(2,u.L)],m);class _ extends a.ks{constructor(){super({id:"editor.action.inspectTokens",label:g.YN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=m.get(t);i?.launch()}}function v(e){let t="";for(let i=0,n=e.length;id.r3,tokenize:(e,i,n)=>(0,d.$H)(t,n),tokenizeEncoded:(e,t,i)=>(0,d.Lh)(n,i)}}class y extends r.jG{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=b(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return y._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let o=t.tokens1.length-1;o>=0;o--){const n=t.tokens1[o];if(e.column-1>=n.offset){i=o;break}}let n=0;for(let o=t.tokens2.length>>>1;o>=0;o--)if(e.column-1>=t.tokens2[o<<1]){n=o;break}const r=this._model.getLineContent(e.lineNumber);let a="";if(i{"use strict";var n=i(16374),o=i(60018),s=i(340),r=i(94728),a=i(74529),l=i(68254),c=i(28438),d=i(14396),u=i(10695),h=i(90702),g=i(5091),p=i(21553);function f(e){const t=new Map;for(const i of e)t.set(i,(t.get(i)??0)+1);return t}class m{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,o=[];for(const[s,r]of this.documents){if(t.isCancellationRequested)return[];for(const e of r.chunks){const t=this.computeSimilarityScore(e,i,n);t>0&&o.push({key:s,score:t})}}return o}static termFrequencies(e){return f(m.splitTerms(e))}static*splitTerms(e){const t=e=>e.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(const i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const e=[];for(const i of t.textChunks){const t=m.termFrequencies(i);for(const e of t.keys())this.chunkOccurrences.set(e,(this.chunkOccurrences.get(e)??0)+1);e.push({text:i,tf:t})}this.chunkCount+=e.length,this.documents.set(t.key,{chunks:e})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const e of t.chunks)for(const t of e.tf.keys()){const e=this.chunkOccurrences.get(t);if("number"===typeof e){const i=e-1;i<=0?this.chunkOccurrences.delete(t):this.chunkOccurrences.set(t,i)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[o,s]of Object.entries(t)){const t=e.tf.get(o);if(!t)continue;let r=i.get(o);"number"!==typeof r&&(r=this.computeIdf(o),i.set(o,r));const a=t*r;n+=a*s}return n}computeEmbedding(e){const t=m.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}function _(e){const t=e.slice(0);t.sort(((e,t)=>t.score-e.score));const i=t[0]?.score??0;if(i>0)for(const n of t)n.score/=i;return t}var v,b=i(41337),y=i(72786),w=i(32828),C=i(63466),S=i(87778),k=i(13046),x=i(12660),E=i(9659),L=i(67792),T=i(50322);function I(e){const t=e;return Array.isArray(t.items)}function R(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(function(e){e[e["NO_ACTION"]=0]="NO_ACTION",e[e["CLOSE_PICKER"]=1]="CLOSE_PICKER",e[e["REFRESH_PICKER"]=2]="REFRESH_PICKER",e[e["REMOVE_ITEM"]=3]="REMOVE_ITEM"})(v||(v={}));class D extends g.jG{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){const n=new g.Cm;let o;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new g.HE),r=async()=>{const n=s.value=new g.Cm;o?.dispose(!0),e.busy=!1,o=new L.Qi(t);const r=o.token;let a=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(a=a.trim());const l=this._getPicks(a,n,r,i),c=(t,i)=>{let n,o;if(I(t)?(n=t.items,o=t.active):n=t,0===n.length){if(i)return!1;(a.length>0||e.hideInput)&&this.options?.noResultsPick&&(n=(0,T.Tn)(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=n,o&&(e.activeItems=[o]),!0},d=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{"number"===typeof t.mergeDelay&&(await(0,E.wR)(t.mergeDelay),r.isCancellationRequested)||n||(i=c(t.picks,!0))})(),(async()=>{e.busy=!0;try{const n=await t.additionalPicks;if(r.isCancellationRequested)return;let o,s,a,l;if(I(t.picks)?(o=t.picks.items,s=t.picks.active):o=t.picks,I(n)?(a=n.items,l=n.active):a=n,a.length>0||!i){let t;if(!s&&!l){const i=e.activeItems[0];i&&-1!==o.indexOf(i)&&(t=i)}c({items:[...o,...a],active:s||l||t})}}finally{r.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===l);else if(R(l))await d(l);else if(l instanceof Promise){e.busy=!0;try{const e=await l;if(r.isCancellationRequested)return;R(e)?await d(e):c(e)}finally{r.isCancellationRequested||(e.busy=!1)}}else c(l)};n.add(e.onDidChangeValue((()=>r()))),r(),n.add(e.onDidAccept((t=>{if(i?.handleAccept)return t.inBackground||e.hide(),void i.handleAccept?.(e.activeItems[0]);const[n]=e.selectedItems;"function"===typeof n?.accept&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))})));const a=async(i,n)=>{if("function"!==typeof n.trigger)return;const o=n.buttons?.indexOf(i)??-1;if(o>=0){const i=n.trigger(o,e.keyMods),s="number"===typeof i?i:await i;if(t.isCancellationRequested)return;switch(s){case v.NO_ACTION:break;case v.CLOSE_PICKER:e.hide();break;case v.REFRESH_PICKER:r();break;case v.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),o=e.activeItems.filter((e=>e!==n[0])),s=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,o&&(e.activeItems=o),e.keepScrollPosition=s}break}}}};return n.add(e.onDidTriggerItemButton((({button:e,item:t})=>a(e,t)))),n.add(e.onDidTriggerSeparatorButton((({button:e,separator:t})=>a(e,t)))),n}}var N,A,O=i(94216),P=i(11086),M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},F=function(e,t){return function(i,n){t(i,n,e)}};let B=class extends D{static{N=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=(0,u.or)(u.WP,u.J1,u.Tt)}constructor(e,t,i,n,o,s){super(N.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(W)),this.options=e}async _getPicks(e,t,i,n){const o=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const s=(0,h.P)((()=>{const t=new m;t.updateDocuments(o.map((e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]}))));const n=t.calculateScores(e,i);return _(n).filter((e=>e.score>N.TFIDF_THRESHOLD)).slice(0,N.TFIDF_MAX_RESULTS)})),r=[];for(const h of o){const t=N.WORD_FILTER(e,h.label)??void 0,n=h.commandAlias?N.WORD_FILTER(e,h.commandAlias)??void 0:void 0;if(t||n)h.highlights={label:t,detail:this.options.showAlias?n:void 0},r.push(h);else if(e===h.commandId)r.push(h);else if(e.length>=3){const e=s();if(i.isCancellationRequested)return[];const t=e.find((e=>e.key===h.commandId));t&&(h.tfIdfScore=t.score,r.push(h))}}const a=new Map;for(const h of r){const e=a.get(h.label);e?(h.description=h.commandId,e.description=e.commandId):a.set(h.label,h)}r.sort(((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return-1;const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const l=[];let c=!1,d=!0,u=!!this.options.suggestedCommandIds;for(let h=0;h{const t=await this.getAdditionalCommandPicks(o,r,e,i);if(i.isCancellationRequested)return[];const s=t.map((e=>this.toCommandPick(e,n)));return d&&"separator"!==s[0]?.type&&s.unshift({type:"separator",label:(0,b.kg)("suggested","similar commands")}),s})()}:l}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,b.kg)("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(i){(0,d.MB)(i)||this.dialogService.error((0,b.kg)("canNotRun","Command '{0}' resulted in an error",e.label),(0,c.r)(i))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};B=N=M([F(1,S._Y),F(2,k.b),F(3,y.d),F(4,P.k),F(5,C.X)],B);let W=class extends g.jG{static{A=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>this.updateConfiguration(e)))),this._register(this.storageService.onWillSaveState((e=>{e.reason===O.LP.SHUTDOWN&&this.saveState()})))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=A.getConfiguredCommandHistoryLength(this.configurationService),A.cache&&A.cache.limit!==this.configuredCommandsHistoryLength&&(A.cache.limit=this.configuredCommandsHistoryLength,A.hasChanges=!0))}load(){const e=this.storageService.get(A.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(n){this.logService.error(`[CommandsHistory] invalid data: ${n}`)}const i=A.cache=new p.qK(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}A.counter=this.storageService.getNumber(A.PREF_KEY_COUNTER,0,A.counter)}push(e){A.cache&&(A.cache.set(e,A.counter++),A.hasChanges=!0)}peek(e){return A.cache?.peek(e)}saveState(){if(!A.cache)return;if(!A.hasChanges)return;const e={usesLRU:!0,entries:[]};A.cache.forEach(((t,i)=>e.entries.push({key:i,value:t}))),this.storageService.store(A.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(A.PREF_KEY_COUNTER,A.counter,0,0),A.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const t=e.getValue(),i=t.workbench?.commandPalette?.history;return"number"===typeof i?i:A.DEFAULT_COMMANDS_HISTORY_LENGTH}};W=A=M([F(0,O.CS),F(1,w.pG),F(2,x.rr)],W);class H extends B{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions()){let e;i.metadata?.description&&(e=(0,l.f)(i.metadata.description)?i.metadata.description:{original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:e,label:(0,a.pS)(i.label)||i.id})}return t}}var V=i(16259),j=i(57479),z=i(3874),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends H{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,o,s){super({showAlias:!1},e,i,n,o,s),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};q=U([$(0,S._Y),$(1,r.T),$(2,k.b),$(3,y.d),$(4,P.k),$(5,C.X)],q);class K extends V.ks{static{this.ID="editor.action.quickCommand"}constructor(){super({id:K.ID,label:s.gf.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:j.R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(z.GK).quickAccess.show(q.PREFIX)}}(0,V.Fl)(K),n.O.as(o.Fd.Quickaccess).registerQuickAccessProvider({ctor:q,prefix:q.PREFIX,helpEntries:[{description:s.gf.quickCommandHelp,commandId:K.ID}]})},86853:(e,t,i)=>{"use strict";var n=i(5091),o=i(55413),s=i(24246),r=i(41337);class a extends s.o{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,r.kg)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,n.jG.None}provideWithTextEditor(e,t,i){const s=e.editor,r=new n.Cm;r.add(t.onDidAccept((i=>{const[n]=t.selectedItems;if(n){if(!this.isValidLineNumber(s,n.lineNumber))return;this.gotoLocation(e,{range:this.toRange(n.lineNumber,n.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(s,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(s,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(s,e.lineNumber))return void this.clearDecorations(s);const n=this.toRange(e.lineNumber,e.column);s.revealRangeInCenter(n,0),this.addDecorations(s,n)};l(),r.add(t.onDidChangeValue((()=>l())));const c=(0,o.jA)(s);if(c){const e=c.getOptions(),t=e.get(68);2===t.renderType&&(c.updateOptions({lineNumbers:"on"}),r.add((0,n.s)((()=>c.updateOptions({lineNumbers:"relative"})))))}return r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,r.kg)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,r.kg)("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?(0,r.kg)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):(0,r.kg)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!==typeof t)&&(t>0&&t<=this.lineCount(e))}isValidColumn(e,t,i){if(!i||"number"!==typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}var l=i(16374),c=i(60018),d=i(94728),u=i(340),h=i(40231),g=i(16259),p=i(57479),f=i(3874),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=h.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};v=m([_(0,d.T)],v);class b extends g.ks{static{this.ID="editor.action.gotoLine"}constructor(){super({id:b.ID,label:u.Hw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(f.GK).quickAccess.show(v.PREFIX)}}(0,g.Fl)(b),l.O.as(c.Fd.Quickaccess).registerQuickAccessProvider({ctor:v,prefix:v.PREFIX,helpEntries:[{description:u.Hw.gotoLineActionLabel,commandId:b.ID}]})},2845:(e,t,i)=>{"use strict";i(94423);var n=i(9659),o=i(67792),s=i(25923),r=i(23740),a=i(10695),l=i(52444),c=i(25160),d=i(20601);const u=[void 0,[]];function h(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?g(e,o.values,i,n):p(e,t,i,n)}function g(e,t,i,n){let o=0;const s=[];for(const r of t){const[t,a]=p(e,r,i,n);if("number"!==typeof t)return u;o+=t,s.push(...a)}return[o,f(s)]}function p(e,t,i,n){const o=(0,a.dt)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],(0,a.WJ)(o)]:u}Object.freeze({score:0});function f(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const o of t)n&&m(n,o)?(n.start=Math.min(n.start,o.start),n.end=Math.max(n.end,o.end)):(n=o,i.push(o));return i}function m(e,t){return!(e.end=0,r=_(e);let a;const c=e.split(v);if(c.length>1)for(const l of c){const e=_(l),{pathNormalized:t,normalized:i,normalizedLowercase:n}=y(l);i&&(a||(a=[]),a.push({original:l,originalLowercase:l.toLowerCase(),pathNormalized:t,normalized:i,normalizedLowercase:n,expectContiguousMatch:e}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function y(e){let t;t=c.uF?e.replace(/\//g,l.Vn):e.replace(/\\/g,l.Vn);const i=(0,d.wB)(t).replace(/\s|"/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function w(e){return Array.isArray(e)?b(e.map((e=>e.original)).join(v)):b(e.original)}var C,S=i(5091),k=i(8690),x=i(35350),E=i(83262),L=i(24246),T=i(41337),I=i(12847),R=i(43654),D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};let A=class extends L.o{static{C=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,T.kg)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),S.jG.None}provideWithTextEditor(e,t,i,n){const o=e.editor,s=this.getModel(o);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i,n):this.doProvideWithoutEditorSymbols(e,s,t,i):S.jG.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new S.Cm;return this.provideLabelPick(i,(0,T.kg)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>{const s=await this.waitForLanguageSymbolRegistry(t,o);s&&!n.isCancellationRequested&&o.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new n.Zv,o=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(o.dispose(),i.complete(!0))})));return t.add((0,S.s)((()=>i.complete(!1)))),i.p}doProvideWithEditorSymbols(e,t,i,n,s){const r=e.editor,a=new S.Cm;a.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),s?.handleAccept?.(n),t.inBackground||i.hide())}))),a.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const l=this.getDocumentSymbols(t,n);let c;const d=async e=>{c?.dispose(!0),i.busy=!1,c=new o.Qi(n),i.busy=!0;try{const o=b(i.value.substr(C.PREFIX.length).trim()),s=await this.doGetSymbolPicks(l,o,void 0,c.token,t);if(n.isCancellationRequested)return;if(s.length>0){if(i.items=s,e&&0===o.original.length){const t=(0,R.Uk)(s,(t=>Boolean("separator"!==t.type&&t.range&&k.Q.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else o.original.length>0?this.provideLabelPick(i,(0,T.kg)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,T.kg)("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue((()=>d(void 0)))),d(r.getSelection()?.getPosition()),a.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(r.revealRangeInCenter(e.range.selection,0),this.addDecorations(r,e.range.decoration))}))),a}async doGetSymbolPicks(e,t,i,n,o){const a=await e;if(n.isCancellationRequested)return[];const l=0===t.original.indexOf(C.SCOPE_PREFIX),c=l?1:0;let u,g,p;t.values&&t.values.length>1?(u=w(t.values[0]),g=w(t.values.slice(1))):u=t;const f=this.options?.openSideBySideDirection?.();f&&(p=[{iconClass:"right"===f?r.L.asClassName(s.W.splitHorizontal):r.L.asClassName(s.W.splitVertical),tooltip:"right"===f?(0,T.kg)("openToSide","Open to the Side"):(0,T.kg)("openToBottom","Open to the Bottom")}]);const m=[];for(let b=0;bc){let F=!1;if(u!==t&&([I,R]=h(E,{...t,values:void 0},c,L),"number"===typeof I&&(F=!0)),"number"!==typeof I&&([I,R]=h(E,u,c,L),"number"!==typeof I))continue;if(!F&&g){if(A&&g.original.length>0&&([D,N]=h(A,g)),"number"!==typeof D)continue;"number"===typeof I&&(I+=D)}}const M=y.tags&&y.tags.indexOf(1)>=0;m.push({index:b,kind:y.kind,score:I,label:E,ariaLabel:(0,x.PK)(y.name,y.kind),description:A,highlights:M?void 0:{label:R,description:N},range:{selection:k.Q.collapseToStart(y.selectionRange),decoration:y.range},uri:o.uri,symbolName:S,strikethrough:M,buttons:p})}const _=m.sort(((e,t)=>l?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let v=[];if(l){let B,W,H=0;function V(){W&&"number"===typeof B&&H>0&&(W.label=(0,d.GP)(P[B]||O,H))}for(const j of _)B!==j.kind?(V(),B=j.kind,H=1,W={type:"separator"},v.push(W)):H++,v.push(j);V()}else _.length>0&&(v=[{label:(0,T.kg)("symbols","symbols ({0})",m.length),type:"separator"},..._]);return v}compareByScore(e,t){if("number"!==typeof e.score&&"number"===typeof t.score)return 1;if("number"===typeof e.score&&"number"!==typeof t.score)return-1;if("number"===typeof e.score&&"number"===typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=P[e.kind]||O,n=P[t.kind]||O,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};A=C=D([N(0,I.ILanguageFeaturesService),N(1,E.gW)],A);const O=(0,T.kg)("property","properties ({0})"),P={[5]:(0,T.kg)("method","methods ({0})"),[11]:(0,T.kg)("function","functions ({0})"),[8]:(0,T.kg)("_constructor","constructors ({0})"),[12]:(0,T.kg)("variable","variables ({0})"),[4]:(0,T.kg)("class","classes ({0})"),[22]:(0,T.kg)("struct","structs ({0})"),[23]:(0,T.kg)("event","events ({0})"),[24]:(0,T.kg)("operator","operators ({0})"),[10]:(0,T.kg)("interface","interfaces ({0})"),[2]:(0,T.kg)("namespace","namespaces ({0})"),[3]:(0,T.kg)("package","packages ({0})"),[25]:(0,T.kg)("typeParameter","type parameters ({0})"),[1]:(0,T.kg)("modules","modules ({0})"),[6]:(0,T.kg)("property","properties ({0})"),[9]:(0,T.kg)("enum","enumerations ({0})"),[21]:(0,T.kg)("enumMember","enumeration members ({0})"),[14]:(0,T.kg)("string","strings ({0})"),[0]:(0,T.kg)("file","files ({0})"),[17]:(0,T.kg)("array","arrays ({0})"),[15]:(0,T.kg)("number","numbers ({0})"),[16]:(0,T.kg)("boolean","booleans ({0})"),[18]:(0,T.kg)("object","objects ({0})"),[19]:(0,T.kg)("key","keys ({0})"),[7]:(0,T.kg)("field","fields ({0})"),[13]:(0,T.kg)("constant","constants ({0})")};var M=i(16374),F=i(60018),B=i(94728),W=i(340),H=i(40231),V=i(16259),j=i(57479),z=i(3874),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends A{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=H.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};q=U([$(0,B.T),$(1,I.ILanguageFeaturesService),$(2,E.gW)],q);class K extends V.ks{static{this.ID="editor.action.quickOutline"}constructor(){super({id:K.ID,label:W.n9.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:j.R.hasDocumentSymbolProvider,kbOpts:{kbExpr:j.R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(z.GK).quickAccess.show(A.PREFIX,{itemActivation:z.C1.NONE})}}(0,V.Fl)(K),M.O.as(F.Fd.Quickaccess).registerQuickAccessProvider({ctor:q,prefix:A.PREFIX,helpEntries:[{description:W.n9.quickOutlineActionLabel,prefix:A.PREFIX,commandId:K.ID},{description:W.n9.quickOutlineByCategoryActionLabel,prefix:A.PREFIX_BY_CATEGORY}]})},98232:(e,t,i)=>{"use strict";var n,o=i(16374),s=i(60018),r=i(340),a=i(41337),l=i(5091),c=i(13046),d=i(3874),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},h=function(e,t){return function(i,n){t(i,n,e)}};let g=class{static{n=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=o.O.as(s.Fd.Quickaccess)}provide(e){const t=new l.Cm;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(n.PREFIX.length));t&&t.prefix&&t.prefix!==n.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==n.PREFIX)),t}getQuickAccessProviders(){const e=this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)));return e}createPicks(e){return e.helpEntries.map((t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:(0,a.kg)("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}}))}};g=n=u([h(0,d.GK),h(1,c.b)],g),o.O.as(s.Fd.Quickaccess).registerQuickAccessProvider({ctor:g,prefix:"",helpEntries:[{description:r.oq.helpQuickAccessActionLabel}]})},31252:(e,t,i)=>{"use strict";var n=i(16259),o=i(94728),s=i(12443),r=i(32828),a=i(18904),l=i(87778),c=i(95062),d=i(94216),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},h=function(e,t){return function(i,n){t(i,n,e)}};let g=class extends s.X{constructor(e,t,i,n,o,s,r){super(!0,e,t,i,n,o,s,r)}};g=u([h(1,a.fN),h(2,o.T),h(3,c.Ot),h(4,l._Y),h(5,d.CS),h(6,r.pG)],g),(0,n.HW)(s.X.ID,g,4)},40611:(e,t,i)=>{"use strict";i.d(t,{aQ:()=>B,nr:()=>W,Sx:()=>q,po:()=>F,tj:()=>M});var n=i(2150),o=i(88758),s=i(85476),r=i(40231),a=i(35350),l=i(4577);class c{constructor(e,t,i,n,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}function d(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,o=e.length;n{const i=_(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";while(e.length>=1&&""===e[0].token){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}const s=new g;for(const d of t)s.getId(d);const r=s.getId(n),a=s.getId(o),l=new v(i,r,a),c=new b(l);for(let d=0,u=e.length;d>>0,this._cache.set(t,i)}return(i|e)>>>0}}const f=/\b(comment|string|regex|regexp)\b/;function m(e){const t=e.match(f);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function _(e,t){return et?1:0}class v{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new v(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class b{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const o=this._children.get(i);return"undefined"!==typeof o?o.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const o=e.indexOf(".");let s,r;-1===o?(s=e,r=""):(s=e.substring(0,o),r=e.substring(o+1));let a=this._children.get(s);"undefined"===typeof a&&(a=new b(this._mainRule.clone()),this._children.set(s,a)),a.insert(r,t,i,n)}}function y(e){const t=[];for(let i=1,n=e.length;ii.fire()))),e&&t.add(e.onDidProductIconThemeChange((()=>i.fire()))),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){const t=e?e.getProductIconTheme():new O,i={},s=[],r=[];for(const e of o.getIcons()){const o=t.getIcon(e);if(!o)continue;const a=o.font,l=`--vscode-icon-${e.id}-font-family`,c=`--vscode-icon-${e.id}-content`;a?(i[a.id]=a.definition,r.push(`${l}: ${(0,n.yt)(a.id)};`,`${c}: '${o.fontCharacter}';`),s.push(`.codicon-${e.id}:before { content: '${o.fontCharacter}'; font-family: ${(0,n.yt)(a.id)}; }`)):(r.push(`${c}: '${o.fontCharacter}'; ${l}: 'codicon';`),s.push(`.codicon-${e.id}:before { content: '${o.fontCharacter}'; }`))}for(const e in i){const t=i[e],o=t.weight?`font-weight: ${t.weight};`:"",r=t.style?`font-style: ${t.style};`:"",a=t.src.map((e=>`${(0,n.Tf)(e.location)} format('${e.format}')`)).join(", ");s.push(`@font-face { src: ${a}; font-family: ${(0,n.yt)(e)};${o}${r} font-display: block; }`)}return s.push(`:root { ${r.join(" ")} }`),s.join("\n")}}}class O{getIcon(e){const t=(0,N.HT)();let i=e.defaults;while(D.L.isThemeIcon(i)){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}var P=i(62484);const M="vs",F="vs-dark",B="hc-black",W="hc-light",H=L.O.as(C.FdG.ColorContribution),V=L.O.as(T.Fd.ThemingContribution);class j{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(z(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,s.Q1.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=U(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,s.Q1.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=H.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case M:return R.zM.LIGHT;case B:return R.zM.HIGH_CONTRAST_DARK;case W:return R.zM.HIGH_CONTRAST_LIGHT;default:return R.zM.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=U(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=p.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")),o=n.metadata,s=l.x.getForeground(o),r=l.x.getFontStyle(o);return{foreground:s,italic:Boolean(1&r),bold:Boolean(2&r),underline:Boolean(4&r),strikethrough:Boolean(8&r)}}}function z(e){return e===M||e===F||e===B||e===W}function U(e){switch(e){case M:return S;case F:return k;case B:return x;case W:return E}}function $(e){const t=U(e);return new j(e,t)}class q extends I.jG{constructor(){super(),this._onColorThemeChange=this._register(new r.vl),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new r.vl),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new O,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(M,$(M)),this._knownThemes.set(F,$(F)),this._knownThemes.set(B,$(B)),this._knownThemes.set(W,$(W));const e=this._register(A(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(M),this._onOSSchemeChanged(),this._register(e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}))),(0,o.Dy)(P.G,"(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return n.Cl(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=n.li(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),I.jG.None}_registerShadowDomContainer(e){const t=n.li(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(M),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=P.G.matchMedia("(forced-colors: active)").matches;if(e!==(0,R.Bb)(this._theme.type)){let t;t=(0,R.HD)(this._theme.type)?e?B:F:e?W:M,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};V.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const s of H.getColors()){const e=this._theme.getColor(s.id,!0);e&&n.push(`${(0,C.Bbc)(s.id)}: ${e.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join("\n")} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(y(o)),this._themeCSS=e.join("\n"),this._updateCSS(),a.dG.setColorMap(o),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach((e=>e.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},47883:(e,t,i)=>{"use strict";var n=i(16259),o=i(55643),s=i(340),r=i(1474),a=i(40611);class l extends n.ks{constructor(){super({id:"editor.action.toggleHighContrast",label:s.E6.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(o.L),n=i.getColorTheme();(0,r.Bb)(n.type)?(i.setTheme(this._originalThemeName||((0,r.HD)(n.type)?a.po:a.tj)),this._originalThemeName=null):(i.setTheme((0,r.HD)(n.type)?a.aQ:a.nr),this._originalThemeName=n.themeName)}}(0,n.Fl)(l)},55643:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(87778);const o=(0,n.u1)("themeService")},3786:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CompletionAdapter:()=>ze,DefinitionAdapter:()=>nt,DiagnosticsAdapter:()=>He,DocumentColorAdapter:()=>mt,DocumentFormattingEditProvider:()=>gt,DocumentHighlightAdapter:()=>tt,DocumentLinkAdapter:()=>ht,DocumentRangeFormattingEditProvider:()=>pt,DocumentSymbolAdapter:()=>lt,FoldingRangeAdapter:()=>_t,HoverAdapter:()=>Ze,ReferenceAdapter:()=>st,RenameAdapter:()=>rt,SelectionRangeAdapter:()=>bt,WorkerManager:()=>Fe,fromPosition:()=>Ue,fromRange:()=>$e,setupMode:()=>yt,toRange:()=>qe,toTextEdit:()=>Qe});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; + *-----------------------------------------------------------------------------*/c(d,n);var u={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:d.languages.IndentAction.Indent}}]},h={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}}},11320:(e,t,i)=>{"use strict";i.d(t,{M:()=>o});var n=i(76892);function o(e,t){e instanceof n.D?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}},87550:(e,t,i)=>{"use strict";i.d(t,{u:()=>r});var n=i(5091),o=i(40231),s=i(2150);class r extends n.jG{constructor(e,t){super(),this._onDidChange=this._register(new o.vl),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const o=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{(0,s.PG)((0,s.zk)(this._referenceDomElement),(()=>{n=!1,o()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?{width:t[0].contentRect.width,height:t[0].contentRect.height}:null,i=!0,o()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}},74753:(e,t,i)=>{"use strict";i.d(t,{T:()=>f});var n=i(2150),o=i(61979),s=i(40231),r=i(5091),a=i(11320);class l{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class c{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),this._container?.remove(),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");(0,a.M)(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");(0,a.M)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");(0,a.M)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let s;0===e.type&&(s=t),2===e.type&&(s=i),1===e.type&&(s=n),s.appendChild(document.createElement("br"));const r=document.createElement("span");c._render(r,e),s.appendChild(r),o.push(r)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)}),5e3))}_evictUntrustedReadings(e){const t=this._ensureCache(e),i=t.getValues();let n=!1;for(const e of i)e.isTrusted||(n=!0,t.remove(e));n&&this._onDidChange.fire()}readFontInfo(e,t){const i=this._ensureCache(e);if(!i.has(t)){let i=this._actualReadFontInfo(e,t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new h.YJ({pixelRatio:o.c.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(e,t,i)}return i.get(t)}_createRequest(e,t,i,n){const o=new l(e,t);return i.push(o),n?.push(o),o}_actualReadFontInfo(e,t){const i=[],n=[],s=this._createRequest("n",0,i,n),r=this._createRequest("m",0,i,null),a=this._createRequest(" ",0,i,n),l=this._createRequest("0",0,i,n),c=this._createRequest("1",0,i,n),g=this._createRequest("2",0,i,n),p=this._createRequest("3",0,i,n),f=this._createRequest("4",0,i,n),m=this._createRequest("5",0,i,n),_=this._createRequest("6",0,i,n),v=this._createRequest("7",0,i,n),b=this._createRequest("8",0,i,n),y=this._createRequest("9",0,i,n),w=this._createRequest("→",0,i,n),C=this._createRequest("→",0,i,null),S=this._createRequest("·",0,i,n),k=this._createRequest(String.fromCharCode(11825),0,i,null),x="|/-_ilm%";for(let e=0,t=x.length;e.001){L=!1;break}}let I=!0;return L&&C.width!==T&&(I=!1),C.width>w.width&&(I=!1),new h.YJ({pixelRatio:o.c.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:L,typicalHalfwidthCharacterWidth:s.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:I,spaceWidth:a.width,middotWidth:S.width,wsmiddotWidth:k.width,maxDigitWidth:E},!0)}}class p{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const f=new g},3692:(e,t,i)=>{"use strict";i.d(t,{M:()=>s});var n=i(40231);class o{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new n.vl,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const s=new o},169:(e,t,i)=>{"use strict";i.d(t,{$D:()=>n,Eq:()=>y,M0:()=>x,Mz:()=>k,No:()=>S,bs:()=>w});var n,o=i(88758),s=i(2150),r=i(49822),a=i(68389),l=i(736),c=i(9659),d=i(40231),u=i(5091),h=i(33911),g=i(20601),p=i(45436),f=i(98581),m=i(17300),_=i(12660),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};(function(e){e.Tap="-monaco-textarea-synthetic-tap"})(n||(n={}));const y={forceCopyWithSyntaxHighlighting:!1};class w{static{this.INSTANCE=new w}constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}class C{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let S=class extends u.jG{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,o,s){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=o,this._logService=s,this._onFocus=this._register(new d.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new d.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new d.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new d.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new d.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new d.vl),this.onPaste=this._onPaste.event,this._onType=this._register(new d.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new d.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new d.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new d.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new d.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new u.HE),this._asyncTriggerCut=this._register(new c.uC((()=>this._onCut.fire()),0)),this._textAreaState=p._O.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(d.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new c.uC((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)):this._asyncFocusGainWriteScreenReaderContent.clear()}))),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown((e=>{const t=new a.Z(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new a.Z(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{p.Hf&&console.log("[compositionstart]",e);const t=new C;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code))return p.Hf&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{p.Hf&&console.log("[compositionupdate]",e);const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=p._O.readFromTextArea(this._textArea,this._textAreaState),i=p._O.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p._O.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{p.Hf&&console.log("[compositionend]",e);const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=p._O.readFromTextArea(this._textArea,this._textAreaState),t=p._O.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p._O.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(p.Hf&&console.log("[input]",e),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=p._O.readFromTextArea(this._textArea,this._textAreaState),i=p._O.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!g.pc(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=k.getTextData(e.clipboardData);t&&(i=i||w.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new c.uC((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return s.ko(this._textArea.ownerDocument,"selectionchange",(t=>{if(l.p.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selection)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const c=this._textAreaState.deduceEditorPosition(r),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(u[0],u[1],u[2]),g=new f.L(d.lineNumber,d.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&"render"===e||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};w.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&k.setTextData(e.clipboardData,t.text,t.html,i)}};S=v([b(4,m.j),b(5,_.rr)],S);const k={getTextData(e){const t=e.getData(h.K.text);let i=null;const n=e.getData("vscode-editor-data");if("string"===typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}if(0===t.length&&null===i&&e.files.length>0){const t=Array.prototype.slice.call(e.files,0);return[t.map((e=>e.name)).join("\n"),null]}return[t,i]},setTextData(e,t,i,n){e.setData(h.K.text,t),"string"===typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class x extends u.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new r.f(this._actual,"keydown")).event,this.onKeyUp=this._register(new r.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new r.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new r.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new r.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new r.f(this._actual,"beforeinput")).event,this.onInput=this._register(new r.f(this._actual,"input")).event,this.onCut=this._register(new r.f(this._actual,"cut")).event,this.onCopy=this._register(new r.f(this._actual,"copy")).event,this.onPaste=this._register(new r.f(this._actual,"paste")).event,this.onFocus=this._register(new r.f(this._actual,"focus")).event,this.onBlur=this._register(new r.f(this._actual,"blur")).event,this._onSyntheticTap=this._register(new d.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>l.p.onKeyDown()))),this._register(this.onBeforeInput((()=>l.p.onBeforeInput()))),this._register(this.onInput((()=>l.p.onInput()))),this._register(this.onKeyUp((()=>l.p.onKeyUp()))),this._register(s.ko(this._actual,n.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=s.jG(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&s.bq()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let r=null;const a=s.jG(n);r=a?a.activeElement:s.bq();const l=s.zk(r),c=r===n,d=n.selectionStart,u=n.selectionEnd;if(c&&d===t&&u===i)o.gm&&l.parent!==l&&n.focus();else{if(c)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o.gm&&l.parent!==l&&n.focus());try{const e=s.zK(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),s.wk(n,e)}catch(e){}}}}},45436:(e,t,i)=>{"use strict";i.d(t,{Al:()=>a,Hf:()=>s,_O:()=>r});var n=i(20601),o=i(8690);const s=!1;class r{static{this.EMPTY=new r("",0,0,null,void 0)}constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),o=e.getSelectionEnd();let s;if(t){const e=i.substring(0,n),o=t.value.substring(0,t.selectionStart);e===o&&(s=t.newlineCountBeforeSelection)}return new r(i,n,o,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new r(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){s&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;while(-1!==(o=t.indexOf("\n",o+1)))n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));const o=Math.min(n.Qp(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(n.Vi(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),a=e.value.substring(o,e.value.length-r),l=t.value.substring(o,t.value.length-r),c=e.selectionStart-o,d=e.selectionEnd-o,u=t.selectionStart-o,h=t.selectionEnd-o;if(s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${c}, selectionEnd: ${d}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${u}, selectionEnd: ${h}`)),u===h){const t=e.selectionStart-o;return s&&console.log(`REMOVE PREVIOUS: ${t} chars`),{text:l,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}const g=d-c;return{text:l,replacePrevCharCnt:g,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Qp(e.value,t.value),e.selectionEnd),o=Math.min(n.Vi(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-o),a=t.value.substring(i,t.value.length-o),l=e.selectionStart-i,c=e.selectionEnd-i,d=t.selectionStart-i,u=t.selectionEnd-i;return s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${d}, selectionEnd: ${u}`)),{text:a,replacePrevCharCnt:c,replaceNextCharCnt:r.length-c,positionDelta:u-a.length}}}class a{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new o.Q(n,1,s+1,1)}static fromEditorSelection(e,t,i,n){const s=500,l=a._getPageOfLine(t.startLineNumber,i),c=a._getRangeForPage(l,i),d=a._getPageOfLine(t.endLineNumber,i),u=a._getRangeForPage(d,i);let h=c.intersectRanges(new o.Q(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(h,1)>s){const t=e.modifyPosition(h.getEndPosition(),-s);h=o.Q.fromPositions(t,h.getEndPosition())}const g=e.getValueInRange(h,1),p=e.getLineCount(),f=e.getLineMaxColumn(p);let m=u.intersectRanges(new o.Q(t.endLineNumber,t.endColumn,p,f));if(n&&e.getValueLengthInRange(m,1)>s){const t=e.modifyPosition(m.getStartPosition(),s);m=o.Q.fromPositions(m.getStartPosition(),t)}const _=e.getValueInRange(m,1);let v;if(l===d||l+1===d)v=e.getValueInRange(t,1);else{const i=c.intersectRanges(t),n=u.intersectRanges(t);v=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&v.length>2*s&&(v=v.substring(0,s)+String.fromCharCode(8230)+v.substring(v.length-s,v.length)),new r(g+v+_,g.length,g.length+v.length,t,h.endLineNumber-h.startLineNumber)}}},32378:(e,t,i)=>{"use strict";i.d(t,{Yh:()=>D,QM:()=>x});var n=i(41337),o=i(88758),s=i(50322),r=i(19950),a=i(16259),l=i(94728),c=i(332),d=i(36788),u=i(8690);class h{static columnSelect(e,t,i,n,o,s){const r=Math.abs(o-i)+1,a=i>o,l=n>s,h=ns)continue;if(_n)continue;if(m0&&n--,h.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=s;i++){const o=t.getLineMaxColumn(i),s=e.visibleColumnFromColumn(t,new d.y(i,o));n=Math.max(n,s)}let r=i.toViewVisualColumn;return r{const i=e.get(l.T).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=(0,b.bq)();return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(i),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.T).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}(function(e){class t extends C{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){if(!t.position)return;e.model.pushStackElement();const i=e.setCursorStates(t.source,3,[p.c.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]);i&&2!==t.revealType&&e.revealAllCursors(t.source,!0,!0)}}e.MoveTo=(0,a.E_)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.E_)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends C{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>c.MF.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=(0,a.E_)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if("undefined"===typeof n.position||"undefined"===typeof n.viewPosition||"undefined"===typeof n.mouseColumn)return null;const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new d.y(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return h.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.E_)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return h.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.E_)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return h.columnSelectRight(e.cursorConfig,e,i)}});class s extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return h.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.E_)(new s({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.E_)(new s({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return h.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.E_)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.E_)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:3596,linux:{primary:0}}}));class g extends C{constructor(){super({id:"cursorMove",precondition:void 0,metadata:p.S.metadata})}runCoreEditorCommand(e,t){const i=p.S.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,g._move(e,e.getCursorStates(),i)),e.revealAllCursors(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return p.c.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return p.c.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=g,e.CursorMove=(0,a.E_)(new g);class f extends C{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,p.c.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealAllCursors(t.source,!0)}}e.CursorLeft=(0,a.E_)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.E_)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1039}})),e.CursorRight=(0,a.E_)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.E_)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1041}})),e.CursorUp=(0,a.E_)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.E_)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.E_)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.E_)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1035}})),e.CursorDown=(0,a.E_)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.E_)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.E_)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.E_)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.E_)(new class extends C{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?p.c.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):p.c.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;is&&(o=s);const r=new u.Q(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case k.RawAtArgument.Top:a=3;break;case k.RawAtArgument.Center:a=1;break;case k.RawAtArgument.Bottom:a=4;break;default:break}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends E{constructor(){super(a.tc)}runDOMCommand(e){o.gm&&(e.focus(),e.select()),e.ownerDocument.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[p.c.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.E_)(new class extends C{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[c.MF.fromModelSelection(t.selection)]))}})})(x||(x={}));const L=_.M$.and(m.R.textInputFocus,m.R.columnSelection);function T(e,t){v.f.registerKeybindingRule({id:e,primary:t,when:L,weight:w+1})}function I(e){return e.register(),e}var D;T(x.CursorColumnSelectLeft.id,1039),T(x.CursorColumnSelectRight.id,1041),T(x.CursorColumnSelectUp.id,1040),T(x.CursorColumnSelectPageUp.id,1035),T(x.CursorColumnSelectDown.id,1042),T(x.CursorColumnSelectPageDown.id,1036),function(e){class t extends a.DX{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.E_)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:m.R.writable,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,y.AO.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.E_)(new class extends t{constructor(){super({id:"outdent",precondition:m.R.writable,kbOpts:{weight:w,kbExpr:_.M$.and(m.R.editorTextFocus,m.R.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,f.T.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.E_)(new class extends t{constructor(){super({id:"tab",precondition:m.R.writable,kbOpts:{weight:w,kbExpr:_.M$.and(m.R.editorTextFocus,m.R.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,f.T.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.E_)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=g.g.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.E_)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:w,kbExpr:m.R.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=g.g.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends E{constructor(){super(a.aU)}runDOMCommand(e){e.ownerDocument.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(92))return t.getModel().undo()}},e.Redo=new class extends E{constructor(){super(a.ih)}runDOMCommand(e){e.ownerDocument.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(92))return t.getModel().redo()}}}(D||(D={}));class R extends a.uB{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.T).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function N(e,t){I(new R("default:"+e,e)),I(new R(e,e,t))}N("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),N("replacePreviousChar"),N("compositionType"),N("compositionStart"),N("compositionEnd"),N("paste"),N("cut")},35524:(e,t,i)=>{"use strict";i.d(t,{l:()=>u,q:()=>l});var n=i(63872),o=i(65312),s=i(33911),r=i(29133),a=i(47747);function l(e){const t=new o.Vq;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,(0,o.gf)(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,c(n))}}return t}function c(e){const t=e.path?r.r.parse(e.path):void 0;return(0,o.VX)(e.name,t,(async()=>new Uint8Array(await e.arrayBuffer())))}const d=Object.freeze([a.sV.EDITORS,a.sV.FILES,n.t.RESOURCES,n.t.INTERNAL_URI_LIST]);function u(e,t=!1){const i=l(e),a=i.get(n.t.INTERNAL_URI_LIST);if(a)i.replace(s.K.uriList,a);else if(t||!i.has(s.K.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(r.r.file(i).toString()):t.push(r.r.parse(e.name,!0).toString())}catch{}}}t.length&&i.replace(s.K.uriList,(0,o.gf)(o.jt.create(t)))}for(const e of d)i.delete(e);return i}},55413:(e,t,i)=>{"use strict";i.d(t,{Np:()=>s,jA:()=>a,z9:()=>o});var n=i(69483);function o(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===n._.ICodeEditor}function s(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===n._.IDiffEditor}function r(e){return!!e&&"object"===typeof e&&"function"===typeof e.onDidChangeActiveEditor}function a(e){return o(e)?e:s(e)?e.getModifiedEditor():r(e)&&o(e.activeCodeEditor)?e.activeCodeEditor:null}},66621:(e,t,i)=>{"use strict";i.d(t,{$z:()=>m,BA:()=>v,DW:()=>_,Hh:()=>d,Qn:()=>b,dO:()=>f,i_:()=>p,nz:()=>c,wt:()=>g});var n=i(2150),o=i(80125),s=i(46274),r=i(9659),a=i(5091),l=i(66344);class c{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new d(this.x-e.scrollX,this.y-e.scrollY)}}class d{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new c(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class u{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class h{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function g(e){const t=n.BK(e);return new u(t.left,t.top,t.width,t.height)}function p(e,t,i){const n=t.width/e.offsetWidth,o=t.height/e.offsetHeight,s=(i.x-t.x)/n,r=(i.y-t.y)/o;return new h(s,r)}class f extends s.P{constructor(e,t,i){super(n.zk(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new c(this.posx,this.posy),this.editorPos=g(i),this.relativePos=p(i,this.editorPos,this.pos)}}class m{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return n.ko(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return n.ko(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return n.ko(e,n.Bx.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return n.ko(e,n.Bx.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return n.ko(e,"mousemove",(e=>t(this._create(e))))}}class _{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return n.ko(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return n.ko(e,n.Bx.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return n.ko(e,"pointermove",(e=>t(this._create(e))))}}class v extends a.jG{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new o._),this._keydownListener=null}startMonitoring(e,t,i,o,s){this._keydownListener=n.b2(e.ownerDocument,"keydown",(e=>{const t=e.toKeyCodeChord();t.isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{o(new f(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),s(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class b{static{this._idPool=0}constructor(e){this._editor=e,this._instanceId=++b._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new r.uC((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const o=this._counter++;i=new y(t,`dyn-rule-${this._instanceId}-${o}`,n.Cl(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}class y{constructor(e,t,i,o){this.key=e,this.className=t,this.properties=o,this._referenceCount=0,this._styleElementDisposables=new a.Cm,this._styleElement=n.li(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let o;o="object"===typeof n?(0,l.GuP)(n.id):n;const s=w(e);i+=`\n\t${s}: ${o};`}return i+="\n}",i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function w(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}},16259:(e,t,i)=>{"use strict";i.d(t,{DX:()=>S,E_:()=>T,Fl:()=>I,HW:()=>N,PF:()=>x,aU:()=>M,dS:()=>n,fE:()=>w,gW:()=>D,ih:()=>F,ke:()=>L,ks:()=>k,qO:()=>E,tc:()=>B,uB:()=>y,xX:()=>R});var n,o=i(41337),s=i(29133),r=i(94728),a=i(36788),l=i(69361),c=i(64037),d=i(6330),u=i(72786),h=i(18904),g=i(87778),p=i(78386),f=i(16374),m=i(11086),_=i(50322),v=i(12660),b=i(2150);class y{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?h.M$.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};p.f.registerKeybindingRule(i)}}u.w.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){d.ZG.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class w extends y{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{const o=e.get(h.fN);if(o.contextMatchesRules(i??void 0))return n(e,s,t)}))}runCommand(e,t){return S.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class k extends S{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=d.D8.EditorContext),t.title||(t.title=e.label),t.when=h.M$.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(k.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(m.k).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class x extends k{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e{const i=e.get(h.fN),o=e.get(v.rr),s=i.contextMatchesRules(this.desc.precondition??void 0);if(s)return this.runEditorCommand(e,n,...t);o.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize())}))}}function L(e,t){u.w.registerCommand(e,(function(e,...i){const n=e.get(g._Y),[o,r]=i;(0,_.j)(s.r.isUri(o)),(0,_.j)(a.y.isIPosition(r));const d=e.get(l.IModelService).getModel(o);if(d){const e=a.y.lift(r);return n.invokeFunction(t,d,e,...i.slice(2))}return e.get(c.ITextModelService).createModelReference(o).then((e=>new Promise(((o,s)=>{try{const s=n.invokeFunction(t,e.object.textEditorModel,a.y.lift(r),i.slice(2));o(s)}catch(e){s(e)}})).finally((()=>{e.dispose()}))))}))}function T(e){return O.INSTANCE.registerEditorCommand(e),e}function I(e){const t=new e;return O.INSTANCE.registerEditorAction(t),t}function D(e){return O.INSTANCE.registerEditorAction(e),e}function R(e){O.INSTANCE.registerEditorAction(e)}function N(e,t,i){O.INSTANCE.registerEditorContribution(e,t,i)}(function(e){function t(e){return O.INSTANCE.getEditorCommand(e)}function i(){return O.INSTANCE.getEditorActions()}function n(){return O.INSTANCE.getEditorContributions()}function o(e){return O.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))}function s(){return O.INSTANCE.getDiffEditorContributions()}e.getEditorCommand=t,e.getEditorActions=i,e.getEditorContributions=n,e.getSomeEditorContributions=o,e.getDiffEditorContributions=s})(n||(n={}));const A={EditorCommonContributions:"editor.contributions"};class O{static{this.INSTANCE=new O}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function P(e){return e.register(),e}f.O.add(A.EditorCommonContributions,O.INSTANCE);const M=P(new w({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:o.kg({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:d.D8.CommandPalette,group:"",title:o.kg("undo","Undo"),order:1}]}));P(new C(M,{id:"default:undo",precondition:void 0}));const F=P(new w({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:o.kg({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:d.D8.CommandPalette,group:"",title:o.kg("redo","Redo"),order:1}]}));P(new C(F,{id:"default:redo",precondition:void 0}));const B=P(new w({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:d.D8.MenubarSelectionMenu,group:"1_basic",title:o.kg({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:d.D8.CommandPalette,group:"",title:o.kg("selectAll","Select All"),order:1}]}))},55745:(e,t,i)=>{"use strict";i.d(t,{Qg:()=>h,Ud:()=>c,jD:()=>u});var n=i(45746),o=i(5091),s=i(39751),r=i(81275),a=i(42389),l=i(98581);function c(e){return d.get(e)}class d extends o.jG{static{this._map=new Map}static get(e){let t=d._map.get(e);if(!t){t=new d(e),d._map.set(e,t);const i=e.onDidDispose((()=>{const t=d._map.get(e);t&&(d._map.delete(e),t.dispose(),i.dispose())}))}return t}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&(this._currentTransaction=new r.XL((()=>{})))}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){const e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=(0,s.FY)(this,this.editor.getModel()),this.model=this._model,this.isReadonly=(0,s.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(92))),this._versionId=(0,s.Zh)({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=(0,s.Zh)({owner:this,equalsFn:(0,n.KC)((0,n.S3)(l.L.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.isFocused=(0,s.y0)(this,(e=>{const t=this.editor.onDidFocusEditorWidget(e),i=this.editor.onDidBlurEditorWidget(e);return{dispose(){t.dispose(),i.dispose()}}}),(()=>this.editor.hasWidgetFocus())),this.value=(0,a.dQ)(this,(e=>(this.versionId.read(e),this.model.read(e)?.getValue()??"")),((e,t)=>{const i=this.model.get();null!==i&&e!==i.getValue()&&i.setValue(e)})),this.valueIsEmpty=(0,s.un)(this,(e=>(this.versionId.read(e),0===this.editor.getModel()?.getValueLength()))),this.cursorSelection=(0,s.C)({owner:this,equalsFn:(0,n.KC)(l.L.selectionsEqual)},(e=>this.selections.read(e)?.[0]??null)),this.onDidType=(0,s.Yd)(this),this.scrollTop=(0,s.y0)(this.editor.onDidScrollChange,(()=>this.editor.getScrollTop())),this.scrollLeft=(0,s.y0)(this.editor.onDidScrollChange,(()=>this.editor.getScrollLeft())),this.layoutInfo=(0,s.y0)(this.editor.onDidLayoutChange,(()=>this.editor.getLayoutInfo())),this.layoutInfoContentLeft=this.layoutInfo.map((e=>e.contentLeft)),this.layoutInfoDecorationsLeft=this.layoutInfo.map((e=>e.decorationsLeft)),this.contentWidth=(0,s.y0)(this.editor.onDidContentSizeChange,(()=>this.editor.getContentWidth())),this._overlayWidgetCounter=0,this._register(this.editor.onBeginUpdate((()=>this._beginUpdate()))),this._register(this.editor.onEndUpdate((()=>this._endUpdate()))),this._register(this.editor.onDidChangeModel((()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}}))),this._register(this.editor.onDidType((e=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,e)}finally{this._endUpdate()}}))),this._register(this.editor.onDidChangeModelContent((e=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,e),this._forceUpdate()}finally{this._endUpdate()}}))),this._register(this.editor.onDidChangeCursorSelection((e=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,e),this._forceUpdate()}finally{this._endUpdate()}})))}forceUpdate(e){this._beginUpdate();try{if(this._forceUpdate(),!e)return;return e(this._currentTransaction)}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e){return(0,s.y0)(this,(t=>this.editor.onDidChangeConfiguration((i=>{i.hasChanged(e)&&t(void 0)}))),(()=>this.editor.getOption(e)))}setDecorations(e){const t=new o.Cm,i=this.editor.createDecorationsCollection();return t.add((0,s.zL)({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},(t=>{const n=e.read(t);i.set(n)}))),t.add({dispose:()=>{i.clear()}}),t}createOverlayWidget(e){const t="observableOverlayWidget"+this._overlayWidgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(i);const n=(0,s.fm)((t=>{e.position.read(t),e.minContentWidthInPx.read(t),this.editor.layoutOverlayWidget(i)}));return(0,o.s)((()=>{n.dispose(),this.editor.removeOverlayWidget(i)}))}}function u(e,t){return(0,s.ht)({createEmptyChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(t,i)=>{if(t.didChange(e)){const e=t.change;void 0!==e&&i.deltas.push(e),i.didChange=!0}return!0}},((i,n)=>{const o=e.read(i);n.didChange&&t(o,n.deltas)}))}function h(e,t){const i=new o.Cm,n=u(e,((e,n)=>{i.clear(),t(e,n,i)}));return{dispose(){n.dispose(),i.dispose()}}}},3176:(e,t,i)=>{"use strict";i.d(t,{cw:()=>l,jN:()=>a,nu:()=>r});var n=i(87778),o=i(29133),s=i(50322);const r=(0,n.u1)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(l.is(e))return l.lift(e);if(c.is(e))return c.lift(e);throw new Error("Unsupported edit")}))}}class l extends a{static is(e){return e instanceof l||(0,s.Gv)(e)&&o.r.isUri(e.resource)&&(0,s.Gv)(e.textEdit)}static lift(e){return e instanceof l?e:new l(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class c extends a{static is(e){return e instanceof c||(0,s.Gv)(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof c?e:new c(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},94728:(e,t,i)=>{"use strict";i.d(t,{T:()=>o});var n=i(87778);const o=(0,n.u1)("codeEditorService")},71203:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const o=e.getVisibleRanges();if(o.length>0){t=o[0].getStartPosition();const n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,o){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=o}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}},95687:(e,t,i)=>{"use strict";i.d(t,{BG:()=>s,IO:()=>a,Y:()=>r,eh:()=>o,pj:()=>c,qN:()=>l});class n{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class o extends n{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class s{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class r{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i{"use strict";i.d(t,{Gb:()=>f,Ax:()=>p,rk:()=>C});var n=i(88758),o=i(76892),s=i(25160),r=i(95687);class a{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const s=this._createRange();try{return s.setStart(e,t),s.setEnd(i,n),s.getClientRects()}catch(e){return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return e;e.sort(r.IO.compare);const t=[];let i=0,n=e[0];for(let o=1,s=e.length;o=s.left?n.width=Math.max(n.width,s.left+s.width-n.left):(t[i++]=n,n=s)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let o=0,s=e.length;oa)return null;if(t=Math.min(a,Math.max(r,t)),n=Math.min(a,Math.max(r,n)),t===n&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,s.clientRectDeltaLeft,s.clientRectScale)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let l=e.children[t].firstChild,c=e.children[n].firstChild;if(l&&c||(!l&&0===i&&t>0&&(l=e.children[t-1].firstChild,i=1073741824),!c&&0===o&&n>0&&(c=e.children[n-1].firstChild,o=1073741824)),!l||!c)return null;i=Math.min(l.textContent.length,Math.max(0,i)),o=Math.min(c.textContent.length,Math.max(0,o));const d=this._readClientRects(l,i,c,o,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,s.clientRectDeltaLeft,s.clientRectScale)}}var l=i(1550),c=i(20529),d=i(1474),u=i(35011);const h=function(){return!!s.ib||!(s.j9||n.gm||n.nr)}();let g=!0;class p{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50),o=i.get(38);this.renderWhitespace="off"===o?i.get(100):"none",this.renderControlCharacters=i.get(95),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(118),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class f{static{this.CLASS_NAME="view-line"}constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,o.Z)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!(0,d.Bb)(this._options.themeType)&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const s=n.getViewLineRenderingData(e),r=this._options,a=l.d.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let p=null;if((0,d.Bb)(r.themeType)||"selection"===this._options.renderWhitespace){const t=n.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:s.minColumn,n=i.endLineNumber===e?i.endColumn:s.maxColumn;t');const v=(0,c.UW)(_,o);o.appendString("");let y=null;return g&&h&&s.isBasicASCII&&r.useMonospaceOptimizations&&0===v.containsForeignElements&&(y=new m(this._renderedViewLine?this._renderedViewLine.domNode:null,_,v.characterMapping)),y||(y=b(this._renderedViewLine?this._renderedViewLine.domNode:null,_,v.characterMapping,v.containsRTL,v.containsForeignElements)),this._renderedViewLine=y,!0}layoutLine(e,t,i){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(i))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof m}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof m?this._renderedViewLine.monospaceAssumptionsAreValid():g}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof m&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==o&&t>o+1&&i>o+1)return new r.pj(!0,[new r.IO(this.getWidth(n),0)]);-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return s&&s.length>0?new r.pj(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}class m{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),g=!1)}return g}toSlowRenderedLine(){return b(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getColumnPixelOffset(e,t,n),s=this._getColumnPixelOffset(e,i,n);return[new r.IO(o,s-o)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,o=300*(n+1)+1;let s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[n],-1===s&&(s=this._actualReadPixelOffset(e,o,i),this._keyColumnPixelOffsetCache[n]=s)),-1===s){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(o),a=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),o=a.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return o&&0!==o.length?o[0].left:-1}getColumnOfNodeOffset(e,t){return C(this._characterMapping,e,t)}}class _{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,n);if(-1===o)return null;const s=this._readPixelOffset(this.domNode,e,i,n);return-1===s?null:[new r.IO(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,o){if(i===n){const n=this._readPixelOffset(e,t,i,o);return-1===n?null:[new r.IO(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,o)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[i];if(-1!==o)return o;const s=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=a.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const o=this._characterMapping.getDomPosition(i),s=a.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new r.IO(0,this.getWidth(n))];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return a.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n)}getColumnOfNodeOffset(e,t){return C(this._characterMapping,e,t)}}class v extends _{_readVisibleRangesForRange(e,t,i,n,o){const s=super._readVisibleRangesForRange(e,t,i,n,o);if(!s||0===s.length||i===n||1===i&&n===this._characterMapping.length)return s;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=s[s.length-1];e.left{"use strict";i.d(t,{x:()=>us});var n=i(63637),o=i(16259),s=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},r=function(e,t){return function(i,n){t(i,n,e)}};let a=class{static{this.ID="editor.contrib.markerDecorations"}constructor(e,t){}dispose(){}};a=s([r(1,n.IMarkerDecorationsService)],a),(0,o.HW)(a.ID,a,0);var l=i(2150),c=i(14396),d=i(40231),u=i(5091),h=i(6657),g=i(11320),p=i(88758),f=i(85053),m=i(85603),_=i(25160),v=i(87550),b=i(74753);class y{static{this.items=[]}constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=y._read(e,this.key),i=t=>y._read(e,t),n=(t,i)=>y._write(e,t,i);this.migrate(t,i,n)}static _read(e,t){if("undefined"===typeof e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const o=t.substring(0,n);return e[o]=e[o]||{},void this._write(e[o],t.substring(n+1),i)}e[t]=i}}function w(e,t){y.items.push(new y(e,t))}function C(e,t){w(e,((i,n,o)=>{if("undefined"!==typeof i)for(const[n,s]of t)if(i===n)return void o(e,s)}))}function S(e){y.items.forEach((t=>t.apply(e)))}C("wordWrap",[[!0,"on"],[!1,"off"]]),C("lineNumbers",[[!0,"on"],[!1,"off"]]),C("cursorBlinking",[["visible","solid"]]),C("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),C("renderLineHighlight",[[!0,"line"],[!1,"none"]]),C("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),C("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),C("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),C("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),C("autoIndent",[[!1,"advanced"],[!0,"full"]]),C("matchBrackets",[[!0,"always"],[!1,"never"]]),C("renderFinalNewline",[[!0,"on"],[!1,"off"]]),C("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),C("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),C("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),w("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),"undefined"===typeof t("autoClosingQuotes")&&i("autoClosingQuotes","never"),"undefined"===typeof t("autoSurround")&&i("autoSurround","never"))})),w("renderIndentGuides",((e,t,i)=>{"undefined"!==typeof e&&(i("renderIndentGuides",void 0),"undefined"===typeof t("guides.indentation")&&i("guides.indentation",!!e))})),w("highlightActiveIndentGuide",((e,t,i)=>{"undefined"!==typeof e&&(i("highlightActiveIndentGuide",void 0),"undefined"===typeof t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const k={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};w("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"===typeof e){for(const n of Object.entries(k)){const o=e[n[0]];!1===o&&"undefined"===typeof t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1)}i("suggest.filteredTypes",void 0)}})),w("quickSuggestions",((e,t,i)=>{if("boolean"===typeof e){const t=e?"on":"off",n={comments:t,strings:t,other:t};i("quickSuggestions",n)}})),w("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"===typeof e&&(i("experimental.stickyScroll.enabled",void 0),"undefined"===typeof t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),w("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"===typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),"undefined"===typeof t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))})),w("codeActionsOnSave",((e,t,i)=>{if(e&&"object"===typeof e){let t=!1;const n={};for(const i of Object.entries(e))"boolean"===typeof i[1]?(t=!0,n[i[0]]=i[1]?"explicit":"never"):n[i[0]]=i[1];t&&i("codeActionsOnSave",n)}})),w("codeActionWidget.includeNearbyQuickfixes",((e,t,i)=>{"boolean"===typeof e&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),"undefined"===typeof t("codeActionWidget.includeNearbyQuickFixes")&&i("codeActionWidget.includeNearbyQuickFixes",e))})),w("lightbulb.enabled",((e,t,i)=>{"boolean"===typeof e&&i("lightbulb.enabled",e?void 0:"off")}));var x=i(3692),E=i(35011),L=i(17522),T=i(86817),I=i(17300),D=i(61979),R=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};let A=class extends u.jG{constructor(e,t,i,n,o){super(),this._accessibilityService=o,this._onDidChange=this._register(new d.vl),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new d.vl),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new E.n0,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new v.u(n,i.dimension)),this._targetWindowId=(0,l.zk)(n).vscodeWindowId,this._rawOptions=W(i),this._validatedOptions=B.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(L.D.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(x.M.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(b.T.onDidChange((()=>this._recomputeOptions()))),this._register(D.c.getInstance((0,l.zk)(n)).onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=B.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=T._8.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:x.M.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return B.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:P(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:p.Tc||p.gm,pixelRatio:D.c.getInstance((0,l.ZF)(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return b.T.readFontInfo((0,l.ZF)(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=W(e),i=B.applyUpdate(this._rawOptions,t);i&&(this._validatedOptions=B.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=O(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function O(e){let t=0;while(e)e=Math.floor(e/10),t++;return t||1}function P(){let e="";return p.nr||p.c8||(e+="no-user-select "),p.nr&&(e+="no-minimap-shadow ",e+="enable-user-select "),_.zx&&(e+="mac "),e}A=R([N(4,I.j)],A);class M{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class F{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class B{static validateOptions(e){const t=new M;for(const i of E.BE){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new F;for(const n of E.BE)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!==typeof e||"object"!==typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&f.aI(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!B._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of E.BE){const s=!B._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new E.lw(i):null}static applyUpdate(e,t){let i=!1;for(const n of E.BE)if(t.hasOwnProperty(n.name)){const o=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=o.newValue,i=i||o.didChange}return i}}function W(e){const t=m.Go(e);return S(t),t}var H=i(94728),V=i(76892),j=i(736),z=i(66621);class U extends u.jG{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=4&&3===e[0]&&8===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&8===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&6===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&9===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&5===e[0]}}class se{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(146),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(67),this.stickyTabStops=n.get(117),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return se.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount();let s,r=null,a=null;return i.afterLineNumber!==o&&(a=new Q.y(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new Q.y(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,de._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class ae extends re{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=q.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,i,n,o){super(e,t,i,n),this.hitTestResult=new J.d((()=>de.doHitTest(this._ctx,this))),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=o;const s=Boolean(this._eventTarget);this._useHitTestTarget=!s}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return oe.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.relativePos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};if(o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth){const r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),a=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber);return s.glyphMarginLane=a[Math.floor(o/e.lineHeight)],t.fulfillMargin(2,n,i.range,s)}return o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,s))}return null}static _hitTestViewLines(e,t){if(!oe.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new Q.y(1,1),le);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new Q.y(i,n),le)}if(oe.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=ce(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new Q.y(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=ce(t.mouseContentHorizontalOffset-n),s=new Q.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}const i=t.hitTestResult.value;return 1===i.type?de.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(oe.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Q.y(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(oe.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Q.y(i,n))}}return null}static _hitTestScrollbar(e,t){if(oe.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Q.y(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(146),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return de._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;const i=Math.round(e/t);return i+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const s=n.lineNumber,r=n.column,a=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>a){const e=ce(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const c=e.visibleRangeForPosition(s,r);if(!c)return t.fulfillUnknown(n);const d=c.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const u=[];if(u.push({offset:c.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&u.push({offset:t.left,column:r-1})}const h=e.viewModel.getLineMaxColumn(s);if(re.offset-t.offset));const g=t.pos.toClientCoordinates(l.zk(e.viewDomNode)),p=i.getBoundingClientRect(),f=p.left<=g.clientX&&g.clientX<=p.right;let m=null;for(let e=1;eo;if(!s){const i=Math.floor((n+o)/2);let s=t.pos.y+(i-t.mouseVerticalOffset);s<=t.editorPos.y&&(s=t.editorPos.y+1),s>=t.editorPos.y+t.editorPos.height&&(s=t.editorPos.y+t.editorPos.height-1);const r=new z.nz(t.pos.x,s),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(l.zk(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(l.zk(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=l.jG(e.viewDomNode);let n;if(n=i?"undefined"===typeof i.caretRangeFromPoint?ue(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new ee;const o=n.startContainer;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,i=t?t.parentNode:null,s=i?i.parentNode:null,r=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;return r===G.Gb.CLASS_NAME?K.createFromDOMInfo(e,t,n.startOffset):new ee(o.parentNode)}if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,i=t?t.parentNode:null,n=i&&i.nodeType===i.ELEMENT_NODE?i.className:null;return n===G.Gb.CLASS_NAME?K.createFromDOMInfo(e,o,o.textContent.length):new ee(o)}return new ee}static _doHitTestWithCaretPositionFromPoint(e,t){const i=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null,s=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;return s===G.Gb.CLASS_NAME?K.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new ee(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,o=t?t.parentNode:null,s=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(n===G.Gb.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return K.createFromDOMInfo(e,t,0)}else if(s===G.Gb.CLASS_NAME)return K.createFromDOMInfo(e,i.offsetNode,0)}return new ee(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),o=X.s.atomicPosition(i,e.column-1,n,2);return-1!==o?new Q.y(e.lineNumber,o+1):e}static doHitTest(e,t){let i=new ee;if("function"===typeof e.viewDomNode.ownerDocument.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(l.zk(e.viewDomNode)))),1===i.type){const t=e.viewModel.getInjectedTextAt(i.position),n=e.viewModel.normalizePosition(i.position,2);!t&&n.equals(i.position)||(i=new te(n,i.spanNode,t))}return i}}function ue(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){while(o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild)o=o.lastChild;const e=o.getBoundingClientRect(),i=l.zk(o),s=i.getComputedStyle(o,null).getPropertyValue("font-style"),r=i.getComputedStyle(o,null).getPropertyValue("font-variant"),a=i.getComputedStyle(o,null).getPropertyValue("font-weight"),c=i.getComputedStyle(o,null).getPropertyValue("font-size"),d=i.getComputedStyle(o,null).getPropertyValue("line-height"),u=i.getComputedStyle(o,null).getPropertyValue("font-family"),h=`${s} ${r} ${a} ${c}/${d} ${u}`,g=o.innerText;let p,f=e.left,m=0;if(t>e.left+e.width)m=g.length;else{const e=he.getInstance();for(let i=0;ithis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(146).height;const n=new z.$z(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=l.ko(this.viewHelper.viewDomNode.ownerDocument,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new z.dO(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let o=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{o=t}))),this._register(l.ko(this.viewHelper.viewDomNode,l.Bx.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,o)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=ve.QC.INSTANCE;let t=0,i=L.D.getZoomLevel(),n=!1,o=0;const s=s=>{if(this.viewController.emitMouseWheel(s),!this._context.configuration.options.get(76))return;const a=new me.$(s);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(r(s)){const e=L.D.getZoomLevel(),t=a.deltaY>0?1:-1;L.D.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=L.D.getZoomLevel(),n=r(s),o=0),t=Date.now(),o+=a.deltaY,n&&(L.D.setZoomLevel(i+o/5),a.preventDefault(),a.stopPropagation())};function r(e){return _.zx?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(l.ko(this.viewHelper.viewDomNode,l.Bx.MOUSE_WHEEL,s,{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(146)){const e=this._context.configuration.options.get(146).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new z.Hh(e,t),n=i.toPageCoordinates(l.zk(this.viewHelper.viewDomNode)),o=(0,z.wt)(this.viewHelper.viewDomNode);if(n.yo.y+o.height||n.xo.x+o.width)return null;const s=(0,z.i_)(this.viewHelper.viewDomNode,o,n);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o,n,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=l.jG(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){const t=this.mouseTargetFactory.mouseTargetIsWidget(e);if(t||e.preventDefault(),this._mouseDownOperation.isActive())return;const i=e.timestamp;i{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(n||s&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(o)e.preventDefault();else if(a){const n=i.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class ye extends u.jG{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=o,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new z.BA(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new we(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new Se,this._currentSelection=new _e.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const o=this._context.configuration.options;if(!o.get(92)&&o.get(35)&&!o.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);l.kx(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const s=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=se.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return ne.createOutsideEditor(o,e,"below",s)}const l=n.getLineNumberAtVerticalOffset(r);return ne.createOutsideEditor(o,new Q.y(l,i.getLineMaxColumn(l)),"below",s)}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const n=e.posx-t.x-t.width;return ne.createOutsideEditor(o,new Q.y(s,i.getLineMaxColumn(s)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t),o=n.position;if(!o)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return ne.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Q.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class we extends u.jG{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new Ce(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class Ce extends u.jG{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=o,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=l.PG(l.zk(s.browserEvent),(()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(67),t=this._context.configuration.options.get(146).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(67),t=this._getScrollSpeed(),i=this._tick(),n=t*(i/1e3)*e,o="above"===this._position.outsidePosition?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,o),this._viewHelper.renderNow();const s=this._context.viewLayout.getLinesViewportData(),r="above"===this._position.outsidePosition?s.startLineNumber:s.endLineNumber;let a;{const e=(0,z.wt)(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(146).horizontalScrollbarHeight,i=new z.nz(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=(0,z.i_)(this._viewHelper.viewDomNode,e,i);a=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}a.position&&a.position.lineNumber===r||(a="above"===this._position.outsidePosition?ne.createOutsideEditor(this._position.mouseColumn,new Q.y(r,1),"above",this._position.outsideDistance):ne.createOutsideEditor(this._position.mouseColumn,new Q.y(r,this._context.viewModel.getLineMaxColumn(r)),"below",this._position.outsideDistance)),this._dispatchMouse(a,!0,2),this._animationFrameDisposable=l.PG(l.zk(a.element),(()=>this._execute()))}}class Se{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>Se.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var ke=i(169);class xe extends be{constructor(e,t,i){super(e,t,i),this._register(pe.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Tap,(e=>this.onTap(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Change,(e=>this.onChange(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Contextmenu,(e=>this._onContextMenu(new z.dO(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(l.ko(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new z.DW(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){const i=this._createMouseTarget(new z.dO(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class Ee extends be{constructor(e,t,i){super(e,t,i),this._register(pe.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Tap,(e=>this.onTap(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Change,(e=>this.onChange(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,pe.B.Contextmenu,(e=>this._onContextMenu(new z.dO(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new z.dO(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(ke.$D.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class Le extends u.jG{constructor(e,t,i){super();const n=_.un||_.m0&&_.Fr;n&&ge.e.pointerEvents?this.handler=this._register(new xe(e,t,i)):fe.G.TouchEvent?this.handler=this._register(new Ee(e,t,i)):this.handler=this._register(new be(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Te=i(41337),Ie=i(20601),De=i(45436);class Re extends U{}var Ne=i(15911),Ae=i(52764);class Oe extends Re{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Q.y(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const t=e.get(68);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(96);const i=e.get(146);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Q.y(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}if(3===this._renderLineNumbers){if(this._lastCursorModelPosition.lineNumber===i)return String(i);if(i%10===0)return String(i);const e=this._context.viewModel.getLineCount();return i===e?String(i):""}return String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=_.j9?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter((e=>!!e.options.lineNumberClassName));o.sort(((e,t)=>Y.Q.compareRangesUsingEnds(e.range,t.range)));let s=0;const r=this._context.viewModel.getLineCount(),a=[];for(let e=i;e<=n;e++){const n=e-i;let l=this._getLineRenderLineNumber(e),c="";while(s${l}`):a[n]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,Ne.zy)(((e,t)=>{const i=e.getColor(Ae.Qt),n=e.getColor(Ae.JB);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));class Pe extends ${static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,V.Z)(document.createElement("div")),this._domNode.setClassName(Pe.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,V.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Pe.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}var Me=i(90385);const Fe="monaco-mouse-cursor-text";var Be=i(35350),We=i(85476),He=i(53790),Ve=i(13046),je=i(87778),ze=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ue=function(e,t){return function(i,n){t(i,n,e)}};class $e{constructor(e,t,i,n,o){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new Q.y(this.modelLineNumber,this.distanceToModelLineStart+1),i=new Q.y(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const qe=p.gm;let Ke=class extends ${constructor(e,t,i,n,o){super(e),this._keybindingService=n,this._instantiationService=o,this._primaryCursorPosition=new Q.y(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const s=this._context.configuration.options,r=s.get(146);this._setAccessibilityOptions(s),this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,this._contentHeight=r.height,this._fontInfo=s.get(50),this._lineHeight=s.get(67),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new _e.L(1,1,1,1)],this._modelSelections=[new _e.L(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,V.Z)(document.createElement("textarea")),q.write(this.textArea,7),this.textArea.setClassName(`inputarea ${Fe}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:a}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=a*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(125))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",Te.kg("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(92)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,V.Z)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const l={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},c={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,_.uF),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,o=Array.isArray(e)?e.join(t):e;let s,r=null;if(ke.Eq.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:o,html:s,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(_.zx&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new De._O(i,i.length,i.length,Y.Q.fromPositions(t),0)}const t=500;if(_.zx&&!e.isEmpty()&&l.getValueLengthInRange(e,0)0)return new De._O(i,n,n,Y.Q.fromPositions(t),0)}return De._O.EMPTY}return De.Al.fromEditorSelection(l,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},d=this._register(new ke.M0(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(ke.No,c,d,_.OS,{isAndroid:p.m0,isChrome:p.H8,isFirefox:p.gm,isSafari:p.nr})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i="undefined"!==typeof e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(De.Hf&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(De.Hf&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:o}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),o=e.substring(n+1),s=o.lastIndexOf("\t"),r=o.length-s-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),c=a.column-1-l,d=o.substring(0,o.length-l),{tabSize:u}=this._context.viewModel.model.getOptions(),h=Ge(this.textArea.domNode.ownerDocument,d,this._fontInfo,u);return{distanceToModelLineStart:c,widthOfHiddenTextBefore:h}})(),{distanceToModelLineEnd:s}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),o=-1===n?e:e.substring(0,n),s=o.indexOf("\t"),r=-1===s?o.length:o.length-s-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r),c=this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l;return{distanceToModelLineEnd:c}})();this._context.viewModel.revealRange("keyboard",!0,Y.Q.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new $e(this._context,i.startLineNumber,n,o,s),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Fe} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Fe}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(He.M.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=(0,Me.i)(t,[]);let o=!0,s=e.column,r=!0,a=e.column,l=0;while(l<50&&(o||r)){if(o&&s<=1&&(o=!1),o){const e=i.charCodeAt(s-2),t=n.get(e);0!==t?o=!1:s--}if(r&&a>i.length&&(r=!1),r){const e=i.charCodeAt(a-1),t=n.get(e);0!==t?r=!1:a++}l++}return[i.substring(s-1,a-1),e.column-s]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,Me.i)(this._context.configuration.options.get(132),[]);let n=e.column,o=0;while(n>1){const s=t.charCodeAt(n-2),r=i.get(s);if(0!==r||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber),i=t.charAt(e.column-2);if(!Ie.pc(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){const t=e.get(2);if(1===t){const e=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),t=this._keybindingService.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),i=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),n=Te.kg("accessibilityModeOff","The editor is not accessible at this time.");return e?Te.kg("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",n,e):t?Te.kg("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",n,t):i?Te.kg("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",n,i):n}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===E.qB.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(146),n=i.wrappingColumn;if(-1!==n&&1!==this._accessibilitySupport){const t=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=qe?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(67),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(125))),(e.hasChanged(34)||e.hasChanged(92))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options,t=!He.M.enabled||e.get(34)&&e.get(92);t?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new Q.y(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const o=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,s=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const c=this._context.viewModel.getViewLineData(i.lineNumber),d=c.tokens.findTokenIndexAtOffset(i.column-1),u=c.tokens.findTokenIndexAtOffset(n.column-1),h=d===u,g=this._visibleTextArea.definePresentation(h?c.tokens.getPresentation(d):null);this.textArea.domNode.scrollTop=s*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:o,left:a,width:l,height:this._lineHeight,useCover:!1,color:(Be.dG.getColorMap()||[])[g.foreground],italic:g.italic,bold:g.bold,underline:g.underline,strikethrough:g.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)this._renderAtTopLeft();else if(_.zx||2===this._accessibilitySupport){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:qe?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;do{if(i=e.indexOf("\n",i+1),-1===i)break;t++}while(1);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:qe?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;(0,g.M)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?We.Q1.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+Pe.OUTER_CLASS_NAME):0!==n.get(68).renderType?i.setClassName("monaco-editor-background textAreaCover "+Oe.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};function Ge(e,t,i,n){if(0===t.length)return 0;const o=e.createElement("div");o.style.position="absolute",o.style.top="-50000px",o.style.width="50000px";const s=e.createElement("span");(0,g.M)(s,i),s.style.whiteSpace="pre",s.style.tabSize=n*i.spaceWidth+"px",s.append(t),o.appendChild(s),e.body.appendChild(o);const r=s.offsetWidth;return o.remove(),r}Ke=ze([Ue(3,Ve.b),Ue(4,je._Y)],Ke);var Qe=i(95687),Ye=i(32378);class Ze{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ye.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Ye.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Ye.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ye.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ye.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Ye.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Ye.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Ye.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Ye.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Ye.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Ye.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Ye.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Ye.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Ye.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}var Xe=i(21776),Je=i(13647);class et{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new c.D7("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let o=0,s=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===s?(o=i,s=1):s++)}if(e=n&&t<=o&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o){const t=this._lines.splice(e-this._rendLineNumberStart,o-e+1);return t}const s=[];for(let e=0;ei)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class tt{constructor(e){this._lineFactory=e,this.domNode=this._createDomNode(),this._linesCollection=new et(this._lineFactory)}_createDomNode(){const e=(0,V.Z)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(146)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;ee})}constructor(e,t,i){this._domNode=e,this._lineFactory=t,this._viewportData=i}render(e,t,i,n){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1t){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1,n=t-e+1;n>0&&(this._removeLinesAfter(o,n),o.linesLength-=n)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=s+e;r[e].layoutLine(t,n[t-o],this._viewportData.lineHeight)}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this._lineFactory.createLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");it._ttPolicy&&(t=it._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;tnew ot(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options,i=t.get(50);(0,g.M)(this.domNode,i),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),o.appendString(s),o.appendString(""),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i))}}class st extends nt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class rt extends nt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,g.M)(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;(0,g.M)(this.domNode,t.get(50));const i=t.get(146);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class at{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return at.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),5!==i.type&&8!==i.type||(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new Q.y(e.afterLineNumber,1)).lineNumber}}}class lt extends ${constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,V.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const t=this._context.configuration.options,i=t.get(146),n=i.contentWidth-i.verticalScrollbarWidth;this.contentWidth!==n&&(this.contentWidth=n,e=!0);const o=i.contentLeft;return this.contentLeft!==o&&(this.contentLeft=o,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;const i=e.getDecorationsInViewport();for(const n of i){if(!n.options.blockClassName)continue;let i,o,s=this.blocks[t];s||(s=this.blocks[t]=(0,V.Z)(document.createElement("div")),this.domNode.appendChild(s)),n.options.blockIsAfterEnd?(i=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!1),o=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0)):(i=e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!0),o=n.range.isEmpty()&&!n.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0));const[r,a,l,c]=n.options.blockPadding??[0,0,0,0];s.setClassName("blockDecorations-block "+n.options.blockClassName),s.setLeft(this.contentLeft-c),s.setWidth(this.contentWidth+c+a),s.setTop(i-e.scrollTop-r),s.setHeight(o-i+r+l),t++}for(let e=t;e0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const o=e.top,s=o,r=e.top+e.height,a=n.viewportHeight-r,l=o-i,c=s>=i,d=r,u=a>=i;let h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),ha){const e=d-(a-n);d-=e,i-=e}if(d=f,v=u+i<=h.height-m;return this._fixedOverflowWidgets?{fitsAbove:_,aboveTop:Math.max(d,f),fitsBelow:v,belowTop:u,left:p}:{fitsAbove:_,aboveTop:o,fitsBelow:v,belowTop:s,left:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new ht(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){const t=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),i=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,n=o(i,this._affinity,this._lineHeight);return{primary:t,secondary:n};function o(t,i,n){if(!t)return null;const o=e.visibleRangeForPosition(t);if(!o)return null;const s=1===t.column&&3===i?0:o.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new gt(r,s,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let o=t.left;return o=oe.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||"offViewport"===this._renderData.kind)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,"offViewport"===this._renderData?.kind&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),void("function"===typeof this._actual.afterRender&&pt(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"===typeof this._actual.afterRender&&pt(this._actual.afterRender,this._actual,this._renderData.position)}}class ut{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class ht{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class gt{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function pt(e,t,...i){try{return e.call(t,...i)}catch{return null}}var ft=i(1474);class mt extends Re{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(146);this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new _e.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=new Set;for(const e of this._selections)t.add(e.positionLineNumber);const i=Array.from(t);i.sort(((e,t)=>e-t)),f.aI(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let e=t;e<=i;e++){const i=e-t;n[i]=""}if(this._wordWrap){const o=this._renderOne(e,!1);for(const e of this._cursorLineNumbers){const s=this._context.viewModel.coordinatesConverter,r=s.convertViewPositionToModelPosition(new Q.y(e,1)).lineNumber,a=s.convertModelPositionToViewPosition(new Q.y(r,1)).lineNumber,l=s.convertModelPositionToViewPosition(new Q.y(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,c=Math.max(a,t),d=Math.min(l,i);for(let e=c;e<=d;e++){const i=e-t;n[i]=o}}}const o=this._renderOne(e,!0);for(const e of this._cursorLineNumbers){if(ei)continue;const s=e-t;n[s]=o}this._renderData=n}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class _t extends mt{_renderOne(e,t){const i="current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(t?" current-line-exact":"");return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class vt extends mt{_renderOne(e,t){const i="current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&t?" current-line-exact-margin":"");return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,Ne.zy)(((e,t)=>{const i=e.getColor(Ae.kG);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Ae.Mf)){const i=e.getColor(Ae.Mf);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),(0,ft.Bb)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}));class bt extends Re{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:Y.Q.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let e=o;e<=s;e++){const t=e-o;r[t]=""}this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let e=0,s=t.length;e',a=Math.max(s.range.startLineNumber,n),l=Math.min(s.range.endLineNumber,o);for(let e=a;e<=l;e++){const t=e-n;i[t]+=r}}}_renderNormalDecorations(e,t,i){const n=e.visibleRange.startLineNumber;let o=null,s=!1,r=null,a=!1;for(let l=0,c=t.length;l';r[l]+=c}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class yt extends ${constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(104),r=o.get(75),a=o.get(40),c=o.get(107),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,Ne.Pz)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:c,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new ve.oO(t.domNode,d,this._context.viewLayout.getScrollable())),q.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,V.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const u=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(l.ko(i.domNode,"scroll",(e=>u(i.domNode,!0,!0)))),this._register(l.ko(t.domNode,"scroll",(e=>u(t.domNode,!0,!1)))),this._register(l.ko(n.domNode,"scroll",(e=>u(n.domNode,!0,!1)))),this._register(l.ko(this.scrollbarDomNode.domNode,"scroll",(e=>u(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(146);this.scrollbarDomNode.setLeft(t.contentLeft);const i=e.get(73),n=i.side;"right"===n?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(104)||e.hasChanged(75)||e.hasChanged(40)){const e=this._context.configuration.options,t=e.get(104),i=e.get(75),n=e.get(40),o=e.get(107),s={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(146)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,Ne.Pz)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}var wt=i(9322);class Ct{constructor(e,t,i,n,o){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=o??0}}class St{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class kt{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class xt extends Re{_render(e,t,i){const n=[];for(let i=e;i<=t;i++){const t=i-e;n[t]=new kt}if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.classNamen)continue;const a=Math.max(s,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Q.y(a,0)),c=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(e.preference.lane);t.push(new Tt(a,c,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.laneIndex===t.laneIndex?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className0){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex));if(!n||0===n.length)break;const o=n[0];if(0===o.type){const e=[];for(const t of n){if(t.zIndex!==o.zIndex||t.type!==o.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(o.accept(e.join(" ")))}else o.widget.renderInfo={lineNumber:o.lineNumber,laneIndex:o.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");while(this._managedDomNodes.length>0){const e=this._managedDomNodes.pop();e?.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],o=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(o),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;ithis._decorationGlyphsToRender.length){const e=this._managedDomNodes.pop();e?.domNode.remove()}}}class Lt{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new It(this.lineNumber,this.laneIndex,e)}}class Tt{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class It{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}var Dt=i(50322),Rt=i(26783),Nt=i(26530);class At extends Re{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(147),n=t.get(50);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(147),n=t.get(50);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){const t=e.selections[0],i=t.getPosition();return!this._primaryPosition?.equals(i)&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.scrollWidth,o=this._primaryPosition,s=this.getGuidesByLine(t,Math.min(i+1,this._context.viewModel.getLineCount()),o),r=[];for(let o=t;o<=i;o++){const i=o-t,a=s[i];let l="";const c=e.visibleRangeForPosition(new Q.y(o,1))?.left??0;for(const t of a){const i=-1===t.column?c+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new Q.y(o,t.column)).left;if(i>n||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const s=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(e.visibleRangeForPosition(new Q.y(o,t.horizontalLine.endColumn))?.left??i+this._spaceWidth)-i:this._spaceWidth;l+=`
    `}r[i]=l}this._renderResult=r}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?Nt.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?Nt.N6.EnabledForActive:Nt.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let s=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);s=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let i=e;i<=t;i++){const t=new Array;c.push(t);const d=n?n[i-e]:[],u=new f.j3(d),h=o?o[i-e]:0;for(let e=1;e<=h;e++){const n=(e-1)*l+1,o=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===d.length)&&s<=i&&i<=r&&e===a;t.push(...u.takeWhile((e=>e.visibleColumn!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Ot(e){if(!e||!e.isTransparent())return e}(0,Ne.zy)(((e,t)=>{const i=[{bracketColor:Ae.sN,guideColor:Ae.n4,guideColorActive:Ae.bB},{bracketColor:Ae.lQ,guideColor:Ae.I2,guideColorActive:Ae.WS},{bracketColor:Ae.ss,guideColor:Ae.Bo,guideColorActive:Ae.Pe},{bracketColor:Ae.l5,guideColor:Ae.If,guideColorActive:Ae.WD},{bracketColor:Ae.sH,guideColor:Ae.BD,guideColorActive:Ae.P1},{bracketColor:Ae.zp,guideColor:Ae.IW,guideColorActive:Ae.WY}],n=new Rt.k,o=[{indentColor:Ae.vV,indentColorActive:Ae.H0},{indentColor:Ae.ob,indentColorActive:Ae.Am},{indentColor:Ae.hz,indentColorActive:Ae.tK},{indentColor:Ae.ow,indentColorActive:Ae.A3},{indentColor:Ae.vP,indentColorActive:Ae.tp},{indentColor:Ae.CM,indentColorActive:Ae.As}],s=i.map((t=>{const i=e.getColor(t.bracketColor),n=e.getColor(t.guideColor),o=e.getColor(t.guideColorActive),s=Ot(Ot(n)??i?.transparent(.3)),r=Ot(Ot(o)??i);if(s&&r)return{guideColor:s,guideColorActive:r}})).filter(Dt.O9),r=o.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),o=Ot(i),s=Ot(n);if(o&&s)return{indentColor:o,indentColorActive:s}})).filter(Dt.O9);if(s.length>0){for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));var Pt=i(9659);class Mt{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class Ft{constructor(){this._currentVisibleRange=new Y.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Bt{constructor(e,t,i,n,o,s,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Wt{constructor(e,t,i,n,o){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=o,this.type="selections";let s=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;enew G.Gb(this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,q.write(this.domNode,8),this.domNode.setClassName(`view-lines ${Fe}`),(0,g.M)(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Pt.uC((()=>{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new Pt.uC((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new Ft,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(116).enabled,this._maxNumberStickyLines=n.get(116).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(147)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(147);return this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(101),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(116).enabled,this._maxNumberStickyLines=t.get(116).maxLineCount,(0,g.M)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(146)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new G.Ax(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++){const e=this._visibleLines.getVisibleLine(t);e.onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Bt(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Wt(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop),o=n<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,o),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new Q.y(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(ns)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri)return-1;const n=new Mt(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=Y.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const o=[];let s=0;const r=new Mt(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Q.y(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ec)continue;const d=e===n.startLineNumber?n.startColumn:1,u=e!==n.endLineNumber,h=u?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,h,r);if(g){if(t&&ethis._visibleLines.getEndLineNumber())return null;const n=new Mt(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Qe.qN(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):o=!1}return o&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++){const t=this._visibleLines.getVisibleLine(e);t.onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),_.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){const e=this._visibleLines.getVisibleLine(i);if(e.needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=o[0].startLineNumber,t=o[0].endLineNumber;for(let i=1,n=o.length;ia){if(!c)return-1;g=d}else if(5===s||6===s)if(6===s&&r<=d&&u<=l)g=r;else{const e=Math.max(5*this._lineHeight,.2*a),t=d-e,i=u-a;g=Math.max(i,t)}else if(1===s||2===s)if(2===s&&r<=d&&u<=l)g=r;else{const e=(d+u)/2;g=Math.max(0,e-a/2)}else g=this._computeMinimumScrolling(r,l,d,u,3===s,4===s);return g}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(146),n=t.left,o=n+t.width-i.verticalScrollbarWidth;let s=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)s=Math.min(s,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)s=Math.min(s,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}if(e.minimalReveal||(s=Math.max(0,s-Ht.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-s>t.width)return null;const a=this._computeMinimumScrolling(n,o,s,r);return{scrollLeft:a,maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,s){e|=0,t|=0,i|=0,n|=0,o=!!o,s=!!s;const r=t-e,a=n-i;return at?Math.max(0,n-r):e:i}}class Vt extends xt{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(146);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e',a=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i].getDecorations();let s="";for(const e of o){let t='
    ';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var zt=i(80125);class Ut{static{this.Empty=new Ut(0,0,0,0)}constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Ut._clamp(e),this.g=Ut._clamp(t),this.b=Ut._clamp(i),this.a=Ut._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}class $t extends u.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,u.lC)(new $t)),this._INSTANCE}constructor(){super(),this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Be.dG.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=Be.dG.getColorMap();if(!e)return this._colors=[Ut.Empty],void(this._backgroundIsLight=!0);this._colors=[Ut.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}var qt=i(90765),Kt=i(66344);const Gt=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})(),Qt=(e,t)=>(e-=32,e<0||e>96?t<=2?(e+96)%96:95:e);var Yt=i(62647);class Zt{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Zt.soften(e,.8),this.charDataLight=Zt.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=c?this.charDataLight:this.charDataNormal,f=Qt(n,l),m=4*e.width,_=r.r,v=r.g,b=r.b,y=o.r-_,w=o.g-v,C=o.b-b,S=Math.max(s,a),k=e.data;let x=f*u*h,E=i*m+4*t;for(let e=0;ee.width||i+d>e.height)return void console.warn("bad render request outside image data");const u=4*e.width,h=o/255*.5,g=s.r,p=s.g,f=s.b,m=n.r-g,_=n.g-p,v=n.b-f,b=g+m*h,y=p+_*h,w=f+v*h,C=Math.max(o,r),S=e.data;let k=i*u+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=Jt[e[i]]<<4|15&Jt[e[i+1]];return t},ti={1:(0,Xt.P)((()=>ei("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,Xt.P)((()=>ei("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class ii{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=ti[e]?new Zt(ti[e](),e):ii.createFromSampleData(ii.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of Gt)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){const i=61440;if(e.length!==i)throw new Error("Unexpected source in MinimapCharRenderer");const n=ii._downsample(e,t);return new Zt(n,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;tii.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=ai._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=ai._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(Kt.ILr);return i?new Ut(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Kt.K1Z);return t?Ut._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){const i=e.getColor(Kt.By2);return i?new Ut(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class li{constructor(e,t,i,n,o,s,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,o,s,r,a,l,c,d){const u=e.pixelRatio,h=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/h),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,o-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(c-o),d=l*s,u=n>0,h=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new li(l,c,u,s,d,i,g,1,Math.min(r,h))}let f;if(s&&i!==r){const e=i-t+1;f=Math.floor(e*h/u)}else{const e=o/p;f=Math.floor(e*h/u)}const m=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=o/p;v=Math.max(v,e-1)}if(v>0){const e=o/p;_=(m+r+v-e-1)*h/u}else _=Math.max(0,(m+r)*h/u-f);_=Math.min(e.minimapHeight-f,_);const b=_/(c-o),y=l*b;if(g>=m+r+v){const e=_>0;return new li(l,c,e,b,y,f,m,1,r)}{let i,o;i=t>1?t+m:Math.max(1,l/p);let s=Math.max(1,Math.floor(i-y*u/h));sl&&(s=Math.min(s,d.startLineNumber),o=Math.max(o,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?(t-s+o+_)*h/u:l/e.paddingTop*(o+_)*h/u,new li(l,c,!0,b,v,f,o,s,a)}}}class ci{static{this.INVALID=new ci(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class di{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new et({createLine:()=>ci.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get(),i=t.lines;for(let e=0,t=i.length;e1){for(let t=0,i=n-1;t0&&this.minimapLines[i-1]>=e)i--;let n=this.modelLineToMinimapLine(t)-1;while(n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0;o--){if(this.minimapLines[o]=0;i--){if(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=hi.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let o=0,s=t-e+1;o!e.options.minimap?.sectionHeaderStyle));if(this._samplingState){const e=[];for(const t of i){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),o=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new qt.vo(new Y.Q(n,i.startColumn,o,i.endColumn),t.options))}return e}return i}getSectionHeaderDecorationsInViewport(e,t){const i=this.options.minimapLineHeight,n=this.options.sectionHeaderFontSize,o=n/i;return e=Math.floor(Math.max(1,e-o)),this._getMinimapDecorationsInViewport(e,t).filter((e=>!!e.options.minimap?.sectionHeaderStyle))}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new Y.Q(n,1,o,this._context.viewModel.getLineMaxColumn(o))}else i=new Y.Q(e,1,t,this._context.viewModel.getLineMaxColumn(t));return this._context.viewModel.getMinimapDecorationsInRange(i)}getSectionHeaderText(e,t){const i=e.options.minimap?.sectionHeaderText;if(!i)return null;const n=this._sectionHeaderCache.get(i);if(n)return n;const o=t(i);return this._sectionHeaderCache.set(i,o),o}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new Y.Q(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class pi extends u.jG{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Kt.yr0),this._domNode=(0,V.Z)(document.createElement("div")),q.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,V.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,V.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,V.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,V.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,V.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=l.b2(this._domNode.domNode,l.Bx.POINTER_DOWN,(e=>{e.preventDefault();const t=this._model.options.renderMinimap;if(0===t)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=l.BK(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const i=this._model.options.minimapLineHeight,n=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY,o=Math.floor(n/i);let s=o+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;s=Math.min(s,this._model.getLineCount()),this._model.revealLineNumber(s)})),this._sliderPointerMoveMonitor=new zt._,this._sliderPointerDownListener=l.b2(this._slider.domNode,l.Bx.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=pe.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=l.ko(this._domNode.domNode,pe.B.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=l.ko(this._domNode.domNode,pe.B.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=l.b2(this._domNode.domNode,pe.B.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const o=(e,o)=>{const s=l.BK(this._domNode.domNode),r=Math.min(Math.abs(o-n),Math.abs(o-s.left),Math.abs(o-s.left-s.width));if(_.uF&&r>si)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&o(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>o(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new ui(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Kt.yr0),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){const t=this._model.options.renderMinimap;if(0===t)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=li.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(Y.Q.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new fi(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,s),this._renderDecorationsLineHighlights(l,i,c,e,s);const d=new fi(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,s,a,r,n),this._renderDecorationsHighlights(l,i,d,e,s,a,r,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,c]=t;for(let e=l;e<=c;e++)i.set(e,!0);const d=n.getYForLineNumber(l,o),u=n.getYForLineNumber(c,o);r>=d||(r>s&&e.fillRect(E.xq,s,e.canvas.width,r-s),s=d),r=u}r>s&&e.fillRect(E.xq,s,e.canvas.width,r-s)}_renderDecorationsLineHighlights(e,t,i,n,o){const s=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||1!==l.position)continue;const c=n.intersectWithViewport(a.range);if(!c)continue;const[d,u]=c,h=l.getColor(this._theme.value);if(!h||h.isTransparent())continue;let g=s.get(h.toString());g||(g=h.transparent(.5).toString(),s.set(h.toString(),g)),e.fillStyle=g;for(let t=d;t<=u;t++){if(i.has(t))continue;i.set(t,!0);const s=n.getYForLineNumber(d,o);e.fillRect(E.xq,s,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,s,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[c,d]=t;for(let t=c;t<=d;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,o,o,s,r,a)}}_renderDecorationsHighlights(e,t,i,n,o,s,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=n.intersectWithViewport(l.range);if(!c)continue;const[d,u]=c,h=t.getColor(this._theme.value);if(h&&!h.isTransparent())for(let c=d;c<=u;c++)switch(t.position){case 1:this.renderDecorationOnLine(e,i,l.range,h,n,c,o,o,s,r,a);continue;case 2:{const t=n.getYForLineNumber(c,o),i=2;this.renderDecoration(e,h,i,t,ri,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,c,d){const u=o.getYForLineNumber(s,a);if(u+r<0||u>this._model.options.canvasInnerHeight)return;const{startLineNumber:h,endLineNumber:g}=i,p=h===s?i.startColumn:1,f=g===s?i.endColumn:this._model.getLineMaxColumn(s),m=this.getXOffsetForPosition(t,s,p,l,c,d),_=this.getXOffsetForPosition(t,s,f,l,c,d);this.renderDecoration(e,n,m,u,_-m,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return E.xq;const r=(i-1)*o;if(r>=s)return s;let a=e.get(t);if(!a){const i=this._model.getLineContent(t);a=[E.xq];let r=E.xq;for(let e=1;e=s){a[e]=s;break}a[e]=c,r=c}e.set(t,a)}return i-1e.range.startLineNumber-t.range.startLineNumber));const g=pi._fitSectionHeader.bind(null,u,s-E.xq);for(const n of h){const r=e.getYForLineNumber(n.range.startLineNumber,t)+i,l=r-i,d=l+2,h=this._model.getSectionHeaderText(n,g);pi._renderSectionLabel(u,h,2===n.options.minimap?.sectionHeaderStyle,a,c,s,l,o,r,d)}}static _fitSectionHeader(e,t,i){if(!i)return i;const n="…",o=e.measureText(i).width,s=e.measureText(n).width;if(o<=t||o<=s)return i;const r=i.length,a=o/i.length,l=Math.floor((t-s)/a)-1;let c=Math.ceil(l/2);while(c>0&&/\s/.test(i[c-1]))--c;return i.substring(0,c)+n+i.substring(r-(l-c))}static _renderSectionLabel(e,t,i,n,o,s,r,a,l,c){t&&(e.fillStyle=n,e.fillRect(0,r,s,a),e.fillStyle=o,e.fillText(t,E.xq,l)),i&&(e.beginPath(),e.moveTo(0,c),e.lineTo(s,c),e.closePath(),e.stroke())}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new di(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;const[s,r,a]=pi._renderUntouchedLines(o,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,u=this._model.options.backgroundColor,h=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),f=this._model.options.renderMinimap,m=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=1===f?2:3,y=b*_,w=n>y?Math.floor((n-y)/2):0,C=u.a/255,S=new Ut(Math.round((u.r-d.r)*C+d.r),Math.round((u.g-d.g)*C+d.g),Math.round((u.b-d.b)*C+d.b),255);let k=e.topPaddingLineCount*n;const x=[];for(let e=0,s=i-t+1;e=0&&n_)return;const r=f.charCodeAt(y);if(9===r){const e=u-(y+w)%u;w+=e-1,b+=e*s}else if(32===r)b+=s;else{const u=Ie.ne(r)?2:1;for(let h=0;h_)return}}}}}class fi{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;ethis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class mi extends ${constructor(e,t){super(e),this._viewDomNode=t;const i=this._context.configuration.options,n=i.get(146);this._widgets={},this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,V.Z)(document.createElement("div")),q.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,V.Z)(document.createElement("div")),q.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=(0,V.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()],n=t?t.preference:null,o=t?.stackOridinal;return i.preference===n&&i.stack===o?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=o,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t],i=e.domNode.domNode;delete this._widgets[t],i.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0;const t=Object.keys(this._widgets);for(let i=0,n=t.length;i0));t.sort(((e,t)=>(this._widgets[e].stack||0)-(this._widgets[t].stack||0)));for(let e=0,n=t.length;e=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e,r=s+t,a=s+t+o;return[[0,s,r,s,a,s,r,s],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t,o=e,s=o+t;return[[0,o,o,o,s,o,o,o],[0,t,t,t,i,t+i,t+i,t+i]]}{const t=e,i=n;return[[0,t,t,t,t,t,t,t],[0,i,i,i,i,i,i,i]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&We.Q1.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class vi extends ${constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,V.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Be.dG.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[{position:new Q.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new _i(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t1&&(n=0===t?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort(((e,t)=>Q.y.compare(e.position,t.position))),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return!!e.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return!!e.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes)return this._domNode.setBackgroundColor(e?We.Q1.Format.CSS.formatHexA(e):""),void this._domNode.setDisplay("none");const t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(qt.Uv.compareByRenderingProps),1!==this._actualShouldRender||qt.Uv.equalsArr(this._renderedDecorations,t)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,f.aI)(this._renderedCursorPositions,this._cursorPositions,((e,t)=>e.position.lineNumber===t.position.lineNumber&&e.color===t.color))||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,o=this._settings.lineHeight,s=this._context.viewLayout,r=this._context.viewLayout.getScrollHeight(),a=n/r,l=6*this._settings.pixelRatio|0,c=l/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=We.Q1.Format.CSS.formatHexA(e),d.fillRect(0,0,i,n)):(d.clearRect(0,0,i,n),d.fillStyle=We.Q1.Format.CSS.formatHexA(e),d.fillRect(0,0,i,n)):d.clearRect(0,0,i,n);const u=this._settings.x,h=this._settings.w;for(const e of t){const t=e.color,i=e.data;d.fillStyle=t;let r=0,g=0,p=0;for(let e=0,t=i.length/3;en&&(e=n-c),_=e-c,v=e+c}_>p+1||t!==r?(0!==e&&d.fillRect(u[r],g,h[r],p-g),r=t,g=_,p=v):v>p&&(p=v)}d.fillRect(u[r],g,h[r],p-g)}if(!this._settings.hideCursor){const e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],o=this._settings.w[7];let r=-100,l=-100,c=null;for(let u=0,h=this._cursorPositions.length;un&&(p=n-t);const f=p-t,m=f+e;f>l+1||h!==c?(0!==u&&c&&d.fillRect(i,r,o,l-r),r=f,l=m):m>l&&(l=m),c=h,d.fillStyle=h}c&&d.fillRect(i,r,o,l-r)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,n),d.moveTo(1,0),d.lineTo(i,0),d.stroke())}}var bi,yi=i(21934);class wi extends U{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,V.Z)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new yi.rW((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(67)),this._zoneManager.setPixelRatio(i.get(144)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(t.get(67)),this._render()),e.hasChanged(144)&&(this._zoneManager.setPixelRatio(t.get(144)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=c):r>=l?r=Math.max(r,c):(e.fillRect(0,s,n,r-s),s=l,r=c)}e.fillRect(0,s,n,r-s)}}class Ci extends ${constructor(e){super(e),this.domNode=(0,V.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0){const e=(0,V.Z)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;while(i>0){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options,t=e.get(146);0===t.minimap.renderMinimap||t.minimap.minimapWidth>0&&0===t.minimap.minimapLeft?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(104);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class ki{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class xi{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Ei(e){return new ki(e)}function Li(e){return new xi(e.lineNumber,e.ranges.map(Ei))}class Ti extends Re{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;Ii(a-i)i&&(c.top=1),Ii(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=n[0].lineNumber,r=n[n.length-1].lineNumber;for(let a=0,l=n.length;a1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Ii(e){return e<0?-e:e}(0,Ne.zy)(((e,t)=>{const i=e.getColor(Kt.rm4);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));class Di{constructor(e,t,i,n,o,s,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=o,this.textContent=s,this.textContentClassName=r}}(function(e){e[e["Single"]=0]="Single",e[e["MultiPrimary"]=1]="MultiPrimary",e[e["MultiSecondary"]=2]="MultiSecondary"})(bi||(bi={}));class Ri{constructor(e,t){this._context=e;const i=this._context.configuration.options,n=i.get(50);this._cursorStyle=i.get(28),this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,V.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${Fe}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,g.M)(this._domNode,n),this._domNode.setDisplay("none"),this._position=new Q.y(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case bi.Single:this._pluralityClass="";break;case bi.MultiPrimary:this._pluralityClass="cursor-primary";break;case bi.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),(0,g.M)(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,o]=Ie.m(i,t-1);return[new Q.y(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="",i="";const[n,o]=this._getGraphemeAwarePosition();if(this._cursorStyle===E.m9.Line||this._cursorStyle===E.m9.LineThin){const s=e.visibleRangeForPosition(n);if(!s||s.outsideRenderedLine)return null;const r=l.zk(this._domNode.domNode);let a;this._cursorStyle===E.m9.Line?(a=l.vT(r,this._lineCursorWidth>0?this._lineCursorWidth:2),a>2&&(t=o,i=this._getTokenClassName(n))):a=l.vT(r,1);let c=s.left,d=0;a>=2&&c>=1&&(d=1,c-=d);const u=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new Di(u,c,d,a,this._lineHeight,t,i)}const s=e.linesVisibleRangesForRange(new Y.Q(n.lineNumber,n.column,n.lineNumber,n.column+o.length),!1);if(!s||0===s.length)return null;const r=s[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],c="\t"===o||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===E.m9.Block&&(t=o,i=this._getTokenClassName(n));let d=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return this._cursorStyle!==E.m9.Underline&&this._cursorStyle!==E.m9.UnderlineThin||(d+=this._lineHeight-2,u=2),new Di(d,a.left,0,c,u,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${Fe} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class Ni extends ${static{this.BLINK_INTERVAL=500}constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Ri(this._context,bi.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,V.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Pt.pc,this._cursorFlatBlinkInterval=new l.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),Ni.BLINK_INTERVAL,(0,l.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),Ni.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case E.m9.Line:e+=" cursor-line-style";break;case E.m9.Block:e+=" cursor-block-style";break;case E.m9.Underline:e+=" cursor-underline-style";break;case E.m9.LineThin:e+=" cursor-line-thin-style";break;case E.m9.BlockOutline:e+=" cursor-block-outline-style";break;case E.m9.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=[{class:".cursor",foreground:Ae.D0,background:Ae.kM},{class:".cursor-primary",foreground:Ae.sC,background:Ae.je},{class:".cursor-secondary",foreground:Ae.we,background:Ae.L0}];for(const n of i){const i=e.getColor(n.foreground);if(i){let o=e.getColor(n.background);o||(o=i.opposite()),t.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${i}; border-color: ${i}; color: ${o}; }`),(0,ft.Bb)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${o}; border-right: 1px solid ${o}; }`)}}}));const Ai=()=>{throw new Error("Invalid change accessor")};class Oi extends ${constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._lineHeight=t.get(67),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,V.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,V.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};Pi(e,n),n.addZone=Ai,n.removeZone=Ai,n.layoutZone=Ai})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n=e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),o={whitespaceId:n,delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,V.Z)(t.domNode),marginDomNode:t.marginDomNode?(0,V.Z)(t.marginDomNode):null};return this._safeCallOnComputedHeight(o.delegate,i.heightInPx),o.domNode.setPosition("absolute"),o.domNode.domNode.style.width="100%",o.domNode.setDisplay("none"),o.domNode.setAttribute("monaco-view-zone",o.whitespaceId),this.domNode.appendChild(o.domNode),o.marginDomNode&&(o.marginDomNode.setPosition("absolute"),o.marginDomNode.domNode.style.width="100%",o.marginDomNode.setDisplay("none"),o.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId),this.marginDomNode.appendChild(o.marginDomNode)),this._zones[o.whitespaceId]=o,this.setShouldRender(),o.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"===typeof e.heightInPx?e.heightInPx:"number"===typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"===typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"===typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,c.dz)(e)}}_safeCallOnDomNodeTop(e,t){if("function"===typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,c.dz)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const o=Object.keys(this._zones);for(let t=0,n=o.length;tt)continue;const e=i.startLineNumber===t?i.startColumn:n.minColumn,s=i.endLineNumber===t?i.endColumn:n.maxColumn;e=x.endOffset&&(k++,x=i&&i[k]),9!==o&&32!==o)continue;if(u&&!C&&n<=y)continue;if(d&&n>=S&&n<=y&&32===o){const e=n-1>=0?r.charCodeAt(n-1):0,t=n+1=0?r.charCodeAt(n-1):0,t=32===o&&32!==e&&9!==e;if(t)continue}if(i&&(!x||x.startOffset>n||x.endOffset<=n))continue;const c=e.visibleRangeForPosition(new Q.y(t,n+1));c&&(s?(E=Math.max(E,c.left),w+=9===o?this._renderArrow(h,f,c.left):``):w+=9===o?`
    ${b?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:`
    ${String.fromCharCode(v)}
    `)}return s?(E=Math.round(E+f),``+w+""):w}_renderArrow(e,t,i){const n=t/7,o=t,s=e/2,r=i,a={x:0,y:n/2},l={x:.8*o,y:a.y},c={x:l.x-.2*l.x,y:l.y+.2*l.x},d={x:c.x+.1*l.x,y:c.y+.1*l.x},u={x:d.x+.35*l.x,y:d.y-.35*l.x},h={x:u.x,y:-u.y},g={x:d.x,y:-d.y},p={x:c.x,y:-c.y},f={x:l.x,y:-l.y},m={x:a.x,y:-a.y},_=[a,l,c,d,u,h,g,p,f,m],v=_.map((e=>`${(r+e.x).toFixed(2)} ${(s+e.y).toFixed(2)}`)).join(" L ");return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Bi{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(100),this.renderWithSVG=!0):(this.renderWhitespace=t.get(100),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(67),this.stopRenderingLineAfter=t.get(118)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class Wi{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.lineHeight=0|t.lineHeight,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new Y.Q(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Hi{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class Vi{constructor(e,t,i){this.configuration=e,this.theme=new Hi(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}var ji=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},zi=function(e,t){return function(i,n){t(i,n,e)}};let Ui=class extends U{constructor(e,t,i,n,o,s,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new _e.L(1,1,1,1)],this._renderAnimationFrame=null;const a=new Ze(t,n,o,e);this._context=new Vi(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(Ke,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,V.Z)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,V.Z)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,V.Z)(document.createElement("div")),q.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new yt(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Ht(this._context,this._linesContent),this._viewZones=new Oi(this._context),this._viewParts.push(this._viewZones);const l=new vi(this._context);this._viewParts.push(l);const c=new Si(this._context);this._viewParts.push(c);const d=new st(this._context);this._viewParts.push(d),d.addDynamicOverlay(new _t(this._context)),d.addDynamicOverlay(new Ti(this._context)),d.addDynamicOverlay(new At(this._context)),d.addDynamicOverlay(new bt(this._context)),d.addDynamicOverlay(new Fi(this._context));const u=new rt(this._context);this._viewParts.push(u),u.addDynamicOverlay(new vt(this._context)),u.addDynamicOverlay(new jt(this._context)),u.addDynamicOverlay(new Vt(this._context)),u.addDynamicOverlay(new Oe(this._context)),this._glyphMarginWidgets=new Et(this._context),this._viewParts.push(this._glyphMarginWidgets);const h=new Pe(this._context);h.getDomNode().appendChild(this._viewZones.marginDomNode),h.getDomNode().appendChild(u.getDomNode()),h.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(h),this._contentWidgets=new ct(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Ni(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new mi(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const g=new Ci(this._context);this._viewParts.push(g);const p=new lt(this._context);this._viewParts.push(p);const f=new gi(this._context);if(this._viewParts.push(f),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new Le(this._context,a,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes;let i=[],n=0;i=i.concat(e.getAllMarginDecorations().map((e=>{const t=e.options.glyphMargin?.position??wt.ZS.Center;return n=Math.max(n,e.range.endLineNumber),{range:e.range,lane:t,persist:e.options.glyphMargin?.persistLane}}))),i=i.concat(this._glyphMarginWidgets.getWidgets().map((t=>{const i=e.validateRange(t.preference.range);return n=Math.max(n,i.endLineNumber),{range:i,lane:t.preference.lane}}))),i.sort(((e,t)=>Y.Q.compareRangesUsingStarts(e.range,t.range))),t.reset(n);for(const e of i)t.push(e.lane,e.range,e.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new ie(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Q.y(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options,t=e.get(146);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(143)+" "+(0,Ne.Pz)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new c.D7;if(null===this._renderAnimationFrame){const e=this._createCoordinatedRendering();this._renderAnimationFrame=qi.INSTANCE.scheduleCoordinatedRendering({window:l.zk(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new c.D7;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new c.D7;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new c.D7;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new c.D7;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();$i((()=>e.prepareRenderText()));const t=$i((()=>e.renderText()));if(t){const[i,n]=t;$i((()=>e.prepareRender(i,n))),$i((()=>e.render(i,n)))}}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}j.p.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new Wi(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new Qe.eh(this._context.viewLayout,i,this._viewLines)]},prepareRender:(e,t)=>{for(const i of e)i.prepareRender(t)},render:(e,t)=>{for(const i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new Q.y(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?at.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new wi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=this._overlayWidgets.setWidgetPosition(e.widget,e.position);t&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position,i=this._glyphMarginWidgets.setWidgetPosition(e.widget,t);i&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};function $i(e){try{return e()}catch(e){return(0,c.dz)(e),null}}Ui=ji([zi(6,je._Y)],Ui);class qi{static{this.INSTANCE=new qi}constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(-1!==t&&(this._coordinatedRenderings.splice(t,1),0===this._coordinatedRenderings.length)){for(const[e,t]of this._animationFrameRunners)t.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,l.Oq(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const t of e)$i((()=>t.prepareRenderText()));const t=[];for(let i=0,n=e.length;in.renderText()))}for(let i=0,n=e.length;in.prepareRender(s,r)))}for(let i=0,n=e.length;in.render(s,r)))}}}var Ki=i(79109);class Gi{constructor(e,t,i,n,o){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=o}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0,i=this.breakOffsets[e];let n=i-t;return e>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));const i=0===e?t:this.breakOffsets[e-1]+t;let n=i;if(null!==this.injectionOffsets)for(let e=0;ethis.injectionOffsets[e]))break;n0?this.breakOffsets[o-1]:0,0===t)if(e<=s)n=o-1;else{if(!(e>r))break;i=o+1}else if(e=r))break;i=o+1}}let r=e-s;return o>0&&(r+=this.wrappedTextIndentLength),new Zi(o,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(o!==n)return this.offsetInInputWithInjectionsToOutputPosition(o,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new Zi(e-1,this.getMaxOutputOffset(e-1))}else if(1===i){const i=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength));const i=(e>0?this.breakOffsets[e-1]:0)+t;return i}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&Qi(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(Yi(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;while(t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]){if(Qi(this.injectionOptions[t].cursorStops))break;if(e-=this.injectionOptions[t].content.length,Yi(this.injectionOptions[t].cursorStops))break;t--}return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;while(t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t])e-=this.injectionOptions[t-1].content.length,t--;return e}(0,Ki.xb)(t)}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let o=0;oe)break;if(e<=a)return{injectedTextIndex:o,offsetInInputWithInjections:r,length:s};n+=s}}}}function Qi(e){return null===e||void 0===e||(e===wt.VW.Right||e===wt.VW.Both)}function Yi(e){return null===e||void 0===e||(e===wt.VW.Left||e===wt.VW.Both)}class Zi{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new Q.y(e+this.outputLineIndex,this.outputOffset+1)}}var Xi=i(50410);const Ji=(0,Xe.H)("domLineBreaksComputer",{createHTML:e=>e});class en{static create(e){return new en(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t)},finalize:()=>tn((0,Dt.eU)(this.targetWindow.deref()),s,e,t,i,n,o,r)}}}function tn(e,t,i,n,o,s,r,a){function l(e){const i=a[e];if(i){const n=Xi.uK.applyInjectedText(t[e],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new Gi(s,o,[n.length],[],0)}return null}if(-1===o){const e=[];for(let i=0,n=t.length;ic?(r=0,l=0):d=c-e}const u=o.substr(r),g=nn(u,l,n,d,f,h);m[e]=r,_[e]=l,v[e]=u,b[e]=g[0],y[e]=g[1]}const w=f.build(),C=Ji?.createHTML(w)??w;p.innerHTML=C,p.style.position="absolute",p.style.top="10000","keepAll"===r?(p.style.wordBreak="keep-all",p.style.overflowWrap="anywhere"):(p.style.wordBreak="inherit",p.style.overflowWrap="break-word"),e.document.body.appendChild(p);const S=document.createRange(),k=Array.prototype.slice.call(p.children,0),x=[];for(let e=0;ee.options)),d=h.map((e=>e.column-1))):(c=null,d=null),x[e]=new Gi(d,c,i,r,o)}return p.remove(),x}function nn(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendString('
    ');const r=e.length;let a=t,l=0;const c=[],d=[];let u=0");for(let t=0;t"),c[t]=l,d[t]=a;const n=u;u=t+1"),c[e.length]=l,d[e.length]=a,o.appendString("
    "),[c,d]}function on(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{sn(e,o,n,0,null,i.length-1,null,s)}catch(e){return console.log(e),null}return 0===s.length?null:(s.push(i.length),s)}function sn(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||rn(e,t,i[n],i[n+1]),r=r||rn(e,t,i[s],i[s+1]),Math.abs(o[0].top-r[0].top)<=.1)return;if(n+1===s)return void a.push(s);const l=n+(s-n)/2|0,c=rn(e,t,i[l],i[l+1]);sn(e,t,i,n,o,l,c,a),sn(e,t,i,l,c,s,r,a)}function rn(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class an extends u.jG{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new u.$w),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const e of t)this._pending.has(e.id)?(0,c.dz)(new Error(`Cannot have two contributions with the same id ${e.id}`)):this._pending.set(e.id,e);this._instantiateSome(0),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(1)}))),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(2)}))),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"===typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"===typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return(0,l.U3)((0,l.zk)(this._editor?.getDomNode()),(()=>{this._instantiateSome(1)}),50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const e of t)this._instantiateById(e.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"===typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(e){(0,c.dz)(e)}}}}var ln=i(51232),cn=i(5868),dn=i(69483),un=i(57479),hn=i(50395),gn=i(35037),pn=i(12847),fn=i(94529);class mn{static create(e){return new mn(e.get(135),e.get(134))}constructor(e,t){this.classifier=new _n(e,t)}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[],a=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let e=0,d=s.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let vn=[],bn=[];function yn(e,t,i,n,o,s,r,a){if(-1===o)return null;const l=i.length;if(l<=1)return null;const c="keepAll"===a,d=t.breakOffsets,u=t.breakOffsetsVisibleColumn,h=xn(i,n,o,s,r),g=o-h,p=vn,f=bn;let m=0,_=0,v=0,b=o;const y=d.length;let w=0;if(w>=0){let e=Math.abs(u[w]-b);while(w+1=e)break;e=t,w++}}while(wt&&(t=_,o=v);let r=0,a=0,h=0,C=0;if(o<=b){let v=o,y=0===t?0:i.charCodeAt(t-1),w=0===t?0:e.get(y),S=!0;for(let o=t;o_&&kn(y,w,l,d,c)&&(r=t,a=v),v+=u,v>b){t>_?(h=t,C=v-u):(h=o+1,C=v),v-a>g&&(r=0),S=!1;break}y=l,w=d}if(S){m>0&&(p[m]=d[d.length-1],f[m]=u[d.length-1],m++);break}}if(0===r){let l=o,d=i.charCodeAt(t),u=e.get(d),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){p=!0;break}let f,m;if(Ie.LJ(o)?(n--,f=0,m=2):(f=e.get(o),m=Ie.ne(o)?s:1),l<=b){if(0===h&&(h=t,C=l),l<=b-g)break;if(kn(o,f,d,u,c)){r=t,a=l;break}}l-=m,d=o,u=f}if(0!==r){const e=g-(C-a);if(e<=n){const t=i.charCodeAt(h);let o;o=Ie.pc(t)?2:Cn(t,C,n,s),e-o<0&&(r=0)}}if(p){w--;continue}}if(0===r&&(r=h,a=C),r<=_){const e=i.charCodeAt(_);Ie.pc(e)?(r=_+2,a=v+2):(r=_+1,a=v+Cn(e,v,n,s))}_=r,p[m]=r,v=a,f[m]=a,m++,b=a+g;while(w<0||w=S)break;S=e,w++}}return 0===m?null:(p.length=m,f.length=m,vn=t.breakOffsets,bn=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=f,t.wrappedTextIndentLength=h,t)}function wn(e,t,i,n,o,s,r,a){const l=Xi.uK.applyInjectedText(t,i);let c,d;if(i&&i.length>0?(c=i.map((e=>e.options)),d=i.map((e=>e.column-1))):(c=null,d=null),-1===o)return c?new Gi(d,c,[l.length],[],0):null;const u=l.length;if(u<=1)return c?new Gi(d,c,[l.length],[],0):null;const h="keepAll"===a,g=xn(l,n,o,s,r),p=o-g,f=[],m=[];let _=0,v=0,b=0,y=o,w=l.charCodeAt(0),C=e.get(w),S=Cn(w,0,n,s),k=1;Ie.pc(w)&&(S+=1,w=l.charCodeAt(1),C=e.get(w),k++);for(let t=k;ty&&((0===v||S-b>p)&&(v=i,b=S-a),f[_]=v,m[_]=b,_++,y=b+p,v=0),w=o,C=r}return 0!==_||i&&0!==i.length?(f[_]=u,m[_]=S,new Gi(d,c,f,m,g)):null}function Cn(e,t,i,n){return 9===e?i-t%i:Ie.ne(e)||e<32?n:1}function Sn(e,t){return t-e%t}function kn(e,t,i,n,o){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!o&&3===t&&2!==n||!o&&3===n&&1!==t)}function xn(e,t,i,n,o){let s=0;if(0!==o){const r=Ie.HG(e);if(-1!==r){for(let i=0;ii&&(s=0)}}return s}var En=i(43654),Ln=i(332);class Tn{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Ln.mG(new Y.Q(1,1,1,1),0,0,new Q.y(1,1),0),new Ln.mG(new Y.Q(1,1,1,1),0,0,new Q.y(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Ln.MF(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?_e.L.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):_e.L.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,s),a=this._validatePositionWithCache(e,o,n,r);return i.equals(s)&&n.equals(r)&&o.equals(a)?t:new Ln.mG(Y.Q.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=Tn._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),s=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new Ln.mG(i,t.selectionStartKind,n,o,s)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Ln.mG(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Ln.mG(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Q.y(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new Q.y(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new Y.Q(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Ln.mG(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class In{constructor(e){this.context=e,this.cursors=[new Tn(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return(0,En.kh)(this.cursors,(0,f.VE)((e=>e.viewState.position),Q.y.compare)).viewState.position}getBottomMostViewPosition(){return(0,En.ot)(this.cursors,(0,f.VE)((e=>e.viewState.position),Q.y.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(Ln.MF.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),Y.Q.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class Dn{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var Rn=i(38471),Nn=i(44592),An=i(52220);class On{constructor(){this.type=0}}class Pn{constructor(){this.type=1}}class Mn{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Fn{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class Bn{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class Wn{constructor(){this.type=5}}class Hn{constructor(e){this.type=6,this.isFocused=e}}class Vn{constructor(){this.type=7}}class jn{constructor(){this.type=8}}class zn{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class Un{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class $n{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class qn{constructor(e,t,i,n,o,s,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=o,this.revealHorizontal=s,this.scrollType=r,this.type=12}}class Kn{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Gn{constructor(e){this.theme=e,this.type=14}}class Qn{constructor(e){this.type=15,this.ranges=e}}class Yn{constructor(){this.type=16}}class Zn{constructor(){this.type=17}}class Xn extends u.jG{constructor(){super(),this._onEvent=this._register(new d.vl),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{const t=this.beginEmitViewEvents();t.emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){while(this._viewEventQueue){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Jn{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class eo{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new eo(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class to{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new to(this.oldHasFocus,e.hasFocus)}}class io{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new io(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class no{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class oo{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class so{constructor(e,t,i,n,o,s,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;ts&&(n=n.slice(0,s),o=!0);const r=fo.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,i,n,o,s){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=Y.Q.fromPositions(r[0],r[0]),e.emitViewEvent(new qn(t,i,a,l,n,o,s))}revealPrimary(e,t,i,n,o,s){const r=this._cursors.getPrimaryCursor(),a=[r.viewState.selection];e.emitViewEvent(new qn(t,i,null,a,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const t=Ln.MF.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Ln.MF.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Ln.MF.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let o=0,s=e.length;o0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=fo.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new Fn(a,r,i)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new so(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const s=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=fo.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,c.dz)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return mo.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new bo(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(Nn.T.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;while(i{this._executeEditOperation(Nn.T.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,s);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new _e.L(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,s,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(Nn.T.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(Rn.g.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Ln.vY(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new Ln.vY(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class fo{static from(e,t){return new fo(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class _o{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,s=[];for(let i=0;i0?(n[i].sort(o),s[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new _e.L(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new _e.L(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s}));r||(r=e.selectionsBefore);const a=[];for(const e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{Y.Q.isEmpty(e)&&""===s||n.push({identifier:{major:t,minor:o++},range:e,text:s,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a=(e,t,i)=>{r=!0,s(e,t,i)},l=(t,i)=>{const n=_e.L.liftSelection(t);let o;if(n.isEmpty())if("boolean"===typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()},d={addEditOperation:s,addTrackedEditOperation:a,trackSelection:l};try{i.getEditOperations(e.model,d)}catch(e){return(0,c.dz)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){e=e.slice(0),e.sort(((e,t)=>-Y.Q.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;io.identifier.major?n.identifier.major:o.identifier.major,t[s.toString()]=!0;for(let t=0;t0&&i--}}return t}}class vo{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class bo{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new vo(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=bo._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=bo._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let e=0,t=this._original.length;e>>1;t===e[s].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,o|=0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new ko(s,e,i,n,o)),s},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}};e(i)}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const s=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=xo.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[r+1].afterLineNumber>=e)return r;i=r+1|0}else n=r-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e),i=t+1;return i1?this._lineHeight*(e-1):0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return i+n+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e|=0;const i=this._lineHeight*e,n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tt}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e|=0,e<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;while(n=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===r?(r=a,c=s+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let d=o,u=d;const h=5e5;let g=0;o>=h&&(g=Math.floor(o/h)*h,g=Math.floor(g/i)*i,u-=g);const p=[],f=e+(t-e)/2;let m=-1;for(let e=n;e<=s;e++){if(-1===m){const t=d,n=d+i;(t<=f&&ff)&&(m=e)}d+=i,p[e-n]=u,u+=i;while(c===e)u+=l,d+=l,r++,r>=a?c=s+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){s=e;break}}-1===m&&(m=s);const _=0|this.getVerticalOffsetForLineNumber(s);let v=n,b=s;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:m,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),o=this.getHeightForWhitespaceIndex(i);if(e>=n+o)return-1;while(t=o+s)t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),o=this.getIdForWhitespaceIndex(t),s=this.getAfterLineNumberForWhitespaceIndex(t);return{id:o,afterLineNumber:s,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}const Eo=125;class Lo{constructor(e,t,i,n){e|=0,t|=0,i|=0,n|=0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class To extends u.jG{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new d.vl),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Lo(0,0,0,0),this._scrollable=this._register(new Co.yE({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new eo(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class Io extends u.jG{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(146),s=n.get(84);this._linesLayout=new xo(t,n.get(67),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new To(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Lo(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(115)?Eo:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(t.get(67)),e.hasChanged(84)){const e=t.get(84);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(146)){const e=t.get(146),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new Lo(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(115)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options,n=i.get(104);return 2===n.horizontal||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(106)?o+=Math.max(0,t-n.get(67)-n.get(84).bottom):n.get(104).ignoreHorizontalScrollbarInContentHeight||(o+=this._getHorizontalScrollbarHeight(e,i)),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new Lo(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new qt.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new qt.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(147),n=e.get(50),o=e.get(146);if(i.isViewportWrapping){const i=e.get(73);return t>o.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+o.verticalScrollbarWidth:t}{const i=e.get(105)*n.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+o.verticalScrollbarWidth,s,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Lo(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){const e=this._scrollable.getScrollDimensions();return e.contentWidth}getScrollWidth(){const e=this._scrollable.getScrollDimensions();return e.scrollWidth}getContentHeight(){const e=this._scrollable.getScrollDimensions();return e.contentHeight}getScrollHeight(){const e=this._scrollable.getScrollDimensions();return e.scrollHeight}getCurrentScrollLeft(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollLeft}getCurrentScrollTop(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var Do=i(10049),Ro=i(70164);function No(e,t){return null===e?t?Oo.INSTANCE:Po.INSTANCE:new Ao(e,t)}class Ao{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,o=this._projectionData.breakOffsets[i];let s;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new Xi.uK(0,0,e+1,this._projectionData.injectionOptions[t],0))),r=Xi.uK.applyInjectedText(e.getLineContent(t),i);s=r.substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=Fo(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,o,s,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,c=a.injectionOptions;let d,u=null;if(l){u=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,s=a.breakOffsets[i];while(ts)break;if(o0?a.wrappedTextIndentLength:0,r=t+Math.max(d-o,0),l=t+Math.min(u-o,s-o);r!==l&&n.push(new qt.or(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(u<=s))break;e+=r,t++}}}d=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:Ro.f.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let e=i;e0?n.wrappedTextIndentLength:0,s=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(s,r,o);let l=a.getLineContent();i>0&&(l=Fo(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,u=i+1=Mo.length)for(let t=1;t<=e;t++)Mo[t]=Bo(t);return Mo[e]}function Bo(e){return new Array(e+1).join(" ")}var Wo=i(73139);class Ho{constructor(e,t,i,n,o,s,r,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Uo(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),o=i.length,s=this.createLineBreaksComputer(),r=new f.j3(Xi.uK.fromDecorations(n));for(let e=0;et.lineNumber===e+1));s.addRequest(i[e],n,t?t[e]:null)}const a=s.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Y.Q.compareRangesUsingStarts);let d=1,u=0,h=-1,g=h+1=d&&t<=u,n=No(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Wo.c2(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=e.map((e=>this.model.validateRange(e))),i=Vo(t),n=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Y.Q.compareRangesUsingStarts);if(i.length===n.length){let e=!1;for(let t=0;t({range:e,options:gn.kI.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,o);const s=i;let r=1,a=0,l=-1,c=l+1=r&&t<=a?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(d=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,o){const s=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,c=this.wordBreak===o;if(s&&r&&a&&l&&c)return!1;const d=s&&r&&!a&&l&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=o;let u=null;if(d){u=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),s=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let e=0,t=n.length;ea?(c=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=c+a-1,g=d+1,p=g+(o-a)-1,l=!0):ot?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new jo(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Q.y(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Q.y(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let s=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const o=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=o;t{if(-1!==e.forWrappedLinesAfterColumn){const t=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn);if(t.lineNumber>=n.modelLineWrappedLineIdx)return}if(-1!==e.forWrappedLinesBeforeOrAtColumn){const t=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn);if(t.lineNumbern.modelLineWrappedLineIdx)return}const i=this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn),o=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return o.lineNumber===n.modelLineWrappedLineIdx?new Nt.TH(e.visibleColumn,t,e.className,new Nt.pv(e.horizontalLine.top,i.column),-1,-1):o.lineNumber!!e)))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[];const s=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1;let d=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(d=0===n?1:2),s.push(l),r.push(d),null===c&&(c=new Q.y(e+1,0))}else null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const d=t-e+1,u=new Array(d);let h=0;for(let e=0,t=o.length;et&&(u=!0,d=t-o+1),l.getViewLinesData(this.model,n+1,c,d,o-e,i,a),o+=d,u)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),o=n.index,s=n.remainder,r=this.modelLineProjections[o],a=r.getViewLineMinColumn(this.model,o+1,s),l=r.getViewLineMaxColumn(this.model,o+1,s);tl&&(t=l);const c=r.getModelColumnOfViewPosition(s,t),d=this.model.validatePosition(new Q.y(o+1,c));return d.equals(i)?new Q.y(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Y.Q(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new Q.y(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Y.Q(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,o=!1){const s=this.model.validatePosition(new Q.y(e,t)),r=s.lineNumber,a=s.column;let l=r-1,c=!1;if(o)while(l0&&!this.modelLineProjections[l].isVisible())l--,c=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new Q.y(n?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(l);let u;return u=c?o?this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(d,a,i),u}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return Y.Q.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new Y.Q(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}while(i>0&&!this.modelLineProjections[i].isVisible())i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,o){const s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new Y.Q(s.lineNumber,1,r.lineNumber,r.column),t,i,n,o);let a=[];const l=s.lineNumber-1,c=r.lineNumber-1;let d=null;for(let e=l;e<=c;e++){const o=this.modelLineProjections[e];if(o.isVisible())null===d&&(d=new Q.y(e+1,e===l?s.column:1));else if(null!==d){const o=this.model.getLineMaxColumn(e);a=a.concat(this.model.getDecorationsInRange(new Y.Q(d.lineNumber,d.column,e,o),t,i,n)),d=null}}null!==d&&(a=a.concat(this.model.getDecorationsInRange(new Y.Q(d.lineNumber,d.column,r.lineNumber,r.column),t,i,n)),d=null),a.sort(((e,t)=>{const i=Y.Q.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));const u=[];let h=0,g=null;for(const e of a){const t=e.id;g!==t&&(g=t,u[h++]=e)}return u}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}function Vo(e){if(0===e.length)return[];const t=e.slice();t.sort(Y.Q.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,s=t.length;eo+1?(i.push(new Y.Q(n,1,o,1)),n=s.startLineNumber,o=s.endLineNumber):s.endLineNumber>o&&(o=s.endLineNumber)}return i.push(new Y.Q(n,1,o,1)),i}class jo{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class zo{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Uo{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class $o{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new qo(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new Un(t,i)}onModelLinesInserted(e,t,i,n){return new $n(t,i)}onModelLineChanged(e,t,i){return[!1,new zn(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let e=0;et)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}const Ko=wt.ZS.Right;class Go{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*Ko/8))}reset(e){const t=Math.ceil((e+1)*Ko/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=Zo.create(this.model),this.glyphLanes=new Go(0),Qo&&this.model.isTooLargeForTokenization())this._lines=new $o(this.model);else{const e=this._configuration.options,t=e.get(50),i=e.get(140),s=e.get(147),r=e.get(139),a=e.get(130);this._lines=new Ho(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new po(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Io(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new Kn(e)),this._eventDispatcher.emitOutgoingEvent(new io(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new Do.UB(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register($t.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new Yn)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Gn(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new Y.Q(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);return i}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Hn(e)),this._eventDispatcher.emitOutgoingEvent(new to(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new On)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Pn)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new Q.y(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new is(t,this._viewportStart.startLineDelta)}return new is(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,o=n.get(50),s=n.get(140),r=n.get(147),a=n.get(139),l=n.get(130);this._lines.setWrappingSettings(o,s,r.wrappingColumn,a,l)&&(e.emitViewEvent(new Wn),e.emitViewEvent(new jn),e.emitViewEvent(new Bn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(92)&&(this._decorations.reset(),e.emitViewEvent(new Bn(null))),t.hasChanged(99)&&(this._decorations.reset(),e.emitViewEvent(new Bn(null))),e.emitViewEvent(new Mn(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Ln.d$.shouldRecreate(t)&&(this.cursorConfig=new Ln.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e instanceof Xi.Ic?e.rawContentChangedEvent.changes:e.changes,s=e instanceof Xi.Ic?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new f.j3(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new Wn),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[o,r,a,c]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}case 5:break}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new jn),t.emitViewEvent(new Bn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof Xi.Ic&&t.emitOutgoingEvent(new uo(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new Vn),this.cursorConfig=new Ln.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new co(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new Ln.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new lo(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new Wn),e.emitViewEvent(new jn),e.emitViewEvent(new Bn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Ln.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new ho(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Bn(e)),this._eventDispatcher.emitOutgoingEvent(new ao(e))})))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const n=this._captureStableViewport();let o=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();o=this._lines.setHiddenAreas(i),o&&(e.emitViewEvent(new Wn),e.emitViewEvent(new jn),e.emitViewEvent(new Bn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const t=n.viewportStartModelPosition?.lineNumber,s=t&&i.some((e=>e.startLineNumber<=t&&t<=e.endLineNumber));s||n.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),o&&this._eventDispatcher.emitOutgoingEvent(new oo)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(146),t=this._configuration.options.get(67),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new Y.Q(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let o=0,s=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(st.toInlineDecoration(e)))]),new qt.qL(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,t,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new qt.nt(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,E.$C)(this._configuration.options)),i=new Xo;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const s=o.position;if(0===s)continue;const r=o.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,s)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e?.invalidateCachedColor();const i=t.options.minimap;i?.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e),n=this.model.modifyPosition(i,t);return this.coordinatesConverter.convertModelPositionToViewPosition(n)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n),s=o+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();e=e.slice(0),e.sort(Y.Q.compareRangesUsingStarts);let o=!1,s=!1;for(const t of e)t.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){const t=[];let n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===yo.vH)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new Y.Q(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(50),s=this._getColorMap(),r=/[:;\\\/<>]/.test(o.fontFamily),a=r||o.fontFamily===E.jU.fontFamily;let l;if(a)l=E.jU.fontFamily;else{l=o.fontFamily,l=l.replace(/"/g,"'");const e=/[,']/.test(l);if(!e){const e=/[+ ]/.test(l);e&&(l=`'${l}'`)}l=`${l}, ${E.jU.fontFamily}`}return{mode:i,html:`
    `+this._getHTMLToCopy(n,s)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.tokenization.getLineTokens(e),c=l.getLineContent(),d=e===i?n-1:0,u=e===o?s-1:c.length;a+=""===c?"
    ":(0,wo.s0)(c,l.inflate(),t,d,u,r,_.uF)}return a}_getColorMap(){const e=Be.dG.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new ro):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((s=>this._cursor.compositionType(s,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealAll(n,e,i,0,t,0)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new Y.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new qn(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new Y.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new qn(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new qn(e,!1,i,null,n,t,o))))}changeWhitespace(e){const t=this.viewLayout.changeWhitespace(e);t&&(this._eventDispatcher.emitSingleViewEvent(new Zn),this._eventDispatcher.emitOutgoingEvent(new no))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges((()=>{try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}))}batchEvents(e){this._withViewEventsCollector((()=>{e()}))}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class Zo{static create(e){const t=e._setTrackedRange(null,new Y.Q(1,1,1,1),1);return new Zo(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,o){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=o}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new Q.y(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new Y.Q(i.lineNumber,i.column,i.lineNumber,i.column),1),o=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=s-o}invalidate(){this._isValid=!1}}class Xo{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const s=this._asMap[e];if(s){const e=s.data,t=e[e.length-3],r=e[e.length-1];if(t===o&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(o,i,n)}else{const s=new qt.Uv(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class Jo{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&ts(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>es(e,t)),[]);return ts(this.ranges,e)||(this.ranges=e),this.ranges}}function es(e,t){const i=[];let n=0,o=0;while(n=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ds=function(e,t){return function(i,n){t(i,n,e)}};let us=class extends u.jG{static{ns=this}static{this.dropIntoEditorDecorationOptions=gn.kI.register({description:"workbench-dnd-target",className:"dnd-target"})}get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}constructor(e,t,i,n,s,r,a,u,h,g,p,f){super(),this.languageConfigurationService=p,this._deliveryQueue=(0,d.Qy)(),this._contributions=this._register(new an),this._onDidDispose=this._register(new d.vl),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new ps({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new ps({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new fs(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new fs(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new fs(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new fs(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new d.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onBeginUpdate=this._register(new d.vl),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new d.vl),this.onEndUpdate=this._onEndUpdate.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),s.willCreateCodeEditor();const m={...t};let _;this._domElement=e,this._overflowWidgetsDomNode=m.overflowWidgetsDomNode,delete m.overflowWidgetsDomNode,this._id=++hs,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,i.contextMenuId??(i.isSimpleWidget?ls.D8.SimpleEditorContext:ls.D8.EditorContext),m,g)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(146)){const e=t.get(146);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=h,this._codeEditorService=s,this._commandService=r,this._themeService=u,this._register(new ms(this,this._contextKeyService)),this._register(new _s(this,this._contextKeyService,f)),this._instantiationService=this._register(n.createChild(new rs.a([ss.fN,this._contextKeyService]))),this._modelData=null,this._focusTracker=new vs(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},_=Array.isArray(i.contributions)?i.contributions:o.dS.getEditorContributions(),this._contributions.initialize(this,_,this._instantiationService);for(const e of o.dS.getEditorActions()){if(this._actions.has(e.id)){(0,c.dz)(new Error(`Cannot have two actions with the same id ${e.id}`));continue}const t=new cn.f(e.id,e.label,e.alias,e.metadata,e.precondition??void 0,(t=>this._instantiationService.invokeFunction((i=>Promise.resolve(e.runEditorCommand(i,this,t))))),this._contextKeyService);this._actions.set(t.id,t)}const v=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new l.pN(this._domElement,{onDragOver:e=>{if(!v())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this.showDropIndicatorAt(t.position)},onDrop:async e=>{if(!v())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this._onDropIntoEditor.fire({position:t.position,event:e})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i,n){return new A(e,t,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return dn._.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?ln.z.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(i);const n=this.hasTextFocus(),o=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(o),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?ns._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?ns._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,n)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return-1;const i=this._modelData.model.getLineMaxColumn(e);return ns._getVerticalOffsetAfterPosition(this._modelData,e,i,t)}setHiddenAreas(e,t){this._modelData?.viewModel.setHiddenAreas(e.map((e=>Y.Q.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Z.A.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!Q.y.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!Y.Q.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!==typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new Y.Q(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!Q.y.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Y.Q(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=_e.L.isISelection(e),n=Y.Q.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new _e.L(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!==typeof e||"number"!==typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new Y.Q(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!Y.Q.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Y.Q.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){i=i||{};try{switch(this._beginUpdate(),t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null,t.clipboardEvent)}case"cut":return void this._cut(e)}const n=this.getAction(t);if(n)return void Promise.resolve(n.run(i)).then(void 0,c.dz);if(!this._modelData)return;if(this._triggerEditorCommand(e,t,i))return;this._triggerCommand(t,i)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o,s){if(!this._modelData)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({clipboardEvent:s,range:new Y.Q(a.lineNumber,a.column,l.lineNumber,l.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=o.dS.getEditorCommand(t);return!!n&&(i=i||{},i.source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,c.dz)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(92)&&(this._modelData.model.pushStackElement(),!0))}popUndoStop(){return!!this._modelData&&(!this._configuration.options.get(92)&&(this._modelData.model.popStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(92))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new bs(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,E.$C)(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,(0,E.$C)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations((e=>e.deltaDecorations(t,[]))),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){const e=this._configuration.options,t=e.get(146);return t}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(146),o=ns._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft();return{top:o,left:s,height:i.get(67)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.viewModel.batchEvents((()=>{this._modelData.view.render(!0,e)}))}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,g.M)(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new Yo(this._id,this._configuration,e,en.create(l.zk(this._domElement)),mn.create(this._configuration.options),(e=>l.PG(l.zk(this._domElement),e)),this.languageConfigurationService,this._themeService,i,{batchChanges:e=>{try{return this._beginUpdate(),e()}finally{this._endUpdate()}}});t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=this.getOption(80),t=Te.kg("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",e);this._notificationService.prompt(as.AI.Warning,t,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:Te.kg("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let i=0,n=t.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new at(e.coordinatesConverter);i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e);const n=new Ui(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService);return[n,!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new Y.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:ns.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,0===this._updateCounter&&this._onEndUpdate.fire()}};us=ns=cs([ds(3,je._Y),ds(4,H.T),ds(5,os.d),ds(6,ss.fN),ds(7,Ne.Gy),ds(8,as.Ot),ds(9,I.j),ds(10,hn.JZ),ds(11,pn.ILanguageFeaturesService)],us);let hs=0;class gs{constructor(e,t,i,n,o,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o,this.attachedView=s}dispose(){(0,u.AS)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class ps extends u.jG{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new d.vl(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new d.vl(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class fs extends d.vl{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class ms extends u.jG{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=un.R.editorSimpleInput.bindTo(t),this._editorFocus=un.R.focus.bindTo(t),this._textInputFocus=un.R.textInputFocus.bindTo(t),this._editorTextFocus=un.R.editorTextFocus.bindTo(t),this._tabMovesFocus=un.R.tabMovesFocus.bindTo(t),this._editorReadonly=un.R.readOnly.bindTo(t),this._inDiffEditor=un.R.inDiffEditor.bindTo(t),this._editorColumnSelection=un.R.columnSelection.bindTo(t),this._hasMultipleSelections=un.R.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=un.R.hasNonEmptySelection.bindTo(t),this._canUndo=un.R.canUndo.bindTo(t),this._canRedo=un.R.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._register(x.M.onDidChangeTabFocus((e=>this._tabMovesFocus.set(e)))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(x.M.getTabFocusMode()),this._editorReadonly.set(e.get(92)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class _s extends u.jG{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=un.R.languageId.bindTo(t),this._hasCompletionItemProvider=un.R.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=un.R.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=un.R.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=un.R.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=un.R.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=un.R.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=un.R.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=un.R.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=un.R.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=un.R.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=un.R.hasReferenceProvider.bindTo(t),this._hasRenameProvider=un.R.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=un.R.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=un.R.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=un.R.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=un.R.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=un.R.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=un.R.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=un.R.isInEmbeddedEditor.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===h.ny.walkThroughSnippet||e.uri.scheme===h.ny.vscodeChatCodeBlock)})):this.reset()}}class vs extends u.jG{constructor(e,t){super(),this._onChange=this._register(new d.vl),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(l.w5(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus((()=>{this._hasDomElementFocus=!0,this._update()}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasDomElementFocus=!1,this._update()}))),t&&(this._overflowWidgetsDomNode=this._register(l.w5(t)),this._register(this._overflowWidgetsDomNode.onDidFocus((()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()}))),this._register(this._overflowWidgetsDomNode.onDidBlur((()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()}))))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class bs{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations((i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)}))}finally{this._isChangingDecorations=!1}return t}}const ys=encodeURIComponent("");function Cs(e){return ys+encodeURIComponent(e.toString())+ws}const Ss=encodeURIComponent('');function xs(e){return Ss+encodeURIComponent(e.toString())+ks}(0,Ne.zy)(((e,t)=>{const i=e.getColor(Kt.Rbi);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Cs(i)}") repeat-x bottom left; }`);const n=e.getColor(Kt.Hng);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Cs(n)}") repeat-x bottom left; }`);const o=e.getColor(Kt.pOz);o&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Cs(o)}") repeat-x bottom left; }`);const s=e.getColor(Kt.i61);s&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${xs(s)}") no-repeat bottom left; }`);const r=e.getColor(Ae.yw);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}))},50576:(e,t,i)=>{"use strict";i.d(t,{t:()=>m});var n=i(85603),o=i(94728),s=i(10113),r=i(50395),a=i(12847),l=i(17300),c=i(72786),d=i(18904),u=i(87778),h=i(95062),g=i(15911),p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.x{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,o,s,r,a,l,c,d,u,h),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.co(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};m=p([f(4,u._Y),f(5,o.T),f(6,c.d),f(7,d.fN),f(8,g.Gy),f(9,h.Ot),f(10,l.j),f(11,r.JZ),f(12,a.ILanguageFeaturesService)],m)},40147:(e,t,i)=>{"use strict";var n=i(25923),o=i(2150),s=i(16259),r=i(94728),a=i(12032),l=i(57479),c=i(41337),d=i(6330),u=i(32828),h=i(18904);i(88402);class g extends d.L{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:(0,c.aS)("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:n.W.map,toggled:h.M$.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:h.M$.has("isInDiffEditor"),menu:{when:h.M$.has("isInDiffEditor"),id:d.D8.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(u.pG),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class p extends d.L{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:(0,c.aS)("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:h.M$.has("isInDiffEditor")})}run(e,...t){const i=e.get(u.pG),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class f extends d.L{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:(0,c.aS)("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:h.M$.has("isInDiffEditor")})}run(e,...t){const i=e.get(u.pG),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const m=(0,c.aS)("diffEditor","Diff Editor");class _ extends s.qO{constructor(){super({id:"diffEditor.switchSide",title:(0,c.aS)("switchSide","Switch Side"),icon:n.W.arrowSwap,precondition:h.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,i){const n=E(e);if(n instanceof a.T){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class v extends s.qO{constructor(){super({id:"diffEditor.exitCompareMove",title:(0,c.aS)("exitCompareMove","Exit Compare Move"),icon:n.W.close,precondition:l.R.comparingMovedCode,f1:!1,category:m,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=E(e);n instanceof a.T&&n.exitCompareMove()}}class b extends s.qO{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:(0,c.aS)("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:n.W.fold,precondition:h.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,...i){const n=E(e);n instanceof a.T&&n.collapseAllUnchangedRegions()}}class y extends s.qO{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:(0,c.aS)("showAllUnchangedRegions","Show All Unchanged Regions"),icon:n.W.unfold,precondition:h.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,...i){const n=E(e);n instanceof a.T&&n.showAllUnchangedRegions()}}class w extends d.L{constructor(){super({id:"diffEditor.revert",title:(0,c.aS)("revert","Revert"),f1:!1,category:m})}run(e,t){const i=x(e,t.originalUri,t.modifiedUri);i instanceof a.T&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const C=(0,c.aS)("accessibleDiffViewer","Accessible Diff Viewer");class S extends d.L{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:S.id,title:(0,c.aS)("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:C,precondition:h.M$.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=E(e);t?.accessibleDiffViewerNext()}}class k extends d.L{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:k.id,title:(0,c.aS)("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:C,precondition:h.M$.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=E(e);t?.accessibleDiffViewerPrev()}}function x(e,t,i){const n=e.get(r.T),o=n.listDiffEditors();return o.find((e=>{const n=e.getModifiedEditor(),o=e.getOriginalEditor();return n&&n.getModel()?.uri.toString()===i.toString()&&o&&o.getModel()?.uri.toString()===t.toString()}))||null}function E(e){const t=e.get(r.T),i=t.listDiffEditors(),n=(0,o.bq)();if(n)for(const e of i){const t=e.getContainerDomNode();if(L(t,n))return e}return null}function L(e,t){let i=t;while(i){if(i===e)return!0;i=i.parentElement}return!1}var T=i(72786);(0,d.ug)(g),(0,d.ug)(p),(0,d.ug)(f),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:(new f).desc.id,title:(0,c.kg)("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:h.M$.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:h.M$.has("isInDiffEditor")},order:11,group:"1_diff",when:h.M$.and(l.R.diffEditorRenderSideBySideInlineBreakpointReached,h.M$.has("isInDiffEditor"))}),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:(new p).desc.id,title:(0,c.kg)("showMoves","Show Moved Code Blocks"),icon:n.W.move,toggled:h.f1.create("config.diffEditor.experimental.showMoves",!0),precondition:h.M$.has("isInDiffEditor")},order:10,group:"1_diff",when:h.M$.has("isInDiffEditor")}),(0,d.ug)(w);for(const e of[{icon:n.W.arrowRight,key:l.R.diffEditorInlineMode.toNegated()},{icon:n.W.discard,key:l.R.diffEditorInlineMode}])d.ZG.appendMenuItem(d.D8.DiffEditorHunkToolbar,{command:{id:(new w).desc.id,title:(0,c.kg)("revertHunk","Revert Block"),icon:e.icon},when:h.M$.and(l.R.diffEditorModifiedWritable,e.key),order:5,group:"primary"}),d.ZG.appendMenuItem(d.D8.DiffEditorSelectionToolbar,{command:{id:(new w).desc.id,title:(0,c.kg)("revertSelection","Revert Selection"),icon:e.icon},when:h.M$.and(l.R.diffEditorModifiedWritable,e.key),order:5,group:"primary"});(0,d.ug)(_),(0,d.ug)(v),(0,d.ug)(b),(0,d.ug)(y),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:S.id,title:(0,c.kg)("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:h.M$.has("isInDiffEditor")},order:10,group:"2_diff",when:h.M$.and(l.R.accessibleDiffViewerVisible.negate(),h.M$.has("isInDiffEditor"))}),T.w.registerCommandAlias("editor.action.diffReview.next",S.id),(0,d.ug)(S),T.w.registerCommandAlias("editor.action.diffReview.prev",k.id),(0,d.ug)(k)},12032:(e,t,i)=>{"use strict";i.d(t,{T:()=>Kt});var n=i(2150),o=i(43654),s=i(14396),r=i(40231),a=i(5091),l=i(39751),c=i(42389),d=i(16259),u=i(94728),h=i(71203),g=i(10113),p=i(21776),f=i(48038),m=i(37800),_=i(55664),v=i(85053),b=i(25923),y=i(23740),w=i(11320),C=i(78787),S=i(35011),k=i(44544),x=i(50371),E=i(36788),L=i(8690),T=i(93866),I=i(14573),D=i(70164),R=i(20529),N=i(90765),A=i(41337),O=i(4380),P=i(87778),M=i(48401),F=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},B=function(e,t){return function(i,n){t(i,n,e)}};const W=(0,M.pU)("diff-review-insert",b.W.add,(0,A.kg)("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),H=(0,M.pU)("diff-review-remove",b.W.remove,(0,A.kg)("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),V=(0,M.pU)("diff-review-close",b.W.close,(0,A.kg)("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let j=class extends a.jG{static{this._ttPolicy=(0,p.H)("diffReview",{createHTML:e=>e})}constructor(e,t,i,n,o,s,r,a,c){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=o,this._height=s,this._diffs=r,this._models=a,this._instantiationService=c,this._state=(0,l.rm)(this,((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(z,this._diffs,this._models,this._setVisible,this._canClose)),o=t.add(this._instantiationService.createInstance(X,this._parentNode,n,this._width,this._height,this._models));return{model:n,view:o}})).recomputeInitiallyAndOnChange(this._store)}next(){(0,l.Rn)((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)}))}prev(){(0,l.Rn)((e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)}))}close(){(0,l.Rn)((e=>{this._setVisible(!1,e)}))}};j=F([B(8,P._Y)],j);let z=class extends a.jG{constructor(e,t,i,n,o){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=o,this._groups=(0,l.FY)(this,[]),this._currentGroupIdx=(0,l.FY)(this,0),this._currentElementIdx=(0,l.FY)(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>this.currentGroup.read(t)?.lines[e])),this._register((0,l.fm)((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=$(t,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());(0,l.Rn)((e=>{const t=this._models.getModifiedPosition();if(t){const n=i.findIndex((e=>t?.lineNumber{const t=this.currentElement.read(e);t?.type===q.Deleted?this._accessibilitySignalService.playSignal(O.Rh.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):t?.type===q.Added&&this._accessibilitySignalService.playSignal(O.Rh.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register((0,l.fm)((e=>{const t=this.currentElement.read(e);if(t&&t.type!==q.Header){const e=t.modifiedLineNumber??t.diff.modified.startLineNumber;this._models.modifiedSetSelection(L.Q.fromPositions(new E.y(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||(0,l.PO)(t,(t=>{this._currentGroupIdx.set(x.L.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||(0,l.Rn)((i=>{this._currentElementIdx.set(x.L.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);-1!==i&&(0,l.Rn)((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===q.Deleted?this._models.originalReveal(L.Q.fromPositions(new E.y(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==q.Header?L.Q.fromPositions(new E.y(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};z=F([B(4,O.Nt)],z);const U=3;function $(e,t,i){const n=[];for(const o of(0,v.n)(e,((e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<2*U))){const e=[];e.push(new G);const s=new k.M(Math.max(1,o[0].original.startLineNumber-U),Math.min(o[o.length-1].original.endLineNumberExclusive+U,t+1)),r=new k.M(Math.max(1,o[0].modified.startLineNumber-U),Math.min(o[o.length-1].modified.endLineNumberExclusive+U,i+1));(0,v.pN)(o,((t,i)=>{const n=new k.M(t?t.original.endLineNumberExclusive:s.startLineNumber,i?i.original.startLineNumber:s.endLineNumberExclusive),o=new k.M(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new Z(t,o.startLineNumber+(t-n.startLineNumber)))})),i&&(i.original.forEach((t=>{e.push(new Q(i,t))})),i.modified.forEach((t=>{e.push(new Y(i,t))})))}));const a=o[0].modified.join(o[o.length-1].modified),l=o[0].original.join(o[o.length-1].original);n.push(new K(new T.WL(a,l),e))}return n}var q;(function(e){e[e["Header"]=0]="Header",e[e["Unchanged"]=1]="Unchanged",e[e["Deleted"]=2]="Deleted",e[e["Added"]=3]="Added"})(q||(q={}));class K{constructor(e,t){this.range=e,this.lines=t}}class G{constructor(){this.type=q.Header}}class Q{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=q.Deleted,this.modifiedLineNumber=void 0}}class Y{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=q.Added,this.originalLineNumber=void 0}}class Z{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=q.Unchanged}}let X=class extends a.jG{constructor(e,t,i,o,s,r){super(),this._element=e,this._model=t,this._width=i,this._height=o,this._models=s,this._languageService=r,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const c=document.createElement("div");c.className="diff-review-actions",this._actionBar=this._register(new f.E(c)),this._register((0,l.fm)((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new _.rc("diffreview.close",(0,A.kg)("label.close","Close"),"close-diff-review "+y.L.asClassName(V),!0,(async()=>t.close())),{label:!1,icon:!0})}))),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new m.MU(this._content,{})),(0,n.Ln)(this.domNode,this._scrollbar.getDomNode(),c),this._register((0,l.fm)((e=>{this._height.read(e),this._width.read(e),this._scrollbar.scanDomNode()}))),this._register((0,a.s)((()=>{(0,n.Ln)(this.domNode)}))),this._register((0,C.AV)(this.domNode,{width:this._width,height:this._height})),this._register((0,C.AV)(this._content,{width:this._width,height:this._height})),this._register((0,l.yC)(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register((0,n.b2)(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),o=document.createElement("div");o.className="diff-review-table",o.setAttribute("role","list"),o.setAttribute("aria-label",(0,A.kg)("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),(0,w.M)(o,i.get(50)),(0,n.Ln)(this._content,o);const s=this._models.getOriginalModel(),r=this._models.getModifiedModel();if(!s||!r)return;const a=s.getOptions(),c=r.getOptions(),d=i.get(67),u=this._model.currentGroup.get();for(const h of u?.lines||[]){if(!u)break;let g;if(h.type===q.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=u.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,o=e=>0===e?(0,A.kg)("no_lines_changed","no lines changed"):1===e?(0,A.kg)("one_line_changed","1 line changed"):(0,A.kg)("more_lines_changed","{0} lines changed",e),s=o(t.original.length),r=o(t.modified.length);e.setAttribute("aria-label",(0,A.kg)({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,s,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),g=e}else g=this._createRow(h,d,this._width.get(),t,s,a,i,r,c);o.appendChild(g);const p=(0,l.un)((e=>this._model.currentElement.read(e)===h));e.add((0,l.fm)((e=>{const t=p.read(e);g.tabIndex=t?0:-1,t&&g.focus()}))),e.add((0,n.ko)(g,"focus",(()=>{this._model.goToLine(h)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,o,s,r,a,l){const c=n.get(146),d=c.glyphMarginWidth+c.lineNumbersWidth,u=r.get(146),h=10+u.glyphMarginWidth+u.lineNumbersWidth;let g="diff-review-row",p="";const f="diff-review-spacer";let m=null;switch(e.type){case q.Added:g="diff-review-row line-insert",p=" char-insert",m=W;break;case q.Deleted:g="diff-review-row line-delete",p=" char-delete",m=H;break}const _=document.createElement("div");_.style.minWidth=i+"px",_.className=g,_.setAttribute("role","listitem"),_.ariaLevel="";const v=document.createElement("div");v.className="diff-review-cell",v.style.height=`${t}px`,_.appendChild(v);const b=document.createElement("span");b.style.width=d+"px",b.style.minWidth=d+"px",b.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?b.appendChild(document.createTextNode(String(e.originalLineNumber))):b.innerText=" ",v.appendChild(b);const w=document.createElement("span");w.style.width=h+"px",w.style.minWidth=h+"px",w.style.paddingRight="10px",w.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?w.appendChild(document.createTextNode(String(e.modifiedLineNumber))):w.innerText=" ",v.appendChild(w);const C=document.createElement("span");if(C.className=f,m){const e=document.createElement("span");e.className=y.L.asClassName(m),e.innerText="  ",C.appendChild(e)}else C.innerText="  ";let S;if(v.appendChild(C),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);j._ttPolicy&&(t=j._ttPolicy.createHTML(t)),v.insertAdjacentHTML("beforeend",t),S=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(o,n,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);j._ttPolicy&&(t=j._ttPolicy.createHTML(t)),v.insertAdjacentHTML("beforeend",t),S=o.getLineContent(e.originalLineNumber)}0===S.length&&(S=(0,A.kg)("blankLine","blank"));let k="";switch(e.type){case q.Unchanged:k=e.originalLineNumber===e.modifiedLineNumber?(0,A.kg)({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",S,e.originalLineNumber):(0,A.kg)("equalLine","{0} original line {1} modified line {2}",S,e.originalLineNumber,e.modifiedLineNumber);break;case q.Added:k=(0,A.kg)("insertLine","+ {0} modified line {1}",S,e.modifiedLineNumber);break;case q.Deleted:k=(0,A.kg)("deleteLine","- {0} original line {1}",S,e.originalLineNumber);break}return _.setAttribute("aria-label",k),_}_getLineHtml(e,t,i,n,o){const s=e.getLineContent(n),r=t.get(50),a=D.f.createEmpty(s,o),l=N.qL.isBasicASCII(s,e.mightContainNonBasicASCII()),c=N.qL.containsRTL(s,l,e.mightContainRTL()),d=(0,R.Md)(new R.zL(r.isMonospace&&!t.get(33),r.canUseHalfwidthRightwardsArrow,s,!1,l,c,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(118),t.get(100),t.get(95),t.get(51)!==S.Bc.OFF,null));return d.html}};X=F([B(5,I.L)],X);class J{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}var ee=i(9659),te=i(50322),ie=i(88402),ne=i(67792),oe=i(41843),se=i(34956),re=i(29680),ae=i(95239),le=i(18485),ce=i(79233),de=i(79109),ue=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},he=function(e,t){return function(i,n){t(i,n,e)}};let ge=class extends a.jG{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=(0,l.FY)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,l.FY)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,l.FY)(this,void 0),this.unchangedRegions=(0,l.un)(this,(e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e)?.regions??[]:((0,l.Rn)((e=>{for(const t of this._unchangedRegions.get()?.regions||[])t.collapseAll(e)})),[]))),this.movedTextToCompare=(0,l.FY)(this,void 0),this._activeMovedText=(0,l.FY)(this,void 0),this._hoveredMovedText=(0,l.FY)(this,void 0),this.activeMovedText=(0,l.un)(this,(e=>this.movedTextToCompare.read(e)??this._hoveredMovedText.read(e)??this._activeMovedText.read(e))),this._cancellationTokenSource=new ne.Qi,this._diffProvider=(0,l.un)(this,(e=>{const t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)}),i=(0,l.yQ)("onDidChange",t.onDidChange);return{diffProvider:t,onChangeSignal:i}})),this._register((0,a.s)((()=>this._cancellationTokenSource.cancel())));const n=(0,l.Yd)("contentChangedSignal"),o=this._register(new ee.uC((()=>n.trigger(void 0)),200));this._register((0,l.fm)((t=>{const i=this._unchangedRegions.read(t);if(!i||i.regions.some((e=>e.isDragged.read(t))))return;const n=i.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),o=i.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),s=i.regions.map(((e,i)=>n[i]&&o[i]?new ve(n[i].startLineNumber,o[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0)).filter(te.O9),r=[];let a=!1;for(const e of(0,v.n)(s,((e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber)))if(e.length>1){a=!0;const t=e.reduce(((e,t)=>e+t.lineCount),0),i=new ve(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.get(),e[e.length-1].visibleLineCountBottom.get());r.push(i)}else r.push(e[0]);if(a){const t=e.original.deltaDecorations(i.originalDecorationIds,r.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));(0,l.Rn)((e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)}))}})));const s=(t,i,n)=>{const o=ve.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n));let s;const r=this._unchangedRegions.get();if(r){const t=r.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),i=r.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),o=(0,C.EK)(r.regions.map(((e,n)=>{if(!t[n]||!i[n])return;const o=t[n].length;return new ve(t[n].startLineNumber,i[n].startLineNumber,o,Math.min(e.visibleLineCountTop.get(),o),Math.min(e.visibleLineCountBottom.get(),o-e.visibleLineCountTop.get()))})).filter(te.O9),((e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount));let a=o.map((e=>new T.WL(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n))));a=T.WL.clip(a,k.M.ofLength(1,e.original.getLineCount()),k.M.ofLength(1,e.modified.getLineCount())),s=T.WL.inverse(a,e.original.getLineCount(),e.modified.getLineCount())}const a=[];if(s)for(const e of o){const t=s.filter((t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange)));a.push(...e.setVisibleRanges(t,i))}else a.push(...o);const l=e.original.deltaDecorations(r?.originalDecorationIds||[],a.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),c=e.modified.deltaDecorations(r?.modifiedDecorationIds||[],a.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:c},i)};this._register(e.modified.onDidChangeContent((t=>{const i=this._diff.get();if(i){const i=ae.c.fromModelContentChanges(t.changes),n=ye(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,l.Rn)((e=>{this._diff.set(me.fromDiffResult(this._lastDiff),e),s(n,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),o.schedule()}))),this._register(e.original.onDidChangeContent((t=>{const i=this._diff.get();if(i){const i=ae.c.fromModelContentChanges(t.changes),n=be(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,l.Rn)((e=>{this._diff.set(me.fromDiffResult(this._lastDiff),e),s(n,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),o.schedule()}))),this._register((0,l.yC)((async(t,i)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),o.cancel(),n.read(t);const r=this._diffProvider.read(t);r.onChangeSignal.read(t),(0,se.b)(re.D8,t),(0,se.b)(ce.NC,t),this._isDiffUpToDate.set(!1,void 0);let a=[];i.add(e.original.onDidChangeContent((e=>{const t=ae.c.fromModelContentChanges(e.changes);a=(0,le.M)(a,t)})));let c=[];i.add(e.modified.onDidChangeContent((e=>{const t=ae.c.fromModelContentChanges(e.changes);c=(0,le.M)(c,t)})));let d=await r.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(d=pe(d,e.original,e.modified),d=be(d,a,e.original,e.modified)??d,d=ye(d,c,e.original,e.modified)??d,(0,l.Rn)((e=>{s(d,e),this._lastDiff=d;const t=me.fromDiffResult(d);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))}ensureModifiedLineIsVisible(e,t,i){if(0===this.diff.get()?.mappings.length)return;const n=this._unchangedRegions.get()?.regions||[];for(const o of n)if(o.getHiddenModifiedRange(void 0).contains(e))return void o.showModifiedLine(e,t,i)}ensureOriginalLineIsVisible(e,t,i){if(0===this.diff.get()?.mappings.length)return;const n=this._unchangedRegions.get()?.regions||[];for(const o of n)if(o.getHiddenOriginalRange(void 0).contains(e))return void o.showOriginalLine(e,t,i)}async waitForDiff(){await(0,l.oJ)(this.isDiffUpToDate,(e=>e))}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){const t=e.collapsedRegions?.map((e=>k.M.deserialize(e.range))),i=this._unchangedRegions.get();i&&t&&(0,l.Rn)((e=>{for(const n of i.regions)for(const i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}}))}};function pe(e,t,i){return{changes:e.changes.map((e=>new T.wm(e.original,e.modified,e.innerChanges?e.innerChanges.map((e=>fe(e,t,i))):void 0))),moves:e.moves,identical:e.identical,quitEarly:e.quitEarly}}function fe(e,t,i){let n=e.originalRange,o=e.modifiedRange;return 1===n.startColumn&&1===o.startColumn&&(1!==n.endColumn||1!==o.endColumn)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&o.endColumn===i.getLineMaxColumn(o.endLineNumber)&&n.endLineNumbernew _e(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class _e{constructor(e){this.lineRangeMapping=e}}class ve{static fromDiffs(e,t,i,n,o){const s=T.wm.inverse(e,t,i),r=[];for(const e of s){let s=e.original.startLineNumber,a=e.modified.startLineNumber,l=e.original.length;const c=1===s&&1===a,d=s+l===t+1&&a+l===i+1;(c||d)&&l>=o+n?(c&&!d&&(l-=o),d&&!c&&(s+=o,a+=o,l-=o),r.push(new ve(s,a,l,0,0))):l>=2*o+n&&(s+=o,a+=o,l-=2*o,r.push(new ve(s,a,l,0,0)))}return r}get originalUnchangedRange(){return k.M.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return k.M.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,o){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,l.FY)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,l.FY)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,l.un)(this,(e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=(0,l.FY)(this,void 0);const s=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(o,this.lineCount-n),0);(0,de.V7)(n===s),(0,de.V7)(o===r),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){const i=[],n=new k.S(e.map((e=>e.modified))).subtractFrom(this.modifiedUnchangedRange);let o=this.originalLineNumber,s=this.modifiedLineNumber;const r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(const a of n.ranges){const l=e===n.ranges.length-1;e++;const c=(l?r:a.endLineNumberExclusive)-s,d=new ve(o,s,c,0,0);d.setHiddenModifiedRange(a,t),i.push(d),o=d.originalUnchangedRange.endLineNumberExclusive,s=d.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return k.M.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return k.M.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){const n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),o=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n{this._contextMenuService.showContextMenu({domForShadowRoot:h?i.getDomNode()??void 0:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=o.modified.isEmpty;e.push(new _.rc("diff.clipboard.copyDeletedContent",t?o.original.length>1?(0,A.kg)("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):(0,A.kg)("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):o.original.length>1?(0,A.kg)("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):(0,A.kg)("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(async()=>{const e=this._originalTextModel.getValueInRange(o.original.toExclusiveRange());await this._clipboardService.writeText(e)}))),o.original.length>1&&e.push(new _.rc("diff.clipboard.copyDeletedLineContent",t?(0,A.kg)("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.original.startLineNumber+u):(0,A.kg)("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",o.original.startLineNumber+u),void 0,!0,(async()=>{let e=this._originalTextModel.getLineContent(o.original.startLineNumber+u);if(""===e){const t=this._originalTextModel.getEndOfLineSequence();e=0===t?"\n":"\r\n"}await this._clipboardService.writeText(e)})));const n=i.getOption(92);return n||e.push(new _.rc("diff.inline.revertChange",(0,A.kg)("diff.inline.revertChange.label","Revert this change"),void 0,!0,(async()=>{this._editor.revert(this._diff)}))),e},autoSelectFirstItem:!0})};this._register((0,n.b2)(this._diffActions,"mousedown",(e=>{if(!e.leftButton)return;const{top:t,height:i}=(0,n.BK)(this._diffActions),o=Math.floor(d/3);e.preventDefault(),g(e.posx,t+i+o)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{if(e.event.leftButton&&(8===e.target.type||5===e.target.type)){const t=e.target.detail.viewZoneId;t===this._getViewZoneId()&&(e.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),g(e.event.posx,e.event.posy+d))}})))}_updateLightBulbPosition(e,t,i){const{top:o}=(0,n.BK)(e),s=t-o,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let e=0;for(let t=0;te});function Ee(e,t,i,n){(0,w.M)(n,t.fontInfo);const o=i.length>0,s=new Se.fe(1e4);let r=0,a=0;const l=[];for(let n=0;n');const l=t.getLineContent(),c=N.qL.isBasicASCII(l,o),d=N.qL.containsRTL(l,c,s),u=(0,R.UW)(new R.zL(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,d,0,t,i,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==S.Bc.OFF,null),a);return a.appendString(""),u.characterMapping.getHorizontalOffset(u.characterMapping.length)}var De=i(28753),Re=i(46403),Ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ae=function(e,t){return function(i,n){t(i,n,e)}};let Oe=class extends a.jG{constructor(e,t,i,o,s,r,c,d,u,h){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=o,this._diffEditorWidget=s,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=c,this._modViewZonesToIgnore=d,this._clipboardService=u,this._contextMenuService=h,this._originalTopPadding=(0,l.FY)(this,0),this._originalScrollOffset=(0,l.FY)(this,0),this._originalScrollOffsetAnimated=(0,C.Nu)(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,l.FY)(this,0),this._modifiedScrollOffset=(0,l.FY)(this,0),this._modifiedScrollOffsetAnimated=(0,C.Nu)(this._targetWindow,this._modifiedScrollOffset,this._store);const g=(0,l.FY)("invalidateAlignmentsState",0),p=this._register(new ee.uC((()=>{g.set(g.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(147)||e.hasChanged(67))&&p.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(147)||e.hasChanged(67))&&p.schedule()})));const f=this._diffModel.map((e=>e?(0,l.y0)(this,e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>e?.read(t))),m=(0,l.un)((e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!t||!i)return null;g.read(e);const n=this._options.renderSideBySide.read(e),o=n;return Pe(this._editors.original,this._editors.modified,i.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,o)})),_=(0,l.un)((e=>{const t=this._diffModel.read(e)?.movedTextToCompare.read(e);if(!t)return null;g.read(e);const i=t.changes.map((e=>new _e(e)));return Pe(this._editors.original,this._editors.modified,i,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)}));function v(){const e=document.createElement("div");return e.className="diagonal-fill",e}const S=this._register(new a.Cm);this.viewZones=(0,l.rm)(this,((e,t)=>{S.clear();const i=m.read(e)||[],o=[],r=[],a=this._modifiedTopPadding.read(e);a>0&&r.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:a,showInHiddenAreas:!0,suppressMouseDown:!0});const l=this._originalTopPadding.read(e);l>0&&o.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:l,showInHiddenAreas:!0,suppressMouseDown:!0});const c=this._options.renderSideBySide.read(e),d=c?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer();if(d){const E=this._editors.original.getModel();for(const L of i)if(L.diff)for(let T=L.originalRange.startLineNumber;TE.getLineCount())return{orig:o,mod:r};d?.addRequest(E.getLineContent(T),null,null)}}const u=d?.finalize()??[];let h=0;const g=this._editors.modified.getOption(67),p=this._diffModel.read(e)?.movedTextToCompare.read(e),C=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,k=this._editors.original.getModel()?.mightContainRTL()??!1,x=Te.fromEditor(this._editors.modified);for(const I of i)if(!I.diff||c||this._options.useTrueInlineDiffRendering.read(e)&&Fe(I.diff)){const D=I.modifiedHeightInPx-I.originalHeightInPx;if(D>0){if(p?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(I.originalRange.endLineNumberExclusive-1))continue;o.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:D,showInHiddenAreas:!0,suppressMouseDown:!0})}else{if(p?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(I.modifiedRange.endLineNumberExclusive-1))continue;function R(){const e=document.createElement("div");return e.className="arrow-revert-change "+y.L.asClassName(b.W.arrowRight),t.add((0,n.ko)(e,"mousedown",(e=>e.stopPropagation()))),t.add((0,n.ko)(e,"click",(e=>{e.stopPropagation(),s.revert(I.diff)}))),(0,n.$)("div",{},e)}let A;I.diff&&I.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(e)&&(A=R()),r.push({afterLineNumber:I.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-D,marginDomNode:A,showInHiddenAreas:!0,suppressMouseDown:!0})}}else{if(!I.originalRange.isEmpty){f.read(e);const P=document.createElement("div");P.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const M=this._editors.original.getModel();if(I.originalRange.endLineNumberExclusive-1>M.getLineCount())return{orig:o,mod:r};const F=new Le(I.originalRange.mapToLineArray((e=>M.tokenization.getLineTokens(e))),I.originalRange.mapToLineArray((e=>u[h++])),C,k),B=[];for(const j of I.diff.innerChanges||[])B.push(new N.kI(j.originalRange.delta(-(I.diff.original.startLineNumber-1)),ie.Zb.className,0));const W=Ee(F,x,B,P),H=document.createElement("div");if(H.className="inline-deleted-margin-view-zone",(0,w.M)(H,x.fontInfo),this._options.renderIndicators.read(e))for(let z=0;z(0,te.eU)(V)),H,this._editors.modified,I.diff,this._diffEditorWidget,W.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let $=0;$1&&o.push({afterLineNumber:I.originalRange.startLineNumber+$,domNode:v(),heightInPx:(q-1)*g,showInHiddenAreas:!0,suppressMouseDown:!0})}r.push({afterLineNumber:I.modifiedRange.startLineNumber-1,domNode:P,heightInPx:W.heightInLines*g,minWidthInPx:W.minWidthInPx,marginDomNode:H,setZoneId(e){V=e},showInHiddenAreas:!0,suppressMouseDown:!0})}const O=document.createElement("div");O.className="gutter-delete",o.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:I.modifiedHeightInPx,marginDomNode:O,showInHiddenAreas:!0,suppressMouseDown:!0})}for(const K of _.read(e)??[]){if(!p?.lineRangeMapping.original.intersect(K.originalRange)||!p?.lineRangeMapping.modified.intersect(K.modifiedRange))continue;const G=K.modifiedHeightInPx-K.originalHeightInPx;G>0?o.push({afterLineNumber:K.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:G,showInHiddenAreas:!0,suppressMouseDown:!0}):r.push({afterLineNumber:K.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-G,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:o,mod:r}}));let k=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!k&&(k=!0,this._editors.modified.setScrollLeft(e.scrollLeft),k=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!k&&(k=!0,this._editors.original.setScrollLeft(e.scrollLeft),k=!1)}))),this._originalScrollTop=(0,l.y0)(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.y0)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register((0,l.fm)((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register((0,l.fm)((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register((0,l.fm)((e=>{const t=this._diffModel.read(e)?.movedTextToCompare.read(e);let i=0;if(t){const e=this._editors.original.getTopForLineNumber(t.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get(),n=this._editors.modified.getTopForLineNumber(t.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get();i=n-e}i>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(i,void 0)):i<0?(this._modifiedTopPadding.set(-i,void 0),this._originalTopPadding.set(0,void 0)):setTimeout((()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)}),400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-i,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+i,void 0,!0)})))}};function Pe(e,t,i,n,o,s){const r=new v.j3(Me(e,n)),a=new v.j3(Me(t,o)),l=e.getOption(67),c=t.getOption(67),d=[];let u=0,h=0;function g(e,t){while(1){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const o=i?i.lineNumber-u:Number.MAX_VALUE,s=n?n.lineNumber-h:Number.MAX_VALUE;os?(a.dequeue(),i={lineNumber:n.lineNumber-h+u,heightInPx:0}):(r.dequeue(),a.dequeue()),d.push({originalRange:k.M.ofLength(i.lineNumber,1),modifiedRange:k.M.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:c+n.heightInPx,diff:void 0})}}for(const p of i){const f=p.lineRangeMapping;g(f.original.startLineNumber,f.modified.startLineNumber);let m=!0,_=f.modified.startLineNumber,b=f.original.startLineNumber;function y(e,t,i=!1){if(et.lineNumbere+t.heightInPx),0)??0,u=a.takeWhile((e=>e.lineNumbere+t.heightInPx),0)??0;d.push({originalRange:n,modifiedRange:o,originalHeightInPx:n.length*l+s,modifiedHeightInPx:o.length*c+u,diff:p.lineRangeMapping}),b=e,_=t}if(s)for(const w of f.innerChanges||[]){w.originalRange.startColumn>1&&w.modifiedRange.startColumn>1&&y(w.originalRange.startLineNumber,w.modifiedRange.startLineNumber);const C=e.getModel(),S=w.originalRange.endLineNumber<=C.getLineCount()?C.getLineMaxColumn(w.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;w.originalRange.endColumn1&&n.push({lineNumber:t,heightInPx:r*(e-1)})}for(const n of e.getWhitespaces()){if(t.has(n.id))continue;const e=0===n.afterLineNumber?0:s.convertViewPositionToModelPosition(new E.y(n.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:n.height})}const a=(0,C.Am)(i,n,(e=>e.lineNumber),((e,t)=>({lineNumber:e.lineNumber,heightInPx:e.heightInPx+t.heightInPx})));return a}function Fe(e){return!!e.innerChanges&&e.innerChanges.every((e=>Be(e.modifiedRange)&&Be(e.originalRange)||e.originalRange.equalsRange(new L.Q(1,1,1,1))))}function Be(e){return e.startLineNumber===e.endLineNumber}Oe=Ne([Ae(8,De.h),Ae(9,Re.Z)],Oe);class We extends a.jG{static{this.movedCodeBlockPadding=4}constructor(e,t,i,n,o){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=o,this._originalScrollTop=(0,l.y0)(this,this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.y0)(this,this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=(0,l.yQ)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,l.FY)(this,0),this._modifiedViewZonesChangedSignal=(0,l.yQ)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,l.yQ)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,l.rm)(this,((e,t)=>{this._element.replaceChildren();const i=this._diffModel.read(e),n=i?.diff.read(e)?.movedTexts;if(!n||0===n.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const o=this._originalEditorLayoutInfo.read(e),s=this._modifiedEditorLayoutInfo.read(e);if(!o||!s)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const r=n.map((t=>{function i(e,t){const i=t.getTopForLineNumber(e.startLineNumber,!0),n=t.getTopForLineNumber(e.endLineNumberExclusive,!0);return(i+n)/2}const n=i(t.lineRangeMapping.original,this._editors.original),o=this._originalScrollTop.read(e),s=i(t.lineRangeMapping.modified,this._editors.modified),r=this._modifiedScrollTop.read(e),a=n-o,l=s-r,c=Math.min(n,s),d=Math.max(n,s);return{range:new x.L(c,d),from:a,to:l,fromWithoutScroll:n,toWithoutScroll:s,move:t}}));r.sort((0,v.nH)((0,v.VE)((e=>e.fromWithoutScroll>e.toWithoutScroll),v.TS),(0,v.VE)((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),v.U9)));const a=He.compute(r.map((e=>e.range))),c=10,d=o.verticalScrollbarWidth,u=10*(a.getTrackCount()-1)+2*c,h=d+u+(s.contentLeft-We.movedCodeBlockPadding);let g=0;for(const e of r){const n=a.getTrack(g),o=d+c+10*n,r=15,u=15,p=h,f=s.glyphMarginWidth+s.lineNumbersWidth,m=18,_=document.createElementNS("http://www.w3.org/2000/svg","rect");_.classList.add("arrow-rectangle"),_.setAttribute("x",""+(p-f)),_.setAttribute("y",""+(e.to-m/2)),_.setAttribute("width",`${f}`),_.setAttribute("height",`${m}`),this._element.appendChild(_);const v=document.createElementNS("http://www.w3.org/2000/svg","g"),b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d",`M 0 ${e.from} L ${o} ${e.from} L ${o} ${e.to} L ${p-u} ${e.to}`),b.setAttribute("fill","none"),v.appendChild(b);const y=document.createElementNS("http://www.w3.org/2000/svg","polygon");y.classList.add("arrow"),t.add((0,l.fm)((t=>{b.classList.toggle("currentMove",e.move===i.activeMovedText.read(t)),y.classList.toggle("currentMove",e.move===i.activeMovedText.read(t))}))),y.setAttribute("points",`${p-u},${e.to-r/2} ${p},${e.to} ${p-u},${e.to+r/2}`),v.appendChild(y),this._element.appendChild(v),g++}this.width.set(u,void 0)})),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,a.s)((()=>this._element.remove()))),this._register((0,l.fm)((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-We.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register((0,l.OI)(this._state));const s=(0,l.un)((e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new C.D1((0,l.lk)(e.lineRangeMapping.original.startLineNumber-1),18),modified:new C.D1((0,l.lk)(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register((0,C.Vs)(this._editors.original,s.map((e=>e.map((e=>e.original)))))),this._register((0,C.Vs)(this._editors.modified,s.map((e=>e.map((e=>e.modified)))))),this._register((0,l.yC)(((e,t)=>{const i=s.read(e);for(const e of i)t.add(new Ve(this._editors.original,e.original,e.move,"original",this._diffModel.get())),t.add(new Ve(this._editors.modified,e.modified,e.move,"modified",this._diffModel.get()))})));const r=(0,l.yQ)("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),c=(0,l.yQ)("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let d="modified";this._register((0,l.Y)({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(r)&&(d="original"),e.didChange(c)&&(d="modified"),!0)},(e=>{r.read(e),c.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===d){const t=this._editors.originalCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===d){const t=this._editors.modifiedCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}class He{static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=(0,o.TM)(t,(0,v.VE)((e=>e.intersectWithRangeLength(n)),v.U9)):(e=t.length,t.push(new x.h))}t[e].addRange(n),i.push(e)}return new He(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class Ve extends C.uN{constructor(e,t,i,o,s){const r=(0,n.h)("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=o,this._diffModel=s,this._nodes=(0,n.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,n.h)("div.text-content@textContent"),(0,n.h)("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);const a=(0,l.y0)(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let c;this._register((0,C.AV)(this._nodes.root,{paddingRight:a.map((e=>e.verticalScrollbarWidth))})),c=i.changes.length>0?"original"===this._kind?(0,A.kg)("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,A.kg)("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?(0,A.kg)("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,A.kg)("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const d=this._register(new f.E(this._nodes.actionBar,{highlightToggledItems:!0})),u=new _.rc("",c,"",!1);d.push(u,{icon:!1,label:!0});const h=new _.rc("","Compare",y.L.asClassName(b.W.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register((0,l.fm)((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;h.checked=t}))),d.push(h,{icon:!1,label:!0})}}class je extends a.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),o=this._options.renderIndicators.read(e),s=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const n of i.mappings)if(n.lineRangeMapping.original.isEmpty||r.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:o?ie.Ob:ie.XT}),n.lineRangeMapping.modified.isEmpty||a.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:o?ie.Kl:ie.Zw}),n.lineRangeMapping.modified.isEmpty||n.lineRangeMapping.original.isEmpty)n.lineRangeMapping.original.isEmpty||r.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:ie.KL}),n.lineRangeMapping.modified.isEmpty||a.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:ie.Ou});else{const i=this._options.useTrueInlineDiffRendering.read(e)&&Fe(n.lineRangeMapping);for(const e of n.lineRangeMapping.innerChanges||[])if(n.lineRangeMapping.original.contains(e.originalRange.startLineNumber)&&r.push({range:e.originalRange,options:e.originalRange.isEmpty()&&s?ie.wp:ie.Zb}),n.lineRangeMapping.modified.contains(e.modifiedRange.startLineNumber)&&a.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()&&s&&!i?ie.GM:ie.bk}),i){const i=t.model.original.getValueInRange(e.originalRange);a.push({range:e.modifiedRange,options:{description:"deleted-text",before:{content:i,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(n)for(const e of n.changes){const t=e.original.toInclusiveRange();t&&r.push({range:t,options:o?ie.Ob:ie.XT});const i=e.modified.toInclusiveRange();i&&a.push({range:i,options:o?ie.Kl:ie.Zw});for(const t of e.innerChanges||[])r.push({range:t.originalRange,options:ie.Zb}),a.push({range:t.modifiedRange,options:ie.bk})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const e of i.movedTexts)r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(e===l?" currentMove":""),blockPadding:[We.movedCodeBlockPadding,0,We.movedCodeBlockPadding,We.movedCodeBlockPadding]}}),a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(e===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register((0,C.pY)(this._editors.original,this._decorations.map((e=>e?.originalDecorations||[])))),this._register((0,C.pY)(this._editors.modified,this._decorations.map((e=>e?.modifiedDecorations||[]))))}}var ze=i(53062);class Ue{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=(0,c.dQ)(this,(e=>{const t=this._sashRatio.read(e)??this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(t,e)}),((e,t)=>{const i=this.dimensions.width.get();this._sashRatio.set(e/i,t)})),this._sashRatio=(0,l.FY)(this,void 0)}_computeSashLeft(e,t){const i=this.dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),o=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,s=100;return i<=2*s?n:oi-s?i-s:o}}class $e extends a.jG{constructor(e,t,i,n,o,s){super(),this._domNode=e,this._dimensions=t,this._enabled=i,this._boundarySashes=n,this.sashLeft=o,this._resetSash=s,this._sash=this._register(new ze.m(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()}))),this._register(this._sash.onDidChange((e=>{this.sashLeft.set(this._startSashPosition+(e.currentX-e.startX),void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._resetSash()))),this._register((0,l.fm)((e=>{const t=this._boundarySashes.read(e);t&&(this._sash.orthogonalEndSash=t.bottom)}))),this._register((0,l.fm)((e=>{const t=this._enabled.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()})))}}class qe extends a.jG{constructor(e,t,i){super(),this._editor=e,this._domNode=t,this.itemProvider=i,this.scrollTop=(0,l.y0)(this,this._editor.onDidScrollChange,(e=>this._editor.getScrollTop())),this.isScrollTopZero=this.scrollTop.map((e=>0===e)),this.modelAttached=(0,l.y0)(this,this._editor.onDidChangeModel,(e=>this._editor.hasModel())),this.editorOnDidChangeViewZones=(0,l.yQ)("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=(0,l.yQ)("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=(0,l.Yd)("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const o=this._domNode.appendChild((0,n.h)("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),s=new ResizeObserver((()=>{(0,l.Rn)((e=>{this.domNodeSizeChanged.trigger(e)}))}));s.observe(this._domNode),this._register((0,a.s)((()=>s.disconnect()))),this._register((0,l.fm)((e=>{o.className=this.isScrollTopZero.read(e)?"":"scroll-decoration"}))),this._register((0,l.fm)((e=>this.render(e))))}dispose(){super.dispose(),(0,n.Ln)(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const t=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),n=new Set(this.views.keys()),o=x.L.ofStartAndLength(0,this._domNode.clientHeight);if(!o.isEmpty)for(const s of i){const i=new k.M(s.startLineNumber,s.endLineNumber+1),r=this.itemProvider.getIntersectingGutterItems(i,e);(0,l.Rn)((e=>{for(const s of r){if(!s.range.intersect(i))continue;n.delete(s.id);let r=this.views.get(s.id);if(r)r.item.set(s,e);else{const e=document.createElement("div");this._domNode.appendChild(e);const t=(0,l.FY)("item",s),i=this.itemProvider.createView(t,e);r=new Ke(t,i,e),this.views.set(s.id,r)}const a=s.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(s.range.startLineNumber,!0)-t:this._editor.getBottomForLineNumber(s.range.startLineNumber-1,!1)-t,c=1===s.range.endLineNumberExclusive?Math.max(a,this._editor.getTopForLineNumber(s.range.startLineNumber,!1)-t):Math.max(a,this._editor.getBottomForLineNumber(s.range.endLineNumberExclusive-1,!0)-t),d=c-a;r.domNode.style.top=`${a}px`,r.domNode.style.height=`${d}px`,r.gutterItemView.layout(x.L.ofStartAndLength(a,d),o)}}))}for(const e of n){const t=this.views.get(e);t.gutterItemView.dispose(),t.domNode.remove(),this.views.delete(e)}}}class Ke{constructor(e,t,i){this.item=e,this.gutterItemView=t,this.domNode=i}}var Ge=i(24878),Qe=i(362),Ye=i(33904);class Ze extends Qe.CO{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){const e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new Ye.W(e-1,t)}}var Xe=i(64164),Je=i(6330),et=i(18904),tt=i(41187),it=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},nt=function(e,t){return function(i,n){t(i,n,e)}};const ot=[],st=35;let rt=class extends a.jG{constructor(e,t,i,o,s,r,a,d,u){super(),this._diffModel=t,this._editors=i,this._options=o,this._sashLayout=s,this._boundarySashes=r,this._instantiationService=a,this._contextKeyService=d,this._menuService=u,this._menu=this._register(this._menuService.createMenu(Je.D8.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=(0,l.y0)(this,this._menu.onDidChange,(()=>this._menu.getActions())),this._hasActions=this._actions.map((e=>e.length>0)),this._showSash=(0,l.un)(this,(e=>this._options.renderSideBySide.read(e)&&this._hasActions.read(e))),this.width=(0,l.un)(this,(e=>this._hasActions.read(e)?st:0)),this.elements=(0,n.h)("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:st+"px"}},[]),this._currentDiff=(0,l.un)(this,(e=>{const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e)?.mappings,n=this._editors.modifiedCursor.read(e);return n?i?.find((e=>e.lineRangeMapping.modified.contains(n.lineNumber))):void 0})),this._selectedDiffs=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return ot;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return ot;const o=new k.S(n.map((e=>k.M.fromRangeInclusive(e)))),s=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&o.intersects(e.lineRangeMapping.modified))),r=s.map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>L.Q.areIntersecting(e.modifiedRange,t)))))})));return 0===r.length||r.every((e=>0===e.rangeMappings.length))?ot:r})),this._register((0,C.$y)(e,this.elements.root)),this._register((0,n.ko)(this.elements.root,"click",(()=>{this._editors.modified.focus()}))),this._register((0,C.AV)(this.elements.root,{display:this._hasActions.map((e=>e?"block":"none"))})),(0,c.a0)(this,(t=>{const i=this._showSash.read(t);return i?new $e(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,(0,c.dQ)(this,(e=>this._sashLayout.sashLeft.read(e)-st),((e,t)=>this._sashLayout.sashLeft.set(e+st,t))),(()=>this._sashLayout.resetSash())):void 0})).recomputeInitiallyAndOnChange(this._store),this._register(new qe(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(e,t)=>{const i=this._diffModel.read(t);if(!i)return[];const n=i.diff.read(t);if(!n)return[];const o=this._selectedDiffs.read(t);if(o.length>0){const e=T.wm.fromRangeMappings(o.flatMap((e=>e.rangeMappings)));return[new at(e,!0,Je.D8.DiffEditorSelectionToolbar,void 0,i.model.original.uri,i.model.modified.uri)]}const s=this._currentDiff.read(t);return n.mappings.map((e=>new at(e.lineRangeMapping.withInnerChangesFromLineRanges(),e.lineRangeMapping===s?.lineRangeMapping,Je.D8.DiffEditorHunkToolbar,void 0,i.model.original.uri,i.model.modified.uri)))},createView:(e,t)=>this._instantiationService.createInstance(lt,e,t,this)})),this._register((0,n.ko)(this.elements.gutter,n.Bx.MOUSE_WHEEL,(e=>{this._editors.modified.getOption(104).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1}))}computeStagedValue(e){const t=e.innerChanges??[],i=new Ze(this._editors.modifiedModel.get()),n=new Ze(this._editors.original.getModel()),o=new Qe.mF(t.map((e=>e.toTextEdit(i)))),s=o.apply(n);return s}layout(e){this.elements.gutter.style.left=e+"px"}};rt=it([nt(6,P._Y),nt(7,et.fN),nt(8,Je.ez)],rt);class at{constructor(e,t,i,n,o,s){this.mapping=e,this.showAlways=t,this.menuId=i,this.rangeOverride=n,this.originalUri=o,this.modifiedUri=s}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let lt=class extends a.jG{constructor(e,t,i,o){super(),this._item=e,this._elements=(0,n.h)("div.gutterItem",{style:{height:"20px",width:"34px"}},[(0,n.h)("div.background@background",{},[]),(0,n.h)("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,(e=>e.showAlways)),this._menuId=this._item.map(this,(e=>e.menuId)),this._isSmall=(0,l.FY)(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const s=this._register(o.createInstance(tt.fO,"element",!0,{position:{hoverPosition:1}}));this._register((0,C.rX)(t,this._elements.root)),this._register((0,l.fm)((e=>{const t=this._showAlways.read(e);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",t),setTimeout((()=>{this._elements.root.classList.toggle("noTransition",!1)}),0)}))),this._register((0,l.yC)(((e,t)=>{this._elements.buttons.replaceChildren();const n=t.add(o.createInstance(Xe.m,this._elements.buttons,this._menuId.read(e),{orientation:1,hoverDelegate:s,toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(e)?1:3},hiddenItemStrategy:0,actionRunner:new Ge.I((()=>{const e=this._item.get(),t=e.mapping;return{mapping:t,originalWithModifiedChanges:i.computeStagedValue(t),originalUri:e.originalUri,modifiedUri:e.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));t.add(n.onDidChangeMenuItems((()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)})))})))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let i=this._elements.buttons.clientHeight;this._isSmall.set(1===this._item.get().mapping.original.startLineNumber&&e.length<30,void 0),i=this._elements.buttons.clientHeight;const n=e.length/2-i/2,o=i;let s=e.start+n;const r=x.L.tryCreate(o,t.endExclusive-o-i),a=x.L.tryCreate(e.start+o,e.endExclusive-i-o);a&&r&&a.start=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_t=function(e,t){return function(i,n){t(i,n,e)}};let vt=class extends a.jG{static{ct=this}static{this.ONE_OVERVIEW_WIDTH=15}static{this.ENTIRE_DIFF_OVERVIEW_WIDTH=2*this.ONE_OVERVIEW_WIDTH}constructor(e,t,i,o,s,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=o,this._rootHeight=s,this._modifiedEditorLayoutInfo=r,this._themeService=a,this.width=ct.ENTIRE_DIFF_OVERVIEW_WIDTH;const c=(0,l.y0)(this._themeService.onDidColorThemeChange,(()=>this._themeService.getColorTheme())),d=(0,l.un)((e=>{const t=c.read(e),i=t.getColor(pt.ld8)||(t.getColor(pt.Gj6)||pt.EY1).transparent(2),n=t.getColor(pt.$BZ)||(t.getColor(pt.GNm)||pt.ZEf).transparent(2);return{insertColor:i,removeColor:n}})),u=(0,ut.Z)(document.createElement("div"));u.setClassName("diffViewport"),u.setPosition("absolute");const h=(0,n.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:ct.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register((0,C.rX)(h,u.domNode)),this._register((0,n.b2)(h,n.Bx.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),this._register((0,n.ko)(h,n.Bx.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),this._register((0,C.rX)(this._rootElement,h)),this._register((0,l.yC)(((e,t)=>{const i=this._diffModel.read(e),n=this._editors.original.createOverviewRuler("original diffOverviewRuler");n&&(t.add(n),t.add((0,C.rX)(h,n.getDomNode())));const o=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(o&&(t.add(o),t.add((0,C.rX)(h,o.getDomNode()))),!n||!o)return;const s=(0,l.yQ)("viewZoneChanged",this._editors.original.onDidChangeViewZones),r=(0,l.yQ)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),a=(0,l.yQ)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),c=(0,l.yQ)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add((0,l.fm)((e=>{s.read(e),r.read(e),a.read(e),c.read(e);const t=d.read(e),l=i?.diff.read(e)?.mappings;function u(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new E.y(e.startLineNumber,1)),o=n.coordinatesConverter.convertModelPositionToViewPosition(new E.y(e.endLineNumberExclusive,1)),s=o.lineNumber-i.lineNumber;return new gt.iE(i.lineNumber,o.lineNumber,s,t.toString())})):[]}const h=u((l||[]).map((e=>e.lineRangeMapping.original)),t.removeColor,this._editors.original),g=u((l||[]).map((e=>e.lineRangeMapping.modified)),t.insertColor,this._editors.modified);n?.setZones(h),o?.setZones(g)}))),t.add((0,l.fm)((e=>{const t=this._rootHeight.read(e),i=this._rootWidth.read(e),s=this._modifiedEditorLayoutInfo.read(e);if(s){const i=ct.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ct.ONE_OVERVIEW_WIDTH;n.setLayout({top:0,height:t,right:i+ct.ONE_OVERVIEW_WIDTH,width:ct.ONE_OVERVIEW_WIDTH}),o.setLayout({top:0,height:t,right:0,width:ct.ONE_OVERVIEW_WIDTH});const r=this._editors.modifiedScrollTop.read(e),a=this._editors.modifiedScrollHeight.read(e),l=this._editors.modified.getOption(104),c=new ht.m(l.verticalHasArrows?l.arrowSize:0,l.verticalScrollbarSize,0,s.height,a,r);u.setTop(c.getSliderPosition()),u.setHeight(c.getSliderSize())}else u.setTop(0),u.setHeight(0);h.style.height=t+"px",h.style.left=i-ct.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",u.setWidth(ct.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))}};vt=ct=mt([_t(6,ft.Gy)],vt);var bt=i(84653),yt=i(9322);const wt=[];class Ct extends a.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return wt;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return wt;const o=new k.S(n.map((e=>k.M.fromRangeInclusive(e)))),s=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&o.intersects(e.lineRangeMapping.modified))),r=s.map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>L.Q.areIntersecting(e.modifiedRange,t)))))})));return 0===r.length||r.every((e=>0===e.rangeMappings.length))?wt:r})),this._register((0,l.yC)(((e,t)=>{if(!this._options.shouldRenderOldRevertArrows.read(e))return;const i=this._diffModel.read(e),n=i?.diff.read(e);if(!i||!n)return;if(i.movedTextToCompare.read(e))return;const o=[],s=this._selectedDiffs.read(e),r=new Set(s.map((e=>e.mapping)));if(s.length>0){const i=this._editors.modifiedSelections.read(e),n=t.add(new St(i[i.length-1].positionLineNumber,this._widget,s.flatMap((e=>e.rangeMappings)),!0));this._editors.modified.addGlyphMarginWidget(n),o.push(n)}for(const e of n.mappings)if(!r.has(e)&&!e.lineRangeMapping.modified.isEmpty&&e.lineRangeMapping.innerChanges){const i=t.add(new St(e.lineRangeMapping.modified.startLineNumber,this._widget,e.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(i),o.push(i)}t.add((0,a.s)((()=>{for(const e of o)this._editors.modified.removeGlyphMarginWidget(e)})))})))}}class St extends a.jG{static{this.counter=0}getId(){return this._id}constructor(e,t,i,o){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=o,this._id="revertButton"+St.counter++,this._domNode=(0,n.h)("div.revertButton",{title:this._revertSelection?(0,A.kg)("revertSelectedChanges","Revert Selected Changes"):(0,A.kg)("revertChange","Revert Change")},[(0,bt.s)(b.W.arrowRight)]).root,this._register((0,n.ko)(this._domNode,n.Bx.MOUSE_DOWN,(e=>{2!==e.button&&(e.stopPropagation(),e.preventDefault())}))),this._register((0,n.ko)(this._domNode,n.Bx.MOUSE_UP,(e=>{e.stopPropagation(),e.preventDefault()}))),this._register((0,n.ko)(this._domNode,n.Bx.CLICK,(e=>{this._diffs instanceof T.WL?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),e.stopPropagation(),e.preventDefault()})))}getDomNode(){return this._domNode}getPosition(){return{lane:yt.ZS.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}var kt=i(5480),xt=i(69483),Et=i(57479),Lt=i(48836),Tt=i(44838),It=i(55745),Dt=i(13046),Rt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Nt=function(e,t){return function(i,n){t(i,n,e)}};let At=class extends a.jG{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,o,s,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._argCodeEditorWidgetOptions=n,this._createInnerEditor=o,this._instantiationService=s,this._keybindingService=a,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new r.vl),this.modifiedScrollTop=(0,l.y0)(this,this.modified.onDidScrollChange,(()=>this.modified.getScrollTop())),this.modifiedScrollHeight=(0,l.y0)(this,this.modified.onDidScrollChange,(()=>this.modified.getScrollHeight())),this.modifiedObs=(0,It.Ud)(this.modified),this.originalObs=(0,It.Ud)(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=(0,l.y0)(this,this.modified.onDidChangeCursorSelection,(()=>this.modified.getSelections()??[])),this.modifiedCursor=(0,l.C)({owner:this,equalsFn:E.y.equals},(e=>this.modifiedSelections.read(e)[0]?.getPosition()??new E.y(1,1))),this.originalCursor=(0,l.y0)(this,this.original.onDidChangeCursorPosition,(()=>this.original.getPosition()??new E.y(1,1))),this._argCodeEditorWidgetOptions=null,this._register((0,l.Y)({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const o=this._createInnerEditor(e,t,i,n);return this._register(o.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+vt.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),o}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=S.qB.revealHorizontalRightPadding.defaultValue+vt.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");const t=(0,A.kg)("diff-aria-navigation-tip"," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};At=Rt([Nt(5,P._Y),Nt(6,Dt.b)],At);class Ot extends a.jG{constructor(){super(...arguments),this._id=++Ot.idCounter,this._onDidDispose=this._register(new r.vl),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}var Pt=i(79741),Mt=i(20670),Ft=i(17300),Bt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Wt=function(e,t){return function(i,n){t(i,n,e)}};let Ht=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=(0,l.FY)(this,0),this._screenReaderMode=(0,l.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this.couldShowInlineViewBecauseOfSize=(0,l.un)(this,(e=>this._options.read(e).renderSideBySide&&this._diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=(0,l.un)(this,(e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=(0,l.un)(this,(e=>(!this.compactMode.read(e)||!this.shouldRenderInlineViewInSmartMode.read(e))&&(this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)&&!this._screenReaderMode.read(e))))),this.readOnly=(0,l.un)(this,(e=>this._options.read(e).readOnly)),this.shouldRenderOldRevertArrows=(0,l.un)(this,(e=>!!this._options.read(e).renderMarginRevertIcon&&(!!this.renderSideBySide.read(e)&&(!this.readOnly.read(e)&&!this.shouldRenderGutterMenu.read(e))))),this.shouldRenderGutterMenu=(0,l.un)(this,(e=>this._options.read(e).renderGutterMenu)),this.renderIndicators=(0,l.un)(this,(e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=(0,l.un)(this,(e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=(0,l.un)(this,(e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=(0,l.un)(this,(e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=(0,l.un)(this,(e=>this._options.read(e).maxComputationTime)),this.showMoves=(0,l.un)(this,(e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=(0,l.un)(this,(e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=(0,l.un)(this,(e=>this._options.read(e).diffWordWrap)),this.originalEditable=(0,l.un)(this,(e=>this._options.read(e).originalEditable)),this.diffCodeLens=(0,l.un)(this,(e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=(0,l.un)(this,(e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=(0,l.un)(this,(e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=(0,l.un)(this,(e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=(0,l.un)(this,(e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.compactMode=(0,l.un)(this,(e=>this._options.read(e).compactMode)),this.trueInlineDiffRenderingEnabled=(0,l.un)(this,(e=>this._options.read(e).experimental.useTrueInlineView)),this.useTrueInlineDiffRendering=(0,l.un)(this,(e=>!this.renderSideBySide.read(e)&&this.trueInlineDiffRenderingEnabled.read(e))),this.hideUnchangedRegions=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsMinimumLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.minimumLineCount)),this._model=(0,l.FY)(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,(e=>(0,Pt.t)(this,(t=>{const i=e?.diff.read(t);return i?Vt(i,this.trueInlineDiffRenderingEnabled.read(t)):void 0})))).flatten().map(this,(e=>!!e)),this.inlineViewHideOriginalLineNumbers=this.compactMode;const i={...e,...Ut(e,Mt.q)};this._options=(0,l.FY)(this,i)}updateOptions(e){const t=Ut(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};function Vt(e,t){return e.mappings.every((e=>jt(e.lineRangeMapping)||zt(e.lineRangeMapping)||t&&Fe(e.lineRangeMapping)))}function jt(e){return 0===e.original.length}function zt(e){return 0===e.modified.length}function Ut(e,t){return{enableSplitViewResizing:(0,S.zM)(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:(0,S.ls)(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,S.zM)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,S.zM)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,S.wA)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,S.wA)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,S.zM)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,S.zM)(e.renderIndicators,t.renderIndicators),originalEditable:(0,S.zM)(e.originalEditable,t.originalEditable),diffCodeLens:(0,S.zM)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,S.zM)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(0,S.O4)(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,S.O4)(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,S.zM)(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:(0,S.zM)(e.experimental?.showMoves,t.experimental.showMoves),showEmptyDecorations:(0,S.zM)(e.experimental?.showEmptyDecorations,t.experimental.showEmptyDecorations),useTrueInlineView:(0,S.zM)(e.experimental?.useTrueInlineView,t.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:(0,S.zM)(e.hideUnchangedRegions?.enabled??e.experimental?.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:(0,S.wA)(e.hideUnchangedRegions?.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,S.wA)(e.hideUnchangedRegions?.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,S.wA)(e.hideUnchangedRegions?.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,S.zM)(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,S.zM)(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,S.wA)(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,S.zM)(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited),renderGutterMenu:(0,S.zM)(e.renderGutterMenu,t.renderGutterMenu),compactMode:(0,S.zM)(e.compactMode,t.compactMode)}}Ht=Bt([Wt(1,Ft.j)],Ht);var $t=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},qt=function(e,t){return function(i,n){t(i,n,e)}};let Kt=class extends Ot{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,o,d,u,g,p){super(),this._domElement=e,this._parentContextKeyService=o,this._parentInstantiationService=d,this._accessibilitySignalService=g,this._editorProgressService=p,this.elements=(0,n.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,n.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register((0,l.X2)(this,void 0)),this._diffModel=(0,l.un)(this,(e=>this._diffModelSrc.read(e)?.object)),this.onDidChangeModel=r.Jh.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new Lt.a([et.fN,this._contextKeyService]))),this._boundarySashes=(0,l.FY)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,l.FY)(this,!1),this._accessibleDiffViewerVisible=(0,l.un)(this,(e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this._movedBlocksLinesPart=(0,l.FY)(this,void 0),this._layoutInfo=(0,l.un)(this,(e=>{const t=this._rootSizeObserver.width.read(e),i=this._rootSizeObserver.height.read(e);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=i+"px";const n=this._sash.read(e),o=this._gutter.read(e),s=o?.width.read(e)??0,r=this._overviewRulerPart.read(e)?.width??0;let a,l,c,d,u;const h=!!n;if(h){const i=n.sashLeft.read(e),o=this._movedBlocksLinesPart.read(e)?.width.read(e)??0;a=0,l=i-s-o,u=i-s,c=i,d=t-c-r}else{u=0;const i=this._options.inlineViewHideOriginalLineNumbers.read(e);a=s,l=i?0:Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(e)),c=s+l,d=t-c-r}return this.elements.original.style.left=a+"px",this.elements.original.style.width=l+"px",this._editors.original.layout({width:l,height:i},!0),o?.layout(u),this.elements.modified.style.left=c+"px",this.elements.modified.style.width=d+"px",this._editors.modified.layout({width:d,height:i},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>e?.diff.read(t))),this.onDidUpdateDiff=r.Jh.fromObservableLight(this._diffValue),u.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,a.s)((()=>this.elements.root.remove()))),this._rootSizeObserver=this._register(new C.pN(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(Ht,t),this._register((0,l.fm)((e=>{this._options.setWidth(this._rootSizeObserver.width.read(e))}))),this._contextKeyService.createKey(Et.R.isEmbeddedDiffEditor.key,!1),this._register((0,kt.w)(Et.R.isEmbeddedDiffEditor,this._contextKeyService,(e=>this._options.isInEmbeddedEditor.read(e)))),this._register((0,kt.w)(Et.R.comparingMovedCode,this._contextKeyService,(e=>!!this._diffModel.read(e)?.movedTextToCompare.read(e)))),this._register((0,kt.w)(Et.R.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,(e=>this._options.couldShowInlineViewBecauseOfSize.read(e)))),this._register((0,kt.w)(Et.R.diffEditorInlineMode,this._contextKeyService,(e=>!this._options.renderSideBySide.read(e)))),this._register((0,kt.w)(Et.R.hasChanges,this._contextKeyService,(e=>(this._diffModel.read(e)?.diff.read(e)?.mappings.length??0)>0))),this._editors=this._register(this._instantiationService.createInstance(At,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._register((0,kt.w)(Et.R.diffEditorOriginalWritable,this._contextKeyService,(e=>this._options.originalEditable.read(e)))),this._register((0,kt.w)(Et.R.diffEditorModifiedWritable,this._contextKeyService,(e=>!this._options.readOnly.read(e)))),this._register((0,kt.w)(Et.R.diffEditorOriginalUri,this._contextKeyService,(e=>this._diffModel.read(e)?.model.original.uri.toString()??""))),this._register((0,kt.w)(Et.R.diffEditorModifiedUri,this._contextKeyService,(e=>this._diffModel.read(e)?.model.modified.uri.toString()??""))),this._overviewRulerPart=(0,c.a0)(this,(e=>this._options.renderOverviewRuler.read(e)?this._instantiationService.createInstance((0,se.b)(vt,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor))):void 0)).recomputeInitiallyAndOnChange(this._store);const f={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>e-(this._overviewRulerPart.read(t)?.width??0)))};this._sashLayout=new Ue(this._options,f),this._sash=(0,c.a0)(this,(e=>{const t=this._options.renderSideBySide.read(e);return this.elements.root.classList.toggle("side-by-side",t),t?new $e(this.elements.root,f,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,(()=>this._sashLayout.resetSash())):void 0})).recomputeInitiallyAndOnChange(this._store);const m=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(dt.N,e),this._editors,this._diffModel,this._options))).recomputeInitiallyAndOnChange(this._store);(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(je,e),this._editors,this._diffModel,this._options,this))).recomputeInitiallyAndOnChange(this._store);const _=new Set,v=new Set;let b=!1;const y=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(Oe,e),(0,n.zk)(this._domElement),this._editors,this._diffModel,this._options,this,(()=>b||m.get().isUpdatingHiddenAreas),_,v))).recomputeInitiallyAndOnChange(this._store),w=(0,l.un)(this,(e=>{const t=y.read(e).viewZones.read(e).orig,i=m.read(e).viewZones.read(e).origViewZones;return t.concat(i)})),S=(0,l.un)(this,(e=>{const t=y.read(e).viewZones.read(e).mod,i=m.read(e).viewZones.read(e).modViewZones;return t.concat(i)}));let k;this._register((0,C.Vs)(this._editors.original,w,(e=>{b=e}),_)),this._register((0,C.Vs)(this._editors.modified,S,(e=>{b=e,b?k=h.D.capture(this._editors.modified):(k?.restore(this._editors.modified),k=void 0)}),v)),this._accessibleDiffViewer=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(j,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>e?.diff.read(t)?.mappings.map((e=>e.lineRangeMapping)))),new J(this._editors)))).recomputeInitiallyAndOnChange(this._store);const x=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register((0,C.AV)(this.elements.modified,{visibility:x})),this._register((0,C.AV)(this.elements.original,{visibility:x})),this._createDiffEditorContributions(),u.addDiffEditor(this),this._gutter=(0,c.a0)(this,(e=>this._options.shouldRenderGutterMenu.read(e)?this._instantiationService.createInstance((0,se.b)(rt,e),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0)),this._register((0,l.OI)(this._layoutInfo)),(0,c.a0)(this,(e=>new((0,se.b)(We,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors))).recomputeInitiallyAndOnChange(this._store,(e=>{this._movedBlocksLinesPart.set(e,void 0)})),this._register(r.Jh.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!0)))),this._register(r.Jh.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!1))));const E=this._diffModel.map(this,((e,t)=>{if(e)return void 0===e.diff.read(t)&&!e.isDiffUpToDate.read(t)}));this._register((0,l.yC)(((e,t)=>{if(!0===E.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add((0,a.s)((()=>e.done())))}}))),this._register((0,l.yC)(((e,t)=>{t.add(new((0,se.b)(Ct,e))(this._editors,this._diffModel,this._options,this))}))),this._register((0,l.yC)(((e,t)=>{const i=this._diffModel.read(e);if(i)for(const e of[i.model.original,i.model.modified])t.add(e.onWillDispose((e=>{(0,s.dz)(new s.D7("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)})))}))),this._register((0,l.fm)((e=>{this._options.setModel(this._diffModel.read(e))})))}_createInnerEditor(e,t,i,n){const o=e.createInstance(g.x,t,i,n);return o}_createDiffEditorContributions(){const e=d.dS.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(e){(0,s.dz)(e)}}get _targetEditor(){return this._editors.modified}getEditorType(){return xt._.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){const e=this._editors.original.saveViewState(),t=this._editors.modified.saveViewState();return{original:e,modified:t,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._editors.original.restoreViewState(t.original),this._editors.modified.restoreViewState(t.modified),t.modelState&&this._diffModel.get()?.restoreSerializedState(t.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(ge,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){const t=e?"model"in e?C.O8.create(e).createNewRef(this):C.O8.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){const i=this._diffModel.get();!e&&i&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&(0,l.PO)(t,(t=>{const i=e?.object;l.y0.batchEventsGlobally(t,(()=>{this._editors.original.setModel(i?i.model.original:null),this._editors.modified.setModel(i?i.model.modified:null)}));const n=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),t),setTimeout((()=>{n?.dispose()}),0)}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){const e=this._diffModel.get()?.diff.get();return e?Gt(e):null}revert(e){const t=this._diffModel.get();t&&t.isDiffUpToDate.get()&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map((e=>({range:e.modifiedRange,text:t.model.original.getValueInRange(e.originalRange)})));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new E.y(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){const t=this._diffModel.get()?.diff.get()?.mappings;if(!t||0===t.length)return;const i=this._editors.modified.getPosition().lineNumber;let n;n="next"===e?t.find((e=>e.lineRangeMapping.modified.startLineNumber>i))??t[0]:(0,o.Uk)(t,(e=>e.lineRangeMapping.modified.startLineNumber{const t=e.diff.get()?.mappings;t&&0!==t.length&&this._goTo(t[0])}))}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){const e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,i=e?this._editors.original:this._editors.modified;let n;const o=t.getSelection();if(o){const t=this._diffModel.get()?.diff.get()?.mappings.map((t=>e?t.lineRangeMapping.flip():t.lineRangeMapping));if(t){const e=(0,C.Mu)(o.getStartPosition(),t),i=(0,C.Mu)(o.getEndPosition(),t);n=L.Q.plusRange(e,i)}}return{destination:i,destinationSelection:n}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&(0,l.Rn)((t=>{for(const i of e)i.collapseAll(t)}))}showAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&(0,l.Rn)((t=>{for(const i of e)i.showAll(t)}))}_handleCursorPositionChange(e,t){if(3===e?.reason){const i=this._diffModel.get()?.diff.get()?.mappings.find((i=>t?i.lineRangeMapping.modified.contains(e.position.lineNumber):i.lineRangeMapping.original.contains(e.position.lineNumber)));i?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(O.Rh.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):i?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(O.Rh.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):i&&this._accessibilitySignalService.playSignal(O.Rh.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};function Gt(e){return e.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,o,s,r=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,r=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(o=t.modified.startLineNumber-1,s=0,r=void 0):(o=t.modified.startLineNumber,s=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:o,modifiedEndLineNumber:s,charChanges:r?.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}}))}Kt=$t([qt(3,et.fN),qt(4,P._Y),qt(5,u.T),qt(6,O.Nt),qt(7,Tt.N8)],Kt)},41843:(e,t,i)=>{"use strict";i.d(t,{Hg:()=>p});var n,o=i(59857),s=i(87778),r=i(40231),a=i(84240),l=i(44544),c=i(93866),d=i(4117),u=i(11086),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};const p=(0,s.u1)("diffProviderFactoryService");let f=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(m,e)}};f=h([g(0,s._Y)],f),(0,o.v)(p,f,1);let m=class{static{n=this}static{this.diffCache=new Map}constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new r.vl,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,i,o){if("string"!==typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,o);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new c.wm(new l.M(1,2),new l.M(1,t.getLineCount()+1),[new c.q6(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const s=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),d=n.diffCache.get(s);if(d&&d.context===r)return d.result;const u=a.W.create(),h=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),g=u.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:g,timedOut:h?.quitEarly??!0,detectedMoves:i.computeMoves?h?.moves.length??0:-1}),o.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!h)throw new Error("no diff result available");return n.diffCache.size>10&&n.diffCache.delete(n.diffCache.keys().next().value),n.diffCache.set(s,{result:h,context:r}),h}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!==typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),t=!0),t&&this.onDidChangeEventEmitter.fire()}};m=n=h([g(1,d.IEditorWorkerService),g(2,u.k)],m)},39352:(e,t,i)=>{"use strict";i.d(t,{N:()=>S});var n,o=i(2150),s=i(84653),r=i(25923),a=i(42325),l=i(5091),c=i(39751),d=i(42389),u=i(23740),h=i(50322),g=i(55745),p=i(78787),f=i(44544),m=i(36788),_=i(8690),v=i(35350),b=i(41337),y=i(87778),w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};let S=class extends l.jG{static{n=this}static{this._breadcrumbsSourceFactory=(0,c.FY)(n,(()=>({dispose(){},getBreadcrumbItems(e,t){return[]}})))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,o){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=o,this._modifiedOutlineSource=(0,d.a0)(this,(e=>{const t=this._editors.modifiedModel.read(e),i=n._breadcrumbsSourceFactory.read(e);return t&&i?i(t,this._instantiationService):void 0})),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();(0,c.Rn)((e=>{for(const i of this._editors.original.getSelections()||[])t?.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,0,e)}))}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();(0,c.Rn)((e=>{for(const i of this._editors.modified.getSelections()||[])t?.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,0,e)}))})));const s=this._diffModel.map(((e,t)=>{const i=e?.unchangedRegions.read(t)??[];return 1===i.length&&1===i[0].modifiedLineNumber&&i[0].lineCount===this._editors.modifiedModel.read(t)?.getLineCount()?[]:i}));this.viewZones=(0,c.rm)(this,((e,t)=>{const i=this._modifiedOutlineSource.read(e);if(!i)return{origViewZones:[],modViewZones:[]};const n=[],o=[],r=this._options.renderSideBySide.read(e),a=this._options.compactMode.read(e),l=s.read(e);for(let s=0;sd.getHiddenOriginalRange(e).startLineNumber-1)),i=new p.D1(e,12);n.push(i),t.add(new k(this._editors.original,i,d,!r))}{const e=(0,c.un)(this,(e=>d.getHiddenModifiedRange(e).startLineNumber-1)),i=new p.D1(e,12);o.push(i),t.add(new k(this._editors.modified,i,d))}}else{{const e=(0,c.un)(this,(e=>d.getHiddenOriginalRange(e).startLineNumber-1)),o=new p.D1(e,24);n.push(o),t.add(new x(this._editors.original,o,d,d.originalUnchangedRange,!r,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}{const e=(0,c.un)(this,(e=>d.getHiddenModifiedRange(e).startLineNumber-1)),n=new p.D1(e,24);o.push(n),t.add(new x(this._editors.modified,n,d,d.modifiedUnchangedRange,!1,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}}}return{origViewZones:n,modViewZones:o}}));const l={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},g={description:"Fold Unchanged",glyphMarginHoverMessage:new a.Bc(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,b.kg)("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+u.L.asClassName(r.W.fold),zIndex:10001};this._register((0,p.pY)(this._editors.original,(0,c.un)(this,(e=>{const t=s.read(e),i=t.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:_.Q.fromPositions(new m.y(n.originalLineNumber,1)),options:g});return i})))),this._register((0,p.pY)(this._editors.modified,(0,c.un)(this,(e=>{const t=s.read(e),i=t.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:f.M.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:g});return i})))),this._register((0,c.fm)((e=>{const t=s.read(e);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(h.O9)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(h.O9))}finally{this._isUpdatingHiddenAreas=!1}}))),this._register(this._editors.modified.onMouseUp((e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};S=n=w([C(3,y._Y)],S);class k extends p.uN{constructor(e,t,i,n=!1){const s=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,s.root),this._unchangedRegion=i,this._hide=n,this._nodes=(0,o.h)("div.diff-hidden-lines-compact",[(0,o.h)("div.line-left",[]),(0,o.h)("div.text@text",[]),(0,o.h)("div.line-right",[])]),s.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register((0,c.fm)((e=>{if(!this._hide){const t=this._unchangedRegion.getHiddenModifiedRange(e).length,i=(0,b.kg)("hiddenLines","{0} hidden lines",t);this._nodes.text.innerText=i}})))}}class x extends p.uN{constructor(e,t,i,n,a,l,d,u){const h=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,h.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=a,this._modifiedOutlineSource=l,this._revealModifiedHiddenLine=d,this._options=u,this._nodes=(0,o.h)("div.diff-hidden-lines",[(0,o.h)("div.top@top",{title:(0,b.kg)("diff.hiddenLines.top","Click or drag to show more above")}),(0,o.h)("div.center@content",{style:{display:"flex"}},[(0,o.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,o.$)("a",{title:(0,b.kg)("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,s.n)("$(unfold)"))]),(0,o.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,o.h)("div.bottom@bottom",{title:(0,b.kg)("diff.bottom","Click or drag to show more below"),role:"button"})]),h.root.appendChild(this._nodes.root),this._hide?(0,o.Ln)(this._nodes.first):this._register((0,p.AV)(this._nodes.first,{width:(0,g.Ud)(this._editor).layoutInfoContentLeft})),this._register((0,c.fm)((e=>{const t=this._unchangedRegion.visibleLineCountTop.read(e)+this._unchangedRegion.visibleLineCountBottom.read(e)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!t),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),this._nodes.top.classList.toggle("canMoveBottom",!t);const i=this._unchangedRegion.isDragged.read(e),n=this._editor.getDomNode();n&&(n.classList.toggle("draggingUnchangedRegion",!!i),"top"===i?(n.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),n.classList.toggle("canMoveBottom",!t)):"bottom"===i?(n.classList.toggle("canMoveTop",!t),n.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0)):(n.classList.toggle("canMoveTop",!1),n.classList.toggle("canMoveBottom",!1)))})));const f=this._editor;this._register((0,o.ko)(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const s=(0,o.zk)(this._nodes.top),r=(0,o.ko)(s,"mousemove",(e=>{const o=e.clientY,s=o-t;i=i||Math.abs(s)>2;const r=Math.round(s/f.getOption(67)),a=Math.max(0,Math.min(n+r,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(a,void 0)})),a=(0,o.ko)(s,"mouseup",(e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),r.dispose(),a.dispose()}))}))),this._register((0,o.ko)(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const s=(0,o.zk)(this._nodes.bottom),r=(0,o.ko)(s,"mousemove",(e=>{const o=e.clientY,s=o-t;i=i||Math.abs(s)>2;const r=Math.round(s/f.getOption(67)),a=Math.max(0,Math.min(n-r,this._unchangedRegion.getMaxVisibleLineCountBottom())),l=this._unchangedRegionRange.endLineNumberExclusive>f.getModel().getLineCount()?f.getContentHeight():f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(a,void 0);const c=this._unchangedRegionRange.endLineNumberExclusive>f.getModel().getLineCount()?f.getContentHeight():f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);f.setScrollTop(f.getScrollTop()+(c-l))})),a=(0,o.ko)(s,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!i){const e=f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);f.setScrollTop(f.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),r.dispose(),a.dispose()}))}))),this._register((0,c.fm)((e=>{const t=[];if(!this._hide){const n=i.getHiddenModifiedRange(e).length,a=(0,b.kg)("hiddenLines","{0} hidden lines",n),l=(0,o.$)("span",{title:(0,b.kg)("diff.hiddenLines.expandAll","Double click to unfold")},a);l.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))})),t.push(l);const c=this._unchangedRegion.getHiddenModifiedRange(e),d=this._modifiedOutlineSource.getBreadcrumbItems(c,e);if(d.length>0){t.push((0,o.$)("span",void 0,"  |  "));for(let e=0;e{this._revealModifiedHiddenLine(i.startLineNumber)}}}}(0,o.Ln)(this._nodes.others,...t)})))}}},88402:(e,t,i)=>{"use strict";i.d(t,{GM:()=>_,KL:()=>b,Kl:()=>u,Ob:()=>h,Ou:()=>m,XT:()=>p,Zb:()=>v,Zw:()=>g,bk:()=>f,dv:()=>d,wp:()=>y});var n=i(25923),o=i(23740),s=i(35037),r=i(41337),a=i(66344),l=i(48401);(0,a.x1A)("diffEditor.move.border","#8b8b8b9c",(0,r.kg)("diffEditor.move.border","The border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.moveActive.border","#FFA500",(0,r.kg)("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},(0,r.kg)("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));const c=(0,l.pU)("diff-insert",n.W.add,(0,r.kg)("diffInsertIcon","Line decoration for inserts in the diff editor.")),d=(0,l.pU)("diff-remove",n.W.remove,(0,r.kg)("diffRemoveIcon","Line decoration for removals in the diff editor.")),u=s.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+o.L.asClassName(c),marginClassName:"gutter-insert"}),h=s.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+o.L.asClassName(d),marginClassName:"gutter-delete"}),g=s.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),p=s.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),f=s.kI.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),m=s.kI.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),_=s.kI.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),v=s.kI.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),b=s.kI.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),y=s.kI.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})},78787:(e,t,i)=>{"use strict";i.d(t,{$y:()=>p,AV:()=>w,Am:()=>u,D1:()=>b,EK:()=>E,MZ:()=>S,Mu:()=>k,Nu:()=>m,O8:()=>L,Vs:()=>C,pN:()=>f,pY:()=>h,rX:()=>g,uN:()=>v});var n=i(43654),o=i(67792),s=i(5091),r=i(39751),a=i(87550),l=i(36788),c=i(8690),d=i(33904);function u(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const o=[];let s=0,r=0;while(sd?(o.push(l),r++):(o.push(n(a,l)),s++,r++)}while(s`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function g(e,t){return e.appendChild(t),(0,s.s)((()=>{t.remove()}))}function p(e,t){return e.prepend(t),(0,s.s)((()=>{t.remove()}))}class f extends s.jG{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new a.u(e,t)),this._width=(0,r.FY)(this,this.elementSizeObserver.getWidth()),this._height=(0,r.FY)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>(0,r.Rn)((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function m(e,t,i){let n=t.get(),o=n,s=n;const a=(0,r.FY)("animatedValue",n);let l=-1;const c=300;let d;function u(){const t=Date.now()-l;s=Math.floor(_(t,o,n-o,c)),t({animate:!1}),handleChange:(e,i)=>(e.didChange(t)&&(i.animate=i.animate||e.change),!0)},((i,r)=>{void 0!==d&&(e.cancelAnimationFrame(d),d=void 0),o=s,n=t.read(i),l=Date.now()-(r.animate?0:c),u()}))),a}function _(e,t,i,n){return e===n?t+i:i*(1-Math.pow(2,-10*e/n))+t}class v extends s.jG{constructor(e,t,i){super(),this._register(new y(e,i)),this._register(w(i,{height:t.actualHeight,top:t.actualTop}))}}class b{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=(0,r.FY)(this,void 0),this._actualHeight=(0,r.FY)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class y{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+y._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function w(e,t){return(0,r.fm)((i=>{for(let[n,o]of Object.entries(t))o&&"object"===typeof o&&"read"in o&&(o=o.read(i)),"number"===typeof o&&(o=`${o}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=o}))}function C(e,t,i,n){const o=new s.Cm,a=[];return o.add((0,r.yC)(((o,s)=>{const l=t.read(o),c=new Map,d=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of a)e.removeZone(t),n?.delete(t);a.length=0;for(const t of l){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),a.push(i),n?.add(i),c.set(t,i)}})),i&&i(!1),s.add((0,r.Y)({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(e,t){const i=d.get(e.changedObservable);return void 0!==i&&t.zoneIds.push(i),!0}},((t,n)=>{for(const e of l)e.onChange&&(d.set(e.onChange,c.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n.zoneIds)e.layoutZone(t)})),i&&i(!1)})))}))),o.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of a)e.removeZone(t)})),n?.clear(),i&&i(!1)}}),o}class S extends o.Qi{dispose(){super.dispose(!0)}}function k(e,t){const i=(0,n.Uk)(t,(t=>t.original.startLineNumber<=e.lineNumber));if(!i)return c.Q.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){const t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return c.Q.fromPositions(new l.y(t,e.column))}if(!i.innerChanges)return c.Q.fromPositions(new l.y(i.modified.startLineNumber,1));const o=(0,n.Uk)(i.innerChanges,(t=>t.originalRange.getStartPosition().isBeforeOrEqual(e)));if(!o){const t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return c.Q.fromPositions(new l.y(t,e.column))}if(o.originalRange.containsPosition(e))return o.modifiedRange;{const t=x(o.originalRange.getEndPosition(),e);return c.Q.fromPositions(t.addToPosition(o.modifiedRange.getEndPosition()))}}function x(e,t){return e.lineNumber===t.lineNumber?new d.W(0,t.column-e.column):new d.W(t.lineNumber-e.lineNumber,t.column-1)}function E(e,t){let i;return e.filter((e=>{const n=t(e,i);return i=e,n}))}class L{static create(e,t=void 0){return new T(e,e,t)}static createWithDisposable(e,t,i=void 0){const n=new s.Cm;return n.add(t),n.add(e),new T(e,n,i)}}class T extends L{constructor(e,t,i){super(),this.object=e,this._disposable=t,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new I(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,0===this._refCount&&this._disposable.dispose(),e){const t=this._owners.indexOf(e);-1!==t&&this._owners.splice(t,1)}}}class I extends L{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}},36511:(e,t,i)=>{"use strict";i.d(t,{T:()=>m,i:()=>_});var n,o=i(44964),s=i(21776),r=i(14396),a=i(40231),l=i(5091),c=i(11320),d=i(14573),u=i(65764),h=i(82931),g=i(10170),p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f=function(e,t){return function(i,n){t(i,n,e)}};let m=class{static{n=this}static{this._ttpTokenizer=(0,s.H)("tokenizeToString",{createHTML(e){return e}})}constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new a.vl,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e){const e=document.createElement("span");return{element:e,dispose:()=>{}}}const n=new l.Cm,s=n.add((0,o.Gc)(e,{...this._getRenderOptions(e,n),...t},i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(e,t)=>{let i;e?i=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(i=this._options.editor.getModel()?.getLanguageId()),i||(i=u.vH);const o=await(0,h.Yj)(this._languageService,t,i),s=document.createElement("span");if(s.innerHTML=n._ttpTokenizer?.createHTML(o)??o,this._options.editor){const e=this._options.editor.getOption(50);(0,c.M)(s,e)}else this._options.codeBlockFontFamily&&(s.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(s.style.fontSize=this._options.codeBlockFontSize),s},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>_(this._openerService,t,e.isTrusted),disposables:t}}}};async function _(e,t,i){try{return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:v(i)})}catch(e){return(0,r.dz)(e),!1}}function v(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}m=n=p([f(1,d.L),f(2,g.C)],m)},24878:(e,t,i)=>{"use strict";i.d(t,{I:()=>o});var n=i(55664);class o extends n.LN{constructor(e){super(),this._getContext=e}runAction(e,t){const i=this._getContext();return super.runAction(e,i)}}},50793:(e,t,i)=>{"use strict";i.d(t,{iP:()=>a,iu:()=>o,q2:()=>r,tA:()=>s,ui:()=>l});var n=i(98581);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),o=i[0].range;return n.L.fromPositions(o.getEndPosition())}}class s{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),o=i[0].range;return n.L.fromRange(o,0)}}class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),o=i[0].range;return n.L.fromPositions(o.getStartPosition())}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),o=i[0].range;return n.L.fromPositions(o.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},27461:(e,t,i)=>{"use strict";i.d(t,{Y:()=>p});var n,o=i(20601),s=i(32142),r=i(8690),a=i(98581),l=i(41411),c=i(50395),d=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},u=function(e,t){return function(i,n){t(i,n,e)}};const h=Object.create(null);function g(e,t){if(t<=0)return"";h[e]||(h[e]=["",e]);const i=h[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let p=n=class{static unshiftIndent(e,t,i,n,o){const r=s.A.visibleColumnFromColumn(e,t,i);if(o){const e=g(" ",n),t=s.A.prevIndentTabStop(r,n),i=t/n;return g(e,i)}{const e="\t",t=s.A.prevRenderTabStop(r,i),n=t/i;return g(e,n)}}static shiftIndent(e,t,i,n,o){const r=s.A.visibleColumnFromColumn(e,t,i);if(o){const e=g(" ",n),t=s.A.nextIndentTabStop(r,n),i=t/n;return g(e,i)}{const e="\t",t=s.A.nextRenderTabStop(r,i),n=t/i;return g(e,n)}}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let a=this._selection.endLineNumber;1===this._selection.endColumn&&i!==a&&(a-=1);const{tabSize:c,indentSize:d,insertSpaces:u}=this._opts,h=i===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let g=0,p=0;for(let f=i;f<=a;f++,g=p){p=0;const a=e.getLineContent(f);let m,_=o.HG(a);if((!this._opts.isUnshift||0!==a.length&&0!==_)&&(h||this._opts.isUnshift||0!==a.length)){if(-1===_&&(_=a.length),f>1){const t=s.A.visibleColumnFromColumn(a,_+1,c);if(t%d!==0&&e.tokenization.isCheapToTokenize(f-1)){const t=(0,l.h)(this._opts.autoIndent,e,new r.Q(f-1,e.getLineMaxColumn(f-1),f-1,e.getLineMaxColumn(f-1)),this._languageConfigurationService);if(t){if(p=g,t.appendText)for(let e=0,i=t.appendText.length;e{"use strict";i.d(t,{i:()=>s,y:()=>r});var n=i(8690),o=i(98581);class s{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new n.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,s=i[1].range;return new o.L(n.endLineNumber,n.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}}class r{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range;return new o.L(n.endLineNumber,n.startColumn,n.endLineNumber,n.endColumn-this._charAfter.length)}}},20670:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});const n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}},97744:(e,t,i)=>{"use strict";i.d(t,{Gn:()=>f,JJ:()=>c,vf:()=>p});var n=i(20670),o=i(35011),s=i(99989),r=i(41337),a=i(27503),l=i(16374);const c=Object.freeze({id:"editor",order:5,type:"object",title:r.kg("editorConfigurationTitle","Editor"),scope:5}),d={...c,properties:{"editor.tabSize":{type:"number",default:s.R.tabSize,minimum:1,markdownDescription:r.kg("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:r.kg("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:s.R.insertSpaces,markdownDescription:r.kg("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:s.R.detectIndentation,markdownDescription:r.kg("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:s.R.trimAutoWhitespace,description:r.kg("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:s.R.largeFileOptimizations,description:r.kg("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[r.kg("wordBasedSuggestions.off","Turn off Word Based Suggestions."),r.kg("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),r.kg("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),r.kg("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:r.kg("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[r.kg("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),r.kg("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),r.kg("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:r.kg("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r.kg("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r.kg("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:r.kg("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:r.kg("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:r.kg("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:r.kg("editor.experimental.treeSitterTelemetry","Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `editor.experimental.preferTreeSitter` for specific languages will take precedence."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:r.kg("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:r.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:r.kg("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:r.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:n.q.maxComputationTime,description:r.kg("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:n.q.maxFileSize,description:r.kg("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:n.q.renderSideBySide,description:r.kg("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:n.q.renderSideBySideInlineBreakpoint,description:r.kg("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:n.q.useInlineViewWhenSpaceIsLimited,description:r.kg("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:n.q.renderMarginRevertIcon,description:r.kg("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:n.q.renderGutterMenu,description:r.kg("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:n.q.ignoreTrimWhitespace,description:r.kg("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:n.q.renderIndicators,description:r.kg("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:n.q.diffCodeLens,description:r.kg("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:n.q.diffWordWrap,markdownEnumDescriptions:[r.kg("wordWrap.off","Lines will never wrap."),r.kg("wordWrap.on","Lines will wrap at the viewport width."),r.kg("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:n.q.diffAlgorithm,markdownEnumDescriptions:[r.kg("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),r.kg("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:n.q.hideUnchangedRegions.enabled,markdownDescription:r.kg("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:n.q.hideUnchangedRegions.revealLineCount,markdownDescription:r.kg("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:n.q.hideUnchangedRegions.minimumLineCount,markdownDescription:r.kg("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:n.q.hideUnchangedRegions.contextLineCount,markdownDescription:r.kg("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:n.q.experimental.showMoves,markdownDescription:r.kg("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:n.q.experimental.showEmptyDecorations,description:r.kg("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:n.q.experimental.useTrueInlineView,description:r.kg("useTrueInlineView","If enabled and the editor uses the inline view, word changes are rendered inline.")}}};function u(e){return"undefined"!==typeof e.type||"undefined"!==typeof e.anyOf}for(const e of o.BE){const t=e.schema;if("undefined"!==typeof t)if(u(t))d.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(d.properties[e]=t[e])}let h=null;function g(){return null===h&&(h=Object.create(null),Object.keys(d.properties).forEach((e=>{h[e]=!0}))),h}function p(e){const t=g();return t[`editor.${e}`]||!1}function f(e){const t=g();return t[`diffEditor.${e}`]||!1}const m=l.O.as(a.Fd.Configuration);m.registerConfiguration(d)},35011:(e,t,i)=>{"use strict";i.d(t,{$C:()=>se,BE:()=>Ie,Bc:()=>F,O4:()=>k,Of:()=>ue,XR:()=>de,hZ:()=>g,jT:()=>N,jU:()=>Te,ls:()=>w,lw:()=>d,m9:()=>R,n0:()=>u,qB:()=>Re,r_:()=>B,wA:()=>b,xZ:()=>U,xq:()=>c,zM:()=>_});var n=i(85053),o=i(85603),s=i(25160),r=i(99989),a=i(60939),l=i(41337);const c=8;class d{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class u{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class h{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}compute(e,t,i){return i}}class g{constructor(e,t){this.newValue=e,this.didChange=t}}function p(e,t){if("object"!==typeof e||"object"!==typeof t||!e||!t)return new g(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&n.aI(e,t);return new g(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=p(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new g(e,i)}class f{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return p(e,t)}validate(e){return this.defaultValue}}class m{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}validate(e){return"undefined"===typeof e?this.defaultValue:e}compute(e,t,i){return i}}function _(e,t){return"undefined"===typeof e?t:"false"!==e&&Boolean(e)}class v extends m{constructor(e,t,i,n=void 0){"undefined"!==typeof n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _(e,this.defaultValue)}}function b(e,t,i,n){if("undefined"===typeof e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}class y extends m{static clampedInt(e,t,i,n){return b(e,t,i,n)}constructor(e,t,i,n,o,s=void 0){"undefined"!==typeof s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}validate(e){return y.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function w(e,t,i,n){if("undefined"===typeof e)return t;const o=C.float(e,t);return C.clamp(o,i,n)}class C extends m{static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"===typeof e)return e;if("undefined"===typeof e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,o){"undefined"!==typeof o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}validate(e){return this.validationFn(C.float(e,this.defaultValue))}}class S extends m{static string(e,t){return"string"!==typeof e?t:e}constructor(e,t,i,n=void 0){"undefined"!==typeof n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return S.string(e,this.defaultValue)}}function k(e,t,i,n){return"string"!==typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class x extends m{constructor(e,t,i,n,o=void 0){"undefined"!==typeof o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return k(e,this.defaultValue,this._allowedValues)}}class E extends h{constructor(e,t,i,n,o,s,r=void 0){"undefined"!==typeof r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!==typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}function L(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class T extends h{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[l.kg("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),l.kg("accessibilitySupport.on","Optimize for usage with a Screen Reader."),l.kg("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:l.kg("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}class I extends h{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:l.kg("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:l.kg("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertSpace:_(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function D(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var R,N;function A(e){switch(e){case"line":return R.Line;case"block":return R.Block;case"underline":return R.Underline;case"line-thin":return R.LineThin;case"block-outline":return R.BlockOutline;case"underline-thin":return R.UnderlineThin}}(function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"})(R||(R={}));class O extends f{constructor(){super(143)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(74)?n.push("mouse-default"):"copy"===t.get(74)&&n.push("mouse-copy"),t.get(112)&&n.push("showUnused"),t.get(141)&&n.push("showDeprecated"),n.join(" ")}}class P extends v{constructor(){super(37,"emptySelectionClipboard",!0,{description:l.kg("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class M extends h{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:l.kg("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[l.kg("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),l.kg("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),l.kg("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:l.kg("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[l.kg("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),l.kg("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),l.kg("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:l.kg("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:l.kg("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:s.zx},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:l.kg("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:l.kg("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"===typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":k(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"===typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":k(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_(t.loop,this.defaultValue.loop)}}}class F extends h{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(51,"fontLigatures",F.OFF,{anyOf:[{type:"boolean",description:l.kg("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:l.kg("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:l.kg("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e||0===e.length?F.OFF:"true"===e?F.ON:e:Boolean(e)?F.ON:F.OFF}}class B extends h{static{this.OFF="normal"}static{this.TRANSLATE="translate"}constructor(){super(54,"fontVariations",B.OFF,{anyOf:[{type:"boolean",description:l.kg("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:l.kg("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:l.kg("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e?B.OFF:"true"===e?B.TRANSLATE:e:Boolean(e)?B.TRANSLATE:B.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}class W extends f{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}class H extends m{constructor(){super(52,"fontSize",Te.fontSize,{type:"number",minimum:6,maximum:100,default:Te.fontSize,description:l.kg("fontSize","Controls the font size in pixels.")})}validate(e){const t=C.float(e,this.defaultValue);return 0===t?Te.fontSize:C.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class V extends h{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(53,"fontWeight",Te.fontWeight,{anyOf:[{type:"number",minimum:V.MINIMUM_VALUE,maximum:V.MAXIMUM_VALUE,errorMessage:l.kg("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:V.SUGGESTION_VALUES}],default:Te.fontWeight,description:l.kg("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(y.clampedInt(e,Te.fontWeight,V.MINIMUM_VALUE,V.MAXIMUM_VALUE))}}class j extends h{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[l.kg("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),l.kg("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),l.kg("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:l.kg("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:l.kg("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:l.kg("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:l.kg("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:l.kg("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:l.kg("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:l.kg("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:l.kg("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:l.kg("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:l.kg("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:l.kg("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{multiple:k(t.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:t.multipleDefinitions??k(t.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:t.multipleTypeDefinitions??k(t.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:t.multipleDeclarations??k(t.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:t.multipleImplementations??k(t.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:t.multipleReferences??k(t.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:t.multipleTests??k(t.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:S.string(t.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:S.string(t.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:S.string(t.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:S.string(t.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:S.string(t.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:S.string(t.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}}class z extends h{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:l.kg("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:l.kg("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:l.kg("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:l.kg("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:l.kg("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),delay:y.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_(t.sticky,this.defaultValue.sticky),hidingDelay:y.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:_(t.above,this.defaultValue.above)}}}class U extends f{constructor(){super(146)}compute(e,t,i){return U.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const o=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/o);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:o,minimapLineCount:s}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const s=t.stableMinimapLayoutInput,r=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let h=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,f=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,y=u?2:3;let w=Math.floor(o*n);const C=w/o;let S=!1,k=!1,x=y*h,E=h/o,L=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:s,extraLinesBeyondLastLine:l,desiredRatio:c,minimapLineCount:u}=U.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:o}),g=_/u;if(g>1)S=!0,k=!0,h=1,x=1,E=h/o;else{let n=!1,d=h+1;if("fit"===p){const e=Math.ceil((s+_+l)*x);b&&r&&v<=t.stableFitRemainingWidth?(n=!0,d=t.stableFitMaxMinimapScale):n=e>w}if("fill"===p||n){S=!0;const n=h;x=Math.min(a*o,Math.max(1,Math.floor(1/c))),b&&r&&v<=t.stableFitRemainingWidth&&(d=t.stableFitMaxMinimapScale),h=Math.min(d,Math.max(1,Math.floor(x/y))),h>n&&(L=Math.min(2,h/n)),E=h/o/L,w=Math.ceil(Math.max(i,s+_+l)*x),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const T=Math.floor(g*E),I=Math.min(T,Math.max(0,Math.floor((v-m-2)*E/(l+E)))+c);let D=Math.floor(o*I);const R=D/o;D=Math.floor(D*L);const N=u?1:2,A="left"===f?0:i-I-m;return{renderMinimap:N,minimapLeft:A,minimapWidth:I,minimapHeightIsEditorHeight:S,minimapIsSampling:k,minimapScale:h,minimapLineHeight:x,minimapCanvasInnerWidth:D,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:R,minimapCanvasOuterHeight:C}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(138),h="inherit"===d?e.get(137):d,g="inherit"===h?e.get(133):h,p=e.get(136),f=t.isDominatedByLongLines,m=e.get(57),_=0!==e.get(68).renderType,v=e.get(69),b=e.get(106),y=e.get(84),w=e.get(73),C=e.get(104),S=C.verticalScrollbarSize,k=C.verticalHasArrows,x=C.arrowSize,E=C.horizontalScrollbarSize,L=e.get(43),T="never"!==e.get(111);let I=e.get(66);L&&T&&(I+=16);let D=0;if(_){const e=Math.max(s,v);D=Math.round(e*a)}let R=0;m&&(R=o*t.glyphMarginDecorationLaneCount);let N=0,A=N+R,O=A+D,P=O+I;const M=i-R-D-I;let F=!1,B=!1,W=-1;"inherit"===h&&f?(F=!0,B=!0):"on"===g||"bounded"===g?B=!0:"wordWrapColumn"===g&&(W=p);const H=U._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,paddingTop:y.top,paddingBottom:y.bottom,minimap:w,verticalScrollbarWidth:S,viewLineCount:c,remainingWidth:M,isViewportWrapping:B},t.memory||new u);0!==H.renderMinimap&&0===H.minimapLeft&&(N+=H.minimapWidth,A+=H.minimapWidth,O+=H.minimapWidth,P+=H.minimapWidth);const V=M-H.minimapWidth,j=Math.max(1,Math.floor((V-S-2)/r)),z=k?x:0;return B&&(W=Math.max(1,j),"bounded"===g&&(W=Math.min(W,p))),{width:i,height:n,glyphMarginLeft:N,glyphMarginWidth:R,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:A,lineNumbersWidth:D,decorationsLeft:O,decorationsWidth:I,contentLeft:P,contentWidth:V,minimap:H,viewportColumn:j,isWordWrapMinified:F,isViewportWrapping:B,wrappingColumn:W,verticalScrollbarWidth:S,horizontalScrollbarHeight:E,overviewRuler:{top:z,width:S,height:n-2*z,right:0}}}}class $ extends h{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[l.kg("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),l.kg("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:l.kg("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return k(e,"simple",["simple","advanced"])}compute(e,t,i){const n=t.get(2);return 2===n?"advanced":i}}(function(e){e["Off"]="off",e["OnCode"]="onCode",e["On"]="on"})(N||(N={}));class q extends h{constructor(){const e={enabled:N.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[N.Off,N.OnCode,N.On],default:e.enabled,enumDescriptions:[l.kg("editor.lightbulb.enabled.off","Disable the code action menu."),l.kg("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),l.kg("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:l.kg("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:k(t.enabled,this.defaultValue.enabled,[N.Off,N.OnCode,N.On])}}}class K extends h{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:l.kg("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:l.kg("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:l.kg("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:l.kg("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),maxLineCount:y.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:k(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:_(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class G extends h{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:l.kg("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[l.kg("editor.inlayHints.on","Inlay hints are enabled"),l.kg("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",s.zx?"Ctrl+Option":"Ctrl+Alt"),l.kg("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",s.zx?"Ctrl+Option":"Ctrl+Alt"),l.kg("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:l.kg("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:l.kg("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:l.kg("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return"boolean"===typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:k(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:y.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),padding:_(t.padding,this.defaultValue.padding)}}}class Q extends h{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){if("string"===typeof e&&/^\d+(\.\d+)?ch$/.test(e)){const t=parseFloat(e.substring(0,e.length-2));return-t}return y.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?y.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class Y extends C{constructor(){super(67,"lineHeight",Te.lineHeight,(e=>C.clamp(e,0,150)),{markdownDescription:l.kg("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}class Z extends h{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:l.kg("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:l.kg("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[l.kg("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),l.kg("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),l.kg("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:l.kg("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:l.kg("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:l.kg("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:l.kg("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:l.kg("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:l.kg("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:l.kg("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:l.kg("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:l.kg("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:l.kg("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),autohide:_(t.autohide,this.defaultValue.autohide),size:k(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:k(t.side,this.defaultValue.side,["right","left"]),showSlider:k(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_(t.renderCharacters,this.defaultValue.renderCharacters),scale:y.clampedInt(t.scale,1,1,3),maxColumn:y.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:_(t.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:_(t.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:C.clamp(t.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:C.clamp(t.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}function X(e){return"ctrlCmd"===e?s.zx?"metaKey":"ctrlKey":"altKey"}class J extends h{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:l.kg("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:l.kg("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{top:y.clampedInt(t.top,0,0,1e3),bottom:y.clampedInt(t.bottom,0,0,1e3)}}}class ee extends h{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:l.kg("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:l.kg("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),cycle:_(t.cycle,this.defaultValue.cycle)}}}class te extends f{constructor(){super(144)}compute(e,t,i){return e.pixelRatio}}class ie extends h{constructor(){super(88,"placeholder",void 0)}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?e:this.defaultValue}}class ne extends h{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[l.kg("on","Quick suggestions show inside the suggest widget"),l.kg("inline","Quick suggestions show as ghost text"),l.kg("off","Quick suggestions are disabled")]}];super(90,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:l.kg("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:l.kg("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:l.kg("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:l.kg("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.","`#editor.suggestOnTriggerCharacters#`")}),this.defaultValue=e}validate(e){if("boolean"===typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!==typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,o=["on","inline","off"];let s,r,a;return s="boolean"===typeof t?t?"on":"off":k(t,this.defaultValue.other,o),r="boolean"===typeof i?i?"on":"off":k(i,this.defaultValue.comments,o),a="boolean"===typeof n?n?"on":"off":k(n,this.defaultValue.strings,o),{other:s,comments:r,strings:a}}}class oe extends h{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[l.kg("lineNumbers.off","Line numbers are not rendered."),l.kg("lineNumbers.on","Line numbers are rendered as absolute number."),l.kg("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),l.kg("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:l.kg("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return"undefined"!==typeof e&&("function"===typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}function se(e){const t=e.get(99);return"editable"===t?e.get(92):"on"!==t}class re extends h{constructor(){const e=[],t={type:"number",description:l.kg("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(103,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:l.kg("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:l.kg("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"===typeof i)t.push({column:y.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"===typeof i){const e=i;t.push({column:y.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}class ae extends h{constructor(){const e=void 0;super(93,"readOnlyMessage",e)}validate(e){return e&&"object"===typeof e?e:this.defaultValue}}function le(e,t){if("string"!==typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}class ce extends h{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(104,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.kg("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),l.kg("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),l.kg("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:l.kg("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.kg("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),l.kg("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),l.kg("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:l.kg("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:l.kg("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:l.kg("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:l.kg("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:l.kg("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e,i=y.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=y.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:y.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:le(t.vertical,this.defaultValue.vertical),horizontal:le(t.horizontal,this.defaultValue.horizontal),useShadows:_(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:y.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:y.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:_(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}}const de="inUntrustedWorkspace",ue={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class he extends h{constructor(){const e={nonBasicASCII:de,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:de,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(126,"unicodeHighlight",e,{[ue.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,de],default:e.nonBasicASCII,description:l.kg("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[ue.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:l.kg("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[ue.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:l.kg("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[ue.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,de],default:e.includeComments,description:l.kg("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[ue.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,de],default:e.includeStrings,description:l.kg("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[ue.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:l.kg("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[ue.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:l.kg("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(o.aI(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(o.aI(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new g(n.newValue,!0):n}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:_e(t.nonBasicASCII,de,[!0,!1,de]),invisibleCharacters:_(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:_e(t.includeComments,de,[!0,!1,de]),includeStrings:_e(t.includeStrings,de,[!0,!1,de]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!==typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}class ge extends h{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:l.kg("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.kg("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),l.kg("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),l.kg("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:l.kg("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:l.kg("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:l.kg("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),mode:k(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:k(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:_(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily)}}}class pe extends h{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:l.kg("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.kg("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),l.kg("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),l.kg("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:l.kg("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:l.kg("inlineEdit.fontFamily","Controls the font family of the inline edit.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showToolbar:k(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}class fe extends h{constructor(){const e={enabled:r.R.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:r.R.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:l.kg("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:_(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class me extends h{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.kg("editor.guides.bracketPairs.true","Enables bracket pair guides."),l.kg("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),l.kg("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:l.kg("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.kg("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),l.kg("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),l.kg("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:l.kg("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:l.kg("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:l.kg("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[l.kg("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),l.kg("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),l.kg("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:l.kg("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{bracketPairs:_e(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:_e(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:_e(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function _e(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}class ve extends h{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(119,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[l.kg("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),l.kg("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:l.kg("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:l.kg("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:l.kg("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:l.kg("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[l.kg("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),l.kg("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),l.kg("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),l.kg("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:l.kg("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions ({0} and {1}) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:l.kg("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:l.kg("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:l.kg("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:l.kg("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:l.kg("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:l.kg("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:l.kg("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertMode:k(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:k(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:_(t.showIcons,this.defaultValue.showIcons),showStatusBar:_(t.showStatusBar,this.defaultValue.showStatusBar),preview:_(t.preview,this.defaultValue.preview),previewMode:k(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_(t.showMethods,this.defaultValue.showMethods),showFunctions:_(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:_(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:_(t.showFields,this.defaultValue.showFields),showVariables:_(t.showVariables,this.defaultValue.showVariables),showClasses:_(t.showClasses,this.defaultValue.showClasses),showStructs:_(t.showStructs,this.defaultValue.showStructs),showInterfaces:_(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_(t.showModules,this.defaultValue.showModules),showProperties:_(t.showProperties,this.defaultValue.showProperties),showEvents:_(t.showEvents,this.defaultValue.showEvents),showOperators:_(t.showOperators,this.defaultValue.showOperators),showUnits:_(t.showUnits,this.defaultValue.showUnits),showValues:_(t.showValues,this.defaultValue.showValues),showConstants:_(t.showConstants,this.defaultValue.showConstants),showEnums:_(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_(t.showKeywords,this.defaultValue.showKeywords),showWords:_(t.showWords,this.defaultValue.showWords),showColors:_(t.showColors,this.defaultValue.showColors),showFiles:_(t.showFiles,this.defaultValue.showFiles),showReferences:_(t.showReferences,this.defaultValue.showReferences),showFolders:_(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_(t.showSnippets,this.defaultValue.showSnippets),showUsers:_(t.showUsers,this.defaultValue.showUsers),showIssues:_(t.showIssues,this.defaultValue.showIssues)}}}class be extends h{constructor(){super(114,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:l.kg("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:l.kg("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"===typeof e?{selectLeadingAndTrailingWhitespace:_(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:_(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}class ye extends h{constructor(){const e=[];super(131,"wordSegmenterLocales",e,{anyOf:[{description:l.kg("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:l.kg("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if("string"===typeof e&&(e=[e]),Array.isArray(e)){const t=[];for(const i of e)if("string"===typeof i)try{Intl.Segmenter.supportedLocalesOf(i).length>0&&t.push(i)}catch{}return t}return this.defaultValue}}class we extends h{constructor(){super(139,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[l.kg("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),l.kg("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),l.kg("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),l.kg("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:l.kg("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){const n=t.get(2);return 2===n?0:i}}class Ce extends f{constructor(){super(147)}compute(e,t,i){const n=t.get(146);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}class Se extends h{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:l.kg("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[l.kg("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),l.kg("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showDropSelector:k(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class ke extends h{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:l.kg("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[l.kg("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),l.kg("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showPasteSelector:k(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const xe="Consolas, 'Courier New', monospace",Ee="Menlo, Monaco, 'Courier New', monospace",Le="'Droid Sans Mono', 'monospace', monospace",Te={fontFamily:s.zx?Ee:s.j9?Le:xe,fontWeight:"normal",fontSize:s.zx?12:14,lineHeight:0,letterSpacing:0},Ie=[];function De(e){return Ie[e.id]=e,e}const Re={acceptSuggestionOnCommitCharacter:De(new v(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:l.kg("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:De(new x(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",l.kg("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:l.kg("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:De(new T),accessibilityPageSize:De(new y(3,"accessibilityPageSize",10,1,1073741824,{description:l.kg("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:De(new S(4,"ariaLabel",l.kg("editorViewAccessibleLabel","Editor content"))),ariaRequired:De(new v(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:De(new v(8,"screenReaderAnnounceInlineSuggestion",!0,{description:l.kg("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:De(new x(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),l.kg("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:De(new x(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),l.kg("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:De(new x(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",l.kg("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:l.kg("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:De(new x(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",l.kg("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:l.kg("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:De(new x(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),l.kg("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:De(new E(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],L,{enumDescriptions:[l.kg("editor.autoIndent.none","The editor will not insert indentation automatically."),l.kg("editor.autoIndent.keep","The editor will keep the current line's indentation."),l.kg("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),l.kg("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),l.kg("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:l.kg("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:De(new v(13,"automaticLayout",!1)),autoSurround:De(new x(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[l.kg("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),l.kg("editor.autoSurround.quotes","Surround with quotes but not brackets."),l.kg("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:l.kg("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:De(new fe),bracketPairGuides:De(new me),stickyTabStops:De(new v(117,"stickyTabStops",!1,{description:l.kg("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:De(new v(17,"codeLens",!0,{description:l.kg("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:De(new S(18,"codeLensFontFamily","",{description:l.kg("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:De(new y(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:l.kg("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:De(new v(20,"colorDecorators",!0,{description:l.kg("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:De(new x(149,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[l.kg("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),l.kg("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),l.kg("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:l.kg("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:De(new y(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:l.kg("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:De(new v(22,"columnSelection",!1,{description:l.kg("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:De(new I),contextmenu:De(new v(24,"contextmenu",!0)),copyWithSyntaxHighlighting:De(new v(25,"copyWithSyntaxHighlighting",!0,{description:l.kg("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:De(new E(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],D,{description:l.kg("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:De(new x(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[l.kg("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),l.kg("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),l.kg("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:l.kg("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:De(new E(28,"cursorStyle",R.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],A,{description:l.kg("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:De(new y(29,"cursorSurroundingLines",0,0,1073741824,{description:l.kg("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:De(new x(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[l.kg("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),l.kg("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:l.kg("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:De(new y(31,"cursorWidth",0,0,1073741824,{markdownDescription:l.kg("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:De(new v(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:De(new v(33,"disableMonospaceOptimizations",!1)),domReadOnly:De(new v(34,"domReadOnly",!1)),dragAndDrop:De(new v(35,"dragAndDrop",!0,{description:l.kg("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:De(new P),dropIntoEditor:De(new Se),stickyScroll:De(new K),experimentalWhitespaceRendering:De(new x(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[l.kg("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),l.kg("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),l.kg("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:l.kg("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:De(new S(39,"extraEditorClassName","")),fastScrollSensitivity:De(new C(40,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:l.kg("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:De(new M),fixedOverflowWidgets:De(new v(42,"fixedOverflowWidgets",!1)),folding:De(new v(43,"folding",!0,{description:l.kg("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:De(new x(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[l.kg("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),l.kg("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:l.kg("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:De(new v(45,"foldingHighlight",!0,{description:l.kg("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:De(new v(46,"foldingImportsByDefault",!1,{description:l.kg("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:De(new y(47,"foldingMaximumRegions",5e3,10,65e3,{description:l.kg("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:De(new v(48,"unfoldOnClickAfterEndOfLine",!1,{description:l.kg("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:De(new S(49,"fontFamily",Te.fontFamily,{description:l.kg("fontFamily","Controls the font family.")})),fontInfo:De(new W),fontLigatures2:De(new F),fontSize:De(new H),fontWeight:De(new V),fontVariations:De(new B),formatOnPaste:De(new v(55,"formatOnPaste",!1,{description:l.kg("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:De(new v(56,"formatOnType",!1,{description:l.kg("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:De(new v(57,"glyphMargin",!0,{description:l.kg("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:De(new j),hideCursorInOverviewRuler:De(new v(59,"hideCursorInOverviewRuler",!1,{description:l.kg("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:De(new z),inDiffEditor:De(new v(61,"inDiffEditor",!1)),letterSpacing:De(new C(64,"letterSpacing",Te.letterSpacing,(e=>C.clamp(e,-5,20)),{description:l.kg("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:De(new q),lineDecorationsWidth:De(new Q),lineHeight:De(new Y),lineNumbers:De(new oe),lineNumbersMinChars:De(new y(69,"lineNumbersMinChars",5,1,300)),linkedEditing:De(new v(70,"linkedEditing",!1,{description:l.kg("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:De(new v(71,"links",!0,{description:l.kg("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:De(new x(72,"matchBrackets","always",["always","near","never"],{description:l.kg("matchBrackets","Highlight matching brackets.")})),minimap:De(new Z),mouseStyle:De(new x(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:De(new C(75,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:l.kg("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:De(new v(76,"mouseWheelZoom",!1,{markdownDescription:s.zx?l.kg("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):l.kg("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:De(new v(77,"multiCursorMergeOverlapping",!0,{description:l.kg("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:De(new E(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],X,{markdownEnumDescriptions:[l.kg("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),l.kg("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:l.kg({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:De(new x(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[l.kg("multiCursorPaste.spread","Each cursor pastes a single line of the text."),l.kg("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:l.kg("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:De(new y(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:l.kg("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:De(new x(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[l.kg("occurrencesHighlight.off","Does not highlight occurrences."),l.kg("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),l.kg("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:l.kg("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:De(new v(82,"overviewRulerBorder",!0,{description:l.kg("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:De(new y(83,"overviewRulerLanes",3,0,3)),padding:De(new J),pasteAs:De(new ke),parameterHints:De(new ee),peekWidgetDefaultFocus:De(new x(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[l.kg("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),l.kg("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:l.kg("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),placeholder:De(new ie),definitionLinkOpensInPeek:De(new v(89,"definitionLinkOpensInPeek",!1,{description:l.kg("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:De(new ne),quickSuggestionsDelay:De(new y(91,"quickSuggestionsDelay",10,0,1073741824,{description:l.kg("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:De(new v(92,"readOnly",!1)),readOnlyMessage:De(new ae),renameOnType:De(new v(94,"renameOnType",!1,{description:l.kg("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:l.kg("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:De(new v(95,"renderControlCharacters",!0,{description:l.kg("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:De(new x(96,"renderFinalNewline",s.j9?"dimmed":"on",["off","on","dimmed"],{description:l.kg("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:De(new x(97,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",l.kg("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:l.kg("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:De(new v(98,"renderLineHighlightOnlyWhenFocus",!1,{description:l.kg("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:De(new x(99,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:De(new x(100,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",l.kg("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),l.kg("renderWhitespace.selection","Render whitespace characters only on selected text."),l.kg("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:l.kg("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:De(new y(101,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:De(new v(102,"roundedSelection",!0,{description:l.kg("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:De(new re),scrollbar:De(new ce),scrollBeyondLastColumn:De(new y(105,"scrollBeyondLastColumn",4,0,1073741824,{description:l.kg("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:De(new v(106,"scrollBeyondLastLine",!0,{description:l.kg("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:De(new v(107,"scrollPredominantAxis",!0,{description:l.kg("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:De(new v(108,"selectionClipboard",!0,{description:l.kg("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:s.j9})),selectionHighlight:De(new v(109,"selectionHighlight",!0,{description:l.kg("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:De(new v(110,"selectOnLineNumbers",!0)),showFoldingControls:De(new x(111,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[l.kg("showFoldingControls.always","Always show the folding controls."),l.kg("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),l.kg("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:l.kg("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:De(new v(112,"showUnused",!0,{description:l.kg("showUnused","Controls fading out of unused code.")})),showDeprecated:De(new v(141,"showDeprecated",!0,{description:l.kg("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:De(new G),snippetSuggestions:De(new x(113,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[l.kg("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),l.kg("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),l.kg("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),l.kg("snippetSuggestions.none","Do not show snippet suggestions.")],description:l.kg("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:De(new be),smoothScrolling:De(new v(115,"smoothScrolling",!1,{description:l.kg("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:De(new y(118,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:De(new ve),inlineSuggest:De(new ge),inlineEdit:De(new pe),inlineCompletionsAccessibilityVerbose:De(new v(150,"inlineCompletionsAccessibilityVerbose",!1,{description:l.kg("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:De(new y(120,"suggestFontSize",0,0,1e3,{markdownDescription:l.kg("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:De(new y(121,"suggestLineHeight",0,0,1e3,{markdownDescription:l.kg("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:De(new v(122,"suggestOnTriggerCharacters",!0,{description:l.kg("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:De(new x(123,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[l.kg("suggestSelection.first","Always select the first suggestion."),l.kg("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),l.kg("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:l.kg("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:De(new x(124,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[l.kg("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),l.kg("tabCompletion.off","Disable tab completions."),l.kg("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:l.kg("tabCompletion","Enables tab completions.")})),tabIndex:De(new y(125,"tabIndex",0,-1,1073741824)),unicodeHighlight:De(new he),unusualLineTerminators:De(new x(127,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[l.kg("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),l.kg("unusualLineTerminators.off","Unusual line terminators are ignored."),l.kg("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:l.kg("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:De(new v(128,"useShadowDOM",!0)),useTabStops:De(new v(129,"useTabStops",!0,{description:l.kg("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:De(new x(130,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[l.kg("wordBreak.normal","Use the default line break rule."),l.kg("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:l.kg("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:De(new ye),wordSeparators:De(new S(132,"wordSeparators",a.J3,{description:l.kg("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:De(new x(133,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[l.kg("wordWrap.off","Lines will never wrap."),l.kg("wordWrap.on","Lines will wrap at the viewport width."),l.kg({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),l.kg({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:l.kg({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:De(new S(134,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:De(new S(135,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:De(new y(136,"wordWrapColumn",80,1,1073741824,{markdownDescription:l.kg({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:De(new x(137,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:De(new x(138,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:De(new O),defaultColorDecorators:De(new v(148,"defaultColorDecorators",!1,{markdownDescription:l.kg("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:De(new te),tabFocusMode:De(new v(145,"tabFocusMode",!1,{markdownDescription:l.kg("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:De(new U),wrappingInfo:De(new Ce),wrappingIndent:De(new we),wrappingStrategy:De(new $)}},17522:(e,t,i)=>{"use strict";i.d(t,{D:()=>o});var n=i(40231);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},86817:(e,t,i)=>{"use strict";i.d(t,{YJ:()=>d,_8:()=>l});var n=i(25160),o=i(35011),s=i(17522);const r=n.zx?1.5:1.35,a=8;class l{static createFromValidatedSettings(e,t,i){const n=e.get(49),o=e.get(53),s=e.get(52),r=e.get(51),a=e.get(54),c=e.get(67),d=e.get(64);return l._create(n,o,s,r,a,c,d,t,i)}static _create(e,t,i,n,c,d,u,h,g){0===d?d=r*i:d{"use strict";i.d(t,{V:()=>o,y:()=>s});var n=i(62647);class o{constructor(e){const t=(0,n.W)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=(0,n.W)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class s{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},32142:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(20601);class o{static _nextVisibleColumn(e,t,i){return 9===e?o.nextRenderTabStop(t,i):n.ne(e)||n.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const o=Math.min(t-1,e.length),s=e.substring(0,o),r=new n.km(s);let a=0;while(!r.eol()){const e=n.Z5(s,o,r.offset);r.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const o=e.length,s=new n.km(e);let r=0,a=1;while(!s.eol()){const l=n.Z5(e,o,s.offset);s.nextGraphemeLength();const c=this._nextVisibleColumn(l,r,i),d=s.offset+1;if(c>=t){const e=t-r,i=c-t;return i{"use strict";i.d(t,{k:()=>o});var n=i(8690);class o{static insert(e,t){return{range:new n.Q(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},52764:(e,t,i)=>{"use strict";i.d(t,{A3:()=>T,AQ:()=>V,Am:()=>E,As:()=>D,BD:()=>J,Bo:()=>Z,CM:()=>k,D0:()=>c,Ek:()=>M,H0:()=>x,I2:()=>Y,IW:()=>ee,If:()=>X,JB:()=>N,L0:()=>p,Mf:()=>l,P1:()=>se,Pe:()=>ne,Qt:()=>m,WD:()=>oe,WS:()=>ie,WY:()=>re,Xr:()=>O,aZ:()=>H,bB:()=>te,hz:()=>w,je:()=>h,kG:()=>a,kM:()=>d,l5:()=>$,lQ:()=>z,n4:()=>Q,ob:()=>y,ow:()=>C,s7:()=>G,sC:()=>u,sH:()=>q,sN:()=>j,ss:()=>U,tK:()=>L,tp:()=>I,vP:()=>S,vV:()=>b,vp:()=>B,w4:()=>f,we:()=>g,x9:()=>A,yI:()=>W,yw:()=>P,zp:()=>K});var n=i(41337),o=i(85476),s=i(66344),r=i(15911);const a=(0,s.x1A)("editor.lineHighlightBackground",null,n.kg("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,s.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.b1q},n.kg("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=((0,s.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},n.kg("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},n.kg("rangeHighlightBorder","Background color of the border around highlighted ranges.")),(0,s.x1A)("editor.symbolHighlightBackground",{dark:s.Ubg,light:s.Ubg,hcDark:null,hcLight:null},n.kg("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},n.kg("symbolHighlightBorder","Background color of the border around highlighted symbols.")),(0,s.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Q1.black,hcDark:o.Q1.white,hcLight:"#0F4A85"},n.kg("caret","Color of the editor cursor."))),d=(0,s.x1A)("editorCursor.background",null,n.kg("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),u=(0,s.x1A)("editorMultiCursor.primary.foreground",c,n.kg("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),h=(0,s.x1A)("editorMultiCursor.primary.background",d,n.kg("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),g=(0,s.x1A)("editorMultiCursor.secondary.foreground",c,n.kg("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),p=(0,s.x1A)("editorMultiCursor.secondary.background",d,n.kg("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),f=(0,s.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},n.kg("editorWhitespaces","Color of whitespace characters in the editor.")),m=(0,s.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:o.Q1.white,hcLight:"#292929"},n.kg("editorLineNumbers","Color of editor line numbers.")),_=(0,s.x1A)("editorIndentGuide.background",f,n.kg("editorIndentGuides","Color of the editor indentation guides."),!1,n.kg("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),v=(0,s.x1A)("editorIndentGuide.activeBackground",f,n.kg("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,n.kg("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),b=(0,s.x1A)("editorIndentGuide.background1",_,n.kg("editorIndentGuides1","Color of the editor indentation guides (1).")),y=(0,s.x1A)("editorIndentGuide.background2","#00000000",n.kg("editorIndentGuides2","Color of the editor indentation guides (2).")),w=(0,s.x1A)("editorIndentGuide.background3","#00000000",n.kg("editorIndentGuides3","Color of the editor indentation guides (3).")),C=(0,s.x1A)("editorIndentGuide.background4","#00000000",n.kg("editorIndentGuides4","Color of the editor indentation guides (4).")),S=(0,s.x1A)("editorIndentGuide.background5","#00000000",n.kg("editorIndentGuides5","Color of the editor indentation guides (5).")),k=(0,s.x1A)("editorIndentGuide.background6","#00000000",n.kg("editorIndentGuides6","Color of the editor indentation guides (6).")),x=(0,s.x1A)("editorIndentGuide.activeBackground1",v,n.kg("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),E=(0,s.x1A)("editorIndentGuide.activeBackground2","#00000000",n.kg("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),L=(0,s.x1A)("editorIndentGuide.activeBackground3","#00000000",n.kg("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),T=(0,s.x1A)("editorIndentGuide.activeBackground4","#00000000",n.kg("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),I=(0,s.x1A)("editorIndentGuide.activeBackground5","#00000000",n.kg("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),D=(0,s.x1A)("editorIndentGuide.activeBackground6","#00000000",n.kg("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),R=(0,s.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.buw,hcLight:s.buw},n.kg("editorActiveLineNumber","Color of editor active line number"),!1,n.kg("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),N=((0,s.x1A)("editorLineNumber.activeForeground",R,n.kg("editorActiveLineNumber","Color of editor active line number")),(0,s.x1A)("editorLineNumber.dimmedForeground",null,n.kg("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."))),A=((0,s.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Q1.lightgrey,hcDark:o.Q1.white,hcLight:"#292929"},n.kg("editorRuler","Color of the editor rulers.")),(0,s.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},n.kg("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},n.kg("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.b1q,hcLight:s.b1q},n.kg("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},n.kg("editorOverviewRulerBorder","Color of the overview ruler border."))),O=(0,s.x1A)("editorOverviewRuler.background",null,n.kg("editorOverviewRulerBackground","Background color of the editor overview ruler.")),P=((0,s.x1A)("editorGutter.background",s.YtV,n.kg("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#fff").transparent(.8),hcLight:s.b1q},n.kg("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.x1A)("editorUnnecessaryCode.opacity",{dark:o.Q1.fromHex("#000a"),light:o.Q1.fromHex("#0007"),hcDark:null,hcLight:null},n.kg("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."))),M=((0,s.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#fff").transparent(.8),hcLight:o.Q1.fromHex("#292929").transparent(.8)},n.kg("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.x1A)("editorGhostText.foreground",{dark:o.Q1.fromHex("#ffffff56"),light:o.Q1.fromHex("#0007"),hcDark:null,hcLight:null},n.kg("editorGhostTextForeground","Foreground color of the ghost text in the editor."))),F=((0,s.x1A)("editorGhostText.background",null,n.kg("editorGhostTextBackground","Background color of the ghost text in the editor.")),new o.Q1(new o.bU(0,122,204,.6))),B=(0,s.x1A)("editorOverviewRuler.rangeHighlightForeground",F,n.kg("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),W=(0,s.x1A)("editorOverviewRuler.errorForeground",{dark:new o.Q1(new o.bU(255,18,18,.7)),light:new o.Q1(new o.bU(255,18,18,.7)),hcDark:new o.Q1(new o.bU(255,50,50,1)),hcLight:"#B5200D"},n.kg("overviewRuleError","Overview ruler marker color for errors.")),H=(0,s.x1A)("editorOverviewRuler.warningForeground",{dark:s.Hng,light:s.Hng,hcDark:s.Stt,hcLight:s.Stt},n.kg("overviewRuleWarning","Overview ruler marker color for warnings.")),V=(0,s.x1A)("editorOverviewRuler.infoForeground",{dark:s.pOz,light:s.pOz,hcDark:s.IIb,hcLight:s.IIb},n.kg("overviewRuleInfo","Overview ruler marker color for infos.")),j=(0,s.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},n.kg("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),z=(0,s.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},n.kg("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),U=(0,s.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},n.kg("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),$=(0,s.x1A)("editorBracketHighlight.foreground4","#00000000",n.kg("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),q=(0,s.x1A)("editorBracketHighlight.foreground5","#00000000",n.kg("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),K=(0,s.x1A)("editorBracketHighlight.foreground6","#00000000",n.kg("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),G=(0,s.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new o.Q1(new o.bU(255,18,18,.8)),light:new o.Q1(new o.bU(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},n.kg("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Q=(0,s.x1A)("editorBracketPairGuide.background1","#00000000",n.kg("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Y=(0,s.x1A)("editorBracketPairGuide.background2","#00000000",n.kg("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Z=(0,s.x1A)("editorBracketPairGuide.background3","#00000000",n.kg("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),X=(0,s.x1A)("editorBracketPairGuide.background4","#00000000",n.kg("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),J=(0,s.x1A)("editorBracketPairGuide.background5","#00000000",n.kg("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),ee=(0,s.x1A)("editorBracketPairGuide.background6","#00000000",n.kg("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),te=(0,s.x1A)("editorBracketPairGuide.activeBackground1","#00000000",n.kg("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),ie=(0,s.x1A)("editorBracketPairGuide.activeBackground2","#00000000",n.kg("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),ne=(0,s.x1A)("editorBracketPairGuide.activeBackground3","#00000000",n.kg("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),oe=(0,s.x1A)("editorBracketPairGuide.activeBackground4","#00000000",n.kg("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),se=(0,s.x1A)("editorBracketPairGuide.activeBackground5","#00000000",n.kg("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),re=(0,s.x1A)("editorBracketPairGuide.activeBackground6","#00000000",n.kg("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,s.x1A)("editorUnicodeHighlight.border",s.Hng,n.kg("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.x1A)("editorUnicodeHighlight.background",s.whs,n.kg("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));(0,r.zy)(((e,t)=>{const i=e.getColor(s.YtV),n=e.getColor(a),o=n&&!n.isTransparent()?n:i;o&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)}))},36627:(e,t,i)=>{"use strict";function n(e){let t=0,i=0,n=0,o=0;for(let s=0,r=e.length;sn})},79680:(e,t,i)=>{"use strict";i.d(t,{P:()=>r});var n=i(20601),o=i(32142);function s(e,t,i){let n=0;for(let i=0;i{"use strict";i.d(t,{M:()=>a,S:()=>l});var n=i(14396),o=i(50371),s=i(8690),r=i(43654);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let i=1;it)throw new n.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=(0,r.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,r.lx)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let i=0,n=0,o=null;while(i=s.startLineNumber?o=new a(o.startLineNumber,Math.max(o.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(o),o=s)}return null!==o&&t.push(o),new l(t)}subtractFrom(e){const t=(0,r.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return new l([e]);const n=[];let o=e.startLineNumber;for(let e=t;eo&&n.push(new a(o,t.startLineNumber)),o=t.endLineNumberExclusive}return oe.toString())).join(", ")}getIntersection(e){const t=[];let i=0,n=0;while(it.delta(e))))}}},50371:(e,t,i)=>{"use strict";i.d(t,{L:()=>o,h:()=>s});var n=i(14396);class o{static addRange(e,t){let i=0;while(it))return new o(e,t)}static ofLength(e){return new o(0,e)}static ofStartAndLength(e,t){return new o(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new n.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new o(this.start+e,this.endExclusive+e)}deltaStart(e){return new o(this.start+e,this.endExclusive)}deltaEnd(e){return new o(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString())).join(", ")}intersectsStrict(e){let t=0;while(te+t.length),0)}}},36788:(e,t,i)=>{"use strict";i.d(t,{y:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";i.d(t,{Q:()=>o});var n=i(36788);class o{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,s,r;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new o(i,n,s,r)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn;return ic?(s=c,r=d):s===c&&(r=Math.min(r,d)),i>s||i===s&&n>r?null:new o(i,n,s,r)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.y(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return o.collapseToEnd(this)}static collapseToEnd(e){return new o(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new o(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},98581:(e,t,i)=>{"use strict";i.d(t,{L:()=>s});var n=i(36788),o=i(8690);class s extends o.Q{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{"use strict";i.d(t,{Su:()=>h,b7:()=>u,fe:()=>p});var n=i(20601),o=i(25160),s=i(87885);let r,a,l;function c(){return r||(r=new TextDecoder("UTF-16LE")),r}function d(){return a||(a=new TextDecoder("UTF-16BE")),a}function u(){return l||(l=o.cm()?c():d()),l}function h(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?g(e,t,i):c().decode(n)}function g(e,t,i){const n=[];let o=0;for(let r=0;r=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i{"use strict";i.d(t,{k:()=>r,x:()=>a});var n=i(87885),o=i(13647);function s(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class r{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${s(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${s(this.oldText)}")`:`(replace@${this.oldPosition} "${s(this.oldText)}" with "${s(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const o=t.length;n.Sw(e,o,i),i+=4;for(let s=0;s{"use strict";i.d(t,{CO:()=>g,WR:()=>u,mF:()=>d});var n=i(79109),o=i(14396),s=i(36788),r=i(50371),a=i(33904);class l{constructor(e){this.text=e,this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t(0,n.Xo)(e,((e,t)=>e.range.getEndPosition().isBeforeOrEqual(t.range.getStartPosition())))))}apply(e){let t="",i=new s.y(1,1);for(const n of this.edits){const o=n.range,s=o.getStartPosition(),r=o.getEndPosition(),a=h(i,s);a.isEmpty()||(t+=e.getValueOfRange(a)),t+=n.text,i=r}const n=h(i,e.endPositionExclusive);return n.isEmpty()||(t+=e.getValueOfRange(n)),t}applyToString(e){const t=new p(e);return this.apply(t)}getNewRanges(){const e=[];let t=0,i=0,n=0;for(const o of this.edits){const r=a.W.ofText(o.text),l=s.y.lift({lineNumber:o.range.startLineNumber+i,column:o.range.startColumn+(o.range.startLineNumber===t?n:0)}),c=r.createRange(l);e.push(c),i=c.endLineNumber-o.range.endLineNumber,n=c.endColumn-o.range.endColumn,t=o.range.endLineNumber}return e}}class u{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}function h(e,t){if(e.lineNumber===t.lineNumber&&e.column===Number.MAX_SAFE_INTEGER)return c.Q.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new o.D7("start must be before end");return new c.Q(e.lineNumber,e.column,t.lineNumber,t.column)}class g{get endPositionExclusive(){return this.length.addToPosition(new s.y(1,1))}}class p extends g{constructor(e){super(),this.value=e,this._t=new l(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}},33904:(e,t,i)=>{"use strict";i.d(t,{W:()=>s});var n=i(36788),o=i(8690);class s{static{this.zero=new s(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new s(0,t.column-e.column):new s(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return s.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,i=0;for(const n of e)"\n"===n?(t++,i=0):i++;return new s(t,i)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new o.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new o.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new n.y(e.lineNumber,e.column+this.columnCount):new n.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},99989:(e,t,i)=>{"use strict";i.d(t,{R:()=>n});const n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}},90385:(e,t,i)=>{"use strict";i.d(t,{i:()=>a});var n=i(21553),o=i(94529);class s extends o.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let t=0,i=e.length;tt)break;i=n}return i}findNextIntlWordAtOrAfterOffset(e,t){for(const i of this._getIntlSegmenterWordsOnLine(e))if(!(i.index{"use strict";i.d(t,{Io:()=>l,J3:()=>s,Ld:()=>a,Th:()=>d});var n=i(5837),o=i(67806);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function r(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of s)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}const a=r();function l(e){let t=a;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const c=new o.w;function d(e,t,i,o,s){if(t=l(t),s||(s=n.f.first(c)),i.length>s.maxLen){let n=e-s.maxLen/2;return n<0?n=0:o+=n,i=i.substring(n,e+s.maxLen/2),d(e,t,i,o,s)}const r=Date.now(),a=e-1-o;let h=-1,g=null;for(let e=1;;e++){if(Date.now()-r>=s.timeBudget)break;const n=a-s.windowSize*e;t.lastIndex=Math.max(0,n);const o=u(t,i,a,h);if(!o&&g)break;if(g=o,n<=0)break;h=n}if(g){const e={word:g[0],startColumn:o+1+g.index,endColumn:o+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function u(e,t,i,n){let o;while(o=e.exec(t)){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}c.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},37200:(e,t,i)=>{"use strict";i.d(t,{s:()=>o});var n=i(32142);class o{static whitespaceVisibleColumn(e,t,i){const o=e.length;let s=0,r=-1,a=-1;for(let l=0;l{"use strict";i.d(t,{g:()=>d});var n=i(20601),o=i(50793),s=i(332),r=i(32142),a=i(31161),l=i(8690),c=i(36788);class d{static deleteRight(e,t,i,n){const s=[];let r=3!==e;for(let e=0,c=n.length;e=u.length+1)return!1;const h=u.charAt(d.column-2),g=n.get(h);if(!g)return!1;if((0,s.vG)(h)){if("never"===i)return!1}else if("never"===t)return!1;const p=u.charAt(d.column-1);let f=!1;for(const e of g)e.open===h&&e.close===p&&(f=!0);if(!f)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){const e=t.getLineContent(o.lineNumber),s=n.HG(e),a=-1===s?e.length+1:s+1;if(o.column<=a){const e=i.visibleColumnFromColumn(t,o),n=r.A.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,o.lineNumber,n);return new l.Q(o.lineNumber,s,o.lineNumber,o.column)}}return l.Q.fromPositions(d.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.Wd(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new c.y(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let r=null;i.sort(((e,t)=>c.y.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,a=i.length;s1&&r?.endLineNumber!==e.lineNumber?(i=e.lineNumber-1,c=t.getLineMaxColumn(e.lineNumber-1),d=e.lineNumber,u=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,c=1,d=e.lineNumber,u=t.getLineMaxColumn(e.lineNumber));const h=new l.Q(i,c,d,u);r=h,h.isEmpty()?n[s]=null:n[s]=new o.iu(h,"")}else n[s]=null;else n[s]=new o.iu(a,"")}return new s.vY(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},7657:(e,t,i)=>{"use strict";i.d(t,{S:()=>n,c:()=>d});var n,o=i(50322),s=i(332),r=i(31161),a=i(51232),l=i(36788),c=i(8690);class d{static addCursorDown(e,t,i){const n=[];let o=0;for(let a=0,l=t.length;at&&(i=t,n=e.model.getLineMaxColumn(i)),s.MF.fromModelState(new s.mG(new c.Q(r.lineNumber,1,i,n),2,0,new l.y(i,n),0))}const d=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberd){const i=e.getLineCount();let n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),s.MF.fromViewState(t.viewState.move(!0,n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return s.MF.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return s.MF.fromModelState(a.z.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new s.MF(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return s.MF.fromViewState(new s.mG(new c.Q(i,n,i,n),0,0,new l.y(i,n),0))}static moveTo(e,t,i,n,o){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,o)}const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.y(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return s.MF.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===a?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===a?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===a?t.map((t=>s.MF.fromViewState(r.I.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.MF.fromModelState(r.I.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>s.MF.fromViewState(r.I.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.MF.fromModelState(r.I.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{const i=[];for(let o=0,r=t.length;oi.endLineNumber-1?i.endLineNumber-1:os.MF.fromViewState(r.I.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,a=t.length;os.MF.fromViewState(r.I.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,a=t.length;o{"use strict";i.d(t,{I:()=>d});var n=i(20601),o=i(32142),s=i(36788),r=i(8690),a=i(37200),l=i(332);class c{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class d{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-n.MV(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new s.y(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),r=a.s.atomicPosition(o,t.column-1,i,0);if(-1!==r&&r+1>=n)return new s.y(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,i,e.tabSize):d.leftPosition(t,i);return new c(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(d.clipPositionColumn(n,t),0),l=d.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new s.y(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ih?(i=h,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,u),r=f?0:u-o.A.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==d){const e=new s.y(i,n),o=t.normalizePosition(e,d);r+=n-o.column,i=o.lineNumber,n=o.column}return new c(i,n,r)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,4)}static moveDown(e,t,i,n,o){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l,c=0;do{l=d.down(e,t,r+c,a,i.leftoverVisibleColumns,o,!0);const n=t.normalizePosition(new s.y(l.lineNumber,l.column),2);if(n.lineNumber>r)break}while(c++<10&&r+c1&&this._isBlankLine(t,o))o--;while(o>1&&!this._isBlankLine(t,o))o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let s=i.position.lineNumber;while(s{"use strict";i.d(t,{AO:()=>k,Dr:()=>x,Hs:()=>I,K4:()=>b,Ls:()=>S,UN:()=>L,YA:()=>E,dU:()=>_,ey:()=>H,h0:()=>T,is:()=>w,kr:()=>C,oi:()=>y,sx:()=>v});var n=i(14396),o=i(20601),s=i(50793),r=i(27461),a=i(59025),l=i(332),c=i(90385),d=i(8690),u=i(36788),h=i(98831),g=i(50395),p=i(23099),f=i(67502),m=i(41411);class _{static getEdits(e,t,i,n,o){if(!o&&this._isAutoIndentType(e,t,i)){const o=[];for(const s of i){const i=this._findActualIndentationForSelection(e,t,s,n);if(null===i)return;o.push({selection:s,indentation:i})}const s=y.getAutoClosingPairClose(e,t,i,n,!1);return this._getIndentationAndAutoClosingPairEdits(e,t,o,n,s)}}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;eB(e,t),unshiftIndent:t=>W(e,t)},e.languageConfigurationService);if(null===o)return null;const s=(0,g.Cw)(t,i.startLineNumber,i.startColumn);return o===e.normalizeIndentation(s)?null:o}static _getIndentationAndAutoClosingPairEdits(e,t,i,n,o){const s=i.map((({selection:i,indentation:s})=>{if(null!==o){const r=this._getEditFromIndentationAndSelection(e,t,s,i,n,!1);return new R(r,i,n,o)}{const o=this._getEditFromIndentationAndSelection(e,t,s,i,n,!0);return F(o.range,o.text,!1)}})),r={shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1};return new l.vY(4,s,r)}static _getEditFromIndentationAndSelection(e,t,i,n,o,s=!0){const r=n.startLineNumber,a=t.getLineFirstNonWhitespaceColumn(r);let l=e.normalizeIndentation(i);if(0!==a){const e=t.getLineContent(r);l+=e.substring(a-1,n.startColumn-1)}l+=s?o:"";const c=new d.Q(r,1,n.endLineNumber,n.endColumn);return{range:c,text:l}}}class v{static getEdits(e,t,i,n,o,s){if(M(t,i,n,o,s))return this._runAutoClosingOvertype(e,n,s)}static _runAutoClosingOvertype(e,t,i){const n=[];for(let e=0,o=t.length;enew s.iu(new d.Q(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new l.vY(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}}class y{static getEdits(e,t,i,n,o,s){if(!s){const s=this.getAutoClosingPairClose(e,t,i,n,o);if(null!==s)return this._runAutoClosingOpenCharType(i,n,o,s)}}static _runAutoClosingOpenCharType(e,t,i,n){const o=[];for(let s=0,r=e.length;s{const t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),r=this._findAutoClosingPairOpen(e,t,s.map((e=>new u.y(e.lineNumber,e.beforeColumn))),n);if(!r)return null;let a,d;const h=(0,l.vG)(n);if(h)a=e.autoClosingQuotes,d=e.shouldAutoCloseBefore.quote;else{const t=!!e.blockCommentStartToken&&r.open.includes(e.blockCommentStartToken);t?(a=e.autoClosingComments,d=e.shouldAutoCloseBefore.comment):(a=e.autoClosingBrackets,d=e.shouldAutoCloseBefore.bracket)}if("never"===a)return null;const g=this._findContainedAutoClosingPair(e,r),f=g?g.close:"";let m=!0;for(const i of s){const{lineNumber:o,beforeColumn:s,afterColumn:l}=i,u=t.getLineContent(o),h=u.substring(0,s-1),g=u.substring(l-1);if(g.startsWith(f)||(m=!1),g.length>0){const t=g.charAt(0),i=this._isBeforeClosingBrace(e,g);if(!i&&!d(t))return null}if(1===r.open.length&&("'"===n||'"'===n)&&"always"!==a){const t=(0,c.i)(e.wordSeparators,[]);if(h.length>0){const e=h.charCodeAt(h.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(o))return null;t.tokenization.forceTokenization(o);const _=t.tokenization.getLineTokens(o),v=(0,p.BQ)(_,s-1);if(!r.shouldAutoClose(v,s-v.firstCharOffset))return null;const b=r.findNeutralCharacter();if(b){const e=t.tokenization.getTokenTypeIfInsertingCharacter(o,s,b);if(!r.isOK(e))return null}}return m?r.close.substring(0,r.close.length-f.length):r.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let s=null;for(const e of o)if(null===s||e.open.length>s.open.length){let o=!0;for(const s of i){const i=t.getValueInRange(new d.Q(s.lineNumber,s.column-e.open.length+1,s.lineNumber,s.column));if(i+n!==e.open){o=!1;break}}o&&(s=e)}return s}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],s=n.some((e=>t.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}}class w{static getEdits(e,t,i,n,o){if(!o&&this._isSurroundSelectionType(e,t,i,n))return this._runSurroundSelectionType(e,i,n)}static _runSurroundSelectionType(e,t,i){const n=[];for(let o=0,s=t.length;o=4){const r=(0,f.MU)(e.autoIndent,t,n,{unshiftIndent:t=>W(e,t),shiftIndent:t=>B(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition());const l=n.endColumn,c=t.getLineContent(n.endLineNumber),d=o.HG(c);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new s.q2(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new s.iP(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return F(n,"\n"+e.normalizeIndentation(l),i)}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];const n=[];for(let o=0,r=i.length;othis._compositionType(i,e,o,s,r,a)));return new l.vY(4,c,{shouldPushStackElementBefore:A(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,r){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+o),u=new d.Q(a.lineNumber,l,a.lineNumber,c),h=e.getValueInRange(u);return h===i&&0===r?null:new s.iP(u,i,0,r)}}class L{static getEdits(e,t,i){const n=[];for(let e=0,o=t.length;e1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n),i=o.lT(e);if(i>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),a=(0,m.h)(e.autoIndent,t,new d.Q(n,r,n,r),e.languageConfigurationService);a&&(s=a.indentation+a.appendText)}return n&&(n===h.l.Indent&&(s=B(e,s)),n===h.l.Outdent&&(s=W(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const r=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,r),n=e.indentSize,s=n-i%n;for(let e=0;e2?c.charCodeAt(a.column-2):0;if(92===h&&u)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t{"use strict";i.d(t,{T:()=>a,v:()=>l});var n=i(27461),o=i(59025),s=i(332),r=i(52220);class a{static indent(e,t,i){if(null===t||null===i)return[];const o=[];for(let t=0,s=i.length;t{"use strict";i.d(t,{c:()=>d,z:()=>c});var n=i(20601),o=i(332),s=i(38471),r=i(90385),a=i(36788),l=i(8690);class c{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _createIntlWord(e,t){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:t}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;const o=t.findPrevIntlWordBeforeOrAtOffset(e,i.column-2);for(let s=i.column-2;s>=0;s--){const i=e.charCodeAt(s),r=t.get(i);if(o&&s===o.index)return this._createIntlWord(o,r);if(0===r){if(2===n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const o=t.findNextIntlWordAtOrAfterOffset(e,n),s=e.length;for(let r=n;r=0;s--){const n=e.charCodeAt(s),r=t.get(n);if(o&&s===o.index)return s;if(1===r)return s+1;if(1===i&&2===r)return s+1;if(2===i&&0===r)return s+1}return 0}static moveWordLeft(e,t,i,n,o){let s=i.lineNumber,r=i.column;1===r&&s>1&&(s-=1,r=t.getLineMaxColumn(s));let l=c._findPreviousWordOnLine(e,t,new a.y(s,r));if(0===n)return new a.y(s,l?l.start+1:1);if(1===n)return!o&&l&&2===l.wordType&&l.end-l.start===1&&0===l.nextCharClass&&(l=c._findPreviousWordOnLine(e,t,new a.y(s,l.start+1))),new a.y(s,l?l.start+1:1);if(3===n){while(l&&2===l.wordType)l=c._findPreviousWordOnLine(e,t,new a.y(s,l.start+1));return new a.y(s,l?l.start+1:1)}return l&&r<=l.end+1&&(l=c._findPreviousWordOnLine(e,t,new a.y(s,l.start+1))),new a.y(s,l?l.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.y(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=s.charCodeAt(e-2),r=s.charCodeAt(e-1);if(95===t&&95!==r)return new a.y(i,e);if(45===t&&45!==r)return new a.y(i,e);if((n.Lv(t)||n.DB(t))&&n.Wv(r))return new a.y(i,e);if(n.Wv(t)&&n.Wv(r)&&e+1=l.start+1&&(l=c._findNextWordOnLine(e,t,new a.y(o,l.end+1))),s=l?l.start+1:t.getLineMaxColumn(o);return new a.y(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i1?h=1:(u--,h=n.getLineMaxColumn(u)):(g&&h<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new a.y(u,g.start+1))),g?h=g.end+1:h>1?h=1:(u--,h=n.getLineMaxColumn(u))),new l.Q(u,h,d.lineNumber,d.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.y(i.positionLineNumber,i.positionColumn),o=this._deleteInsideWordWhitespace(t,n);return o||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,s))return null;while(o>0&&this._charAtIsWhitespace(i,o-1))o--;while(s+11?new l.Q(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.Q(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;while(i-11&&this._charAtIsWhitespace(n,t-2))t--;return r(t,i)},d=c._findPreviousWordOnLine(e,t,i);if(d&&s(d))return a(d);const u=c._findNextWordOnLine(e,t,i);return u&&s(u)?a(u):d&&u?r(d.end+1,u.start+1):d?r(d.start+1,d.end+1):u?r(u.start+1,u.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new l.Q(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=p.start+1&&(p=c._findNextWordOnLine(i,n,new a.y(d,p.end+1))),p?u=p.start+1:uBoolean(e)))}},332:(e,t,i)=>{"use strict";i.d(t,{MF:()=>g,d$:()=>h,mG:()=>m,vG:()=>v,vY:()=>_});var n=i(36788),o=i(8690),s=i(98581),r=i(23099),a=i(32142),l=i(79680);const c=()=>!0,d=()=>!1,u=e=>" "===e||"\t"===e;class h{static shouldRecreate(e){return e.hasChanged(146)||e.hasChanged(132)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(129)||e.hasChanged(50)||e.hasChanged(92)||e.hasChanged(131)}constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,s=o.get(146),r=o.get(50);this.readOnly=o.get(92),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(117),this.lineHeight=r.lineHeight,this.typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(129),this.wordSeparators=o.get(132),this.emptySelectionClipboard=o.get(37),this.copyWithSyntaxHighlighting=o.get(25),this.multiCursorMergeOverlapping=o.get(77),this.multiCursorPaste=o.get(79),this.multiCursorLimit=o.get(80),this.autoClosingBrackets=o.get(6),this.autoClosingComments=o.get(7),this.autoClosingQuotes=o.get(11),this.autoClosingDelete=o.get(9),this.autoClosingOvertype=o.get(10),this.autoSurround=o.get(14),this.autoIndent=o.get(12),this.wordSegmenterLocales=o.get(131),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const a=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(a)for(const e of a)this.surroundingPairs[e.open]=e.close;const l=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=l?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};const e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=(0,r.BQ)(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.P)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return u;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return c;case"never":return d}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return a.A.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=a.A.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(ns?s:n}}class g{static fromModelState(e){return new p(e)}static fromViewState(e){return new f(e)}static fromModelSelection(e){const t=s.L.liftSelection(e),i=new m(o.Q.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i{"use strict";i.d(t,{$8:()=>a,SL:()=>r,_3:()=>l,aY:()=>d,uY:()=>c});var n=i(85053),o=i(14396),s=i(50371);class r{static trivial(e,t){return new r([new a(s.L.ofLength(e.length),s.L.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new r([new a(s.L.ofLength(e.length),s.L.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}}class a{static invert(e,t){const i=[];return(0,n.pN)(e,((e,n)=>{i.push(a.fromOffsetPairs(e?e.getEndExclusives():l.zero,n?n.getStarts():new l(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),i}static fromOffsetPairs(e,t){return new a(new s.L(e.offset1,t.offset1),new s.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const i of e){if(t&&!(t.seq1Range.endExclusive<=i.seq1Range.start&&t.seq2Range.endExclusive<=i.seq2Range.start))throw new o.D7("Sequence diffs must be sorted");t=i}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new a(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new a(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new a(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new a(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new a(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(t&&i)return new a(t,i)}getStarts(){return new l(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new l(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class l{static{this.zero=new l(0,0)}static{this.max=new l(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new l(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class c{static{this.instance=new c}isValid(){return!0}}class d{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new o.D7("timeout must be positive")}isValid(){const e=Date.now()-this.startTime{"use strict";i.d(t,{D8:()=>F});var n=i(85053),o=i(79109),s=i(44544),r=i(50371),a=i(8690),l=i(45889);class c{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,i){this.array[e+t*this.width]=i}}function d(e){return 32===e||9===e}class u{static{this.chrKeys=new Map}static getKey(e){let t=this.chrKeys.get(e);return void 0===t&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(e,t,i){this.range=e,this.lines=t,this.source=i,this.histogram=[];let n=0;for(let i=e.startLineNumber-1;i0&&c>0&&3===s.get(r-1,c-1)&&(h+=a.get(r-1,c-1)),h+=n?n(r,c):1):h=-1;const g=Math.max(d,u,h);if(g===h){const e=r>0&&c>0?a.get(r-1,c-1):0;a.set(r,c,e+1),s.set(r,c,3)}else g===d?(a.set(r,c,0),s.set(r,c,1)):g===u&&(a.set(r,c,0),s.set(r,c,2));o.set(r,c,g)}const d=[];let u=e.length,h=t.length;function g(e,t){e+1===u&&t+1===h||d.push(new l.$8(new r.L(e+1,u),new r.L(t+1,h))),u=e,h=t}let p=e.length-1,f=t.length-1;while(p>=0&&f>=0)3===s.get(p,f)?(g(p,f),p--,f--):1===s.get(p,f)?p--:f--;return g(-1,-1),d.reverse(),new l.SL(d,!1)}}class g{compute(e,t,i=l.uY.instance){if(0===e.length||0===t.length)return l.SL.trivial(e,t);const n=e,o=t;function s(e,t){while(en.length||h>o.length)continue;const g=s(l,h);c.set(u,g);const f=l===r?d.get(u+1):d.get(u-1);if(d.set(u,g!==l?new p(f,l,h,g-l):f),c.get(u)===n.length&&c.get(u)-u===o.length)break e}}let h=d.get(u);const g=[];let _=n.length,v=o.length;while(1){const e=h?h.x+h.length:0,t=h?h.y+h.length:0;if(e===_&&t===v||g.push(new l.$8(new r.L(e,_),new r.L(t,v))),!h)break;_=h.x,v=h.y,h=h.prev}return g.reverse(),new l.SL(g,!1)}}class p{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class f{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class m{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var _=i(93866),v=i(43654),b=i(21553),y=i(36788);class w{constructor(e,t,i){this.lines=e,this.range=t,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let n=e[t-1],o=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,n=n.substring(o)),this.lineStartOffsets.push(o);let s=0;if(!i){const e=n.trimStart();s=n.length-e.length,n=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const r=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-s,n.length):n.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=x(e>0?this.elements[e-1]:-1),i=x(et<=e)),n=e-this.firstElementOffsetByLineIdx[i];return new y.y(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+n+(0===n&&"left"===t?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const t=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(t)?a.Q.fromPositions(i,i):a.Q.fromPositions(t,i)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!C(this.elements[e]))return;let t=e;while(t>0&&C(this.elements[t-1]))t--;let i=e;while(it<=e.start))??0,i=(0,v.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new r.L(t,i)}}function C(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const S={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function k(e){return S[e]}function x(e){return 10===e?8:13===e?7:d(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function E(e,t,i,o,s,r){let{moves:a,excludedChanges:l}=T(e,t,i,r);if(!r.isValid())return[];const c=e.filter((e=>!l.has(e))),d=I(c,o,s,t,i,r);return(0,n.E4)(a,d),a=R(a),a=a.filter((e=>{const i=e.original.toOffsetRange().slice(t).map((e=>e.trim())),n=i.join("\n");return n.length>=15&&L(i,(e=>e.length>=2))>=2})),a=N(e,a),a}function L(e,t){let i=0;for(const n of e)t(n)&&i++;return i}function T(e,t,i,n){const o=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new u(e.original,t,e))),r=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new u(e.modified,i,e)))),a=new Set;for(const e of s){let t,i=-1;for(const n of r){const o=e.computeSimilarity(n);o>i&&(i=o,t=n)}if(i>.9&&t&&(r.delete(t),o.push(new _.WL(e.range,t.range)),a.add(e.source),a.add(t.source)),!n.isValid())return{moves:o,excludedChanges:a}}return{moves:o,excludedChanges:a}}function I(e,t,i,o,r,a){const l=[],c=new b.db;for(const i of e)for(let e=i.original.startLineNumber;ee.modified.startLineNumber),n.U9));for(const t of e){let e=[];for(let n=t.modified.startLineNumber;n{for(const i of e)if(i.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&i.modifiedLineRange.endLineNumberExclusive+1===o.endLineNumberExclusive)return i.originalLineRange=new s.M(i.originalLineRange.startLineNumber,t.endLineNumberExclusive),i.modifiedLineRange=new s.M(i.modifiedLineRange.startLineNumber,o.endLineNumberExclusive),void r.push(i);const i={modifiedLineRange:o,originalLineRange:t};d.push(i),r.push(i)})),e=r}if(!a.isValid())return[]}d.sort((0,n.Hw)((0,n.VE)((e=>e.modifiedLineRange.length),n.U9)));const u=new s.S,h=new s.S;for(const e of d){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,i=u.subtractFrom(e.modifiedLineRange),n=h.subtractFrom(e.originalLineRange).getWithDelta(t),o=i.getIntersection(n);for(const e of o.ranges){if(e.length<3)continue;const i=e,n=e.delta(-t);l.push(new _.WL(n,i)),u.addRange(i),h.addRange(n)}}l.sort((0,n.VE)((e=>e.original.startLineNumber),n.U9));const g=new v.vJ(e);for(let t=0;te.original.startLineNumber<=i.original.startLineNumber)),c=(0,v.lx)(e,(e=>e.modified.startLineNumber<=i.modified.startLineNumber)),d=Math.max(i.original.startLineNumber-n.original.startLineNumber,i.modified.startLineNumber-c.modified.startLineNumber),p=g.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbero.length||t>r.length)break;if(u.contains(t)||h.contains(e))break;if(!D(o[e-1],r[t-1],a))break}for(b>0&&(h.addRange(new s.M(i.original.startLineNumber-b,i.original.startLineNumber)),u.addRange(new s.M(i.modified.startLineNumber-b,i.modified.startLineNumber))),y=0;yo.length||t>r.length)break;if(u.contains(t)||h.contains(e))break;if(!D(o[e-1],r[t-1],a))break}y>0&&(h.addRange(new s.M(i.original.endLineNumberExclusive,i.original.endLineNumberExclusive+y)),u.addRange(new s.M(i.modified.endLineNumberExclusive,i.modified.endLineNumberExclusive+y))),(b>0||y>0)&&(l[t]=new _.WL(new s.M(i.original.startLineNumber-b,i.original.endLineNumberExclusive+y),new s.M(i.modified.startLineNumber-b,i.modified.endLineNumberExclusive+y)))}return l}function D(e,t,i){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const n=new g,o=n.compute(new w([e],new a.Q(1,1,1,e.length),!1),new w([t],new a.Q(1,1,1,t.length),!1),i);let s=0;const r=l.$8.invert(o.diffs,e.length);for(const t of r)t.seq1Range.forEach((t=>{d(e.charCodeAt(t))||s++}));function c(t){let i=0;for(let n=0;nt.length?e:t),h=s/u>.6&&u>10;return h}function R(e){if(0===e.length)return e;e.sort((0,n.VE)((e=>e.original.startLineNumber),n.U9));const t=[e[0]];for(let i=1;i=0&&r>=0;a&&s+r<=2?t[t.length-1]=n.join(o):t.push(o)}return t}function N(e,t){const i=new v.vJ(e);return t=t.filter((t=>{const n=i.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbere===t)))return new M.p([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new M.p([new _.wm(new s.M(1,e.length+1),new s.M(1,t.length+1),[new _.q6(new a.Q(1,1,e.length,e[e.length-1].length+1),new a.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const c=0===i.maxComputationTimeMs?l.uY.instance:new l.aY(i.maxComputationTimeMs),d=!i.ignoreTrimWhitespace,u=new Map;function h(e){let t=u.get(e);return void 0===t&&(t=u.size,u.set(e,t)),t}const g=e.map((e=>h(e.trim()))),p=t.map((e=>h(e.trim()))),f=new O(g,e),m=new O(p,t),v=(()=>f.length+m.length<1700?this.dynamicProgrammingDiffing.compute(f,m,c,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(f,m,c))();let b=v.diffs,y=v.hitTimeout;b=(0,A.NC)(f,m,b),b=(0,A.X5)(f,m,b);const w=[],C=i=>{if(d)for(let n=0;ni.seq1Range.start-S===i.seq2Range.start-k));const n=i.seq1Range.start-S;C(n),S=i.seq1Range.endExclusive,k=i.seq2Range.endExclusive;const s=this.refineDiff(e,t,i,c,d);s.hitTimeout&&(y=!0);for(const e of s.mappings)w.push(e)}C(e.length-S);const x=B(w,e,t);let E=[];return i.computeMoves&&(E=this.computeMoves(x,e,t,g,p,c,d)),(0,o.Ft)((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const o of x){if(!o.innerChanges)return!1;for(const n of o.innerChanges){const o=i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e);if(!o)return!1}if(!n(o.modified,t)||!n(o.original,e))return!1}return!0})),new M.p(x,E,y)}computeMoves(e,t,i,n,o,s,r){const a=E(e,t,i,n,o,s),c=a.map((e=>{const n=this.refineDiff(t,i,new l.$8(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,r),o=B(n.mappings,t,i,!0);return new M.t(e,o)}));return c}refineDiff(e,t,i,n,o){const s=H(i),r=s.toRangeMapping2(e,t),a=new w(e,r.originalRange,o),c=new w(t,r.modifiedRange,o),d=a.length+c.length<500?this.dynamicProgrammingDiffing.compute(a,c,n):this.myersDiffingAlgorithm.compute(a,c,n),u=!1;let h=d.diffs;u&&l.$8.assertSorted(h),h=(0,A.NC)(a,c,h),u&&l.$8.assertSorted(h),h=(0,A.Lk)(a,c,h),u&&l.$8.assertSorted(h),h=(0,A.sq)(a,c,h),u&&l.$8.assertSorted(h),h=(0,A.Rl)(a,c,h),u&&l.$8.assertSorted(h);const g=h.map((e=>new _.q6(a.translateRange(e.seq1Range),c.translateRange(e.seq2Range))));return u&&_.q6.assertSorted(g),{mappings:g,hitTimeout:d.hitTimeout}}}function B(e,t,i,s=!1){const r=[];for(const o of(0,n.n)(e.map((e=>W(e,t,i))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=o[0],t=o[o.length-1];r.push(new _.wm(e.original.join(t.original),e.modified.join(t.modified),o.map((e=>e.innerChanges[0]))))}return(0,o.Ft)((()=>{if(!s&&r.length>0){if(r[0].modified.startLineNumber!==r[0].original.startLineNumber)return!1;if(i.length-r[r.length-1].modified.endLineNumberExclusive!==t.length-r[r.length-1].original.endLineNumberExclusive)return!1}return(0,o.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+o&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+o&&(n=1);const r=new s.M(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+o),a=new s.M(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+o);return new _.wm(r,a,[e])}function H(e){return new _.WL(new s.M(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new s.M(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}},79233:(e,t,i)=>{"use strict";i.d(t,{Lk:()=>u,NC:()=>r,Rl:()=>p,X5:()=>g,sq:()=>d});var n=i(85053),o=i(50371),s=i(45889);function r(e,t,i){let n=i;return n=a(e,t,n),n=a(e,t,n),n=l(e,t,n),n}function a(e,t,i){if(0===i.length)return i;const n=[];n.push(i[0]);for(let r=1;r0&&(l=l.delta(c))}r.push(l)}return n.length>0&&r.push(n[n.length-1]),r}function l(e,t,i){if(!e.getBoundaryScore||!t.getBoundaryScore)return i;for(let n=0;n0?i[n-1]:void 0,r=i[n],a=n+1=n.start&&e.seq2Range.start-r>=o.start&&i.isStronglyEqual(e.seq2Range.start-r,e.seq2Range.endExclusive-r)&&rc&&(c=a,l=n)}return e.delta(l)}function d(e,t,i){const n=[];for(const e of i){const t=n[n.length-1];t?e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2?n[n.length-1]=new s.$8(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):n.push(e):n.push(e)}return n}function u(e,t,i){const n=s.$8.invert(i,e.length),o=[];let r=new s._3(0,0);function a(i,a){if(i.offset10){const i=n[0],o=i.seq1Range.intersects(d.seq1Range)||i.seq2Range.intersects(d.seq2Range);if(!o)break;const r=e.findWordContaining(i.seq1Range.start),a=t.findWordContaining(i.seq2Range.start),l=new s.$8(r,a),c=l.intersect(i);if(h+=c.seq1Range.length,g+=c.seq2Range.length,d=d.join(l),!(d.seq1Range.endExclusive>=i.seq1Range.endExclusive))break;n.shift()}h+g<2*(d.seq1Range.length+d.seq2Range.length)/3&&o.push(d),r=d.getEndExclusives()}while(n.length>0){const e=n.shift();e.seq1Range.isEmpty||(a(e.getStarts(),e),a(e.getEndExclusives().delta(-1),e))}const l=h(i,o);return l}function h(e,t){const i=[];while(e.length>0||t.length>0){const n=e[0],o=t[0];let s;s=n&&(!o||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=s.seq1Range.start?i[i.length-1]=i[i.length-1].join(s):i.push(s)}return i}function g(e,t,i){let n=i;if(0===n.length)return n;let s,r=0;do{s=!1;const a=[n[0]];for(let l=1;l5||i.seq1Range.length+i.seq2Range.length>5)}const h=u(d,c);h?(s=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(r++<10&&s);return n}function p(e,t,i){let r=i;if(0===r.length)return r;let a,l=0;do{a=!1;const d=[r[0]];for(let u=1;u5||s.length>500)return!1;const a=e.getText(s).trim();if(a.length>20||a.split(/\r\n|\r|\n/).length>1)return!1;const l=e.countLinesIn(i.seq1Range),c=i.seq1Range.length,d=t.countLinesIn(i.seq2Range),u=i.seq2Range.length,p=e.countLinesIn(n.seq1Range),f=n.seq1Range.length,m=t.countLinesIn(n.seq2Range),_=n.seq2Range.length,v=130;function b(e){return Math.min(e,v)}return Math.pow(Math.pow(b(40*l+c),1.5)+Math.pow(b(40*d+u),1.5),1.5)+Math.pow(Math.pow(b(40*p+f),1.5)+Math.pow(b(40*m+_),1.5),1.5)>(v**1.5)**1.5*1.3}const f=p(g,h);f?(a=!0,d[d.length-1]=d[d.length-1].join(h)):d.push(h)}r=d}while(l++<10&&a);const c=[];return(0,n.kj)(r,((t,i,n)=>{let r=i;function a(e){return e.length>0&&e.trim().length<=3&&i.seq1Range.length+i.seq2Range.length>100}const l=e.extendToFullLines(i.seq1Range),d=e.getText(new o.L(l.start,i.seq1Range.start));a(d)&&(r=r.deltaStart(-d.length));const u=e.getText(new o.L(i.seq1Range.endExclusive,l.endExclusive));a(u)&&(r=r.deltaEnd(u.length));const h=s.$8.fromOffsetPairs(t?t.getEndExclusives():s._3.zero,n?n.getStarts():s._3.max),g=r.intersect(h);c.length>0&&g.getStarts().equals(c[c.length-1].getEndExclusives())?c[c.length-1]=c[c.length-1].join(g):c.push(g)})),c}},42198:(e,t,i)=>{"use strict";i.d(t,{p:()=>n,t:()=>o});class n{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class o{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}},93866:(e,t,i)=>{"use strict";i.d(t,{WL:()=>l,q6:()=>h,wm:()=>u});var n=i(14396),o=i(44544),s=i(36788),r=i(8690),a=i(362);class l{static inverse(e,t,i){const n=[];let s=1,r=1;for(const t of e){const e=new l(new o.M(s,t.original.startLineNumber),new o.M(r,t.modified.startLineNumber));e.modified.isEmpty||n.push(e),s=t.original.endLineNumberExclusive,r=t.modified.endLineNumberExclusive}const a=new l(new o.M(s,t+1),new o.M(r,i+1));return a.modified.isEmpty||n.push(a),n}static clip(e,t,i){const n=[];for(const o of e){const e=o.original.intersect(t),s=o.modified.intersect(i);e&&!e.isEmpty&&s&&!s.isEmpty&&n.push(new l(e,s))}return n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new l(this.modified,this.original)}join(e){return new l(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new h(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new n.D7("not a valid diff");return new h(new r.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new r.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new h(new r.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new r.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(d(this.original.endLineNumberExclusive,e)&&d(this.modified.endLineNumberExclusive,t))return new h(new r.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new r.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new h(r.Q.fromPositions(new s.y(this.original.startLineNumber,1),c(new s.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),r.Q.fromPositions(new s.y(this.modified.startLineNumber,1),c(new s.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new h(r.Q.fromPositions(c(new s.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),c(new s.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),r.Q.fromPositions(c(new s.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),c(new s.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new n.D7}}function c(e,t){if(e.lineNumber<1)return new s.y(1,1);if(e.lineNumber>t.length)return new s.y(t.length,t[t.length-1].length+1);const i=t[e.lineNumber-1];return e.column>i.length+1?new s.y(e.lineNumber,i.length+1):e}function d(e,t){return e>=1&&e<=t.length}class u extends l{static fromRangeMappings(e){const t=o.M.join(e.map((e=>o.M.fromRangeInclusive(e.originalRange)))),i=o.M.join(e.map((e=>o.M.fromRangeInclusive(e.modifiedRange))));return new u(t,i,e)}constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){return new u(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new u(this.original,this.modified,[this.toRangeMapping()])}}class h{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new h(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new a.WR(this.originalRange,t)}}},5868:(e,t,i)=>{"use strict";i.d(t,{f:()=>n});class n{constructor(e,t,i,n,o,s,r){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=o,this._run=s,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}},69483:(e,t,i)=>{"use strict";i.d(t,{_:()=>n});const n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},57479:(e,t,i)=>{"use strict";i.d(t,{R:()=>n});var n,o=i(41337),s=i(18904);(function(e){e.editorSimpleInput=new s.N1("editorSimpleInput",!1,!0),e.editorTextFocus=new s.N1("editorTextFocus",!1,o.kg("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new s.N1("editorFocus",!1,o.kg("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new s.N1("textInputFocus",!1,o.kg("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new s.N1("editorReadonly",!1,o.kg("editorReadonly","Whether the editor is read-only")),e.inDiffEditor=new s.N1("inDiffEditor",!1,o.kg("inDiffEditor","Whether the context is a diff editor")),e.isEmbeddedDiffEditor=new s.N1("isEmbeddedDiffEditor",!1,o.kg("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),e.inMultiDiffEditor=new s.N1("inMultiDiffEditor",!1,o.kg("inMultiDiffEditor","Whether the context is a multi diff editor")),e.multiDiffEditorAllCollapsed=new s.N1("multiDiffEditorAllCollapsed",void 0,o.kg("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),e.hasChanges=new s.N1("diffEditorHasChanges",!1,o.kg("diffEditorHasChanges","Whether the diff editor has changes")),e.comparingMovedCode=new s.N1("comparingMovedCode",!1,o.kg("comparingMovedCode","Whether a moved code block is selected for comparison")),e.accessibleDiffViewerVisible=new s.N1("accessibleDiffViewerVisible",!1,o.kg("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),e.diffEditorRenderSideBySideInlineBreakpointReached=new s.N1("diffEditorRenderSideBySideInlineBreakpointReached",!1,o.kg("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),e.diffEditorInlineMode=new s.N1("diffEditorInlineMode",!1,o.kg("diffEditorInlineMode","Whether inline mode is active")),e.diffEditorOriginalWritable=new s.N1("diffEditorOriginalWritable",!1,o.kg("diffEditorOriginalWritable","Whether modified is writable in the diff editor")),e.diffEditorModifiedWritable=new s.N1("diffEditorModifiedWritable",!1,o.kg("diffEditorModifiedWritable","Whether modified is writable in the diff editor")),e.diffEditorOriginalUri=new s.N1("diffEditorOriginalUri","",o.kg("diffEditorOriginalUri","The uri of the original document")),e.diffEditorModifiedUri=new s.N1("diffEditorModifiedUri","",o.kg("diffEditorModifiedUri","The uri of the modified document")),e.columnSelection=new s.N1("editorColumnSelection",!1,o.kg("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new s.N1("editorHasSelection",!1,o.kg("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new s.N1("editorHasMultipleSelections",!1,o.kg("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new s.N1("editorTabMovesFocus",!1,o.kg("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new s.N1("isInEmbeddedEditor",!1,!0),e.canUndo=new s.N1("canUndo",!1,!0),e.canRedo=new s.N1("canRedo",!1,!0),e.hoverVisible=new s.N1("editorHoverVisible",!1,o.kg("editorHoverVisible","Whether the editor hover is visible")),e.hoverFocused=new s.N1("editorHoverFocused",!1,o.kg("editorHoverFocused","Whether the editor hover is focused")),e.stickyScrollFocused=new s.N1("stickyScrollFocused",!1,o.kg("stickyScrollFocused","Whether the sticky scroll is focused")),e.stickyScrollVisible=new s.N1("stickyScrollVisible",!1,o.kg("stickyScrollVisible","Whether the sticky scroll is visible")),e.standaloneColorPickerVisible=new s.N1("standaloneColorPickerVisible",!1,o.kg("standaloneColorPickerVisible","Whether the standalone color picker is visible")),e.standaloneColorPickerFocused=new s.N1("standaloneColorPickerFocused",!1,o.kg("standaloneColorPickerFocused","Whether the standalone color picker is focused")),e.inCompositeEditor=new s.N1("inCompositeEditor",void 0,o.kg("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new s.N1("editorLangId","",o.kg("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new s.N1("editorHasCompletionItemProvider",!1,o.kg("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new s.N1("editorHasCodeActionsProvider",!1,o.kg("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new s.N1("editorHasCodeLensProvider",!1,o.kg("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new s.N1("editorHasDefinitionProvider",!1,o.kg("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new s.N1("editorHasDeclarationProvider",!1,o.kg("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new s.N1("editorHasImplementationProvider",!1,o.kg("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new s.N1("editorHasTypeDefinitionProvider",!1,o.kg("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new s.N1("editorHasHoverProvider",!1,o.kg("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new s.N1("editorHasDocumentHighlightProvider",!1,o.kg("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new s.N1("editorHasDocumentSymbolProvider",!1,o.kg("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new s.N1("editorHasReferenceProvider",!1,o.kg("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new s.N1("editorHasRenameProvider",!1,o.kg("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new s.N1("editorHasSignatureHelpProvider",!1,o.kg("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new s.N1("editorHasInlayHintsProvider",!1,o.kg("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new s.N1("editorHasDocumentFormattingProvider",!1,o.kg("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new s.N1("editorHasDocumentSelectionFormattingProvider",!1,o.kg("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new s.N1("editorHasMultipleDocumentFormattingProvider",!1,o.kg("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new s.N1("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.kg("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(n||(n={}))},36285:(e,t,i)=>{"use strict";i.d(t,{T:()=>s,x:()=>o});const n=[];function o(e){n.push(e)}function s(){return n.slice(0)}},4577:(e,t,i)=>{"use strict";i.d(t,{x:()=>n});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!==(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){const t=this.getForeground(e);let i="mtk"+t;const n=this.getFontStyle(e);return 1&n&&(i+=" mtki"),2&n&&(i+=" mtkb"),4&n&&(i+=" mtku"),8&n&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let s="";return 4&n&&(s+=" underline"),8&n&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}},35784:(e,t,i)=>{"use strict";i.d(t,{f:()=>s});var n=i(13589),o=i(52444);function s(e,t,i,r,a,l){if(Array.isArray(e)){let n=0;for(const o of e){const e=s(o,t,i,r,a,l);if(10===e)return e;e>n&&(n=e)}return n}if("string"===typeof e)return r?"*"===e?5:e===i?10:0:0;if(e){const{language:s,pattern:c,scheme:d,hasAccessToAllModels:u,notebookType:h}=e;if(!r&&!u)return 0;h&&a&&(t=a);let g=0;if(d)if(d===t.scheme)g=10;else{if("*"!==d)return 0;g=5}if(s)if(s===i)g=10;else{if("*"!==s)return 0;g=Math.max(g,5)}if(h)if(h===l)g=10;else{if("*"!==h||void 0===l)return 0;g=Math.max(g,5)}if(c){let e;if(e="string"===typeof c?c:{...c,base:(0,o.S8)(c.base)},e!==t.fsPath&&!(0,n.YW)(e,t.fsPath))return 0;g=10}return g}return 0}},35350:(e,t,i)=>{"use strict";i.d(t,{uB:()=>L,HC:()=>u,Kb:()=>f,FX:()=>g,rY:()=>b,lO:()=>I,M$:()=>d,r4:()=>T,qw:()=>h,sm:()=>A,v_:()=>D,OV:()=>x,YT:()=>E,GE:()=>y,WA:()=>p,gP:()=>k,ou:()=>_,dG:()=>R,$M:()=>v,OB:()=>N,PK:()=>S,Iu:()=>w});var n=i(25923),o=i(29133),s=i(8690),r=i(40231),a=i(5091);class l{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,a.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const i=new c(this,e,t);return this._factories.set(e,i),(0,a.s)((()=>{const t=this._factories.get(e);t&&t===i&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){const t=this.get(e);if(t)return!0;const i=this._factories.get(e);return!(i&&!i.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class c extends a.jG{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var d,u,h,g,p,f,m=i(41337);class _{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class v{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class b{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}(function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"})(d||(d={})),function(e){const t=new Map;function i(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=n.W.symbolProperty),i}t.set(0,n.W.symbolMethod),t.set(1,n.W.symbolFunction),t.set(2,n.W.symbolConstructor),t.set(3,n.W.symbolField),t.set(4,n.W.symbolVariable),t.set(5,n.W.symbolClass),t.set(6,n.W.symbolStruct),t.set(7,n.W.symbolInterface),t.set(8,n.W.symbolModule),t.set(9,n.W.symbolProperty),t.set(10,n.W.symbolEvent),t.set(11,n.W.symbolOperator),t.set(12,n.W.symbolUnit),t.set(13,n.W.symbolValue),t.set(15,n.W.symbolEnum),t.set(14,n.W.symbolConstant),t.set(15,n.W.symbolEnum),t.set(16,n.W.symbolEnumMember),t.set(17,n.W.symbolKeyword),t.set(27,n.W.symbolSnippet),t.set(18,n.W.symbolText),t.set(19,n.W.symbolColor),t.set(20,n.W.symbolFile),t.set(21,n.W.symbolReference),t.set(22,n.W.symbolCustomColor),t.set(23,n.W.symbolFolder),t.set(24,n.W.symbolTypeParameter),t.set(25,n.W.account),t.set(26,n.W.issues),e.toIcon=i;const o=new Map;function s(e,t){let i=o.get(e);return"undefined"!==typeof i||t||(i=9),i}o.set("method",0),o.set("function",1),o.set("constructor",2),o.set("field",3),o.set("variable",4),o.set("class",5),o.set("struct",6),o.set("interface",7),o.set("module",8),o.set("property",9),o.set("event",10),o.set("operator",11),o.set("unit",12),o.set("value",13),o.set("constant",14),o.set("enum",15),o.set("enum-member",16),o.set("enumMember",16),o.set("keyword",17),o.set("snippet",27),o.set("text",18),o.set("color",19),o.set("file",20),o.set("reference",21),o.set("customcolor",22),o.set("folder",23),o.set("type-parameter",24),o.set("typeParameter",24),o.set("account",25),o.set("issue",26),e.fromString=s}(u||(u={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(h||(h={}));class y{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return s.Q.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}function w(e){return e&&o.r.isUri(e.uri)&&s.Q.isIRange(e.range)&&(s.Q.isIRange(e.originSelectionRange)||s.Q.isIRange(e.targetSelectionRange))}(function(e){e[e["Automatic"]=0]="Automatic",e[e["PasteAs"]=1]="PasteAs"})(g||(g={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(p||(p={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(f||(f={}));const C={17:(0,m.kg)("Array","array"),16:(0,m.kg)("Boolean","boolean"),4:(0,m.kg)("Class","class"),13:(0,m.kg)("Constant","constant"),8:(0,m.kg)("Constructor","constructor"),9:(0,m.kg)("Enum","enumeration"),21:(0,m.kg)("EnumMember","enumeration member"),23:(0,m.kg)("Event","event"),7:(0,m.kg)("Field","field"),0:(0,m.kg)("File","file"),11:(0,m.kg)("Function","function"),10:(0,m.kg)("Interface","interface"),19:(0,m.kg)("Key","key"),5:(0,m.kg)("Method","method"),1:(0,m.kg)("Module","module"),2:(0,m.kg)("Namespace","namespace"),20:(0,m.kg)("Null","null"),15:(0,m.kg)("Number","number"),18:(0,m.kg)("Object","object"),24:(0,m.kg)("Operator","operator"),3:(0,m.kg)("Package","package"),6:(0,m.kg)("Property","property"),14:(0,m.kg)("String","string"),22:(0,m.kg)("Struct","struct"),25:(0,m.kg)("TypeParameter","type parameter"),12:(0,m.kg)("Variable","variable")};function S(e,t){return(0,m.kg)("symbolAriaLabel","{0} ({1})",e,C[t])}var k,x,E,L,T;(function(e){const t=new Map;function i(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=n.W.symbolProperty),i}t.set(0,n.W.symbolFile),t.set(1,n.W.symbolModule),t.set(2,n.W.symbolNamespace),t.set(3,n.W.symbolPackage),t.set(4,n.W.symbolClass),t.set(5,n.W.symbolMethod),t.set(6,n.W.symbolProperty),t.set(7,n.W.symbolField),t.set(8,n.W.symbolConstructor),t.set(9,n.W.symbolEnum),t.set(10,n.W.symbolInterface),t.set(11,n.W.symbolFunction),t.set(12,n.W.symbolVariable),t.set(13,n.W.symbolConstant),t.set(14,n.W.symbolString),t.set(15,n.W.symbolNumber),t.set(16,n.W.symbolBoolean),t.set(17,n.W.symbolArray),t.set(18,n.W.symbolObject),t.set(19,n.W.symbolKey),t.set(20,n.W.symbolNull),t.set(21,n.W.symbolEnumMember),t.set(22,n.W.symbolStruct),t.set(23,n.W.symbolEvent),t.set(24,n.W.symbolOperator),t.set(25,n.W.symbolTypeParameter),e.toIcon=i})(k||(k={}));class I{static{this.Comment=new I("comment")}static{this.Imports=new I("imports")}static{this.Region=new I("region")}static fromValue(e){switch(e){case"comment":return I.Comment;case"imports":return I.Imports;case"region":return I.Region}return new I(e)}constructor(e){this.value=e}}(function(e){e[e["AIGenerated"]=1]="AIGenerated"})(x||(x={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(E||(E={})),function(e){function t(e){return!(!e||"object"!==typeof e)&&("string"===typeof e.id&&"string"===typeof e.title)}e.is=t}(L||(L={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(T||(T={}));class D{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then((e=>{e&&e.dispose()}))}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const R=new l,N=new l;var A;(function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"})(A||(A={}))},67502:(e,t,i)=>{"use strict";i.d(t,{$f:()=>l,MU:()=>c,Yb:()=>u,_t:()=>d,vn:()=>a});var n=i(20601),o=i(98831),s=i(56973);function r(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.tokenization.getLanguageIdAtPosition(o,0)!==n)return s;const t=e.getLineContent(o);if(!i.shouldIgnore(o)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}function a(e,t,i,a=!0,l){if(e<4)return null;const c=l.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!c)return null;const d=new s.no(t,c,l);if(i<=1)return{indentation:"",action:null};for(let e=i-1;e>0;e--){if(""!==t.getLineContent(e))break;if(1===e)return{indentation:"",action:null}}const u=r(t,i,d);if(u<0)return null;if(u<1)return{indentation:"",action:null};if(d.shouldIncrease(u)||d.shouldIndentNextLine(u)){const e=t.getLineContent(u);return{indentation:n.UU(e),action:o.l.Indent,line:u}}if(d.shouldDecrease(u)){const e=t.getLineContent(u);return{indentation:n.UU(e),action:null,line:u}}{if(1===u)return{indentation:n.UU(t.getLineContent(u)),action:null,line:u};const e=u-1,i=c.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let t=e-1;t>0;t--)if(!d.shouldIndentNextLine(t)){i=t;break}return{indentation:n.UU(t.getLineContent(i+1)),action:null,line:i+1}}if(a)return{indentation:n.UU(t.getLineContent(u)),action:null,line:u};for(let e=u;e>0;e--){if(d.shouldIncrease(e))return{indentation:n.UU(t.getLineContent(e)),action:o.l.Indent,line:e};if(d.shouldIndentNextLine(e)){let i=0;for(let t=e-1;t>0;t--)if(!d.shouldIndentNextLine(e)){i=t;break}return{indentation:n.UU(t.getLineContent(i+1)),action:null,line:i+1}}if(d.shouldDecrease(e))return{indentation:n.UU(t.getLineContent(e)),action:null,line:e}}return{indentation:n.UU(t.getLineContent(1)),action:null,line:1}}}function l(e,t,i,r,l,c){if(e<4)return null;const d=c.getLanguageConfiguration(i);if(!d)return null;const u=c.getLanguageConfiguration(i).indentRulesSupport;if(!u)return null;const h=new s.no(t,u,c),g=a(e,t,r,void 0,c);if(g){const i=g.line;if(void 0!==i){let s=!0;for(let e=i;e0){const o=t.getLineContent(y);if(g.shouldIndentNextLine(o)&&g.shouldIncrease(b)){const o=a(d,t,i.startLineNumber,!1,c),s=o?.indentation;if(void 0!==s){const o=t.getLineContent(i.startLineNumber),a=n.UU(o),c=l.shiftIndent(s),d=c===a,u=/^\s*$/.test(v),h=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(r),g=h&&h.length>0,p=g&&u;if(d&&p)return s}}}return null}function u(e,t,i){const n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}function h(e,t,i){const n={tokenization:{getLineTokens:n=>n===t?i:e.tokenization.getLineTokens(n),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:n=>n===t?i.getLineContent():e.getLineContent(n)};return n}},41411:(e,t,i)=>{"use strict";i.d(t,{h:()=>r});var n=i(98831),o=i(50395),s=i(56973);function r(e,t,i,r){t.tokenization.forceTokenization(i.startLineNumber);const a=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),l=r.getLanguageConfiguration(a);if(!l)return null;const c=new s.V(t,r),d=c.getProcessedTokenContextAroundRange(i),u=d.previousLineProcessedTokens.getLineContent(),h=d.beforeRangeProcessedTokens.getLineContent(),g=d.afterRangeProcessedTokens.getLineContent(),p=l.onEnter(e,u,h,g);if(!p)return null;const f=p.indentAction;let m=p.appendText;const _=p.removeText||0;m?f===n.l.Indent&&(m="\t"+m):m=f===n.l.Indent||f===n.l.IndentOutdent?"\t":"";let v=(0,o.Cw)(t,i.startLineNumber,i.startColumn);return _&&(v=v.substring(0,v.length-_)),{indentAction:f,appendText:m,removeText:_,indentation:v}}},14573:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(87778);const o=(0,n.u1)("languageService")},98831:(e,t,i)=>{"use strict";var n;i.d(t,{GB:()=>s,i3:()=>o,l:()=>n}),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(n||(n={}));class o{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t{"use strict";i.d(t,{JZ:()=>R,Cw:()=>F});var n=i(40231),o=i(5091),s=i(20601),r=i(60939),a=i(98831);class l{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t"}static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.i3(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.i3({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.i3({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"===typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"===typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}var c=i(85053),d=i(23099),u=i(28889);class h{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return(0,c.dM)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,d.Yo)(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=u.Fu.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase(),l=this._richEditBrackets.textIsOpenBracket[a];if(l)return null;const c=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var f=i(14396);class m{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=m._createOpenBracketRegExp(e[0]),i=m._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))));if(s)return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e{const t=new Set;return{info:new E(this,e,t),closing:t}})),o=new C.VV((e=>{const t=new Set,i=new Set;return{info:new L(this,e,t,i),opening:t,openingColorized:i}}));for(const[e,t]of i){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.opening.add(i.info)}const s=t.colorizedBracketPairs?k(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of s){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.openingColorized.add(i.info),s.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...o.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return(0,u.xb)(t,e)}}function k(e){return e.filter((([e,t])=>""!==e&&""!==t))}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class E extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class L extends x{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e["config"]===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e["config"]===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};class D{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const R=(0,_.u1)("languageConfigurationService");let N=class extends o.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new j),this.onDidChangeEmitter=this._register(new n.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(O));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new D(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new D(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new D(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=A(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};function A(e,t,i,n){let o=t.getLanguageConfiguration(e);if(!o){if(!n.isRegisteredLanguageId(e))return new z(e,{});o=new z(e,{})}const s=P(o.languageId,i),r=W([o.underlyingConfig,s]),a=new z(o.languageId,r);return a}N=T([I(0,v.pG),I(1,b.L)],N);const O={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function P(e,t){const i=t.getValue(O.brackets,{overrideIdentifier:e}),n=t.getValue(O.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:M(i),colorizedBracketPairs:M(n)}}function M(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function F(e,t,i){const n=e.getLineContent(t);let o=s.UU(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}class B{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new H(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,o.s)((()=>{for(let e=0;ee.configuration))))}}function W(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class H{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class V{constructor(e){this.languageId=e}}class j extends o.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(w.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new B(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new V(e)),(0,o.s)((()=>{s.dispose(),this._onDidChange.fire(new V(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class z{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new m(this.underlyingConfig):null,this.comments=z._handleComments(this.underlyingConfig),this.characterPair=new l(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new u.az(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new h(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.GB(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,y.v)(R,N,1)},65764:(e,t,i)=>{"use strict";i.d(t,{W6:()=>d,vH:()=>u});var n=i(41337),o=i(40231),s=i(16374),r=i(33911),a=i(27503);const l={ModesRegistry:"editor.modesRegistry"};class c{constructor(){this._onDidChangeLanguages=new o.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{"use strict";i.d(t,{$H:()=>s,Lh:()=>r,r3:()=>o});var n=i(35350);const o=new class{clone(){return this}equals(e){return this===e}};function s(e,t){return new n.$M([new n.ou(0,"",e)],t)}function r(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(32768|e|2<<24)>>>0,new n.rY(i,null===t?o:t)}},23099:(e,t,i)=>{"use strict";function n(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),s=e.getLanguageId(n);let r=n;while(r+10&&e.getLanguageId(a-1)===s)a--;return new o(e,s,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{BQ:()=>n,Yo:()=>s});class o{constructor(e,t,i,n,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s,this.languageIdCodec=e.languageIdCodec}getLineContent(){const e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){const t=this._actual.getLineContent();return t.substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function s(e){return 0!==(3&e)}},56973:(e,t,i)=>{"use strict";i.d(t,{V:()=>a,WR:()=>c,no:()=>r});var n=i(20601),o=i(23099),s=i(70164);class r{constructor(e,t,i){this._indentRulesSupport=t,this._indentationLineProcessor=new l(e,i)}shouldIncrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(i)}shouldDecrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(i)}shouldIgnore(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(i)}shouldIndentNextLine(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(i)}}class a{constructor(e,t){this.model=e,this.indentationLineProcessor=new l(e,t)}getProcessedTokenContextAroundRange(e){const t=this._getProcessedTokensBeforeRange(e),i=this._getProcessedTokensAfterRange(e),n=this._getProcessedPreviousLineTokens(e);return{beforeRangeProcessedTokens:t,afterRangeProcessedTokens:i,previousLineProcessedTokens:n}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);const t=this.model.tokenization.getLineTokens(e.startLineNumber),i=(0,o.BQ)(t,e.startColumn-1);let n;if(c(this.model,e.getStartPosition())){const o=e.startColumn-1-i.firstCharOffset,s=i.firstCharOffset,r=s+o;n=t.sliceAndInflate(s,r,0)}else{const i=e.startColumn-1;n=t.sliceAndInflate(0,i,0)}const s=this.indentationLineProcessor.getProcessedTokens(n);return s}_getProcessedTokensAfterRange(e){const t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);const i=this.model.tokenization.getLineTokens(t.lineNumber),n=(0,o.BQ)(i,t.column-1),s=t.column-1-n.firstCharOffset,r=n.firstCharOffset+s,a=n.firstCharOffset+n.getLineLength(),l=i.sliceAndInflate(r,a,0),c=this.indentationLineProcessor.getProcessedTokens(l);return c}_getProcessedPreviousLineTokens(e){const t=e=>{this.model.tokenization.forceTokenization(e);const t=this.model.tokenization.getLineTokens(e),i=this.model.getLineMaxColumn(e)-1,n=(0,o.BQ)(t,i);return n};this.model.tokenization.forceTokenization(e.startLineNumber);const i=this.model.tokenization.getLineTokens(e.startLineNumber),n=(0,o.BQ)(i,e.startColumn-1),r=s.f.createEmpty("",n.languageIdCodec),a=e.startLineNumber-1,l=0===a;if(l)return r;const c=0===n.firstCharOffset;if(!c)return r;const d=t(a),u=n.languageId===d.languageId;if(!u)return r;const h=d.toIViewLineTokens(),g=this.indentationLineProcessor.getProcessedTokens(h);return g}}class l{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){const i=(e,t)=>{const i=n.UU(e),o=t+e.substring(i.length);return o};this.model.tokenization.forceTokenization?.(e);const o=this.model.tokenization.getLineTokens(e);let s=this.getProcessedTokens(o).getLineContent();return void 0!==t&&(s=i(s,t)),s}getProcessedTokens(e){const t=e=>2===e||3===e||1===e,i=e.getLanguageId(0),n=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew,o=n.getBracketRegExp({global:!0}),r=[];e.forEach((i=>{const n=e.getStandardTokenType(i);let s=e.getTokenText(i);t(n)&&(s=s.replace(o,""));const a=e.getMetadata(i);r.push({text:s,metadata:a})}));const a=s.f.createFromTextAndMetadata(r,e.languageIdCodec);return a}}function c(e,t){e.tokenization.forceTokenization(t.lineNumber);const i=e.tokenization.getLineTokens(t.lineNumber),n=(0,o.BQ)(i,t.column-1),s=0===n.firstCharOffset,r=i.getLanguageId(0)===n.languageId,a=!s&&!r;return a}},28889:(e,t,i)=>{"use strict";i.d(t,{Fu:()=>b,az:()=>l,xb:()=>_});var n=i(20601),o=i(13647),s=i(8690);class r{constructor(e,t,i,n,o,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=s,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function a(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let e=0;e0&&s.push({open:o,close:r})}return s}class l{constructor(e,t){this._richEditBracketsBrand=void 0;const i=a(t);this.brackets=i.map(((t,n)=>new r(e,n,t.open,t.close,h(t.open,t.close,i,n),g(t.open,t.close,i,n)))),this.forwardRegex=p(this.brackets),this.reversedRegex=f(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const e of this.brackets){for(const t of e.open)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,t.length);for(const t of e.close)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,t.length)}}}function c(e,t,i,n){for(let o=0,s=t.length;o=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function d(e,t){return e.length-t.length}function u(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function h(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e=0;n--)t[i++]=e.charCodeAt(n);return o.b7().decode(t)}let t=null,i=null;return function(n){return t!==n&&(t=n,i=e(t)),i}}();class b{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=i.length-(o.index||0),a=o[0].length,l=n+r;return new s.Q(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const s=v(i),r=s.substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,r,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=o.index||0,a=o[0].length;if(0===a)return null;const l=n+r;return new s.Q(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}},82931:(e,t,i)=>{"use strict";i.d(t,{Yj:()=>l,s0:()=>c});var n=i(20601),o=i(70164),s=i(35350),r=i(58403);const a={getInitialState:()=>r.r3,tokenizeEncoded:(e,t,i)=>(0,r.Lh)(0,i)};async function l(e,t,i){if(!i)return d(t,e.languageIdCodec,a);const n=await s.dG.getOrCreate(i);return d(t,e.languageIdCodec,n||a)}function c(e,t,i,n,o,s,r){let a="
    ",l=n,c=0,d=!0;for(let u=0,h=t.getCount();u0)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,h>o||l>=o)break}return a+="
    ",a}function d(e,t,i){let s='
    ';const r=n.uz(e);let a=i.getInitialState();for(let e=0,l=r.length;e0&&(s+="
    ");const c=i.tokenizeEncoded(l,!0,a);o.f.convertToEndOffset(c.tokens,l.length);const d=new o.f(c.tokens,l,t),u=d.inflate();let h=0;for(let e=0,t=u.getCount();e${n.ih(l.substring(h,i))}`,h=i}a=c.endState}return s+="
    ",s}},9322:(e,t,i)=>{"use strict";i.d(t,{A5:()=>n,Dg:()=>l,F4:()=>h,L5:()=>u,VW:()=>s,Wo:()=>d,X2:()=>a,ZS:()=>o,nk:()=>c,vd:()=>g});var n,o,s,r=i(85603);(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(n||(n={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(o||(o={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,r.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"===typeof e.read}class d{constructor(e,t,i,n,o,s){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=s}}class u{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class h{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},82584:(e,t,i)=>{"use strict";i.d(t,{Gc:()=>v,Nn:()=>l,Xw:()=>c,rh:()=>_,yF:()=>m});var n=i(14396),o=i(32142),s=i(94150),r=i(55239);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,s.QB)(n,t.length)),i&&(n=(0,s.QB)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.gV.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,s.QB)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class c extends a{static create23(e,t,i,n=!1){let o=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=(0,s.QB)(o,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=(0,s.QB)(o,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new u(o,e.listHeight+1,e,t,i,r):new d(o,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(s.Vp,0,[],r.gV.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(0),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(0,i),i}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;while(4===t.kind){const e=t.childrenLength;if(0===e)throw new n.D7;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n{"use strict";i.d(t,{W:()=>r,c:()=>s});var n=i(8690),o=i(94150);class s{static fromModelContentChanges(e){const t=e.map((e=>{const t=n.Q.lift(e.range);return new s((0,o.VL)(t.getStartPosition()),(0,o.VL)(t.getEndPosition()),(0,o.rR)(e.text))})).reverse();return t}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${(0,o.l4)(this.startOffset)}...${(0,o.l4)(this.endOffset)}) -> ${(0,o.l4)(this.newLength)}`}}class r{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>a.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:(0,o.MS)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,o.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,o.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=(0,o.l4)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,o.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,o.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){while(this.nextEditIdx{"use strict";i.d(t,{Z:()=>d});var n=i(20601),o=i(82584),s=i(94150),r=i(55239),a=i(39029);class l{static createFromLanguage(e,t){function i(e){return t.getKey(`${e.languageId}:::${e.bracketText}`)}const n=new Map;for(const t of e.bracketsNew.openingBrackets){const e=(0,s.qe)(0,t.bracketText.length),l=i(t),c=r.gV.getEmpty().add(l,r.FD);n.set(t.bracketText,new a.ou(e,1,l,c,o.rh.create(e,t,c)))}for(const t of e.bracketsNew.closingBrackets){const e=(0,s.qe)(0,t.bracketText.length);let l=r.gV.getEmpty();const c=t.getOpeningBrackets();for(const e of c)l=l.add(i(e),r.FD);n.set(t.bracketText,new a.ou(e,2,i(c[0]),l,o.rh.create(e,t,l)))}return new l(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>c(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}function c(e){let t=(0,n.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}class d{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},18485:(e,t,i)=>{"use strict";i.d(t,{M:()=>r});var n=i(85053),o=i(95239),s=i(94150);function r(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new n.j3(l(e)),r=l(t);r.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let c=i.dequeue();function d(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return c&&e.unshift(c),e}const t=[];while(c&&!(0,s.Vh)(e)){const[n,o]=c.splitAt(e);t.push(n),e=(0,s.MS)(n.lengthAfter,e),c=o??i.dequeue()}return(0,s.Vh)(e)||t.push(new a(!1,e,e)),t}const u=[];function h(e,t,i){if(u.length>0&&(0,s.wP)(u[u.length-1].endOffset,e)){const e=u[u.length-1];u[u.length-1]=new o.c(e.startOffset,t,(0,s.QB)(e.newLength,i))}else u.push({startOffset:e,endOffset:t,newLength:i})}let g=s.Vp;for(const e of r){const t=d(e.lengthBefore);if(e.modified){const i=(0,s.pW)(t,(e=>e.lengthBefore)),n=(0,s.QB)(g,i);h(g,n,e.lengthAfter),g=n}else for(const e of t){const t=g;g=(0,s.QB)(g,e.lengthBefore),e.modified&&h(t,g,e.lengthAfter)}}return u}class a{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=(0,s.MS)(e,this.lengthAfter);return(0,s.wP)(t,s.Vp)?[this,void 0]:this.modified?[new a(this.modified,this.lengthBefore,e),new a(this.modified,s.Vp,t)]:[new a(this.modified,e,e),new a(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${(0,s.l4)(this.lengthBefore)} -> ${(0,s.l4)(this.lengthAfter)}`}}function l(e){const t=[];let i=s.Vp;for(const n of e){const e=(0,s.MS)(i,n.startOffset);(0,s.Vh)(e)||t.push(new a(!1,e,e));const o=(0,s.MS)(n.startOffset,n.endOffset);t.push(new a(!0,o,n.newLength)),i=n.endOffset}return t}},94150:(e,t,i)=>{"use strict";i.d(t,{C7:()=>r,MS:()=>_,QB:()=>p,Qx:()=>C,VL:()=>w,Vh:()=>l,Vp:()=>a,eu:()=>h,l4:()=>u,o0:()=>y,pW:()=>f,qe:()=>d,rR:()=>S,sS:()=>g,vr:()=>b,wP:()=>m,zG:()=>v});var n=i(20601),o=i(8690),s=i(33904);function r(e,t,i,n){return e!==i?d(i-e,n):d(0,n-t)}const a=0;function l(e){return 0===e}const c=2**26;function d(e,t){return e*c+t}function u(e){const t=e,i=Math.floor(t/c),n=t-i*c;return new s.W(i,n)}function h(e){return Math.floor(e/c)}function g(e){return e}function p(e,t){let i=e+t;return t>=c&&(i-=e%c),i}function f(e,t){return e.reduce(((e,i)=>p(e,t(i))),a)}function m(e,t){return e===t}function _(e,t){const i=e,n=t,o=n-i;if(o<=0)return a;const s=Math.floor(i/c),r=Math.floor(n/c),l=n-r*c;if(s===r){const e=i-s*c;return d(0,l-e)}return d(r-s,l)}function v(e,t){return e=t}function w(e){return d(e.lineNumber-1,e.column-1)}function C(e,t){const i=e,n=Math.floor(i/c),s=i-n*c,r=t,a=Math.floor(r/c),l=r-a*c;return new o.Q(n+1,s+1,a+1,l+1)}function S(e){const t=(0,n.uz)(e);return d(t.length-1,t[t.length-1].length)}},87867:(e,t,i)=>{"use strict";i.d(t,{T:()=>m});var n=i(82584),o=i(95239),s=i(55239),r=i(94150);function a(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;t++;while(t=2?l(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())c(n,o)<=c(o,e)?(n=d(n,o),o=e):o=d(o,e);const s=d(n,o);return s}function l(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;while(i>3){const o=i>>1;for(let s=0;s=3?e[2]:null,t)}function c(e,t){return Math.abs(e.listHeight-t.listHeight)}function d(e,t){return e.listHeight===t.listHeight?n.Xw.create23(e,t,null,!1):e.listHeight>t.listHeight?u(e,t):h(t,e)}function u(e,t){e=e.toMutable();let i=e;const o=[];let s;while(1){if(t.listHeight===i.listHeight){s=t;break}if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeLastElementMutable()}for(let e=o.length-1;e>=0;e--){const t=o[e];s?t.childrenLength>=3?s=n.Xw.create23(t.unappendChild(),s,null,!1):(t.appendChildOfSameHeight(s),s=void 0):t.handleChildrenChanged()}return s?n.Xw.create23(e,s,null,!1):e}function h(e,t){e=e.toMutable();let i=e;const o=[];while(t.listHeight!==i.listHeight){if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeFirstElementMutable()}let s=t;for(let e=o.length-1;e>=0;e--){const t=o[e];s?t.childrenLength>=3?s=n.Xw.create23(s,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(s),s=void 0):t.handleChildrenChanged()}return s?n.Xw.create23(s,e,null,!1):e}class g{constructor(e){this.lastOffset=r.Vp,this.nextNodes=[e],this.offsets=[r.Vp],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.zG)(e,this.lastOffset))throw new Error("Invalid offset");this.lastOffset=e;while(1){const i=f(this.nextNodes);if(!i)return;const n=f(this.offsets);if((0,r.zG)(e,n))return;if((0,r.zG)(n,e))if((0,r.QB)(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=p(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=p(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){while(1){const e=f(this.offsets),t=f(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=f(this.nextNodes),n=p(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.QB)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function p(e,t=-1){while(1){if(t++,t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function f(e){return e.length>0?e[e.length-1]:void 0}function m(e,t,i,n){const o=new _(e,t,i,n);return o.parseDocument()}class _{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new g(i):void 0,this.positionMapper=new o.W(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(s.gV.getEmpty(),0);return e||(e=n.Xw.getEmpty()),e}parseList(e,t){const i=[];while(1){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?a(i):l(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.Vh)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>{if(null!==t&&!(0,r.zG)(i.length,t))return!1;const n=i.canBeReused(e);return n}));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new n.Gc(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new n.yF(i.length);const o=e.merge(i.bracketIds),s=this.parseList(o,t+1),r=this.tokenizer.peek();return r&&2===r.kind&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),n.Nn.create(i.astNode,s,r.astNode)):n.Nn.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}},55239:(e,t,i)=>{"use strict";i.d(t,{FD:()=>s,Mg:()=>r,gV:()=>o});const n=[];class o{static{this.cache=new Array(129)}static create(e,t){if(e<=128&&0===t.length){let i=o.cache[e];return i||(i=new o(e,t),o.cache[e]=i),i}return new o(e,t)}static{this.empty=o.create(0,n)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<{"use strict";i.d(t,{_:()=>u,ou:()=>l,tk:()=>c});var n=i(14396),o=i(4577),s=i(82584),r=i(94150),a=i(55239);class l{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class c{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new d(this.textModel,this.bracketTokens),this._offset=r.Vp,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,r.qe)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,r.QB)(this._offset,e);const t=(0,r.l4)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,r.QB)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class d{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,r.sS)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;while(1){const n=this.lineTokens,s=n.getCount();let a=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(0,r.C7)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.gV.getEmpty(),new s.yF(n))}}class u{constructor(e,t){this.text=e,this._offset=r.Vp,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,o=[];let c,d=0,u=0,h=0,g=0;const p=[];for(let e=0;e<60;e++)p.push(new l((0,r.qe)(0,e),0,-1,a.gV.getEmpty(),new s.yF((0,r.qe)(0,e))));const f=[];for(let e=0;e<60;e++)f.push(new l((0,r.qe)(1,e),0,-1,a.gV.getEmpty(),new s.yF((0,r.qe)(1,e))));if(n){n.lastIndex=0;while(null!==(c=n.exec(e))){const e=c.index,i=c[0];if("\n"===i)d++,u=e+1;else{if(h!==e){let t;if(g===d){const i=e-h;if(i{"use strict";i.d(t,{Th:()=>f,z8:()=>m});var n=i(41337),o=i(14396),s=i(98581),r=i(29133),a=i(14020),l=i(87885),c=i(84366);function d(e){return e.toString()}class u{static create(e,t){const i=e.getAlternativeVersionId(),n=p(e);return new u(i,i,n,n,t,t,[])}constructor(e,t,i,n,o,s,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=s,this.changes=r}append(e,t,i,n,o){t.length>0&&(this.changes=(0,a.x)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.Sw(e,t?t.length:0,i),i+=4,t)for(const n of t)l.Sw(e,n.selectionStartLineNumber,i),i+=4,l.Sw(e,n.selectionStartColumn,i),i+=4,l.Sw(e,n.positionLineNumber,i),i+=4,l.Sw(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.bb(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){const t=r.r.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof u}append(e,t,i,n,o){this._data instanceof u&&this._data.append(e,t,i,n,o)}close(){this._data instanceof u&&(this._data=this._data.serialize())}open(){this._data instanceof u||(this._data=u.deserialize(this._data))}undo(){if(r.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());const e=u.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof u&&(this._data=this._data.serialize());const e=u.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof u&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=d(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=d(e);return this._editStackElementsMap.has(t)}setModel(e){const t=d(r.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=d(e.uri);if(this._editStackElementsMap.has(t)){const i=this._editStackElementsMap.get(t);return i.canAppend(e)}return!1}append(e,t,i,n,o){const s=d(e.uri),r=this._editStackElementsMap.get(s);r.append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=d(e);if(this._editStackElementsMap.has(t)){const e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,c.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){const t=e.getEOL();return"\n"===t?0:1}function f(e){return!!e&&(e instanceof h||e instanceof g)}class m{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(f(i)&&i.canAppend(this._model))return i;const o=new h(n.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(o,t),o}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const o=this._getOrCreateEditStackElement(e,n),s=this._model.applyEdits(t,!0),r=m._computeCursorState(i,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),o.append(this._model,a.map((e=>e.textChange)),p(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dz)(e),null}}}},26783:(e,t,i)=>{"use strict";i.d(t,{P:()=>u,k:()=>h});var n=i(43654),o=i(20601),s=i(32142),r=i(8690),a=i(65148),l=i(47172),c=i(26530),d=i(14396);class u extends a._{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.G)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new d.D7("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,c=-1;const u=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let h=-2,g=-1,p=-2,f=-1;const m=e=>{if(-2===h){h=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){h=t,g=e;break}}}if(-1!==p&&(-2===p||p=0){p=t,f=e;break}}}};let _=0,v=!0,b=0,y=!0,w=0,C=0;for(let o=0;v||y;o++){const r=e-o,d=e+o;o>1&&(r<1||r1&&(d>n||d>i)&&(y=!1),o>5e4&&(v=!1,y=!1);let p=-1;if(v&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,c=e,p=Math.ceil(e/this.textModel.getOptions().indentSize)):(u(r),p=this._getIndentLevelForWhitespaceLine(s,a,c))}let S=-1;if(y&&d<=n){const e=this._computeIndentLevel(d-1);e>=0?(h=d-1,g=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(d),S=this._getIndentLevelForWhitespaceLine(s,g,f))}if(0!==o){if(1===o){if(d<=n&&S>=0&&C+1===S){v=!1,_=d,b=d,w=S;continue}if(r>=1&&p>=0&&p-1===C){y=!1,_=r,b=r,w=p;continue}if(_=e,b=e,w=C,0===w)return{startLineNumber:_,endLineNumber:b,indent:w}}v&&(p>=w?_=r:v=!1),y&&(S>=w?b=d:y=!1)}else C=p}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,i,s){const a=[];for(let i=e;i<=t;i++)a.push([]);const l=!0,d=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let u;if(i&&d.length>0){const o=(e<=i.lineNumber&&i.lineNumber<=t?d:this.textModel.bracketPairs.getBracketPairsInRange(r.Q.fromPositions(i)).toArray()).filter((e=>r.Q.strictContainsPosition(e.range,i)));u=(0,n.Uk)(o,(e=>l||e.range.startLineNumber!==e.range.endLineNumber))?.range}const g=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,p=new h;for(const i of d){if(!i.closingBracketRange)continue;const n=u&&i.range.equalsRange(u);if(!n&&!s.includeInactive)continue;const r=p.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,g)+(s.highlightActive&&n?" "+p.activeClassName:""),d=i.openingBracketRange.getStartPosition(),h=i.closingBracketRange.getStartPosition(),f=s.horizontalGuides===c.N6.Enabled||s.horizontalGuides===c.N6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){l&&f&&a[i.range.startLineNumber-e].push(new c.TH(-1,i.openingBracketRange.getEndPosition().column,r,new c.pv(!1,h.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(h),_=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),v=Math.min(_,m,i.minVisibleColumnIndentation+1);let b=!1;const y=o.HG(this.textModel.getLineContent(i.closingBracketRange.startLineNumber)),w=y=e&&_>v&&a[d.lineNumber-e].push(new c.TH(v,-1,r,new c.pv(!1,d.column),-1,-1)),h.lineNumber<=t&&m>v&&a[h.lineNumber-e].push(new c.TH(v,-1,r,new c.pv(!b,h.column),-1,-1)))}for(const e of a)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return a}getVisibleColumnFromPosition(e){return s.A.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide),r=new Array(t-e+1);let a=-2,l=-1,c=-2,d=-1;for(let o=e;o<=t;o++){const t=o-e,u=this._computeIndentLevel(o-1);if(u>=0)a=o-1,l=u,r[t]=Math.ceil(u/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t{"use strict";i.d(t,{N:()=>s,c2:()=>r});var n=i(85053),o=i(62647);class s{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,o.j)(e);const i=this.values,n=this.prefixSum,s=t.length;return 0!==s&&(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,o.j)(e),t=(0,o.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,o.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,s=0;while(t<=i)if(n=t+(i-t)/2|0,o=this.prefixSum[n],s=o-this.values[n],e=o))break;t=n+1}return new a(n,e-s)}}class r{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.nK)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;n{"use strict";i.d(t,{Ho:()=>mi,kI:()=>_i,Bz:()=>si});var n=i(85053),o=i(85476),s=i(14396),r=i(40231),a=i(5091),l=i(20601),c=i(29133),d=i(36627),u=i(79680),h=i(36788),g=i(8690),p=i(98581),f=i(99989),m=i(14573),_=i(50395),v=i(9322),b=i(23099),y=i(28889);class w{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class C{constructor(e,t,i,n,o,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=o,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class S extends C{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o,s),this.minVisibleColumnIndentation=r}}var k=i(95239),x=i(39399),E=i(94150),L=i(87867),T=i(55239),I=i(39029),D=i(18485);class R extends a.jG{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new r.vl,this.denseKeyProvider=new T.Mg,this.brackets=new x.Z(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new I._(this.textModel.getValue(),e);this.initialAstWithoutTokens=(0,L.T)(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new k.c((0,E.qe)(e.fromLineNumber-1,0),(0,E.qe)(e.toLineNumber,0),(0,E.qe)(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=k.c.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=(0,D.M)(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,D.M)(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=!1,o=n?t?.deepClone():t,s=new I.tk(this.textModel,this.brackets),r=(0,L.T)(s,e,o,i);return r}getBracketsInRange(e,t){this.flushQueue();const i=(0,E.qe)(e.startLineNumber-1,e.startColumn-1),o=(0,E.qe)(e.endLineNumber-1,e.endColumn-1);return new n.c1((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens;O(n,E.Vp,n.length,i,o,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=(0,E.VL)(e.getStartPosition()),o=(0,E.VL)(e.getEndPosition());return new n.c1((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens,s=new P(e,t,this.textModel);M(n,E.Vp,n.length,i,o,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return A(t,E.Vp,t.length,(0,E.VL)(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return N(t,E.Vp,t.length,(0,E.VL)(e))}}function N(e,t,i,n){if(4===e.kind||2===e.kind){const o=[];for(const n of e.children)i=(0,E.QB)(t,n.length),o.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=o.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:s}=o[t];if((0,E.zG)(i,n)){const o=N(e.children[t],i,s,n);if(o)return o}}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,E.Qx)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function A(e,t,i,n){if(4===e.kind||2===e.kind){for(const o of e.children){if(i=(0,E.QB)(t,o.length),(0,E.zG)(n,i)){const e=A(o,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,E.Qx)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function O(e,t,i,n,o,s,r,a,l,c,d=!1){if(r>200)return!0;e:while(1)switch(e.kind){case 4:{const a=e.childrenLength;for(let d=0;d200)return!0;let l=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const d=(0,E.QB)(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),l=s.push(new S((0,E.Qx)(t,i),(0,E.Qx)(t,d),e.closingBracket?(0,E.Qx)((0,E.QB)(d,e.child?.length||E.Vp),i):void 0,r,c,e,u)),t=d,l&&e.child){const c=e.child;if(i=(0,E.QB)(t,c.length),(0,E.vr)(t,o)&&(0,E.o0)(i,n)&&(l=M(c,t,i,n,o,s,r+1,a),!l))return!1}a?.set(e.openingBracket.text,c)}else{let i=t;for(const t of e.children){const e=i;if(i=(0,E.QB)(i,t.length),(0,E.vr)(e,o)&&(0,E.vr)(n,i)&&(l=M(t,e,i,n,o,s,r,a),!l))return!1}}return l}class F extends a.jG{get canBuildAST(){const e=5e6;return this.textModel.getValueLength()<=e}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.HE),this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new a.Cm;this.bracketPairsTree.value=B(e.add(new R(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),e),e.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||n.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||n.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||n.c1.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(g.Q.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!s)return null;const r=s.textIsBracket[t];return r?V(this._findMatchingBracketUp(r,n,W(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(g.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,n.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),g.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=W(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),s=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if((0,b.Yo)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,b.Yo)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),s=n.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(r&&!(0,b.Yo)(n.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,s),c=null;while(1){const n=y.Fu.findNextBracketInRange(r.forwardRegex,i,o,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=o.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof H)return null;c=i}}a=n.endColumn-1}if(c)return c}if(s>0&&n.getStartOffset(s)===e.column-1){const r=s-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!(0,b.Yo)(n.getStandardTokenType(r))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),c=y.Fu.findPrevBracketInRange(a.reversedRegex,i,o,s,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=o.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),i=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof H?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof H?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{while(1){if(i&&++r%100===0&&!i())return H.INSTANCE;const c=y.Fu.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=o-1,l=s.length,c=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!(0,b.Yo)(i.getStandardTokenType(r));if(t)d?l=i.getStartOffset(r):(l=i.getStartOffset(r),c=i.getEndOffset(r));else if(d&&l!==c){const t=a(e,s,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,s,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{while(1){if(i&&++r%100===0&&!i())return H.INSTANCE;const c=y.Fu.findNextBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=0,l=0,c=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r=1;e--){const s=this.textModel.tokenization.getLineTokens(e),r=s.getCount(),a=this.textModel.getLineContent(e);let l=r-1,c=a.length,d=a.length;if(e===t.lineNumber){l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1;const e=s.getLanguageId(l);i!==e&&(i=e,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,o=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let u=!0;for(;l>=0;l--){const t=s.getLanguageId(l);if(i!==t){if(n&&o&&u&&c!==d){const t=y.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(o,t);u=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,o=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const r=!!n&&!(0,b.Yo)(s.getStandardTokenType(l));if(r)u?c=s.getStartOffset(l):(c=s.getStartOffset(l),d=s.getEndOffset(l));else if(o&&n&&u&&c!==d){const t=y.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(o,t)}u=r}if(o&&n&&u&&c!==d){const t=y.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(o,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const i=this.textModel.getLineCount();let n=null,o=null,s=null;for(let e=t.lineNumber;e<=i;e++){const i=this.textModel.tokenization.getLineTokens(e),r=i.getCount(),a=this.textModel.getLineContent(e);let l=0,c=0,d=0;if(e===t.lineNumber){l=i.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1;const e=i.getLanguageId(l);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let u=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=W(t),o=this.textModel.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{while(1){if(n&&++l%100===0&&!n())return H.INSTANCE;const a=y.Fu.findNextBracketInRange(e.forwardRegex,t,i,o,s);if(!a)break;const c=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?r[d.index]++:d.isClose(c)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,n);o=a.endColumn-1}return null};let d=null,u=null;for(let e=i.lineNumber;e<=o;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),o=this.textModel.getLineContent(e);let s=0,r=0,l=0;if(e===i.lineNumber){s=t.findTokenIndexAtOffset(i.column-1),r=i.column-1,l=i.column-1;const e=t.getLanguageId(s);d!==e&&(d=e,u=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,u))}let h=!0;for(;st?.dispose()}}function W(e){if("undefined"===typeof e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class H{static{this.INSTANCE=new H}constructor(){this._searchCanceledBrand=void 0}}function V(e){return e instanceof H?null:e}var j=i(52764),z=i(15911);class U extends a.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new $,this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){if(n)return[];if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const o=this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray();return o}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new g.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class ${constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,z.zy)(((e,t)=>{const i=[j.sN,j.lQ,j.ss,j.l5,j.sH,j.zp],n=new $;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(j.s7)}; }`);const o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));var q=i(18217),K=i(26783);class G{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Q(e,t,i,n,o){let s;for(o.spacesDiff=0,o.looksLikeAlignment=!1,s=0;s0&&a>0)return;if(l>0&&c>0)return;const d=Math.abs(a-c),u=Math.abs(r-l);if(0===d)return o.spacesDiff=u,void(u>0&&0<=l-1&&l-10?o++:m>1&&s++,Q(r,a,h,f,u),u.looksLikeAlignment&&(!i||t!==u.spacesDiff))continue;const v=u.spacesDiff;v<=c&&d[v]++,r=h,a=f}let h=i;o!==s&&(h=o{const i=d[t];i>e&&(e=i,g=t)})),4===g&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(g=2)}return{insertSpaces:h,tabSize:g}}function Z(e){return(1&e.metadata)>>>0}function X(e,t){e.metadata=254&e.metadata|t}function J(e){return(2&e.metadata)>>>1===1}function ee(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function te(e){return(4&e.metadata)>>>2===1}function ie(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function ne(e){return(64&e.metadata)>>>6===1}function oe(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function se(e){return(24&e.metadata)>>>3}function re(e,t){e.metadata=231&e.metadata|t<<3}function ae(e){return(32&e.metadata)>>>5===1}function le(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class ce{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,X(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,ie(this,!1),oe(this,!1),re(this,1),le(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,ee(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;ie(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),oe(this,null!==this.options.glyphMarginClassName),re(this,this.options.stickiness),le(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const de=new ce(null,0,0);de.parent=de,de.left=de,de.right=de,X(de,0);class ue{constructor(){this.root=de,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o,s){return this.root===de?[]:ye(this,e,t,i,n,o,s)}search(e,t,i,n){return this.root===de?[]:be(this,e,t,i,n)}collectNodesFromOwner(e){return _e(this,e)}collectNodesPostOrder(){return ve(this)}insert(e){we(this,e),this._normalizeDeltaIfNecessary()}delete(e){Se(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;while(e!==this.root)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,t,i,n){const o=fe(this,e,e+t);for(let e=0,t=o.length;ei)&&(1!==n&&(2===n||t))}function pe(e,t,i,n,o){const s=se(e),r=0===s||2===s,a=1===s||2===s,l=i-t,c=n,d=Math.min(l,c),u=e.start;let h=!1;const g=e.end;let p=!1;t<=u&&g<=i&&ae(e)&&(e.start=t,h=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!h&&ge(u,r,t,e)&&(h=!0),!p&&ge(g,a,t,e)&&(p=!0)}if(d>0&&!o){const e=l>c?2:0;!h&&ge(u,r,t+d,e)&&(h=!0),!p&&ge(g,a,t+d,e)&&(p=!0)}{const n=o?1:0;!h&&ge(u,r,i,n)&&(e.start=t+c,h=!0),!p&&ge(g,a,i,n)&&(e.end=t+c,p=!0)}const f=c-l;h||(e.start=Math.max(0,u+f)),p||(e.end=Math.max(0,g+f)),e.start>e.end&&(e.end=e.start)}function fe(e,t,i){let n=e.root,o=0,s=0,r=0,a=0;const l=[];let c=0;while(n!==de)if(J(n))ee(n.left,!1),ee(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!J(n.left)){if(s=o+n.maxEnd,si?ee(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[c++]=n),ee(n,!0),n.right===de||J(n.right)||(o+=n.delta,n=n.right))}return ee(e.root,!1),l}function me(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=n-(i-t);while(o!==de)if(J(o))ee(o.left,!1),ee(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),Ie(o),o=o.parent;else{if(!J(o.left)){if(r=s+o.maxEnd,ri?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),ee(o,!0)):(ee(o,!0),o.right===de||J(o.right)||(s+=o.delta,o=o.right))}ee(e.root,!1)}function _e(e,t){let i=e.root;const n=[];let o=0;while(i!==de)J(i)?(ee(i.left,!1),ee(i.right,!1),i=i.parent):i.left===de||J(i.left)?(i.ownerId===t&&(n[o++]=i),ee(i,!0),i.right===de||J(i.right)||(i=i.right)):i=i.left;return ee(e.root,!1),n}function ve(e){let t=e.root;const i=[];let n=0;while(t!==de)J(t)?(ee(t.left,!1),ee(t.right,!1),t=t.parent):t.left===de||J(t.left)?t.right===de||J(t.right)?(i[n++]=t,ee(t,!0)):t=t.right:t=t.left;return ee(e.root,!1),i}function be(e,t,i,n,o){let s=e.root,r=0,a=0,l=0;const c=[];let d=0;while(s!==de){if(J(s)){ee(s.left,!1),ee(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s=s.parent;continue}if(s.left!==de&&!J(s.left)){s=s.left;continue}a=r+s.start,l=r+s.end,s.setCachedOffsets(a,l,n);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),i&&te(s)&&(e=!1),o&&!ne(s)&&(e=!1),e&&(c[d++]=s),ee(s,!0),s.right===de||J(s.right)||(r+=s.delta,s=s.right)}return ee(e.root,!1),c}function ye(e,t,i,n,o,s,r){let a=e.root,l=0,c=0,d=0,u=0;const h=[];let g=0;while(a!==de)if(J(a))ee(a.left,!1),ee(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!J(a.left)){if(c=l+a.maxEnd,ci)ee(a,!0);else{if(u=l+a.end,u>=t){a.setCachedOffsets(d,u,s);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),o&&te(a)&&(e=!1),r&&!ne(a)&&(e=!1),e&&(h[g++]=a)}ee(a,!0),a.right===de||J(a.right)||(l+=a.delta,a=a.right)}}return ee(e.root,!1),h}function we(e,t){if(e.root===de)return t.parent=de,t.left=de,t.right=de,X(t,0),e.root=t,e.root;Ce(e,t),De(t.parent);let i=t;while(i!==e.root&&1===Z(i.parent))if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===Z(t)?(X(i.parent,0),X(t,0),X(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,Ee(e,i)),X(i.parent,0),X(i.parent.parent,1),Le(e,i.parent.parent))}else{const t=i.parent.parent.left;1===Z(t)?(X(i.parent,0),X(t,0),X(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,Le(e,i)),X(i.parent,0),X(i.parent.parent,1),Ee(e,i.parent.parent))}return X(e.root,0),t}function Ce(e,t){let i=0,n=e.root;const o=t.start,s=t.end;while(1){const e=Re(o,s,n.start+i,n.end+i);if(e<0){if(n.left===de){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===de){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=de,t.right=de,X(t,1)}function Se(e,t){let i,n;if(t.left===de?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===de?(i=t.left,n=t):(n=ke(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,X(i,0),t.detach(),xe(),Ie(i),void(e.root.parent=de);const o=1===Z(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,X(n,Z(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==de&&(n.left.parent=n),n.right!==de&&(n.right.parent=n)),t.detach(),o)return De(i.parent),n!==t&&(De(n),De(n.parent)),void xe();let s;De(i),De(i.parent),n!==t&&(De(n),De(n.parent));while(i!==e.root&&0===Z(i))i===i.parent.left?(s=i.parent.right,1===Z(s)&&(X(s,0),X(i.parent,1),Ee(e,i.parent),s=i.parent.right),0===Z(s.left)&&0===Z(s.right)?(X(s,1),i=i.parent):(0===Z(s.right)&&(X(s.left,0),X(s,1),Le(e,s),s=i.parent.right),X(s,Z(i.parent)),X(i.parent,0),X(s.right,0),Ee(e,i.parent),i=e.root)):(s=i.parent.left,1===Z(s)&&(X(s,0),X(i.parent,1),Le(e,i.parent),s=i.parent.left),0===Z(s.left)&&0===Z(s.right)?(X(s,1),i=i.parent):(0===Z(s.left)&&(X(s.right,0),X(s,1),Ee(e,s),s=i.parent.left),X(s,Z(i.parent)),X(i.parent,0),X(s.left,0),Le(e,i.parent),i=e.root));X(i,0),xe()}function ke(e){while(e.left!==de)e=e.left;return e}function xe(){de.parent=de,de.delta=0,de.start=0,de.end=0}function Ee(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==de&&(i.left.parent=t),i.parent=t.parent,t.parent===de?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,Ie(t),Ie(i)}function Le(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==de&&(i.right.parent=t),i.parent=t.parent,t.parent===de?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,Ie(t),Ie(i)}function Te(e){let t=e.end;if(e.left!==de){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==de){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function Ie(e){e.maxEnd=Te(e)}function De(e){while(e!==de){const t=Te(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function Re(e,t,i,n){return e===i?t-n:e-i}class Ne{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Ae)return Oe(this.right);let e=this;while(e.parent!==Ae){if(e.parent.left===e)break;e=e.parent}return e.parent===Ae?Ae:e.parent}prev(){if(this.left!==Ae)return Pe(this.left);let e=this;while(e.parent!==Ae){if(e.parent.right===e)break;e=e.parent}return e.parent===Ae?Ae:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Ae=new Ne(null,0);function Oe(e){while(e.left!==Ae)e=e.left;return e}function Pe(e){while(e.right!==Ae)e=e.right;return e}function Me(e){return e===Ae?0:e.size_left+e.piece.length+Me(e.right)}function Fe(e){return e===Ae?0:e.lf_left+e.piece.lineFeedCnt+Fe(e.right)}function Be(){Ae.parent=Ae}function We(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==Ae&&(i.left.parent=t),i.parent=t.parent,t.parent===Ae?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function He(e,t){const i=t.left;t.left=i.right,i.right!==Ae&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===Ae?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Ve(e,t){let i,n;if(t.left===Ae?(n=t,i=n.right):t.right===Ae?(n=t,i=n.left):(n=Oe(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),Be(),void(e.root.parent=Ae);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Ue(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Ue(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==Ae&&(n.left.parent=n),n.right!==Ae&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Ue(e,n)),t.detach(),i.parent.left===i){const t=Me(i),n=Fe(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const o=t-i.parent.size_left,s=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,ze(e,i.parent,o,s)}}if(Ue(e,i.parent),o)return void Be();let s;while(i!==e.root&&0===i.color)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,We(e,i.parent),s=i.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.right.color&&(s.left.color=0,s.color=1,He(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,We(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,He(e,i.parent),s=i.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.left.color&&(s.right.color=0,s.color=1,We(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,He(e,i.parent),i=e.root));i.color=0,Be()}function je(e,t){Ue(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,We(e,t)),t.parent.color=0,t.parent.parent.color=1,He(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,He(e,t)),t.parent.color=0,t.parent.parent.color=1,We(e,t.parent.parent))}e.root.color=0}function ze(e,t,i,n){while(t!==e.root&&t!==Ae)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Ue(e,t){let i=0,n=0;if(t!==e.root){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t!==e.root){t=t.parent,i=Me(t.left)-t.size_left,n=Fe(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;while(t!==e.root&&(0!==i||0!==n))t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}}Ae.parent=Ae,Ae.left=Ae,Ae.right=Ae,Ae.color=0;var $e=i(13569);const qe=65535;function Ke(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Ge{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function Qe(e,t=!0){const i=[0];let n=1;for(let t=0,o=e.length;t126)&&(r=!1)}const a=new Ge(Ke(e),n,o,s,r);return e.length=0,a}class Ze{constructor(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}class Xe{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Je{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Ae&&e.iterate(e.root,(e=>(e!==Ae&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class et{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class tt{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Xe("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Ae,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=Qe(e[t].buffer));const i=new Ze(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new et(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=qe,i=t-Math.floor(t/3),n=2*i;let o="",s=0;const r=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(s<=i||s+l0){const t=o.replace(/\r\n|\r|\n/g,e);r.push(new Xe(t,Qe(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Je(this,e)}getOffsetAt(e,t){let i=0,n=this.root;while(n!==Ae)if(n.left!==Ae&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;const o=this.getAccumulatedValue(n,e-n.lf_left-2);return i+(o+t-1)}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;while(t!==Ae)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){const e=this.getOffsetAt(i+1,1),t=n-e;return new h.y(i+1,t+1)}return new h.y(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Ae){const t=this.getOffsetAt(i+1,1),o=n-e-t;return new h.y(i+1,o+1)}t=t.right}return new h.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let s=n.substring(o+e.remainder,o+i.piece.length);i=i.next();while(i!==Ae){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){s+=e.substring(n,n+t.remainder);break}s+=e.substr(n,i.piece.length),i=i.next()}return s}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===Ae)return!0;const s=o.piece;let r=s.length;if(0===r)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,c=s.start.line,d=s.end.line;let u=l[c]+s.start.column;if(n&&(10===a.charCodeAt(u)&&(u++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(c===d)return this._EOLNormalized||13!==a.charCodeAt(u+r-1)?i+=a.substr(u,r):(n=!0,i+=a.substr(u,r-1)),!0;i+=this._EOLNormalized?a.substring(u,Math.max(u,l[c+1]-this._EOLLength)):a.substring(u,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+p,t.reset(0)):(v=u.buffer,b=e=>e,t.reset(p));do{if(m=t.next(v),m){if(b(m.index)>=f)return c;this.positionInBuffer(e,b(m.index)-h,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,_),s=_.line===o.line?_.column-o.column+n:_.column+1,r=s+m[0].length;if(d[c++]=(0,$e.dr)(new g.Q(i+t,s,i+t,r),m,a),b(m.index)+m[0].length>=f)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new $e.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,c,d,t,i,n,s,o),o;let u=e.startLineNumber,h=a.node;while(h!==l.node){const l=this.getLineFeedCnt(h.piece.bufferIndex,c,h.piece.end);if(l>=1){const a=this._buffers[h.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),g=a[c.line+l],p=u===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(h,r,u,p,c,this.positionInBuffer(h,g-d),t,i,n,s,o),s>=n)return o;u+=l}const d=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const a=this.getLineContent(u).substring(d,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,d,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(u).substr(d),u,d,s,o,i,n),s>=n)return o;u++,a=this.nodeAt2(u,1),h=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){const a=u===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(u).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}const g=u===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,u,g,c,d,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let u=-a;while(-1!==(u=i.indexOf(t,u+a)))if((!c||(0,$e.wC)(c,i,d,u,a))&&(r[s++]=new v.Dg(new g.Q(n,u+1+o,n,u+1+a+o),null),s>=l))return s;return s}let d;t.reset(0);do{if(d=t.next(i),d&&(r[s++]=(0,$e.dr)(new g.Q(n,d.index+1+o,n,d.index+1+d[0].length+o),d,a),s>=l))return s}while(d);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Ae){const{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),s=i.piece,r=s.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&o+s.length===e&&t.lengthe){const e=[];let o=new Ze(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(r,s.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){const e=this.nodeCharCodeAt(i,n);if(10===e){const e={line:o.start.line+1,column:0};o=new Ze(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){const o=this.nodeCharCodeAt(i,n-1);if(13===o){const o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let c=i;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let e=1;e=u))break;l=d+1}}return i?(i.line=d,i.column=a-h,null):{line:d,column:a-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;const r=s-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){const i=this._buffers[e].lineStarts;return i[t.line]+t.column}deleteNodes(e){for(let t=0;tqe){const t=[];while(e.length>qe){const i=e.charCodeAt(qe-1);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,qe-1),e=e.substring(qe-1)):(n=e.substring(0,qe),e=e.substring(qe));const o=Qe(n);t.push(new Ze(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new Xe(n,o))}const i=Qe(e);return t.push(new Ze(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new Xe(e,i)),t}let t=this._buffers[0].buffer.length;const i=Qe(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:s-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}i=i.next();while(i!==Ae){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;while(e!==Ae)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,r=this.offsetInBuffer(i.bufferIndex,s),a=this.getLineFeedCnt(i.bufferIndex,i.start,s),l=a-n,c=r-o,d=i.length+c;e.piece=new Ze(i.bufferIndex,i.start,s,a,d),ze(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,r=this.getLineFeedCnt(i.bufferIndex,s,i.end),a=this.offsetInBuffer(i.bufferIndex,s),l=r-n,c=o-a,d=i.length+c;e.piece=new Ze(i.bufferIndex,s,i.end,r,d),ze(this,e,c,l)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new Ze(n.bufferIndex,n.start,l,c,d),ze(this,e,d-r,c-a);const u=new Ze(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),h=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(h)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=Qe(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;while(i!==Ae)if(i.left!==Ae&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}i=i.next();while(i!==Ae){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){const e=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:e}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===Ae||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;if(n===i.length-1)return!1;const s=i[n+1];return!(s>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==Ae&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let o;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new Ze(e.piece.bufferIndex,e.piece.start,o,r,s),ze(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Ze(t.piece.bufferIndex,a,t.piece.end,c,l),ze(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const p=this._doApplyEdits(a);let f=null;if(t&&h.length>0){h.sort(((e,t)=>t.lineNumber-e.lineNumber)),f=[];for(let e=0,t=h.length;e0&&h[e-1].lineNumber===t)continue;const i=h[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.HG(n)&&f.push(t)}}return this._onDidChangeContent.fire(),new v.F4(g,p,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new g.Q(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let s=i.startLineNumber,r=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),s=o.endLineNumber,r=o.endColumn}const l=a.join(""),[c,u,h]=(0,d.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:c,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(nt._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;c=1===e?new g.Q(a,l,a,l+r.firstLineLength):new g.Q(a,l,a+e-1,r.lastLineLength+1)}else c=new g.Q(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),o=r}return t}static _sortOpsAscending(e,t){const i=g.Q.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=g.Q.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class ot{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=Ye(this._tmpLineStarts,e);this.chunks.push(new Xe(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=l.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.$X(e)))}finish(e=!0){return this._finish(),new ot(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Qe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var rt=i(44544),at=i(60939),lt=i(35350),ct=i(65148),dt=i(9659),ut=i(25160),ht=i(84240),gt=i(50371),pt=i(58403);class ft{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),o=this._store.slice(e+t),s=mt(i,this._default);this._store=n.concat(s,o)}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new _t(e,[t]))}finalize(){return this._tokens}}var bt=i(70164);class yt{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new Ct(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class wt extends yt{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();while(1){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const o=this._textModel.getLineContent(n.lineNumber),s=xt(this._languageIdCodec,i,this.tokenizationSupport,o,!0,n.startState);e.add(n.lineNumber,s.tokens),this.store.setEndState(n.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+t+o.substring(e.column-1),r=xt(this._languageIdCodec,n,this.tokenizationSupport,s,!0,i),a=new bt.f(r.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,o=e.column,s=this.getStartState(n);if(!s)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,o-1)+i+r.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),c=xt(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s),d=new bt.f(c.tokens,a,this._languageIdCodec);return d}hasAccurateTokensForLine(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&o>=1;o--){const e=this._textModel.getLineFirstNonWhitespaceColumn(o);if(0!==e&&(e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class kt{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new gt.L(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new gt.L(i.start,e):this._ranges.splice(t,1,new gt.L(i.start,e),new gt.L(e+1,i.endExclusive))}}addRange(e){gt.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;while(!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive))i++;let n=i;while(!(n>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function xt(e,t,i,n,o,r){let a=null;if(i)try{a=i.tokenizeEncoded(n,o,r.clone())}catch(e){(0,s.dz)(e)}return a||(a=(0,pt.Lh)(e.encodeLanguageId(t),r)),bt.f.convertToEndOffset(a.tokens,n.length),a}class Et{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,dt.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;const n=this._tokenizeOneInvalidLine(t);if(n>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new rt.M(e,t))}}class Lt{constructor(){this._onDidChangeVisibleRanges=new r.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Tt((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Tt{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new rt.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}class It extends a.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new dt.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,n.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class Dt extends a.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,i){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=i,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new r.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class Rt extends Dt{constructor(e,t,i,n){super(t,i,n),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=lt.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const i=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(i)return new bt.f(i,t,this._languageIdCodec)}return bt.f.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,i){return 0}tokenizeLineWithEdit(e,t,i){return null}get hasTokens(){const e=void 0!==this._treeSitterService.getParseResult(this._textModel);return e}}var Nt=i(15863);const At=new Uint32Array(0).buffer;class Ot{static deleteBeginning(e,t){return null===e||e===At?e:Ot.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===At)return e;const i=Pt(e),n=i[i.length-2];return Ot.delete(e,t,n)}static delete(e,t,i){if(null===e||e===At||t===i)return e;const n=Pt(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return At;const s=bt.f.findIndexInTokensArray(n,t),r=s>0?n[s-1<<1]:0,a=n[s<<1];if(ic&&(n[l++]=t,n[l++]=n[1+(e<<1)],c=t)}if(l===n.length)return e;const u=new Uint32Array(l);return u.set(n.subarray(0,l),0),u.buffer}static append(e,t){if(t===At)return e;if(e===At)return t;if(null===e)return e;if(null===t)return null;const i=Pt(e),n=Pt(t),o=n.length>>>1,s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e>>1;let s=bt.f.findIndexInTokensArray(n,t);if(s>0){const e=n[s-1<<1];e===t&&s--}for(let e=s;e0}getTokens(e,t,i){let n=null;if(t1&&(t=Mt.x.getLanguageId(n[1])!==e),!t)return At}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=Bt(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=Ot.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=Ot.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=Ot.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Ot.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=Ot.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,o=e.length;n>>0}class Wt{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){o=o||{index:e};continue}const[s,r]=n.split(i);s.isEmpty()?o=o||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.nK(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=Wt._findFirstPieceWithLine(i,e),o=i[n].getLineTokens(e);if(!o)return t;const s=t.getCount(),r=o.getCount();let a=0;const l=[];let c=0,d=0;const u=(e,t)=>{e!==d&&(d=e,l[c++]=e,l[c++]=t)};for(let e=0;e>>0,c=~l>>>0;while(at)){while(o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}var Ht,Vt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},jt=function(e,t){return function(i,n){t(i,n,e)}};let zt=Ht=class extends ct._{constructor(e,t,i,n,o,s,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=i,this._attachedViews=n,this._languageService=o,this._languageConfigurationService=s,this._treeSitterService=l,this._semanticTokens=new Wt(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new r.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new a.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(r.Jh.filter(lt.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new Ut(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new Rt(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){lt.OB.get(this._languageId)?this._tokens instanceof Rt||this.createTokens(!0):this._tokens instanceof Ut||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=(0,d.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new s.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this._tokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[s,r]=Ht._findLanguageBoundaries(n,o),a=(0,at.Th)(t.column,this.getLanguageConfiguration(n.getLanguageId(o)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&s===t.column-1){const[s,r]=Ht._findLanguageBoundaries(n,o-1),a=(0,at.Th)(t.column,this.getLanguageConfiguration(n.getLanguageId(o-1)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,s=e.getCount();n{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new It((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new Ct(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=lt.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,s.dz)(e),[null,null]}return[e,t]},[i,n]=t();if(this._tokenizer=i&&n?new wt(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{if(2===this._backgroundTokenizationState)return;const e=2;this._backgroundTokenizationState=e,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(e,t)=>{if(!this._tokenizer)return;const i=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==i&&e>=i&&this._tokenizer?.store.setEndState(e,t)}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Et(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),i?.backgroundTokenizerShouldOnlyVerifyTokens&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new Ft(this._languageIdCodec),this._debugBackgroundStates=new Ct(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,i]=(0,d.W)(t.text);this._tokens.acceptEdit(t.range,e,i),this._debugBackgroundTokens?.acceptEdit(t.range,e,i)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=rt.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const i=new vt,{heuristicTokens:n}=this._tokenizer.tokenizeHeuristically(i,e,t),o=this.setTokens(i.finalize());if(n)for(const e of o.changes)this._backgroundTokenizer.value?.requestTokens(e.fromLineNumber,e.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new vt;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const n=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!i.equals(n)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return i}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new h.y(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}var $t,qt=i(50410),Kt=i(87778),Gt=i(57642),Qt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Yt=function(e,t){return function(i,n){t(i,n,e)}};function Zt(e){const t=new st;return t.acceptChunk(e),t.finish()}function Xt(e){const t=new st;let i;while("string"===typeof(i=e.read()))t.acceptChunk(i);return t.finish()}function Jt(e,t){let i;return i="string"===typeof e?Zt(e):v.nk(e)?Xt(e):e,i.create(t)}let ei=0;const ti=999,ii=1e4;class ni{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;do{const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}while(1)}}const oi=()=>{throw new Error("Invalid change accessor")};let si=class extends a.jG{static{$t=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:f.R.tabSize,indentSize:f.R.indentSize,insertSpaces:f.R.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:f.R.trimAutoWhitespace,largeFileOptimizations:f.R.largeFileOptimizations,bracketPairColorizationOptions:f.R.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const i=Y(e,t.tabSize,t.insertSpaces);return new v.X2({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new v.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,a.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,o,s,d,u){super(),this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=d,this.instantiationService=u,this._onWillDispose=this._register(new r.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new yi((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new r.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new r.vl),this._eventEmitter=this._register(new wi),this._languageSelectionListener=this._register(new a.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new Lt,ei++,this.id="$model"+ei,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource="undefined"===typeof n||null===n?c.r.parse("inmemory://model/"+ei):n,this._attachedEditorCount=0;const{textBuffer:h,disposable:p}=Jt(e,i.defaultEOL);this._buffer=h,this._bufferDisposable=p,this._options=$t.resolveOptions(this._buffer,i);const f="string"===typeof t?t:t.languageId;"string"!==typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new F(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new K.P(this,this._languageConfigurationService)),this._decorationProvider=this._register(new U(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(zt,this,this._bracketPairs,f,this._attachedViews);const m=this._buffer.getLineCount(),_=this._buffer.getValueLengthInRange(new g.Q(1,1,m,this._buffer.getLineLength(m)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=_>$t.LARGE_FILE_SIZE_THRESHOLD||m>$t.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=_>$t.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=_>$t._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.tk(ei),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new di,this._commandManager=new q.z8(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new nt([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new s.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new qt.Ic(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e||void 0===e)throw(0,s.Qg)();const{textBuffer:t,disposable:i}=Jt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new di,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new qt.HP([new qt.Wn],this._versionId,!1,!1),this._createContentChanged2(new g.Q(1,1,o,s),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new qt.HP([new qt.mS],this._versionId,!1,!1),this._createContentChanged2(new g.Q(1,1,o,s),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=ii?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,i="undefined"!==typeof e.indentSize?e.indentSize:this._options.originalIndentSize,n="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s="undefined"!==typeof e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new v.X2({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=Y(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,u.P)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new s.D7("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new ni(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new s.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!==typeof i||isNaN(i)?1:i),s=Math.floor("number"!==typeof n||isNaN(n)?1:n);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(o);s>=e&&(s=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!==typeof r||isNaN(r)?1:r),c=Math.floor("number"!==typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===o&&n===s&&r===l&&a===c&&e instanceof g.Q&&!(e instanceof p.L)?e:new g.Q(o,s,l,c)}_isValidPosition(e,t,i){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(1===t)return!0;const o=this.getLineMaxColumn(e);if(t>o)return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(l.pc(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!==typeof e||isNaN(e)?1:e),o=Math.floor("number"!==typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(n<1)return new h.y(1,1);if(n>s)return new h.y(s,this.getLineMaxColumn(s));if(o<=1)return new h.y(n,1);const r=this.getLineMaxColumn(n);if(o>=r)return new h.y(n,r);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(l.pc(e))return new h.y(n,o-1)}return new h.y(n,o)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof h.y&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,s,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,r=l.pc(e),a=l.pc(t);return!r&&!a}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof g.Q&&!(e instanceof p.L)&&this._isValidRange(e,t))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),o=i.lineNumber,s=i.column,r=n.lineNumber,a=n.column;if(1===t){const e=s>1?this._buffer.getLineCharCode(o,s-2):0,t=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,i=l.pc(e),n=l.pc(t);return i||n?o===r&&s===a?new g.Q(o,s-1,r,a-1):i&&n?new g.Q(o,s-1,r,a+1):i?new g.Q(o,s-1,r,a):new g.Q(o,s,r,a+1):new g.Q(o,s,r,a)}return new g.Q(o,s,r,a)}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new g.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=ti){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>g.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>g.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new $e.lt(e,i,n,o),a=t.parseSearchRequest();if(!a)return[];c=e=>this.findMatchesLineByLine(e,a,s,r)}else c=t=>$e.hB.findMatches(this,new $e.lt(e,i,n,o),t,s,r);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new $e.lt(e,i,n,o),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let c=new g.Q(r.lineNumber,r.column,l,this.getLineMaxColumn(l)),d=this.findMatchesLineByLine(c,a,s,1);return $e.hB.findNextMatch(this,new $e.lt(e,i,n,o),r,s),d.length>0?d[0]:(c=new g.Q(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),d=this.findMatchesLineByLine(c,a,s,1),d.length>0?d[0]:null)}return $e.hB.findNextMatch(this,new $e.lt(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return $e.hB.findPreviousMatch(this,new $e.lt(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof v.Wo?e:new v.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&(!(n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0))&&!(n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1)))){s=!1;break}}if(s){const e=new g.Q(n,1,n,o);t.push(new v.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new g.Q(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new g.Q(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,0!==r.length){for(let e=0,t=r.length;e=0;t--){const i=l+t,n=m+t;w.takeFromEndWhile((e=>e.lineNumber>n));const o=w.takeFromEndWhile((e=>e.lineNumber===n));e.push(new qt.U0(i,this.getLineContent(n),o))}if(pe.lineNumbere.lineNumber===t))}e.push(new qt.bg(o+1,l+g,d,c))}t+=f}this._emitContentChangedEvent(new qt.HP(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===o.reverseEdits?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e),i=t.map((e=>new qt.U0(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new qt.vn(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,bi(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){(0,s.dz)(e)}return i.addDecoration=oi,i.changeDecoration=oi,i.changeDecorationOptions=oi,i.removeDecoration=oi,i.deltaDecorations=oi,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,s.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:vi[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(vi[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,o=!1,s=!1){const r=this.getLineCount(),a=Math.min(r,Math.max(1,e)),l=Math.min(r,Math.max(1,t)),c=this.getLineMaxColumn(l),d=new g.Q(a,1,l,c),u=this._getDecorationsInRange(d,i,o,s);return(0,n.E4)(u,this._decorationProvider.getDecorationsInRange(d,i,o)),u}getDecorationsInRange(e,t=0,i=!1,o=!1,s=!1){const r=this.validateRange(e),a=this._getDecorationsInRange(r,t,i,s);return(0,n.E4)(a,this._decorationProvider.getDecorationsInRange(r,t,i,o)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return qt.uK.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const o=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,o,s,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),s=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=n!==o,r=li(t)!==ci(i);s||r?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const o=this.getVersionId(),s=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(a);while(rthis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return ri(this.getLineContent(e))+1}};function ri(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}function ai(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function li(e){return!!e.after||!!e.before}function ci(e){return!!e.options.after||!!e.options.before}si=$t=Qt([Yt(4,Gt.$D),Yt(5,m.L),Yt(6,_.JZ),Yt(7,Kt._Y)],si);class di{constructor(){this._decorationsTree0=new ue,this._decorationsTree1=new ue,this._injectedTextDecorationsTree=new ue}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o,s){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,o,r,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,o,s){const r=this._decorationsTree0.intervalSearch(e,t,i,n,o,s),a=this._decorationsTree1.intervalSearch(e,t,i,n,o,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o,s);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,o){const s=e.getVersionId(),r=this._search(t,i,n,s,o);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,o){if(i)return this._decorationsTree1.search(e,t,n,o);{const i=this._decorationsTree0.search(e,t,n,o),s=this._decorationsTree1.search(e,t,n,o),r=this._injectedTextDecorationsTree.search(e,t,n,o);return i.concat(s).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){ci(e)?this._injectedTextDecorationsTree.insert(e):ai(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){ci(e)?this._injectedTextDecorationsTree.delete(e):ai(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){ci(e)?this._injectedTextDecorationsTree.resolveNode(e,t):ai(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function ui(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class hi{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class gi extends hi{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:v.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class pi{constructor(e){this.position=e?.position??v.ZS.Center,this.persistLane=e?.persistLane}}class fi extends hi{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?o.Q1.fromHex(e):t.getColor(e.id)}}class mi{static from(e){return e instanceof mi?e:new mi(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class _i{static register(e){return new _i(e)}static createDynamic(e){return new _i(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?ui(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?ui(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new gi(e.overviewRuler):null,this.minimap=e.minimap?new fi(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new pi(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?ui(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?ui(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?ui(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?l.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?ui(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?ui(e.marginClassName):null,this.inlineClassName=e.inlineClassName?ui(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?ui(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?ui(e.afterContentClassName):null,this.after=e.after?mi.from(e.after):null,this.before=e.before?mi.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}_i.EMPTY=_i.register({description:"empty"});const vi=[_i.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),_i.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),_i.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),_i.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function bi(e){return e instanceof _i?e:_i.createDynamic(e)}class yi extends a.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new r.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class wi extends a.jG{constructor(){super(),this._fastEmitter=this._register(new r.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new r.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},65148:(e,t,i)=>{"use strict";i.d(t,{_:()=>o});var n=i(5091);class o extends n.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}},13569:(e,t,i)=>{"use strict";i.d(t,{W5:()=>_,dr:()=>u,hB:()=>g,lt:()=>c,wC:()=>m});var n=i(20601),o=i(90385),s=i(36788),r=i(8690),a=i(9322);const l=999;class c{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?d(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.L5(t,this.wordSeparators?(0,o.i)(this.wordSeparators,[]):null,i?this.searchString:null)}}function d(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}function u(e,t,i){if(!i)return new a.Dg(e,null);const n=[];for(let e=0,i=t.length;e=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class g{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new _(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let a,l,c=0;if(n?(c=n.findLineFeedCountBeforeOffset(o),a=t+o+c):a=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+s.length),t=e-c;l=a+s.length+t}else l=a+s.length;const d=e.getPositionAt(a),u=e.getPositionAt(l);return new r.Q(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(r):null,l=[];let c,d=0;i.reset(0);while(c=i.next(r))if(l[d++]=u(this._getMultilineMatchRange(e,s,r,a,c.index,c[0]),c,n),d>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let a=t.startLineNumber+1;a=c))return o;return o}const h=new _(e.wordSeparators,e.regex);let g;h.reset(0);do{if(g=h.next(t),g&&(s[o++]=u(new r.Q(i,g.index+1+n,i,g.index+1+g[0].length+n),g,l),o>=c))return o}while(g);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new _(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new s.y(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),c=e.getValueInRange(new r.Q(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),d="\r\n"===e.getEOL()?new h(c):null;i.reset(t.column-1);const g=i.next(c);return g?u(this._getMultilineMatchRange(e,a,c,d,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new s.y(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const r=(s+t-1)%o,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const s=e.next(t);return s?u(new r.Q(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new _(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),i,n,10*l);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new s.y(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let t=1;t<=o;t++){const r=(o+s-t-1)%o,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,s=null;e.reset(0);while(o=e.next(t))s=u(new r.Q(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function p(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}function f(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}function m(e,t,i,n,o){return p(e,t,i,n,o)&&f(e,t,i,n,o)}class _{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const o=i.index,s=i[0].length;if(o===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){n.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=s,!this._wordSeparators||m(this._wordSeparators,e,t,o,s))return i}while(i);return null}}},47172:(e,t,i)=>{"use strict";function n(e,t){let i=0,n=0;const o=e.length;while(nn})},79184:(e,t,i)=>{"use strict";i.r(t),i.d(t,{KeyMod:()=>h,createMonacoBaseAPI:()=>g});var n=i(67792),o=i(40231),s=i(91348),r=i(29133),a=i(36788),l=i(8690),c=i(98581),d=i(35350),u=i(84296);class h{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return(0,s.m5)(e,t)}}function g(){return{editor:void 0,languages:void 0,CancellationTokenSource:n.Qi,Emitter:o.vl,KeyCode:u.DD,KeyMod:h,Position:a.y,Range:l.Q,Selection:c.L,SelectionDirection:u.SB,MarkerSeverity:u.cj,MarkerTag:u.d_,Uri:r.r,Token:d.ou}}},92341:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BaseEditorSimpleWorker:()=>J,EditorSimpleWorker:()=>ee,create:()=>te});var n=i(40651),o=i(8690),s=i(94529);class r{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,s=e*t;ot&&(t=s),o>i&&(i=o),r>i&&(i=r)}t++,i++;const n=new r(i,t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let l=null;function c(){return null===l&&(l=new a([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),l}let d=null;function u(){if(null===d){d=new s.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;tn);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=c()){const i=u(),n=[];for(let o=1,s=e.getLineCount();o<=s;o++){const s=e.getLineContent(o),r=s.length;let a=0,l=0,c=0,d=1,u=!1,g=!1,p=!1,f=!1;while(a=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}var f=i(79184),m=i(32899),_=i(84240),v=i(97412),b=i(42198),y=i(93866),w=i(20601),C=i(79109),S=i(44544);const k=3;class x{computeDiff(e,t,i){const n=new N(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}),s=n.computeDiff(),r=[];let a=null;for(const e of s.changes){let t,i;t=0===e.originalEndLineNumber?new S.M(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new S.M(e.originalStartLineNumber,e.originalEndLineNumber+1),i=0===e.modifiedEndLineNumber?new S.M(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new S.M(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let n=new y.wm(t,i,e.charChanges?.map((e=>new y.q6(new o.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new o.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));a&&(a.modified.endLineNumberExclusive!==n.modified.startLineNumber&&a.original.endLineNumberExclusive!==n.original.startLineNumber||(n=new y.wm(a.original.join(n.original),a.modified.join(n.modified),a.innerChanges&&n.innerChanges?a.innerChanges.concat(n.innerChanges):void 0),r.pop())),r.push(n),a=n}return(0,C.Ft)((()=>(0,C.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class I{constructor(e,t,i,n,o,s,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new I(n,o,s,r,a,l,c,d)}}function D(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const s=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=E(s,a,o,!0).changes;r&&(e=D(e)),u=[];for(let t=0,i=e.length;t1&&r>1){const n=e.charCodeAt(i-2),o=t.charCodeAt(r-2);if(n!==o)break;i--,r--}(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,s+1,1,r)}{let i=O(e,1),r=O(t,1);const a=e.length+1,l=t.length+1;while(i!0;const t=Date.now();return()=>Date.now()-tnew x,getDefault:()=>new M.D8};var B=i(85603),W=i(6657),H=i(85476);function V(e){const t=[];for(const i of e){const e=Number(i);(e||0===e&&""!==i.replace(/\s/g,""))&&t.push(e)}return t}function j(e,t,i,n){return{red:e/255,blue:i/255,green:t/255,alpha:n}}function z(e,t){const i=t.index,n=t[0].length;if(!i)return;const o=e.positionAt(i),s={startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:o.lineNumber,endColumn:o.column+n};return s}function U(e,t){if(!e)return;const i=H.Q1.Format.CSS.parseHex(t);return i?{range:e,color:j(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}:void 0}function $(e,t,i){if(!e||1!==t.length)return;const n=t[0],o=n.values(),s=V(o);return{range:e,color:j(s[0],s[1],s[2],i?s[3]:1)}}function q(e,t,i){if(!e||1!==t.length)return;const n=t[0],o=n.values(),s=V(o),r=new H.Q1(new H.hB(s[0],s[1]/100,s[2]/100,i?s[3]:1));return{range:e,color:j(r.rgba.r,r.rgba.g,r.rgba.b,r.rgba.a)}}function K(e,t){return"string"===typeof e?[...e.matchAll(t)]:e.findMatches(t)}function G(e){const t=[],i=/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm,n=K(e,i);if(n.length>0)for(const i of n){const n=i.filter((e=>void 0!==e)),o=n[1],s=n[2];if(!s)continue;let r;if("rgb"===o){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=$(z(e,i),K(s,t),!1)}else if("rgba"===o){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=$(z(e,i),K(s,t),!0)}else if("hsl"===o){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=q(z(e,i),K(s,t),!1)}else if("hsla"===o){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=q(z(e,i),K(s,t),!0)}else"#"===o&&(r=U(z(e,i),o+s));r&&t.push(r)}return t}function Q(e){return e&&"function"===typeof e.getValue&&"function"===typeof e.positionAt?G(e):[]}var Y=i(76198),Z=i(11955);const X=!0;class J{constructor(){this._workerTextModelSyncServer=new Z.WorkerTextModelSyncServer}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,i){const n=this._getModel(e);return n?v.UnicodeTextModelHighlighter.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const i=this._getModel(e);return i?(0,Y.findSectionHeaders)(i,t):[]}async $computeDiff(e,t,i,n){const o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;const r=ee.computeDiff(o,s,i,n);return r}static computeDiff(e,t,i,n){const o="advanced"===n?F.getDefault():F.getLegacy(),s=e.getLinesContent(),r=t.getLinesContent(),a=o.computeDiff(s,r,i),l=!(a.changes.length>0)&&this._modelsAreIdentical(e,t);function c(e){return e.map((e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:l,quitEarly:a.hitTimeout,changes:c(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,c(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let n=1;n<=i;n++){const i=e.getLineContent(n),o=t.getLineContent(n);if(i!==o)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,i){const s=this._getModel(e);if(!s)return t;const r=[];let a;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return o.Q.compareRangesUsingStarts(e.range,t.range);const i=e.range?0:1,n=t.range?0:1;return i-n}));let l=0;for(let e=1;eee._diffLimit){r.push({range:e,text:l});continue}const d=(0,n.F1)(t,l,i),u=s.offsetAt(o.Q.lift(e).getStartPosition());for(const e of d){const t=s.positionAt(u+e.originalStart),i=s.positionAt(u+e.originalStart+e.originalLength),n={text:l.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};s.getValueInRange(n.range)!==n.text&&r.push(n)}}return"number"===typeof a&&r.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?g(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?Q(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,i,n){const o=new _.W,s=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(s))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>ee._suggestionsLimit))break e}return{words:Array.from(r),duration:o.elapsed()}}async $computeWordRanges(e,t,i,n){const o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;ethis._host.$fhr(e,t),s=(0,B.kT)(n,o),r={host:s,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,t),Promise.resolve((0,B.V0)(this._foreignModule))):new Promise(((n,o)=>{const s=e=>{this._foreignModule=e.create(r,t),n((0,B.V0)(this._foreignModule))};if(X){const t=W.zl.asBrowserUri(`${e}.js`).toString(!0);i(9204)(`${t}`).then(s).catch(o)}else Promise.all([i.e(121),i.e(614)]).then(function(){var t=[i(47614)(`${e}`)];s.apply(null,t)}.bind(this))["catch"](o.bind(this))}))}$fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}function te(e){return new ee(m.EditorWorkerHost.getChannel(e),null)}"function"===typeof importScripts&&(globalThis.monaco=(0,f.createMonacoBaseAPI)())},4117:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IEditorWorkerService:()=>o});var n=i(87778);const o=(0,n.u1)("editorWorkerService")},32899:(e,t,i)=>{"use strict";i.r(t),i.d(t,{EditorWorkerHost:()=>n});class n{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(n.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(n.CHANNEL_NAME,t)}}},76198:(e,t,i)=>{"use strict";i.r(t),i.d(t,{findSectionHeaders:()=>s});const n=new RegExp("\\bMARK:\\s*(.*)$","d"),o=/^-+|-+$/g;function s(e,t){let i=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const n=r(e,t);i=i.concat(n)}if(t.findMarkSectionHeaders){const t=a(e);i=i.concat(t)}return i}function r(e,t){const i=[],n=e.getLineCount();for(let o=1;o<=n;o++){const n=e.getLineContent(o),s=n.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:o,startColumn:s[0].length+1,endLineNumber:o,endColumn:n.length+1};if(e.endColumn>e.startColumn){const t={range:e,...c(n.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&i.push(t)}}}return i}function a(e){const t=[],i=e.getLineCount();for(let n=1;n<=i;n++){const i=e.getLineContent(n);l(i,n,t)}return t}function l(e,t,i){n.lastIndex=0;const o=n.exec(e);if(o){const e=o.indices[1][0]+1,n=o.indices[1][1]+1,s={startLineNumber:t,startColumn:e,endLineNumber:t,endColumn:n};if(s.endColumn>s.startColumn){const e={range:s,...c(o[1]),shouldBeInComments:!0};(e.text||e.hasSeparatorLine)&&i.push(e)}}}function c(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(o,""),{text:e,hasSeparatorLine:t}}},55885:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getIconClasses:()=>d});var n=i(6657),o=i(84366),s=i(29133),r=i(65764),a=i(12082),l=i(23740);const c=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,i,r,d){if(l.L.isThemeIcon(d))return[`codicon-${d.id}`,"predefined-file-icon"];if(s.r.isUri(d))return[];const g=r===a.p.ROOT_FOLDER?["rootfolder-icon"]:r===a.p.FOLDER?["folder-icon"]:["file-icon"];if(i){let s;if(i.scheme===n.ny.data){const e=o.B6.parseMetaData(i);s=e.get(o.B6.META_DATA_LABEL)}else{const e=i.path.match(c);e?(s=h(e[2].toLowerCase()),e[1]&&g.push(`${h(e[1].toLowerCase())}-name-dir-icon`)):s=h(i.authority.toLowerCase())}if(r===a.p.ROOT_FOLDER)g.push(`${s}-root-name-folder-icon`);else if(r===a.p.FOLDER)g.push(`${s}-name-folder-icon`);else{if(s){if(g.push(`${s}-name-file-icon`),g.push("name-file-icon"),s.length<=255){const e=s.split(".");for(let t=1;t{"use strict";i.r(t),i.d(t,{ILanguageFeatureDebounceService:()=>g,LanguageFeatureDebounceService:()=>_});var n=i(65647),o=i(21553),s=i(19977),r=i(31554),a=i(59857),l=i(87778),c=i(12660),d=i(6657),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},h=function(e,t){return function(i,n){t(i,n,e)}};const g=(0,l.u1)("ILanguageFeatureDebounceService");var p;(function(e){const t=new WeakMap;let i=0;function n(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}e.of=n})(p||(p={}));class f{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class m{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new o.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,n.sN)(p.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?(0,s.qE)(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new s.mu(6),this._cache.set(i,n));const o=(0,s.qE)(n.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new s.Uq;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return(0,s.qE)(e,this._min,this._max)}}let _=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){const n=i?.min??50,o=i?.max??n**2,s=i?.key??void 0,r=`${p.of(e)},${n}${s?","+s:""}`;let a=this._data.get(r);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new f(1.5*n)):a=new m(this._logService,t,e,0|this._overallAverage()||1.5*n,n,o),this._data.set(r,a)),a}_overallAverage(){const e=new s.Uq;for(const t of this._data.values())e.update(t.default());return e.value}};_=u([h(0,c.rr),h(1,r.k)],_),(0,a.v)(g,_,1)},12847:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ILanguageFeaturesService:()=>o});var n=i(87778);const o=(0,n.u1)("ILanguageFeaturesService")},43207:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LanguageFeaturesService:()=>g});var n=i(40231),o=i(5091),s=i(9322),r=i(35784);function a(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(a):!!e.exclusive)}class l{constructor(e,t,i,n,o){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n,this.recursive=o}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class c{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new n.vl,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,o.s)((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e,t=!1){const i=[];return this._orderedForEach(e,t,(e=>i.push(e.provider))),i}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,!1,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t,i){this._updateScores(e,t);for(const e of this._entries)e._score>0&&i(e)}_updateScores(e,t){const i=this._notebookInfoResolver?.(e.uri),n=i?new l(e.uri,e.getLanguageId(),i.uri,i.type,t):new l(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(n)){this._lastCandidate=n;for(const i of this._entries)if(i._score=(0,r.f)(i.selector,n.uri,n.languageId,(0,s.vd)(e),n.notebookUri,n.notebookType),a(i.selector)&&i._score>0){if(!t){for(const e of this._entries)e._score=0;i._score=1e3;break}i._score=0}this._entries.sort(c._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._timet._time?-1:0}}function d(e){return"string"!==typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var u=i(12847),h=i(59857);class g{constructor(){this.referenceProvider=new c(this._score.bind(this)),this.renameProvider=new c(this._score.bind(this)),this.newSymbolNamesProvider=new c(this._score.bind(this)),this.codeActionProvider=new c(this._score.bind(this)),this.definitionProvider=new c(this._score.bind(this)),this.typeDefinitionProvider=new c(this._score.bind(this)),this.declarationProvider=new c(this._score.bind(this)),this.implementationProvider=new c(this._score.bind(this)),this.documentSymbolProvider=new c(this._score.bind(this)),this.inlayHintsProvider=new c(this._score.bind(this)),this.colorProvider=new c(this._score.bind(this)),this.codeLensProvider=new c(this._score.bind(this)),this.documentFormattingEditProvider=new c(this._score.bind(this)),this.documentRangeFormattingEditProvider=new c(this._score.bind(this)),this.onTypeFormattingEditProvider=new c(this._score.bind(this)),this.signatureHelpProvider=new c(this._score.bind(this)),this.hoverProvider=new c(this._score.bind(this)),this.documentHighlightProvider=new c(this._score.bind(this)),this.multiDocumentHighlightProvider=new c(this._score.bind(this)),this.selectionRangeProvider=new c(this._score.bind(this)),this.foldingRangeProvider=new c(this._score.bind(this)),this.linkProvider=new c(this._score.bind(this)),this.inlineCompletionsProvider=new c(this._score.bind(this)),this.inlineEditProvider=new c(this._score.bind(this)),this.completionProvider=new c(this._score.bind(this)),this.linkedEditingRangeProvider=new c(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new c(this._score.bind(this)),this.documentSemanticTokensProvider=new c(this._score.bind(this)),this.documentDropEditProvider=new c(this._score.bind(this)),this.documentPasteEditProvider=new c(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,h.v)(u.ILanguageFeaturesService,g,1)},64189:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LanguageService:()=>d});var n=i(40231),o=i(5091),s=i(77024),r=i(85053),a=i(35350),l=i(65764),c=i(39751);class d extends o.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new n.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new n.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new n.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,d.instanceCount++,this._registry=this._register(new s.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){d.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,r.Fy)(i,null)}createById(e){return new u(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new u(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class u{constructor(e,t){this._value=(0,c.y0)(this,e,(()=>t())),this.onDidChange=n.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},85911:(e,t,i)=>{"use strict";i.r(t),i.d(t,{clearPlatformLanguageAssociations:()=>m,getLanguageIds:()=>_,registerPlatformLanguageAssociation:()=>g});var n=i(13589),o=i(33911),s=i(6657),r=i(52444),a=i(84366),l=i(20601),c=i(65764);let d=[],u=[],h=[];function g(e,t=!1){p(e,!1,t)}function p(e,t,i){const n=f(e,t);d.push(n),n.userConfigured?h.push(n):u.push(n),i&&!n.userConfigured&&d.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}function f(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:t,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,n.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(r.SA.sep)>=0}}function m(){d=d.filter((e=>e.userConfigured)),u=[]}function _(e,t){return v(e,t).map((e=>e.id))}function v(e,t){let i;if(e)switch(e.scheme){case s.ny.file:i=e.fsPath;break;case s.ny.data:{const t=a.B6.parseMetaData(e);i=t.get(a.B6.META_DATA_LABEL);break}case s.ny.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:o.K.unknown}];i=i.toLowerCase();const n=(0,r.P8)(i),l=b(i,n,h);if(l)return[l,{id:c.vH,mime:o.K.text}];const d=b(i,n,u);if(d)return[d,{id:c.vH,mime:o.K.text}];if(t){const e=y(t);if(e)return[e,{id:c.vH,mime:o.K.text}]}return[{id:"unknown",mime:o.K.unknown}]}function b(e,t,i){let n,o,s;for(let r=i.length-1;r>=0;r--){const a=i[r];if(t===a.filenameLowercase){n=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){const i=a.filepatternOnPath?e:t;a.filepatternLowercase?.(i)&&(o=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&t.endsWith(a.extensionLowercase)&&(s=a)}return n||(o||(s||void 0))}function y(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=d.length-1;t>=0;t--){const i=d[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}}},77024:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LanguageIdCodec:()=>h,LanguagesRegistry:()=>g});var n=i(40231),o=i(5091),s=i(20601),r=i(85911),a=i(65764),l=i(27503),c=i(16374);const d=Object.prototype.hasOwnProperty,u="vs.editor.nullLanguage";class h{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(u,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||u}}class g extends o.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new h,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,r.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),c.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;d.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const o of t.filenames)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,s.eY)(t)||(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(i){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,i)}}e.aliases.push(i);let o=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const t of o)t&&0!==t.length&&e.aliases.push(t);const a=null!==o&&o.length>0;if(a&&null===o[0]);else{const t=(a?o[0]:null)||i;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&d.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return d.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&d.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,r.getLanguageIds)(e,t):[]}}},63637:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IMarkerDecorationsService:()=>o});var n=i(87778);const o=(0,n.u1)("markerDecorationsService")},23938:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MarkerDecorationsService:()=>_});var n=i(45658),o=i(5091),s=i(9322),r=i(15911),a=i(52764),l=i(69361),c=i(8690),d=i(6657),u=i(40231),h=i(66344),g=i(21553),p=i(52782),f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};let _=class extends o.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new u.vl),this._markerDecorations=new g.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new v(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==d.ny.inMemory&&e.uri.scheme!==d.ny.internal&&e.uri.scheme!==d.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};_=f([m(0,l.IModelService),m(1,n.DR)],_);class v extends o.jG{constructor(e){super(),this.model=e,this._map=new g.cO,this._register((0,o.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:i}=(0,p.Z)(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===i.length)return!1;const n=i.map((e=>this._map.get(e))),o=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(n,o);for(const e of i)this._map.delete(e);for(let e=0;e=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new c.Q(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}}},69361:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IModelService:()=>o});var n=i(87778);const o=(0,n.u1)("modelService")},96174:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DefaultModelSHA1Computer:()=>x,ModelService:()=>k});var n,o=i(40231),s=i(5091),r=i(25160),a=i(35037),l=i(99989),c=i(65764),d=i(56151),u=i(32828),h=i(57642),g=i(65647),p=i(18217),f=i(6657),m=i(85603),_=i(87778),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};function y(e){return e.toString()}class w{constructor(e,t,i){this.model=e,this._modelEventListeners=new s.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const C=r.j9||r.zx?1:2;class S{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let k=class extends s.jG{static{n=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,i,n){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._instantiationService=n,this._onModelAdded=this._register(new o.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new o.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new o.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let i=l.R.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n="tabSize";if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=Math.max(t,1))}let o=l.R.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=C;const r=e.eol;"\r\n"===r?s=2:"\n"===r&&(s=1);let a=l.R.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=l.R.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=l.R.largeFileOptimizations;e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let u=l.R.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"===typeof e.editor.bracketPairColorization&&(u={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:o,detectIndentation:c,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:d,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"===typeof i&&"auto"!==i?i:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}getCreationOptions(e,t,i){const o="string"===typeof e?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[o+t];if(!s){const e=this._configurationService.getValue("editor",{overrideIdentifier:o,resource:t}),r=this._getEOL(t,o);s=n._readModelOptions({editor:e,eol:r},i),this._modelCreationOptionsByLanguageAndResource[o+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let o=0,s=i.length;oe){const t=[];this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));while(t.length>0&&this._disposedModelsHeapSize>e){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),s=this._instantiationService.createInstance(a.Bz,e,t,o,i);if(i&&this._disposedModels.has(y(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=this._getSHA1Computer(),o=!!n.canComputeSHA1(s)&&n.computeSHA1(s)===e.sha1;if(o||e.sharesUndoRedoStack){for(const e of t.past)(0,p.Th)(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)(0,p.Th)(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,p.Th)(e)&&e.matchesResource(i))),o&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=y(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const l=new w(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=l,l}createModel(e,t,i,n=!1){let o;return o=t?this._createModelData(e,t,i,n):this._createModelData(e,c.vH,i,n),this._onModelAdded.fire(o.model),o.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||t.future.length>0){for(const i of t.past)(0,p.Th)(i)&&i.matchesResource(e.uri)&&(s=!0,r+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)(0,p.Th)(i)&&i.matchesResource(e.uri)&&(s=!0,r+=i.heapSize(e.uri),i.setModel(e.uri))}}const a=n.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(s)if(o||!(r>a)&&l.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>(0,p.Th)(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new S(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),o,r,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!o){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,o=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(o,e.uri,e.isForSimpleWidget);n._setModelOptionsForModel(e,r,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new x}};k=n=v([b(0,u.pG),b(1,d.ITextResourcePropertiesService),b(2,h.$D),b(3,_._Y)],k);class x{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=x.MAX_MODEL_SIZE}computeSHA1(e){const t=new g.v7,i=e.createSnapshot();let n;while(n=i.read())t.update(n);return t.digest()}}},64037:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ITextModelService:()=>o});var n=i(87778);const o=(0,n.u1)("textModelService")},33699:(e,t,i)=>{"use strict";i.r(t),i.d(t,{encodeSemanticTokensDto:()=>a});var n=i(87885),o=i(25160);function s(e){for(let t=0,i=e.length;t{"use strict";i.r(t),i.d(t,{SemanticTokensProviderStyling:()=>m,toMultilineTokens2:()=>_});var n=i(4577),o=i(15911),s=i(12660),r=i(36788),a=i(8690),l=i(36627);class c{static create(e,t){return new c(e,new d(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.Q(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,o,s]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new c(this._startLineNumber,n),new c(this._startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=(0,l.W)(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new r.y(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const s=e.lineNumber-this._startLineNumber;if(s<0)return void(this._startLineNumber+=t);const r=this._tokens.getMaxDeltaLine();s>=r+1||this._tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class d{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let o=n;while(o>t&&this._getDeltaLine(o-1)===e)o--;let s=n;while(se||d===e&&h>=t)&&(de||d===e&&g>=t){if(do?p-=o-i:p=i;else if(h===t&&g===i){if(!(h===n&&p>o)){c=!0;continue}p-=o-i}else if(ho)){c=!0;continue}h=t,g=i,p=g+(p-o)}else if(h>n){if(0===a&&!c){l=r;break}h-=a}else{if(!(h===n&&g>=o))throw new Error("Not possible!");e&&0===h&&(g+=e,p+=e),h-=a,g-=o-i,p-=o-i}const m=4*l;s[m]=h,s[m+1]=g,s[m+2]=p,s[m+3]=f,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}};const f=!1;let m=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new b}getMetadata(e,t,i){const o=this._languageService.languageIdCodec.encodeLanguageId(i),r=this._hashTable.get(e,t,o);let a;if(r)a=r.metadata,f&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${n.x.getForeground(a)}, fontStyle ${n.x.getFontStyle(a).toString(2)}`);else{let r=this._legend.tokenTypes[e];const l=[];if(r){let e=t;for(let t=0;e>0&&t>=1;f&&e>0&&this._logService.getLevel()===s.$b.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(r,l,i);if("undefined"===typeof n)a=2147483647;else{if(a=0,"undefined"!==typeof n.italic){const e=(n.italic?1:0)<<11;a|=1|e}if("undefined"!==typeof n.bold){const e=(n.bold?2:0)<<11;a|=2|e}if("undefined"!==typeof n.underline){const e=(n.underline?4:0)<<11;a|=4|e}if("undefined"!==typeof n.strikethrough){const e=(n.strikethrough?8:0)<<11;a|=8|e}if(n.foreground){const e=n.foreground<<15;a|=16|e}0===a&&(a=2147483647)}}else f&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,r="not-in-legend";this._hashTable.add(e,t,o,a),f&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${l.join(" ")}): foreground ${n.x.getForeground(a)}, fontStyle ${n.x.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${o}).`))}};function _(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),r=[];let a=0,l=1,d=0;while(ae&&0===n[5*t])t--;if(t-1===e){let e=u;while(e+1c)t.warnOverlappingSemanticTokens(r,c+1);else{const e=t.getMetadata(v,b,i);2147483647!==e&&(0===p&&(p=r),h[g]=r-p,h[g+1]=c,h[g+2]=_,h[g+3]=e,g+=4,f=r,m=_)}l=r,d=c,a++}g!==h.length&&(h=h.subarray(0,g));const _=c.create(p,h);r.push(_)}return r}m=g([p(1,o.Gy),p(2,h.L),p(3,s.rr)],m);class v{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class b{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=b._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=b._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";i.r(t),i.d(t,{ISemanticTokensStylingService:()=>o});var n=i(87778);const o=(0,n.u1)("semanticTokensStylingService")},12205:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SemanticTokensStylingService:()=>h});var n=i(5091),o=i(14573),s=i(15911),r=i(12660),a=i(4686),l=i(67284),c=i(59857),d=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},u=function(e,t){return function(i,n){t(i,n,e)}};let h=class extends n.jG{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};h=d([u(0,s.Gy),u(1,r.rr),u(2,o.L)],h),(0,c.v)(l.ISemanticTokensStylingService,h,1)},11955:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MirrorModel:()=>f,STOP_SYNC_MODEL_DELTA_TIME_MS:()=>h,WorkerTextModelSyncClient:()=>g,WorkerTextModelSyncServer:()=>p});var n=i(9659),o=i(5091),s=i(29133),r=i(36788),a=i(8690),l=i(60939),c=i(20601),d=i(73139);class u{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new r.y(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;nthis._checkStopModelSync()),Math.round(h/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,o.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime){const n=e-this._syncedModelsLastUsedTime[i];n>h&&t.push(i)}for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.$acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new o.Cm;s.add(i.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(n.toString(),e)}))),s.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),s.add((0,o.s)((()=>{this._proxy.$acceptRemovedModel(n)}))),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,o.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new f(s.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;const i=this._models[e];i.onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class f extends u{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}},74977:(e,t,i)=>{"use strict";i.r(t)},56151:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ITextResourceConfigurationService:()=>o,ITextResourcePropertiesService:()=>s});var n=i(87778);const o=(0,n.u1)("textResourceConfigurationService"),s=(0,n.u1)("textResourcePropertiesService")},15863:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ITreeSitterParserService:()=>o});var n=i(87778);const o=(0,n.u1)("treeSitterParserService")},61210:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DraggedTreeItemsIdentifier:()=>o,TreeViewsDnDService:()=>n});class n{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class o{constructor(e){this.identifier=e}}},95231:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ITreeViewsDnDService:()=>r});var n=i(59857),o=i(87778),s=i(61210);const r=(0,o.u1)("treeViewsDndService");(0,n.v)(r,s.TreeViewsDnDService,1)},97412:(e,t,i)=>{"use strict";i.r(t),i.d(t,{UnicodeTextModelHighlighter:()=>l});var n=i(8690),o=i(13569),s=i(20601),r=i(79109),a=i(60939);class l{static computeUnicodeHighlights(e,t,i){const l=i?i.startLineNumber:1,u=i?i.endLineNumber:e.getLineCount(),h=new d(t),g=h.getCandidateCodePoints();let p;p="allNonBasicAscii"===g?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(`${c(Array.from(g))}`,"g");const f=new o.W5(null,p),m=[];let _,v=!1,b=0,y=0,w=0;e:for(let t=l,i=u;t<=i;t++){const i=e.getLineContent(t),o=i.length;f.reset(0);do{if(_=f.next(i),_){let e=_.index,l=_.index+_[0].length;if(e>0){const t=i.charCodeAt(e-1);s.pc(t)&&e--}if(l+1=i){v=!0;break e}m.push(new n.Q(t,e+1,t,l+1))}}}while(_)}return{ranges:m,hasMore:v,ambiguousCharacterCount:b,invisibleCharacterCount:y,nonBasicAsciiCharacterCount:w}}static computeUnicodeHighlightReason(e,t){const i=new d(t),n=i.shouldHighlightNonBasicASCII(e,null);switch(n){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),r=s.tl.getLocales().filter((e=>!s.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}function c(e,t){const i=`[${s.bm(e.map((e=>String.fromCodePoint(e))).join(""))}]`;return i}class d{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.y_.codePoints)u(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(const e of t){const t=e.codePointAt(0),i=s.aC(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||s.y_.isInvisibleCharacter(t)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!u(e)&&s.y_.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function u(e){return" "===e||"\n"===e||"\t"===e}},84296:(e,t,i)=>{"use strict";var n,o,s,r,a,l,c,d,u,h,g,p,f,m,_,v,b,y,w,C,S,k,x,E,L,T,I,D,R,N,A,O,P,M,F,B,W,H,V,j,z,U,$,q,K,G;i.d(t,{A5:()=>A,Ah:()=>O,DD:()=>k,DO:()=>M,Gn:()=>n,H_:()=>U,Ic:()=>P,Io:()=>r,Kb:()=>h,M$:()=>v,OV:()=>D,QP:()=>a,Qj:()=>c,R3:()=>L,SB:()=>H,U7:()=>$,VW:()=>y,VX:()=>T,WA:()=>j,WU:()=>m,XR:()=>W,YT:()=>R,ZS:()=>_,_E:()=>s,cj:()=>x,dE:()=>N,d_:()=>E,e0:()=>g,h5:()=>d,hS:()=>I,hW:()=>F,jT:()=>V,kK:()=>K,kf:()=>f,l:()=>b,m9:()=>q,of:()=>u,ok:()=>o,ov:()=>B,p2:()=>p,qw:()=>C,r4:()=>w,sm:()=>S,t7:()=>l,tJ:()=>G,v0:()=>z}),function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"}(n||(n={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["Auto"]=2]="Auto"}(o||(o={})),function(e){e[e["None"]=0]="None",e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(s||(s={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(r||(r={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(a||(a={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(l||(l={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(c||(c={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(d||(d={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(u||(u={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(h||(h={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(g||(g={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["ariaRequired"]=5]="ariaRequired",e[e["autoClosingBrackets"]=6]="autoClosingBrackets",e[e["autoClosingComments"]=7]="autoClosingComments",e[e["screenReaderAnnounceInlineSuggestion"]=8]="screenReaderAnnounceInlineSuggestion",e[e["autoClosingDelete"]=9]="autoClosingDelete",e[e["autoClosingOvertype"]=10]="autoClosingOvertype",e[e["autoClosingQuotes"]=11]="autoClosingQuotes",e[e["autoIndent"]=12]="autoIndent",e[e["automaticLayout"]=13]="automaticLayout",e[e["autoSurround"]=14]="autoSurround",e[e["bracketPairColorization"]=15]="bracketPairColorization",e[e["guides"]=16]="guides",e[e["codeLens"]=17]="codeLens",e[e["codeLensFontFamily"]=18]="codeLensFontFamily",e[e["codeLensFontSize"]=19]="codeLensFontSize",e[e["colorDecorators"]=20]="colorDecorators",e[e["colorDecoratorsLimit"]=21]="colorDecoratorsLimit",e[e["columnSelection"]=22]="columnSelection",e[e["comments"]=23]="comments",e[e["contextmenu"]=24]="contextmenu",e[e["copyWithSyntaxHighlighting"]=25]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=26]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=27]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=28]="cursorStyle",e[e["cursorSurroundingLines"]=29]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=30]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=31]="cursorWidth",e[e["disableLayerHinting"]=32]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=33]="disableMonospaceOptimizations",e[e["domReadOnly"]=34]="domReadOnly",e[e["dragAndDrop"]=35]="dragAndDrop",e[e["dropIntoEditor"]=36]="dropIntoEditor",e[e["emptySelectionClipboard"]=37]="emptySelectionClipboard",e[e["experimentalWhitespaceRendering"]=38]="experimentalWhitespaceRendering",e[e["extraEditorClassName"]=39]="extraEditorClassName",e[e["fastScrollSensitivity"]=40]="fastScrollSensitivity",e[e["find"]=41]="find",e[e["fixedOverflowWidgets"]=42]="fixedOverflowWidgets",e[e["folding"]=43]="folding",e[e["foldingStrategy"]=44]="foldingStrategy",e[e["foldingHighlight"]=45]="foldingHighlight",e[e["foldingImportsByDefault"]=46]="foldingImportsByDefault",e[e["foldingMaximumRegions"]=47]="foldingMaximumRegions",e[e["unfoldOnClickAfterEndOfLine"]=48]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=49]="fontFamily",e[e["fontInfo"]=50]="fontInfo",e[e["fontLigatures"]=51]="fontLigatures",e[e["fontSize"]=52]="fontSize",e[e["fontWeight"]=53]="fontWeight",e[e["fontVariations"]=54]="fontVariations",e[e["formatOnPaste"]=55]="formatOnPaste",e[e["formatOnType"]=56]="formatOnType",e[e["glyphMargin"]=57]="glyphMargin",e[e["gotoLocation"]=58]="gotoLocation",e[e["hideCursorInOverviewRuler"]=59]="hideCursorInOverviewRuler",e[e["hover"]=60]="hover",e[e["inDiffEditor"]=61]="inDiffEditor",e[e["inlineSuggest"]=62]="inlineSuggest",e[e["inlineEdit"]=63]="inlineEdit",e[e["letterSpacing"]=64]="letterSpacing",e[e["lightbulb"]=65]="lightbulb",e[e["lineDecorationsWidth"]=66]="lineDecorationsWidth",e[e["lineHeight"]=67]="lineHeight",e[e["lineNumbers"]=68]="lineNumbers",e[e["lineNumbersMinChars"]=69]="lineNumbersMinChars",e[e["linkedEditing"]=70]="linkedEditing",e[e["links"]=71]="links",e[e["matchBrackets"]=72]="matchBrackets",e[e["minimap"]=73]="minimap",e[e["mouseStyle"]=74]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=75]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=76]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=77]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=78]="multiCursorModifier",e[e["multiCursorPaste"]=79]="multiCursorPaste",e[e["multiCursorLimit"]=80]="multiCursorLimit",e[e["occurrencesHighlight"]=81]="occurrencesHighlight",e[e["overviewRulerBorder"]=82]="overviewRulerBorder",e[e["overviewRulerLanes"]=83]="overviewRulerLanes",e[e["padding"]=84]="padding",e[e["pasteAs"]=85]="pasteAs",e[e["parameterHints"]=86]="parameterHints",e[e["peekWidgetDefaultFocus"]=87]="peekWidgetDefaultFocus",e[e["placeholder"]=88]="placeholder",e[e["definitionLinkOpensInPeek"]=89]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=90]="quickSuggestions",e[e["quickSuggestionsDelay"]=91]="quickSuggestionsDelay",e[e["readOnly"]=92]="readOnly",e[e["readOnlyMessage"]=93]="readOnlyMessage",e[e["renameOnType"]=94]="renameOnType",e[e["renderControlCharacters"]=95]="renderControlCharacters",e[e["renderFinalNewline"]=96]="renderFinalNewline",e[e["renderLineHighlight"]=97]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=98]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=99]="renderValidationDecorations",e[e["renderWhitespace"]=100]="renderWhitespace",e[e["revealHorizontalRightPadding"]=101]="revealHorizontalRightPadding",e[e["roundedSelection"]=102]="roundedSelection",e[e["rulers"]=103]="rulers",e[e["scrollbar"]=104]="scrollbar",e[e["scrollBeyondLastColumn"]=105]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=106]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=107]="scrollPredominantAxis",e[e["selectionClipboard"]=108]="selectionClipboard",e[e["selectionHighlight"]=109]="selectionHighlight",e[e["selectOnLineNumbers"]=110]="selectOnLineNumbers",e[e["showFoldingControls"]=111]="showFoldingControls",e[e["showUnused"]=112]="showUnused",e[e["snippetSuggestions"]=113]="snippetSuggestions",e[e["smartSelect"]=114]="smartSelect",e[e["smoothScrolling"]=115]="smoothScrolling",e[e["stickyScroll"]=116]="stickyScroll",e[e["stickyTabStops"]=117]="stickyTabStops",e[e["stopRenderingLineAfter"]=118]="stopRenderingLineAfter",e[e["suggest"]=119]="suggest",e[e["suggestFontSize"]=120]="suggestFontSize",e[e["suggestLineHeight"]=121]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=122]="suggestOnTriggerCharacters",e[e["suggestSelection"]=123]="suggestSelection",e[e["tabCompletion"]=124]="tabCompletion",e[e["tabIndex"]=125]="tabIndex",e[e["unicodeHighlighting"]=126]="unicodeHighlighting",e[e["unusualLineTerminators"]=127]="unusualLineTerminators",e[e["useShadowDOM"]=128]="useShadowDOM",e[e["useTabStops"]=129]="useTabStops",e[e["wordBreak"]=130]="wordBreak",e[e["wordSegmenterLocales"]=131]="wordSegmenterLocales",e[e["wordSeparators"]=132]="wordSeparators",e[e["wordWrap"]=133]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=134]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=135]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=136]="wordWrapColumn",e[e["wordWrapOverride1"]=137]="wordWrapOverride1",e[e["wordWrapOverride2"]=138]="wordWrapOverride2",e[e["wrappingIndent"]=139]="wrappingIndent",e[e["wrappingStrategy"]=140]="wrappingStrategy",e[e["showDeprecated"]=141]="showDeprecated",e[e["inlayHints"]=142]="inlayHints",e[e["editorClassName"]=143]="editorClassName",e[e["pixelRatio"]=144]="pixelRatio",e[e["tabFocusMode"]=145]="tabFocusMode",e[e["layoutInfo"]=146]="layoutInfo",e[e["wrappingInfo"]=147]="wrappingInfo",e[e["defaultColorDecorators"]=148]="defaultColorDecorators",e[e["colorDecoratorsActivatedOn"]=149]="colorDecoratorsActivatedOn",e[e["inlineCompletionsAccessibilityVerbose"]=150]="inlineCompletionsAccessibilityVerbose"}(p||(p={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(f||(f={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(m||(m={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(_||(_={})),function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"}(v||(v={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(b||(b={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(y||(y={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(w||(w={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(C||(C={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(S||(S={})),function(e){e[e["DependsOnKbLayout"]=-1]="DependsOnKbLayout",e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["Digit0"]=21]="Digit0",e[e["Digit1"]=22]="Digit1",e[e["Digit2"]=23]="Digit2",e[e["Digit3"]=24]="Digit3",e[e["Digit4"]=25]="Digit4",e[e["Digit5"]=26]="Digit5",e[e["Digit6"]=27]="Digit6",e[e["Digit7"]=28]="Digit7",e[e["Digit8"]=29]="Digit8",e[e["Digit9"]=30]="Digit9",e[e["KeyA"]=31]="KeyA",e[e["KeyB"]=32]="KeyB",e[e["KeyC"]=33]="KeyC",e[e["KeyD"]=34]="KeyD",e[e["KeyE"]=35]="KeyE",e[e["KeyF"]=36]="KeyF",e[e["KeyG"]=37]="KeyG",e[e["KeyH"]=38]="KeyH",e[e["KeyI"]=39]="KeyI",e[e["KeyJ"]=40]="KeyJ",e[e["KeyK"]=41]="KeyK",e[e["KeyL"]=42]="KeyL",e[e["KeyM"]=43]="KeyM",e[e["KeyN"]=44]="KeyN",e[e["KeyO"]=45]="KeyO",e[e["KeyP"]=46]="KeyP",e[e["KeyQ"]=47]="KeyQ",e[e["KeyR"]=48]="KeyR",e[e["KeyS"]=49]="KeyS",e[e["KeyT"]=50]="KeyT",e[e["KeyU"]=51]="KeyU",e[e["KeyV"]=52]="KeyV",e[e["KeyW"]=53]="KeyW",e[e["KeyX"]=54]="KeyX",e[e["KeyY"]=55]="KeyY",e[e["KeyZ"]=56]="KeyZ",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["F20"]=78]="F20",e[e["F21"]=79]="F21",e[e["F22"]=80]="F22",e[e["F23"]=81]="F23",e[e["F24"]=82]="F24",e[e["NumLock"]=83]="NumLock",e[e["ScrollLock"]=84]="ScrollLock",e[e["Semicolon"]=85]="Semicolon",e[e["Equal"]=86]="Equal",e[e["Comma"]=87]="Comma",e[e["Minus"]=88]="Minus",e[e["Period"]=89]="Period",e[e["Slash"]=90]="Slash",e[e["Backquote"]=91]="Backquote",e[e["BracketLeft"]=92]="BracketLeft",e[e["Backslash"]=93]="Backslash",e[e["BracketRight"]=94]="BracketRight",e[e["Quote"]=95]="Quote",e[e["OEM_8"]=96]="OEM_8",e[e["IntlBackslash"]=97]="IntlBackslash",e[e["Numpad0"]=98]="Numpad0",e[e["Numpad1"]=99]="Numpad1",e[e["Numpad2"]=100]="Numpad2",e[e["Numpad3"]=101]="Numpad3",e[e["Numpad4"]=102]="Numpad4",e[e["Numpad5"]=103]="Numpad5",e[e["Numpad6"]=104]="Numpad6",e[e["Numpad7"]=105]="Numpad7",e[e["Numpad8"]=106]="Numpad8",e[e["Numpad9"]=107]="Numpad9",e[e["NumpadMultiply"]=108]="NumpadMultiply",e[e["NumpadAdd"]=109]="NumpadAdd",e[e["NUMPAD_SEPARATOR"]=110]="NUMPAD_SEPARATOR",e[e["NumpadSubtract"]=111]="NumpadSubtract",e[e["NumpadDecimal"]=112]="NumpadDecimal",e[e["NumpadDivide"]=113]="NumpadDivide",e[e["KEY_IN_COMPOSITION"]=114]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=115]="ABNT_C1",e[e["ABNT_C2"]=116]="ABNT_C2",e[e["AudioVolumeMute"]=117]="AudioVolumeMute",e[e["AudioVolumeUp"]=118]="AudioVolumeUp",e[e["AudioVolumeDown"]=119]="AudioVolumeDown",e[e["BrowserSearch"]=120]="BrowserSearch",e[e["BrowserHome"]=121]="BrowserHome",e[e["BrowserBack"]=122]="BrowserBack",e[e["BrowserForward"]=123]="BrowserForward",e[e["MediaTrackNext"]=124]="MediaTrackNext",e[e["MediaTrackPrevious"]=125]="MediaTrackPrevious",e[e["MediaStop"]=126]="MediaStop",e[e["MediaPlayPause"]=127]="MediaPlayPause",e[e["LaunchMediaPlayer"]=128]="LaunchMediaPlayer",e[e["LaunchMail"]=129]="LaunchMail",e[e["LaunchApp2"]=130]="LaunchApp2",e[e["Clear"]=131]="Clear",e[e["MAX_VALUE"]=132]="MAX_VALUE"}(k||(k={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(x||(x={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(E||(E={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(L||(L={})),function(e){e[e["Normal"]=1]="Normal",e[e["Underlined"]=2]="Underlined"}(T||(T={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(I||(I={})),function(e){e[e["AIGenerated"]=1]="AIGenerated"}(D||(D={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(R||(R={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(N||(N={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(A||(A={})),function(e){e[e["Word"]=0]="Word",e[e["Line"]=1]="Line",e[e["Suggest"]=2]="Suggest"}(O||(O={})),function(e){e[e["Left"]=0]="Left",e[e["Right"]=1]="Right",e[e["None"]=2]="None",e[e["LeftOfInjectedText"]=3]="LeftOfInjectedText",e[e["RightOfInjectedText"]=4]="RightOfInjectedText"}(P||(P={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(M||(M={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(F||(F={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(B||(B={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(W||(W={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(H||(H={})),function(e){e["Off"]="off",e["OnCode"]="onCode",e["On"]="on"}(V||(V={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(j||(j={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(z||(z={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(U||(U={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}($||($={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(q||(q={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(K||(K={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(G||(G={}))},340:(e,t,i)=>{"use strict";i.d(t,{E6:()=>c,Hw:()=>o,YN:()=>n,gf:()=>r,n9:()=>a,oq:()=>s,tu:()=>d,vp:()=>l});var n,o,s,r,a,l,c,d,u=i(41337);(function(e){e.inspectTokensAction=u.kg("inspectTokens","Developer: Inspect Tokens")})(n||(n={})),function(e){e.gotoLineActionLabel=u.kg("gotoLineActionLabel","Go to Line/Column...")}(o||(o={})),function(e){e.helpQuickAccessActionLabel=u.kg("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=u.kg("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=u.kg("quickCommandActionHelp","Show And Run Commands")}(r||(r={})),function(e){e.quickOutlineActionLabel=u.kg("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=u.kg("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(a||(a={})),function(e){e.editorViewAccessibleLabel=u.kg("editorViewAccessibleLabel","Editor content")}(l||(l={})),function(e){e.toggleHighContrast=u.kg("toggleHighContrast","Toggle High Contrast Theme")}(c||(c={})),function(e){e.bulkEditServiceSummary=u.kg("bulkEditServiceSummary","Made {0} edits in {1} files")}(d||(d={}))},50410:(e,t,i)=>{"use strict";i.d(t,{E$:()=>r,HP:()=>c,Ic:()=>u,U0:()=>s,Wn:()=>n,bg:()=>a,mS:()=>l,uK:()=>o,vn:()=>d});class n{constructor(){this.changeType=1}}class o{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}}class s{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class r{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class c{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t{"use strict";var n;i.d(t,{N6:()=>n,TH:()=>o,pv:()=>s}),function(e){e[e["Disabled"]=0]="Disabled",e[e["EnabledForActive"]=1]="EnabledForActive",e[e["Enabled"]=2]="Enabled"}(n||(n={}));class o{constructor(e,t,i,n,o,s){if(this.visibleColumn=e,this.column=t,this.className=i,this.horizontalLine=n,this.forWrappedLinesAfterColumn=o,this.forWrappedLinesBeforeOrAtColumn=s,-1!==e===(-1!==t))throw new Error}}class s{constructor(e,t){this.top=e,this.endColumn=t}}},70164:(e,t,i)=>{"use strict";i.d(t,{T:()=>r,f:()=>o});var n=i(4577);class o{static{this.defaultTokenMetadata=33587200}static createEmpty(e,t){const i=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new o(n,e,t)}static createFromTextAndMetadata(e,t){let i=0,n="";const s=new Array;for(const{text:t,metadata:o}of e)s.push(i+t.length,o),i+=t.length,n+=t;return new o(new Uint32Array(s),n,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=i}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.x.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return n.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new s(this,e,t,i)}static convertToEndOffset(e,t){const i=e.length>>>1,n=i-1;for(let t=0;t>>1)-1;while(it&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const s=new Array;let r=0;while(1){const o=tr){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];s.push(n.length,e),r=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}}return new o(new Uint32Array(s),n,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),i=this.getEndOffset(e),n=this._text.substring(t,i);return n}forEach(e){const t=this.getCount();for(let i=0;i=i)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof s&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,i=this._source.getStartOffset(t),n=this._source.getEndOffset(t);let o=this._source.getTokenText(t);return ithis._endOffset&&(o=o.substring(0,o.length-(n-this._endOffset))),o}forEach(e){for(let t=0;t{"use strict";i.d(t,{Bs:()=>a,d:()=>o});var n=i(20601);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length,n=t.length;if(i!==n)return!1;for(let n=0;n=s||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];const s=[];let r=0;for(let a=0,l=e.length;at)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const d=c.startLineNumber===t?c.startColumn:i,u=c.endLineNumber===t?c.endColumn:n;s[r++]=new o(d,u,l.inlineClassName,l.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=o._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];const i=[],o=new r;let s=0;for(let r=0,a=t.length;r1){const t=e.charCodeAt(l-2);n.pc(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);n.pc(t)&&c--}const h=l-1,g=c-2;s=o.consumeLowerThan(h,s,i),0===o.count&&(s=h),o.insert(g,d,u)}return o.consumeLowerThan(1073741824,s,i),i}}},20529:(e,t,i)=>{"use strict";i.d(t,{wZ:()=>d,MT:()=>l,zL:()=>c,UW:()=>g,Md:()=>f});var n=i(41337),o=i(20601),s=i(13647),r=i(1550);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class l{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class c{constructor(e,t,i,n,o,s,a,l,c,d,u,h,g,p,f,m,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(r.d.compare),this.tabSize=d,this.startVisibleColumn=u,this.spaceWidth=h,this.stopRenderingLineAfter=f,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const o=(t<<16|i)>>>0;this._data[e-1]=o,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=u.getPartIndex(t),n=u.getCharIndex(t);return new d(i,n)}getColumn(e,t){const i=this.partDataToCharOffset(e.partIndex,t,e.charIndex);return i+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i)>>>0;let o=0,s=this.length-1;while(o+1>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;const r=this._data[o],a=this._data[s];if(r===n)return o;if(a===n)return s;const l=u.getPartIndex(r),c=u.getCharIndex(r),d=u.getPartIndex(a);let h;h=l!==d?t:u.getCharIndex(a);const g=i-c,p=h-i;return g<=p?o:s}}class h{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("");let i=0,n=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendString(''),1===s.type&&(o|=1,i++),2===s.type&&(o|=2,n++));t.appendString("");const s=new u(1,i+n);return s.setColumnInfo(1,i,0,0),new h(s,!1,o)}return t.appendString(""),new h(new u(0,0),!1,0)}return k(_(e),t)}class p{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function f(e){const t=new s.fe(1e4),i=g(e,t);return new p(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)}class m{constructor(e,t,i,n,o,s,r,a,l,c,d,u,h,g,p,f){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=o,this.overflowingCharCount=s,this.parts=r,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=c,this.startVisibleColumn=d,this.containsRTL=u,this.spaceWidth=h,this.renderSpaceCharCode=g,this.renderWhitespace=p,this.renderControlCharacters=f}}function _(e){const t=e.lineContent;let i,n,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0){for(let t=0,i=e.lineDecorations.length;t0&&(r[l++]=new a(n,"",0,!1));let c=n;for(let d=0,u=i.getCount();d=s){const i=!!t&&o.E_(e.substring(c,s));r[l++]=new a(s,h,0,i);break}const g=!!t&&o.E_(e.substring(c,u));r[l++]=new a(u,h,0,g),c=u}return r}function b(e,t,i){let n=0;const o=[];let s=0;if(i)for(let i=0,r=t.length;i=50&&(o[s++]=new a(d+1,t,i,c),u=d+1,d=-1);u!==l&&(o[s++]=new a(l,t,i,c))}else o[s++]=r;n=l}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,c=i.containsRTL,d=Math.ceil(l/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e)}function w(e,t){const i=[];let n=new a(0,"",0,!1),o=0;for(const s of t){const t=s.endIndex;for(;on.endIndex&&(n=new a(o,s.type,s.metadata,s.containsRTL),i.push(n)),n=new a(o+1,"mtkcontrol",s.metadata,!1),i.push(n))}o>n.endIndex&&(n=new a(t,s.type,s.metadata,s.containsRTL),i.push(n))}return i}function C(e,t,i,n){const s=e.continuesWithWrappedLine,r=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,d=e.useMonospaceOptimizations,u=e.selectionsOnLine,h=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth,f=[];let m=0,_=0,v=n[_].type,b=n[_].containsRTL,y=n[_].endIndex;const w=n.length;let C,S=!1,k=o.HG(t);-1===k?(S=!0,k=i,C=i):C=o.lT(t);let x=!1,E=0,L=u&&u[E],T=c%l;for(let e=r;e=L.endOffset&&(E++,L=u&&u[E]),eC)c=!0;else if(9===s)c=!0;else if(32===s)if(h)if(x)c=!0;else{const n=e+1e),c&&g&&(c=S||e>C),c&&b&&e>=k&&e<=C&&(c=!1),x){if(!c||!d&&T>=l){if(p){const t=m>0?f[m-1].endIndex:r;for(let i=t+1;i<=e;i++)f[m++]=new a(i,"mtkw",1,!1)}else f[m++]=new a(e,"mtkw",1,!1);T%=l}}else(e===y||c&&e>r)&&(f[m++]=new a(e,v,0,b),T%=l);9===s?T=l:o.ne(s)?T+=2:T++,x=c;while(e===y){if(_++,!(_0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0,o=32===e&&32!==n&&9!==n;o||(I=!0)}else I=!0;if(I)if(p){const e=m>0?f[m-1].endIndex:r;for(let t=e+1;t<=i;t++)f[m++]=new a(t,"mtkw",1,!1)}else f[m++]=new a(i,"mtkw",1,!1);else f[m++]=new a(i,v,0,b);return f}function S(e,t,i,n){n.sort(r.d.compare);const o=r.Bs.normalize(e,n),s=o.length;let l=0;const c=[];let d=0,u=0;for(let e=0,t=i.length;eu&&(u=e.startOffset,c[d++]=new a(u,r,h,g)),!(e.endOffset+1<=n)){u=n,c[d++]=new a(u,r+" "+e.className,h|e.metadata,g);break}u=e.endOffset+1,c[d++]=new a(u,r+" "+e.className,h|e.metadata,g),l++}n>u&&(u=n,c[d++]=new a(u,r,h,g))}const h=i[i.length-1].endIndex;if(l'):t.appendString("");for(let e=0,n=g.length;e=p&&(t+=o)}}for(m&&(t.appendString(' style="width:'),t.appendString(String(v*i)),t.appendString('px"')),t.appendASCIICharCode(62);L1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=o;e++)t.appendCharCode(160)}else n=2,o=1,t.appendCharCode(b),t.appendCharCode(8204);I+=n,D+=o,L>=p&&(T+=o)}}else for(t.appendASCIICharCode(62);L=p&&(T+=s)}_?R++:R=0,L>=l&&!k&&n.isPseudoAfter()&&(k=!0,S.setColumnInfo(L+1,e,I,D)),t.appendString("")}return k||S.setColumnInfo(l+1,g.length-1,I,D),c&&(t.appendString(''),t.appendString(n.kg("showMore","Show more ({0})",E(d))),t.appendString("")),t.appendString(""),new h(S,_,r)}function x(e){return e.toString(16).toUpperCase().padStart(4,"0")}function E(e){return e<1024?n.kg("overflow.chars","{0} chars",e):e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}},90765:(e,t,i)=>{"use strict";i.d(t,{GP:()=>l,LM:()=>r,Uv:()=>g,kI:()=>d,nt:()=>a,or:()=>u,qL:()=>c,vo:()=>h});var n=i(85053),o=i(20601),s=i(8690);class r{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class a{constructor(e,t){this.tabSize=e,this.data=t}}class l{constructor(e,t,i,n,o,s,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=r}}class c{constructor(e,t,i,n,o,s,r,a,l,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=c.isBasicASCII(i,s),this.containsRTL=c.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||o.aC(e)}static containsRTL(e,t,i){return!(t||!i)&&o.E_(e)}}class d{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class u{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new d(new s.Q(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class h{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class g{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&n.aI(e.data,t.data)}static equalsArr(e,t){return n.aI(e,t,g.equals)}}},21934:(e,t,i)=>{"use strict";i.d(t,{iE:()=>o,rW:()=>s});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(g=i-p);const f=l.color;let m=this._color2Id[f];m||(m=++this._lastAssignedId,this._color2Id[f]=m,this._id2Color[m]=f);const _=new n(g-p,g+p,m);l.setColorZone(_),a.push(_)}return this._colorZonesInvalid=!1,a.sort(n.compare),a}}},10049:(e,t,i)=>{"use strict";i.d(t,{GN:()=>l,UB:()=>a,a6:()=>c,wc:()=>d});var n=i(36788),o=i(8690),s=i(90765),r=i(35011);class a{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const r=e.range,a=e.options;let l;if(a.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.y(r.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.y(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);l=new o.Q(e.lineNumber,e.column,t.lineNumber,t.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(r,1);i=new s.vo(l,a),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new o.Q(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,r.$C)(this.configuration.options),t,i),a=e.startLineNumber,c=e.endLineNumber,d=[];let u=0;const h=[];for(let e=a;e<=c;e++)h[e-a]=[];for(let e=0,t=n.length;e1===e))}function d(e,t){return u(e,t.range,(e=>2===e))}function u(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.tokenization.getLineTokens(n),s=n===t.startLineNumber,r=n===t.endLineNumber;let a=s?o.findTokenIndexAtOffset(t.startColumn-1):0;while(at.endColumn-1)break}const e=i(o.getStandardTokenType(a));if(!e)return!1;a++}}return!0}},90141:(e,t,i)=>{"use strict";var n,o=i(19950),s=i(42325),r=i(91348),a=i(16259),l=i(98581),c=i(57479),d=i(41337),u=i(18904),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};const p=new u.N1("selectionAnchorSet",!1);let f=class{static{n=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(n.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=p.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations((t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(l.L.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new s.Bc).appendText((0,d.kg)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,o.xE)((0,d.kg)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(l.L.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations((t=>{t.removeDecoration(e),this.decorationId=void 0})),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};f=n=h([g(1,u.fN)],f);class m extends a.ks{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,d.kg)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:(0,r.m5)(2089,2080),weight:100}})}async run(e,t){f.get(t)?.setSelectionAnchor()}}class _ extends a.ks{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,d.kg)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:p})}async run(e,t){f.get(t)?.goToSelectionAnchor()}}class v extends a.ks{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,d.kg)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:p,kbOpts:{kbExpr:c.R.editorTextFocus,primary:(0,r.m5)(2089,2089),weight:100}})}async run(e,t){f.get(t)?.selectFromAnchorToCursor()}}class b extends a.ks{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,d.kg)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:p,kbOpts:{kbExpr:c.R.editorTextFocus,primary:9,weight:100}})}async run(e,t){f.get(t)?.cancelSelectionAnchor()}}(0,a.HW)(f.ID,f,4),(0,a.Fl)(m),(0,a.Fl)(_),(0,a.Fl)(v),(0,a.Fl)(b)},92919:(e,t,i)=>{"use strict";var n=i(9659),o=i(5091),s=i(16259),r=i(36788),a=i(8690),l=i(98581),c=i(57479),d=i(9322),u=i(35037),h=i(41337),g=i(6330),p=i(66344),f=i(15911);const m=(0,p.x1A)("editorOverviewRuler.bracketMatchForeground","#A0A0A0",h.kg("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class _ extends s.ks{constructor(){super({id:"editor.action.jumpToBracket",label:h.kg("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3165,weight:100}})}run(e,t){w.get(t)?.jumpToBracket()}}class v extends s.ks{constructor(){super({id:"editor.action.selectToBracket",label:h.kg("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:h.aS("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let n=!0;i&&!1===i.selectBrackets&&(n=!1),w.get(t)?.selectToBracket(n)}}class b extends s.ks{constructor(){super({id:"editor.action.removeBrackets",label:h.kg("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:2561,weight:100}})}run(e,t){w.get(t)?.removeBrackets(this.id)}}class y{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class w extends o.jG{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(w.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.uC((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new l.L(o.lineNumber,o.column,o.lineNumber,o.column):new l.L(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const o=n.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const e=t.bracketPairs.findNextBracket(o);e&&e.range&&(s=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,c=null;if(s){s.sort(a.Q.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),c=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=c,c=e}}r&&c&&i.push(new l.L(r.lineNumber,r.column,c.lineNumber,c.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach((i=>{const n=i.getPosition();let o=t.bracketPairs.matchBracket(n);o||(o=t.bracketPairs.findEnclosingBrackets(n)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())}))}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=u.kI.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,f.Yf)(m),position:d.A5.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=u.kI.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const o=[];let s=0;for(let t=0,i=e.length;t1&&o.sort(r.y.compare);const a=[];let l=0,c=0;const d=n.length;for(let e=0,i=o.length;e{"use strict";var n=i(16259),o=i(57479),s=i(8690),r=i(98581);class a{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new s.Q(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.Q(i,o,i,o),a)}else{const r=new s.Q(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.Q(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new r.L(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new r.L(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var l=i(41337);class c extends n.ks{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const e of n)i.push(new a(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class d extends c{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:l.kg("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:o.R.writable})}}class u extends c{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:l.kg("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:o.R.writable})}}(0,n.Fl)(d),(0,n.Fl)(u)},50877:(e,t,i)=>{"use strict";var n=i(16259),o=i(50793),s=i(31161),r=i(8690),a=i(57479),l=i(41337);class c extends n.ks{constructor(){super({id:"editor.action.transposeLetters",label:l.kg("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.R.writable,kbOpts:{kbExpr:a.R.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],a=t.getSelections();for(const e of a){if(!e.isEmpty())continue;const t=e.startLineNumber,a=e.startColumn,l=i.getLineMaxColumn(t);if(1===t&&(1===a||2===a&&2===l))continue;const c=a===l?e.getPosition():s.I.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),d=s.I.leftPosition(i,c),u=s.I.leftPosition(i,d),h=i.getValueInRange(r.Q.fromPositions(u,d)),g=i.getValueInRange(r.Q.fromPositions(d,c)),p=r.Q.fromPositions(u,c);n.push(new o.iu(p,g+h))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Fl)(c)},14291:(e,t,i)=>{"use strict";var n=i(88758),o=i(2150),s=i(25160),r=i(169),a=i(16259),l=i(94728),c=i(57479),d=i(878),u=i(41337),h=i(6330),g=i(28753),p=i(18904);const f="9_cutcopypaste",m=s.ib||document.queryCommandSupported("cut"),_=s.ib||document.queryCommandSupported("copy"),v="undefined"!==typeof navigator.clipboard&&!n.gm||document.queryCommandSupported("paste");function b(e){return e.register(),e}const y=m?b(new a.fE({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:s.ib?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"2_ccp",title:u.kg({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:h.D8.EditorContext,group:f,title:u.kg("actions.clipboard.cutLabel","Cut"),when:c.R.writable,order:1},{menuId:h.D8.CommandPalette,group:"",title:u.kg("actions.clipboard.cutLabel","Cut"),order:1},{menuId:h.D8.SimpleEditorContext,group:f,title:u.kg("actions.clipboard.cutLabel","Cut"),when:c.R.writable,order:1}]})):void 0,w=_?b(new a.fE({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:s.ib?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"2_ccp",title:u.kg({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:h.D8.EditorContext,group:f,title:u.kg("actions.clipboard.copyLabel","Copy"),order:2},{menuId:h.D8.CommandPalette,group:"",title:u.kg("actions.clipboard.copyLabel","Copy"),order:1},{menuId:h.D8.SimpleEditorContext,group:f,title:u.kg("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;h.ZG.appendMenuItem(h.D8.MenubarEditMenu,{submenu:h.D8.MenubarCopy,title:u.aS("copy as","Copy As"),group:"2_ccp",order:3}),h.ZG.appendMenuItem(h.D8.EditorContext,{submenu:h.D8.EditorContextCopy,title:u.aS("copy as","Copy As"),group:f,order:3}),h.ZG.appendMenuItem(h.D8.EditorContext,{submenu:h.D8.EditorContextShare,title:u.aS("share","Share"),group:"11_share",order:-1,when:p.M$.and(p.M$.notEquals("resourceScheme","output"),c.R.editorTextFocus)}),h.ZG.appendMenuItem(h.D8.ExplorerContext,{submenu:h.D8.ExplorerContextShare,title:u.aS("share","Share"),group:"11_share",order:-1});const C=v?b(new a.fE({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:s.ib?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"2_ccp",title:u.kg({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:h.D8.EditorContext,group:f,title:u.kg("actions.clipboard.pasteLabel","Paste"),when:c.R.writable,order:4},{menuId:h.D8.CommandPalette,group:"",title:u.kg("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:h.D8.SimpleEditorContext,group:f,title:u.kg("actions.clipboard.pasteLabel","Paste"),when:c.R.writable,order:4}]})):void 0;class S extends a.ks{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:u.kg("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:c.R.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getOption(37);!i&&t.getSelection().isEmpty()||(r.Eq.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),r.Eq.forceCopyWithSyntaxHighlighting=!1)}}function k(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(l.T).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(37),i=n.getSelection();return i&&i.isEmpty()&&!e||n.getContainerDomNode().ownerDocument.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>((0,o.a)().execCommand(t),!0))))}k(y,"cut"),k(w,"copy"),C&&(C.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.T),n=e.get(g.h),o=i.getFocusedCodeEditor();if(o&&o.hasTextFocus()){const e=o.getContainerDomNode().ownerDocument.execCommand("paste");return e?d.Rj.get(o)?.finishedPaste()??Promise.resolve():!s.HZ||(async()=>{const e=await n.readText();if(""!==e){const t=r.bs.INSTANCE.get(e);let i=!1,n=null,s=null;t&&(i=o.getOption(37)&&!!t.isFromEmptySelection,n="undefined"!==typeof t.multicursorText?t.multicursorText:null,s=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:s})}})()}return!1})),C.addImplementation(0,"generic-dom",((e,t)=>((0,o.a)().execCommand("paste"),!0)))),_&&(0,a.Fl)(S)},51761:(e,t,i)=>{"use strict";i.d(t,{C9:()=>x,Qp:()=>O,Rw:()=>L,Uy:()=>E,W4:()=>P,Xj:()=>k,dU:()=>D,k_:()=>w,pQ:()=>C,pR:()=>S});var n=i(85053),o=i(67792),s=i(14396),r=i(5091),a=i(29133),l=i(3176),c=i(8690),d=i(98581),u=i(12847),h=i(69361),g=i(64339),p=i(41337),f=i(72786),m=i(95062),_=i(44838),v=i(11086),b=i(69432),y=i(59200);const w="editor.action.codeAction",C="editor.action.quickFix",S="editor.action.autoFix",k="editor.action.refactor",x="editor.action.sourceAction",E="editor.action.organizeImports",L="editor.action.fixAll";class T extends r.jG{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:(0,n.EI)(e.diagnostics)?(0,n.EI)(t.diagnostics)?T.codeActionsPreferredComparator(e,t):-1:(0,n.EI)(t.diagnostics)?1:T.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(T.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&b.gB.QuickFix.contains(new y.k(e.kind))&&!!e.isPreferred))}get hasAIFix(){return this.validActions.some((({action:e})=>!!e.isAI))}get allAIFixes(){return this.validActions.every((({action:e})=>!!e.isAI))}}const I={actions:[],documentation:void 0};async function D(e,t,i,o,a,l){const c=o.filter||{},d={...c,excludes:[...c.excludes||[],b.gB.Notebook]},u={only:c.include?.value,trigger:o.type},h=new g.ER(t,l),p=2===o.type,f=R(e,t,p?d:c),m=new r.Cm,_=f.map((async e=>{try{a.report(e);const n=await e.provideCodeActions(t,i,u,h.token);if(n&&m.add(n),h.token.isCancellationRequested)return I;const o=(n?.actions||[]).filter((e=>e&&(0,b.aF)(c,e))),s=A(e,o,c.include);return{actions:o.map((t=>new b.Vi(t,e))),documentation:s}}catch(e){if((0,s.MB)(e))throw e;return(0,s.M_)(e),I}})),v=e.onDidChange((()=>{const i=e.all(t);(0,n.aI)(i,f)||h.cancel()}));try{const i=await Promise.all(_),s=i.map((e=>e.actions)).flat(),r=[...(0,n.Yc)(i.map((e=>e.documentation))),...N(e,t,o,s)];return new T(s,r,m)}finally{v.dispose(),h.dispose()}}function R(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,b.uJ)(i,new y.k(e))))))}function*N(e,t,i,n){if(t&&n.length)for(const o of e.all(t))o._getAdditionalMenuItems&&(yield*o._getAdditionalMenuItems?.({trigger:i.type,only:i.filter?.include?.value},n.map((e=>e.action))))}function A(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new y.k(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return e?.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new y.k(e.kind)))return t.command}var O;async function P(e,t,i,n,s=o.XO.None){const r=e.get(l.nu),a=e.get(f.d),c=e.get(v.k),d=e.get(m.Ot);if(c.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),await t.resolve(s),!s.isCancellationRequested){if(t.action.edit?.edits.length){const e=await r.apply(t.action.edit,{editor:n?.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==O.OnSave,showPreview:n?.preview});if(!e.isApplied)return}if(t.action.command)try{await a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=M(e);d.error("string"===typeof t?t:p.kg("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}}function M(e){return"string"===typeof e?e:e instanceof Error&&"string"===typeof e.message?e.message:void 0}(function(e){e["OnSave"]="onSave",e["FromProblemsView"]="fromProblemsView",e["FromCodeActions"]="fromCodeActions",e["FromAILightbulb"]="fromAILightbulb"})(O||(O={})),f.w.registerCommand("_executeCodeActionProvider",(async function(e,t,i,n,r){if(!(t instanceof a.r))throw(0,s.Qg)();const{codeActionProvider:l}=e.get(u.ILanguageFeaturesService),g=e.get(h.IModelService).getModel(t);if(!g)throw(0,s.Qg)();const p=d.L.isISelection(i)?d.L.liftSelection(i):c.Q.isIRange(i)?g.validateRange(i):void 0;if(!p)throw(0,s.Qg)();const f="string"===typeof n?new y.k(n):void 0,m=await D(l,g,p,{type:1,triggerAction:b.fo.Default,filter:{includeSourceActions:!0,include:f}},_.ke.None,o.XO.None),v=[],w=Math.min(m.validActions.length,"number"===typeof r?r:0);for(let e=0;ee.action))}finally{setTimeout((()=>m.dispose()),100)}}))},65340:(e,t,i)=>{"use strict";var n=i(16259),o=i(97744),s=i(59200),r=i(20601),a=i(57479),l=i(51761),c=i(41337),d=i(18904),u=i(69432),h=i(98948),g=i(12776);function p(e){return d.M$.regex(g.D_.keys()[0],new RegExp("(\\s|^)"+(0,r.bm)(e.value)+"\\b"))}const f={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:c.kg("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:c.kg("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[c.kg("args.schema.apply.first","Always apply the first returned code action."),c.kg("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),c.kg("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:c.kg("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function m(e,t,i,n,o=u.fo.Default){if(e.hasModel()){const s=h.C.get(e);s?.manualTriggerAtCurrentPosition(t,o,i,n)}}class _ extends n.ks{constructor(){super({id:l.pQ,label:c.kg("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),kbOpts:{kbExpr:a.R.textInputFocus,primary:2137,weight:100}})}run(e,t){return m(t,c.kg("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,u.fo.QuickFix)}}class v extends n.DX{constructor(){super({id:l.k_,precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:f}]}})}runEditorCommand(e,t,i){const n=u.QA.fromUser(i,{kind:s.k.Empty,apply:"ifSingle"});return m(t,"string"===typeof i?.kind?n.preferred?c.kg("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):c.kg("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?c.kg("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):c.kg("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class b extends n.ks{constructor(){super({id:l.Xj,label:c.kg("refactor.label","Refactor..."),alias:"Refactor...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),kbOpts:{kbExpr:a.R.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:d.M$.and(a.R.writable,p(u.gB.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:f}]}})}run(e,t,i){const n=u.QA.fromUser(i,{kind:u.gB.Refactor,apply:"never"});return m(t,"string"===typeof i?.kind?n.preferred?c.kg("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):c.kg("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?c.kg("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):c.kg("editor.action.refactor.noneMessage","No refactorings available"),{include:u.gB.Refactor.contains(n.kind)?n.kind:s.k.None,onlyIncludePreferredActions:n.preferred},n.apply,u.fo.Refactor)}}class y extends n.ks{constructor(){super({id:l.C9,label:c.kg("source.label","Source Action..."),alias:"Source Action...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:d.M$.and(a.R.writable,p(u.gB.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:f}]}})}run(e,t,i){const n=u.QA.fromUser(i,{kind:u.gB.Source,apply:"never"});return m(t,"string"===typeof i?.kind?n.preferred?c.kg("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):c.kg("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?c.kg("editor.action.source.noneMessage.preferred","No preferred source actions available"):c.kg("editor.action.source.noneMessage","No source actions available"),{include:u.gB.Source.contains(n.kind)?n.kind:s.k.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,u.fo.SourceAction)}}class w extends n.ks{constructor(){super({id:l.Uy,label:c.kg("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:d.M$.and(a.R.writable,p(u.gB.SourceOrganizeImports)),kbOpts:{kbExpr:a.R.textInputFocus,primary:1581,weight:100}})}run(e,t){return m(t,c.kg("editor.action.organize.noneMessage","No organize imports action available"),{include:u.gB.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",u.fo.OrganizeImports)}}class C extends n.ks{constructor(){super({id:l.Rw,label:c.kg("fixAll.label","Fix All"),alias:"Fix All",precondition:d.M$.and(a.R.writable,p(u.gB.SourceFixAll))})}run(e,t){return m(t,c.kg("fixAll.noneMessage","No fix all action available"),{include:u.gB.SourceFixAll,includeSourceActions:!0},"ifSingle",u.fo.FixAll)}}class S extends n.ks{constructor(){super({id:l.pR,label:c.kg("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:d.M$.and(a.R.writable,p(u.gB.QuickFix)),kbOpts:{kbExpr:a.R.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return m(t,c.kg("editor.action.autoFix.noneMessage","No auto fixes available"),{include:u.gB.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",u.fo.AutoFix)}}var k=i(84207),x=i(27503),E=i(16374);(0,n.HW)(h.C.ID,h.C,3),(0,n.HW)(k.E.ID,k.E,4),(0,n.Fl)(_),(0,n.Fl)(b),(0,n.Fl)(y),(0,n.Fl)(w),(0,n.Fl)(S),(0,n.Fl)(C),(0,n.E_)(new v),E.O.as(x.Fd.Configuration).registerConfiguration({...o.JJ,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:c.kg("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}),E.O.as(x.Fd.Configuration).registerConfiguration({...o.JJ,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:c.kg("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}}),E.O.as(x.Fd.Configuration).registerConfiguration({...o.JJ,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:5,markdownDescription:c.kg("triggerOnFocusChange","Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}})},98948:(e,t,i)=>{"use strict";i.d(t,{C:()=>pe});var n,o=i(2150),s=i(19950),r=i(14396),a=i(85661),l=i(5091),c=i(36788),d=i(35037),u=i(12847),h=i(51761),g=i(59200),p=i(69432),f=i(13046),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{static{n=this}static{this.codeActionCommands=[h.Xj,h.k_,h.C9,h.Uy,h.Rw]}constructor(e){this.keybindingService=e}getResolver(){const e=new a.d((()=>this.keybindingService.getKeybindings().filter((e=>n.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===h.Uy?t={kind:p.gB.SourceOrganizeImports.value}:e.command===h.Rw&&(t={kind:p.gB.SourceFixAll.value}),{resolvedKeybinding:e.resolvedKeybinding,...p.QA.fromUser(t,{kind:g.k.None,apply:"never"})}}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i?.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new g.k(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};v=n=m([_(0,f.b)],v);var b=i(25923),y=(i(94423),i(41337));const w=Object.freeze({kind:g.k.Empty,title:(0,y.kg)("codeAction.widget.id.more","More Actions...")}),C=Object.freeze([{kind:p.gB.QuickFix,title:(0,y.kg)("codeAction.widget.id.quickfix","Quick Fix")},{kind:p.gB.RefactorExtract,title:(0,y.kg)("codeAction.widget.id.extract","Extract"),icon:b.W.wrench},{kind:p.gB.RefactorInline,title:(0,y.kg)("codeAction.widget.id.inline","Inline"),icon:b.W.wrench},{kind:p.gB.RefactorRewrite,title:(0,y.kg)("codeAction.widget.id.convert","Rewrite"),icon:b.W.wrench},{kind:p.gB.RefactorMove,title:(0,y.kg)("codeAction.widget.id.move","Move"),icon:b.W.wrench},{kind:p.gB.SurroundWith,title:(0,y.kg)("codeAction.widget.id.surround","Surround With"),icon:b.W.surroundWith},{kind:p.gB.Source,title:(0,y.kg)("codeAction.widget.id.source","Source Action"),icon:b.W.symbolFile},w]);function S(e,t,i){if(!t)return e.map((e=>({kind:"action",item:e,group:w,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!e.action.edit?.edits.length})));const n=C.map((e=>({group:e,actions:[]})));for(const t of e){const e=t.action.kind?new g.k(t.action.kind):g.k.None;for(const i of n)if(i.group.kind.contains(e)){i.actions.push(t);break}}const o=[];for(const e of n)if(e.actions.length){o.push({kind:"header",group:e.group});for(const t of e.actions){const n=e.group;o.push({kind:"action",item:t,group:t.action.isAI?{title:n.title,kind:n.kind,icon:b.W.sparkle}:n,label:t.action.title,disabled:!!t.action.disabled,keybinding:i(t.action)})}}return o}var k=i(84207),x=i(61307),E=i(48038),L=i(92678),T=i(31304),I=i(67792),D=i(25160),R=i(23740),N=i(46403),A=i(13153),O=i(66344),P=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},M=function(e,t){return function(i,n){t(i,n,e)}};const F="acceptSelectedCodeAction",B="previewSelectedCodeAction";class W{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??""}disposeTemplate(e){}}let H=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const n=new L.x(e,D.OS);return{container:e,icon:t,text:i,keybinding:n}}renderElement(e,t,i){if(e.group?.icon?(i.icon.className=R.L.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=(0,O.GuP)(e.group.icon.color.id))):(i.icon.className=R.L.asClassName(b.W.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=$(e.label),i.keybinding.set(e.keybinding),o.bo(!!e.keybinding,i.keybinding.element);const n=this._keybindingService.lookupKeybinding(F)?.getLabel(),s=this._keybindingService.lookupKeybinding(B)?.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:n&&s?this._supportsPreview&&e.canPreview?i.container.title=(0,y.kg)({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",n,s):i.container.title=(0,y.kg)({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",n):i.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};H=P([M(1,f.b)],H);class V extends UIEvent{constructor(){super("acceptSelectedAction")}}class j extends UIEvent{constructor(){super("previewSelectedAction")}}function z(e){if("action"===e.kind)return e.label}let U=class extends l.jG{constructor(e,t,i,n,o,s){super(),this._delegate=n,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new I.Qi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new T.B8(e,this.domNode,r,[new H(t,this._keybindingService),new W],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:z},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?$(e?.label):"";return e.disabled&&(t=(0,y.kg)({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>(0,y.kg)({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(A.IN),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this.onFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight,n=i+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);let o=e;if(this._allMenuItems.length>=50)o=380;else{const t=this._allMenuItems.map(((e,t)=>{const i=this.domNode.ownerDocument.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0}));o=Math.max(...t,e)}const s=.7,r=Math.min(n,this.domNode.ownerDocument.body.clientHeight*s);return this._list.layout(r,o),this.domNode.style.height=`${r}px`,this._list.domFocus(),o}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const o=e?new j:new V;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof j):this._list.setSelection([])}onFocus(){const e=this._list.getFocus();if(0===e.length)return;const t=e[0],i=this._list.element(t);this._delegate.onFocus?.(i.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&"action"===t.kind){const e=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=e?e.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus("number"===typeof e.index?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function $(e){return e.replace(/\r\n|\r|\n/g," ")}U=P([M(4,N.l),M(5,f.b)],U);var q=i(6330),K=i(18904),G=i(59857),Q=i(87778),Y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Z=function(e,t){return function(i,n){t(i,n,e)}};(0,O.x1A)("actionBar.toggledBackground",O.c1f,(0,y.kg)("actionBar.toggledBackground","Background color for toggled action items in action bar."));const X={Visible:new K.N1("codeActionMenuVisible",!1,(0,y.kg)("codeActionMenuVisible","Whether the action widget list is visible"))},J=(0,Q.u1)("actionWidgetService");let ee=class extends l.jG{get isVisible(){return X.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new l.HE)}show(e,t,i,n,o,s,r){const a=X.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(U,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>o,render:e=>(a.set(!0),this._renderWidget(e,l,r??[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},s,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,i){const n=document.createElement("div");if(n.classList.add("action-widget"),e.appendChild(n),this._list.value=t,!this._list.value)throw new Error("List has no value");n.appendChild(this._list.value.domNode);const s=new l.Cm,r=document.createElement("div"),a=e.appendChild(r);a.classList.add("context-view-block"),s.add(o.ko(a,o.Bx.MOUSE_DOWN,(e=>e.stopPropagation())));const c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(o.ko(d,o.Bx.POINTER_MOVE,(()=>d.remove()))),s.add(o.ko(d,o.Bx.MOUSE_DOWN,(()=>d.remove())));let u=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(n.appendChild(e.getContainer().parentElement),s.add(e),u=e.getContainer().offsetWidth)}const h=this._list.value?.layout(u);n.style.width=`${h}px`;const g=s.add(o.w5(e));return s.add(g.onDidBlur((()=>this.hide(!0)))),s}_createActionBar(e,t){if(!t.length)return;const i=o.$(e),n=new E.E(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){this._list.value?.hide(e)}};ee=Y([Z(0,N.l),Z(1,K.fN),Z(2,Q._Y)],ee),(0,G.v)(J,ee,1);const te=1100;(0,q.ug)(class extends q.L{constructor(){super({id:"hideCodeActionWidget",title:(0,y.aS)("hideCodeActionWidget.title","Hide action widget"),precondition:X.Visible,keybinding:{weight:te,primary:9,secondary:[1033]}})}run(e){e.get(J).hide(!0)}}),(0,q.ug)(class extends q.L{constructor(){super({id:"selectPrevCodeAction",title:(0,y.aS)("selectPrevCodeAction.title","Select previous action"),precondition:X.Visible,keybinding:{weight:te,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(J);t instanceof ee&&t.focusPrevious()}}),(0,q.ug)(class extends q.L{constructor(){super({id:"selectNextCodeAction",title:(0,y.aS)("selectNextCodeAction.title","Select next action"),precondition:X.Visible,keybinding:{weight:te,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(J);t instanceof ee&&t.focusNext()}}),(0,q.ug)(class extends q.L{constructor(){super({id:F,title:(0,y.aS)("acceptSelected.title","Accept selected action"),precondition:X.Visible,keybinding:{weight:te,primary:3,secondary:[2137]}})}run(e){const t=e.get(J);t instanceof ee&&t.acceptSelected()}}),(0,q.ug)(class extends q.L{constructor(){super({id:B,title:(0,y.aS)("previewSelected.title","Preview selected action"),precondition:X.Visible,keybinding:{weight:te,primary:2051}})}run(e){const t=e.get(J);t instanceof ee&&t.acceptSelected(!0)}});var ie,ne=i(72786),oe=i(32828),se=i(45658),re=i(44838),ae=i(1474),le=i(15911),ce=i(12776),de=i(11086),ue=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},he=function(e,t){return function(i,n){t(i,n,e)}};const ge="quickfix-edit-highlight";let pe=class extends l.jG{static{ie=this}static{this.ID="editor.contrib.codeActionController"}static get(e){return e.getContribution(ie.ID)}constructor(e,t,i,n,o,s,r,c,d,u,h){super(),this._commandService=r,this._configurationService=c,this._actionWidgetService=d,this._instantiationService=u,this._telemetryService=h,this._activeCodeActions=this._register(new l.HE),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new ce.Dc(this._editor,o.codeActionProvider,t,i,s,c,this._telemetryService)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new a.d((()=>{const e=this._editor.getContribution(k.E.ID);return e&&this._register(e.onClick((e=>this.showCodeActionsFromLightbulb(e.actions,e)))),e})),this._resolver=n.createInstance(v),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&1===e.validActions.length){const t=e.validActions[0],i=t.action.command;return i&&"inlineChat.start"===i.id&&i.arguments&&i.arguments.length>=1&&(i.arguments[0]={...i.arguments[0],autoSend:!1}),void await this._applyCodeAction(t,!1,!1,h.Qp.FromAILightbulb)}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){if(!this._editor.hasModel())return;x.k.get(this._editor)?.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,i,n){try{await this._instantiationService.invokeFunction(h.W4,e,n,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:p.fo.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(1!==e.type)return void this.hideLightBulbWidget();let t;try{t=await e.actions}catch(e){return void(0,r.dz)(e)}if(this._disposed)return;const i=this._editor.getSelection();if(i?.startLineNumber===e.position.lineNumber)if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),1===e.trigger.type){if(e.trigger.filter?.include){const i=this.tryGetValidActionToApply(e.trigger,t);if(i){try{this.hideLightBulbWidget(),await this._applyCodeAction(i,!1,!1,h.Qp.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){const i=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(i&&i.action.disabled)return x.k.get(this._editor)?.showMessage(i.action.disabled,e.trigger.context.position),void t.dispose()}}const i=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!i&&!t.validActions.length))return x.k.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,void t.dispose();this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:i,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}static{this.DECORATION=d.kI.register({description:"quickfix-highlight",className:ge})}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),o=this._editor.getDomNode();if(!o)return;const r=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!r.length)return;const a=c.y.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(e,t)=>{this._applyCodeAction(e,!0,!!t,i.fromLightbulb?h.Qp.FromAILightbulb:h.Qp.FromCodeActions),this._actionWidgetService.hide(!1),n.clear()},onHide:e=>{this._editor?.focus(),n.clear()},onHover:async(e,t)=>{if(t.isCancellationRequested)return;let i=!1;const n=e.action.kind;if(n){const e=new g.k(n),t=[p.gB.RefactorExtract,p.gB.RefactorInline,p.gB.RefactorRewrite,p.gB.RefactorMove,p.gB.Source];i=t.some((t=>t.contains(e)))}return{canPreview:i||!!e.action.edit?.edits.length}},onFocus:e=>{if(e&&e.action){const t=e.action.ranges,i=e.action.diagnostics;if(n.clear(),t&&t.length>0){const e=i&&i?.length>1?i.map((e=>({range:e,options:ie.DECORATION}))):t.map((e=>({range:e,options:ie.DECORATION})));n.set(e)}else if(i&&i.length>0){const e=i.map((e=>({range:e,options:ie.DECORATION})));n.set(e);const t=i[0];if(t.startLineNumber&&t.startColumn){const e=this._editor.getModel()?.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn})?.word;s.h5((0,y.kg)("editingNewSelection","Context: {0} at line {1} and column {2}.",e,t.startLineNumber,t.startColumn))}}}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,S(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,o,this._getActionBarActions(e,t,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,o.BK)(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}_shouldShowHeaders(){const e=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e?.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>({id:e.id,label:e.title,tooltip:e.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(e.id,...e.arguments??[])})));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:(0,y.kg)("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:(0,y.kg)("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};pe=ie=ue([he(1,se.DR),he(2,K.fN),he(3,Q._Y),he(4,u.ILanguageFeaturesService),he(5,re.N8),he(6,ne.d),he(7,oe.pG),he(8,J),he(9,Q._Y),he(10,de.k)],pe),(0,le.zy)(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".quickfix-edit-highlight",e.getColor(O.Ubg));const n=e.getColor(O.ECk);n&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,ae.Bb)(e.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)}))},12776:(e,t,i)=>{"use strict";i.d(t,{D_:()=>_,Dc:()=>C});var n=i(9659),o=i(14396),s=i(40231),r=i(5091),a=i(84366),l=i(35011),c=i(36788),d=i(98581),u=i(18904),h=i(44838),g=i(69432),p=i(51761),f=i(59200),m=i(84240);const _=new u.N1("supportedCodeAction",""),v="_typescript.applyFixAllCodeAction";class b extends r.jG{constructor(e,t,i,o=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=o,this._autoTriggerTimer=this._register(new n.pc),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._tryAutoTrigger())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,a.n4)(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:g.fo.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(1===e.type)return t;const i=this._editor.getOption(65).enabled;if(i!==l.jT.Off){if(i===l.jT.On)return t;if(i===l.jT.OnCode){const e=t.isEmpty();if(!e)return t;const i=this._editor.getModel(),{lineNumber:n,column:o}=t.getPosition(),s=i.getLineContent(n);if(0===s.length)return;if(1===o){if(/\s/.test(s[0]))return}else if(o===i.getLineMaxColumn(n)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return t}}}var y;(function(e){e.Empty={type:0};class t{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if((0,o.MB)(e))return w;throw e}))}cancel(){this._cancellablePromise.cancel()}}e.Triggered=t})(y||(y={}));const w=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class C extends r.jG{constructor(e,t,i,n,o,a,l){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._configurationService=a,this._telemetryService=l,this._codeActionOracle=this._register(new r.HE),this._state=y.Empty,this._onDidChangeState=this._register(new s.vl),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=_.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(65)&&this._update()}))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(y.Empty,!0))}_settingEnabledNearbyQuickfixes(){const e=this._editor?.getModel();return!!this._configurationService&&this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e?.uri})}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(y.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(92)){const t=this._registry.all(e).flatMap((e=>e.providedCodeActionKinds??[]));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new b(this._editor,this._markerService,(t=>{if(!t)return void this.setState(y.Empty);const i=t.selection.getStartPosition(),o=(0,n.SS)((async i=>{if(this._settingEnabledNearbyQuickfixes()&&1===t.trigger.type&&(t.trigger.triggerAction===g.fo.QuickFix||t.trigger.filter?.include?.contains(g.gB.QuickFix))){const n=await(0,p.dU)(this._registry,e,t.selection,t.trigger,h.ke.None,i),o=[...n.allActions];if(i.isCancellationRequested)return w;const s=n.validActions?.some((e=>!!e.action.kind&&g.gB.QuickFix.contains(new f.k(e.action.kind)))),r=this._markerService.read({resource:e.uri});if(s){for(const e of n.validActions)e.action.command?.arguments?.some((e=>"string"===typeof e&&e.includes(v)))&&(e.action.diagnostics=[...r.filter((e=>e.relatedInformation))]);return{validActions:n.validActions,allActions:o,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}if(!s&&r.length>0){const s=t.selection.getPosition();let a=s,l=Number.MAX_VALUE;const u=[...n.validActions];for(const f of r){const m=f.endColumn,_=f.endLineNumber,b=f.startLineNumber;if(_===s.lineNumber||b===s.lineNumber){a=new c.y(_,m);const f={type:t.trigger.type,triggerAction:t.trigger.triggerAction,filter:{include:t.trigger.filter?.include?t.trigger.filter?.include:g.gB.QuickFix},autoApply:t.trigger.autoApply,context:{notAvailableMessage:t.trigger.context?.notAvailableMessage||"",position:a}},b=new d.L(a.lineNumber,a.column,a.lineNumber,a.column),y=await(0,p.dU)(this._registry,e,b,f,h.ke.None,i);if(0!==y.validActions.length){for(const e of y.validActions)e.action.command?.arguments?.some((e=>"string"===typeof e&&e.includes(v)))&&(e.action.diagnostics=[...r.filter((e=>e.relatedInformation))]);0===n.allActions.length&&o.push(...y.allActions),Math.abs(s.column-m)i.findIndex((t=>t.action.title===e.action.title))===t));return f.sort(((e,t)=>e.action.isPreferred&&!t.action.isPreferred?-1:!e.action.isPreferred&&t.action.isPreferred||e.action.isAI&&!t.action.isAI?1:!e.action.isAI&&t.action.isAI?-1:0)),{validActions:f,allActions:o,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}}if(1===t.trigger.type){const n=new m.W,o=await(0,p.dU)(this._registry,e,t.selection,t.trigger,h.ke.None,i);return this._telemetryService&&this._telemetryService.publicLog2("codeAction.invokedDurations",{codeActions:o.validActions.length,duration:n.elapsed()}),o}return(0,p.dU)(this._registry,e,t.selection,t.trigger,h.ke.None,i)}));1===t.trigger.type&&this._progressService?.showWhile(o,250);const s=new y.Triggered(t.trigger,i,o);let r=!1;1===this._state.type&&(r=1===this._state.trigger.type&&1===s.type&&2===s.trigger.type&&this._state.position!==s.position),r?setTimeout((()=>{this.setState(s)}),500):this.setState(s)}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:g.fo.Default})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value?.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}},84207:(e,t,i)=>{"use strict";i.d(t,{E:()=>E});var n,o=i(2150),s=i(25201),r=i(25923),a=i(40231),l=i(5091),c=i(23740),d=i(9322),u=i(35037),h=i(47172),g=i(51761),p=i(41337),f=i(13046),m=i(48401),_=i(8690),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};const y=(0,m.pU)("gutter-lightbulb",r.W.lightBulb,p.kg("gutterLightbulbWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor.")),w=(0,m.pU)("gutter-lightbulb-auto-fix",r.W.lightbulbAutofix,p.kg("gutterLightbulbAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),C=(0,m.pU)("gutter-lightbulb-sparkle",r.W.lightbulbSparkle,p.kg("gutterLightbulbAIFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),S=(0,m.pU)("gutter-lightbulb-aifix-auto-fix",r.W.lightbulbSparkleAutofix,p.kg("gutterLightbulbAIFixAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),k=(0,m.pU)("gutter-lightbulb-sparkle-filled",r.W.sparkleFilled,p.kg("gutterLightbulbSparkleFilledWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var x;(function(e){e.Hidden={type:0};class t{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}e.Showing=t})(x||(x={}));let E=class extends l.jG{static{n=this}static{this.GUTTER_DECORATION=u.kI.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:c.L.asClassName(r.W.lightBulb),glyphMargin:{position:d.ZS.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new a.vl),this.onClick=this._onClick.event,this._state=x.Hidden,this._gutterState=x.Hidden,this._iconClasses=[],this.lightbulbClasses=["codicon-"+y.id,"codicon-"+S.id,"codicon-"+w.id,"codicon-"+C.id,"codicon-"+k.id],this.gutterDecoration=n.GUTTER_DECORATION,this._domNode=o.$("div.lightBulbWidget"),this._domNode.role="listbox",this._register(s.q.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide(),(1!==this.gutterState.type||!t||this.gutterState.editorPosition.lineNumber>=t.getLineCount())&&this.gutterHide()}))),this._register(o.Xc(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=o.BK(this._domNode),n=this._editor.getOption(67);let s=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{1===(1&e.buttons)&&this.hide()}))),this._register(a.Jh.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,(()=>{this._preferredKbLabel=this._keybindingService.lookupKeybinding(g.pR)?.getLabel()??void 0,this._quickFixKbLabel=this._keybindingService.lookupKeybinding(g.pQ)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()}))),this._register(this._editor.onMouseDown((async e=>{if(!e.target.element||!this.lightbulbClasses.some((t=>e.target.element&&e.target.element.classList.contains(t))))return;if(1!==this.gutterState.type)return;this._editor.focus();const{top:t,height:i}=o.BK(e.target.element),n=this._editor.getOption(67);let s=Math.floor(n/3);null!==this.gutterState.widgetPosition.position&&this.gutterState.widgetPosition.position.lineNumber22,f=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1),m=this._editor.getLineDecorations(a);let _=!1;if(m)for(const e of m){const t=e.options.glyphMarginClassName;if(t&&!this.lightbulbClasses.some((e=>t.includes(e)))){_=!0;break}}let v=a,b=1;if(!p){const o=e=>{const t=r.getLineContent(e);return/^\s*$|^\s+/.test(t)||t.length<=b};if(a>1&&!f(a-1)){const s=r.getLineCount(),l=a===s,c=a>1&&o(a-1),d=!l&&o(a+1),u=o(a),h=!d&&!c;if(!(d||c||_))return this.gutterState=new x.Showing(e,t,i,{position:{lineNumber:v,column:b},preference:n._posPref}),this.renderGutterLightbub(),this.hide();c||l||c&&!u?v-=1:(d||h&&u)&&(v+=1)}else if(1!==a||a!==r.getLineCount()&&(o(a+1)||o(a))){if(a{this._gutterDecorationID=t.addDecoration(new _.Q(e,0,e,0),this.gutterDecoration)}))}_removeGutterDecoration(e){this._editor.changeDecorations((t=>{t.removeDecoration(e),this._gutterDecorationID=void 0}))}_updateGutterDecoration(e,t){this._editor.changeDecorations((i=>{i.changeDecoration(e,new _.Q(t,0,t,0)),i.changeDecorationOptions(e,this.gutterDecoration)}))}_updateLightbulbTitle(e,t){1===this.state.type&&(t?this.title=p.kg("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=p.kg("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=p.kg("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=p.kg("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}};E=n=v([b(1,f.b)],E)},69432:(e,t,i)=>{"use strict";i.d(t,{QA:()=>d,Vi:()=>u,aF:()=>l,fo:()=>r,gB:()=>s,uJ:()=>a});var n=i(14396),o=i(59200);const s=new class{constructor(){this.QuickFix=new o.k("quickfix"),this.Refactor=new o.k("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new o.k("notebook"),this.Source=new o.k("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var r;function a(e,t){return!(e.include&&!e.include.intersects(t))&&((!e.excludes||!e.excludes.some((i=>c(t,i,e.include))))&&!(!e.includeSourceActions&&s.Source.contains(t)))}function l(e,t){const i=t.kind?new o.k(t.kind):void 0;return!!(!e.include||i&&e.include.contains(i))&&(!(e.excludes&&i&&e.excludes.some((t=>c(i,t,e.include))))&&(!(!e.includeSourceActions&&i&&s.Source.contains(i))&&!(e.onlyIncludePreferredActions&&!t.isPreferred)))}function c(e,t,i){return!!t.contains(e)&&(!i||!t.contains(i))}(function(e){e["Refactor"]="refactor",e["RefactorPreview"]="refactor preview",e["Lightbulb"]="lightbulb",e["Default"]="other (default)",e["SourceAction"]="source action",e["QuickFix"]="quick fix action",e["FixAll"]="fix all",e["OrganizeImports"]="organize imports",e["AutoFix"]="auto fix",e["QuickFixHover"]="quick fix hover window",e["OnSave"]="save participants",e["ProblemsView"]="problems view"})(r||(r={}));class d{static fromUser(e,t){return e&&"object"===typeof e?new d(d.getKindFromUser(e,t.kind),d.getApplyFromUser(e,t.apply),d.getPreferredUser(e)):new d(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"===typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"===typeof e.kind?new o.k(e.kind):t}static getPreferredUser(e){return"boolean"===typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class u{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){if(this.provider?.resolveCodeAction&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(e){(0,n.M_)(e)}t&&(this.action.edit=t.edit)}return this}}},34588:(e,t,i)=>{"use strict";var n=i(9659),o=i(14396),s=i(5091),r=i(71203),a=i(16259),l=i(35011),c=i(57479),d=i(67792),u=i(50322),h=i(29133),g=i(69361),p=i(72786),f=i(12847);class m{constructor(){this.lenses=[],this._disposables=new s.Cm}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function _(e,t,i){const n=e.ordered(t),s=new Map,r=new m,a=n.map((async(e,n)=>{s.set(e,n);try{const n=await Promise.resolve(e.provideCodeLenses(t,i));n&&r.add(n,e)}catch(e){(0,o.M_)(e)}}));return await Promise.all(a),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:s.get(e.provider)s.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),r}p.w.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,u.j)(h.r.isUri(i)),(0,u.j)("number"===typeof n||!n);const{codeLensProvider:r}=e.get(f.ILanguageFeaturesService),a=e.get(g.IModelService).getModel(i);if(!a)throw(0,o.Qg)();const l=[],c=new s.Cm;return _(r,a,d.XO.None).then((e=>{c.add(e);const t=[];for(const i of e.lenses)void 0===n||null===n||Boolean(i.symbol.command)?l.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(a,i.symbol,d.XO.None)).then((e=>l.push(e||i.symbol))));return Promise.all(t)})).then((()=>l)).finally((()=>{setTimeout((()=>c.dispose()),100)}))}));var v=i(40231),b=i(21553),y=i(8690),w=i(59857),C=i(87778),S=i(94216),k=i(62484),x=i(2150),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};const T=(0,C.u1)("ICodeLensCache");class I{constructor(e,t){this.lineCount=e,this.data=t}}let D=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new b.qK(20,.75);const t="codelens/cache";(0,x.U3)(k.G,(()=>e.remove(t,1)));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n);const o=v.Jh.filter(e.onWillSaveState,(e=>e.reason===S.LP.SHUTDOWN));v.Jh.once(o)((t=>{e.store(i,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>({range:e.symbol.range,command:e.symbol.command&&{id:"",title:e.symbol.command?.title}}))),n=new m;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new I(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new y.Q(e,1,e,11)});const o=new m;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new I(i.lineCount,o))}}catch{}}};D=E([L(0,S.CS)],D),(0,w.v)(T,D,1);var R=i(84653),N=i(35037);class A{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class O{static{this._idPool=0}constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+O._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let t=0;t{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:M},(e=>this._decorationIds[t]=e)),r=r?y.Q.plusRange(r,e.symbol.range):y.Q.lift(e.symbol.range)})),this._viewZone=new A(r.startLineNumber-1,o,s),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new O(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||y.Q.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:M},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z=function(e,t){return function(i,n){t(i,n,e)}};let U=class{static{this.ID="css.editor.codeLens"}constructor(e,t,i,o,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=o,this._notificationService=r,this._codeLensCache=a,this._disposables=new s.Cm,this._localToDispose=new s.Cm,this._lenses=[],this._oldCodeLensModels=new s.Cm,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new n.uC((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(50)||e.hasChanged(19)||e.hasChanged(18))&&this._updateLensStyle(),e.hasChanged(17)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=.9*this._editor.getOption(52)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",l.jU.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&(0,n.EQ)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4,this._localToDispose));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"===typeof t.onDidChange){const e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.uC((()=>{const t=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,n.SS)((t=>_(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((n=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=n,this._codeLensCache.put(e,n);const o=this._provideCodeLensDebounce.update(e,Date.now()-t);i.delay=o,this._renderCodeLensSymbols(n),this._resolveCodeLensesInViewportSoon()}),o.dz)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,s.s)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const o=new P;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorText((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidBlurEditorText((()=>{i.cancel()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,s.s)((()=>{if(this._editor.getModel()){const e=r.D.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===t?.tagName&&(t=t.parentElement),"A"===t?.tagName)for(const e of this._lenses){const i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new P;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const o of e.lenses){const e=o.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(o):(n=[o],i.push(n)))}if(!i.length&&!this._lenses.length)return;const o=r.D.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new P;let o=0,r=0;while(rthis._resolveCodeLensesInViewportSoon()))),o++,r++)}while(othis._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){const e=this._editor.getModel();e&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const t=[],i=[];if(this._lenses.forEach((n=>{const o=n.computeIfNecessary(e);o&&(t.push(o),i.push(n))})),0===t.length)return;const s=Date.now(),r=(0,n.SS)((n=>{const s=t.map(((t,s)=>{const r=new Array(t.length),a=t.map(((t,i)=>t.symbol.command||"function"!==typeof t.provider.resolveCodeLens?(r[i]=t.symbol,Promise.resolve(void 0)):Promise.resolve(t.provider.resolveCodeLens(e,t.symbol,n)).then((e=>{r[i]=e}),o.M_)));return Promise.all(a).then((()=>{n.isCancellationRequested||i[s].isDisposed()||i[s].updateCommands(r)}))}));return Promise.all(s)}));this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then((()=>{const t=this._resolveCodeLensesDebounce.update(e,Date.now()-s);this._resolveCodeLensesScheduler.delay=t,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dz)(e),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};U=j([z(1,f.ILanguageFeaturesService),z(2,V.ILanguageFeatureDebounceService),z(3,p.d),z(4,W.Ot),z(5,T)],U),(0,a.HW)(U.ID,U,1),(0,a.Fl)(class extends a.ks{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:c.R.hasCodeLensProvider,label:(0,B.kg)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(H.GK),n=e.get(p.d),o=e.get(W.Ot),s=t.getSelection().positionLineNumber,r=t.getContribution(U.ID);if(!r)return;const a=await r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===s&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const c=await i.pick(l,{canPickMany:!1,placeHolder:(0,B.kg)("placeHolder","Select a command")});if(!c)return;let d=c.command;if(a.isDisposed){const e=await r.getModel(),t=e?.lenses.find((e=>e.symbol.range.startLineNumber===s&&e.symbol.command?.title===d.title));if(!t||!t.symbol.command)return;d=t.symbol.command}try{await n.executeCommand(d.id,...d.arguments||[])}catch(e){o.error(e)}}})},68385:(e,t,i)=>{"use strict";i.d(t,{R:()=>g,j:()=>h});var n=i(67792),o=i(14396),s=i(29133),r=i(8690),a=i(69361),l=i(72786),c=i(12847),d=i(21922),u=i(32828);async function h(e,t,i,n=!0){return _(new p,e,t,i,n)}function g(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}class p{constructor(){}async compute(e,t,i,n){const o=await e.provideDocumentColors(t,i);if(Array.isArray(o))for(const t of o)n.push({colorInfo:t,provider:e});return Array.isArray(o)}}class f{constructor(){}async compute(e,t,i,n){const o=await e.provideDocumentColors(t,i);if(Array.isArray(o))for(const e of o)n.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(o)}}class m{constructor(e){this.colorInfo=e}async compute(e,t,i,o){const s=await e.provideColorPresentations(t,this.colorInfo,n.XO.None);return Array.isArray(s)&&o.push(...s),Array.isArray(s)}}async function _(e,t,i,n,s){let r,a=!1;const l=[],c=t.ordered(i);for(let t=c.length-1;t>=0;t--){const s=c[t];if(s instanceof d.L)r=s;else try{await e.compute(s,i,n,l)&&(a=!0)}catch(e){(0,o.M_)(e)}}return a?l:r&&s?(await e.compute(r,i,n,l),l):[]}function v(e,t){const{colorProvider:i}=e.get(c.ILanguageFeaturesService),n=e.get(a.IModelService).getModel(t);if(!n)throw(0,o.Qg)();const s=e.get(u.pG).getValue("editor.defaultColorDecorators",{resource:t});return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:s}}l.w.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof s.r))throw(0,o.Qg)();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=v(e,i);return _(new f,a,r,n.XO.None,l)})),l.w.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,a]=t,{uri:l,range:c}=a;if(!(l instanceof s.r)||!Array.isArray(i)||4!==i.length||!r.Q.isIRange(c))throw(0,o.Qg)();const{model:d,colorProviderRegistry:u,isDefaultColorDecoratorsEnabled:h}=v(e,l),[g,p,f,b]=i;return _(new m({range:c,color:{red:g,green:p,blue:f,alpha:b}}),u,d,n.XO.None,h)}))},29886:(e,t,i)=>{"use strict";var n=i(5091),o=i(16259),s=i(8690),r=i(17799),a=i(86367),l=i(81319),c=i(38570);class d extends n.jG{static{this.ID="editor.contrib.colorContribution"}constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(149);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==r.nM)return;if(!i.range)return;const n=this._editor.getContribution(l.A.ID);if(n&&!n.isColorPickerVisible){const e=new s.Q(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}(0,o.HW)(d.ID,d,2),c.B2.register(a.BJ)},17799:(e,t,i)=>{"use strict";i.d(t,{mn:()=>C,nM:()=>w});var n,o=i(9659),s=i(85476),r=i(14396),a=i(40231),l=i(5091),c=i(84240),d=i(20601),u=i(66621),h=i(16259),g=i(8690),p=i(35037),f=i(85983),m=i(12847),_=i(68385),v=i(32828),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};const w=Object.create({});let C=class extends l.jG{static{n=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(e,t,i,o){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new l.Cm),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new u.Qn(this._editor),this._decoratorLimitReporter=new S,this._colorDecorationClassRefs=this._register(new l.Cm),this._debounceInformation=o.for(i.colorProvider,"Document Colors",{min:n.RECOMPUTE_TIME}),this._register(e.onDidChangeModel((()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()}))),this._register(e.onDidChangeModelLanguage((()=>this.updateColors()))),this._register(i.colorProvider.onDidChange((()=>this.updateColors()))),this._register(e.onDidChangeConfiguration((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(21),n=e.hasChanged(148);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"===typeof i){const e=i["colorDecorators"];if(e&&void 0!==e["enable"]&&!e["enable"])return e["enable"]}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new o.pc,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}async beginCompute(){this._computePromise=(0,o.SS)((async e=>{const t=this._editor.getModel();if(!t)return[];const i=new c.W(!1),n=await(0,_.j)(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n}));try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){(0,r.dz)(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.kI.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let n=0;nthis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};C=n=b([y(1,v.pG),y(2,m.ILanguageFeaturesService),y(3,f.ILanguageFeatureDebounceService)],C);class S{constructor(){this._onDidChange=new a.vl,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}(0,h.HW)(C.ID,C,1)},86367:(e,t,i)=>{"use strict";i.d(t,{BJ:()=>M,WE:()=>B});var n=i(9659),o=i(67792),s=i(85476),r=i(5091),a=i(8690),l=i(68385),c=i(17799),d=i(40231);class u{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new d.vl,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new d.vl,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let e=0;e{this.backgroundColor=e.getColor(b.WfR)||s.Q1.white}))),this._register(g.ko(this._pickedColorNode,g.Bx.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(g.ko(this._originalColorNode,g.Bx.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=s.Q1.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new S(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=s.Q1.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class S extends r.jG{constructor(e){super(),this._onClicked=this._register(new d.vl),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),g.BC(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),g.BC(this._button,t);const i=g.BC(t,w(".button"+_.L.asCSSSelector((0,y.pU)("color-picker-close",m.W.close,(0,v.kg)("closeIcon","Icon to close the color picker")))));i.classList.add("close-icon"),this._register(g.ko(this._button,g.Bx.CLICK,(()=>{this._onClicked.fire()})))}}class k extends r.jG{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=w(".colorpicker-body"),g.BC(e,this._domNode),this._saturationBox=new x(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new L(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new T(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new I(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new s.Q1(new s.$J(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new s.Q1(new s.$J(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new s.Q1(new s.$J(360===i?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class x extends r.jG{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,this._domNode=w(".saturation-wrap"),g.BC(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",g.BC(this._domNode,this._canvas),this.selection=w(".saturation-selection"),g.BC(this._domNode,this.selection),this.layout(),this._register(g.ko(this._domNode,g.Bx.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new p._);const t=g.BK(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=g.ko(e.target.ownerDocument,g.Bx.POINTER_UP,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new s.Q1(new s.$J(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=s.Q1.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class E extends r.jG{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=g.BC(e,w(".standalone-strip")),this.overlay=g.BC(this.domNode,w(".standalone-overlay"))):(this.domNode=g.BC(e,w(".strip")),this.overlay=g.BC(this.domNode,w(".overlay"))),this.slider=g.BC(this.domNode,w(".slider")),this.slider.style.top="0px",this._register(g.ko(this.domNode,g.Bx.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new p._),i=g.BK(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=g.ko(e.target.ownerDocument,g.Bx.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class L extends E{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,o=new s.Q1(new s.bU(t,i,n,1)),r=new s.Q1(new s.bU(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class T extends E{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class I extends r.jG{constructor(e){super(),this._onClicked=this._register(new d.vl),this.onClicked=this._onClicked.event,this._button=g.BC(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(g.ko(this._button,g.Bx.CLICK,(()=>{this._onClicked.fire()})))}get button(){return this._button}}class D extends f.x{constructor(e,t,i,n,o=!1){super(),this.model=t,this.pixelRatio=i,this._register(h.c.getInstance(g.zk(e)).onDidChange((()=>this.layout()))),this._domNode=w(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new C(this._domNode,this.model,n,o)),this.body=this._register(new k(this._domNode,this.model,this.pixelRatio,o))}layout(){this.body.layout()}get domNode(){return this._domNode}}var R=i(38570),N=i(15911),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=function(e,t){return function(i,n){t(i,n,e)}};class P{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let M=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return n.AE.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=c.mn.get(this._editor);if(!n)return[];for(const e of t){if(!n.isColorDecoration(e))continue;const t=n.getColorData(e.range.getStartPosition());if(t){const e=await W(this,this._editor.getModel(),t.colorInfo,t.provider);return[e]}}return[]}renderHoverParts(e,t){const i=H(this,this._editor,this._themeService,t,e);if(!i)return new R.Ke([]);this._colorPicker=i.colorPicker;const n={hoverPart:i.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){i.disposables.dispose()}};return new R.Ke([n])}handleResize(){this._colorPicker?.layout()}isColorPickerVisible(){return!!this._colorPicker}};M=A([O(1,N.Gy)],M);class F{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let B=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel())return null;const n=c.mn.get(this._editor);if(!n)return null;const s=await(0,l.j)(i,this._editor.getModel(),o.XO.None);let r=null,d=null;for(const t of s){const i=t.colorInfo;a.Q.containsRange(i.range,e.range)&&(r=i,d=t.provider)}const u=r??e,h=d??t,g=!!r;return{colorHover:await W(this,this._editor.getModel(),u,h),foundInEditor:g}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new a.Q(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await j(this._editor.getModel(),t,this._color,i,e),i=V(this._editor,i,t))}renderHoverParts(e,t){return H(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};async function W(e,t,i,n){const r=t.getValueInRange(i.range),{red:c,green:d,blue:h,alpha:g}=i.color,p=new s.bU(Math.round(255*c),Math.round(255*d),Math.round(255*h),g),f=new s.Q1(p),m=await(0,l.R)(t,i,n,o.XO.None),_=new u(f,[],0);return _.colorPresentations=m||[],_.guessColorPresentation(f,r),e instanceof M?new P(e,a.Q.lift(i.range),_,n):new F(e,a.Q.lift(i.range),_,n)}function H(e,t,i,n,o){if(0===n.length||!t.hasModel())return;if(o.setMinimumDimensions){const e=t.getOption(67)+8;o.setMinimumDimensions(new g.fg(302,e))}const s=new r.Cm,l=n[0],c=t.getModel(),d=l.model,u=s.add(new D(o.fragment,d,t.getOption(144),i,e instanceof B));let h=!1,p=new a.Q(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn);if(e instanceof B){const t=l.model.color;e.color=t,j(c,d,t,p,l),s.add(d.onColorFlushed((t=>{e.color=t})))}else s.add(d.onColorFlushed((async e=>{await j(c,d,e,p,l),h=!0,p=V(t,p,d)})));return s.add(d.onDidChangeColor((e=>{j(c,d,e,p,l)}))),s.add(t.onDidChangeModelContent((e=>{h?h=!1:(o.hide(),t.focus())}))),{hoverPart:l,colorPicker:u,disposables:s}}function V(e,t,i){const n=[],o=i.presentation.textEdit??{range:t,text:i.presentation.label,forceMoveMarkers:!1};n.push(o),i.presentation.additionalTextEdits&&n.push(...i.presentation.additionalTextEdits);const s=a.Q.lift(o.range),r=e.getModel()._setTrackedRange(null,s,3);return e.executeEdits("colorpicker",n),e.pushUndoStop(),e.getModel()._getTrackedRange(r)??s}async function j(e,t,i,n,s){const r=await(0,l.R)(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},s.provider,o.XO.None);t.colorPresentations=r||[]}B=A([O(1,N.Gy)],B)},21922:(e,t,i)=>{"use strict";i.d(t,{L:()=>d});var n=i(85476),o=i(5091),s=i(12847),r=i(36285),a=i(4117),l=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},c=function(e,t){return function(i,n){t(i,n,e)}};let d=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const o=t.range,s=t.color,r=s.alpha,a=new n.Q1(new n.bU(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?n.Q1.Format.CSS.formatRGB(a):n.Q1.Format.CSS.formatRGBA(a),c=r?n.Q1.Format.CSS.formatHSL(a):n.Q1.Format.CSS.formatHSLA(a),d=r?n.Q1.Format.CSS.formatHex(a):n.Q1.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:o,text:l}}),u.push({label:c,textEdit:{range:o,text:c}}),u.push({label:d,textEdit:{range:o,text:d}}),u}};d=l([c(0,a.IEditorWorkerService)],d);let u=class extends o.jG{constructor(e,t){super(),this._register(e.colorProvider.register("*",new d(t)))}};u=l([c(0,s.ILanguageFeaturesService),c(1,a.IEditorWorkerService)],u),(0,r.x)(u)},24655:(e,t,i)=>{"use strict";var n,o,s=i(16259),r=i(41337),a=i(5091),l=i(86367),c=i(87778),d=i(43505),u=i(13046),h=i(40231),g=i(12847),p=i(57479),f=i(18904),m=i(21922),_=i(2150),v=i(4117),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};let w=class extends a.jG{static{n=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(e,t,i){super(),this._editor=e,this._instantiationService=i,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.R.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=p.R.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(k,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(e){return e.getContribution(n.ID)}};w=n=b([y(1,f.fN),y(2,c._Y)],w),(0,s.HW)(w.ID,w,1);const C=8,S=22;let k=class extends a.jG{static{o=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._keybindingService=o,this._languageFeaturesService=s,this._editorWorkerService=r,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new h.vl),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(l.WE,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;const a=this._editor.getSelection(),c=a?{startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},d=this._register(_.w5(this._body));this._register(d.onDidBlur((e=>{this.hide()}))),this._register(d.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{const t=e.target.element?.classList;t&&t.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(c),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return o.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new x(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new m.L(this._editorWorkerService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment(),n=this._register(new d.L(this._keybindingService)),o={fragment:i,statusBar:n,onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=e;const s=this._standaloneColorPickerParticipant.renderHoverParts(o,[e]);if(!s)return;this._register(s.disposables);const r=s.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),r.layout();const a=r.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-S-C,u=r.body.enterButton;u?.onClicked((()=>{this.updateEditor(),this.hide()}));const h=r.header,g=h.pickedColorNode;g.style.width=l+C+"px";const p=h.originalColorNode;p.style.width=c+"px";const f=r.header.closeButton;f?.onClicked((()=>{this.hide()})),t&&(u&&(u.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};k=o=b([y(3,c._Y),y(4,u.b),y(5,g.ILanguageFeaturesService),y(6,v.IEditorWorkerService)],k);class x{constructor(e,t){this.value=e,this.foundInEditor=t}}var E=i(6330);class L extends s.qO{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...(0,r.aS)("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:(0,r.kg)({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:E.D8.CommandPalette}],metadata:{description:(0,r.aS)("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){w.get(t)?.showOrFocus()}}class T extends s.ks{constructor(){super({id:"editor.action.hideColorPicker",label:(0,r.kg)({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:p.R.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:(0,r.aS)("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,t){w.get(t)?.hide()}}class I extends s.ks{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,r.kg)({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:p.R.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:(0,r.aS)("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){w.get(t)?.insertColor()}}(0,s.Fl)(T),(0,s.Fl)(I),(0,E.ug)(L)},26271:(e,t,i)=>{"use strict";var n=i(91348),o=i(16259),s=i(8690),r=i(57479),a=i(50395),l=i(28346),c=i(36788),d=i(98581);class u{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,o=e.length;if(i+n>o)return!1;for(let o=0;o=65&&n<=90&&n+32===s)&&!(s>=65&&s<=90&&s+32===n)))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,r){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,h=o.getLineContent(a),g=o.getLineContent(c);let p,f=h.lastIndexOf(t,l-1+t.length),m=g.indexOf(i,d-1-i.length);if(-1!==f&&-1!==m)if(a===c){const e=h.substring(f+t.length,m);e.indexOf(i)>=0&&(f=-1,m=-1)}else{const e=h.substring(f+t.length),n=g.substring(0,m);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(f=-1,m=-1)}-1!==f&&-1!==m?(n&&f+t.length0&&32===g.charCodeAt(m-1)&&(i=" "+i,m-=1),p=u._createRemoveBlockCommentOperations(new s.Q(a,f+t.length+1,c,m+1),t,i)):(p=u._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===p.length?i:null);for(const e of p)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return s.Q.isEmpty(e)?n.push(l.k.delete(new s.Q(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.k.delete(new s.Q(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.k.delete(new s.Q(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const o=[];return s.Q.isEmpty(e)?o.push(l.k.replace(new s.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(l.k.insert(new c.y(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(l.k.insert(new c.y(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;s&&s.blockCommentStartToken&&s.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new d.L(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new d.L(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var h=i(20601);class g{constructor(e,t,i,n,o,s,r){this.languageConfigurationService=e,this._selection=t,this._indentSize=i,this._type=n,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),s=n.getLanguageConfiguration(o).comments,r=s?s.lineCommentToken:null;if(!r)return null;const a=[];for(let e=0,n=i-t+1;er?o-1:o}}}var p=i(41337),f=i(6330);class m extends o.ks{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(a.JZ);if(!t.hasModel())return;const n=t.getModel(),o=[],r=n.getOptions(),l=t.getOption(23),c=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));c.sort(((e,t)=>s.Q.compareRangesUsingStarts(e.selection,t.selection)));let d=c[0];for(let e=1;e{"use strict";i.d(t,{d:()=>y});var n,o=i(2150),s=i(64236),r=i(55664),a=i(5091),l=i(25160),c=i(16259),d=i(57479),u=i(41337),h=i(6330),g=i(18904),p=i(46403),f=i(13046),m=i(32828),_=i(81714),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};let y=class{static{n=this}static{this.ID="editor.contrib.contextmenu"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s,r,l,c){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=l,this._workspaceContextService=c,this._toDispose=new a.Cm,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&o.jG(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(24)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.getMenuActions(t,this._contextKeyService,{arg:e.uri});for(const t of n){const[,n]=t;let o=0;for(const t of n)if(t instanceof h.nI){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new r.YH(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new r.wv)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=o.BK(this._editor.getDomNode()),i=t.left+e.left,s=t.top+e.top+e.height;n={x:i,y:s}}const r=this._editor.getOption(128)&&!l.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new s.Z4(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"===typeof i.getActionViewItem?i.getActionViewItem():new s.Z4(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if((0,_.ct)(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(73);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:"undefined"===typeof e.enabled||e.enabled,checked:e.checked,run:e.run}),o=(e,t)=>new r.YH("menu-action-"+ ++i,e,t,void 0),s=(e,t,i,s,r)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const a=e=>()=>{this._configurationService.updateValue(i,e)},l=[];for(const e of r)l.push(n({label:e.label,checked:s===e.value,run:a(e.value)}));return o(e,l)},a=[];a.push(n({label:u.kg("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new r.wv),a.push(n({label:u.kg("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(u.kg("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:u.kg("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:u.kg("context.minimap.size.fill","Fill"),value:"fill"},{label:u.kg("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(u.kg("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:u.kg("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:u.kg("context.minimap.slider.always","Always"),value:"always"}]));const c=this._editor.getOption(128)&&!l.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:c?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};y=n=v([b(1,p.Z),b(2,p.l),b(3,g.fN),b(4,f.b),b(5,h.ez),b(6,m.pG),b(7,_.VR)],y);class w extends c.ks{constructor(){super({id:"editor.action.showContextMenu",label:u.kg("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:d.R.textInputFocus,primary:1092,weight:100}})}run(e,t){y.get(t)?.showContextMenu()}}(0,c.HW)(y.ID,y,2),(0,c.Fl)(w)},15943:(e,t,i)=>{"use strict";var n=i(5091),o=i(16259),s=i(57479),r=i(41337);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections),n=this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i);n||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}class d extends o.ks{constructor(){super({id:"cursorUndo",label:r.kg("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.R.textInputFocus,primary:2099,weight:100}})}run(e,t,i){c.get(t)?.cursorUndo()}}class u extends o.ks{constructor(){super({id:"cursorRedo",label:r.kg("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){c.get(t)?.cursorRedo()}}(0,o.HW)(c.ID,c,0),(0,o.Fl)(d),(0,o.Fl)(u)},32865:(e,t,i)=>{"use strict";var n=i(85053),o=i(39751),s=i(39352),r=i(78787),a=i(12847),l=i(83262),c=i(5091),d=i(40231),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},h=function(e,t){return function(i,n){t(i,n,e)}};let g=class extends c.jG{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=(0,o.FY)(this,void 0);const n=(0,o.yQ)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=(0,o.yQ)("_textModel.onDidChangeContent",d.Jh.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register((0,o.yC)((async(e,t)=>{n.read(e),s.read(e);const i=t.add(new r.MZ),o=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(o,void 0)})))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const o=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return o.sort((0,n.Hw)((0,n.VE)((e=>e.range.endLineNumber-e.range.startLineNumber),n.U9))),o.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};g=u([h(1,a.ILanguageFeaturesService),h(2,l.gW)],g),s.N.setBreadcrumbsSourceFactory(((e,t)=>t.createInstance(g,e)))},6132:(e,t,i)=>{"use strict";var n=i(5091),o=i(25160),s=i(16259),r=i(36788),a=i(8690),l=i(98581),c=i(35037);class d{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.Q(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.L(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.L(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(u(e)&&(this._modifierPressed=!0),this._mouseDown&&u(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(u(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===h.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(null===this._dragSelection){const e=this._editor.getSelections()||[],i=e.filter((e=>t.position&&e.containsPosition(t.position)));if(1!==i.length)return;this._dragSelection=i[0]}u(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new r.y(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new l.L(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new l.L(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(u(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(h.ID,new d(this._dragSelection,t,u(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=c.kI.register({description:"dnd-target",className:"dnd-target"})}showAt(e){this._dndDecorationIds.set([{range:new a.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:h._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}(0,s.HW)(h.ID,h,2)},23631:(e,t,i)=>{"use strict";var n=i(67792),o=i(50322),s=i(29133),r=i(64037),a=i(83262),l=i(72786);l.w.registerCommand("_executeDocumentSymbolProvider",(async function(e,...t){const[i]=t;(0,o.j)(s.r.isUri(i));const l=e.get(a.gW),c=e.get(r.ITextModelService),d=await c.createModelReference(i);try{return(await l.getOrCreate(d.object.textEditorModel,n.XO.None)).getTopLevelSymbols()}finally{d.dispose()}}))},83262:(e,t,i)=>{"use strict";i.d(t,{LC:()=>b,e0:()=>y,gW:()=>C,i9:()=>w});var n=i(85053),o=i(67792),s=i(14396),r=i(5837),a=i(21553),l=i(36788),c=i(8690),d=i(85983),u=i(87778),h=i(59857),g=i(69361),p=i(5091),f=i(12847),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};class v{remove(){this.parent?.children.delete(this.id)}static findId(e,t){let i;"string"===typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class b extends v{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class y extends v{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class w extends v{static create(e,t,i){const r=new o.Qi(i),a=new w(t.uri),l=e.ordered(t),c=l.map(((e,i)=>{const n=v.findId(`provider_${i}`,a),o=new y(n,a,e.displayName??"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,r.token)).then((e=>{for(const t of e||[])w._makeOutlineElement(t,o);return o}),(e=>((0,s.M_)(e),o))).then((e=>{v.empty(e)?e.remove():a._groups.set(n,e)}))})),d=e.onDidChange((()=>{const i=e.ordered(t);(0,n.aI)(i,l)||r.cancel()}));return Promise.all(c).then((()=>r.token.isCancellationRequested&&!i.isCancellationRequested?w.create(e,t,i):a._compact())).finally((()=>{r.dispose(),d.dispose(),r.dispose()}))}static _makeOutlineElement(e,t){const i=v.findId(e,t),n=new b(i,t,e);if(e.children)for(const t of e.children)w._makeOutlineElement(t,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=r.f.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof b?e.push(t.symbol):e.push(...r.f.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>c.Q.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return w._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>l.y.compare(c.Q.getStartPosition(e.range),c.Q.getStartPosition(t.range))||l.y.compare(c.Q.getEndPosition(t.range),c.Q.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&w._flattenDocumentSymbols(e,n.children,n.name)}}const C=(0,u.u1)("IOutlineModelService");let S=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new p.Cm,this._cache=new a.qK(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,s=i.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!(0,n.aI)(r.provider,s)){const t=new o.Qi;r={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:t,promise:w.create(i,e,t.token),model:void 0},this._cache.set(e.id,r);const n=Date.now();r.promise.then((t=>{r.model=t,this._debounceInformation.update(e,Date.now()-n)})).catch((t=>{this._cache.delete(e.id)}))}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested((()=>{0===--r.promiseCnt&&(r.source.cancel(),this._cache.delete(e.id))}));try{return await r.promise}finally{a.dispose()}}};S=m([_(0,f.ILanguageFeaturesService),_(1,d.ILanguageFeatureDebounceService),_(2,g.IModelService)],S),(0,h.v)(C,S,1)},50416:(e,t,i)=>{"use strict";var n=i(59200),o=i(16259),s=i(57479),r=i(36285),a=i(878),l=i(49309),c=i(41337);(0,o.HW)(a.Rj.ID,a.Rj,0),(0,r.x)(l.L9),(0,o.E_)(new class extends o.DX{constructor(){super({id:a.qs,precondition:a.lr,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t){return a.Rj.get(t)?.changePasteType()}}),(0,o.E_)(new class extends o.DX{constructor(){super({id:"editor.hidePasteWidget",precondition:a.lr,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t){a.Rj.get(t)?.clearWidgets()}}),(0,o.Fl)(class e extends o.ks{static{this.argsSchema={type:"object",properties:{kind:{type:"string",description:c.kg("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}}}constructor(){super({id:"editor.action.pasteAs",label:c.kg("pasteAs","Paste As..."),alias:"Paste As...",precondition:s.R.writable,metadata:{description:"Paste as",args:[{name:"args",schema:e.argsSchema}]}})}run(e,t,i){let o="string"===typeof i?.kind?i.kind:void 0;return!o&&i&&(o="string"===typeof i.id?i.id:void 0),a.Rj.get(t)?.pasteAs(o?new n.k(o):void 0)}}),(0,o.Fl)(class extends o.ks{constructor(){super({id:"editor.action.pasteAsText",label:c.kg("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:s.R.writable})}run(e,t){return a.Rj.get(t)?.pasteAs({providerId:l.LR.id})}})},878:(e,t,i)=>{"use strict";i.d(t,{Rj:()=>B,lr:()=>M,qs:()=>P});var n,o=i(2150),s=i(85053),r=i(9659),a=i(67792),l=i(65312),c=i(59200),d=i(5091),u=i(33911),h=i(25160),g=i(23264),p=i(169),f=i(35524),m=i(3176),_=i(8690),v=i(35350),b=i(12847),y=i(49309),w=i(92728),C=i(64339),S=i(31903),k=i(61307),x=i(41337),E=i(28753),L=i(18904),T=i(87778),I=i(44838),D=i(3874),R=i(95566),N=i(14396),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=function(e,t){return function(i,n){t(i,n,e)}};const P="editor.changePasteType",M=new L.N1("pasteWidgetVisible",!1,(0,x.kg)("pasteWidgetVisible","Whether the paste widget is showing")),F="application/vnd.code.copyMetadata";let B=class extends d.jG{static{n=this}static{this.ID="editor.contrib.copyPasteActionController"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register((0,o.ko)(l,"copy",(e=>this.handleCopy(e)))),this._register((0,o.ko)(l,"cut",(e=>this.handleCopy(e)))),this._register((0,o.ko)(l,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new S.I("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(R.G,"pasteIntoEditor",e,M,{id:P,label:(0,x.kg)("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},(0,o.a)().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(!this._editor.hasTextFocus())return;if(this._clipboardService.clearInternalState?.(),!e.clipboardData||!this.isPasteAsEnabled())return;const t=this._editor.getModel(),i=this._editor.getSelections();if(!t||!i?.length)return;const o=this._editor.getOption(37);let a=i;const l=1===i.length&&i[0].isEmpty();if(l){if(!o)return;a=[new _.Q(a[0].startLineNumber,1,a[0].startLineNumber,1+t.getLineLength(a[0].startLineNumber))]}const c=this._editor._getViewModel()?.getPlainTextToCopy(i,o,h.uF),d=Array.isArray(c)?c:null,u={multicursorText:d,pasteOnNewLine:l,mode:null},p=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e=>!!e.prepareDocumentPaste));if(!p.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});const m=(0,f.q)(e.clipboardData),v=p.flatMap((e=>e.copyMimeTypes??[])),b=(0,g.b)();this.setCopyMetadata(e.clipboardData,{id:b,providerCopyMimeTypes:v,defaultPastePayload:u});const y=(0,r.SS)((async e=>{const i=(0,s.Yc)(await Promise.all(p.map((async i=>{try{return await i.prepareDocumentPaste(t,a,m,e)}catch(e){return void console.error(e)}}))));i.reverse();for(const e of i)for(const[t,i]of e)m.replace(t,i);return m}));n._currentCopyOperation?.dataTransferPromise.cancel(),n._currentCopyOperation={handle:b,dataTransferPromise:y}}async handlePaste(e){if(!e.clipboardData||!this._editor.hasTextFocus())return;k.k.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;const t=this._editor.getModel(),i=this._editor.getSelections();if(!i?.length||!t)return;if(this._editor.getOption(92)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const n=this.fetchCopyMetadata(e),o=(0,f.l)(e.clipboardData);o.delete(F);const s=[...e.clipboardData.types,...n?.providerCopyMimeTypes??[],u.K.uriList],r=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e=>{const t=this._pasteAsActionContext?.preferred;return!(t&&e.providedPasteEditKinds&&!this.providerMatchesPreference(e,t))&&e.pasteMimeTypes?.some((e=>(0,l.Y)(e,s)))}));r.length?(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,r,i,o,n):this.doPasteInline(r,i,o,n,e)):this._pasteAsActionContext?.preferred&&this.showPasteAsNoEditMessage(i,this._pasteAsActionContext.preferred)}showPasteAsNoEditMessage(e,t){k.k.get(this._editor)?.showMessage((0,x.kg)("pasteAsError","No paste edits for '{0}' found",t instanceof c.k?t.value:t.providerId),e[0].getStartPosition())}doPasteInline(e,t,i,n,o){const s=this._editor;if(!s.hasModel())return;const l=new C.gI(s,3,void 0),c=(0,r.SS)((async s=>{const u=this._editor;if(!u.hasModel())return;const h=u.getModel(),g=new d.Cm,p=g.add(new a.Qi(s));g.add(l.token.onCancellationRequested((()=>p.cancel())));const f=p.token;try{if(await this.mergeInDataFromCopy(i,n,f),f.isCancellationRequested)return;const s=e.filter((e=>this.isSupportedPasteProvider(e,i)));if(!s.length||1===s.length&&s[0]instanceof y.LR)return this.applyDefaultPasteHandler(i,n,f,o);const a={triggerKind:v.FX.Automatic},l=await this.getPasteEdits(s,i,h,t,a,f);if(g.add(l),f.isCancellationRequested)return;if(1===l.edits.length&&l.edits[0].provider instanceof y.LR)return this.applyDefaultPasteHandler(i,n,f,o);if(l.edits.length){const e="afterPaste"===u.getOption(85).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:l.edits},e,((e,i)=>new Promise(((n,o)=>{(async()=>{try{const s=e.provider.resolveDocumentPasteEdit?.(e,i),a=new r.Zv,l=s&&await this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,x.kg)("resolveProcess","Resolving paste edit. Click to cancel"),Promise.race([a.p,s]),{cancel:()=>(a.cancel(),o(new N.AL))},0);return l&&(e.additionalEdit=l.additionalEdit),n(e)}catch(e){return o(e)}})()}))),f)}await this.applyDefaultPasteHandler(i,n,f,o)}finally{g.dispose(),this._currentPasteOperation===c&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,x.kg)("pasteIntoEditorProgress","Running paste handlers. Click to cancel and do basic paste"),c,{cancel:async()=>{try{if(c.cancel(),l.token.isCancellationRequested)return;await this.applyDefaultPasteHandler(i,n,l.token,o)}finally{l.dispose()}}}).then((()=>{l.dispose()})),this._currentPasteOperation=c}showPasteAsPick(e,t,i,n,o){const s=(0,r.SS)((async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),u=new d.Cm,h=u.add(new C.gI(a,3,void 0,r));try{if(await this.mergeInDataFromCopy(n,o,h.token),h.token.isCancellationRequested)return;let s=t.filter((t=>this.isSupportedPasteProvider(t,n,e)));e&&(s=s.filter((t=>this.providerMatchesPreference(t,e))));const r={triggerKind:v.FX.PasteAs,only:e&&e instanceof c.k?e:void 0};let a,d=u.add(await this.getPasteEdits(s,n,l,i,r,h.token));if(h.token.isCancellationRequested)return;if(e&&(d={edits:d.edits.filter((t=>e instanceof c.k?e.contains(t.kind):e.providerId===t.provider.id)),dispose:d.dispose}),!d.edits.length)return void(r.only&&this.showPasteAsNoEditMessage(i,r.only));if(e)a=d.edits.at(0);else{const e=await this._quickInputService.pick(d.edits.map((e=>({label:e.title,description:e.kind?.value,edit:e}))),{placeHolder:(0,x.kg)("pasteAsPickerPlaceholder","Select Paste Action")});a=e?.edit}if(!a)return;const g=(0,w.v)(l.uri,i,a);await this._bulkEditService.apply(g,{editor:this._editor})}finally{u.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:(0,x.kg)("pasteAsProgress","Running paste handlers")},(()=>s))}setCopyMetadata(e,t){e.setData(F,JSON.stringify(t))}fetchCopyMetadata(e){if(!e.clipboardData)return;const t=e.clipboardData.getData(F);if(t)try{return JSON.parse(t)}catch{return}const[i,n]=p.Mz.getTextData(e.clipboardData);return n?{defaultPastePayload:{mode:n.mode,multicursorText:n.multicursorText??null,pasteOnNewLine:!!n.isFromEmptySelection}}:void 0}async mergeInDataFromCopy(e,t,i){if(t?.id&&n._currentCopyOperation?.handle===t.id){const t=await n._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(u.K.uriList)){const t=await this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(u.K.uriList,(0,l.gf)(l.jt.create(t)))}}async getPasteEdits(e,t,i,n,o,a){const l=new d.Cm,c=await(0,r.PK)(Promise.all(e.map((async e=>{try{const s=await(e.provideDocumentPasteEdits?.(i,n,t,o,a));return s&&l.add(s),s?.edits?.map((t=>({...t,provider:e})))}catch(e){return void((0,N.MB)(e)||console.error(e))}}))),a),u=(0,s.Yc)(c??[]).flat().filter((e=>!o.only||o.only.contains(e.kind)));return{edits:(0,w.H)(u),dispose:()=>l.dispose()}}async applyDefaultPasteHandler(e,t,i,n){const o=e.get(u.K.text)??e.get("text"),s=await(o?.asString())??"";if(i.isCancellationRequested)return;const r={clipboardEvent:n,text:s,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._editor.trigger("keyboard","paste",r)}isSupportedPasteProvider(e,t,i){return!!e.pasteMimeTypes?.some((e=>t.matches(e)))&&(!i||this.providerMatchesPreference(e,i))}providerMatchesPreference(e,t){return t instanceof c.k?!e.providedPasteEditKinds||e.providedPasteEditKinds.some((e=>t.contains(e))):e.id===t.providerId}};B=n=A([O(1,T._Y),O(2,m.nu),O(3,E.h),O(4,b.ILanguageFeaturesService),O(5,D.GK),O(6,I.G5)],B)},49309:(e,t,i)=>{"use strict";i.d(t,{L9:()=>k,LR:()=>v,ZR:()=>S});var n=i(85053),o=i(65312),s=i(59200),r=i(5091),a=i(33911),l=i(6657),c=i(84366),d=i(29133),u=i(35350),h=i(12847),g=i(41337),p=i(81714),f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};class _{async provideDocumentPasteEdits(e,t,i,n,o){const s=await this.getEdit(i,o);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,n){const o=await this.getEdit(i,n);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}}class v extends _{constructor(){super(...arguments),this.kind=v.kind,this.dropMimeTypes=[a.K.text],this.pasteMimeTypes=[a.K.text]}static{this.id="text"}static{this.kind=new s.k("text.plain")}async getEdit(e,t){const i=e.get(a.K.text);if(!i)return;if(e.has(a.K.uriList))return;const n=await i.asString();return{handledMimeType:a.K.text,title:(0,g.kg)("text.label","Insert Plain Text"),insertText:n,kind:this.kind}}}class b extends _{constructor(){super(...arguments),this.kind=new s.k("uri.absolute"),this.dropMimeTypes=[a.K.uriList],this.pasteMimeTypes=[a.K.uriList]}async getEdit(e,t){const i=await C(e);if(!i.length||t.isCancellationRequested)return;let n=0;const o=i.map((({uri:e,originalText:t})=>e.scheme===l.ny.file?e.fsPath:(n++,t))).join(" ");let s;return s=n>0?i.length>1?(0,g.kg)("defaultDropProvider.uriList.uris","Insert Uris"):(0,g.kg)("defaultDropProvider.uriList.uri","Insert Uri"):i.length>1?(0,g.kg)("defaultDropProvider.uriList.paths","Insert Paths"):(0,g.kg)("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:a.K.uriList,insertText:o,title:s,kind:this.kind}}}let y=class extends _{constructor(e){super(),this._workspaceContextService=e,this.kind=new s.k("uri.relative"),this.dropMimeTypes=[a.K.uriList],this.pasteMimeTypes=[a.K.uriList]}async getEdit(e,t){const i=await C(e);if(!i.length||t.isCancellationRequested)return;const o=(0,n.Yc)(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?(0,c.iZ)(t.uri,e):void 0})));return o.length?{handledMimeType:a.K.uriList,insertText:o.join(" "),title:i.length>1?(0,g.kg)("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):(0,g.kg)("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}:void 0}};y=f([m(0,p.VR)],y);class w{constructor(){this.kind=new s.k("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:a.K.text}]}async provideDocumentPasteEdits(e,t,i,n,o){if(n.triggerKind!==u.FX.PasteAs&&!n.only?.contains(this.kind))return;const s=i.get("text/html"),r=await(s?.asString());return r&&!o.isCancellationRequested?{dispose(){},edits:[{insertText:r,yieldTo:this._yieldTo,title:(0,g.kg)("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}:void 0}}async function C(e){const t=e.get(a.K.uriList);if(!t)return[];const i=await t.asString(),n=[];for(const e of o.jt.parse(i))try{n.push({uri:d.r.parse(e),originalText:e})}catch{}return n}let S=class extends r.jG{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new v)),this._register(e.documentDropEditProvider.register("*",new b)),this._register(e.documentDropEditProvider.register("*",new y(t)))}};S=f([m(0,h.ILanguageFeaturesService),m(1,p.VR)],S);let k=class extends r.jG{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new v)),this._register(e.documentPasteEditProvider.register("*",new b)),this._register(e.documentPasteEditProvider.register("*",new y(t))),this._register(e.documentPasteEditProvider.register("*",new w))}};k=f([m(0,h.ILanguageFeaturesService),m(1,p.VR)],k)},8454:(e,t,i)=>{"use strict";var n,o=i(16259),s=i(97744),r=i(36285),a=i(49309),l=i(41337),c=i(27503),d=i(16374),u=i(85053),h=i(9659),g=i(65312),p=i(59200),f=i(5091),m=i(35524),_=i(8690),v=i(12847),b=i(61210),y=i(95231),w=i(64339),C=i(31903),S=i(32828),k=i(18904),x=i(47747),E=i(87778),L=i(92728),T=i(95566),I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},D=function(e,t){return function(i,n){t(i,n,e)}};const R="editor.experimental.dropIntoEditor.defaultProvider",N="editor.changeDropType",A=new k.N1("dropWidgetVisible",!1,(0,l.kg)("dropWidgetVisible","Whether the drop widget is showing"));let O=class extends f.jG{static{n=this}static{this.ID="editor.contrib.dropIntoEditorController"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,o){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=x.PD.getInstance(),this._dropProgressManager=this._register(t.createInstance(C.I,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(T.G,"dropIntoEditor",e,A,{id:N,label:(0,l.kg)("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){if(!i.dataTransfer||!e.hasModel())return;this._currentOperation?.cancel(),e.focus(),e.setPosition(t);const n=(0,h.SS)((async o=>{const s=new f.Cm,r=s.add(new w.gI(e,1,void 0,o));try{const n=await this.extractDataTransferData(i);if(0===n.size||r.token.isCancellationRequested)return;const a=e.getModel();if(!a)return;const l=this._languageFeaturesService.documentDropEditProvider.ordered(a).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>n.matches(e))))),c=s.add(await this.getDropEdits(l,a,t,n,r));if(r.token.isCancellationRequested)return;if(c.edits.length){const i=this.getInitialActiveEditIndex(a,c.edits),n="afterDrop"===e.getOption(36).showDropSelector;await this._postDropWidgetManager.applyEditAndShowIfNeeded([_.Q.fromPositions(t)],{activeEditIndex:i,allEdits:c.edits},n,(async e=>e),o)}}finally{s.dispose(),this._currentOperation===n&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,(0,l.kg)("dropIntoEditorProgress","Running drop handlers. Click to cancel"),n,{cancel:()=>n.cancel()}),this._currentOperation=n}async getDropEdits(e,t,i,n,o){const s=new f.Cm,r=await(0,h.PK)(Promise.all(e.map((async e=>{try{const r=await e.provideDocumentDropEdits(t,i,n,o.token);return r&&s.add(r),r?.edits.map((t=>({...t,providerId:e.id})))}catch(e){console.error(e)}}))),o.token),a=(0,u.Yc)(r??[]).flat();return{edits:(0,L.H)(a),dispose:()=>s.dispose()}}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(R,{resource:e.uri});for(const[e,n]of Object.entries(i)){const i=new p.k(n),o=t.findIndex((t=>i.value===t.providerId&&t.handledMimeType&&(0,g.Y)(e,[t.handledMimeType])));if(o>=0)return o}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new g.Vq;const t=(0,m.l)(e.dataTransfer);if(this.treeItemsTransfer.hasData(b.DraggedTreeItemsIdentifier.prototype)){const e=this.treeItemsTransfer.getData(b.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(e))for(const i of e){const e=await this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}};O=n=I([D(1,E._Y),D(2,S.pG),D(3,v.ILanguageFeaturesService),D(4,y.ITreeViewsDnDService)],O),(0,o.HW)(O.ID,O,2),(0,r.x)(a.ZR),(0,o.E_)(new class extends o.DX{constructor(){super({id:N,precondition:A,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){O.get(t)?.changeDropType()}}),(0,o.E_)(new class extends o.DX{constructor(){super({id:"editor.hideDropWidget",precondition:A,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t,i){O.get(t)?.clearWidgets()}}),d.O.as(c.Fd.Configuration).registerConfiguration({...s.JJ,properties:{[R]:{type:"object",scope:5,description:l.kg("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}})},92728:(e,t,i)=>{"use strict";i.d(t,{H:()=>r,v:()=>s});var n=i(3176),o=i(18760);function s(e,t,i){return("string"===typeof i.insertText?""===i.insertText:""===i.insertText.snippet)?{edits:i.additionalEdit?.edits??[]}:{edits:[...t.map((t=>new n.cw(e,{range:t,text:"string"===typeof i.insertText?o.fr.escape(i.insertText)+"$0":i.insertText.snippet,insertAsSnippet:!0}))),...i.additionalEdit?.edits??[]]}}function r(e){function t(e,t){return"mimeType"in e?e.mimeType===t.handledMimeType:!!t.kind&&e.kind.contains(t.kind)}const i=new Map;for(const n of e)for(const o of n.yieldTo??[])for(const s of e)if(s!==n&&t(o,s)){let e=i.get(n);e||(e=[],i.set(n,e)),e.push(s)}if(!i.size)return Array.from(e);const n=new Set,o=[];function s(e){if(!e.length)return[];const t=e[0];if(o.includes(t))return console.warn("Yield to cycle detected",t),e;if(n.has(t))return s(e.slice(1));let r=[];const a=i.get(t);return a&&(o.push(t),r=s(a),o.pop()),n.add(t),[...r,t,...s(e.slice(1))]}return s(Array.from(e))}},95566:(e,t,i)=>{"use strict";i.d(t,{G:()=>C});var n,o=i(2150),s=i(42312),r=i(55664),a=i(28438),l=i(14396),c=i(40231),d=i(5091),u=i(3176),h=i(92728),g=i(41337),p=i(18904),f=i(46403),m=i(87778),_=i(13046),v=i(95062),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};let w=class extends d.jG{static{n=this}static{this.baseId="editor.widget.postEditWidget"}constructor(e,t,i,n,o,s,r,a,l,u){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=o,this.edits=s,this.onSelectNewEdit=r,this._contextMenuService=a,this._keybindingService=u,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(l),this.visibleContext.set(!0),this._register((0,d.s)((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,d.s)((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{o.containsPosition(e.position)||this.dispose()}))),this._register(c.Jh.runAndSubscribe(u.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){const e=this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=o.$(".post-edit-widget"),this.button=this._register(new s.$(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(o.ko(this.domNode,o.Bx.CLICK,(()=>this.showSelector())))}getId(){return n.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=o.BK(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>(0,r.ih)({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};w=n=b([y(7,f.Z),y(8,p.fN),y(9,_.b)],w);let C=class extends d.jG{constructor(e,t,i,n,o,s,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=o,this._bulkEditService=s,this._notificationService=r,this._currentWidget=this._register(new d.HE),this._register(c.Jh.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}async applyEditAndShowIfNeeded(e,t,i,n,o){const s=this._editor.getModel();if(!s||!e.length)return;const r=t.allEdits.at(t.activeEditIndex);if(!r)return;const c=async s=>{const r=this._editor.getModel();r&&(await r.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:s,allEdits:t.allEdits},i,n,o))},d=(n,o)=>{(0,l.MB)(n)||(this._notificationService.error(o),i&&this.show(e[0],t,c))};let u;try{u=await n(r,o)}catch(e){return d(e,(0,g.kg)("resolveError","Error resolving edit '{0}':\n{1}",r.title,(0,a.r)(e)))}if(o.isCancellationRequested)return;const p=(0,h.v)(s.uri,e,u),f=e[0],m=s.deltaDecorations([],[{range:f,options:{description:"paste-line-suffix",stickiness:0}}]);let _,v;this._editor.focus();try{_=await this._bulkEditService.apply(p,{editor:this._editor,token:o}),v=s.getDecorationRange(m[0])}catch(e){return d(e,(0,g.kg)("applyError","Error applying edit '{0}':\n{1}",r.title,(0,a.r)(e)))}finally{s.deltaDecorations(m,[])}o.isCancellationRequested||i&&_.isApplied&&t.allEdits.length>1&&this.show(v??f,t,c)}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(w,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};C=b([y(4,m._Y),y(5,u.nu),y(6,v.Ot)],C)},64339:(e,t,i)=>{"use strict";i.d(t,{$t:()=>m,gI:()=>_,ER:()=>v});var n=i(20601),o=i(8690),s=i(67792),r=i(5091),a=i(16259),l=i(18904),c=i(67806),d=i(87778),u=i(59857),h=i(41337);const g=(0,d.u1)("IEditorCancelService"),p=new l.N1("cancellableOperation",!1,(0,h.kg)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,u.v)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>{const t=p.bindTo(e.get(l.fN)),i=new c.w;return{key:t,tokens:i}})),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class f extends s.Qi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.E_)(new class extends a.DX{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class m{constructor(e,t){if(this.flags=t,0!==(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.GP("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!==(4&this.flags)?this.position=e.getPosition():this.position=null,0!==(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!==(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof m))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&(this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&(!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))))}validate(e){return this._equals(new m(e,this.flags))}}class _ extends f{constructor(e,t,i,n){super(e,n),this._listener=new r.Cm,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&o.Q.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&o.Q.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends s.Qi{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}},28369:(e,t,i)=>{"use strict";i.d(t,{z0:()=>ot});var n=i(9659),o=i(5091),s=i(20601),r=i(16259),a=i(52764),l=i(57479),c=i(9322),d=i(43654),u=i(50793),h=i(36788),g=i(8690),p=i(98581),f=i(13569),m=i(35037),_=i(66344),v=i(15911);class b{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new g.Q(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=b._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){n=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height,s=i/t,r=Math.max(2,Math.ceil(3/s));let a=e[0].range.startLineNumber,l=e[0].range.endLineNumber;for(let t=1,i=e.length;t=i.startLineNumber?i.endLineNumber>l&&(l=i.endLineNumber):(o.push({range:new g.Q(a,1,l,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),a=i.startLineNumber,l=i.endLineNumber)}o.push({range:new g.Q(a,1,l,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let t=0,i=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,b._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){const e=[];for(let t=0;tg.Q.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function C(e,t,i){const n=-1!==e[0].indexOf(i)&&-1!==t.indexOf(i);return n&&e[0].split(i).length===t.split(i).length}function S(e,t,i){const n=t.split(i),o=e[0].split(i);let s="";return n.forEach(((e,t)=>{s+=w([o[t]],e)+i})),s.slice(0,-1)}class k{constructor(e){this.staticValue=e,this.kind=0}}class x{constructor(e){this.pieces=e,this.kind=1}}class E{static fromStaticValue(e){return new E([L.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new k(e[0].staticValue):this._state=new x(e):this._state=new k("")}buildReplaceString(e,t){if(0===this._state.kind)return t?w(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t0){const e=[],t=n.caseOps.length;let i=0;for(let s=0,r=o.length;s=t){e.push(o.slice(s));break}switch(n.caseOps[i]){case"U":e.push(o[s].toUpperCase());break;case"u":e.push(o[s].toUpperCase()),i++;break;case"L":e.push(o[s].toLowerCase());break;case"l":e.push(o[s].toLowerCase()),i++;break;default:e.push(o[s])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";while(e>0){if(e=o)break;const s=e.charCodeAt(n);if(36===s){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===s||38===s){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=s&&s<=57){let r=s-48;if(n+1=o)break;const s=e.charCodeAt(n);switch(s){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(s));break}}}return i.finalize()}var D=i(18904);const R=new D.N1("findWidgetVisible",!1),N=(R.toNegated(),new D.N1("findInputFocussed",!1)),A=new D.N1("replaceInputFocussed",!1),O={primary:545,mac:{primary:2593}},P={primary:565,mac:{primary:2613}},M={primary:560,mac:{primary:2608}},F={primary:554,mac:{primary:2602}},B={primary:558,mac:{primary:2606}},W={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},H=19999,V=240;class j{constructor(e,t){this._toDispose=new o.Cm,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new n.pc,this._decorations=new b(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new n.uC((()=>{if(this._editor.hasModel())return this.research(!1)}),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,o.AS)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){if(!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)){const t=this._editor.getModel();t.isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),V)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;"undefined"!==typeof t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new g.Q(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,H);this._decorations.set(n,i);const o=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(o);if(0===s&&n.length>0){const e=(0,d.hw)(n.map((e=>e.range)),(e=>g.Q.compareRangesUsingStarts(e,o)>=0));s=e>0?e-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new h.y(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new h.y(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()j._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=H?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new f.lt(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null),t=e.parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let e="mu";i.ignoreCase&&(e+="i"),i.global&&(e+="g"),i=new RegExp(i.source,e)}const n=this._editor.getModel(),o=n.getValue(1),s=n.getFullModelRange(),r=this._getReplacePattern();let a;const l=this._state.preserveCase;a=r.hasReplacementPatterns||l?o.replace(i,(function(){return r.buildReplaceString(arguments,l)})):o.replace(i,r.buildReplaceString(null,l));const c=new u.ui(s,a,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;ee.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824);let i=t.map((e=>new p.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const n=this._editor.getSelection();for(let e=0,t=i.length;ethis._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o={inputActiveOptionBorder:(0,_.GuP)(_.uNK),inputActiveOptionForeground:(0,_.GuP)(_.$$0),inputActiveOptionBackground:(0,_.GuP)(_.c1f)},s=this._register((0,q.bW)());this.caseSensitive=this._register(new U.bc({appendTitle:this._keybindingLabelFor(W.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:s,...o})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new U.nV({appendTitle:this._keybindingLabelFor(W.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:s,...o})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new U.Ix({appendTitle:this._keybindingLabelFor(W.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:s,...o})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(z.ko(this._domNode,z.Bx.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(z.ko(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return K.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}var G=i(40231);function Q(e,t){return 1===e||2!==e&&t}class Y extends o.jG{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Q(this._isRegexOverride,this._isRegex)}get wholeWord(){return Q(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Q(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Q(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new G.vl),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),"undefined"!==typeof i&&(g.Q.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){const n={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;const s=this.isRegex,r=this.wholeWord,a=this.matchCase,l=this.preserveCase;"undefined"!==typeof e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,n.searchString=!0,o=!0),"undefined"!==typeof e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,n.replaceString=!0,o=!0),"undefined"!==typeof e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,n.isRevealed=!0,o=!0),"undefined"!==typeof e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,n.isReplaceRevealed=!0,o=!0),"undefined"!==typeof e.isRegex&&(this._isRegex=e.isRegex),"undefined"!==typeof e.wholeWord&&(this._wholeWord=e.wholeWord),"undefined"!==typeof e.matchCase&&(this._matchCase=e.matchCase),"undefined"!==typeof e.preserveCase&&(this._preserveCase=e.preserveCase),"undefined"!==typeof e.searchScope&&(e.searchScope?.every((e=>this._searchScope?.some((t=>!g.Q.equalsRange(t,e)))))||(this._searchScope=e.searchScope,n.searchScope=!0,o=!0)),"undefined"!==typeof e.loop&&this._loop!==e.loop&&(this._loop=e.loop,n.loop=!0,o=!0),"undefined"!==typeof e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,n.isSearching=!0,o=!0),"undefined"!==typeof e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,n.filters=!0,o=!0),this._isRegexOverride="undefined"!==typeof e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride="undefined"!==typeof e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride="undefined"!==typeof e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride="undefined"!==typeof e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(o=!0,n.isRegex=!0),r!==this.wholeWord&&(o=!0,n.wholeWord=!0),a!==this.matchCase&&(o=!0,n.matchCase=!0),l!==this.preserveCase&&(o=!0,n.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(n)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=H}}var Z=i(19950),X=i(83092),J=i(53062),ee=i(25923),te=i(14396),ie=i(25160),ne=i(41337),oe=i(73075);function se(e){return"Up"===e.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()&&"Down"===e.lookupKeybinding("history.showNext")?.getElectronAccelerator()}var re=i(48401),ae=i(23740),le=i(1474),ce=i(50322),de=i(13153);const ue=(0,re.pU)("find-collapsed",ee.W.chevronRight,ne.kg("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),he=(0,re.pU)("find-expanded",ee.W.chevronDown,ne.kg("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),ge=(0,re.pU)("find-selection",ee.W.selection,ne.kg("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),pe=(0,re.pU)("find-replace",ee.W.replace,ne.kg("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),fe=(0,re.pU)("find-replace-all",ee.W.replaceAll,ne.kg("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),me=(0,re.pU)("find-previous-match",ee.W.arrowUp,ne.kg("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),_e=(0,re.pU)("find-next-match",ee.W.arrowDown,ne.kg("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),ve=ne.kg("label.findDialog","Find / Replace"),be=ne.kg("label.find","Find"),ye=ne.kg("placeholder.find","Find"),we=ne.kg("label.previousMatchButton","Previous Match"),Ce=ne.kg("label.nextMatchButton","Next Match"),Se=ne.kg("label.toggleSelectionFind","Find in Selection"),ke=ne.kg("label.closeButton","Close"),xe=ne.kg("label.replace","Replace"),Ee=ne.kg("placeholder.replace","Replace"),Le=ne.kg("label.replaceButton","Replace"),Te=ne.kg("label.replaceAllButton","Replace All"),Ie=ne.kg("label.toggleReplaceButton","Toggle Replace"),De=ne.kg("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",H),Re=ne.kg("label.matchesLocation","{0} of {1}"),Ne=ne.kg("label.noResults","No results"),Ae=419,Oe=275,Pe=Oe-54;let Me=69;const Fe=33,Be="ctrlEnterReplaceAll.windows.donotask",We=ie.zx?256:2048;class He{constructor(e){this.afterLineNumber=e,this.heightInPx=Fe,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function Ve(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function je(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(146)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(41)){const e=this._codeEditor.getOption(41).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new He(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((async()=>{if(this._isVisible){const e=await this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}}))),this._findInputFocused=N.bindTo(a),this._findFocusTracker=this._register(z.w5(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=A.bindTo(a),this._replaceFocusTracker=this._register(z.w5(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new He(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return ze.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(92)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=z.Tr(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,te.dz)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Me+"px",this._state.matchesCount>=H?this._matchesCount.title=De:this._matchesCount.title="",this._matchesCount.firstChild?.remove(),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=H&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=s.GP(Re,i,t)}else e=Ne;this._matchesCount.appendChild(document.createTextNode(e)),(0,Z.xE)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Me=Math.max(Me,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===Ne)return""===i?ne.kg("ariaSearchNoResultEmpty","{0} found",e):ne.kg("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=ne.kg("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();if(o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1){const e=o.getLineContent(t.startLineNumber);return`${e}, ${n}`}return n}return ne.kg("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=z.BK(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),r=o?o.top:0;if(this._viewZone&&re.startLineNumber&&(t=!1);const i=z.cL(this._domNode).left;s>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition()),r=n.left+(o?o.left:0);r>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;if(!t)return void this._removeViewZone();if(!this._isVisible)return;const i=this._viewZone;void 0===this._viewZoneId&&i&&this._codeEditor.changeViewZones((t=>{i.heightInPx=this._getHeight(),this._viewZoneId=t.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;if(!t)return;void 0===this._viewZone&&(this._viewZone=new He(0));const i=this._viewZone;this._codeEditor.changeViewZones((t=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===i.heightInPx)return;const o=n-i.heightInPx;return i.heightInPx=n,t.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(84).top,n<=0)return;i.heightInPx=n,this._viewZoneId=t.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo(),t=e.contentWidth;if(t<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let o=!1,s=!1,r=!1;if(this._resized){const e=z.Tr(this._domNode);if(e>Ae)return this._domNode.style.maxWidth=i-28-n-15+"px",void(this._replaceInput.width=z.Tr(this._findInput.domNode))}if(Ae+28+n>=i&&(s=!0),Ae+28+n-Me>=i&&(r=!0),Ae+28+n-Me>=i+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",r),this._domNode.classList.toggle("reduced-find-widget",s),r||o||(this._domNode.style.maxWidth=i-28-n-15+"px"),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:r,reducedFindWidget:s}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=z.Tr(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||g.Q.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|We)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Ve(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?je(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|We)?(this._keybindingService.dispatchEvent(e,e.target)||(ie.uF&&ie.ib&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(ne.kg("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Be,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Ve(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?je(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const e=!0,t=!0;this._findInput=this._register(new oe.pG(null,this._contextViewProvider,{width:Pe,label:be,placeholder:ye,appendCaseSensitiveLabel:this._keybindingLabelFor(W.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(W.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(W.ToggleRegexCommand),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>se(this._keybindingService),inputBoxStyles:de.ho,toggleStyles:de.mk},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),ie.j9&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const i=this._register((0,q.bW)());this._prevBtn=this._register(new Ue({label:we+this._keybindingLabelFor(W.PreviousMatchFindAction),icon:me,hoverDelegate:i,onTrigger:()=>{(0,ce.eU)(this._codeEditor.getAction(W.PreviousMatchFindAction)).run().then(void 0,te.dz)}},this._hoverService)),this._nextBtn=this._register(new Ue({label:Ce+this._keybindingLabelFor(W.NextMatchFindAction),icon:_e,hoverDelegate:i,onTrigger:()=>{(0,ce.eU)(this._codeEditor.getAction(W.NextMatchFindAction)).run().then(void 0,te.dz)}},this._hoverService));const n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);const o=document.createElement("div");o.className="find-actions",n.appendChild(o),o.appendChild(this._matchesCount),o.appendChild(this._prevBtn.domNode),o.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new X.l({icon:ge,title:Se+this._keybindingLabelFor(W.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:i,inputActiveOptionBackground:(0,_.GuP)(_.c1f),inputActiveOptionBorder:(0,_.GuP)(_.uNK),inputActiveOptionForeground:(0,_.GuP)(_.$$0)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),o.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Ue({label:ke+this._keybindingLabelFor(W.CloseFindWidgetCommand),icon:re.$_,hoverDelegate:i,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new oe._Q(null,void 0,{label:xe,placeholder:Ee,appendPreserveCaseLabel:this._keybindingLabelFor(W.TogglePreserveCaseCommand),history:[],flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showHistoryHint:()=>se(this._keybindingService),inputBoxStyles:de.ho,toggleStyles:de.mk},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())})));const s=this._register((0,q.bW)());this._replaceBtn=this._register(new Ue({label:Le+this._keybindingLabelFor(W.ReplaceOneAction),icon:pe,hoverDelegate:s,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new Ue({label:Te+this._keybindingLabelFor(W.ReplaceAllAction),icon:fe,hoverDelegate:s,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const r=document.createElement("div");r.className="replace-part",r.appendChild(this._replaceInput.domNode);const a=document.createElement("div");a.className="replace-actions",r.appendChild(a),a.appendChild(this._replaceBtn.domNode),a.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Ue({label:Ie,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=z.Tr(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=ve,this._domNode.role="dialog",this._domNode.style.width=`${Ae}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(r),this._resizeSash=this._register(new J.m(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let l=Ae;this._register(this._resizeSash.onDidStart((()=>{l=z.Tr(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=l+e.startX-e.currentX;if(ti||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=z.Tr(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=z.Tr(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown?.(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...ae.L.asClassNameArray(ue)),this._domNode.classList.add(...ae.L.asClassNameArray(he))):(this._domNode.classList.remove(...ae.L.asClassNameArray(he)),this._domNode.classList.add(...ae.L.asClassNameArray(ue)))}}(0,v.zy)(((e,t)=>{const i=e.getColor(_.ECk);i&&t.addRule(`.monaco-editor .findMatch { border: 1px ${(0,le.Bb)(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`);const n=e.getColor(_.S5J);n&&t.addRule(`.monaco-editor .findScope { border: 1px ${(0,le.Bb)(e.type)?"dashed":"solid"} ${n}; }`);const o=e.getColor(_.b1q);o&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${o}; }`);const s=e.getColor(_.f3U);s&&t.addRule(`.monaco-editor .findMatchInline { color: ${s}; }`);const r=e.getColor(_.p8Y);r&&t.addRule(`.monaco-editor .currentFindMatchInline { color: ${r}; }`)}));var $e,qe=i(6330),Ke=i(28753),Ge=i(46403),Qe=i(13046),Ye=i(95062),Ze=i(3874),Xe=i(94216),Je=i(41187),et=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},tt=function(e,t){return function(i,n){t(i,n,e)}};const it=524288;function nt(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!N.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.bm(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const i={...t,isRevealed:!0};if("single"===e.seedSearchStringFromSelection){const t=nt(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=s.bm(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=nt(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new j(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._editor.getModel()?.isTooLargeForHeapOperation()?(this._notificationService.warn(ne.kg("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0))}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};ot=$e=et([tt(1,D.fN),tt(2,Xe.CS),tt(3,Ke.h),tt(4,Ye.Ot),tt(5,Je.TN)],ot);let st=class extends ot{constructor(e,t,i,n,o,s,r,a,l){super(e,i,r,a,s,l),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":{const e=!!i&&i.startLineNumber!==i.endLineNumber;n=e;break}default:break}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new ze(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new K(this._editor,this._state,this._keybindingService))}};st=et([tt(1,Ge.l),tt(2,D.fN),tt(3,Qe.b),tt(4,v.Gy),tt(5,Ye.Ot),tt(6,Xe.CS),tt(7,Ke.h),tt(8,Je.TN)],st);const rt=(0,r.gW)(new r.PF({id:W.StartFindAction,label:ne.kg("startFindAction","Find"),alias:"Find",precondition:D.M$.or(l.R.focus,D.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:qe.D8.MenubarEditMenu,group:"3_find",title:ne.kg({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));rt.addImplementation(0,((e,t,i)=>{const n=ot.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})}));const at={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class lt extends r.ks{constructor(){super({id:W.StartFindWithArgs,label:ne.kg("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:at})}async run(e,t,i){const n=ot.get(t);if(n){const e=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:i?.findInSelection||!1,loop:t.getOption(41).loop},e),n.setGlobalBufferTerm(n.getState().searchString)}}}class ct extends r.ks{constructor(){super({id:W.StartFindWithSelection,label:ne.kg("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=ot.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}class dt extends r.ks{async run(e,t){const i=ot.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===i.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class ut extends dt{constructor(){super({id:W.NextMatchFindAction,label:ne.kg("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.R.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:D.M$.and(l.R.focus,N),primary:3,weight:100}]})}_run(e){const t=e.moveToNextMatch();return!!t&&(e.editor.pushUndoStop(),!0)}}class ht extends dt{constructor(){super({id:W.PreviousMatchFindAction,label:ne.kg("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.R.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:D.M$.and(l.R.focus,N),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class gt extends r.ks{constructor(){super({id:W.GoToMatchFindAction,label:ne.kg("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:R}),this._highlightDecorations=[]}run(e,t,i){const n=ot.get(t);if(!n)return;const s=n.getState().matchesCount;if(s<1){const t=e.get(Ye.Ot);return void t.notify({severity:Ye.AI.Warning,message:ne.kg("findMatchAction.noResults","No matches. Try searching for something else.")})}const r=e.get(Ze.GK),a=new o.Cm,l=a.add(r.createInputBox());l.placeholder=ne.kg("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",s);const c=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},d=e=>{const i=c(e);if("number"===typeof i){l.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else l.validationMessage=ne.kg("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};a.add(l.onDidChangeValue((e=>{d(e)}))),a.add(l.onDidAccept((()=>{const e=c(l.value);"number"===typeof e?(n.goToMatch(e),l.hide()):l.validationMessage=ne.kg("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)}))),a.add(l.onDidHide((()=>{this.clearDecorations(t),a.dispose()}))),l.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,v.Yf)(a.vp),position:c.A5.Full}}}])}))}}class pt extends r.ks{async run(e,t){const i=ot.get(t);if(!i)return;const n=nt(t,"single",!1);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class ft extends pt{constructor(){super({id:W.NextSelectionMatchFindAction,label:ne.kg("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.R.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class mt extends pt{constructor(){super({id:W.PreviousSelectionMatchFindAction,label:ne.kg("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.R.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const _t=(0,r.gW)(new r.PF({id:W.StartFindReplaceAction,label:ne.kg("startReplace","Replace"),alias:"Replace",precondition:D.M$.or(l.R.focus,D.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:qe.D8.MenubarEditMenu,group:"3_find",title:ne.kg({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));_t.addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(92))return!1;const n=ot.get(t);if(!n)return!1;const o=t.getSelection(),s=n.isFindInputFocused(),r=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&"never"!==t.getOption(41).seedSearchStringFromSelection&&!s,a=s||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(41).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})})),(0,r.HW)(ot.ID,st,0),(0,r.Fl)(lt),(0,r.Fl)(ct),(0,r.Fl)(ut),(0,r.Fl)(ht),(0,r.Fl)(gt),(0,r.Fl)(ft),(0,r.Fl)(mt);const vt=r.DX.bindToContribution(ot.get);(0,r.E_)(new vt({id:W.CloseFindWidgetCommand,precondition:R,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:D.M$.and(l.R.focus,D.M$.not("isComposing")),primary:9,secondary:[1033]}})),(0,r.E_)(new vt({id:W.ToggleCaseSensitiveCommand,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,r.E_)(new vt({id:W.ToggleWholeWordCommand,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,r.E_)(new vt({id:W.ToggleRegexCommand,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:M.primary,mac:M.mac,win:M.win,linux:M.linux}})),(0,r.E_)(new vt({id:W.ToggleSearchScopeCommand,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),(0,r.E_)(new vt({id:W.TogglePreserveCaseCommand,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:B.primary,mac:B.mac,win:B.win,linux:B.linux}})),(0,r.E_)(new vt({id:W.ReplaceOneAction,precondition:R,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:3094}})),(0,r.E_)(new vt({id:W.ReplaceOneAction,precondition:R,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:D.M$.and(l.R.focus,A),primary:3}})),(0,r.E_)(new vt({id:W.ReplaceAllAction,precondition:R,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:2563}})),(0,r.E_)(new vt({id:W.ReplaceAllAction,precondition:R,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:D.M$.and(l.R.focus,A),primary:void 0,mac:{primary:2051}}})),(0,r.E_)(new vt({id:W.SelectAllMatchesAction,precondition:R,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:515}}))},23358:(e,t,i)=>{"use strict";i.d(t,{WR:()=>V,BP:()=>j});var n=i(9659),o=i(67792),s=i(14396),r=i(91348),a=i(5091),l=i(20601),c=i(50322),d=i(71203),u=i(16259),h=i(57479),g=i(35350),p=i(50395),f=i(17662),m=i(43654),_=i(40231),v=i(8690),b=i(36627);class y{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new _.vl,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==(0,b.W)(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,o=Number.MAX_VALUE,s=-1;const r=this._foldingModel.regions;for(;i0}isHidden(e){return null!==C(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const o=e=>(n&&w(e,n)||(n=C(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,s=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function w(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}function C(e,t){const i=(0,m.hw)(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}var S,k=i(8568),x=i(41337),E=i(18904),L=i(45292),T=i(4989),I=i(13387),D=i(95062),R=i(85983),N=i(84240),A=i(12847),O=i(72786),P=i(29133),M=i(69361),F=i(32828),B=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},W=function(e,t){return function(i,n){t(i,n,e)}};const H=new E.N1("foldingEnabled",!1);let V=class extends a.jG{static{S=this}static{this.ID="editor.contrib.folding"}static get(e){return e.getContribution(S.ID)}static getFoldingRangeProviders(e,t){const i=e.foldingRangeProvider.ordered(t);return S._foldingRangeSelector?.(i,t)??i}constructor(e,t,i,n,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=s,this.localToDispose=this._register(new a.Cm),this.editor=e,this._foldingLimitReporter=new j(e);const r=this.editor.getOptions();this._isEnabled=r.get(43),this._useFoldingProviders="indentation"!==r.get(44),this._unfoldOnClickAfterEndOfLine=r.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=r.get(46),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new L.rv(e),this.foldingDecorationProvider.showFoldingControls=r.get(111),this.foldingDecorationProvider.showFoldingHighlights=r.get(45),this.foldingEnabled=H.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(47)&&this.onModelChanged(),e.hasChanged(111)||e.hasChanged(45)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(111),this.foldingDecorationProvider.showFoldingHighlights=e.get(45),this.triggerFoldingModelChanged()}e.hasChanged(44)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(44),this.onFoldingStrategyChanged()),e.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),e.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new f.pN(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new y(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new n.ve(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new n.uC((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new k.hW(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=S.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new I.M(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){this.hiddenRangeModel?.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new N.W,i=this.getRangeProvider(e.textModel),o=this.foldingRegionPromise=(0,n.SS)((e=>i.compute(e)));return o.then((i=>{if(i&&o===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(g.lO.Imports.value,!0);e&&(n=d.D.capture(this.editor),this._currentModelHasFoldedImports=e)}const o=this.editor.getSelections();e.update(i,U(o)),n?.restore(this.editor);const s=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=s)}return e}))})).then(void 0,(e=>((0,s.dz)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,s.dz)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft,o=t.offsetX-n;if(o<4)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()){const t=e.target.detail;if(!t.isAfterLines)break}return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}const s=t.getRegionAtLine(i);if(s&&s.startLineNumber===i){const o=s.isCollapsed;if(n||o){const n=e.event.altKey;let r=[];if(n){const e=e=>!e.containedBy(s)&&!s.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&r.push(e);0===r.length&&(r=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(s))e.isCollapsed===o&&r.push(e);!o&&i&&0!==r.length||r.push(s)}t.toggleCollapseState(r),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};V=S=B([W(1,E.fN),W(2,p.JZ),W(3,D.Ot),W(4,R.ILanguageFeatureDebounceService),W(5,A.ILanguageFeaturesService)],V);class j{constructor(e){this.editor=e,this._onDidChange=new _.vl,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class z extends u.ks{runEditorCommand(e,t,i){const n=e.get(p.JZ),o=V.get(t);if(!o)return;const s=o.getFoldingModel();return s?(this.reportTelemetry(e,t),s.then((e=>{if(e){this.invoke(o,e,t,i,n);const s=t.getSelection();s&&o.reveal(s.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function U(e){return e&&0!==e.length?{startsInside(t,i){for(const n of e){const e=n.startLineNumber;if(e>=t&&e<=i)return!0}return!1}}:{startsInside:()=>!1}}function $(e){if(!c.b0(e)){if(!c.Gv(e))return!1;const t=e;if(!c.b0(t.levels)&&!c.Et(t.levels))return!1;if(!c.b0(t.direction)&&!c.Kg(t.direction))return!1;if(!c.b0(t.selectionLines)&&(!Array.isArray(t.selectionLines)||!t.selectionLines.every(c.Et)))return!1}return!0}class q extends z{constructor(){super({id:"editor.unfold",label:x.kg("unfoldAction.label","Unfold"),alias:"Unfold",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:$,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=n&&n.levels||1,s=this.getLineNumbers(n,i);n&&"up"===n.direction?(0,f.dN)(t,!1,o,s):(0,f.uV)(t,!1,o,s)}}class K extends z{constructor(){super({id:"editor.unfoldRecursively",label:x.kg("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2142),weight:100}})}invoke(e,t,i,n){(0,f.uV)(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class G extends z{constructor(){super({id:"editor.fold",label:x.kg("foldAction.label","Fold"),alias:"Fold",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:$,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=this.getLineNumbers(n,i),s=n&&n.levels,r=n&&n.direction;"number"!==typeof s&&"string"!==typeof r?(0,f.W8)(t,!0,o):"up"===r?(0,f.dN)(t,!0,s||1,o):(0,f.uV)(t,!0,s||1,o)}}class Q extends z{constructor(){super({id:"editor.toggleFold",label:x.kg("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.bC)(t,1,n)}}class Y extends z{constructor(){super({id:"editor.foldRecursively",label:x.kg("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.uV)(t,!0,Number.MAX_VALUE,n)}}class Z extends z{constructor(){super({id:"editor.toggleFoldRecursively",label:x.kg("toggleFoldRecursivelyAction.label","Toggle Fold Recursively"),alias:"Toggle Fold Recursively",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,3114),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.bC)(t,Number.MAX_VALUE,n)}}class X extends z{constructor(){super({id:"editor.foldAllBlockComments",label:x.kg("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2138),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).comments;if(n&&n.blockCommentStartToken){const e=new RegExp("^\\s*"+(0,l.bm)(n.blockCommentStartToken));(0,f.AI)(t,e,!0)}}}}class J extends z{constructor(){super({id:"editor.foldAllMarkerRegions",label:x.kg("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2077),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,f.AI)(t,e,!0)}}}}class ee extends z{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:x.kg("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2078),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,f.AI)(t,e,!1)}}}}class te extends z{constructor(){super({id:"editor.foldAllExcept",label:x.kg("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.GR)(t,!0,n)}}class ie extends z{constructor(){super({id:"editor.unfoldAllExcept",label:x.kg("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.GR)(t,!1,n)}}class ne extends z{constructor(){super({id:"editor.foldAll",label:x.kg("foldAllAction.label","Fold All"),alias:"Fold All",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2069),weight:100}})}invoke(e,t,i){(0,f.uV)(t,!0)}}class oe extends z{constructor(){super({id:"editor.unfoldAll",label:x.kg("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2088),weight:100}})}invoke(e,t,i){(0,f.uV)(t,!1)}}class se extends z{static{this.ID_PREFIX="editor.foldLevel"}static{this.ID=e=>se.ID_PREFIX+e}getFoldingLevel(){return parseInt(this.id.substr(se.ID_PREFIX.length))}invoke(e,t,i){(0,f.sO)(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}class re extends z{constructor(){super({id:"editor.gotoParentFold",label:x.kg("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.kK)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}class ae extends z{constructor(){super({id:"editor.gotoPreviousFold",label:x.kg("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.JX)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}class le extends z{constructor(){super({id:"editor.gotoNextFold",label:x.kg("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.pr)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}class ce extends z{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:x.kg("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2135),weight:100}})}invoke(e,t,i){const n=[],o=i.getSelections();if(o){for(const e of o){let t=e.endLineNumber;1===e.endColumn&&--t,t>e.startLineNumber&&(n.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(n.length>0){n.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=T.tz.sanitizeAndMerge(t.regions,n,i.getModel()?.getLineCount());t.updatePost(T.tz.fromFoldRanges(e))}}}}class de extends z{constructor(){super({id:"editor.removeManualFoldingRanges",label:x.kg("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}}(0,u.HW)(V.ID,V,0),(0,u.Fl)(q),(0,u.Fl)(K),(0,u.Fl)(G),(0,u.Fl)(Y),(0,u.Fl)(Z),(0,u.Fl)(ne),(0,u.Fl)(oe),(0,u.Fl)(X),(0,u.Fl)(J),(0,u.Fl)(ee),(0,u.Fl)(te),(0,u.Fl)(ie),(0,u.Fl)(Q),(0,u.Fl)(re),(0,u.Fl)(ae),(0,u.Fl)(le),(0,u.Fl)(ce),(0,u.Fl)(de);for(let e=1;e<=7;e++)(0,u.xX)(new se({id:se.ID(e),label:x.kg("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:H,kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2048|21+e),weight:100}}));O.w.registerCommand("_executeFoldingRangeProvider",(async function(e,...t){const[i]=t;if(!(i instanceof P.r))throw(0,s.Qg)();const n=e.get(A.ILanguageFeaturesService),r=e.get(M.IModelService).getModel(i);if(!r)throw(0,s.Qg)();const a=e.get(F.pG);if(!a.getValue("editor.folding",{resource:i}))return[];const l=e.get(p.JZ),c=a.getValue("editor.foldingStrategy",{resource:i}),d={get limit(){return a.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},u=new k.hW(r,l,d);let h=u;if("indentation"!==c){const e=V.getFoldingRangeProviders(n,r);e.length&&(h=new I.M(r,e,(()=>{}),d,u))}const f=await h.compute(o.XO.None),m=[];try{if(f)for(let e=0;e{"use strict";i.d(t,{E0:()=>u,k0:()=>h,rv:()=>v});var n=i(25923),o=i(35037),s=i(41337),r=i(66344),a=i(48401),l=i(15911),c=i(23740);const d=(0,r.x1A)("editor.foldBackground",{light:(0,r.JO0)(r.seu,.3),dark:(0,r.JO0)(r.seu,.3),hcDark:null,hcLight:null},(0,s.kg)("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);(0,r.x1A)("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},(0,s.kg)("collapsedTextColor","Color of the collapsed text after the first line of a folded range.")),(0,r.x1A)("editorGutter.foldingControlForeground",r.t4B,(0,s.kg)("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const u=(0,a.pU)("folding-expanded",n.W.chevronDown,(0,s.kg)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),h=(0,a.pU)("folding-collapsed",n.W.chevronRight,(0,s.kg)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),g=(0,a.pU)("folding-manual-collapsed",h,(0,s.kg)("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),p=(0,a.pU)("folding-manual-expanded",u,(0,s.kg)("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),f={color:(0,l.Yf)(d),position:1},m=(0,s.kg)("linesCollapsed","Click to expand the range."),_=(0,s.kg)("linesExpanded","Click to collapse the range.");class v{static{this.COLLAPSED_VISUAL_DECORATION=o.kI.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:m,firstLineDecorationClassName:c.L.asClassName(h)})}static{this.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=o.kI.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:m,firstLineDecorationClassName:c.L.asClassName(h)})}static{this.MANUALLY_COLLAPSED_VISUAL_DECORATION=o.kI.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:m,firstLineDecorationClassName:c.L.asClassName(g)})}static{this.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=o.kI.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:m,firstLineDecorationClassName:c.L.asClassName(g)})}static{this.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=o.kI.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:m})}static{this.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=o.kI.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,linesDecorationsTooltip:m})}static{this.EXPANDED_VISUAL_DECORATION=o.kI.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+c.L.asClassName(u),linesDecorationsTooltip:_})}static{this.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=o.kI.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:c.L.asClassName(u),linesDecorationsTooltip:_})}static{this.MANUALLY_EXPANDED_VISUAL_DECORATION=o.kI.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+c.L.asClassName(p),linesDecorationsTooltip:_})}static{this.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=o.kI.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:c.L.asClassName(p),linesDecorationsTooltip:_})}static{this.NO_CONTROLS_EXPANDED_RANGE_DECORATION=o.kI.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0})}static{this.HIDDEN_RANGE_DECORATION=o.kI.register({description:"folding-hidden-range-decoration",stickiness:1})}constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?v.HIDDEN_RANGE_DECORATION:"never"===this.showFoldingControls?e?this.showFoldingHighlights?v.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:v.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:v.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?v.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:v.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?v.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:v.COLLAPSED_VISUAL_DECORATION:"mouseover"===this.showFoldingControls?i?v.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:v.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?v.MANUALLY_EXPANDED_VISUAL_DECORATION:v.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}},17662:(e,t,i)=>{"use strict";i.d(t,{AI:()=>g,GR:()=>h,JX:()=>m,W8:()=>d,bC:()=>a,cL:()=>p,dN:()=>c,kK:()=>f,pN:()=>r,pr:()=>_,sO:()=>u,uV:()=>l});var n=i(40231),o=i(4989),s=i(65647);class r{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new n.vl,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new o.tz(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,s=-1;const r=e=>{while(ns&&(s=e),n++}};for(const i of e){const e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);const i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let e=0;ei&&(i=s)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){const t=[];for(let i=0,n=this._regions.length;i=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>i)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:s})}return t.length>0?t:void 0}applyMemento(e){if(!Array.isArray(e))return;const t=[],i=this._textModel.getLineCount();for(const n of e){if(n.startLineNumber>=n.endLineNumber||n.startLineNumber<1||n.endLineNumber>i)continue;const e=this._getLinesChecksum(n.startLineNumber+1,n.endLineNumber);n.checksum&&e!==n.checksum||t.push({startLineNumber:n.startLineNumber,endLineNumber:n.endLineNumber,type:void 0,isCollapsed:n.isCollapsed??!0,source:n.source??0})}const n=o.tz.sanitizeAndMerge(this._regions,t,i);this.updatePost(o.tz.fromFoldRanges(n))}_getLinesChecksum(e,t){const i=(0,s.tW)(this._textModel.getLineContent(e)+this._textModel.getLineContent(t));return i%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),o=1;while(n>=0){const e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let s=n,r=this._regions.length;s0&&!n.containedBy(e[e.length-1]))e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,s=this._regions.length;e1){const s=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==o&&i0)for(const s of n){const n=e.getRegionAtLine(s);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){const s=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function d(e,t,i){const n=[];for(const o of i){const i=e.getAllRegionsAtLine(o,(e=>e.isCollapsed!==t));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}function u(e,t,i,n){const o=(e,o)=>o===t&&e.isCollapsed!==i&&!n.some((t=>e.containsLine(t))),s=e.getRegionsInside(null,o);e.toggleCollapseState(s)}function h(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,void 0);i.length>0&&n.push(i[0])}const o=e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t,s=e.getRegionsInside(null,o);e.toggleCollapseState(s)}function g(e,t,i){const n=e.textModel,o=e.regions,s=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){const i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&s.push(o.toRegion(e))}e.toggleCollapseState(s)}function p(e,t,i){const n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}function f(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}function m(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));while(null!==i){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0){i=t.regions.toRegion(t.regions.length-1);while(null!==i){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}}return null}function _(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}while(null!==i){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0){i=t.regions.toRegion(0);while(null!==i){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex{"use strict";i.d(t,{tz:()=>l,yy:()=>s});const n={0:" ",1:"u",2:"r"},o=65535,s=16777215,r=4278190080;class a{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return 0!==(this._states[t]&1<o)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new a(e.length),this._userDefinedStates=new a(e.length),this._recoveredStates=new a(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;is||o>s)throw new Error("startLineNumber or endLineNumber must not exceed "+s);while(e.length>0&&!t(n,o))e.pop();const r=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&r)<<24),this._endIndexes[i]=o+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&s}getEndLineNumber(e){return this._endIndexes[e]&s}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&r)>>>16);return t===o?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;while(t=0){const i=this.getEndLineNumber(t);if(i>=e)return t;t=this.getParentIndex(t);while(-1!==t){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(e)?i=>ii=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(1===d.source?e=d:(e=c,e.isCollapsed=d.isCollapsed&&(c.endLineNumber===d.endLineNumber||!n?.startsInside(c.startLineNumber+1,c.endLineNumber+1)),e.source=0),c=s(++a)):(e=d,d.isCollapsed&&0===d.source&&(e.source=2)),d=r(++l);else{let t=l,i=d;while(1){if(!i||i.startLineNumber>c.endLineNumber){e=c;break}if(1===i.source&&i.endLineNumber>c.endLineNumber)break;i=r(++t)}c=s(++a)}if(e){while(h&&h.endLineNumbere.startLineNumber&&e.startLineNumber>g&&e.endLineNumber<=i&&(!h||h.endLineNumber>=e.endLineNumber)&&(p.push(e),g=e.startLineNumber,h&&u.push(h),h=e)}}return p}}class c{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}},8568:(e,t,i)=>{"use strict";i.d(t,{hW:()=>a});var n=i(47172),o=i(4989);const s=5e3,r="indent";class a{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id=r}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(d(this.editorModel,i,n,this.foldingRangesLimit))}}class l{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>o.yy||t>o.yy)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new o.tz(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,s=this._indentOccurrences.length;for(let e=0;et){s=e;break}i+=n}}const r=e.getOptions().tabSize,a=new Uint32Array(t),l=new Uint32Array(t);for(let o=this._length-1,c=0;o>=0;o--){const d=this._startIndexes[o],u=e.getLineContent(d),h=(0,n.G)(u,r);(h{}};function d(e,t,i,o=c){const s=e.getOptions().tabSize,r=new l(o);let a;i&&(a=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const d=[],u=e.getLineCount()+1;d.push({indent:-1,endAbove:u,line:u});for(let i=e.getLineCount();i>0;i--){const o=e.getLineContent(i),l=(0,n.G)(o,s);let c,u=d[d.length-1];if(-1!==l){if(a&&(c=o.match(a))){if(!c[1]){d.push({indent:-2,endAbove:i,line:i});continue}{let e=d.length-1;while(e>0&&-2!==d[e].indent)e--;if(e>0){d.length=e+1,u=d[e],r.insertFirst(i,u.line,l),u.line=i,u.indent=l,u.endAbove=i;continue}}}if(u.indent>l){do{d.pop(),u=d[d.length-1]}while(u.indent>l);const e=u.endAbove-1;e-i>=1&&r.insertFirst(i,e,l)}u.indent===l?u.endAbove=i:d.push({indent:l,endAbove:i,line:i})}else t&&(u.endAbove=i)}return r.toIndentRanges(e)}},13387:(e,t,i)=>{"use strict";i.d(t,{M:()=>l});var n=i(14396),o=i(5091),s=i(4989);const r={},a="syntax";class l{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id=a,this.disposables=new o.Cm,s&&this.disposables.add(s);for(const e of t)"function"===typeof e.onDidChange&&this.disposables.add(e.onDidChange(i))}compute(e){return c(this.providers,this.editorModel,e).then((t=>{if(t){const e=u(t,this.foldingRangesLimit);return e}return this.fallbackRangeProvider?.compute(e)??null}))}dispose(){this.disposables.dispose()}}function c(e,t,i){let o=null;const s=e.map(((e,s)=>Promise.resolve(e.provideFoldingRanges(t,r,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(o)||(o=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&o.push({start:t.start,end:t.end,rank:s,kind:t.kind})}}),n.M_)));return Promise.all(s).then((e=>o))}class d{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>s.yy||t>s.yy)return;const o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ie){i=n;break}t+=o}}const n=new Uint32Array(e),o=new Uint32Array(e),r=[];for(let s=0,a=0;s{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new d(t);let o;const s=[];for(const e of i)if(o){if(e.start>o.start)if(e.end<=o.end)s.push(o),o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);else{if(e.start>o.end){do{o=s.pop()}while(o&&e.start>o.end);o&&s.push(o),o=e}n.add(e.start,e.end,e.kind&&e.kind.value,s.length)}}else o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);return n.toIndentRanges()}},50239:(e,t,i)=>{"use strict";var n=i(16259),o=i(17522),s=i(41337);class r extends n.ks{constructor(){super({id:"editor.action.fontZoomIn",label:s.kg("EditorFontZoomIn.label","Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(e,t){o.D.setZoomLevel(o.D.getZoomLevel()+1)}}class a extends n.ks{constructor(){super({id:"editor.action.fontZoomOut",label:s.kg("EditorFontZoomOut.label","Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(e,t){o.D.setZoomLevel(o.D.getZoomLevel()-1)}}class l extends n.ks{constructor(){super({id:"editor.action.fontZoomReset",label:s.kg("EditorFontZoomReset.label","Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(e,t){o.D.setZoomLevel(0)}}(0,n.Fl)(r),(0,n.Fl)(a),(0,n.Fl)(l)},88996:(e,t,i)=>{"use strict";i.d(t,{Pj:()=>E,jX:()=>L,vg:()=>I,_V:()=>A});var n=i(85053),o=i(67792),s=i(14396),r=i(5837),a=i(67806),l=i(50322),c=i(29133),d=i(64339),u=i(55413),h=i(36788),g=i(8690),p=i(98581),f=i(4117),m=i(64037),_=i(98977),v=i(72786);class b{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"===typeof e?e.toLowerCase():e._lower}}class y{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(b.toKey(e))}has(e){return this._set.has(b.toKey(e))}}var w=i(87778),C=i(12847),S=i(12660),k=i(4380);function x(e,t,i){const n=[],o=new y,s=e.ordered(i);for(const e of s)n.push(e),e.extensionId&&o.add(e.extensionId);const r=t.ordered(i);for(const e of r){if(e.extensionId){if(o.has(e.extensionId))continue;o.add(e.extensionId)}n.push({displayName:e.displayName,extensionId:e.extensionId,provideDocumentFormattingEdits(t,i,n){return e.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)}})}return n}class E{static{this._selectors=new a.w}static setFormatterSelector(e){const t=E._selectors.unshift(e);return{dispose:t}}static async select(e,t,i,n){if(0===e.length)return;const o=r.f.first(E._selectors);return o?await o(e,t,i,n):void 0}}async function L(e,t,i,n,o,s,r){const a=e.get(w._Y),{documentRangeFormattingEditProvider:l}=e.get(C.ILanguageFeaturesService),c=(0,u.z9)(t)?t.getModel():t,d=l.ordered(c),h=await E.select(d,c,n,2);h&&(o.report(h),await a.invokeFunction(T,h,t,i,s,r))}async function T(e,t,i,o,s,r){const a=e.get(f.IEditorWorkerService),l=e.get(S.rr),c=e.get(k.Nt);let h,m;(0,u.z9)(i)?(h=i.getModel(),m=new d.gI(i,5,void 0,s)):(h=i,m=new d.ER(i,s));const v=[];let b=0;for(const e of(0,n._j)(o).sort(g.Q.compareRangesUsingStarts))b>0&&g.Q.areIntersectingOrTouching(v[b-1],e)?v[b-1]=g.Q.fromPositions(v[b-1].getStartPosition(),e.getEndPosition()):b=v.push(e);const y=async e=>{l.trace("[format][provideDocumentRangeFormattingEdits] (request)",t.extensionId?.value,e);const i=await t.provideDocumentRangeFormattingEdits(h,e,h.getFormattingOptions(),m.token)||[];return l.trace("[format][provideDocumentRangeFormattingEdits] (response)",t.extensionId?.value,i),i},w=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>g.Q.plusRange(e,t.range)),e[0].range);if(!t.some((e=>g.Q.intersectRanges(i,e.range))))return!1;for(const i of e)for(const e of t)if(g.Q.intersectRanges(i.range,e.range))return!0;return!1},C=[],x=[];try{if("function"===typeof t.provideDocumentRangesFormattingEdits){l.trace("[format][provideDocumentRangeFormattingEdits] (request)",t.extensionId?.value,v);const e=await t.provideDocumentRangesFormattingEdits(h,v,h.getFormattingOptions(),m.token)||[];l.trace("[format][provideDocumentRangeFormattingEdits] (response)",t.extensionId?.value,e),x.push(e)}else{for(const e of v){if(m.token.isCancellationRequested)return!0;x.push(await y(e))}for(let e=0;e({text:e.text,range:g.Q.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.Q.areIntersectingOrTouching(i,t))return[new p.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return c.playSignal(k.Rh.format,{userGesture:r}),!0}async function I(e,t,i,n,o,s){const r=e.get(w._Y),a=e.get(C.ILanguageFeaturesService),l=(0,u.z9)(t)?t.getModel():t,c=x(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),d=await E.select(c,l,i,1);d&&(n.report(d),await r.invokeFunction(D,d,t,i,o,s))}async function D(e,t,i,n,o,s){const r=e.get(f.IEditorWorkerService),a=e.get(k.Nt);let l,c,h;(0,u.z9)(i)?(l=i.getModel(),c=new d.gI(i,5,void 0,o)):(l=i,c=new d.ER(i,o));try{const e=await t.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(h=await r.computeMoreMinimalEdits(l.uri,e),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!h||0===h.length)return!1;if((0,u.z9)(i))_.c.execute(i,h,2!==n),2!==n&&i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=h,t=new p.L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);l.pushEditOperations([t],h.map((e=>({text:e.text,range:g.Q.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.Q.areIntersectingOrTouching(i,t))return[new p.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return a.playSignal(k.Rh.format,{userGesture:s}),!0}async function R(e,t,i,o,r,a){const l=t.documentRangeFormattingEditProvider.ordered(i);for(const t of l){const l=await Promise.resolve(t.provideDocumentRangeFormattingEdits(i,o,r,a)).catch(s.M_);if((0,n.EI)(l))return await e.computeMoreMinimalEdits(i.uri,l)}}async function N(e,t,i,o,r){const a=x(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of a){const a=await Promise.resolve(t.provideDocumentFormattingEdits(i,o,r)).catch(s.M_);if((0,n.EI)(a))return await e.computeMoreMinimalEdits(i.uri,a)}}function A(e,t,i,n,o,r,a){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,o,r,a)).catch(s.M_).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}v.w.registerCommand("_executeFormatRangeProvider",(async function(e,...t){const[i,n,s]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(g.Q.isIRange(n));const r=e.get(m.ITextModelService),a=e.get(f.IEditorWorkerService),d=e.get(C.ILanguageFeaturesService),u=await r.createModelReference(i);try{return R(a,d,u.object.textEditorModel,g.Q.lift(n),s,o.XO.None)}finally{u.dispose()}})),v.w.registerCommand("_executeFormatDocumentProvider",(async function(e,...t){const[i,n]=t;(0,l.j)(c.r.isUri(i));const s=e.get(m.ITextModelService),r=e.get(f.IEditorWorkerService),a=e.get(C.ILanguageFeaturesService),d=await s.createModelReference(i);try{return N(r,a,d.object.textEditorModel,n,o.XO.None)}finally{d.dispose()}})),v.w.registerCommand("_executeFormatOnTypeProvider",(async function(e,...t){const[i,n,s,r]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(h.y.isIPosition(n)),(0,l.j)("string"===typeof s);const a=e.get(m.ITextModelService),d=e.get(f.IEditorWorkerService),u=e.get(C.ILanguageFeaturesService),g=await a.createModelReference(i);try{return A(d,u,g.object.textEditorModel,h.y.lift(n),s,r,o.XO.None)}finally{g.dispose()}}))},15342:(e,t,i)=>{"use strict";var n=i(85053),o=i(67792),s=i(14396),r=i(91348),a=i(5091),l=i(16259),c=i(94728),d=i(94529),u=i(8690),h=i(57479),g=i(4117),p=i(12847),f=i(88996),m=i(98977),_=i(41337),v=i(4380),b=i(72786),y=i(18904),w=i(87778),C=i(44838),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},k=function(e,t){return function(i,n){t(i,n,e)}};let x=class{static{this.ID="editor.contrib.autoFormat"}constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibilitySignalService=n,this._disposables=new a.Cm,this._sessionDisposables=new a.Cm,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(56)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new d.y;for(const e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),s=new o.Qi,r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return s.cancel(),void r.dispose();for(let t=0,n=e.changes.length;t{s.token.isCancellationRequested||(0,n.EI)(e)&&(this._accessibilitySignalService.playSignal(v.Rh.format,{userGesture:!1}),m.c.execute(this._editor,e,!0))})).finally((()=>{r.dispose()}))}};x=S([k(1,p.ILanguageFeaturesService),k(2,g.IEditorWorkerService),k(3,v.Nt)],x);let E=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.Cm,this._callOnModel=new a.Cm,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(f.jX,this.editor,e,2,C.ke.None,o.XO.None,!1).catch(s.dz))}};E=S([k(1,p.ILanguageFeaturesService),k(2,w._Y)],E);class L extends l.ks{constructor(){super({id:"editor.action.formatDocument",label:_.kg("formatDocument.label","Format Document"),alias:"Format Document",precondition:y.M$.and(h.R.notInCompositeEditor,h.R.writable,h.R.hasDocumentFormattingProvider),kbOpts:{kbExpr:h.R.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(w._Y),n=e.get(C.N8);await n.showWhile(i.invokeFunction(f.vg,t,1,C.ke.None,o.XO.None,!0),250)}}}class T extends l.ks{constructor(){super({id:"editor.action.formatSelection",label:_.kg("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:y.M$.and(h.R.writable,h.R.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:h.R.editorTextFocus,primary:(0,r.m5)(2089,2084),weight:100},contextMenuOpts:{when:h.R.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(w._Y),n=t.getModel(),s=t.getSelections().map((e=>e.isEmpty()?new u.Q(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),r=e.get(C.N8);await r.showWhile(i.invokeFunction(f.jX,t,s,1,C.ke.None,o.XO.None,!0),250)}}(0,l.HW)(x.ID,x,2),(0,l.HW)(E.ID,E,2),(0,l.Fl)(L),(0,l.Fl)(T),b.w.registerCommand("editor.action.format",(async e=>{const t=e.get(c.T).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(b.d);t.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")}))},98977:(e,t,i)=>{"use strict";i.d(t,{c:()=>r});var n=i(28346),o=i(8690),s=i(71203);class r{static _handleEolEdits(e,t){let i;const n=[];for(const e of t)"number"===typeof e.eol&&(i=e.eol),e.range&&"string"===typeof e.text&&n.push(e);return"number"===typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range),o=i.getFullModelRange();return o.equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const a=s.D.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map((e=>n.k.replace(o.Q.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",l.map((e=>n.k.replaceMove(o.Q.lift(e.range),e.text)))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},13977:(e,t,i)=>{"use strict";i.d(t,{j:()=>re,i:()=>le});var n=i(25923),o=i(5091),s=i(16259),r=i(94728),a=i(36788),l=i(8690),c=i(57479),d=i(85053),u=i(40231),h=i(67806),g=i(20601),p=i(29133),f=i(59857),m=i(87778),_=i(45658),v=i(32828),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};class w{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let C=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new u.vl,this.onDidChange=this._onDidChange.event,this._dispoables=new o.Cm,this._markers=[],this._nextIdx=-1,p.r.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=(0,g.UD)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?l.Q.compareRangesUsingStarts(e,t)||_.cj.compare(e.severity,t.severity):_.cj.compare(e.severity,t.severity)||l.Q.compareRangesUsingStarts(e,t)),i},r=()=>{this._markers=this._markerService.read({resource:p.r.isUri(e)?e:void 0,severities:_.cj.Error|_.cj.Warning|_.cj.Info}),"function"===typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(r(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new w(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,d.El)(this._markers,{resource:e.uri},((e,t)=>(0,g.UD)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let i=o;it.resource.toString()===e.toString()));if(!(i<0))for(;i=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},U=function(e,t){return function(i,n){t(i,n,e)}};class ${constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new o.Cm,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(D.b2(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new R.Se(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,o.AS)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let s=(t?.length||0)+2;o&&(s+="string"===typeof o?o.length:o.value.length);const r=(0,g.uz)(i);this._lines=r.length,this._longestLineLength=0;for(const e of r)this._longestLineLength=Math.max(e.length+s,this._longestLineLength);D.w_(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of r)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"===typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else{this._codeLink=D.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()};const t=D.BC(this._codeLink,D.$("span"));t.innerText=o.value,e.appendChild(this._codeLink)}}if(D.w_(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,d.EI)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(67))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(50),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case _.cj.Error:t=E.kg("Error","Error");break;case _.cj.Warning:t=E.kg("Warning","Warning");break;case _.cj.Info:t=E.kg("Info","Info");break;case _.cj.Hint:t=E.kg("Hint","Hint");break}let i=E.kg("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();if(n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1){const t=n.getLineContent(e.startLineNumber);i=`${t}, ${i}`}return i}}let q=class extends O.j6{static{H=this}static{this.TitleMenu=new L.D8("gotoErrorTitleMenu")}constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new o.Cm,this._onDidSelectRelatedInformation=new u.vl,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=_.cj.Warning,this._backgroundColor=N.Q1.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(ie);let t=Y,i=Z;this._severity===_.cj.Warning?(t=X,i=J):this._severity===_.cj.Info&&(t=ee,i=te);const n=e.getColor(t),o=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor(O._X),secondaryHeadingColor:e.getColor(O.e3)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const t=[],i=this._menuService.getMenuActions(H.TitleMenu,this._contextKeyService);(0,P.Ot)(i,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=D.BC(e,D.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new $(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=l.Q.lift(e),o=this.editor.getPosition(),s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=i>1?E.kg("problems","{0} of {1} problems",t,i):E.kg("change","{0} of {1} problem",t,i);this.setTitle((0,A.P8)(r.uri),e)}this._icon.className=`codicon ${x.className(_.cj.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};q=H=z([U(1,j.Gy),U(2,F.C),U(3,L.ez),U(4,m._Y),U(5,T.fN),U(6,M.L)],q);const K=(0,V.yLr)(V.Rbi,V.AN$),G=(0,V.yLr)(V.Hng,V.Stt),Q=(0,V.yLr)(V.pOz,V.IIb),Y=(0,V.x1A)("editorMarkerNavigationError.background",{dark:K,light:K,hcDark:V.b1q,hcLight:V.b1q},E.kg("editorMarkerNavigationError","Editor marker navigation widget error color.")),Z=(0,V.x1A)("editorMarkerNavigationError.headerBackground",{dark:(0,V.JO0)(Y,.1),light:(0,V.JO0)(Y,.1),hcDark:null,hcLight:null},E.kg("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),X=(0,V.x1A)("editorMarkerNavigationWarning.background",{dark:G,light:G,hcDark:V.b1q,hcLight:V.b1q},E.kg("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),J=(0,V.x1A)("editorMarkerNavigationWarning.headerBackground",{dark:(0,V.JO0)(X,.1),light:(0,V.JO0)(X,.1),hcDark:"#0C141F",hcLight:(0,V.JO0)(X,.2)},E.kg("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ee=(0,V.x1A)("editorMarkerNavigationInfo.background",{dark:Q,light:Q,hcDark:V.b1q,hcLight:V.b1q},E.kg("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),te=(0,V.x1A)("editorMarkerNavigationInfo.headerBackground",{dark:(0,V.JO0)(ee,.1),light:(0,V.JO0)(ee,.1),hcDark:null,hcLight:null},E.kg("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),ie=(0,V.x1A)("editorMarkerNavigation.background",V.YtV,E.kg("editorMarkerNavigationBackground","Editor marker navigation widget background."));var ne,oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},se=function(e,t){return function(i,n){t(i,n,e)}};let re=class{static{ne=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(ne.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new o.Cm,this._editor=e,this._widgetVisible=he.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(q,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{this._model?.selected&&l.Q.containsPosition(this._model?.selected.marker,e.position)||this._model?.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.Q.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.y(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){if(this._editor.hasModel()){const i=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(i.move(e,this._editor.getModel(),this._editor.getPosition()),!i.selected)return;if(i.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const n=await this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);n&&(ne.get(n)?.close(),ne.get(n)?.nagivate(e,t))}else this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}};re=ne=oe([se(1,S),se(2,T.fN),se(3,r.T),se(4,m._Y)],re);class ae extends s.ks{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&re.get(t)?.nagivate(this._next,this._multiFile)}}class le extends ae{static{this.ID="editor.action.marker.next"}static{this.LABEL=E.kg("markerAction.next.label","Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:le.ID,label:le.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:578,weight:100},menuOpts:{menuId:q.TitleMenu,title:le.LABEL,icon:(0,I.pU)("marker-navigation-next",n.W.arrowDown,E.kg("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}class ce extends ae{static{this.ID="editor.action.marker.prev"}static{this.LABEL=E.kg("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:ce.ID,label:ce.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:1602,weight:100},menuOpts:{menuId:q.TitleMenu,title:ce.LABEL,icon:(0,I.pU)("marker-navigation-previous",n.W.arrowUp,E.kg("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}class de extends ae{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:E.kg("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:66,weight:100},menuOpts:{menuId:L.D8.MenubarGoMenu,title:E.kg({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class ue extends ae{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:E.kg("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:1090,weight:100},menuOpts:{menuId:L.D8.MenubarGoMenu,title:E.kg({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}(0,s.HW)(re.ID,re,4),(0,s.Fl)(le),(0,s.Fl)(ce),(0,s.Fl)(de),(0,s.Fl)(ue);const he=new T.N1("markersNavigationVisible",!1),ge=s.DX.bindToContribution(re.get);(0,s.E_)(new ge({id:"closeMarkersNavigation",precondition:he,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:c.R.focus,primary:9,secondary:[1033]}}))},3815:(e,t,i)=>{"use strict";i.d(t,{mR:()=>q,bn:()=>$,QS:()=>U});var n=i(19950),o=i(9659),s=i(91348),r=i(50322),a=i(29133),l=i(64339),c=i(55413),d=i(16259),u=i(94728),h=i(50576),g=i(36788),p=i(8690),f=i(57479),m=i(35350),_=i(12443),v=i(30667),b=i(40231),y=i(5091),w=i(84366),C=i(41337),S=i(18904),k=i(59857),x=i(87778),E=i(13046),L=i(78386),T=i(95062),I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},D=function(e,t){return function(i,n){t(i,n,e)}};const R=new S.N1("hasSymbols",!1,(0,C.kg)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),N=(0,x.u1)("ISymbolNavigationService");let A=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=R.bindTo(e)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new O(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const e of t.references)if((0,w.n4)(e.uri,n.uri))s=!0,r=r||p.Q.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=(0,y.qE)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:p.Q.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){this._currentMessage?.dispose();const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?(0,C.kg)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):(0,C.kg)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};A=I([D(0,S.fN),D(1,u.T),D(2,T.Ot),D(3,E.b)],A),(0,k.v)(N,A,1),(0,d.E_)(new class extends d.DX{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:R,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(N).revealNext(t)}}),L.f.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:R,primary:9,handler(e){e.get(N).reset()}});let O=class{constructor(e){this._listener=new Map,this._disposables=new y.Cm,this._onDidChange=new b.vl,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,y.AS)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,y.qE)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){this._listener.get(e)?.dispose(),this._listener.delete(e)}};O=I([D(0,u.T)],O);var P=i(61307),M=i(55571),F=i(6330),B=i(72786),W=i(44838),H=i(85901),V=i(12847),j=i(5837),z=i(5045);F.ZG.appendMenuItem(F.D8.EditorContext,{submenu:F.D8.EditorContextPeek,title:C.kg("peek.submenu","Peek"),group:"navigation",order:100});class U{static is(e){return!(!e||"object"!==typeof e)&&(e instanceof U||!(!g.y.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class $ extends d.qO{static{this._allSymbolNavigationCommands=new Map}static{this._activeAlternativeCommands=new Set}static all(){return $._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of j.f.wrap(t.menu))i.id!==F.D8.EditorContext&&i.id!==F.D8.EditorContextPeek||(i.when=S.M$.and(e.precondition,i.when));return t}constructor(e,t){super($._patchConfig(t)),this.configuration=e,$._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,s){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(T.Ot),a=e.get(u.T),c=e.get(W.N8),d=e.get(N),h=e.get(V.ILanguageFeaturesService),g=e.get(x._Y),p=t.getModel(),f=t.getPosition(),m=U.is(i)?i:new U(p,f),_=new l.gI(t,5),v=(0,o.PK)(this._getLocationModel(h,m.model,m.position,_.token),_.token).then((async e=>{if(!e||_.token.isCancellationRequested)return;let o;if((0,n.xE)(e.ariaMessage),e.referenceAt(p.uri,f)){const e=this._getAlternativeCommand(t);!$._activeAlternativeCommands.has(e)&&$._allSymbolNavigationCommands.has(e)&&(o=$._allSymbolNavigationCommands.get(e))}const r=e.references.length;if(0===r){if(!this.configuration.muteMessage){const e=p.getWordAtPosition(f);P.k.get(t)?.showMessage(this._getNoResultFoundMessage(e),f)}}else{if(1!==r||!o)return this._onResult(a,d,t,e,s);$._activeAlternativeCommands.add(this.desc.id),g.invokeFunction((e=>o.runEditorCommand(e,t,i,s).finally((()=>{$._activeAlternativeCommands.delete(this.desc.id)}))))}}),(e=>{r.error(e)})).finally((()=>{_.dispose()}));return c.showWhile(v,250),v}async _onResult(e,t,i,n,o){const s=this._getGoToPreference(i);if(i instanceof h.t||!(this.configuration.openInPeek||"peek"===s&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===s,l=await this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,o):n.dispose(),"goto"===s&&t.put(r)}else this._openInPeek(i,n,o)}async _openReference(e,t,i,n,o){let s;if((0,m.Iu)(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const r=await t.openCodeEditor({resource:i.uri,options:{selection:p.Q.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(r){if(o){const e=r.getModel(),t=r.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&t.clear()}),350)}return r}}_openInPeek(e,t,i){const n=_.X.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),(0,o.SS)((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}class q extends ${async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.hE)(e.definitionProvider,t,i,!1,n),C.kg("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?C.kg("noResultWord","No definition found for '{0}'",e.word):C.kg("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}(0,F.ug)(class e extends q{static{this.id="editor.action.revealDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{...C.aS("actions.goToDecl.label","Go to Definition"),mnemonicTitle:C.kg({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:f.R.hasDefinitionProvider,keybinding:[{when:f.R.editorTextFocus,primary:70,weight:100},{when:S.M$.and(f.R.editorTextFocus,z.W0),primary:2118,weight:100}],menu:[{id:F.D8.EditorContext,group:"navigation",order:1.1},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),B.w.registerCommandAlias("editor.action.goToDeclaration",e.id)}}),(0,F.ug)(class e extends q{static{this.id="editor.action.revealDefinitionAside"}constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,title:C.aS("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:S.M$.and(f.R.hasDefinitionProvider,f.R.isInEmbeddedEditor.toNegated()),keybinding:[{when:f.R.editorTextFocus,primary:(0,s.m5)(2089,70),weight:100},{when:S.M$.and(f.R.editorTextFocus,z.W0),primary:(0,s.m5)(2089,2118),weight:100}]}),B.w.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}),(0,F.ug)(class e extends q{static{this.id="editor.action.peekDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,title:C.aS("actions.previewDecl.label","Peek Definition"),precondition:S.M$.and(f.R.hasDefinitionProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:F.D8.EditorContextPeek,group:"peek",order:2}}),B.w.registerCommandAlias("editor.action.previewDeclaration",e.id)}});class K extends ${async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.sv)(e.declarationProvider,t,i,!1,n),C.kg("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?C.kg("decl.noResultWord","No declaration found for '{0}'",e.word):C.kg("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}(0,F.ug)(class e extends K{static{this.id="editor.action.revealDeclaration"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{...C.aS("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:C.kg({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:S.M$.and(f.R.hasDeclarationProvider,f.R.isInEmbeddedEditor.toNegated()),menu:[{id:F.D8.EditorContext,group:"navigation",order:1.3},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?C.kg("decl.noResultWord","No declaration found for '{0}'",e.word):C.kg("decl.generic.noResults","No declaration found")}}),(0,F.ug)(class extends K{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:C.aS("actions.peekDecl.label","Peek Declaration"),precondition:S.M$.and(f.R.hasDeclarationProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:3}})}});class G extends ${async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.f9)(e.typeDefinitionProvider,t,i,!1,n),C.kg("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?C.kg("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):C.kg("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}(0,F.ug)(class e extends G{static{this.ID="editor.action.goToTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{...C.aS("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:C.kg({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:f.R.hasTypeDefinitionProvider,keybinding:{when:f.R.editorTextFocus,primary:0,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.4},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}),(0,F.ug)(class e extends G{static{this.ID="editor.action.peekTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:C.aS("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:S.M$.and(f.R.hasTypeDefinitionProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:4}})}});class Q extends ${async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.eS)(e.implementationProvider,t,i,!1,n),C.kg("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?C.kg("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):C.kg("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}(0,F.ug)(class e extends Q{static{this.ID="editor.action.goToImplementation"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{...C.aS("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:C.kg({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:f.R.hasImplementationProvider,keybinding:{when:f.R.editorTextFocus,primary:2118,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.45},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}),(0,F.ug)(class e extends Q{static{this.ID="editor.action.peekImplementation"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:C.aS("actions.peekImplementation.label","Peek Implementations"),precondition:S.M$.and(f.R.hasImplementationProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:3142,weight:100},menu:{id:F.D8.EditorContextPeek,group:"peek",order:5}})}});class Y extends ${_getNoResultFoundMessage(e){return e?C.kg("references.no","No references found for '{0}'",e.word):C.kg("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}(0,F.ug)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...C.aS("goToReferences.label","Go to References"),mnemonicTitle:C.kg({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:S.M$.and(f.R.hasReferenceProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:1094,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.45},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.NN)(e.referenceProvider,t,i,!0,!1,n),C.kg("ref.title","References"))}}),(0,F.ug)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:C.aS("references.action.label","Peek References"),precondition:S.M$.and(f.R.hasReferenceProvider,M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.NN)(e.referenceProvider,t,i,!1,!1,n),C.kg("ref.title","References"))}});class Z extends ${constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:C.aS("label.generic","Go to Any Symbol"),precondition:S.M$.and(M.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new v.y4(this._references,C.kg("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&C.kg("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}B.w.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.r},{name:"position",description:"The position at which to start",constraint:g.y.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(e,t,i,n,o,s,l)=>{(0,r.j)(a.r.isUri(t)),(0,r.j)(g.y.isIPosition(i)),(0,r.j)(Array.isArray(n)),(0,r.j)("undefined"===typeof o||"string"===typeof o),(0,r.j)("undefined"===typeof l||"boolean"===typeof l);const d=e.get(u.T),h=await d.openCodeEditor({resource:t},d.getFocusedCodeEditor());if((0,c.z9)(h))return h.setPosition(i),h.revealPositionInCenterIfOutsideViewport(i,0),h.invokeWithinContext((e=>{const t=new class extends Z{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(l),openToSide:!1},n,o);e.get(x._Y).invokeFunction(t.run.bind(t),h)}))}}),B.w.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.r},{name:"position",description:"The position at which to start",constraint:g.y.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(e,t,i,n,o)=>{e.get(B.d).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}}),B.w.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,r.j)(a.r.isUri(t)),(0,r.j)(g.y.isIPosition(i));const n=e.get(V.ILanguageFeaturesService),s=e.get(u.T);return s.openCodeEditor({resource:t},s.getFocusedCodeEditor()).then((e=>{if(!(0,c.z9)(e)||!e.hasModel())return;const t=_.X.get(e);if(!t)return;const s=(0,o.SS)((t=>(0,H.NN)(n.referenceProvider,e.getModel(),g.y.lift(i),!1,!1,t).then((e=>new v.y4(e,C.kg("ref.title","References")))))),r=new p.Q(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,s,!1))}))}}),B.w.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},85901:(e,t,i)=>{"use strict";i.d(t,{NN:()=>m,eS:()=>p,f9:()=>f,hE:()=>h,sv:()=>g});var n=i(85053),o=i(67792),s=i(14396),r=i(6657),a=i(16259),l=i(12847),c=i(30667);function d(e,t){return t.uri.scheme===e.uri.scheme||!(0,r.fV)(t.uri,r.ny.walkThroughSnippet,r.ny.vscodeChatCodeBlock,r.ny.vscodeChatCodeCompareBlock)}async function u(e,t,i,o,r){const a=i.ordered(e,o),l=a.map((i=>Promise.resolve(r(i,e,t)).then(void 0,(e=>{(0,s.M_)(e)})))),c=await Promise.all(l);return(0,n.Yc)(c.flat()).filter((t=>d(e,t)))}function h(e,t,i,n,o){return u(t,i,e,n,((e,t,i)=>e.provideDefinition(t,i,o)))}function g(e,t,i,n,o){return u(t,i,e,n,((e,t,i)=>e.provideDeclaration(t,i,o)))}function p(e,t,i,n,o){return u(t,i,e,n,((e,t,i)=>e.provideImplementation(t,i,o)))}function f(e,t,i,n,o){return u(t,i,e,n,((e,t,i)=>e.provideTypeDefinition(t,i,o)))}function m(e,t,i,n,o,s){return u(t,i,e,o,(async(e,t,i)=>{const o=(await e.provideReferences(t,i,{includeDeclaration:!0},s))?.filter((e=>d(t,e)));if(!n||!o||2!==o.length)return o;const r=(await e.provideReferences(t,i,{includeDeclaration:!1},s))?.filter((e=>d(t,e)));return r&&1===r.length?r:o}))}async function _(e){const t=await e(),i=new c.y4(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}(0,a.ke)("_executeDefinitionProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=h(n.definitionProvider,t,i,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeDefinitionProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=h(n.definitionProvider,t,i,!0,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeTypeDefinitionProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=f(n.typeDefinitionProvider,t,i,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeTypeDefinitionProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=f(n.typeDefinitionProvider,t,i,!0,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeDeclarationProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=g(n.declarationProvider,t,i,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeDeclarationProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=g(n.declarationProvider,t,i,!0,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeReferenceProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=m(n.referenceProvider,t,i,!1,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeReferenceProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=m(n.referenceProvider,t,i,!1,!0,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeImplementationProvider",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=p(n.implementationProvider,t,i,!1,o.XO.None);return _((()=>s))})),(0,a.ke)("_executeImplementationProvider_recursive",((e,t,i)=>{const n=e.get(l.ILanguageFeaturesService),s=p(n.implementationProvider,t,i,!0,o.XO.None);return _((()=>s))}))},51170:(e,t,i)=>{"use strict";i.d(t,{gi:()=>u});var n=i(40231),o=i(5091),s=i(25160);function r(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=r(e.event,t.triggerModifier),this.hasSideBySideModifier=r(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=r(e,t.triggerModifier)}}class c{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function d(e){return"altKey"===e?s.zx?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):s.zx?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class u extends o.jG{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.vl),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.vl),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.vl),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=t?.extractLineNumberFromMouseEvent??(e=>e.target.position?e.target.position.lineNumber:0),this._opts=d(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(78)){const e=d(this._editor.getOption(78));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},39405:(e,t,i)=>{"use strict";i.d(t,{k:()=>S});var n,o=i(9659),s=i(14396),r=i(42325),a=i(5091),l=i(64339),c=i(16259),d=i(8690),u=i(14573),h=i(64037),g=i(51170),p=i(55571),f=i(41337),m=i(18904),_=i(3815),v=i(85901),b=i(12847),y=i(35037),w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};let S=class{static{n=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new a.Cm,this.toUnhookForKeyboard=new a.Cm,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new g.gi(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,t??void 0)}))),this.toUnhook.add(o.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{(0,s.dz)(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(o.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(n.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){this.toUnhookForKeyboard.clear();const t=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!t)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===t.startColumn&&this.currentWordAtPosition.endColumn===t.endColumn&&this.currentWordAtPosition.word===t.word)return;this.currentWordAtPosition=t;const i=new l.$t(this.editor,15);let n;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,o.SS)((t=>this.findDefinition(e,t)));try{n=await this.previousPromise}catch(e){return void(0,s.dz)(e)}if(!n||!n.length||!i.validate(this.editor))return void this.removeLinkDecorations();const a=n[0].originSelectionRange?d.Q.lift(n[0].originSelectionRange):new d.Q(e.lineNumber,t.startColumn,e.lineNumber,t.endColumn);if(n.length>1){let e=a;for(const{originSelectionRange:t}of n)t&&(e=d.Q.plusRange(e,t));this.addDecoration(e,(new r.Bc).appendText(f.kg("multipleResults","Click to show {0} definitions.",n.length)))}else{const e=n[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const o=this.getPreviewValue(i,n,e),s=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(a,o?(new r.Bc).appendCodeblock(s||"",o):void 0),t.dispose()}))}}getPreviewValue(e,t,i){let o=i.range;const s=o.endLineNumber-o.startLineNumber;s>=n.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(e,t));const r=this.stripIndentationFromPreviewRange(e,t,o);return r}stripIndentationFromPreviewRange(e,t,i){const n=e.getLineFirstNonWhitespaceColumn(t);let o=n;for(let n=t+1;n{const i=!t&&this.editor.getOption(89)&&!this.isInPeekEditor(e),n=new _.mR({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0});return n.run(e)}))}isInPeekEditor(e){const t=e.get(m.fN);return p.x2.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};S=n=w([C(1,h.ITextModelService),C(2,u.L),C(3,b.ILanguageFeaturesService)],S),(0,c.HW)(S.ID,S,2)},12443:(e,t,i)=>{"use strict";i.d(t,{X:()=>ce});var n,o=i(9659),s=i(14396),r=i(91348),a=i(5091),l=i(94728),c=i(36788),d=i(8690),u=i(55571),h=i(41337),g=i(72786),p=i(32828),f=i(18904),m=i(87778),_=i(78386),v=i(72033),b=i(95062),y=i(94216),w=i(30667),C=i(2150),S=i(90154),k=i(85476),x=i(40231),E=i(6657),L=i(84366),T=i(50576),I=i(35037),D=i(65764),R=i(64037),N=i(70604),A=i(4518),O=i(50278),P=i(10695),M=i(13046),F=i(48056),B=i(13153),W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},H=function(e,t){return function(i,n){t(i,n,e)}};let V=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof w.y4||e instanceof w.$L}getChildren(e){if(e instanceof w.y4)return e.groups;if(e instanceof w.$L)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};V=W([H(0,R.ITextModelService)],V);class j{getHeight(){return 23}getTemplateId(e){return e instanceof w.$L?q.id:G.id}}let z=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){if(e instanceof w.yc){const t=e.parent.getPreview(e)?.preview(e.range);if(t)return t.value}return(0,L.P8)(e.uri)}};z=W([H(0,M.b)],z);class U{getId(e){return e instanceof w.yc?e.id:e.uri}}let $=class extends a.jG{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new O.s(i,{supportHighlights:!0})),this.badge=new N.x(C.BC(i,C.$(".count")),{},B.m$),e.appendChild(i)}set(e,t){const i=(0,L.pD)(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat((0,h.kg)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,h.kg)("referenceCount","{0} reference",n))}};$=W([H(1,F.L)],$);let q=class{static{n=this}static{this.id="FileReferencesRenderer"}constructor(e){this._instantiationService=e,this.templateId=n.id}renderTemplate(e){return this._instantiationService.createInstance($,e)}renderElement(e,t,i){i.set(e.element,(0,P.WJ)(e.filterData))}disposeTemplate(e){e.dispose()}};q=n=W([H(0,m._Y)],q);class K extends a.jG{constructor(e){super(),this.label=this._register(new A._(e))}set(e,t){const i=e.parent.getPreview(e)?.preview(e.range);if(i&&i.value){const{value:e,highlight:n}=i;t&&!P.ne.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,P.WJ)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[n]))}else this.label.set(`${(0,L.P8)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class G{constructor(){this.templateId=G.id}static{this.id="OneReferenceRenderer"}renderTemplate(e){return new K(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}}class Q{getWidgetAriaLabel(){return(0,h.kg)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Y=i(15911),Z=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},X=function(e,t){return function(i,n){t(i,n,e)}};class J{static{this.DecorationOptions=I.kI.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"})}constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new a.Cm,this._callOnModelChange=new a.Cm,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(const t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n{const o=n.deltaDecorations([],t);for(let t=0;t{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(te,"ReferencesWidget",this._treeContainer,new j,[this._instantiationService.createInstance(q),this._instantiationService.createInstance(G)],this._instantiationService.createInstance(V),i),this._splitView.addView({onDidChange:x.Jh.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},S.X.Distribute),this._splitView.addView({onDidChange:x.Jh.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},S.X.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const n=(e,t)=>{e instanceof w.yc&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._disposables.add(this._tree.onDidOpen((e=>{e.sideBySide?n(e.element,"side"):e.editorOptions.pinned?n(e.element,"goto"):n(e.element,"show")}))),C.jD(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new C.fg(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=h.kg("noResults","No results"),C.WU(this._messageContainer),Promise.resolve(void 0)):(C.jD(this._messageContainer),this._decorationsManager=new J(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),C.WU(this._treeContainer),C.WU(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof w.yc?e:e instanceof w.$L&&e.children.length>0?e.children[0]:void 0}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==E.ny.inMemory?this.setTitle((0,L.Pi)(e.uri),this._uriLabel.getUriLabel((0,L.pD)(e.uri))):this.setTitle(h.kg("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent)),this._tree.reveal(e);const n=await i;if(!this._model)return void n.dispose();(0,a.AS)(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=d.Q.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};ie=Z([X(3,Y.Gy),X(4,R.ITextModelService),X(5,m._Y),X(6,u.zn),X(7,F.L),X(8,M.b)],ie);var ne,oe=i(57479),se=i(5045),re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};const le=new f.N1("referenceSearchVisible",!1,h.kg("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let ce=class{static{ne=this}static{this.ID="editor.contrib.referencesController"}static get(e){return e.getContribution(ne.ID)}constructor(e,t,i,n,o,s,r,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=r,this._configurationService=l,this._disposables=new a.Cm,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=le.bindTo(i)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const o="peekViewLayout",s=ee.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(ie,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(h.kg("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget?(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0);break}})));const r=++this._requestIdPool;t.then((t=>{if(r===this._requestIdPool&&this._widget)return this._model?.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(h.kg("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new c.y(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(87)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){this._editor.hasModel()&&this._model&&this._widget&&await this._widget.revealReference(e)}closeWidget(e=!0){this._widget?.dispose(),this._model?.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){this._widget?.hide(),this._ignoreModelChangeEvent=!0;const i=d.Q.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(i),this._widget.focusOnReferenceTree();else{const t=ne.get(e),n=this._model.clone();this.closeWidget(),e.focus(),t?.toggleWidget(i,(0,o.SS)((e=>Promise.resolve(n))),this._peekMode??!1)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,s.dz)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function de(e,t){const i=(0,u.RL)(e);if(!i)return;const n=ce.get(i);n&&t(n)}ce=ne=re([ae(2,f.fN),ae(3,l.T),ae(4,b.Ot),ae(5,m._Y),ae(6,y.CS),ae(7,p.pG)],ce),_.f.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,r.m5)(2089,60),when:f.M$.or(le,u.x2.inPeekEditor),handler(e){de(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),_.f.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:f.M$.or(le,u.x2.inPeekEditor),handler(e){de(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),_.f.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:f.M$.or(le,u.x2.inPeekEditor),handler(e){de(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),g.w.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),g.w.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),g.w.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),g.w.registerCommand("closeReferenceSearch",(e=>de(e,(e=>e.closeWidget())))),_.f.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:f.M$.and(u.x2.inPeekEditor,f.M$.not("config.editor.stablePeek"))}),_.f.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:f.M$.and(le,f.M$.not("config.editor.stablePeek"),f.M$.or(oe.R.editorTextFocus,se.J7.negate()))}),_.f.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:f.M$.and(le,v.YD,v.Nf.negate(),v.cH.negate()),handler(e){const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof w.yc&&de(e,(e=>e.revealReference(i[0])))}}),_.f.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:f.M$.and(le,v.YD,v.Nf.negate(),v.cH.negate()),handler(e){const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof w.yc&&de(e,(e=>e.openReference(i[0],!0,!0)))}}),g.w.registerCommand("openReference",(e=>{const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof w.yc&&de(e,(e=>e.openReference(i[0],!1,!0)))}))},30667:(e,t,i)=>{"use strict";i.d(t,{$L:()=>p,y4:()=>f,yc:()=>h});var n=i(14396),o=i(40231),s=i(23453),r=i(5091),a=i(21553),l=i(84366),c=i(20601),d=i(8690),u=i(41337);class h{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=s.r.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){const e=this.parent.getPreview(this)?.preview(this.range);return e?(0,u.kg)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",e.value,(0,l.P8)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,u.kg)("aria.oneReference","in {0} on line {1} at column {2}",(0,l.P8)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new d.Q(n,a.startColumn,n,o),c=new d.Q(s,r,s,1073741824),u=i.getValueInRange(l).replace(/^\s+/,""),h=i.getValueInRange(e),g=i.getValueInRange(c).replace(/\s+$/,"");return{value:u+h+g,highlight:{start:u.length,end:u.length+h.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.fT}dispose(){(0,r.AS)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,u.kg)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,l.P8)(this.uri),this.uri.fsPath):(0,u.kg)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,l.P8)(this.uri),this.uri.fsPath)}async resolve(e){if(0!==this._previews.size)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new g(i))}catch(e){(0,n.dz)(e)}return this}}class f{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new o.vl,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(f._compareReferences);for(const t of e)if(n&&l.er.isEqual(n.uri,t.uri,!0)||(n=new p(this,t.uri),this.groups.push(n)),0===n.children.length||0!==f._compareReferences(t,n.children[n.children.length-1])){const e=new h(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,r.AS)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new f(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,u.kg)("aria.result.0","No results found"):1===this.references.length?(0,u.kg)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,u.kg)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,u.kg)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+10?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:c.Qp(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&d.Q.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return l.er.compare(e.uri,t.uri)||d.Q.compareRangesUsingStarts(e.range,t.range)}}},81319:(e,t,i)=>{"use strict";i.d(t,{A:()=>J});var n=i(63907),o=i(5091),s=i(87778),r=i(27982),a=i(13046),l=i(9659),c=i(74742),d=i(2150),u=i(35350),h=i(77850),g=i(38570),p=i(1606),f=i(36788);const m=30,_=24;class v extends o.jG{constructor(e,t=new d.fg(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new p.v),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=d.fg.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new d.fg(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)}))),this._register(this._resizableNode.onDidWillResize((()=>{this._isResizing=!0})))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){return this._contentPosition?.position?f.y.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=d.BK(t);return n.top+i.top-m}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=d.BK(t),o=d.tG(t.ownerDocument.body),s=n.top+i.top+i.height;return o.height-s-_}_findPositionPreference(e,t){const i=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),n=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),o=Math.min(Math.max(n,i),e),s=Math.min(e,o);let r;return r=this._editor.getOption(60).above?s<=n?1:2:s<=i?2:1,1===r?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),r}_resize(e){this._resizableNode.layout(e.height,e.width)}}var b,y=i(18904),w=i(32828),C=i(17300),S=i(57479),k=i(44726),x=i(40231),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};const T=30,I=6;let D=class extends v{static{b=this}static{this.ID="editor.contrib.resizableContentHoverWidget"}static{this._lastDimensions=new d.fg(0,0)}get isVisibleFromKeyboard(){return 1===this._renderedHover?.source}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,i,n,o){const s=e.getOption(67)+8,r=150,a=new d.fg(r,s);super(e,a),this._configurationService=i,this._accessibilityService=n,this._keybindingService=o,this._hover=this._register(new k.N4),this._onDidResize=this._register(new x.vl),this.onDidResize=this._onDidResize.event,this._minimumSize=a,this._hoverVisibleKey=S.R.hoverVisible.bindTo(t),this._hoverFocusedKey=S.R.hoverFocused.bindTo(t),d.BC(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>{this.isVisible&&this._updateMaxDimensions()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()})));const l=this._register(d.w5(this._resizableNode.domNode));this._register(l.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(l.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return b.ID}static _applyDimensions(e,t,i){const n="number"===typeof t?`${t}px`:t,o="number"===typeof i?`${i}px`:i;e.style.width=n,e.style.height=o}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return b._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return b._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"===typeof t?`${t}px`:t,o="number"===typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){b._applyMaxDimensions(this._hover.contentsDomNode,e,t),b._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"===typeof e?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new d.fg(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){b._lastDimensions=new d.fg(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){const e=this._renderedHover?.showAtPosition;if(e)return 1===this._positionPreference?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=I;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some((e=>e.scrollWidth>e.clientWidth));return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t="undefined"===typeof this._contentWidth?0:this._contentWidth-2;if(e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4)&&(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,n),!0)}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e;const n=Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code"));n.forEach((e=>this._editor.applyFontInfo(e)))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,b._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,b._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);const t=d.OK(this._hover.containerDomNode),i=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,i)??1,this.onContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const n=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode,o=n&&(0,k.vr)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");o&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+o)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new d.fg(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new d.fg(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e="undefined"===typeof this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new d.fg(e,this._minimumSize.height)}onContentsChanged(){this._removeConstraintsRenderNormally();const e=this._hover.containerDomNode;let t=d.OK(e),i=d.Tr(e);if(this._resizableNode.layout(t,i),this._setHoverWidgetDimensions(i,t),t=d.OK(e),i=d.Tr(e),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(t,i),this._renderedHover?.showAtPosition){const e=d.OK(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._renderedHover.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-T})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+T})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};function R(e,t,i,n,o,s){const r=i+o/2,a=n+s/2,l=Math.max(Math.abs(e-r)-o/2,0),c=Math.max(Math.abs(t-a)-s/2,0);return Math.sqrt(l*l+c*c)}D=b=E([L(1,y.fN),L(2,w.pG),L(3,C.j),L(4,a.b)],D);var N=i(85053);class A{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,s=e.range.endLineNumber===n?e.range.endColumn:o;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(i>t.range.startColumn||t.range.endColumn>s)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return l.AE.EMPTY;const i=A._getLineDecorations(this._editor,t);return l.AE.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):l.AE.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=A._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,N.Yc)(t)}}class O{constructor(e,t,i){this.anchor=e,this.hoverParts=t,this.isComplete=i}filter(e){const t=this.hoverParts.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.hoverParts.length?this:new P(this,this.anchor,t,this.isComplete)}}class P extends O{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}var M=i(43505),F=i(35037),B=i(8690),W=i(76035),H=i(86367),V=i(50127),j=i(14396);class z extends o.jG{constructor(e,t,i,n,o,s){super();const r=t.anchor,a=t.hoverParts;this._renderedHoverParts=this._register(new $(e,i,a,s,o));const{showAtPosition:l,showAtSecondaryPosition:c}=z.computeHoverPositions(e,r.range,a);this.shouldAppearBeforeContent=a.some((e=>e.isBeforeContent)),this.showAtPosition=l,this.showAtSecondaryPosition=c,this.initialMousePosX=r.initialMousePosX,this.initialMousePosY=r.initialMousePosY,this.shouldFocus=n.shouldFocus,this.source=n.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}async updateHoverVerbosityLevel(e,t,i){this._renderedHoverParts.updateHoverVerbosityLevel(e,t,i)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),o=i.coordinatesConverter,s=o.convertModelRangeToViewRange(t),r=i.getLineMinColumn(s.startLineNumber),a=new f.y(s.startLineNumber,r);n=o.convertViewPositionToModelPosition(a).column}const o=t.startLineNumber;let s,r,a,l=t.startColumn;for(const e of i){const t=e.range,i=t.startLineNumber===o,r=t.endLineNumber===o,a=i&&r;if(a){const e=t.startColumn,i=Math.min(l,e);l=Math.max(i,n)}e.forceShowAtRange&&(s=t)}if(s){const e=s.getStartPosition();r=e,a=e}else r=t.getStartPosition(),a=new f.y(o,l);return{showAtPosition:r,showAtSecondaryPosition:a}}}class U{constructor(e,t){this._statusBar=t,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}}class $ extends o.jG{static{this._DECORATION_OPTIONS=F.kI.register({description:"content-hover-highlight",className:"hoverHighlight"})}constructor(e,t,i,n,o){super(),this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=o,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(t,i,o,n)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,i)),this._updateMarkdownAndColorParticipantInfo(t)}_createEditorDecorations(e,t){if(0===t.length)return o.jG.None;let i=t[0].range;for(const e of t){const t=e.range;i=B.Q.plusRange(i,t)}const n=e.createDecorationsCollection();return n.set([{range:i,options:$._DECORATION_OPTIONS}]),(0,o.s)((()=>{n.clear()}))}_renderParts(e,t,i,n){const s=new M.L(n),r={fragment:this._fragment,statusBar:s,...i},a=new o.Cm;for(const i of e){const e=this._renderHoverPartsForParticipant(t,i,r);a.add(e);for(const t of e.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:i,hoverPart:t.hoverPart,hoverElement:t.hoverElement})}const l=this._renderStatusBar(this._fragment,s);return l&&(a.add(l),this._renderedParts.push({type:"statusBar",hoverElement:l.hoverElement,actions:l.actions})),(0,o.s)((()=>{a.dispose()}))}_renderHoverPartsForParticipant(e,t,i){const n=e.filter((e=>e.owner===t)),o=n.length>0;return o?t.renderHoverParts(i,n):new g.Ke([])}_renderStatusBar(e,t){if(t.hasContent)return new U(e,t)}_registerListenersOnRenderedParts(){const e=new o.Cm;return this._renderedParts.forEach(((t,i)=>{const n=t.hoverElement;n.tabIndex=0,e.add(d.ko(n,d.Bx.FOCUS_IN,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=i}))),e.add(d.ko(n,d.Bx.FOCUS_OUT,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=-1})))})),e}_updateMarkdownAndColorParticipantInfo(e){const t=e.find((e=>e instanceof W.xJ&&!(e instanceof V.u)));t&&(this._markdownHoverParticipant=t),this._colorHoverParticipant=e.find((e=>e instanceof H.BJ))}async updateHoverVerbosityLevel(e,t,i){if(!this._markdownHoverParticipant)return;const n=this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant,t);if(void 0===n)return;const o=await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e,n,i);o&&(this._renderedParts[t]={type:"hoverPart",participant:this._markdownHoverParticipant,hoverPart:o.hoverPart,hoverElement:o.hoverElement},this._context.onContentsChanged())}isColorPickerVisible(){return this._colorHoverParticipant?.isColorPickerVisible()??!1}_normalizedIndexToMarkdownHoverIndexRange(e,t){const i=this._renderedParts[t];if(!i||"hoverPart"!==i.type)return;const n=i.participant===e;if(!n)return;const o=this._renderedParts.findIndex((t=>"hoverPart"===t.type&&t.participant===e));if(-1===o)throw new j.D7;return t-o}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}}var q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},K=function(e,t){return function(i,n){t(i,n,e)}};let G=class extends o.jG{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._onContentsChanged=this._register(new x.vl),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(D,this._editor)),this._participants=this._initializeHoverParticipants(),this._computer=new A(this._editor,this._participants),this._hoverOperation=this._register(new h.w(this._editor,this._computer)),this._registerListeners()}_initializeHoverParticipants(){const e=[];for(const t of g.B2.getAll()){const i=this._instantiationService.createInstance(t,this._editor);e.push(i)}return e.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._register(this._contentHoverWidget.onDidResize((()=>{this._participants.forEach((e=>e.handleResize?.()))}))),e}_registerListeners(){this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new O(this._computer.anchor,t,e.isComplete))})));const e=this._contentHoverWidget.getDomNode();this._register(d.b2(e,"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(d.b2(e,"mouseleave",(e=>{this._onMouseLeave(e)}))),this._register(u.dG.onDidChange((()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}_startShowingOrUpdateHover(e,t,i,n,o){const s=this._contentHoverWidget.position&&this._currentResult;if(!s)return!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0);const r=this._editor.getOption(60).sticky,a=o&&this._contentHoverWidget.isMouseGettingCloser(o.event.posx,o.event.posy),l=r&&a;if(l)return e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0;if(!e)return this._setCurrentResult(null),!1;const c=this._currentResult.anchor.equals(e);if(c)return!0;const d=e.canAdoptVisibleHover(this._currentResult.anchor,this._contentHoverWidget.position);return d?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)}_startHoverOperationIfNecessary(e,t,i,n,o){const s=this._computer.anchor&&this._computer.anchor.equals(e);s||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){let t=e;const i=this._currentResult===t;if(i)return;const n=t&&0===t.hoverParts.length;n&&(t=null),this._currentResult=t,this._currentResult?this._showHover(this._currentResult):this._hideHover()}_addLoadingMessage(e){if(!this._computer.anchor)return e;for(const t of this._participants){if(!t.createLoadingMessage)continue;const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){const t=this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete;t||this._setCurrentResult(e);const i=e.isComplete;if(!i)return;const n=0===e.hoverParts.length,o=this._computer.insistOnKeepingHoverVisible,s=n&&o;s||this._setCurrentResult(e)}_showHover(e){const t=this._getHoverContext();this._renderedContentHover=new z(this._editor,e,this._participants,this._computer,t,this._keybindingService),this._renderedContentHover.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover):this._renderedContentHover.dispose()}_hideHover(){this._contentHoverWidget.hide()}_getHoverContext(){const e=()=>{this.hide()},t=()=>{this._onContentsChanged.fire(),this._contentHoverWidget.onContentsChanged()},i=e=>{this._contentHoverWidget.setMinimumDimensions(e)};return{hide:e,onContentsChanged:t,setMinimumDimensions:i}}showsOrWillShow(e){const t=this._contentHoverWidget.isResizing;if(t)return!0;const i=this._findHoverAnchorCandidates(e),n=i.length>0;if(!n)return this._startShowingOrUpdateHover(null,0,0,!1,e);const o=i[0];return this._startShowingOrUpdateHover(o,0,0,!1,e)}_findHoverAnchorCandidates(e){const t=[];for(const i of this._participants){if(!i.suggestHoverAnchor)continue;const n=i.suggestHoverAnchor(e);n&&t.push(n)}const i=e.target;switch(i.type){case 6:t.push(new g.hx(0,i.range,e.event.posx,e.event.posy));break;case 7:{const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2,o=!i.detail.isAfterLines&&"number"===typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),t}_onMouseLeave(e){const t=this._editor.getDomNode(),i=!t||!(0,c.U)(t,e.x,e.y);i&&this.hide()}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new g.hx(0,e,void 0,void 0),t,i,n,null)}async updateHoverVerbosityLevel(e,t,i){this._renderedContentHover?.updateHoverVerbosityLevel(e,t,i)}focusedHoverPartIndex(){return this._renderedContentHover?.focusedHoverPartIndex??-1}containsNode(e){return!!e&&this._contentHoverWidget.getDomNode().contains(e)}focus(){this._contentHoverWidget.focus()}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){return this._renderedContentHover?.isColorPickerVisible()??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};G=q([K(1,s._Y),K(2,a.b)],G);var Q,Y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Z=function(e,t){return function(i,n){t(i,n,e)}};const X=!1;let J=class extends o.jG{static{Q=this}static{this.ID="editor.contrib.contentHover"}constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._onHoverContentsChanged=this._register(new x.vl),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new o.Cm,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new l.uC((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}static get(e){return e.getContribution(Q.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0;const t=this._shouldNotHideCurrentHoverWidget(e);t||this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()}_isMouseOnContentHoverWidget(e){const t=this._contentWidget?.getDomNode();return!!t&&(0,c.U)(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;this._cancelScheduler();const t=this._shouldNotHideCurrentHoverWidget(e);t||X||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,i=(e,t)=>{const i=this._isMouseOnContentHoverWidget(e);return t&&i},n=e=>{const t=this._isMouseOnContentHoverWidget(e),i=this._contentWidget?.isColorPickerVisible??!1;return t&&i},o=(e,t)=>(t&&this._contentWidget?.containsNode(e.event.browserEvent.view?.document.activeElement)&&!e.event.browserEvent.view?.getSelection()?.isCollapsed)??!1;return i(e,t)||n(e)||o(e,t)}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._contentWidget?.isFocused||this._contentWidget?.isResizing)return;const t=this._hoverSettings.sticky;if(t&&this._contentWidget?.isVisibleFromKeyboard)return;const i=this._shouldNotRecomputeCurrentHoverWidget(e);if(i)return void this._reactToEditorMouseMoveRunner.cancel();const n=this._hoverSettings.hidingDelay,o=this._contentWidget?.isVisible,s=o&&t&&n>0;s?this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(n):this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;const t=e.target,i=t.element?.classList.contains("colorpicker-color-decoration"),n=this._editor.getOption(149),o=this._hoverSettings.enabled,s=this._hoverState.activatedByDecoratorClick;if(i&&("click"===n&&!s||"hover"===n&&!o&&!X||"clickAndHover"===n&&!o&&!s)||!i&&!o&&!s)return void this._hideWidgets();const r=this._tryShowHoverWidget(e);r||X||this._hideWidgets()}_tryShowHoverWidget(e){const t=this._getOrCreateContentWidget();return t.showsOrWillShow(e)}_onKeyDown(e){if(!this._editor.hasModel())return;const t=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=1===t.kind||2===t.kind&&(t.commandId===n.jA||t.commandId===n.jq||t.commandId===n.Zp)&&this._contentWidget?.isVisible;5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||i||this._hideWidgets()}_hideWidgets(){X||this._hoverState.mouseDown&&this._contentWidget?.isColorPickerVisible||r.bo.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._contentWidget?.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(G,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged((()=>this._onHoverContentsChanged.fire())))),this._contentWidget}showContentHover(e,t,i,n,o=!1){this._hoverState.activatedByDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}_isContentWidgetResizing(){return this._contentWidget?.widget.isResizing||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,t,i){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,t,i)}focus(){this._contentWidget?.focus()}scrollUp(){this._contentWidget?.scrollUp()}scrollDown(){this._contentWidget?.scrollDown()}scrollLeft(){this._contentWidget?.scrollLeft()}scrollRight(){this._contentWidget?.scrollRight()}pageUp(){this._contentWidget?.pageUp()}pageDown(){this._contentWidget?.pageDown()}goToTop(){this._contentWidget?.goToTop()}goToBottom(){this._contentWidget?.goToBottom()}get isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible}get isHoverVisible(){return this._contentWidget?.isVisible}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._contentWidget?.dispose()}};J=Q=Y([Z(1,s._Y),Z(2,a.b)],J)},43505:(e,t,i)=>{"use strict";i.d(t,{L:()=>d});var n=i(2150),o=i(44726),s=i(5091),r=i(13046),a=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},l=function(e,t){return function(i,n){t(i,n,e)}};const c=n.$;let d=class extends s.jG{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this.actions=[],this._hasContent=!1,this.hoverElement=c("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=n.BC(this.hoverElement,c("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;this._hasContent=!0;const n=this._register(o.jQ.render(this.actionsElement,e,i));return this.actions.push(n),n}append(e){const t=n.BC(this.actionsElement,e);return this._hasContent=!0,t}};d=a([l(0,r.b)],d)},35403:(e,t,i)=>{"use strict";i.d(t,{U:()=>d});var n=i(9659),o=i(67792),s=i(14396),r=i(16259),a=i(12847);class l{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}async function c(e,t,i,n,o){const r=await Promise.resolve(e.provideHover(i,n,o)).catch(s.M_);if(r&&h(r))return new l(e,r,t)}function d(e,t,i,o,s=!1){const r=e.ordered(t,s),a=r.map(((e,n)=>c(e,n,t,i,o)));return n.AE.fromPromises(a).coalesce()}function u(e,t,i,n,o=!1){return d(e,t,i,n,o).map((e=>e.hover)).toPromise()}function h(e){const t="undefined"!==typeof e.range,i="undefined"!==typeof e.contents&&e.contents&&e.contents.length>0;return t&&i}(0,r.ke)("_executeHoverProvider",((e,t,i)=>{const n=e.get(a.ILanguageFeaturesService);return u(n.hoverProvider,t,i,o.XO.None)})),(0,r.ke)("_executeHoverProvider_recursive",((e,t,i)=>{const n=e.get(a.ILanguageFeaturesService);return u(n.hoverProvider,t,i,o.XO.None,!0)}))},63907:(e,t,i)=>{"use strict";i.d(t,{G8:()=>_,Hm:()=>u,Hp:()=>a,K6:()=>r,MB:()=>l,Xp:()=>h,Zp:()=>m,dV:()=>s,iM:()=>f,ih:()=>d,jA:()=>o,jq:()=>p,vf:()=>c,vx:()=>g});var n=i(41337);const o="editor.action.showHover",s="editor.action.showDefinitionPreviewHover",r="editor.action.scrollUpHover",a="editor.action.scrollDownHover",l="editor.action.scrollLeftHover",c="editor.action.scrollRightHover",d="editor.action.pageUpHover",u="editor.action.pageDownHover",h="editor.action.goToTopHover",g="editor.action.goToBottomHover",p="editor.action.increaseHoverVerbosityLevel",f=n.kg({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),m="editor.action.decreaseHoverVerbosityLevel",_=n.kg({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level")},92048:(e,t,i)=>{"use strict";var n,o=i(63907),s=i(91348),r=i(16259),a=i(8690),l=i(57479),c=i(39405),d=i(81319),u=i(35350),h=i(41337);(function(e){e["NoAutoFocus"]="noAutoFocus",e["FocusIfVisible"]="focusIfVisible",e["AutoFocusImmediately"]="autoFocusImmediately"})(n||(n={}));class g extends r.ks{constructor(){super({id:o.jA,label:h.kg({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:h.aS("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[n.NoAutoFocus,n.FocusIfVisible,n.AutoFocusImmediately],enumDescriptions:[h.kg("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),h.kg("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),h.kg("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:n.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:l.R.editorTextFocus,primary:(0,s.m5)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const o=d.A.get(t);if(!o)return;const s=i?.focus;let r=n.FocusIfVisible;Object.values(n).includes(s)?r=s:"boolean"===typeof s&&s&&(r=n.AutoFocusImmediately);const l=e=>{const i=t.getPosition(),n=new a.Q(i.lineNumber,i.column,i.lineNumber,i.column);o.showContentHover(n,1,1,e)},c=2===t.getOption(2);o.isHoverVisible?r!==n.NoAutoFocus?o.focus():l(c):l(c||r===n.AutoFocusImmediately)}}class p extends r.ks{constructor(){super({id:o.dV,label:h.kg({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:h.aS("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,t){const i=d.A.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new a.Q(n.lineNumber,n.column,n.lineNumber,n.column),s=c.k.get(t);if(!s)return;const r=s.startFindDefinitionFromCursor(n);r.then((()=>{i.showContentHover(o,1,1,!0)}))}}class f extends r.ks{constructor(){super({id:o.K6,label:h.kg({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:16,weight:100},metadata:{description:h.aS("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollUp()}}class m extends r.ks{constructor(){super({id:o.Hp,label:h.kg({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:18,weight:100},metadata:{description:h.aS("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollDown()}}class _ extends r.ks{constructor(){super({id:o.MB,label:h.kg({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:15,weight:100},metadata:{description:h.aS("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollLeft()}}class v extends r.ks{constructor(){super({id:o.vf,label:h.kg({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:17,weight:100},metadata:{description:h.aS("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollRight()}}class b extends r.ks{constructor(){super({id:o.ih,label:h.kg({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:h.aS("pageUpHoverDescription","Page up the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.pageUp()}}class y extends r.ks{constructor(){super({id:o.Hm,label:h.kg({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:h.aS("pageDownHoverDescription","Page down the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.pageDown()}}class w extends r.ks{constructor(){super({id:o.Xp,label:h.kg({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:h.aS("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.goToTop()}}class C extends r.ks{constructor(){super({id:o.vx,label:h.kg({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:h.aS("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.goToBottom()}}class S extends r.ks{constructor(){super({id:o.jq,label:o.iM,alias:"Increase Hover Verbosity Level",precondition:l.R.hoverVisible})}run(e,t,i){const n=d.A.get(t);if(!n)return;const o=void 0!==i?.index?i.index:n.focusedHoverPartIndex();n.updateHoverVerbosityLevel(u.M$.Increase,o,i?.focus)}}class k extends r.ks{constructor(){super({id:o.Zp,label:o.G8,alias:"Decrease Hover Verbosity Level",precondition:l.R.hoverVisible})}run(e,t,i){const n=d.A.get(t);if(!n)return;const o=void 0!==i?.index?i.index:n.focusedHoverPartIndex();d.A.get(t)?.updateHoverVerbosityLevel(u.M$.Decrease,o,i?.focus)}}var x=i(66344),E=i(15911),L=i(38570),T=i(76035),I=i(2150),D=i(85053),R=i(9659),N=i(14396),A=i(5091),O=i(84366),P=i(12847),M=i(63637),F=i(51761),B=i(98948),W=i(69432),H=i(13977),V=i(45658),j=i(10170),z=i(44838),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$=function(e,t){return function(i,n){t(i,n,e)}};const q=I.$;class K{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const G={type:1,filter:{include:W.gB.QuickFix},triggerAction:W.fo.QuickFixHover};let Q=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const r of t){const t=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:o,c=this._markerDecorationsService.getMarker(i.uri,r);if(!c)continue;const d=new a.Q(e.range.startLineNumber,t,e.range.startLineNumber,l);s.push(new K(this,d,c))}return s}renderHoverParts(e,t){if(!t.length)return new L.Ke([]);const i=new A.Cm,n=[];t.forEach((t=>{const i=this._renderMarkerHover(t);e.fragment.appendChild(i.hoverElement),n.push(i)}));const o=1===t.length?t[0]:t.sort(((e,t)=>V.cj.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,o,i),new L.Ke(n)}_renderMarkerHover(e){const t=new A.Cm,i=q("div.hover-row"),n=I.BC(i,q("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=I.BC(n,q("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!==typeof r){const e=q("span");if(o){const t=I.BC(e,q("span"));t.innerText=o}const i=I.BC(e,q("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(I.ko(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()})));const s=I.BC(i,q("span"));s.innerText=r.value;const a=I.BC(n,e);a.style.opacity="0.6",a.style.paddingLeft="6px"}else{const e=I.BC(n,q("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`}if((0,D.EI)(a))for(const{message:e,resource:i,startLineNumber:o,startColumn:s}of a){const r=I.BC(n,q("div"));r.style.marginTop="8px";const a=I.BC(r,q("a"));a.innerText=`${(0,O.P8)(i)}(${o}, ${s}): `,a.style.cursor="pointer",t.add(I.ko(a,"click",(e=>{if(e.stopPropagation(),e.preventDefault(),this._openerService){const e={selection:{startLineNumber:o,startColumn:s}};this._openerService.open(i,{fromUserGesture:!0,editorOptions:e}).catch(N.dz)}})));const l=I.BC(r,q("span"));l.innerText=e,this._editor.applyFontInfo(l)}const c={hoverPart:e,hoverElement:i,dispose:()=>t.dispose()};return c}renderMarkerStatusbar(e,t,i){if(t.marker.severity===V.cj.Error||t.marker.severity===V.cj.Warning||t.marker.severity===V.cj.Info){const i=H.j.get(this._editor);i&&e.statusBar.addAction({label:h.kg("view problem","View Problem"),commandId:H.i.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(92)){const n=e.statusBar.append(q("div"));this.recentMarkerCodeActionsInfo&&(V.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===V.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=h.kg("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?A.jG.None:(0,R.EQ)((()=>n.textContent=h.kg("checkingForQuickFixes","Checking for quick fixes...")),200,i);n.textContent||(n.textContent=String.fromCharCode(160));const s=this.getCodeActions(t.marker);i.add((0,A.s)((()=>s.cancel()))),s.then((s=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:s.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return s.dispose(),void(n.textContent=h.kg("noQuickFixes","No quick fixes available"));n.style.display="none";let r=!1;i.add((0,A.s)((()=>{r||s.dispose()}))),e.statusBar.addAction({label:h.kg("quick fixes","Quick Fix..."),commandId:F.pQ,run:t=>{r=!0;const i=B.C.get(this._editor),n=I.BK(t);e.hide(),i?.showCodeActions(G,s,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),N.dz)}}getCodeActions(e){return(0,R.SS)((t=>(0,F.dU)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new a.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),G,z.ke.None,t)))}};Q=U([$(1,M.IMarkerDecorationsService),$(2,j.C),$(3,P.ILanguageFeaturesService)],Q);var Y=i(87778),Z=i(74742),X=i(36511),J=i(14573),ee=i(77850),te=i(44726),ie=i(42325),ne=i(9322);class oe{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=ne.ZS.Center}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[],n="lineNo"===this._laneOrLine;if(!t)return i;for(const o of t){const t=o.options.glyphMargin?.position??ne.ZS.Center;if(!n&&t!==this._laneOrLine)continue;const s=n?o.options.lineNumberHoverMessage:o.options.glyphMarginHoverMessage;s&&!(0,ie.it)(s)&&i.push(...(0,D._j)(s).map(e))}return i}}var se,re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};const le=I.$;let ce=class extends A.jG{static{se=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,i){super(),this._renderDisposeables=this._register(new A.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new te.N4),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new X.T({editor:this._editor},t,i)),this._computer=new oe(this._editor),this._hoverOperation=this._register(new ee.w(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._register(I.b2(this._hover.containerDomNode,"mouseleave",(e=>{this._onMouseLeave(e)}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return se.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){const e=Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code"));e.forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}showsOrWillShow(e){const t=e.target;return 2===t.type&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):3===t.type&&(this._startShowingAt(t.position.lineNumber,"lineNo"),!0)}_startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=le("div.hover-row.markdown-hover"),n=I.BC(t,le("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(o.element),i.appendChild(t)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(67),s=this._hover.containerDomNode.clientHeight,r=i-n-(s-o)/2,a=t.glyphMarginLeft+t.glyphMarginWidth+("lineNo"===this._computer.lane?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${a}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(r),0)}px`}_onMouseLeave(e){const t=this._editor.getDomNode(),i=!t||!(0,Z.U)(t,e.x,e.y);i&&this.hide()}};ce=se=re([ae(1,J.L),ae(2,j.C)],ce);var de=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ue=function(e,t){return function(i,n){t(i,n,e)}};const he=!1;let ge=class extends A.jG{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new A.Cm,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new R.uC((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0;const t=this._isMouseOnMarginHoverWidget(e);t||this._hideWidgets()}_isMouseOnMarginHoverWidget(e){const t=this._glyphWidget?.getDomNode();return!!t&&(0,Z.U)(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;this._cancelScheduler();const t=this._isMouseOnMarginHoverWidget(e);t||he||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,i=this._isMouseOnMarginHoverWidget(e);return t&&i}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;this._mouseMoveEvent=e;const t=this._shouldNotRecomputeCurrentHoverWidget(e);t?this._reactToEditorMouseMoveRunner.cancel():this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;const t=this._tryShowHoverWidget(e);t||he||this._hideWidgets()}_tryShowHoverWidget(e){const t=this._getOrCreateGlyphWidget();return t.showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){he||this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(ce,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};ge=de([ue(1,Y._Y)],ge);var pe=i(3115);class fe{}class me{}class _e{}(0,r.HW)(d.A.ID,d.A,2),(0,r.HW)(ge.ID,ge,2),(0,r.Fl)(g),(0,r.Fl)(p),(0,r.Fl)(f),(0,r.Fl)(m),(0,r.Fl)(_),(0,r.Fl)(v),(0,r.Fl)(b),(0,r.Fl)(y),(0,r.Fl)(w),(0,r.Fl)(C),(0,r.Fl)(S),(0,r.Fl)(k),L.B2.register(T.xJ),L.B2.register(Q),(0,E.zy)(((e,t)=>{const i=e.getColor(x.oZ8);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))})),pe.Z.register(new fe),pe.Z.register(new me),pe.Z.register(new _e)},77850:(e,t,i)=>{"use strict";i.d(t,{w:()=>l});var n=i(9659),o=i(14396),s=i(40231),r=i(5091);class a{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class l extends r.jG{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new s.vl),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new n.uC((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new n.uC((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new n.uC((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,n.bI)((e=>this._computer.computeAsync(e))),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){(0,o.dz)(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new a(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}},38570:(e,t,i)=>{"use strict";i.d(t,{B2:()=>r,Ke:()=>s,hx:()=>n,mm:()=>o});class n{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class o{constructor(e,t,i,n,o,s){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}class s{constructor(e){this.renderedHoverParts=e}dispose(){for(const e of this.renderedHoverParts)e.dispose()}}const r=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},74742:(e,t,i)=>{"use strict";i.d(t,{U:()=>o});var n=i(2150);function o(e,t,i){const o=n.BK(e);return!(to.left+o.width||io.top+o.height)}},76035:(e,t,i)=>{"use strict";i.d(t,{eH:()=>A,fm:()=>B,xJ:()=>P});var n=i(2150),o=i(85053),s=i(67792),r=i(42325),a=i(5091),l=i(36511),c=i(63907),d=i(8690),u=i(14573),h=i(38570),g=i(41337),p=i(32828),f=i(10170),m=i(12847),_=i(35350),v=i(48401),b=i(25923),y=i(23740),w=i(14396),C=i(13046),S=i(44726),k=i(41187),x=i(9659),E=i(35403),L=i(72786),T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};const D=n.$,R=(0,v.pU)("hover-increase-verbosity",b.W.add,g.kg("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),N=(0,v.pU)("hover-decrease-verbosity",b.W.remove,g.kg("decreaseHoverVerbosity","Icon for decreasing hover verbosity."));class A{constructor(e,t,i,n,o,s=void 0){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=o,this.source=s}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class O{constructor(e,t,i){this.hover=e,this.hoverProvider=t,this.hoverPosition=i}supportsVerbosityAction(e){switch(e){case _.M$.Increase:return this.hover.canIncreaseVerbosity??!1;case _.M$.Decrease:return this.hover.canDecreaseVerbosity??!1}}}let P=class{constructor(e,t,i,n,o,s,r,a){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=o,this._keybindingService=s,this._hoverService=r,this._commandService=a,this.hoverOrdinal=3}createLoadingMessage(e){return new A(this,e.range,[(new r.Bc).appendText(g.kg("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),a=[];let l=1e3;const c=i.getLineLength(n),u=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),h=this._editor.getOption(118),p=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:u});let f=!1;h>=0&&c>h&&e.range.startColumn>=h&&(f=!0,a.push(new A(this,e.range,[{value:g.kg("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,l++))),!f&&"number"===typeof p&&c>=p&&a.push(new A(this,e.range,[{value:g.kg("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,l++));let m=!1;for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,c=i.range.endLineNumber===n?i.range.endColumn:s,u=i.options.hoverMessage;if(!u||(0,r.it)(u))continue;i.options.beforeContentClassName&&(m=!0);const h=new d.Q(e.range.startLineNumber,t,e.range.startLineNumber,c);a.push(new A(this,h,(0,o._j)(u),m,l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return x.AE.EMPTY;const n=this._editor.getModel(),o=this._languageFeaturesService.hoverProvider;if(!o.has(n))return x.AE.EMPTY;const s=this._getMarkdownHovers(o,n,e,i);return s}_getMarkdownHovers(e,t,i,n){const o=i.range.getStartPosition(),s=(0,E.U)(e,t,o,n),a=s.filter((e=>!(0,r.it)(e.hover.contents))).map((e=>{const t=e.hover.range?d.Q.lift(e.hover.range):i.range,n=new O(e.hover,e.provider,o);return new A(this,t,e.hover.contents,!1,e.ordinal,n)}));return a}renderHoverParts(e,t){return this._renderedHoverParts=new F(t,e.fragment,this,this._editor,this._languageService,this._openerService,this._commandService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}updateMarkdownHoverVerbosityLevel(e,t,i){return Promise.resolve(this._renderedHoverParts?.updateMarkdownHoverPartVerbosityLevel(e,t,i))}};P=T([I(1,u.L),I(2,f.C),I(3,p.pG),I(4,m.ILanguageFeaturesService),I(5,C.b),I(6,k.TN),I(7,L.d)],P);class M{constructor(e,t,i){this.hoverPart=e,this.hoverElement=t,this.disposables=i}dispose(){this.disposables.dispose()}}class F{constructor(e,t,i,n,o,s,r,l,c,d,u){this._hoverParticipant=i,this._editor=n,this._languageService=o,this._openerService=s,this._commandService=r,this._keybindingService=l,this._hoverService=c,this._configurationService=d,this._onFinishedRendering=u,this._ongoingHoverOperations=new Map,this._disposables=new a.Cm,this.renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._disposables.add((0,a.s)((()=>{this.renderedHoverParts.forEach((e=>{e.dispose()})),this._ongoingHoverOperations.forEach((e=>{e.tokenSource.dispose(!0)}))})))}_renderHoverParts(e,t,i){return e.sort((0,o.VE)((e=>e.ordinal),o.U9)),e.map((e=>{const n=this._renderHoverPart(e,i);return t.appendChild(n.hoverElement),n}))}_renderHoverPart(e,t){const i=this._renderMarkdownHover(e,t),n=i.hoverElement,o=e.source,s=new a.Cm;if(s.add(i),!o)return new M(e,n,s);const r=o.supportsVerbosityAction(_.M$.Increase),l=o.supportsVerbosityAction(_.M$.Decrease);if(!r&&!l)return new M(e,n,s);const c=D("div.verbosity-actions");return n.prepend(c),s.add(this._renderHoverExpansionAction(c,_.M$.Increase,r)),s.add(this._renderHoverExpansionAction(c,_.M$.Decrease,l)),new M(e,n,s)}_renderMarkdownHover(e,t){const i=W(this._editor,e,this._languageService,this._openerService,t);return i}_renderHoverExpansionAction(e,t,i){const o=new a.Cm,s=t===_.M$.Increase,r=n.BC(e,D(y.L.asCSSSelector(s?R:N)));r.tabIndex=0;const l=new k.fO("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(o.add(this._hoverService.setupManagedHover(l,r,H(this._keybindingService,t))),!i)return r.classList.add("disabled"),o;r.classList.add("enabled");const d=()=>this._commandService.executeCommand(t===_.M$.Increase?c.jq:c.Zp);return o.add(new S.vV(r,d)),o.add(new S.M4(r,d,[3,10])),o}async updateMarkdownHoverPartVerbosityLevel(e,t,i=!0){const n=this._editor.getModel();if(!n)return;const o=this._getRenderedHoverPartAtIndex(t),s=o?.hoverPart.source;if(!o||!s?.supportsVerbosityAction(e))return;const r=await this._fetchHover(s,n,e);if(!r)return;const a=new O(r,s.hoverProvider,s.hoverPosition),l=o.hoverPart,c=new A(this._hoverParticipant,l.range,r.contents,l.isBeforeContent,l.ordinal,a),d=this._renderHoverPart(c,this._onFinishedRendering);return this._replaceRenderedHoverPartAtIndex(t,d,c),i&&this._focusOnHoverPartWithIndex(t),{hoverPart:c,hoverElement:d.hoverElement}}async _fetchHover(e,t,i){let n=i===_.M$.Increase?1:-1;const o=e.hoverProvider,r=this._ongoingHoverOperations.get(o);r&&(r.tokenSource.cancel(),n+=r.verbosityDelta);const a=new s.Qi;this._ongoingHoverOperations.set(o,{verbosityDelta:n,tokenSource:a});const l={verbosityRequest:{verbosityDelta:n,previousHover:e.hover}};let c;try{c=await Promise.resolve(o.provideHover(t,e.hoverPosition,a.token,l))}catch(e){(0,w.M_)(e)}return a.dispose(),this._ongoingHoverOperations.delete(o),c}_replaceRenderedHoverPartAtIndex(e,t,i){if(e>=this.renderedHoverParts.length||e<0)return;const n=this.renderedHoverParts[e],o=n.hoverElement,s=t.hoverElement,r=Array.from(s.children);o.replaceChildren(...r);const a=new M(i,o,t.disposables);o.focus(),n.dispose(),this.renderedHoverParts[e]=a}_focusOnHoverPartWithIndex(e){this.renderedHoverParts[e].hoverElement.focus()}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}function B(e,t,i,n,s){t.sort((0,o.VE)((e=>e.ordinal),o.U9));const r=[];for(const o of t)r.push(W(i,o,n,s,e.onContentsChanged));return new h.Ke(r)}function W(e,t,i,o,s){const c=new a.Cm,d=D("div.hover-row"),u=D("div.hover-row-contents");d.appendChild(u);const h=t.contents;for(const t of h){if((0,r.it)(t))continue;const a=D("div.markdown-hover"),d=n.BC(a,D("div.hover-contents")),h=c.add(new l.T({editor:e},i,o));c.add(h.onDidRenderAsync((()=>{d.className="hover-contents code-hover-contents",s()})));const g=c.add(h.render(t));d.appendChild(g.element),u.appendChild(a)}const g={hoverPart:t,hoverElement:d,dispose(){c.dispose()}};return g}function H(e,t){switch(t){case _.M$.Increase:{const t=e.lookupKeybinding(c.jq);return t?g.kg("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",t.getLabel()):g.kg("increaseVerbosity","Increase Hover Verbosity")}case _.M$.Decrease:{const t=e.lookupKeybinding(c.Zp);return t?g.kg("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",t.getLabel()):g.kg("decreaseVerbosity","Decrease Hover Verbosity")}}}},29754:(e,t,i)=>{"use strict";var n=i(9659),o=i(14396),s=i(64339),r=i(16259),a=i(8690),l=i(98581),c=i(57479),d=i(35037),u=i(4117),h=i(41337);class g{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range;return this._originalSelection.isEmpty()?new l.L(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new l.L(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var p,f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};let _=class{static{p=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(p.ID)}static{this.DECORATION=d.kI.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();const i=this.editor.getSelection(),r=this.editor.getModel();if(!r||!i)return;let c=i;if(c.startLineNumber!==c.endLineNumber)return;const d=new s.$t(this.editor,5),u=r.uri;return this.editorWorkerService.canNavigateValueSet(u)?(this.currentRequest=(0,n.SS)((e=>this.editorWorkerService.navigateValueSet(u,c,t))),this.currentRequest.then((t=>{if(!t||!t.range||!t.value)return;if(!d.validate(this.editor))return;const i=a.Q.lift(t.range);let s=t.range;const r=t.value.length-(c.endColumn-c.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+t.value.length},r>1&&(c=new l.L(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn+r-1));const u=new g(i,c,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,u),this.editor.pushUndoStop(),this.decorations.set([{range:s,options:p.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,n.wR)(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(o.dz)})).catch(o.dz)):Promise.resolve(void 0)}};_=p=f([m(1,u.IEditorWorkerService)],_);class v extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:h.kg("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:c.R.writable,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=_.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class b extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:h.kg("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:c.R.writable,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=_.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,r.HW)(_.ID,_,4),(0,r.Fl)(v),(0,r.Fl)(b)},54289:(e,t,i)=>{"use strict";var n=i(5091),o=i(20601),s=i(16259),r=i(27461),a=i(8690),l=i(57479),c=i(50395),d=i(69361),u=i(9286),h=i(41337),g=i(3874),p=i(67502),f=i(28346),m=i(79680),_=i(98581),v=i(56973);function b(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const s=t.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;if(!s)return[];const a=new v.no(e,s,t);n=Math.min(n,e.getLineCount());while(i<=n){if(!a.shouldIgnore(i))break;i++}if(i>n-1)return[];const{tabSize:l,indentSize:c,insertSpaces:d}=e.getOptions(),u=(e,t)=>(t=t||1,r.Y.shiftIndent(e,e.length+t,l,c,d)),h=(e,t)=>(t=t||1,r.Y.unshiftIndent(e,e.length+t,l,c,d)),g=[],p=e.getLineContent(i);let b=o.UU(p),w=b;a.shouldIncrease(i)?(w=u(w),b=u(b)):a.shouldIndentNextLine(i)&&(w=u(w)),i++;for(let t=i;t<=n;t++){if(y(e,t))continue;const i=e.getLineContent(t),n=o.UU(i),s=w;a.shouldDecrease(t,s)&&(w=h(w),b=h(b)),n!==w&&g.push(f.k.replaceMove(new _.L(t,1,t,n.length+1),(0,m.P)(w,c,d))),a.shouldIgnore(t)||(a.shouldIncrease(t,s)?(b=u(b),w=b):w=a.shouldIndentNextLine(t,s)?u(w):b)}return g}function y(e,t){if(!e.tokenization.isCheapToTokenize(t))return!1;const i=e.tokenization.getLineTokens(t);return 2===i.getStandardTokenType(0)}var w=i(70164),C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},S=function(e,t){return function(i,n){t(i,n,e)}};class k extends s.ks{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:k.ID,label:h.kg("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:l.R.writable,metadata:{description:h.aS("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new F(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}class x extends s.ks{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:x.ID,label:h.kg("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:l.R.writable,metadata:{description:h.aS("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new B(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}class E extends s.ks{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(g.GK),n=e.get(d.IModelService),o=t.getModel();if(!o)return;const s=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),r=o.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize&&e===r.tabSize?h.kg("configuredTabSize","Configured Tab Size"):e===s.tabSize?h.kg("defaultTabSize","Default Tab Size"):e===r.tabSize?h.kg("currentTabSize","Current Tab Size"):void 0}))),l=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:h.kg({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&o&&!o.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?o.updateOptions({tabSize:t}):o.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class L extends E{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:L.ID,label:h.kg("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:h.aS("indentUsingTabsDescription","Use indentation with tabs.")}})}}class T extends E{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:T.ID,label:h.kg("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:h.aS("indentUsingSpacesDescription","Use indentation with spaces.")}})}}class I extends E{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:I.ID,label:h.kg("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:h.aS("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}}class D extends s.ks{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:D.ID,label:h.kg("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:h.aS("detectIndentationDescription","Detect the indentation from content.")}})}run(e,t){const i=e.get(d.IModelService),n=t.getModel();if(!n)return;const o=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}class R extends s.ks{constructor(){super({id:"editor.action.reindentlines",label:h.kg("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:l.R.writable,metadata:{description:h.aS("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,t){const i=e.get(c.JZ),n=t.getModel();if(!n)return;const o=b(n,i,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class N extends s.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:h.kg("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:l.R.writable,metadata:{description:h.aS("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,t){const i=e.get(c.JZ),n=t.getModel();if(!n)return;const o=t.getSelections();if(null===o)return;const s=[];for(const e of o){let t=e.startLineNumber,o=e.endLineNumber;if(t!==o&&1===e.endColumn&&o--,1===t){if(t===o)continue}else t--;const r=b(n,i,t,o);s.push(...r)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class A{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const t of e)t.range&&"string"===typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(const e of this._edits)t.addEditOperation(a.Q.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let O=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new n.Cm,this.callOnModel=new n.Cm,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(12)<4||this.editor.getOption(55)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;const n=this.rangeContainsOnlyWhitespaceCharacters(i,e);if(n)return;if(P(i,e))return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const s=this.editor.getOption(12),{tabSize:l,indentSize:c,insertSpaces:d}=i.getOptions(),h=[],g={shiftIndent:e=>r.Y.shiftIndent(e,e.length+1,l,c,d),unshiftIndent:e=>r.Y.unshiftIndent(e,e.length+1,l,c,d)};let f=e.startLineNumber;while(f<=e.endLineNumber){if(!this.shouldIgnoreLine(i,f))break;f++}if(f>e.endLineNumber)return;let m=i.getLineContent(f);if(!/\S/.test(m.substring(0,e.startColumn-1))){const e=(0,p.$f)(s,i,i.getLanguageId(),f,g,this._languageConfigurationService);if(null!==e){const t=o.UU(m),n=u.c(e,l),s=u.c(t,l);if(n!==s){const e=u.k(n,l,d);h.push({range:new a.Q(f,1,f,t.length+1),text:e}),m=e+m.substring(t.length)}else{const e=(0,p.Yb)(i,f,this._languageConfigurationService);if(0===e||8===e)return}}}const _=f;while(fi.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===_?m:i.getLineContent(e)},n=(0,p.$f)(s,t,i.getLanguageId(),f+1,g,this._languageConfigurationService);if(null!==n){const t=u.c(n,l),s=u.c(o.UU(i.getLineContent(f+1)),l);if(t!==s){const n=t-s;for(let t=f+1;t<=e.endLineNumber;t++){const e=i.getLineContent(t),s=o.UU(e),r=u.c(s,l),c=r+n,g=u.k(c,l,d);g!==s&&h.push({range:new a.Q(t,1,t,s.length+1),text:g})}}}}if(h.length>0){this.editor.pushUndoStop();const e=new A(h,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){const i=e=>0===e.trim().length;let n=!0;if(t.startLineNumber===t.endLineNumber){const o=e.getLineContent(t.startLineNumber),s=o.substring(t.startColumn-1,t.endColumn-1);n=i(s)}else for(let o=t.startLineNumber;o<=t.endLineNumber;o++){const s=e.getLineContent(o);if(o===t.startLineNumber){const e=s.substring(t.startColumn-1);n=i(e)}else if(o===t.endLineNumber){const e=s.substring(0,t.endColumn-1);n=i(e)}else n=0===e.getLineFirstNonWhitespaceColumn(o);if(!n)break}return n}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function P(e,t){const i=t=>{const i=(0,w.T)(e,t);return 2===i};return i(t.getStartPosition())||i(t.getEndPosition())}function M(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e{"use strict";function n(e,t){let i=0;for(let n=0;nn,k:()=>o})},9945:(e,t,i)=>{"use strict";i.d(t,{CN:()=>h,EP:()=>c,P8:()=>u});var n=i(14396),o=i(5091),s=i(36788),r=i(8690),a=i(6657),l=i(29133);class c{constructor(e,t){this.range=e,this.direction=t}}class d{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new d(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(e){if("function"===typeof this.provider.resolveInlayHint){if(this._currentResolve){if(await this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),await this._currentResolve}}async _doResolve(e){try{const t=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=t?.tooltip??this.hint.tooltip,this.hint.label=t?.label??this.hint.label,this.hint.textEdits=t?.textEdits??this.hint.textEdits,this._isResolved=!0}catch(e){(0,n.M_)(e),this._isResolved=!1}}}class u{static{this._emptyInlayHintList=Object.freeze({dispose(){},hints:[]})}static async create(e,t,i,o){const s=[],r=e.ordered(t).reverse().map((e=>i.map((async i=>{try{const n=await e.provideInlayHints(t,i,o);(n?.hints.length||e.onDidChangeInlayHints)&&s.push([n??u._emptyInlayHintList,e])}catch(e){(0,n.M_)(e)}}))));if(await Promise.all(r.flat()),o.isCancellationRequested||t.isDisposed())throw new n.AL;return new u(i,s,t)}constructor(e,t,i){this._disposables=new o.Cm,this.ranges=e,this.provider=new Set;const n=[];for(const[e,o]of t){this._disposables.add(e),this.provider.add(o);for(const t of e.hints){const e=i.validatePosition(t.position);let s="before";const a=u._getRangeAtPosition(i,e);let l;a.getStartPosition().isBefore(e)?(l=r.Q.fromPositions(a.getStartPosition(),e),s="after"):(l=r.Q.fromPositions(e,a.getEndPosition()),s="before"),n.push(new d(t,new c(l,s),o))}}this.items=n.sort(((e,t)=>s.y.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new r.Q(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),s=t.column-1,a=o.findTokenIndexAtOffset(s);let l=o.getStartOffset(a),c=o.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=o.getStartOffset(a-1),c=o.getEndOffset(a-1)):c===s&&a{"use strict";var n=i(16259),o=i(38570),s=i(10753),r=i(50127);(0,n.HW)(s.M.ID,s.M,1),o.B2.register(r.u)},10753:(e,t,i)=>{"use strict";i.d(t,{M:()=>W,z:()=>F});var n,o=i(2150),s=i(85053),r=i(9659),a=i(67792),l=i(14396),c=i(5091),d=i(21553),u=i(50322),h=i(29133),g=i(66621),p=i(71203),f=i(35011),m=i(28346),_=i(8690),v=i(35350),b=i(9322),y=i(35037),w=i(85983),C=i(12847),S=i(64037),k=i(51170),x=i(9945),E=i(26805),L=i(72786),T=i(59857),I=i(87778),D=i(95062),R=i(66344),N=i(15911),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=function(e,t){return function(i,n){t(i,n,e)}};class P{constructor(){this._entries=new d.qK(50)}get(e){const t=P._key(e);return this._entries.get(t)}set(e,t){const i=P._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const M=(0,I.u1)("IInlayHintsCache");(0,T.v)(M,P,1);class F{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"===typeof e?{label:e}:e[this.index]}}class B{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let W=class{static{n=this}static{this.ID="editor.contrib.InlayHints"}static{this._MAX_DECORATORS=1500}static{this._MAX_LABEL_LEN=43}static get(e){return e.getContribution(n.ID)??void 0}constructor(e,t,i,n,o,s,r){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=o,this._notificationService=s,this._instaService=r,this._disposables=new c.Cm,this._sessionDisposables=new c.Cm,this._decorationsMetadata=new Map,this._ruleFactory=new g.Qn(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(142)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(142);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if("on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(o.Di.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),d.schedule(0)}})))}const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,c.s)((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const s=new Set,d=new r.uC((async()=>{const e=Date.now();n?.dispose(!0),n=new a.Qi;const i=t.onWillDispose((()=>n?.cancel()));try{const i=n.token,o=await x.P8.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(d.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void o.dispose();for(const e of o.provider)"function"!==typeof e.onDidChangeInlayHints||s.has(e)||(s.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{d.isScheduled()||d.schedule()}))));this._sessionDisposables.add(o),this._updateHintsDecorators(o.ranges,o.items),this._cacheHintsForFastRestore(t)}catch(e){(0,l.dz)(e)}finally{n.dispose(),i.dispose()}}),this._debounceInfo.get(t));this._sessionDisposables.add(d),this._sessionDisposables.add((0,c.s)((()=>n?.dispose(!0)))),d.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&d.isScheduled()||d.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{n?.cancel();const t=Math.max(d.delay,1250);d.schedule(t)}))),this._sessionDisposables.add(this._installDblClickGesture((()=>d.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new c.Cm,t=e.add(new k.gi(this._editor)),i=new c.Cm;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),o=this._editor.getModel();if(!n||!o)return void i.clear();const s=new a.Qi;i.add((0,c.s)((()=>s.dispose(!0)))),n.item.resolve(s.token),this._activeInlayHintPart=n.part.command||n.part.location?new B(n,t.hasTriggerModifier):void 0;const r=o.validatePosition(n.item.hint.position).lineNumber,l=new _.Q(r,1,r,o.getLineMaxColumn(r)),d=this._getInlineHintsForRange(l);this._updateHintsDecorators([l],d),i.add((0,c.s)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([l],d)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((async e=>{const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(E.U,e,this._editor,i.location):v.uB.is(i.command)&&await this._invokeCommand(i.command,t.item)}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((async t=>{if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(a.XO.None),(0,s.EI)(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>m.k.replace(_.Q.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))}_installContextMenu(){return this._editor.onContextMenu((async e=>{if(!(0,o.sb)(e.event.target))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(E.h,this._editor,e.event.target,t)}))}_getInlayHintLabelPart(e){if(6!==e.target.type)return;const t=e.target.detail.injectedText?.options;return t instanceof y.Ho&&t?.attachedData instanceof F?t.attachedData:void 0}async _invokeCommand(e,t){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(e){this._notificationService.notify({severity:D.AI.Error,source:t.provider.displayName,message:e})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const o=e.getDecorationRange(i);if(o){const e=new x.EP(o,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=30,t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const o of i.sort(_.Q.compareRangesUsingStarts)){const i=t.validateRange(new _.Q(o.startLineNumber-e,o.startColumn,o.endLineNumber+e,o.endColumn));0!==n.length&&_.Q.areIntersectingOrTouching(n[n.length-1],i)?n[n.length-1]=_.Q.plusRange(n[n.length-1],i):n.push(i)}return n}_updateHintsDecorators(e,t){const i=[],o=(e,t,n,o,s)=>{const r={content:n,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:o,attachedData:s};i.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},r=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(a/3|0)+"px",display:"inline-block"});o(e,i," ",t?b.VW.Right:b.VW.None)},{fontSize:a,fontFamily:l,padding:c,isUniform:d}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,l);let h={line:0,totalLen:0};for(const e of t){if(h.line!==e.anchor.range.startLineNumber&&(h={line:e.anchor.range.startLineNumber,totalLen:0}),h.totalLen>n._MAX_LABEL_LEN)continue;e.hint.paddingLeft&&r(e,!1);const t="string"===typeof e.hint.label?[{label:e.hint.label}]:e.hint.label;for(let i=0;i0&&(m=m.slice(0,-v)+"…",_=!0),o(e,this._ruleFactory.createClassNameRef(p),H(m),g&&!e.hint.paddingRight?b.VW.Right:b.VW.None,new F(e,i)),_)break}if(e.hint.paddingRight&&r(e,!0),i.length>n._MAX_DECORATORS)break}const g=[];for(const[t,i]of this._decorationsMetadata){const n=this._editor.getModel()?.getDecorationRange(t);n&&e.some((e=>e.containsRange(n)))&&(g.push(t),i.classNameRef.dispose(),this._decorationsMetadata.delete(t))}const m=p.D.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(g,i.map((e=>e.decoration)));for(let e=0;ei)&&(o=i);const s=e.fontFamily||n,r=!t&&s===n&&o===i;return{fontSize:o,fontFamily:s,padding:t,isUniform:r}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};function H(e){const t=" ";return e.replace(/[ \t]/g,t)}W=n=A([O(1,C.ILanguageFeaturesService),O(2,w.ILanguageFeatureDebounceService),O(3,M),O(4,L.d),O(5,D.Ot),O(6,I._Y)],W),L.w.registerCommand("_executeInlayHintProvider",(async(e,...t)=>{const[i,n]=t;(0,u.j)(h.r.isUri(i)),(0,u.j)(_.Q.isIRange(n));const{inlayHintsProvider:o}=e.get(C.ILanguageFeaturesService),s=await e.get(S.ITextModelService).createModelReference(i);try{const e=await x.P8.create(o,s.object.textEditorModel,[_.Q.lift(n)],a.XO.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{s.dispose()}}))},50127:(e,t,i)=>{"use strict";i.d(t,{u:()=>E});var n=i(9659),o=i(42325),s=i(36788),r=i(35037),a=i(38570),l=i(14573),c=i(64037),d=i(35403),u=i(76035),h=i(10753),g=i(32828),p=i(10170),f=i(12847),m=i(41337),_=i(25160),v=i(9945),b=i(85053),y=i(13046),w=i(41187),C=i(72786),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},k=function(e,t){return function(i,n){t(i,n,e)}};class x extends a.mm{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let E=class extends u.xJ{constructor(e,t,i,n,o,s,r,a,l){super(e,t,i,s,a,n,o,l),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){const t=h.M.get(this._editor);if(!t)return null;if(6!==e.target.type)return null;const i=e.target.detail.injectedText?.options;return i instanceof r.Ho&&i.attachedData instanceof h.z?new x(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof x?new n.AE((async t=>{const{part:n}=e;if(await n.item.resolve(i),i.isCancellationRequested)return;let s,r;if("string"===typeof n.item.hint.tooltip?s=(new o.Bc).appendText(n.item.hint.tooltip):n.item.hint.tooltip&&(s=n.item.hint.tooltip),s&&t.emitOne(new u.eH(this,e.range,[s],!1,0)),(0,b.EI)(n.item.hint.textEdits)&&t.emitOne(new u.eH(this,e.range,[(new o.Bc).appendText((0,m.kg)("hint.dbl","Double-click to insert"))],!1,10001)),"string"===typeof n.part.tooltip?r=(new o.Bc).appendText(n.part.tooltip):n.part.tooltip&&(r=n.part.tooltip),r&&t.emitOne(new u.eH(this,e.range,[r],!1,1)),n.part.location||n.part.command){let i;const s="altKey"===this._editor.getOption(78),r=s?_.zx?(0,m.kg)("links.navigate.kb.meta.mac","cmd + click"):(0,m.kg)("links.navigate.kb.meta","ctrl + click"):_.zx?(0,m.kg)("links.navigate.kb.alt.mac","option + click"):(0,m.kg)("links.navigate.kb.alt","alt + click");n.part.location&&n.part.command?i=(new o.Bc).appendText((0,m.kg)("hint.defAndCommand","Go to Definition ({0}), right click for more",r)):n.part.location?i=(new o.Bc).appendText((0,m.kg)("hint.def","Go to Definition ({0})",r)):n.part.command&&(i=new o.Bc(`[${(0,m.kg)("hint.cmd","Execute Command")}](${(0,v.CN)(n.part.command)} "${n.part.command.title}") (${r})`,{isTrusted:!0})),i&&t.emitOne(new u.eH(this,e.range,[i],!1,1e4))}const a=await this._resolveInlayHintLabelPartHover(n,i);for await(const e of a)t.emitOne(e)})):n.AE.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return n.AE.EMPTY;const{uri:i,range:r}=e.part.location,a=await this._resolverService.createModelReference(i);try{const i=a.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,d.U)(this._languageFeaturesService.hoverProvider,i,new s.y(r.startLineNumber,r.startColumn),t).filter((e=>!(0,o.it)(e.hover.contents))).map((t=>new u.eH(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):n.AE.EMPTY}finally{a.dispose()}}};E=S([k(1,l.L),k(2,p.C),k(3,y.b),k(4,w.TN),k(5,g.pG),k(6,c.ITextModelService),k(7,f.ILanguageFeaturesService),k(8,C.d)],E)},26805:(e,t,i)=>{"use strict";i.d(t,{U:()=>v,h:()=>_});var n=i(2150),o=i(55664),s=i(67792),r=i(23264),a=i(8690),l=i(64037),c=i(3815),d=i(55571),u=i(6330),h=i(72786),g=i(18904),p=i(46403),f=i(87778),m=i(95062);async function _(e,t,i,d){const g=e.get(l.ITextModelService),_=e.get(p.Z),v=e.get(h.d),b=e.get(f._Y),y=e.get(m.Ot);if(await d.item.resolve(s.XO.None),!d.part.location)return;const w=d.part.location,C=[],S=new Set(u.ZG.getMenuItems(u.D8.EditorContext).map((e=>(0,u.is)(e)?e.command.id:(0,r.b)())));for(const e of c.bn.all())S.has(e.desc.id)&&C.push(new o.rc(e.desc.id,u.Xe.label(e.desc,{renderShortTitle:!0}),void 0,!0,(async()=>{const i=await g.createModelReference(w.uri);try{const n=new c.QS(i.object.textEditorModel,a.Q.getStartPosition(w.range)),o=d.item.anchor.range;await b.invokeFunction(e.runEditorCommand.bind(e),t,n,o)}finally{i.dispose()}})));if(d.part.command){const{command:e}=d.part;C.push(new o.wv),C.push(new o.rc(e.id,e.title,void 0,!0,(async()=>{try{await v.executeCommand(e.id,...e.arguments??[])}catch(e){y.notify({severity:m.AI.Error,source:d.item.provider.displayName,message:e})}})))}const k=t.getOption(128);_.showContextMenu({domForShadowRoot:k?t.getDomNode()??void 0:void 0,getAnchor:()=>{const e=n.BK(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>C,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}async function v(e,t,i,n){const o=e.get(l.ITextModelService),s=await o.createModelReference(n.uri);await i.invokeWithinContext((async e=>{const o=t.hasSideBySideModifier,r=e.get(g.fN),l=d.x2.inPeekEditor.getValue(r),u=!o&&i.getOption(89)&&!l,h=new c.mR({openToSide:o,openInPeek:u,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0});return h.run(e,new c.QS(s.object.textEditorModel,a.Q.getStartPosition(n.range)),a.Q.lift(n.range))})),s.dispose()}},25695:(e,t,i)=>{"use strict";i.d(t,{PA:()=>s,Vl:()=>o,Wt:()=>n});const n="editor.action.inlineSuggest.commit",o="editor.action.inlineSuggest.showPrevious",s="editor.action.inlineSuggest.showNext"},74706:(e,t,i)=>{"use strict";i.d(t,{p:()=>c});var n=i(39751),o=i(20601),s=i(32142),r=i(18904),a=i(5091),l=i(41337);class c extends a.jG{static{this.inlineSuggestionVisible=new r.N1("inlineSuggestionVisible",!1,(0,l.kg)("inlineSuggestionVisible","Whether an inline suggestion is visible"))}static{this.inlineSuggestionHasIndentation=new r.N1("inlineSuggestionHasIndentation",!1,(0,l.kg)("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"))}static{this.inlineSuggestionHasIndentationLessThanTabSize=new r.N1("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,l.kg)("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"))}static{this.suppressSuggestions=new r.N1("inlineSuggestionSuppressSuggestions",void 0,(0,l.kg)("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))}constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=c.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=c.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=c.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=c.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,n.fm)((e=>{const t=this.model.read(e),i=t?.state.read(e),n=!!i?.inlineCompletion&&void 0!==i?.primaryGhostText&&!i?.primaryGhostText.isEmpty();this.inlineCompletionVisible.set(n),i?.primaryGhostText&&i?.inlineCompletion&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register((0,n.fm)((e=>{const t=this.model.read(e);let i=!1,n=!0;const r=t?.primaryGhostText.read(e);if(t?.selectedSuggestItem&&r&&r.parts.length>0){const{column:e,lines:a}=r.parts[0],l=a[0],c=t.textModel.getLineIndentColumn(r.lineNumber),d=e<=c;if(d){let e=(0,o.HG)(l);-1===e&&(e=l.length-1),i=e>0;const r=t.textModel.getOptions().tabSize,a=s.A.visibleColumnFromColumn(l,e+1,r);n=a{"use strict";i.d(t,{Pm:()=>N,bo:()=>P});var n,o=i(2150),s=i(64236),r=i(92678),a=i(55664),l=i(85053),c=i(9659),d=i(25923),u=i(5091),h=i(39751),g=i(42389),p=i(25160),f=i(23740),m=i(36788),_=i(35350),v=i(25695),b=i(41337),y=i(85141),w=i(64164),C=i(6330),S=i(72786),k=i(18904),x=i(46403),E=i(87778),L=i(13046),T=i(11086),I=i(48401),D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};let N=class extends u.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,h.y0)(this,this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(62).showToolbar)),this.sessionPosition=void 0,this.position=(0,h.un)(this,(e=>{const t=this.model.read(e)?.primaryGhostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||0===t.parts.length)return this.sessionPosition=void 0,null;const i=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);const n=new m.y(t.lineNumber,Math.min(i,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=n,n})),this._register((0,h.yC)(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const o=(0,g.rm)(((t,i)=>{const o=i.add(this.instantiationService.createInstance(P,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.activeCommands));return e.addContentWidget(o),i.add((0,u.s)((()=>e.removeContentWidget(o)))),i.add((0,h.fm)((e=>{const t=this.position.read(e);t&&n.lastTriggerKind.read(e)!==_.qw.Explicit&&n.triggerExplicitly()}))),o})),s=(0,h.ZX)(this,((e,t)=>!!this.position.read(e)||!!t));i.add((0,h.fm)((e=>{s.read(e)&&o.read(e)})))})))}};N=D([R(2,E._Y)],N);const A=(0,I.pU)("inline-suggestion-hints-next",d.W.chevronRight,(0,b.kg)("parameterHintsNextIcon","Icon for show next parameter hint.")),O=(0,I.pU)("inline-suggestion-hints-previous",d.W.chevronLeft,(0,b.kg)("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let P=class extends u.jG{static{n=this}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(e,t,i){const n=new a.rc(e,t,i,!0,(()=>this._commandService.executeCommand(e))),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return o&&(s=(0,b.kg)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),n.tooltip=s,n}constructor(e,t,i,s,r,l,d,u,g,p,m){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=s,this._suggestionCount=r,this._extraCommands=l,this._commandService=d,this.keybindingService=g,this._contextKeyService=p,this._menuService=m,this.id="InlineSuggestionHintsContentWidget"+n.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,o.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,o.h)("div@toolBar")]),this.previousAction=this.createCommandAction(v.Vl,(0,b.kg)("previous","Previous"),f.L.asClassName(O)),this.availableSuggestionCountAction=new a.rc("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(v.PA,(0,b.kg)("next","Next"),f.L.asClassName(A)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(C.D8.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new c.uC((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new c.uC((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.toolBar=this._register(u.createInstance(B,this.nodes.toolBar,C.D8.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof C.Xe)return u.createInstance(F,e,void 0);if(e===this.availableSuggestionCountAction){const t=new M(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{n._dropDownVisible=e}))),this._register((0,h.fm)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,h.fm)((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register((0,h.fm)((e=>{const t=this._extraCommands.read(e),i=t.map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[e,t]of this.inlineCompletionsActionsMenus.getActions())for(const e of t)e instanceof C.Xe&&i.push(e);i.length>0&&i.unshift(new a.wv),this.toolBar.setAdditionalSecondaryActions(i)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};P=n=D([R(6,S.d),R(7,E._Y),R(8,L.b),R(9,k.fN),R(10,C.ez)],P);class M extends s.Z4{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}class F extends y.oq{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,o.h)("div.keybinding").root,i=this._register(new r.x(t,p.OS,{disableTitle:!0,...r.l}));i.set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let B=class extends w.p{constructor(e,t,i,n,o,s,r,a,l){super(e,{resetMenu:t,...i},n,o,s,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){const e=[],t=[];(0,y.Ot)(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){(0,l.aI)(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){(0,l.aI)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};B=D([R(3,C.ez),R(4,k.fN),R(5,x.Z),R(6,L.b),R(7,S.d),R(8,T.k)],B)},97798:(e,t,i)=>{"use strict";var n=i(16259),o=i(38570),s=i(39751),r=i(81275),a=i(57479),l=i(25695),c=i(74706),d=i(2150),u=i(5091);function h(e){const t=new u.Cm,i=t.add((0,d.jh)());return t.add((0,s.fm)((t=>{i.setStyle(e.read(t))}))),t}var g=i(19950),p=i(9659),f=i(67792),m=i(42389),_=i(79741),v=i(50322),b=i(32378),y=i(55745),w=i(36788),C=i(85983),S=i(12847),k=i(21776),x=i(40231),E=i(20601),L=i(11320),T=i(35011),I=i(8690),D=i(13647),R=i(14573),N=i(9322),A=i(70164),O=i(1550),P=i(20529),M=i(85029),F=i(39842),B=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},W=function(e,t){return function(i,n){t(i,n,e)}};const H="ghost-text";let V=class extends u.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,s.FY)(this,!1),this.currentTextModel=(0,s.y0)(this,this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,s.un)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof M.Vs?i.columnRange:void 0,o=[],s=[];function r(e,t){if(s.length>0){const i=s[s.length-1];t&&i.decorations.push(new O.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)s.push({content:i,decorations:t?[new O.d(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,c=0;for(const e of i.parts){let t=e.lines;void 0===l?(o.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):r([a.substring(c,e.column-1)],void 0),t.length>0&&(r(t,H),void 0===l&&e.column<=a.length&&(l=e.column)),c=e.column-1}void 0!==l&&r([a.substring(c)],void 0);const d=void 0!==l?new F.GM(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:o,additionalLines:s,hiddenRange:d,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=(0,s.un)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const e of t.inlineTexts)i.push({range:I.Q.fromPositions(new w.y(t.lineNumber,e.column)),options:{description:H,after:{content:e.text,inlineClassName:e.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:N.VW.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new j(this.editor,this.languageService.languageIdCodec,(0,s.un)((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register((0,u.s)((()=>{this.isDisposed.set(!0,void 0)}))),this._register((0,F.pY)(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};V=B([W(2,R.L)],V);class j extends u.jG{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=(0,s.yQ)("editorOptionChanged",x.Jh.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(33)||e.hasChanged(118)||e.hasChanged(100)||e.hasChanged(95)||e.hasChanged(51)||e.hasChanged(50)||e.hasChanged(67)))),this._register((0,s.fm)((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");z(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i,afterColumnAffinity:1})}}))}}function z(e,t,i,n,o){const s=n.get(33),r=n.get(118),a="none",l=n.get(95),c=n.get(51),d=n.get(50),u=n.get(67),h=new D.fe(1e4);h.appendString('
    ');for(let e=0,n=i.length;e');const p=E.aC(g),f=E.E_(g),m=A.f.createEmpty(g,o);(0,P.UW)(new P.zL(d.isMonospace&&!s,d.canUseHalfwidthRightwardsArrow,g,!1,p,f,0,m,n.decorations,t,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,a,l,c!==T.Bc.OFF,null),h),h.appendString("
    ")}h.appendString(""),(0,L.M)(e,d);const g=h.build(),p=U?U.createHTML(g):g;e.innerHTML=p}const U=(0,k.H)("editorGhostText",{createHTML:e=>e});var $=i(27982),q=i(85053),K=i(43654),G=i(45746),Q=i(14396),Y=i(28346),Z=i(98581),X=i(362),J=i(33904),ee=i(35350),te=i(50395),ie=i(10695),ne=i(46576),oe=i(40651);function se(e,t,i){const n=i?e.range.intersectRanges(i):e.range;if(!n)return e;const o=t.getValueInRange(n,1),s=(0,E.Qp)(o,e.text),r=J.W.ofText(o.substring(0,s)).addToPosition(e.range.getStartPosition()),a=e.text.substring(s),l=I.Q.fromPositions(r,e.range.getEndPosition());return new X.WR(l,a)}function re(e,t){return e.text.startsWith(t.text)&&le(e.range,t.range)}function ae(e,t,i,n,o=0){let s=se(e,t);if(s.range.endLineNumber!==s.range.startLineNumber)return;const r=t.getLineContent(s.range.startLineNumber),a=(0,E.UU)(r).length,l=s.range.startColumn-1<=a;if(l){const e=(0,E.UU)(s.text).length,t=r.substring(s.range.startColumn-1,a),[i,n]=[s.range.getStartPosition(),s.range.getEndPosition()],o=i.column+t.length<=n.column?i.delta(0,t.length):n,l=I.Q.fromPositions(o,n),c=s.text.startsWith(t)?s.text.substring(t.length):s.text.substring(e);s=new X.WR(l,c)}const c=t.getValueInRange(s.range),d=de(c,s.text);if(!d)return;const u=s.range.startLineNumber,h=new Array;if("prefix"===i){const e=d.filter((e=>0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==c.length)return}const g=s.text.length-o;for(const e of d){const t=s.range.startColumn+e.originalStart+e.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===s.range.startLineNumber&&t0)return;if(0===e.modifiedLength)continue;const o=e.modifiedStart+e.modifiedLength,r=Math.max(e.modifiedStart,Math.min(o,g)),a=s.text.substring(e.modifiedStart,r),l=s.text.substring(r,Math.max(e.modifiedStart,o));a.length>0&&h.push(new M.yP(t,a,!1)),l.length>0&&h.push(new M.yP(t,l,!0))}return new M.xD(u,h)}function le(e,t){return t.getStartPosition().equals(e.getStartPosition())&&t.getEndPosition().isBeforeOrEqual(e.getEndPosition())}let ce;function de(e,t){if(ce?.originalValue===e&&ce?.newValue===t)return ce?.changes;{let i=he(e,t,!0);if(i){const n=ue(i);if(n>0){const o=he(e,t,!1);o&&ue(o)5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const o=Math.max(n(e),n(t));function s(e){if(e<0)throw new Error("unexpected");return o+e+1}function r(e){let t=0,n=0;const o=new Int32Array(e.length);for(let r=0,a=e.length;ra},{getElements:()=>l}).ComputeDiff(!1).changes}var ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},pe=function(e,t){return function(i,n){t(i,n,e)}};let fe=class extends u.jG{constructor(e,t,i,n,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=o,this._updateOperation=this._register(new u.HE),this.inlineCompletions=(0,s.X2)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,s.X2)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){const n=new _e(e,t,this.textModel.getVersionId()),o=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(this._updateOperation.value?.request.satisfies(n))return this._updateOperation.value.promise;if(o.get()?.request.satisfies(n))return Promise.resolve(!0);const r=!!this._updateOperation.value;this._updateOperation.clear();const a=new f.Qi,l=(async()=>{const l=r||t.triggerKind===ee.qw.Automatic;if(l&&await me(this._debounceValue.get(this.textModel),a.token),a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==n.versionId)return!1;const c=new Date,d=await(0,ne.Yk)(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,a.token,this.languageConfigurationService);if(a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==n.versionId)return!1;const u=new Date;this._debounceValue.update(this.textModel,u.getTime()-c.getTime());const h=new be(d,n,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!d.has(t)&&h.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),(0,s.Rn)((e=>{o.set(h,e)})),!0})(),c=new ve(n,a,l);return this._updateOperation.value=c,l}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){this._updateOperation.value?.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};function me(e,t){return new Promise((i=>{let n;const o=setTimeout((()=>{n&&n.dispose(),i()}),e);t&&(n=t.onCancellationRequested((()=>{clearTimeout(o),n&&n.dispose(),i()})))}))}fe=ge([pe(3,S.ILanguageFeaturesService),pe(4,te.JZ)],fe);class _e{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&(0,G.KC)(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(0,G.r)())&&(e.context.triggerKind===ee.qw.Automatic||this.context.triggerKind===ee.qw.Explicit)&&this.versionId===e.versionId}}class ve{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class be{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this._textModel=i,this._versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[];const o=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new ye(e,o[t],this._textModel,this._versionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this._textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new ye(e,n,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}}class ye{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this._textModel=i,this._modelVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=(0,s.C)({owner:this,equalsFn:I.Q.equalsRange},(e=>(this._modelVersion.read(e),this._textModel.getDecorationRange(this.decorationId))))}toInlineCompletion(e){return this.inlineCompletion.withRange(this._updatedRange.read(e)??we)}toSingleTextEdit(e){return new X.WR(this._updatedRange.read(e)??we,this.inlineCompletion.insertText)}isVisible(e,t,i){const n=se(this._toFilterTextReplacement(i),e),o=this._updatedRange.read(i);if(!o||!this.inlineCompletion.range.getStartPosition().equals(o.getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const s=e.getValueInRange(n.range,1),r=n.text,a=Math.max(0,t.column-n.range.startColumn);let l=r.substring(0,a),c=r.substring(a),d=s.substring(0,a),u=s.substring(a);const h=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=h&&(d=d.trimStart(),0===d.length&&(u=u.trimStart()),l=l.trimStart(),0===l.length&&(c=c.trimStart())),l.startsWith(d)&&!!(0,ie.dE)(u,c)}canBeReused(e,t){const i=this._updatedRange.read(void 0),n=!!i&&i.containsPosition(t)&&this.isVisible(e,t,void 0)&&J.W.ofRange(i).isGreaterThanOrEqualTo(J.W.ofRange(this.inlineCompletion.range));return n}_toFilterTextReplacement(e){return new X.WR(this._updatedRange.read(e)??we,this.inlineCompletion.filterText)}}const we=new I.Q(1,1,1,1);var Ce=i(82397),Se=i(72786),ke=i(87778),xe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ee=function(e,t){return function(i,n){t(i,n,e)}};let Le=class extends u.jG{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,o,r,a,l,c,d,u,h){let g;super(),this.textModel=e,this.selectedSuggestItem=t,this._textModelVersionId=i,this._positions=n,this._debounceValue=o,this._suggestPreviewEnabled=r,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=u,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(fe,this.textModel,this._textModelVersionId,this._debounceValue)),this._isActive=(0,s.FY)(this,!1),this._forceUpdateExplicitlySignal=(0,s.Yd)(this),this._selectedInlineCompletionId=(0,s.FY)(this,void 0),this._primaryPosition=(0,s.un)(this,(e=>this._positions.read(e)[0]??new w.y(1,1))),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([Te.Redo,Te.Undo,Te.AcceptWord]),this._fetchInlineCompletionsPromise=(0,s.nb)({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:ee.qw.Automatic}),handleChange:(e,t)=>(e.didChange(this._textModelVersionId)&&this._preserveCurrentCompletionReasons.has(this._getReason(e.change))?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=ee.qw.Explicit),!0)},((e,t)=>{this._forceUpdateExplicitlySignal.read(e);const i=this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e);if(!i)return void this._source.cancelUpdate();this._textModelVersionId.read(e);const n=this._source.suggestWidgetInlineCompletions.get(),o=this.selectedSuggestItem.read(e);if(n&&!o){const e=this._source.inlineCompletions.get();(0,s.Rn)((t=>{(!e||n.request.versionId>e.request.versionId)&&this._source.inlineCompletions.set(n.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const r=this._primaryPosition.read(e),a={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:o?.toSelectedSuggestionInfo()},l=this.selectedInlineCompletion.get(),c=t.preserveCurrentCompletion||l?.forwardStable?l:void 0;return this._source.fetch(r,a,c)})),this._filteredInlineCompletionItems=(0,s.C)({owner:this,equalsFn:(0,G.S3)()},(e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this._primaryPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=(0,s.un)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=(0,s.un)(this,(e=>{const t=this._filteredInlineCompletionItems.read(e),i=this.selectedInlineCompletionIndex.read(e);return t[i]})),this.activeCommands=(0,s.C)({owner:this,equalsFn:(0,G.S3)()},(e=>this.selectedInlineCompletion.read(e)?.inlineCompletion.source.inlineCompletions.commands??[])),this.lastTriggerKind=this._source.inlineCompletions.map(this,(e=>e?.request.context.triggerKind)),this.inlineCompletionsCount=(0,s.un)(this,(e=>this.lastTriggerKind.read(e)===ee.qw.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=(0,s.C)({owner:this,equalsFn:(e,t)=>e&&t?(0,M.AL)(e.ghostTexts,t.ghostTexts)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{const t=this.textModel,i=this.selectedSuggestItem.read(e);if(i){const n=se(i.toSingleTextEdit(),t),o=this._computeAugmentation(n,e),s=this._suggestPreviewEnabled.read(e);if(!s&&!o)return;const r=o?.edit??n,a=o?o.edit.text.length-n.text.length:0,l=this._suggestPreviewMode.read(e),c=this._positions.read(e),d=[r,...Ie(this.textModel,c,r)],u=d.map(((e,i)=>ae(e,t,l,c[i],a))).filter(v.O9),h=u[0]??new M.xD(r.range.endLineNumber,[]);return{edits:d,primaryGhostText:h,ghostTexts:u,inlineCompletion:o?.completion,suggestItem:i}}{if(!this._isActive.read(e))return;const i=this.selectedInlineCompletion.read(e);if(!i)return;const n=i.toSingleTextEdit(e),o=this._inlineSuggestMode.read(e),s=this._positions.read(e),r=[n,...Ie(this.textModel,s,n)],a=r.map(((e,i)=>ae(e,t,o,s[i],0))).filter(v.O9);if(!a[0])return;return{edits:r,primaryGhostText:a[0],ghostTexts:a,inlineCompletion:i,suggestItem:void 0}}})),this.ghostTexts=(0,s.C)({owner:this,equalsFn:M.AL},(e=>{const t=this.state.read(e);if(t)return t.ghostTexts})),this.primaryGhostText=(0,s.C)({owner:this,equalsFn:M.x9},(e=>{const t=this.state.read(e);if(t)return t?.primaryGhostText})),this._register((0,s.OI)(this._fetchInlineCompletionsPromise)),this._register((0,s.fm)((e=>{const t=this.state.read(e),i=t?.inlineCompletion;if(i?.semanticId!==g?.semanticId&&(g=i,i)){const e=i.inlineCompletion,t=e.source;t.provider.handleItemDidShow?.(t.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}_getReason(e){return e?.isUndoing?Te.Undo:e?.isRedoing?Te.Redo:this.isAcceptingPartially?Te.AcceptWord:Te.Other}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){(0,s.PO)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineCompletionsPromise.get()}stop(e){(0,s.PO)(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentation(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),o=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(v.O9),s=(0,K.oH)(o,(n=>{let o=n.toSingleTextEdit(t);return o=se(o,i,I.Q.fromPositions(o.range.getStartPosition(),e.range.getEndPosition())),re(o,e)?{completion:n,edit:o}:void 0}));return s}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new Q.D7;const t=this.state.get();if(!t||t.primaryGhostText.isEmpty()||!t.inlineCompletion)return;const i=t.inlineCompletion.toInlineCompletion(void 0);if(i.command&&i.source.addRef(),e.pushUndoStop(),i.snippetInfo)e.executeEdits("inlineSuggestion.accept",[Y.k.replace(i.range,""),...i.additionalTextEdits]),e.setPosition(i.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),Ce.O.get(e)?.insert(i.snippetInfo.snippet,{undoStopBefore:!1});else{const n=t.edits,o=Re(n).map((e=>Z.L.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",[...n.map((e=>Y.k.replace(e.range,e.text))),...i.additionalTextEdits]),e.setSelections(o,"inlineCompletionAccept")}this.stop(),i.command&&(await this._commandService.executeCommand(i.command.id,...i.command.arguments||[]).then(void 0,Q.M_),i.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),o=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),s=t.match(o);let r=0;r=s&&void 0!==s.index?0===s.index?s[0].length:s.index:t.length;const a=/\s+/g,l=a.exec(t);return l&&void 0!==l.index&&l.index+l[0].length{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}),1)}async _acceptNext(e,t,i){if(e.getModel()!==this.textModel)throw new Q.D7;const n=this.state.get();if(!n||n.primaryGhostText.isEmpty()||!n.inlineCompletion)return;const o=n.primaryGhostText,s=n.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText)return void await this.accept(e);const r=o.parts[0],a=new w.y(o.lineNumber,r.column),l=r.text,c=t(a,l);if(c===l.length&&1===o.parts.length)return void this.accept(e);const d=l.substring(0,c),u=this._positions.get(),h=u[0];s.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const t=I.Q.fromPositions(h,a),i=e.getModel().getValueInRange(t)+d,n=new X.WR(t,i),o=[n,...Ie(this.textModel,u,n)],s=Re(o).map((e=>Z.L.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",o.map((e=>Y.k.replace(e.range,e.text)))),e.setSelections(s,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){const t=I.Q.fromPositions(s.range.getStartPosition(),J.W.ofText(d).addToPosition(a)),n=e.getModel().getValueInRange(t,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,n.length,{kind:i})}}finally{s.source.removeRef()}}handleSuggestAccepted(e){const t=se(e.toSingleTextEdit(),this.textModel),i=this._computeAugmentation(t,void 0);if(!i)return;const n=i.completion.inlineCompletion;n.source.provider.handlePartialAccept?.(n.source.inlineCompletions,n.sourceInlineCompletion,t.text.length,{kind:2})}};var Te;function Ie(e,t,i){if(1===t.length)return[];const n=t[0],o=t.slice(1),s=i.range.getStartPosition(),r=i.range.getEndPosition(),a=e.getValueInRange(I.Q.fromPositions(n,r)),l=(0,F.tN)(n,s);if(l.lineNumber<1)return(0,Q.dz)(new Q.D7(`positionWithinTextEdit line number should be bigger than 0.\n\t\t\tInvalid subtraction between ${n.toString()} and ${s.toString()}`)),[];const c=De(i.text,l);return o.map((t=>{const i=(0,F.OA)((0,F.tN)(t,s),r),n=e.getValueInRange(I.Q.fromPositions(t,i)),o=(0,E.Qp)(a,n),l=I.Q.fromPositions(t,t.delta(0,o));return new X.WR(l,c)}))}function De(e,t){let i="";const n=(0,E.en)(e);for(let e=t.lineNumber-1;ee.range),I.Q.compareRangesUsingStarts)),i=new X.mF(t.apply(e)),n=i.getNewRanges(),o=t.inverse().apply(n);return o.map((e=>e.getEndPosition()))}Le=xe([Ee(9,ke._Y),Ee(10,Se.d),Ee(11,te.JZ)],Le),function(e){e[e["Undo"]=0]="Undo",e[e["Redo"]=1]="Redo",e[e["AcceptWord"]=2]="AcceptWord",e[e["Other"]=3]="Other"}(Te||(Te={}));var Ne=i(18760),Ae=i(2463),Oe=i(79266);class Pe extends u.jG{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,t,i){super(),this.editor=e,this.suggestControllerPreselector=t,this.onWillAccept=i,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new x.vl),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const n=Oe.D.get(this.editor);if(n){this._register(n.registerSelector({priority:100,select:(e,t,i)=>{const o=this.editor.getModel();if(!o)return-1;const s=this.suggestControllerPreselector(),r=s?se(s,o):void 0;if(!r)return-1;const a=w.y.lift(t),l=i.map(((e,t)=>{const i=Me.fromSuggestion(n,o,a,e,this.isShiftKeyPressed),s=se(i.toSingleTextEdit(),o),l=re(r,s);return{index:t,valid:l,prefixLength:s.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),c=(0,K.Cn)(l,(0,q.VE)((e=>e.prefixLength),q.U9));return c?c.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(n.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(n.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(n.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(x.Jh.once(n.model.onDidTrigger)((e=>{t()}))),this._register(n.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const o=Me.fromSuggestion(n,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(o)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();this._isActive===e&&Fe(this._currentSuggestItemInfo,t)||(this._isActive=e,this._currentSuggestItemInfo=t,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){const e=Oe.D.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?Me.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=Oe.D.get(this.editor);e?.stopForceRenderingAbove()}forceRenderingAbove(){const e=Oe.D.get(this.editor);e?.forceRenderingAbove()}}class Me{static fromSuggestion(e,t,i,n,o){let{insertText:s}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new Ne.fr).parse(s);e.children.length<100&&Ae.O.adjustWhitespace(t,i,!0,e),s=e.toString(),r=!0}const a=e.getOverwriteInfo(n,o);return new Me(I.Q.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),s,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new ee.GE(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new X.WR(this.range,this.insertText)}}function Fe(e,t){return e===t||!(!e||!t)&&e.equals(t)}var Be,We=i(41337),He=i(17300),Ve=i(4380),je=i(32828),ze=i(18904),Ue=i(13046),$e=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},qe=function(e,t){return function(i,n){t(i,n,e)}};let Ke=class extends u.jG{static{Be=this}static{this.ID="editor.contrib.inlineCompletionsController"}static get(e){return e.getContribution(Be.ID)}constructor(e,t,i,n,o,r,a,d,g,C){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=o,this._debounceService=r,this._languageFeaturesService=a,this._accessibilitySignalService=d,this._keybindingService=g,this._accessibilityService=C,this._editorObs=(0,y.Ud)(this.editor),this._positions=(0,s.un)(this,(e=>this._editorObs.selections.read(e)?.map((e=>e.getEndPosition()))??[new w.y(1,1)])),this._suggestWidgetAdaptor=this._register(new Pe(this.editor,(()=>(this._editorObs.forceUpdate(),this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(void 0))),(e=>this._editorObs.forceUpdate((t=>{this.model.get()?.handleSuggestAccepted(e)}))))),this._suggestWidgetSelectedItem=(0,s.y0)(this,(e=>this._suggestWidgetAdaptor.onDidSelectedItemChange((()=>{this._editorObs.forceUpdate((t=>e(void 0)))}))),(()=>this._suggestWidgetAdaptor.selectedItem)),this._enabledInConfig=(0,s.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).enabled)),this._isScreenReaderEnabled=(0,s.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this._editorDictationInProgress=(0,s.y0)(this,this._contextKeyService.onDidChangeContext,(()=>!0===this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress"))),this._enabled=(0,s.un)(this,(e=>this._enabledInConfig.read(e)&&(!this._isScreenReaderEnabled.read(e)||!this._editorDictationInProgress.read(e)))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model=(0,m.a0)(this,(e=>{if(this._editorObs.isReadonly.read(e))return;const t=this._editorObs.model.read(e);if(!t)return;const i=this._instantiationService.createInstance(Le,t,this._suggestWidgetSelectedItem,this._editorObs.versionId,this._positions,this._debounceValue,(0,s.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(119).preview)),(0,s.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(119).previewMode)),(0,s.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).mode)),this._enabled);return i})).recomputeInitiallyAndOnChange(this._store),this._ghostTexts=(0,s.un)(this,(e=>{const t=this.model.read(e);return t?.ghostTexts.read(e)??[]})),this._stablizedGhostTexts=Ge(this._ghostTexts,this._store),this._ghostTextWidgets=(0,_.Rl)(this,this._stablizedGhostTexts,((e,t)=>t.add(this._instantiationService.createInstance(V,this.editor,{ghostText:e,minReservedLineCount:(0,s.lk)(0),targetTextModel:this.model.map((e=>e?.textModel))})))).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=(0,s.Yd)(this),this._fontFamily=(0,s.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).fontFamily)),this._register(new c.p(this._contextKeyService,this.model)),this._register((0,y.jD)(this._editorObs.onDidType,((e,t)=>{this._enabled.get()&&this.model.get()?.trigger()}))),this._register(this._commandService.onDidExecuteCommand((t=>{const i=new Set([b.Yh.Tab.id,b.Yh.DeleteLeft.id,b.Yh.DeleteRight.id,l.Wt,"acceptSelectedSuggestion"]);i.has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&this._editorObs.forceUpdate((e=>{this.model.get()?.trigger(e)}))}))),this._register((0,y.jD)(this._editorObs.selections,((e,t)=>{t.some((e=>3===e.reason||"api"===e.source))&&this.model.get()?.stop()}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||$.bo.dropDownVisible||(0,s.Rn)((e=>{this.model.get()?.stop(e)}))}))),this._register((0,s.fm)((e=>{const t=this.model.read(e)?.state.read(e);t?.suggestItem?t.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register((0,u.s)((()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()})));const S=(0,_.ZX)(this,((e,t)=>{const i=this.model.read(e),n=i?.state.read(e);return this._suggestWidgetSelectedItem.get()?t:n?.inlineCompletion?.semanticId}));this._register((0,y.Qg)((0,s.un)((e=>(this._playAccessibilitySignal.read(e),S.read(e),{}))),(async(e,t,i)=>{const n=this.model.get(),o=n?.state.get();if(!o||!n)return;const r=n.textModel.getLineContent(o.primaryGhostText.lineNumber);await(0,p.wR)(50,(0,f.bs)(i)),await(0,s.oJ)(this._suggestWidgetSelectedItem,v.b0,(()=>!1),(0,f.bs)(i)),await this._accessibilitySignalService.playSignal(Ve.Rh.inlineSuggestion),this.editor.getOption(8)&&this._provideScreenReaderUpdate(o.primaryGhostText.renderForScreenReader(r))}))),this._register(new $.Pm(this.editor,this.model,this._instantiationService)),this._register(h((0,s.un)((e=>{const t=this._fontFamily.read(e);return""===t||"default"===t?"":`\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${t};\n}`})))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(150)&&(n=(0,We.kg)("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),(0,g.xE)(n?e+", "+n:e)}shouldShowHoverAt(e){const t=this.model.get()?.primaryGhostText.get();return!!t&&t.parts.some((i=>e.containsPosition(new w.y(t.lineNumber,i.column))))}shouldShowHoverAtViewZone(e){return this._ghostTextWidgets.get()[0]?.ownsViewZone(e)??!1}};function Ge(e,t){const i=(0,s.FY)("result",[]),n=[];return t.add((0,s.fm)((t=>{const o=e.read(t);(0,s.Rn)((e=>{if(o.length!==n.length){n.length=o.length;for(let e=0;et.set(o[i],e)))}))}))),i}Ke=Be=$e([qe(1,ke._Y),qe(2,ze.fN),qe(3,je.pG),qe(4,Se.d),qe(5,C.ILanguageFeatureDebounceService),qe(6,S.ILanguageFeaturesService),qe(7,Ve.Nt),qe(8,Ue.b),qe(9,He.j)],Ke);var Qe=i(69547),Ye=i(6330);class Ze extends n.ks{static{this.ID=l.PA}constructor(){super({id:Ze.ID,label:We.kg("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){const i=Ke.get(t);i?.model.get()?.next()}}class Xe extends n.ks{static{this.ID=l.Vl}constructor(){super({id:Xe.ID,label:We.kg("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){const i=Ke.get(t);i?.model.get()?.previous()}}class Je extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:We.kg("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:a.R.writable})}async run(e,t){const i=Ke.get(t);await(0,r.fL)((async e=>{await(i?.model.get()?.triggerExplicitly(e)),i?.playAccessibilitySignal(e)}))}}class et extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:We.kg("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible)},menuOpts:[{menuId:Ye.D8.InlineSuggestionToolbar,title:We.kg("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){const i=Ke.get(t);await(i?.model.get()?.acceptNextWord(i.editor))}}class tt extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:We.kg("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ze.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:Ye.D8.InlineSuggestionToolbar,title:We.kg("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){const i=Ke.get(t);await(i?.model.get()?.acceptNextLine(i.editor))}}class it extends n.ks{constructor(){super({id:l.Wt,label:We.kg("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:c.p.inlineSuggestionVisible,menuOpts:[{menuId:Ye.D8.InlineSuggestionToolbar,title:We.kg("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ze.M$.and(c.p.inlineSuggestionVisible,a.R.tabMovesFocus.toNegated(),c.p.inlineSuggestionHasIndentationLessThanTabSize,Qe.ob.Visible.toNegated(),a.R.hoverFocused.toNegated())}})}async run(e,t){const i=Ke.get(t);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}class nt extends n.ks{static{this.ID="editor.action.inlineSuggest.hide"}constructor(){super({id:nt.ID,label:We.kg("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:c.p.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=Ke.get(t);(0,s.Rn)((e=>{i?.model.get()?.stop(e)}))}}class ot extends Ye.L{static{this.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}constructor(){super({id:ot.ID,title:We.kg("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Ye.D8.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ze.M$.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){const i=e.get(je.pG),n=i.getValue("editor.inlineSuggest.showToolbar"),o="always"===n?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",o)}}var st=i(42325),rt=i(36511),at=i(10170),lt=i(11086),ct=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},dt=function(e,t){return function(i,n){t(i,n,e)}};class ut{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let ht=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Ke.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new o.mm(1e3,this,I.Q.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(7===i.type&&t.shouldShowHoverAt(i.range))return new o.mm(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(6===i.type){const n=i.detail.mightBeForeignElement;if(n&&t.shouldShowHoverAt(i.range))return new o.mm(1e3,this,i.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if("onHover"!==this._editor.getOption(62).showToolbar)return[];const i=Ke.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new ut(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new u.Cm,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&i.add(this.renderScreenReaderText(e,n));const r=n.controller.model.get(),a=this._instantiationService.createInstance($.bo,this._editor,!1,(0,s.lk)(null),r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands),l=a.getDomNode();e.fragment.appendChild(l),r.triggerExplicitly(),i.add(a);const c={hoverPart:n,hoverElement:l,dispose(){i.dispose()}};return new o.Ke([c])}renderScreenReaderText(e,t){const i=new u.Cm,n=d.$,o=n("div.hover-row.markdown-hover"),r=d.BC(o,n("div.hover-contents",{"aria-live":"assertive"})),a=i.add(new rt.T({editor:this._editor},this._languageService,this._openerService)),l=t=>{i.add(a.onDidRenderAsync((()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=We.kg("inlineSuggestionFollows","Suggestion:"),o=i.add(a.render((new st.Bc).appendText(n).appendCodeblock("text",t)));r.replaceChildren(o.element)};return i.add((0,s.fm)((e=>{const i=t.controller.model.read(e)?.primaryGhostText.read(e);if(i){const e=this._editor.getModel().getLineContent(i.lineNumber);l(i.renderForScreenReader(e))}else d.Ln(r)}))),e.fragment.appendChild(o),i}};ht=ct([dt(1,R.L),dt(2,at.C),dt(3,He.j),dt(4,ke._Y),dt(5,lt.k)],ht);class gt{}var pt=i(3115);(0,n.HW)(Ke.ID,Ke,3),(0,n.Fl)(Je),(0,n.Fl)(Ze),(0,n.Fl)(Xe),(0,n.Fl)(et),(0,n.Fl)(tt),(0,n.Fl)(it),(0,n.Fl)(nt),(0,Ye.ug)(ot),o.B2.register(ht),pt.Z.register(new gt)},85029:(e,t,i)=>{"use strict";i.d(t,{AL:()=>u,Vs:()=>d,x9:()=>h,xD:()=>l,yP:()=>c});var n=i(85053),o=i(20601),s=i(36788),r=i(8690),a=i(362);class l{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every(((t,i)=>t.equals(e.parts[i])))}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1),n=new a.mF([...this.parts.map((e=>new a.WR(r.Q.fromPositions(new s.y(1,e.column)),e.lines.join("\n"))))]).applyToString(i);return n.substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class c{constructor(e,t,i){this.column=e,this.text=t,this.preview=i,this.lines=(0,o.uz)(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class d{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.text=i,this.additionalReservedLineCount=n,this.parts=[new c(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=(0,o.uz)(this.text)}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every(((t,i)=>t===e.newLines[i]))&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function u(e,t){return(0,n.aI)(e,t,h)}function h(e,t){return e===t||!(!e||!t)&&((e instanceof l&&t instanceof l||e instanceof d&&t instanceof d)&&e.equals(t))}},46576:(e,t,i)=>{"use strict";i.d(t,{Yk:()=>y});var n=i(79109),o=i(9659),s=i(67792),r=i(21553),a=i(14396),l=i(36788),c=i(8690),d=i(39399),u=i(94150),h=i(87867),g=i(55239),p=i(39029);function f(e,t){const i=new g.Mg,n=new d.Z(i,(e=>t.getLanguageConfiguration(e))),o=new p.tk(new m([e]),n),s=(0,h.T)(o,[],void 0,!0);let r="";const a=e.getLineContent();function l(e,t){if(2===e.kind)if(l(e.openingBracket,t),t=(0,u.QB)(t,e.openingBracket.length),e.child&&(l(e.child,t),t=(0,u.QB)(t,e.child.length)),e.closingBracket)l(e.closingBracket,t),t=(0,u.QB)(t,e.closingBracket.length);else{const t=n.getSingleLanguageBracketTokens(e.openingBracket.languageId),i=t.findClosingTokenText(e.openingBracket.bracketIds);r+=i}else if(3===e.kind);else if(0===e.kind||1===e.kind)r+=a.substring((0,u.sS)(t),(0,u.sS)((0,u.QB)(t,e.length)));else if(4===e.kind)for(const i of e.children)l(i,t),t=(0,u.QB)(t,i.length)}return l(s,u.Vp),r}class m{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var _=i(362),v=i(39842),b=i(18760);async function y(e,t,i,n,c=s.XO.None,d){const u=t instanceof l.y?k(t,i):t,h=e.all(i),g=new r.db;for(const e of h)e.groupId&&g.add(e.groupId,e);function p(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=g.get(i);for(const i of e)t.push(i)}return t}const f=new Map,m=new Set;function _(e,t){if(t=[...t,e],m.has(e))return t;m.add(e);try{const i=p(e);for(const e of i){const i=_(e,t);if(i)return i}}finally{m.delete(e)}}function v(e){const s=f.get(e);if(s)return s;const r=_(e,[]);r&&(0,a.M_)(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const d=new o.Zv;return f.set(e,d.p),(async()=>{if(!r){const t=p(e);for(const e of t){const t=await v(e);if(t&&t.items.length>0)return}}try{if(t instanceof l.y){const o=await e.provideInlineCompletions(i,t,n,c);return o}{const o=await(e.provideInlineEdits?.(i,t,n,c));return o}}catch(e){return void(0,a.M_)(e)}})().then((e=>d.complete(e)),(e=>d.error(e))),d.p}const b=await Promise.all(h.map((async e=>({provider:e,completions:await v(e)})))),y=new Map,x=[];for(const e of b){const t=e.completions;if(!t)continue;const n=new C(t,e.provider);x.push(n);for(const e of t.items){const t=S.from(e,n,u,i,d);y.set(t.hash(),t)}}return new w(Array.from(y.values()),new Set(y.keys()),x)}class w{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class C{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class S{static from(e,t,i,o,s){let r,a,l=e.range?c.Q.lift(e.range):i;if("string"===typeof e.insertText){if(r=e.insertText,s&&e.completeBracketPairs){r=x(r,l.getStartPosition(),o,s);const t=r.length-e.insertText.length;0!==t&&(l=new c.Q(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+t))}a=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(s&&e.completeBracketPairs){e.insertText.snippet=x(e.insertText.snippet,l.getStartPosition(),o,s);const i=e.insertText.snippet.length-t;0!==i&&(l=new c.Q(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+i))}const i=(new b.fr).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof b.EY?(r=i.children[0].value,a=void 0):(r=i.toString(),a={snippet:e.insertText.snippet,range:l})}else(0,n.xb)(e.insertText);return new S(r,e.command,l,r,a,e.additionalTextEdits||(0,v.zk)(),e,t)}constructor(e,t,i,n,o,s,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=r,this.source=a,e=e.replace(/\r\n|\r/g,"\n"),n=e.replace(/\r\n|\r/g,"\n")}withRange(e){return new S(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new _.WR(this.range,this.insertText)}}function k(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new c.Q(e.lineNumber,i.startColumn,e.lineNumber,n):c.Q.fromPositions(e,e.with(void 0,n))}function x(e,t,i,n){const o=i.getLineContent(t.lineNumber).substring(0,t.column-1),s=o+e,r=i.tokenization.tokenizeLineWithEdit(t,s.length-(t.column-1),e),a=r?.sliceAndInflate(t.column-1,s.length,0);if(!a)return e;const l=f(a,n);return l}},39842:(e,t,i)=>{"use strict";i.d(t,{GM:()=>d,OA:()=>h,pY:()=>u,tN:()=>g,zk:()=>c});var n=i(14396),o=i(5091),s=i(39751),r=i(36788),a=i(8690);const l=[];function c(){return l}class d{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new n.D7(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new a.Q(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function u(e,t){const i=new o.Cm,n=e.createDecorationsCollection();return i.add((0,s.zL)({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function h(e,t){return new r.y(e.lineNumber+t.lineNumber-1,1===t.lineNumber?e.column+t.column-1:t.column)}function g(e,t){return new r.y(e.lineNumber-t.lineNumber+1,e.lineNumber-t.lineNumber===0?e.column-t.column+1:e.column)}},26642:(e,t,i)=>{"use strict";var n=i(16259),o=i(57479);const s="editor.action.inlineEdit.accept",r="editor.action.inlineEdit.reject",a="editor.action.inlineEdit.jumpTo",l="editor.action.inlineEdit.jumpBack";var c=i(5091),d=i(39751),u=i(28346),h=i(36788),g=i(8690),p=i(14573),f=i(9322),m=i(1550),_=i(39842),v=i(88402),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};const w="inline-edit";let C=class extends c.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,d.FY)(this,!1),this.currentTextModel=(0,d.y0)(this,this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,d.un)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;let n=this.model.range?.read(e);n&&n.startLineNumber===n.endLineNumber&&n.startColumn===n.endColumn&&(n=void 0);const o=(!n||n.startLineNumber===n.endLineNumber)&&1===i.parts.length&&1===i.parts[0].lines.length,s=1===i.parts.length&&i.parts[0].lines.every((e=>0===e.length)),r=[],a=[];function l(e,t){if(a.length>0){const i=a[a.length-1];t&&i.decorations.push(new m.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)a.push({content:i,decorations:t?[new m.d(1,i.length+1,t,0)]:[]})}const c=t.getLineContent(i.lineNumber);let d,u=0;if(!s&&(o||!n)){for(const e of i.parts){let t=e.lines;n&&!o&&(l(t,w),t=[]),void 0===d?(r.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):l([c.substring(u,e.column-1)],void 0),t.length>0&&(l(t,w),void 0===d&&e.column<=c.length&&(d=e.column)),u=e.column-1}void 0!==d&&l([c.substring(u)],void 0)}const h=void 0!==d?new _.GM(d,c.length+1):void 0,g=o||!n?i.lineNumber:n.endLineNumber-1;return{inlineTexts:r,additionalLines:a,hiddenRange:h,lineNumber:g,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t,range:n,isSingleLine:o,isPureRemove:s}})),this.decorations=(0,d.un)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];if(t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),t.range){const e=[];if(t.isSingleLine)e.push(t.range);else if(!t.isPureRemove){const i=t.range.endLineNumber-t.range.startLineNumber;for(let n=0;n{this.isDisposed.set(!0,void 0)}))),this._register((0,_.pY)(this.editor,this.decorations))}};C=b([y(2,p.L)],C);var S,k=i(18904),x=i(87778),E=i(35350),L=i(12847),T=i(67792),I=i(85029),D=i(72786),R=i(2150),N=i(92678),A=i(55664),O=i(85053),P=i(25160),M=i(85141),F=i(64164),B=i(6330),W=i(46403),H=i(13046),V=i(11086),j=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z=function(e,t){return function(i,n){t(i,n,e)}};let U=class extends c.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,d.y0)(this,this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(63).showToolbar)),this.sessionPosition=void 0,this.position=(0,d.un)(this,(e=>{const t=this.model.read(e)?.model.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||0===t.parts.length)return this.sessionPosition=void 0,null;const i=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);const n=new h.y(t.lineNumber,Math.min(i,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=n,n})),this._register((0,d.yC)(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const o=i.add(this.instantiationService.createInstance($,this.editor,!0,this.position));e.addContentWidget(o),i.add((0,c.s)((()=>e.removeContentWidget(o))))})))}};U=j([z(2,x._Y)],U);let $=class extends c.jG{static{S=this}static{this._dropDownVisible=!1}static{this.id=0}constructor(e,t,i,n,o,s){super(),this.editor=e,this.withBorder=t,this._position=i,this._contextKeyService=o,this._menuService=s,this.id="InlineEditHintsContentWidget"+S.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,R.h)("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[(0,R.h)("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(B.D8.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(n.createInstance(K,this.nodes.toolBar,this.editor,B.D8.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof B.Xe)return n.createInstance(q,e,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{S._dropDownVisible=e}))),this._register((0,d.fm)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,d.fm)((e=>{const t=[];for(const[e,i]of this.inlineCompletionsActionsMenus.getActions())for(const e of i)e instanceof B.Xe&&t.push(e);t.length>0&&t.unshift(new A.wv),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};$=S=j([z(3,x._Y),z(4,k.fN),z(5,B.ez)],$);class q extends M.oq{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,R.h)("div.keybinding").root,i=this._register(new N.x(t,P.OS,{disableTitle:!0,...N.l}));i.set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let K=class extends F.p{constructor(e,t,i,n,o,s,r,a,l,c){super(e,{resetMenu:i,...n},o,s,r,a,l,c),this.editor=t,this.menuId=i,this.options2=n,this.menuService=o,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this._store.add(this.editor.onDidChangeCursorPosition((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){const e=[],t=[];(0,M.Ot)(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setAdditionalSecondaryActions(e){(0,O.aI)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};K=j([z(4,B.ez),z(5,k.fN),z(6,W.Z),z(7,H.b),z(8,D.d),z(9,V.k)],K);var G,Q,Y=i(32828),Z=i(14396),X=i(42389),J=i(29133),ee=i(55745),te=i(50576),ie=i(41843),ne=i(65764),oe=i(35037),se=i(69361),re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};function*le(e,t,i=1){void 0===t&&([t,e]=[e,0]);for(let n=e;ne.replace(new RegExp("^"+t),""))),shift:i}}let de=class extends c.jG{static{G=this}static{this._modelId=0}static _createUniqueUri(){return J.r.from({scheme:"inline-edit-widget",path:(new Date).toString()+String(G._modelId++)})}constructor(e,t,i,n,o){super(),this._editor=e,this._model=t,this._instantiationService=i,this._diffProviderFactoryService=n,this._modelService=o,this._position=(0,d.un)(this,(e=>{const t=this._model.read(e);if(!t||0===t.text.length)return null;if(t.range.startLineNumber===t.range.endLineNumber&&(t.range.startColumn!==t.range.endColumn||1!==t.range.startColumn))return null;const i=this._editor.getModel();if(!i)return null;const n=Array.from(le(t.range.startLineNumber,t.range.endLineNumber+1)),o=n.map((e=>i.getLineLastNonWhitespaceColumn(e))),s=Math.max(...o),r=n[o.indexOf(s)],a=new h.y(r,s),l={top:t.range.startLineNumber,left:a};return l})),this._text=(0,d.un)(this,(e=>{const t=this._model.read(e);if(!t)return{text:"",shift:0};const i=ce(t.text.split("\n"));return{text:i.text.join("\n"),shift:i.shift}})),this._originalModel=(0,X.a0)((()=>this._modelService.createModel("",null,G._createUniqueUri()))).keepObserved(this._store),this._modifiedModel=(0,X.a0)((()=>this._modelService.createModel("",null,G._createUniqueUri()))).keepObserved(this._store),this._diff=(0,d.un)(this,(e=>this._diffPromise.read(e)?.promiseResult.read(e)?.data)),this._diffPromise=(0,d.un)(this,(e=>{const t=this._model.read(e);if(!t)return;const i=this._editor.getModel();if(!i)return;const n=ce(i.getValueInRange(t.range).split("\n")).text.join("\n"),o=ce(t.text.split("\n")).text.join("\n");this._originalModel.get().setValue(n),this._modifiedModel.get().setValue(o);const s=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return d.BK.fromFn((async()=>{const e=await s.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},T.XO.None);if(!e.identical)return e.changes}))})),this._register((0,d.yC)(((t,i)=>{const n=this._model.read(t);if(!n)return;if(null===this._position.get())return;const o=i.add(this._instantiationService.createInstance(ue,this._editor,this._position,this._text.map((e=>e.text)),this._text.map((e=>e.shift)),this._diff));e.addOverlayWidget(o),i.add((0,c.s)((()=>e.removeOverlayWidget(o))))})))}};de=G=re([ae(2,x._Y),ae(3,ie.Hg),ae(4,se.IModelService)],de);let ue=class extends c.jG{static{Q=this}static{this.id=0}constructor(e,t,i,n,o,s){super(),this._editor=e,this._position=t,this._text=i,this._shift=n,this._diff=o,this._instantiationService=s,this.id="InlineEditSideBySideContentWidget"+Q.id++,this.allowEditorOverflow=!1,this._nodes=(0,R.$)("div.inlineEditSideBySide",void 0),this._scrollChanged=(0,d.yQ)("editor.onDidScrollChange",this._editor.onDidScrollChange),this._previewEditor=this._register(this._instantiationService.createInstance(te.t,this._nodes,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1,handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off",wrappingIndent:"none",wrappingStrategy:void 0},{contributions:[],isSimpleWidget:!0},this._editor)),this._previewEditorObs=(0,ee.Ud)(this._previewEditor),this._editorObs=(0,ee.Ud)(this._editor),this._previewTextModel=this._register(this._instantiationService.createInstance(oe.Bz,"",this._editor.getModel()?.getLanguageId()??ne.vH,oe.Bz.DEFAULT_CREATION_OPTIONS,null)),this._setText=(0,d.un)((e=>{const t=this._text.read(e);t&&this._previewTextModel.setValue(t)})).recomputeInitiallyAndOnChange(this._store),this._decorations=(0,d.un)(this,(e=>{this._setText.read(e);const t=this._position.read(e);if(!t)return{org:[],mod:[]};const i=this._diff.read(e);if(!i)return{org:[],mod:[]};const n=[],o=[];if(1===i.length&&i[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return{org:[],mod:[]};const s=this._shift.get(),r=e=>new g.Q(e.startLineNumber+t.top-1,e.startColumn+s,e.endLineNumber+t.top-1,e.endColumn+s);for(const e of i)if(e.original.isEmpty||n.push({range:r(e.original.toInclusiveRange()),options:v.Ob}),e.modified.isEmpty||o.push({range:e.modified.toInclusiveRange(),options:v.Kl}),e.modified.isEmpty||e.original.isEmpty)e.original.isEmpty||n.push({range:r(e.original.toInclusiveRange()),options:v.KL}),e.modified.isEmpty||o.push({range:e.modified.toInclusiveRange(),options:v.Ou});else for(const t of e.innerChanges||[])e.original.contains(t.originalRange.startLineNumber)&&n.push({range:r(t.originalRange),options:t.originalRange.isEmpty()?v.wp:v.Zb}),e.modified.contains(t.modifiedRange.startLineNumber)&&o.push({range:t.modifiedRange,options:t.modifiedRange.isEmpty()?v.GM:v.bk});return{org:n,mod:o}})),this._originalDecorations=(0,d.un)(this,(e=>this._decorations.read(e).org)),this._modifiedDecorations=(0,d.un)(this,(e=>this._decorations.read(e).mod)),this._previewEditor.setModel(this._previewTextModel),this._register(this._editorObs.setDecorations(this._originalDecorations)),this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)),this._register((0,d.fm)((e=>{const t=this._previewEditorObs.contentWidth.read(e),i=this._text.read(e).split("\n").length-1,n=this._editor.getOption(67)*i;t<=0||this._previewEditor.layout({height:n,width:t})}))),this._register((0,d.fm)((e=>{this._position.read(e),this._editor.layoutOverlayWidget(this)}))),this._register((0,d.fm)((e=>{this._scrollChanged.read(e);const t=this._position.read(e);t&&this._editor.layoutOverlayWidget(this)})))}getId(){return this.id}getDomNode(){return this._nodes}getPosition(){const e=this._position.get();if(!e)return null;const t=this._editor.getLayoutInfo(),i=this._editor.getScrolledVisiblePosition(new h.y(e.top,1));if(!i)return null;const n=i.top-1,o=this._editor.getOffsetForColumn(e.left.lineNumber,e.left.column),s=t.contentLeft+o+10;return{preference:{left:s,top:n}}}};ue=Q=re([ae(5,x._Y)],ue);var he,ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},pe=function(e,t){return function(i,n){t(i,n,e)}};let fe=class extends c.jG{static{he=this}static{this.ID="editor.contrib.inlineEditController"}static{this.inlineEditVisibleKey="inlineEditVisible"}static{this.inlineEditVisibleContext=new k.N1(this.inlineEditVisibleKey,!1)}static{this.cursorAtInlineEditKey="cursorAtInlineEdit"}static{this.cursorAtInlineEditContext=new k.N1(this.cursorAtInlineEditKey,!1)}static get(e){return e.getContribution(he.ID)}constructor(e,t,i,n,o,s,r,a){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.languageFeaturesService=n,this._commandService=o,this._configurationService=s,this._diffProviderFactoryService=r,this._modelService=a,this._isVisibleContext=he.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=he.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=(0,d.FY)(this,void 0),this._currentWidget=(0,X.a0)(this._currentEdit,(e=>{const t=this._currentEdit.read(e);if(!t)return;const i=t.range.endLineNumber,n=t.range.endColumn,o=!t.text.endsWith("\n")||t.range.startLineNumber===t.range.endLineNumber&&t.range.startColumn===t.range.endColumn?t.text:t.text.slice(0,-1),s=new I.xD(i,[new I.yP(n,o,!1)]),r=t.range.startLineNumber===t.range.endLineNumber&&1===s.parts.length&&1===s.parts[0].lines.length,a=""===t.text;if(!r&&!a)return;const l=this.instantiationService.createInstance(C,this.editor,{ghostText:(0,d.lk)(s),minReservedLineCount:(0,d.lk)(0),targetTextModel:(0,d.lk)(this.editor.getModel()??void 0),range:(0,d.lk)(t.range)});return l})),this._isAccepting=(0,d.FY)(this,!1),this._enabled=(0,d.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).enabled)),this._fontFamily=(0,d.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).fontFamily));const l=(0,d.yQ)("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register((0,d.fm)((t=>{this._enabled.read(t)&&(l.read(t),this._isAccepting.read(t)||this.getInlineEdit(e,!0))})));const c=(0,d.y0)(this,e.onDidChangeCursorPosition,(()=>e.getPosition()));this._register((0,d.fm)((e=>{if(!this._enabled.read(e))return;const t=c.read(e);t&&this.checkCursorPosition(t)}))),this._register((0,d.fm)((t=>{const i=this._currentEdit.read(t);if(this._isCursorAtInlineEditContext.set(!1),!i)return void this._isVisibleContext.set(!1);this._isVisibleContext.set(!0);const n=e.getPosition();n&&this.checkCursorPosition(n)})));const u=(0,d.yQ)("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register((0,d.fm)((async t=>{this._enabled.read(t)&&(u.read(t),this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur||(this._currentRequestCts?.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))})));const h=(0,d.yQ)("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register((0,d.fm)((t=>{this._enabled.read(t)&&(h.read(t),this.getInlineEdit(e,!0))})));const g=this._register((0,R.jh)());this._register((0,d.fm)((e=>{const t=this._fontFamily.read(e);g.setStyle(""===t||"default"===t?"":`\n.monaco-editor .inline-edit-decoration,\n.monaco-editor .inline-edit-decoration-preview,\n.monaco-editor .inline-edit {\n\tfont-family: ${t};\n}`)}))),this._register(new U(this.editor,this._currentWidget,this.instantiationService)),this._register(new de(this.editor,this._currentEdit,this.instantiationService,this._diffProviderFactoryService,this._modelService))}checkCursorPosition(e){if(!this._currentEdit)return void this._isCursorAtInlineEditContext.set(!1);const t=this._currentEdit.get();t?this._isCursorAtInlineEditContext.set(g.Q.containsPosition(t.range,e)):this._isCursorAtInlineEditContext.set(!1)}validateInlineEdit(e,t){if(t.text.includes("\n")&&t.range.startLineNumber!==t.range.endLineNumber&&t.range.startColumn!==t.range.endColumn){const i=t.range.startColumn;if(1!==i)return!1;const n=t.range.endLineNumber,o=t.range.endColumn,s=e.getModel()?.getLineLength(n)??0;if(o!==s+1)return!1}return!0}async fetchInlineEdit(e,t){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const i=e.getModel();if(!i)return;const n=i.getVersionId(),o=this.languageFeaturesService.inlineEditProvider.all(i);if(0===o.length)return;const s=o[0];this._currentRequestCts=new T.Qi;const r=this._currentRequestCts.token,a=t?E.sm.Automatic:E.sm.Invoke,l=t;if(l&&await me(50,r),r.isCancellationRequested||i.isDisposed()||i.getVersionId()!==n)return;const c=await s.provideInlineEdit(i,{triggerKind:a},r);return c&&!r.isCancellationRequested&&!i.isDisposed()&&i.getVersionId()===n&&this.validateInlineEdit(e,c)?c:void 0}async getInlineEdit(e,t){this._isCursorAtInlineEditContext.set(!1),await this.clear();const i=await this.fetchInlineEdit(e,t);i&&this._currentEdit.set(i,void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){this._isAccepting.set(!0,void 0);const e=this._currentEdit.get();if(!e)return;let t=e.text;e.text.startsWith("\n")&&(t=e.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[u.k.replace(g.Q.lift(e.range),t)]),e.accepted&&await this._commandService.executeCommand(e.accepted.id,...e.accepted.arguments||[]).then(void 0,Z.M_),this.freeEdit(e),(0,d.Rn)((e=>{this._currentEdit.set(void 0,e),this._isAccepting.set(!1,e)}))}jumpToCurrent(){this._jumpBackPosition=this.editor.getSelection()?.getStartPosition();const e=this._currentEdit.get();if(!e)return;const t=h.y.lift({lineNumber:e.range.startLineNumber,column:e.range.startColumn});this.editor.setPosition(t),this.editor.revealPositionInCenterIfOutsideViewport(t)}async clear(e=!0){const t=this._currentEdit.get();t&&t?.rejected&&e&&await this._commandService.executeCommand(t.rejected.id,...t.rejected.arguments||[]).then(void 0,Z.M_),t&&this.freeEdit(t),this._currentEdit.set(void 0,void 0)}freeEdit(e){const t=this.editor.getModel();if(!t)return;const i=this.languageFeaturesService.inlineEditProvider.all(t);0!==i.length&&i[0].freeInlineEdit(e)}};function me(e,t){return new Promise((i=>{let n;const o=setTimeout((()=>{n&&n.dispose(),i()}),e);t&&(n=t.onCancellationRequested((()=>{clearTimeout(o),n&&n.dispose(),i()})))}))}fe=he=ge([pe(1,x._Y),pe(2,k.fN),pe(3,L.ILanguageFeaturesService),pe(4,D.d),pe(5,Y.pG),pe(6,ie.Hg),pe(7,se.IModelService)],fe);class _e extends n.ks{constructor(){super({id:s,label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:k.M$.and(o.R.writable,fe.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:k.M$.and(o.R.writable,fe.inlineEditVisibleContext,fe.cursorAtInlineEditContext)}],menuOpts:[{menuId:B.D8.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,t){const i=fe.get(t);await(i?.accept())}}class ve extends n.ks{constructor(){const e=k.M$.and(o.R.writable,k.M$.not(fe.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,t){const i=fe.get(t);i?.trigger()}}class be extends n.ks{constructor(){const e=k.M$.and(o.R.writable,fe.inlineEditVisibleContext,k.M$.not(fe.cursorAtInlineEditKey));super({id:a,label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:B.D8.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,t){const i=fe.get(t);i?.jumpToCurrent()}}class ye extends n.ks{constructor(){const e=k.M$.and(o.R.writable,fe.cursorAtInlineEditContext);super({id:l,label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:B.D8.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,t){const i=fe.get(t);i?.jumpBack()}}class we extends n.ks{constructor(){const e=k.M$.and(o.R.writable,fe.inlineEditVisibleContext);super({id:r,label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:B.D8.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,t){const i=fe.get(t);await(i?.clear())}}(0,n.Fl)(_e),(0,n.Fl)(we),(0,n.Fl)(be),(0,n.Fl)(ye),(0,n.Fl)(ve),(0,n.HW)(fe.ID,fe,3)},12842:(e,t,i)=>{"use strict";var n=i(16259),o=i(25923),s=i(39751),r=i(81275),a=i(50576),l=i(57479),c=i(41337),d=i(18904);const u="editor.action.inlineEdits.accept",h="editor.action.inlineEdits.showPrevious",g="editor.action.inlineEdits.showNext",p=new d.N1("inlineEditsVisible",!1,(0,c.kg)("inlineEditsVisible","Whether an inline edit is visible")),f=new d.N1("inlineEditsIsPinned",!1,(0,c.kg)("isPinned","Whether an inline edit is visible"));var m=i(5091),_=i(42389),v=i(55745),b=i(34956),y=i(98581),w=i(85983),C=i(12847),S=i(9659),k=i(67792),x=i(45746),E=i(14396),L=i(29133),T=i(41843),I=i(44544),D=i(35350),R=i(69361),N=i(46576),A=i(2150),O=i(40628),P=i(88402),M=i(78787),F=i(65764),B=i(35037),W=i(10111),H=i(47805),V=i(79266),j=i(87778),z=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},U=function(e,t){return function(i,n){t(i,n,e)}};class ${constructor(e,t,i){this.range=e,this.newLines=t,this.changes=i}}let q=class extends m.jG{constructor(e,t,i,o){super(),this._editor=e,this._edit=t,this._userPrompt=i,this._instantiationService=o,this._editorObs=(0,v.Ud)(this._editor),this._elements=(0,A.h)("div.inline-edits-widget",{style:{position:"absolute",overflow:"visible",top:"0px",left:"0px"}},[(0,A.h)("div@editorContainer",{style:{position:"absolute",top:"0px",left:"0px",width:"500px",height:"500px"}},[(0,A.h)("div.toolbar@toolbar",{style:{position:"absolute",top:"-25px",left:"0px"}}),(0,A.h)("div.promptEditor@promptEditor",{style:{position:"absolute",top:"-25px",left:"80px",width:"300px",height:"22px"}}),(0,A.h)("div.preview@editor",{style:{position:"absolute",top:"0px",left:"0px"}})]),(0,A.Mc)("svg",{style:{overflow:"visible",pointerEvents:"none"}},[(0,A.Mc)("defs",[(0,A.Mc)("linearGradient",{id:"Gradient2",x1:"0",y1:"0",x2:"1",y2:"0"},[(0,A.Mc)("stop",{offset:"0%",class:"gradient-stop"}),(0,A.Mc)("stop",{offset:"100%",class:"gradient-stop"})])]),(0,A.Mc)("path@path",{d:"",fill:"url(#Gradient2)"})])]),this._previewTextModel=this._register(this._instantiationService.createInstance(B.Bz,"",F.vH,B.Bz.DEFAULT_CREATION_OPTIONS,null)),this._setText=(0,s.un)((e=>{const t=this._edit.read(e);t&&this._previewTextModel.setValue(t.newLines.join("\n"))})).recomputeInitiallyAndOnChange(this._store),this._promptTextModel=this._register(this._instantiationService.createInstance(B.Bz,"",F.vH,B.Bz.DEFAULT_CREATION_OPTIONS,null)),this._promptEditor=this._register(this._instantiationService.createInstance(a.t,this._elements.promptEditor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,placeholder:"Describe the change you want...",fontFamily:O.z},{contributions:n.dS.getSomeEditorContributions([V.D.ID,H.X.ID,W.d.ID]),isSimpleWidget:!0},this._editor)),this._previewEditor=this._register(this._instantiationService.createInstance(a.t,this._elements.editor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0},{contributions:[]},this._editor)),this._previewEditorObs=(0,v.Ud)(this._previewEditor),this._decorations=(0,s.un)(this,(e=>{this._setText.read(e);const t=this._edit.read(e)?.changes;if(!t)return[];const i=[],n=[];if(1===t.length&&t[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return[];for(const e of t)if(e.original.isEmpty||i.push({range:e.original.toInclusiveRange(),options:P.Ob}),e.modified.isEmpty||n.push({range:e.modified.toInclusiveRange(),options:P.Kl}),e.modified.isEmpty||e.original.isEmpty)e.original.isEmpty||i.push({range:e.original.toInclusiveRange(),options:P.KL}),e.modified.isEmpty||n.push({range:e.modified.toInclusiveRange(),options:P.Ou});else for(const t of e.innerChanges||[])e.original.contains(t.originalRange.startLineNumber)&&i.push({range:t.originalRange,options:t.originalRange.isEmpty()?P.wp:P.Zb}),e.modified.contains(t.modifiedRange.startLineNumber)&&n.push({range:t.modifiedRange,options:t.modifiedRange.isEmpty()?P.GM:P.bk});return n})),this._layout1=(0,s.un)(this,(e=>{const t=this._editor.getModel(),i=this._edit.read(e);if(!i)return null;const n=i.range;let o=0;for(let e=n.startLineNumber;e{const t=this._edit.read(e);if(!t)return null;const i=t.range,n=this._editorObs.scrollLeft.read(e),o=this._layout1.read(e).left+20-n,s=this._editor.getTopForLineNumber(i.startLineNumber)-this._editorObs.scrollTop.read(e),r=this._editor.getTopForLineNumber(i.endLineNumberExclusive)-this._editorObs.scrollTop.read(e),a=new G(o,s),l=new G(o,r),c=r-s,d=50,u=this._editor.getOption(67)*t.newLines.length,h=c-u,g=new G(o+d,s+h/2),p=new G(o+d,r-h/2);return{topCode:a,bottomCode:l,codeHeight:c,topEdit:g,bottomEdit:p,editHeight:u}}));const r=(0,s.un)(this,(e=>void 0!==this._edit.read(e)||void 0!==this._userPrompt.read(e)));this._register((0,M.AV)(this._elements.root,{display:(0,s.un)(this,(e=>r.read(e)?"block":"none"))})),this._register((0,M.rX)(this._editor.getDomNode(),this._elements.root)),this._register((0,v.Ud)(e).createOverlayWidget({domNode:this._elements.root,position:(0,s.lk)(null),allowEditorOverflow:!1,minContentWidthInPx:(0,s.un)((e=>{const t=this._layout1.read(e)?.left;if(void 0===t)return 0;const i=this._previewEditorObs.contentWidth.read(e);return t+i}))})),this._previewEditor.setModel(this._previewTextModel),this._register(this._previewEditorObs.setDecorations(this._decorations)),this._register((0,s.fm)((e=>{const t=this._layout.read(e);if(!t)return;const{topCode:i,bottomCode:n,topEdit:o,bottomEdit:s,editHeight:r}=t,a=10,l=0,c=40,d=(new Q).moveTo(i).lineTo(i.deltaX(a)).curveTo(i.deltaX(a+c),o.deltaX(-c-l),o.deltaX(-l)).lineTo(o).lineTo(s).lineTo(s.deltaX(-l)).curveTo(s.deltaX(-c-l),n.deltaX(a+c),n.deltaX(a)).lineTo(n).build();this._elements.path.setAttribute("d",d),this._elements.editorContainer.style.top=`${o.y}px`,this._elements.editorContainer.style.left=`${o.x}px`,this._elements.editorContainer.style.height=`${r}px`;const u=this._previewEditorObs.contentWidth.read(e);this._previewEditor.layout({height:r,width:u})}))),this._promptEditor.setModel(this._promptTextModel),this._promptEditor.layout(),this._register(Y(K(this._userPrompt,(e=>e??""),(e=>e)),(0,v.Ud)(this._promptEditor).value)),this._register((0,s.fm)((e=>{const t=(0,v.Ud)(this._promptEditor).isFocused.read(e);this._elements.root.classList.toggle("focused",t)})))}};function K(e,t,i){return(0,_.dQ)(void 0,(i=>t(e.read(i))),((t,n)=>e.set(i(t),n)))}q=z([U(3,j._Y)],q);class G{constructor(e,t){this.x=e,this.y=t}deltaX(e){return new G(this.x+e,this.y)}}class Q{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}curveTo(e,t,i){return this._data+=`C ${e.x} ${e.y} ${t.x} ${t.y} ${i.x} ${i.y} `,this}build(){return this._data}}function Y(e,t){const i=new m.Cm;return i.add((0,s.fm)((i=>{const n=e.read(i);t.set(n,void 0)}))),i.add((0,s.fm)((i=>{const n=t.read(i);e.set(n,void 0)}))),i}var Z,X=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},J=function(e,t){return function(i,n){t(i,n,e)}};let ee=class extends m.jG{static{Z=this}static{this._modelId=0}static _createUniqueUri(){return L.r.from({scheme:"inline-edits",path:(new Date).toString()+String(Z._modelId++)})}constructor(e,t,i,n,o,r,a){super(),this.textModel=e,this._textModelVersionId=t,this._selection=i,this._debounceValue=n,this.languageFeaturesService=o,this._diffProviderFactoryService=r,this._modelService=a,this._forceUpdateExplicitlySignal=(0,s.Yd)(this),this._selectedInlineCompletionId=(0,s.FY)(this,void 0),this._isActive=(0,s.FY)(this,!1),this._originalModel=(0,_.a0)((()=>this._modelService.createModel("",null,Z._createUniqueUri()))).keepObserved(this._store),this._modifiedModel=(0,_.a0)((()=>this._modelService.createModel("",null,Z._createUniqueUri()))).keepObserved(this._store),this._pinnedRange=new ie(this.textModel,this._textModelVersionId),this.isPinned=this._pinnedRange.range.map((e=>!!e)),this.userPrompt=(0,s.FY)(this,void 0),this.inlineEdit=(0,s.un)(this,(e=>this._inlineEdit.read(e)?.promiseResult.read(e)?.data)),this._inlineEdit=(0,s.un)(this,(e=>{const t=this.selectedInlineEdit.read(e);if(!t)return;const i=t.inlineCompletion.range;if(""===t.inlineCompletion.insertText.trim())return;let n=t.inlineCompletion.insertText.split(/\r\n|\r|\n/);function o(e){const t=e[0].match(/^\s*/)?.[0]??"";return e.map((e=>e.replace(new RegExp("^"+t),"")))}n=o(n);const r=this.textModel.getValueInRange(i);let a=r.split(/\r\n|\r|\n/);a=o(a),this._originalModel.get().setValue(a.join("\n")),this._modifiedModel.get().setValue(n.join("\n"));const l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return s.BK.fromFn((async()=>{const e=await l.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},k.XO.None);if(!e.identical)return new $(I.M.fromRangeInclusive(i),o(n),e.changes)}))})),this._fetchStore=this._register(new m.Cm),this._inlineEditsFetchResult=(0,s.X2)(this,void 0),this._inlineEdits=(0,s.C)({owner:this,equalsFn:x.dB},(e=>this._inlineEditsFetchResult.read(e)?.completions.map((e=>new te(e)))??[])),this._fetchInlineEditsPromise=(0,s.nb)({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:D.qw.Automatic}),handleChange:(e,t)=>(e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=D.qw.Explicit),!0)},(async(e,t)=>{function i(e,t){return t(e)}this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(e),this._textModelVersionId.read(e);const n=this._pinnedRange.range.read(e)??i(this._selection.read(e),(e=>e.isEmpty()?void 0:e));if(!n)return this._inlineEditsFetchResult.set(void 0,void 0),void this.userPrompt.set(void 0,void 0);const o={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(e)},s=(0,k.bs)(this._fetchStore);await(0,S.wR)(200,s);const r=await(0,N.Yk)(this.languageFeaturesService.inlineCompletionsProvider,n,this.textModel,o,s);s.isCancellationRequested||this._inlineEditsFetchResult.set(r,void 0)})),this._filteredInlineEditItems=(0,s.C)({owner:this,equalsFn:(0,x.S3)()},(e=>this._inlineEdits.read(e))),this.selectedInlineCompletionIndex=(0,s.un)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineEditItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineEdit=(0,s.un)(this,(e=>{const t=this._filteredInlineEditItems.read(e),i=this.selectedInlineCompletionIndex.read(e);return t[i]})),this._register((0,s.OI)(this._fetchInlineEditsPromise))}async triggerExplicitly(e){(0,s.PO)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineEditsPromise.get()}stop(e){(0,s.PO)(e,(e=>{this.userPrompt.set(void 0,e),this._isActive.set(!1,e),this._inlineEditsFetchResult.set(void 0,e),this._pinnedRange.setRange(void 0,e)}))}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineEditItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new E.D7;const t=this.selectedInlineEdit.get();t&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[t.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}};ee=Z=X([J(4,C.ILanguageFeaturesService),J(5,T.Hg),J(6,R.IModelService)],ee);class te{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}}class ie extends m.jG{constructor(e,t){super(),this._textModel=e,this._versionId=t,this._decorations=(0,s.FY)(this,[]),this.range=(0,s.un)(this,(e=>{this._versionId.read(e);const t=this._decorations.read(e)[0];return t?this._textModel.getDecorationRange(t)??null:null})),this._register((0,m.s)((()=>{this._textModel.deltaDecorations(this._decorations.get(),[])})))}setRange(e,t){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),t)}}var ne,oe=i(32828),se=i(5480),re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};let le=class extends m.jG{static{ne=this}static{this.ID="editor.contrib.inlineEditsController"}static get(e){return e.getContribution(ne.ID)}constructor(e,t,i,n,o,r){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._debounceService=n,this._languageFeaturesService=o,this._configurationService=r,this._enabled=(0,se.V)("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=(0,v.Ud)(this.editor),this._selection=(0,s.un)(this,(e=>this._editorObs.cursorSelection.read(e)??new y.L(1,1,1,1))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=(0,_.a0)(this,(e=>{if(!this._enabled.read(e))return;if(this._editorObs.isReadonly.read(e))return;const t=this._editorObs.model.read(e);if(!t)return;const i=this._instantiationService.createInstance((0,b.b)(ee,e),t,this._editorObs.versionId,this._selection,this._debounceValue);return i})),this._hadInlineEdit=(0,s.ZX)(this,((e,t)=>t||void 0!==this.model.read(e)?.inlineEdit.read(e))),this._widget=(0,_.a0)(this,(e=>{if(this._hadInlineEdit.read(e))return this._instantiationService.createInstance((0,b.b)(q,e),this.editor,this.model.map(((e,t)=>e?.inlineEdit.read(t))),ce((e=>this.model.read(e)?.userPrompt??(0,s.FY)("empty",""))))})),this._register((0,se.w)(p,this._contextKeyService,(e=>!!this.model.read(e)?.inlineEdit.read(e)))),this._register((0,se.w)(f,this._contextKeyService,(e=>!!this.model.read(e)?.isPinned.read(e)))),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}};function ce(e){return(0,_.dQ)(void 0,(t=>{const i=e(t);return i.read(t)}),((t,i)=>{e(void 0).set(t,i)}))}le=ne=re([ae(1,j._Y),ae(2,d.fN),ae(3,w.ILanguageFeatureDebounceService),ae(4,C.ILanguageFeaturesService),ae(5,oe.pG)],le);var de=i(6330);function ue(e){return{label:e.value,alias:e.original}}class he extends n.ks{static{this.ID=g}constructor(){super({id:he.ID,...ue(c.aS("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:d.M$.and(l.R.writable,p),kbOpts:{weight:100,primary:606}})}async run(e,t){const i=le.get(t);i?.model.get()?.next()}}class ge extends n.ks{static{this.ID=h}constructor(){super({id:ge.ID,...ue(c.aS("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:d.M$.and(l.R.writable,p),kbOpts:{weight:100,primary:604}})}async run(e,t){const i=le.get(t);i?.model.get()?.previous()}}class pe extends n.ks{constructor(){super({id:"editor.action.inlineEdits.trigger",...ue(c.aS("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:l.R.writable})}async run(e,t){const i=le.get(t);await(0,r.fL)((async e=>{await(i?.model.get()?.triggerExplicitly(e))}))}}class fe extends n.ks{constructor(){super({id:u,...ue(c.aS("action.inlineEdits.accept","Accept Inline Edit")),precondition:p,menuOpts:{menuId:de.D8.InlineEditsActions,title:c.kg("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:o.W.check},kbOpts:{primary:2058,weight:2e4,kbExpr:p}})}async run(e,t){t instanceof a.t&&(t=t.getParentEditor());const i=le.get(t);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}class me extends n.ks{static{this.ID="editor.action.inlineEdits.hide"}constructor(){super({id:me.ID,...ue(c.aS("action.inlineEdits.hide","Hide Inline Edit")),precondition:p,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=le.get(t);(0,s.Rn)((e=>{i?.model.get()?.stop(e)}))}}(0,n.HW)(le.ID,le,3),(0,n.Fl)(pe),(0,n.Fl)(he),(0,n.Fl)(ge),(0,n.Fl)(fe),(0,n.Fl)(me)},31903:(e,t,i)=>{"use strict";i.d(t,{I:()=>m});var n=i(2150),o=i(9659),s=i(25923),r=i(5091),a=i(20601),l=i(23740),c=i(8690),d=i(35037),u=i(87778),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};const p=d.kI.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:a.S8,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class f extends r.jG{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,n,o){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=n.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=n.$("span.icon");this.domNode.append(t),t.classList.add(...l.L.asClassNameArray(s.W.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(67);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(52)||e.hasChanged(67))&&i()}))),this._register(n.ko(this.domNode,n.Bx.CLICK,(e=>{this.delegate.cancel()})))}getId(){return f.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}let m=class extends r.jG{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new r.HE),this._currentWidget=this._register(new r.HE),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,n,s){const r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=(0,o.EQ)((()=>{const i=c.Q.fromPositions(e),o=this._currentDecorations.set([{range:i,options:p}]);o.length>0&&(this._currentWidget.value=this._instantiationService.createInstance(f,this.id,this._editor,i,t,n))}),s??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};m=h([g(2,u._Y)],m)},25135:(e,t,i)=>{"use strict";var n=i(16259),o=i(7657),s=i(57479),r=i(41337);class a extends n.ks{constructor(){super({id:"expandLineSelection",label:r.kg("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:s.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,o.c.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(i.source,!0)}}(0,n.Fl)(a)},70732:(e,t,i)=>{"use strict";var n=i(91348),o=i(32378),s=i(16259),r=i(50793),a=i(20601),l=i(28346),c=i(8690);class d{constructor(e,t,i){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,t){const i=u(e,this._cursors,this._trimInRegexesAndStrings);for(let e=0,n=i.length;ee.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);const n=[];let o=0,s=0;const r=t.length;for(let d=1,u=e.getLineCount();d<=u;d++){const u=e.getLineContent(d),h=u.length+1;let g=0;if(s=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t){return function(i,n){t(i,n,e)}};let E=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=()=>e.getLanguageId(),n=(t,i)=>e.getLanguageIdAtPosition(t,i),o=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===o)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let s=this._selection;s.startLineNumbert===s.startLineNumber?e.tokenization.getLineTokens(o):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s.startLineNumber?e.getLineContent(o):e.getLineContent(t)},c=(0,C.$f)(this._autoIndent,t,e.getLanguageIdAtPosition(o,1),s.startLineNumber,u,this._languageConfigurationService);if(null!==c){const t=a.UU(e.getLineContent(o)),i=w.c(c,r),n=w.c(t,r);if(i!==n){const e=w.k(i,r,d);h=e+this.trimStart(l)}}}t.addEditOperation(new c.Q(s.startLineNumber,1,s.startLineNumber,1),h+"\n");const p=this.matchEnterRuleMovingDown(e,u,r,s.startLineNumber,o,h);if(null!==p)0!==p&&this.getIndentEditsOfMovingBlock(e,t,s,r,d,p);else{const l={tokenization:{getLineTokens:t=>t===s.startLineNumber?e.tokenization.getLineTokens(o):t>=s.startLineNumber+1&&t<=s.endLineNumber+1?e.tokenization.getLineTokens(t-1):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s.startLineNumber?h:t>=s.startLineNumber+1&&t<=s.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)},c=(0,C.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(o,1),s.startLineNumber+1,u,this._languageConfigurationService);if(null!==c){const i=a.UU(e.getLineContent(s.startLineNumber)),n=w.c(c,r),o=w.c(i,r);if(n!==o){const i=n-o;this.getIndentEditsOfMovingBlock(e,t,s,r,d,i)}}}}else t.addEditOperation(new c.Q(s.startLineNumber,1,s.startLineNumber,1),h+"\n")}else if(o=s.startLineNumber-1,l=e.getLineContent(o),t.addEditOperation(new c.Q(o,1,o+1,1),null),t.addEditOperation(new c.Q(s.endLineNumber,e.getLineMaxColumn(s.endLineNumber),s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),"\n"+l),this.shouldAutoIndent(e,s)){const l={tokenization:{getLineTokens:t=>t===o?e.tokenization.getLineTokens(s.startLineNumber):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o?e.getLineContent(s.startLineNumber):e.getLineContent(t)},c=this.matchEnterRule(e,u,r,s.startLineNumber,s.startLineNumber-2);if(null!==c)0!==c&&this.getIndentEditsOfMovingBlock(e,t,s,r,d,c);else{const i=(0,C.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(s.startLineNumber,1),o,u,this._languageConfigurationService);if(null!==i){const n=a.UU(e.getLineContent(s.startLineNumber)),o=w.c(i,r),l=w.c(n,r);if(o!==l){const i=o-l;this.getIndentEditsOfMovingBlock(e,t,s,r,d,i)}}}}}this._selectionId=t.trackSelection(s)}buildIndentConverter(e,t,i){return{shiftIndent:n=>v.Y.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>v.Y.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===b.l.None||o.indentAction===b.l.Indent?s=o.indentation+o.appendText:o.indentAction===b.l.IndentOutdent?s=o.indentation:o.indentAction===b.l.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(s))>=0){const o=a.UU(e.getLineContent(n));let r=a.UU(s);const l=(0,C.Yb)(e,n,this._languageConfigurationService);null!==l&&2&l&&(r=t.unshiftIndent(r));const c=w.c(r,i),d=w.c(o,i);return c-d}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(a.lT(s)>=0){const s=e.getLineMaxColumn(o),r=(0,S.h)(this._autoIndent,e,new c.Q(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;while(o>=1){const t=e.getLineContent(o),i=a.lT(t);if(i>=0)break;o--}if(o<1||n>e.getLineCount())return null;const s=e.getLineMaxColumn(o),r=(0,S.h)(this._autoIndent,e,new c.Q(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;while(r>=1){let t;t=r===o&&void 0!==s?s:e.getLineContent(r);const i=a.lT(t);if(i>=0)break;r--}if(r<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(r),d=(0,S.h)(this._autoIndent,e,new c.Q(r,l,r,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return i===n&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const l=e.getLineContent(r),d=a.UU(l),u=w.c(d,n),h=u+s,g=w.k(h,n,o);g!==d&&(t.addEditOperation(new c.Q(r,1,r,d.length+1),g),r===i.endLineNumber&&i.endColumn<=d.length+1&&""===g&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=o)return null;const s=[];for(let t=n;t<=o;t++)s.push(e.getLineContent(t));let r=s.slice(0);return r.sort(L.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}function I(e,t,i){const n=T(e,t,i);return n?l.k.replace(new c.Q(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}var D=i(41337),R=i(6330),N=i(32828);class A extends s.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>c.Q.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;enew p.y(e.positionLineNumber,e.positionColumn))));const o=t.getSelection();if(null===o)return;const s=e.get(N.pG),r=t.getModel(),a=s.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:r?.getLanguageId(),resource:r?.uri}),l=new d(o,n,a);t.pushUndoStop(),t.executeCommands(this.id,[l]),t.pushUndoStop()}}class $ extends s.ks{constructor(){super({id:"editor.action.deleteLines",label:D.kg("lines.delete","Delete Line"),alias:"Delete Line",precondition:m.R.writable,kbOpts:{kbExpr:m.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0;const s=[],r=[];for(let e=0,t=i.length;e1&&(a-=1,d=n.getLineMaxColumn(a)),s.push(l.k.replace(new f.L(a,d,c,u),"")),r.push(new f.L(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class q extends s.ks{constructor(){super({id:"editor.action.indentLines",label:D.kg("lines.indent","Indent Line"),alias:"Indent Line",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,h.T.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class K extends s.ks{constructor(){super({id:"editor.action.outdentLines",label:D.kg("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:2140,weight:100}})}run(e,t){o.Yh.Outdent.runEditorCommand(e,t,null)}}class G extends s.ks{constructor(){super({id:"editor.action.insertLineBefore",label:D.kg("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,g.AO.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class Q extends s.ks{constructor(){super({id:"editor.action.insertLineAfter",label:D.kg("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,g.AO.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class Y extends s.ks{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;el.k.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class Z extends Y{constructor(){super({id:"deleteAllLeft",label:D.kg("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:m.R.writable,kbOpts:{kbExpr:m.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let o=0;return t.forEach((t=>{let s;if(1===t.endColumn&&o>0){const e=t.startLineNumber-o;s=new f.L(e,t.startColumn,e,t.startColumn)}else s=new f.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(c.Q.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new c.Q(t,i,e.startLineNumber,1)}return new c.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.Q(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}class X extends Y{constructor(){super({id:"deleteAllRight",label:D.kg("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:m.R.writable,kbOpts:{kbExpr:m.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let o=0,s=t.length,r=0;o{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new c.Q(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new c.Q(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(c.Q.compareRangesUsingStarts),n}}class J extends s.ks{constructor(){super({id:"editor.action.joinLines",label:D.kg("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:m.R.writable,kbOpts:{kbExpr:m.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(c.Q.compareRangesUsingStarts);const o=[],s=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new f.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new f.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(s);const r=t.getModel();if(null===r)return;const a=[],d=[];let u=n,h=0;for(let e=0,t=o.length;e=1){let e=!0;""===v&&(e=!1),!e||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(e=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));const n=t.substr(i-1);v+=(e?" ":"")+n,m=e?n.length+1:n.length}else m=0}const b=new c.Q(i,s,g,p);if(!b.isEmpty()){let e;t.isEmpty()?(a.push(l.k.replace(b,v)),e=new f.L(b.startLineNumber-h,v.length-m+1,i-h,v.length-m+1)):t.startLineNumber===t.endLineNumber?(a.push(l.k.replace(b,v)),e=new f.L(t.startLineNumber-h,t.startColumn,t.endLineNumber-h,t.endColumn)):(a.push(l.k.replace(b,v)),e=new f.L(t.startLineNumber-h,t.startColumn,t.startLineNumber-h,v.length-_)),null!==c.Q.intersectRanges(b,n)?u=e:d.push(e)}h+=b.endLineNumber-b.startLineNumber}d.unshift(u),t.pushUndoStop(),t.executeEdits(this.id,a,d),t.pushUndoStop()}}class ee extends s.ks{constructor(){super({id:"editor.action.transpose",label:D.kg("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:m.R.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=[];for(let e=0,t=i.length;e=a){if(s.lineNumber===n.getLineCount())continue;const e=new c.Q(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.iu(new f.L(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t))}else{const e=new c.Q(s.lineNumber,Math.max(1,s.column-1),s.lineNumber,s.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.ui(e,t,new f.L(s.lineNumber,s.column+1,s.lineNumber,s.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class te extends s.ks{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(132),s=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;const a=new c.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),d=n.getValueInRange(a);s.push(l.k.replace(a,this._modifyText(d,o)))}else{const t=n.getValueInRange(e);s.push(l.k.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class ie extends te{constructor(){super({id:"editor.action.transformToUppercase",label:D.kg("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:m.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class ne extends te{constructor(){super({id:"editor.action.transformToLowercase",label:D.kg("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:m.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class oe{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class se extends te{static{this.titleBoundary=new oe("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:D.kg("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:m.R.writable})}_modifyText(e,t){const i=se.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}class re extends te{static{this.caseBoundary=new oe("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new oe("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:D.kg("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:m.R.writable})}_modifyText(e,t){const i=re.caseBoundary.get(),n=re.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}class ae extends te{static{this.wordBoundary=new oe("[_\\s-]","gm")}constructor(){super({id:"editor.action.transformToCamelcase",label:D.kg("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:m.R.writable})}_modifyText(e,t){const i=ae.wordBoundary.get();if(!i)return e;const n=e.split(i),o=n.shift();return o+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}class le extends te{static{this.wordBoundary=new oe("[_\\s-]","gm")}static{this.wordBoundaryToMaintain=new oe("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:D.kg("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:m.R.writable})}_modifyText(e,t){const i=le.wordBoundary.get(),n=le.wordBoundaryToMaintain.get();if(!i||!n)return e;const o=e.split(n),s=o.map((e=>e.split(i))).flat();return s.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}class ce extends te{static isSupported(){const e=[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()));return e}static{this.caseBoundary=new oe("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new oe("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new oe("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:D.kg("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:m.R.writable})}_modifyText(e,t){const i=ce.caseBoundary.get(),n=ce.singleLetters.get(),o=ce.underscoreBoundary.get();return i&&n&&o?e.replace(o,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}(0,s.Fl)(O),(0,s.Fl)(P),(0,s.Fl)(M),(0,s.Fl)(B),(0,s.Fl)(W),(0,s.Fl)(V),(0,s.Fl)(j),(0,s.Fl)(z),(0,s.Fl)(U),(0,s.Fl)($),(0,s.Fl)(q),(0,s.Fl)(K),(0,s.Fl)(G),(0,s.Fl)(Q),(0,s.Fl)(Z),(0,s.Fl)(X),(0,s.Fl)(J),(0,s.Fl)(ee),(0,s.Fl)(ie),(0,s.Fl)(ne),re.caseBoundary.isSupported()&&re.singleLetters.isSupported()&&(0,s.Fl)(re),ae.wordBoundary.isSupported()&&(0,s.Fl)(ae),le.wordBoundary.isSupported()&&(0,s.Fl)(le),se.titleBoundary.isSupported()&&(0,s.Fl)(se),ce.isSupported()&&(0,s.Fl)(ce)},41439:(e,t,i)=>{"use strict";var n,o=i(85053),s=i(9659),r=i(67792),a=i(85476),l=i(14396),c=i(40231),d=i(5091),u=i(20601),h=i(29133),g=i(16259),p=i(94728),f=i(36788),m=i(8690),_=i(57479),v=i(35037),b=i(50395),y=i(41337),w=i(18904),C=i(12847),S=i(66344),k=i(85983),x=i(84240),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};const T=new w.N1("LinkedEditingInputVisible",!1),I="linked-editing-decoration";let D=class extends d.jG{static{n=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=v.kI.register({description:"linked-editing",stickiness:0,className:I})}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new d.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=T.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new d.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(70)||e.hasChanged(94))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(70)||this._editor.getOption(94))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(c.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new s.ve(this._debounceInformation.get(t)),o=()=>{this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),this._debounceDuration??this._debounceInformation.get(t))},r=new s.ve(0),a=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{o()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void a(this._syncRangesToken)}o()}))),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern),t=e?e[0].length:0;if(t!==n.length)return this.clearRanges()}const o=[];for(let e=1,i=this._currentDecorations.length;e1)return void this.clearRanges();const i=this._editor.getModel(),o=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=o;const s=this._currentRequestCts=new r.Qi;try{const e=new x.W(!1),r=await A(this._providers,i,t,s.token);if(this._debounceInformation.update(i,e.elapsed()),s!==this._currentRequestCts)return;if(this._currentRequestCts=null,o!==i.getVersionId())return;let a=[];r?.ranges&&(a=r.ranges),this._currentWordPattern=r?.wordPattern||this._languageWordPattern;let l=!1;for(let e=0,i=a.length;e({range:e,options:n.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(c),this._syncRangesToken++}catch(e){(0,l.MB)(e)||(0,l.dz)(e),this._currentRequestCts!==s&&this._currentRequestCts||this.clearRanges()}}};D=n=E([L(1,w.fN),L(2,C.ILanguageFeaturesService),L(3,b.JZ),L(4,k.ILanguageFeatureDebounceService)],D);class R extends g.ks{constructor(){super({id:"editor.action.linkedEditing",label:y.kg("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:w.M$.and(_.R.writable,_.R.hasRenameProvider),kbOpts:{kbExpr:_.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(p.T),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return h.r.isUri(n)&&f.y.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),l.dz):super.runCommand(e,t)}run(e,t){const i=D.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const N=g.DX.bindToContribution(D.get);function A(e,t,i,n){const r=e.ordered(t);return(0,s.$1)(r.map((e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,n)}catch(e){return void(0,l.M_)(e)}})),(e=>!!e&&o.EI(e?.ranges)))}(0,g.E_)(new N({id:"cancelLinkedEditingInput",precondition:T,handler:e=>e.clearRanges(),kbOpts:{kbExpr:_.R.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));(0,S.x1A)("editor.linkedEditingBackground",{dark:a.Q1.fromHex("#f00").transparent(.3),light:a.Q1.fromHex("#f00").transparent(.3),hcDark:a.Q1.fromHex("#f00").transparent(.3),hcLight:a.Q1.white},y.kg("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,g.ke)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(C.ILanguageFeaturesService);return A(n,t,i,r.XO.None)})),(0,g.HW)(D.ID,D,1),(0,g.Fl)(R)},35245:(e,t,i)=>{"use strict";var n=i(9659),o=i(67792),s=i(14396),r=i(42325),a=i(5091),l=i(6657),c=i(25160),d=i(84366),u=i(84240),h=i(29133),g=i(16259),p=i(35037),f=i(85983),m=i(12847),_=i(51170),v=i(85053),b=i(50322),y=i(8690),w=i(69361),C=i(72786);class S{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:"function"===typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}}class k{constructor(e){this._disposables=new a.Cm;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new S(e,n)));t=k._union(t,e),(0,a.Xm)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,o,s,r;for(n=0,s=0,o=e.length,r=t.length;nPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[o]=[t,e])}),s.M_)));return Promise.all(o).then((()=>{const e=new k((0,v.Yc)(n));return i.isCancellationRequested?(e.dispose(),new k([])):e}))}C.w.registerCommand("_executeLinkProvider",(async(e,...t)=>{let[i,n]=t;(0,b.j)(i instanceof h.r),"number"!==typeof n&&(n=0);const{linkProvider:s}=e.get(m.ILanguageFeaturesService),r=e.get(w.IModelService).getModel(i);if(!r)return[];const a=await x(s,r,o.XO.None);if(!a)return[];for(let e=0;e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};let N=class extends a.jG{static{E=this}static{this.ID="editor.linkDetector"}static get(e){return e.getContribution(E.ID)}constructor(e,t,i,o,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=o,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new n.uC((()=>this.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new _.gi(e));this._register(r.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(r.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(r.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,n.SS)((t=>x(this.providers,e,t)));try{const t=new u.W(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,s.dz)(e)}finally{this.computePromise=null}}}updateDecorations(e){const t="altKey"===this.editor.getOption(78),i=[],n=Object.keys(this.currentOccurrences);for(const e of n){const t=this.currentOccurrences[e];i.push(t.decorationId)}const o=[];if(e)for(const i of e)o.push(O.decoration(i,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=n.length;t{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(78);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(o.XO.None).then((e=>{if("string"===typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l.ny.file&&e.startsWith(`${l.ny.file}:`)){const i=h.r.parse(e);if(i.scheme===l.ny.file){const n=d.su(i);let o=null;n.startsWith("/./")||n.startsWith("\\.\\")?o=`.${n.substr(1)}`:(n.startsWith("//./")||n.startsWith("\\\\.\\"))&&(o=`.${n.substr(2)}`),o&&(e=d.uJ(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(L.kg("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(L.kg("missing.url","Failed to open this link because its target is missing.")):(0,s.dz)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};N=E=D([R(1,I.C),R(2,T.Ot),R(3,m.ILanguageFeaturesService),R(4,f.ILanguageFeatureDebounceService)],N);const A={general:p.kI.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:p.kI.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class O{static decoration(e,t){return{range:e.range,options:O._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?A.active:A.general};return n.hoverMessage=P(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,O._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,O._getOptions(this.link,t,!1))}}function P(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?L.kg("links.navigate.executeCmd","Execute command"):L.kg("links.navigate.follow","Follow link"),o=t?c.zx?L.kg("links.navigate.kb.meta.mac","cmd + click"):L.kg("links.navigate.kb.meta","ctrl + click"):c.zx?L.kg("links.navigate.kb.alt.mac","option + click"):L.kg("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=L.kg("tooltip.explanation","Execute command {0}",e)}}const i=new r.Bc("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${o})`);return i}return(new r.Bc).appendText(`${n} (${o})`)}class M extends g.ks{constructor(){super({id:"editor.action.openLink",label:L.kg("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=N.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const e of n){const t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,g.HW)(N.ID,N,1),(0,g.Fl)(M)},72239:(e,t,i)=>{"use strict";var n=i(5091),o=i(16259);class s extends n.jG{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(118);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}(0,o.HW)(s.ID,s,2)},61307:(e,t,i)=>{"use strict";i.d(t,{k:()=>v});var n,o=i(44964),s=i(19950),r=i(40231),a=i(42325),l=i(5091),c=i(16259),d=i(8690),u=i(36511),h=i(41337),g=i(18904),p=i(10170),f=i(2150),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{static{n=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new g.N1("messageVisible",!1,h.kg("messageVisible","Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(n.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new l.HE,this._messageListeners=new l.Cm,this._mouseOverMessage=!1,this._editor=e,this._visible=n.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._message?.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,s.xE)((0,a.VS)(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,a.VS)(e)?(0,o.Gc)(e,{actionHandler:{callback:t=>{this.closeMessage(),(0,u.i)(this._openerService,t,(0,a.VS)(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new y(this._editor,t,"string"===typeof e?e:this._message.element),this._messageListeners.add(r.Jh.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&f.QX(f.bq(),this._messageWidget.value.getDomNode())||this.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(f.ko(this._messageWidget.value.getDomNode(),f.Bx.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(f.ko(this._messageWidget.value.getDomNode(),f.Bx.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new d.Q(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(y.fadeOut(this._messageWidget.value))}};v=n=m([_(1,g.fN),_(2,p.C)],v);const b=c.DX.bindToContribution(v.get);(0,c.E_)(new b({id:"leaveEditorMessage",precondition:v.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class y{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");"string"===typeof n?(s.classList.add("message"),s.textContent=n):(n.classList.add("message"),s.appendChild(n)),this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,c.HW)(v.ID,v,4)},27471:(e,t,i)=>{"use strict";var n,o=i(19950),s=i(9659),r=i(91348),a=i(5091),l=i(16259),c=i(7657),d=i(8690),u=i(98581),h=i(57479),g=i(28369),p=i(41337),f=i(6330),m=i(18904),_=i(12847),v=i(12321),b=i(87778),y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};function C(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?p.kg("cursorAdded","Cursor added: {0}",e):p.kg("cursorsAdded","Cursors added: {0}",e);(0,o.h5)(t)}}class S extends l.ks{constructor(){super({id:"editor.action.insertCursorAbove",label:p.kg("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:h.R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,c.c.addCursorUp(o,s,n)),o.revealTopMostCursor(i.source),C(s,o.getCursorStates())}}class k extends l.ks{constructor(){super({id:"editor.action.insertCursorBelow",label:p.kg("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:h.R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,c.c.addCursorDown(o,s,n)),o.revealBottomMostCursor(i.source),C(s,o.getCursorStates())}}class x extends l.ks{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:p.kg("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:h.R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new u.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),C(s,o.getCursorStates())}}class E extends l.ks{constructor(){super({id:"editor.action.addCursorsToBottom",label:p.kg("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new u.L(e,i[0].startColumn,e,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();o.length>0&&t.setSelections(o),C(r,s.getCursorStates())}}class L extends l.ks{constructor(){super({id:"editor.action.addCursorsToTop",label:p.kg("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new u.L(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),C(s,o.getCursorStates())}}class T{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class I{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new I(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,s=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(s=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,c=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,c=new u.L(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new I(e,t,s,l,n,o,c)}constructor(e,t,i,n,o,s,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=s,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new T(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new T(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new u.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new T(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new T(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new u.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824)}}class D extends a.jG{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(D.ID)}constructor(e){super(),this._sessionDispose=this._register(new a.Cm),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=I.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new u.L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState(),n=i.matchCase,o=H(this._editor.getModel(),t,n);if(!o){const e=this._editor.getModel(),i=[];for(let n=0,o=t.length;n0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew u.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}class R extends l.ks{run(e,t){const i=D.get(t);if(!i)return;const n=t._getViewModel();if(n){const o=n.getCursorStates(),s=g.z0.get(t);if(s)this._run(i,s);else{const n=e.get(b._Y).createInstance(g.z0,t);this._run(i,n),n.dispose()}C(o,n.getCursorStates())}}}class N extends R{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p.kg("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:h.R.focus,primary:2082,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class A extends R{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p.kg("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class O extends R{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p.kg("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:h.R.focus,primary:(0,r.m5)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class P extends R{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p.kg("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class M extends R{constructor(){super({id:"editor.action.selectHighlights",label:p.kg("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:h.R.focus,primary:3114,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class F extends R{constructor(){super({id:"editor.action.changeAll",label:p.kg("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:m.M$.and(h.R.writable,h.R.editorTextFocus),kbOpts:{kbExpr:h.R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class B{constructor(e,t,i,n,o){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(d.Q.compareRangesUsingStarts)),this._cachedFindMatches}}let W=class extends a.jG{static{n=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(109),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new s.uC((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(109)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=g.z0.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(n._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const o=D.get(i);if(!o)return null;const s=g.z0.get(i);if(!s)return null;let r=o.getSession(s);if(!r){const e=i.getSelections();if(e.length>1){const t=s.getState(),n=t.matchCase,o=H(i.getModel(),e,n);if(!o)return null}r=I.create(i,s)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=s.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new B(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(132):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(d.Q.compareRangesUsingStarts);const o=[];for(let e=0,t=0,s=i.length,r=n.length;e=r)o.push(s),e++;else{const i=d.Q.compareRangesUsingStarts(s,n[t]);i<0?(!n[t].isEmpty()&&d.Q.areIntersecting(s,n[t])||o.push(s),e++):(i>0||e++,t++)}}const s="off"!==this.editor.getOption(81),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&s,a=o.map((e=>({range:e,options:(0,v.v)(r)})));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function H(e,t,i){const n=V(e,t[0],!i);for(let o=1,s=t.length;o{"use strict";var n=i(85661),o=i(5091),s=i(16259),r=i(57479),a=i(35350),l=i(12847),c=i(9659),d=i(14396),u=i(40231),h=i(94529),g=i(67792),p=i(50322),f=i(29133),m=i(36788),_=i(64037),v=i(72786),b=i(18904);const y={Visible:new b.N1("parameterHintsVisible",!1),MultipleSignatures:new b.N1("parameterHintsMultipleSignatures",!1)};async function w(e,t,i,n,o){const s=e.ordered(t);for(const e of s)try{const s=await e.provideSignatureHelp(t,i,o,n);if(s)return s}catch(e){(0,d.M_)(e)}}var C;v.w.registerCommand("_executeSignatureHelpProvider",(async(e,...t)=>{const[i,n,o]=t;(0,p.j)(f.r.isUri(i)),(0,p.j)(m.y.isIPosition(n)),(0,p.j)("string"===typeof o||!o);const s=e.get(l.ILanguageFeaturesService),r=await e.get(_.ITextModelService).createModelReference(i);try{const e=await w(s.signatureHelpProvider,r.object.textEditorModel,m.y.lift(n),{triggerKind:a.WA.Invoke,isRetrigger:!1,triggerCharacter:o},g.XO.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}})),function(e){e.Default={type:0};class t{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}}e.Pending=t;class i{constructor(e){this.hints=e,this.type=1}}e.Active=i}(C||(C={}));class S extends o.jG{static{this.DEFAULT_DELAY=120}constructor(e,t,i=S.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new u.vl),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=C.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new o.HE),this.triggerChars=new h.y,this.retriggerChars=new h.y,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new c.ve(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=C.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(d.dz)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new C.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(k);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),r=this.editor.getPosition();this.state=new C.Pending((0,c.SS)((e=>w(this.providers,s,r,o,e))),i);try{const t=await this.state.request;return e!==this.triggerId?(t?.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new C.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(t?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=C.Default),(0,d.dz)(t),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:a.WA.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.WA.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.WA.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function k(e,t){switch(t.triggerKind){case a.WA.Invoke:return t;case a.WA.ContentChange:return e;case a.WA.TriggerCharacter:default:return t}}var x,E=i(41337),L=i(87778),T=i(2150),I=i(19950),D=i(37800),R=i(25923),N=i(20601),A=i(35011),O=i(14573),P=i(36511),M=i(10170),F=i(66344),B=i(48401),W=i(23740),H=i(84240),V=i(11086),j=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z=function(e,t){return function(i,n){t(i,n,e)}};const U=T.$,$=(0,B.pU)("parameter-hints-next",R.W.chevronDown,E.kg("parameterHintsNextIcon","Icon for show next parameter hint.")),q=(0,B.pU)("parameter-hints-previous",R.W.chevronUp,E.kg("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let K=class extends o.jG{static{x=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,i,n,s,r){super(),this.editor=e,this.model=t,this.telemetryService=r,this.renderDisposeables=this._register(new o.Cm),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new P.T({editor:e},s,n)),this.keyVisible=y.Visible.bindTo(i),this.keyMultipleSignatures=y.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=U(".editor-widget.parameter-hints-widget"),t=T.BC(e,U(".phwrapper"));t.tabIndex=-1;const i=T.BC(t,U(".controls")),n=T.BC(i,U(".button"+W.L.asCSSSelector(q))),o=T.BC(i,U(".overloads")),s=T.BC(i,U(".button"+W.L.asCSSSelector($)));this._register(T.ko(n,"click",(e=>{T.fs.stop(e),this.previous()}))),this._register(T.ko(s,"click",(e=>{T.fs.stop(e),this.next()})));const r=U(".body"),a=new D.MU(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=T.BC(r,U(".signature")),c=T.BC(r,U(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:o,docs:c,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const d=()=>{if(!this.domNodes)return;const e=this.editor.getOption(50),t=this.domNodes.element;t.style.fontSize=`${e.fontSize}px`,t.style.lineHeight=""+e.lineHeight/e.fontSize,t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",e.fontFamily),t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",A.jU.fontFamily)};d(),this._register(u.Jh.chain(this.editor.onDidChangeConfiguration.bind(this.editor),(e=>e.filter((e=>e.hasChanged(50)))))(d)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{this.domNodes?.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const n=T.BC(this.domNodes.signature,U(".code")),o=i.parameters.length>0,s=i.activeParameter??e.activeParameter;if(o)this.renderParameters(n,i,s);else{const e=T.BC(n,U("span"));e.textContent=i.label}const r=i.parameters[s];if(r?.documentation){const e=U("span.documentation");if("string"===typeof r.documentation)e.textContent=r.documentation;else{const t=this.renderMarkdownDocs(r.documentation);e.appendChild(t.element)}T.BC(this.domNodes.docs,U("p",{},e))}if(void 0===i.documentation);else if("string"===typeof i.documentation)T.BC(this.domNodes.docs,U("p",{},i.documentation));else{const e=this.renderMarkdownDocs(i.documentation);T.BC(this.domNodes.docs,e.element)}const a=this.hasDocs(i,r);if(this.domNodes.signature.classList.toggle("has-docs",a),this.domNodes.docs.classList.toggle("empty",!a),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,r){let e="";const t=i.parameters[s];e=Array.isArray(t.label)?i.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"===typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),i.documentation&&(e+="string"===typeof i.documentation?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==e&&(I.xE(E.kg("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=new H.W,i=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));i.element.classList.add("markdown-docs");const n=t.elapsed();return n>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:n}),i}hasDocs(e,t){return!!(t&&"string"===typeof t.documentation&&(0,p.eU)(t.documentation).length>0)||(!!(t&&"object"===typeof t.documentation&&(0,p.eU)(t.documentation).value.length>0)||(!!(e.documentation&&"string"===typeof e.documentation&&(0,p.eU)(e.documentation).length>0)||!!(e.documentation&&"object"===typeof e.documentation&&(0,p.eU)(e.documentation.value).length>0)))}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),s=document.createElement("span");s.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,o),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),T.BC(e,s,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,N.bm)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return x.ID}updateMaxHeight(){if(!this.domNodes)return;const e=Math.max(this.editor.getLayoutInfo().height/4,250),t=`${e}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};K=x=j([z(2,b.fN),z(3,M.C),z(4,O.L),z(5,V.k)],K),(0,F.x1A)("editorHoverWidget.highlightForeground",F.QI5,E.kg("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var G,Q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Y=function(e,t){return function(i,n){t(i,n,e)}};let Z=class extends o.jG{static{G=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution(G.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new S(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{e?(this.widget.value.show(),this.widget.value.render(e)):this.widget.rawValue?.hide()}))),this.widget=new n.d((()=>this._register(t.createInstance(K,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};Z=G=Q([Y(1,L._Y),Y(2,l.ILanguageFeaturesService)],Z);class X extends s.ks{constructor(){super({id:"editor.action.triggerParameterHints",label:E.kg("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:r.R.hasSignatureHelpProvider,kbOpts:{kbExpr:r.R.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=Z.get(t);i?.trigger({triggerKind:a.WA.Invoke})}}(0,s.HW)(Z.ID,Z,2),(0,s.Fl)(X);const J=175,ee=s.DX.bindToContribution(Z.get);(0,s.E_)(new ee({id:"closeParameterHints",precondition:y.Visible,handler:e=>e.cancel(),kbOpts:{weight:J,kbExpr:r.R.focus,primary:9,secondary:[1033]}})),(0,s.E_)(new ee({id:"showPrevParameterHint",precondition:b.M$.and(y.Visible,y.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:J,kbExpr:r.R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,s.E_)(new ee({id:"showNextParameterHint",precondition:b.M$.and(y.Visible,y.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:J,kbExpr:r.R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},55571:(e,t,i)=>{"use strict";i.d(t,{zn:()=>O,x2:()=>P,j6:()=>W,RL:()=>F,zl:()=>z,n6:()=>U,z0:()=>H,_X:()=>V,e3:()=>j});var n=i(2150),o=i(48038),s=i(55664),r=i(25923),a=i(23740),l=i(85476),c=i(40231),d=i(85603),u=i(16259),h=i(94728),g=i(50576),p=i(53062),f=i(23453),m=i(5091),_=i(8690),v=i(35037);const b=new l.Q1(new l.bU(0,122,204)),y={showArrow:!0,showFrame:!0,className:"",frameColor:b,arrowColor:b,keepEditorSelection:!1},w="vs.editor.contrib.zoneWidget";class C{constructor(e,t,i,n,o,s,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class S{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class k{static{this._IdGenerator=new f.n(".arrow-decoration-")}constructor(e){this._editor=e,this._ruleName=k._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),n.U2(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){n.U2(this._ruleName),n.Wt(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:_.Q.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}class x{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new m.Cm,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=d.Go(t),d.co(this.options,y,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new k(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash?.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=_.Q.isIRange(e)?_.Q.lift(e):_.Q.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:v.kI.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new C(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new S(w+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const c=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,o),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const t=d.validateRange(new _.Q(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new p.m(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(67),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var E=i(41337),L=i(85141),T=i(18904),I=i(59857),D=i(87778),R=i(66344),N=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};const O=(0,D.u1)("IPeekViewService");var P;(0,I.v)(O,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());const n=()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))};this._widgets.set(e,{widget:t,listener:t.onDidClose(n)})}},1),function(e){e.inPeekEditor=new T.N1("inReferenceSearchEditor",!0,E.kg("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(P||(P={}));let M=class{static{this.ID="editor.contrib.referenceController"}constructor(e,t){e instanceof g.t&&P.inPeekEditor.bindTo(t)}dispose(){}};function F(e){const t=e.get(h.T).getFocusedCodeEditor();return t instanceof g.t?t.getParentEditor():t}M=N([A(1,T.fN)],M),(0,u.HW)(M.ID,M,0);const B={headerBackgroundColor:l.Q1.white,primaryHeadingColor:l.Q1.fromHex("#333333"),secondaryHeadingColor:l.Q1.fromHex("#6c6c6cb3")};let W=class extends x{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new c.vl,this.onDidClose=this._onDidClose.event,d.co(this.options,B,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=n.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),n.b2(this._titleElement,"click",(e=>this._onTitleClick(e)))),n.BC(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.BC(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=n.$(".peekview-actions");n.BC(this._headElement,i);const l=this._getActionBarOptions();this._actionbarWidget=new o.E(i,l),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new s.rc("peekview.close",E.kg("label.close","Close"),a.L.asClassName(r.W.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:L.rN.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:n.w_(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.WU(this._metaHeading)):n.jD(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(67)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};W=N([A(2,D._Y)],W);const H=(0,R.x1A)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Q1.black,hcLight:l.Q1.white},E.kg("peekViewTitleBackground","Background color of the peek view title area.")),V=(0,R.x1A)("peekViewTitleLabel.foreground",{dark:l.Q1.white,light:l.Q1.black,hcDark:l.Q1.white,hcLight:R.By2},E.kg("peekViewTitleForeground","Color of the peek view title.")),j=(0,R.x1A)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},E.kg("peekViewTitleInfoForeground","Color of the peek view title info.")),z=(0,R.x1A)("peekView.border",{dark:R.pOz,light:R.pOz,hcDark:R.b1q,hcLight:R.b1q},E.kg("peekViewBorder","Color of the peek view borders and arrow.")),U=(0,R.x1A)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Q1.black,hcLight:l.Q1.white},E.kg("peekViewResultsBackground","Background color of the peek view result list.")),$=((0,R.x1A)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:l.Q1.white,hcLight:R.By2},E.kg("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),(0,R.x1A)("peekViewResult.fileForeground",{dark:l.Q1.white,light:"#1E1E1E",hcDark:l.Q1.white,hcLight:R.By2},E.kg("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),(0,R.x1A)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},E.kg("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),(0,R.x1A)("peekViewResult.selectionForeground",{dark:l.Q1.white,light:"#6C6C6C",hcDark:l.Q1.white,hcLight:R.By2},E.kg("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),(0,R.x1A)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:l.Q1.black,hcLight:l.Q1.white},E.kg("peekViewEditorBackground","Background color of the peek view editor.")));(0,R.x1A)("peekViewEditorGutter.background",$,E.kg("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),(0,R.x1A)("peekViewEditorStickyScroll.background",$,E.kg("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),(0,R.x1A)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},E.kg("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),(0,R.x1A)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},E.kg("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),(0,R.x1A)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:R.buw,hcLight:R.buw},E.kg("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},26044:(e,t,i)=>{"use strict";var n=i(16259),o=i(52764),s=i(41337),r=i(75115),a=i(47805),l=i(44757),c=i(34956),d=i(39751),u=i(87778),h=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};class p{constructor(e){this.instantiationService=e}init(...e){}}function f(e,t){return class extends t{constructor(){super(...arguments),this._autorun=void 0}init(...t){this._autorun=(0,d.yC)(((i,n)=>{const o=(0,c.b)(e(),i);n.add(this.instantiationService.createInstance(o,...t))}))}dispose(){this._autorun?.dispose()}}}function m(e){return(0,l.e)()?f(e,_):e()}let _=class extends p{constructor(e,t){super(t),this.init(e)}};_=h([g(1,u._Y)],_),(0,n.HW)(a.X.ID,m((()=>a.X)),0),(0,r.x1)("editor.placeholder.foreground",o.Ek,(0,s.kg)("placeholderForeground","Foreground color of the placeholder text in the editor."))},47805:(e,t,i)=>{"use strict";i.d(t,{X:()=>c});var n=i(2150),o=i(45746),s=i(5091),r=i(39751),a=i(42389),l=i(55745);class c extends s.jG{static{this.ID="editor.contrib.placeholderText"}constructor(e){super(),this._editor=e,this._editorObs=(0,l.Ud)(this._editor),this._placeholderText=this._editorObs.getOption(88),this._state=(0,r.C)({owner:this,equalsFn:o.dB},(e=>{const t=this._placeholderText.read(e);if(t&&this._editorObs.valueIsEmpty.read(e))return{placeholder:t}})),this._shouldViewBeAlive=d(this,(e=>void 0!==this._state.read(e)?.placeholder)),this._view=(0,a.rm)(((e,t)=>{if(!this._shouldViewBeAlive.read(e))return;const i=(0,n.h)("div.editorPlaceholder");t.add((0,r.fm)((e=>{const t=this._state.read(e),n=void 0!==t?.placeholder;i.root.style.display=n?"block":"none",i.root.innerText=t?.placeholder??""}))),t.add((0,r.fm)((e=>{const t=this._editorObs.layoutInfo.read(e);i.root.style.left=`${t.contentLeft}px`,i.root.style.width=t.contentWidth-t.verticalScrollbarWidth+"px",i.root.style.top=`${this._editor.getTopForLineNumber(0)}px`}))),t.add((0,r.fm)((e=>{i.root.style.fontFamily=this._editorObs.getOption(49).read(e),i.root.style.fontSize=this._editorObs.getOption(52).read(e)+"px",i.root.style.lineHeight=this._editorObs.getOption(67).read(e)+"px"}))),t.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:(0,r.lk)(0),position:(0,r.lk)(null),domNode:i.root}))})),this._view.recomputeInitiallyAndOnChange(this._store)}}function d(e,t){return(0,r.ZX)(e,((e,i)=>!0===i||t(e)))}},24246:(e,t,i)=>{"use strict";i.d(t,{o:()=>d});var n=i(90702),o=i(5091),s=i(55413),r=i(9322),a=i(52764),l=i(15911),c=i(19950);class d{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){const n=new o.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new o.HE);return s.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange((()=>{s.value=void 0,s.value=this.doProvide(e,t)}))),n}doProvide(e,t,i){const r=new o.Cm,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const l={editor:a},c=(0,s.jA)(a);if(c){let e=a.saveViewState()??void 0;r.add(c.onDidChangeCursorPosition((()=>{e=a.saveViewState()??void 0}))),l.restoreViewState=()=>{e&&a===this.activeTextEditorControl&&a.restoreViewState(e)},r.add((0,n.P)(t.onCancellationRequested)((()=>l.restoreViewState?.())))}r.add((0,o.s)((()=>this.clearDecorations(a)))),r.add(this.provideWithTextEditor(l,e,t,i))}else r.add(this.provideWithoutTextEditor(e,t));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&(0,c.h5)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return(0,s.Np)(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,l.Yf)(a.vp),position:r.A5.Full}}}],[o,s]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:s}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},92910:(e,t,i)=>{"use strict";var n=i(42325),o=i(5091),s=i(16259),r=i(61307),a=i(41337);class l extends o.jG{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=r.k.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(93);t||(t=this.editor.isSimpleWidget?new n.Bc(a.kg("editor.simple.readonly","Cannot edit in read-only input")):new n.Bc(a.kg("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}(0,s.HW)(l.ID,l,2)},90709:(e,t,i)=>{"use strict";var n=i(19950),o=i(9659),s=i(67792),r=i(14396),a=i(42325),l=i(5091),c=i(50322),d=i(29133),u=i(16259),h=i(3176),g=i(94728),p=i(36788),f=i(8690),m=i(57479),_=i(35350),v=i(12847),b=i(56151),y=i(64339),w=i(61307),C=i(41337),S=i(6330),k=i(27503),x=i(18904),E=i(87778),L=i(12660),T=i(95062),I=i(44838),D=i(16374),R=i(11086),N=i(2150),A=i(68389),O=i(50799),P=i(96371),M=i(84653),F=i(31304),B=i(85053),W=i(25923),H=i(40231),V=i(84240),j=i(11320),z=i(13046),U=i(13153),$=i(66344),q=i(15911),K=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},G=function(e,t){return function(i,n){t(i,n,e)}};const Q=!1,Y=new x.N1("renameInputVisible",!1,C.kg("renameInputVisible","Whether the rename input widget is visible"));new x.N1("renameInputFocused",!1,C.kg("renameInputFocused","Whether the rename input widget is focused"));let Z=class{constructor(e,t,i,n,o,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=s,this.allowEditorOverflow=!0,this._disposables=new l.Cm,this._visibleContextKey=Y.bindTo(o),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new V.W,this._inputWithButton=new J,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new X(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange((()=>{void 0!==this._renameCandidateListView?.focusedCandidate&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),!1===this._renameCandidateProvidersCts?.token.isCancellationRequested&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()}))),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const t=e.getColor($.f9l),i=e.getColor($.DSL);this._domNode.style.backgroundColor=String(e.getColor($.CgL)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor($.cws)??"");const n=e.getColor($.Zgs);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor($.L4c)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor($.L4c)??""),this._inputWithButton.domNode.style.borderWidth=n?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=n?"solid":"none",this._inputWithButton.domNode.style.borderColor=n?.toString()??"none"}_updateFont(){if(void 0===this._domNode)return;(0,c.j)(void 0!==this._label,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return.8*e}getPosition(){if(!this._visible)return null;if(!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=N.tG(this.getDomNode().ownerDocument.body),t=N.BK(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const n=this._editor.getOption(67),{totalHeight:o}=ee.getLayoutInfo({lineHeight:n}),s=this._nPxAvailableBelow>6*o?[2,1]:[1,2];return{position:this._position,preference:s}}beforeRender(){const[e,t]=this._acceptKeybindings;return this._label.innerText=C.kg({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;(0,c.j)(this._renameCandidateListView),(0,c.j)(void 0!==this._nPxAvailableAbove),(0,c.j)(void 0!==this._nPxAvailableBelow);const t=N.OK(this._inputWithButton.domNode),i=N.OK(this._label);let n;n=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._renameCandidateListView.layout({height:n-i-t,width:N.Tr(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,s){const{start:r,end:a}=this._getSelection(e,t);this._renameCts=s;const d=new l.Cm;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,void 0===n?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),d.add(N.ko(this._inputWithButton.button,"click",(()=>this._requestRenameCandidates(t,!0)))),d.add(N.ko(this._inputWithButton.button,N.Bx.KEY_DOWN,(e=>{const i=new A.Z(e);(i.equals(3)||i.equals(10))&&(i.stopPropagation(),i.preventDefault(),this._requestRenameCandidates(t,!0))})))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new p.y(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",r.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max(1.1*(e.endColumn-e.startColumn),20),this._beforeFirstInputFieldEditSW.reset(),d.add((0,l.s)((()=>{this._renameCts=void 0,s.dispose(!0)}))),d.add((0,l.s)((()=>{void 0!==this._renameCandidateProvidersCts&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)}))),d.add((0,l.s)((()=>this._candidates.clear())));const u=new o.Zv;return u.p.finally((()=>{d.dispose(),this._hide()})),this._currentCancelInput=e=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),u.complete(e),!0),this._currentAcceptInput=e=>{this._trace("invoking _currentAcceptInput"),(0,c.j)(void 0!==this._renameCandidateListView);const n=this._renameCandidateListView.nCandidates;let o,s;const r=this._renameCandidateListView.focusedCandidate;void 0!==r?(this._trace("using new name from renameSuggestion"),o=r,s={k:"renameSuggestion"}):(this._trace("using new name from inputField"),o=this._inputWithButton.input.value,s=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),o!==t&&0!==o.trim().length?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),u.complete({newName:o,wantsPreview:i&&e,stats:{source:s,nRenameSuggestions:n,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})):this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)")},d.add(s.token.onCancellationRequested((()=>this.cancelInput(!0,"cts.token.onCancellationRequested")))),Q||d.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget")))),this._show(),u.p}_requestRenameCandidates(e,t){if(void 0!==this._requestRenameCandidatesOnce&&(void 0!==this._renameCandidateProvidersCts&&this._renameCandidateProvidersCts.dispose(!0),(0,c.j)(this._renameCts),"stop"!==this._inputWithButton.buttonState)){this._renameCandidateProvidersCts=new s.Qi;const i=t?_.YT.Invoke:_.YT.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(0===n.length)return void this._inputWithButton.setSparkleButton();t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){(0,c.j)(this._editor.hasModel());const i=this._editor.getSelection();let n=0,o=t.length;return f.Q.isEmpty(i)||f.Q.spansMultipleLines(i)||!f.Q.containsRange(e,i)||(n=Math.max(0,i.startColumn-e.startColumn),o=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:o}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))}),100)}async _updateRenameCandidates(e,t,i){const n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");const s=await(0,o.PK)(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),void 0===s)return void n("returning early - received updateRenameCandidates results - undefined");const r=s.flatMap((e=>"fulfilled"===e.status&&(0,c.O9)(e.value)?e.value:[]));n(`received updateRenameCandidates results - total (unfiltered) ${r.length} candidates.`);const a=B.dM(r,(e=>e.newSymbolName));n(`distinct candidates - ${a.length} candidates.`);const l=a.filter((({newSymbolName:e})=>e.trim().length>0&&e!==this._inputWithButton.input.value&&e!==t&&!this._candidates.has(e)));n(`valid distinct candidates - ${r.length} candidates.`),l.forEach((e=>this._candidates.add(e.newSymbolName))),l.length<1?n("returning early - no valid distinct candidates"):(n("setting candidates"),this._renameCandidateListView.setCandidates(l),n("asking editor to re-layout"),this._editor.layoutContentWidget(this))}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};Z=K([G(2,q.Gy),G(3,z.b),G(4,x.fN),G(5,L.rr)],Z);class X{constructor(e,t){this._disposables=new l.Cm,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=X._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._listWidget.onDidChangeFocus((e=>{1===e.elements.length&&t.onFocusChange(e.elements[0].newSymbolName)}),this._disposables),this._listWidget.onDidChangeSelection((e=>{1===e.elements.length&&t.onSelectionChange()}),this._disposables),this._disposables.add(this._listWidget.onDidBlur((e=>{this._listWidget.setFocus([])}))),this._listWidget.style((0,U.t8)({listInactiveFocusForeground:$.nH,listInactiveFocusBackground:$.AlL}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);const t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,n.h5(C.kg("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(0===this._listWidget.length)return;const e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];return void 0!==t?t.newSymbolName:void 0}focusNext(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}focusPrevious(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length){this._listWidget.focusLast();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}if(0===e[0])return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=ee.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e,i=7,n=Math.min(t,this._availableHeight,this._candidateViewHeight*i);return n}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map((e=>e.newSymbolName.length)))*this._typicalHalfwidthCharacterWidth),i=Math.max(this._minimumWidth,25+t+10);return i}static _createListWidget(e,t,i){const n=new class{getTemplateId(e){return"candidate"}getHeight(e){return t}},o=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new ee(e,i)}renderElement(e,t,i){i.populate(e)}disposeTemplate(e){e.dispose()}};return new F.B8("NewSymbolNameCandidates",e,n,[o],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class J{constructor(){this._onDidInputChange=new H.vl,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new l.Cm}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",C.kg("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=C.kg("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=C.kg("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=(0,O.i)().setupManagedHover((0,P.nZ)("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(N.ko(this.input,N.Bx.INPUT,(()=>this._onDidInputChange.fire()))),this._disposables.add(N.ko(this.input,N.Bx.KEY_DOWN,(e=>{const t=new A.Z(e);15!==t.keyCode&&17!==t.keyCode||this._onDidInputChange.fire()}))),this._disposables.add(N.ko(this.input,N.Bx.CLICK,(()=>this._onDidInputChange.fire()))),this._disposables.add(N.ko(this.input,N.Bx.FOCUS,(()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"}))),this._disposables.add(N.ko(this.input,N.Bx.BLUR,(()=>{this.domNode.style.outline="none"})))),this._domNode}get input(){return(0,c.j)(this._inputNode),this._inputNode}get button(){return(0,c.j)(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=(0,M.s)(W.W.sparkle),N.w_(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHover?.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=(0,M.s)(W.W.primitiveSquare),N.w_(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHover?.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}class ee{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${ee._PADDING}px`;const i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=.8*t.lineHeight+"px",this._domNode.appendChild(i),this._icon=(0,M.s)(W.W.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),j.M(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){const t=!!e.tags?.includes(_.OV.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){const t=e+2*ee._PADDING;return{totalHeight:t}}dispose(){}}var te,ie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ne=function(e,t){return function(i,n){t(i,n,e)}};class oe{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:f.Q.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join("\n")};const s=await o.provideRenameEdits(this.model,this.position,e,n);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),n):s:this._provideRenameEdits(e,t+1,i.concat(C.kg("no result","No result.")),n)}}async function se(e,t,i,n){const o=new oe(t,i,e),r=await o.resolveRenameLocation(s.XO.None);return r?.rejectReason?{edits:[],rejectReason:r.rejectReason}:o.provideRenameEdits(n,s.XO.None)}let re=class{static{te=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(te.ID)}constructor(e,t,i,n,o,r,a,c,d){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=a,this._languageFeaturesService=c,this._telemetryService=d,this._disposableStore=new l.Cm,this._cts=new s.Qi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(Z,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new s.Qi,!this.editor.hasModel())return void e("editor has no model");const t=this.editor.getPosition(),i=new oe(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!i.hasProvider())return void e("skeleton has no provider");const l=new y.gI(this.editor,5,void 0,this._cts.token);let c;try{e("resolving rename location");const t=i.resolveRenameLocation(l.token);this._progressService.showWhile(t,250),c=await t,e("resolved rename location")}catch(i){return void(i instanceof r.AL?e("resolve rename location cancelled",JSON.stringify(i,null,"\t")):(e("resolve rename location failed",i instanceof Error?i:JSON.stringify(i,null,"\t")),("string"===typeof i||(0,a.VS)(i))&&w.k.get(this.editor)?.showMessage(i||C.kg("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t)))}finally{l.dispose()}if(!c)return void e("returning early - no loc");if(c.rejectReason)return e(`returning early - rejected with reason: ${c.rejectReason}`,c.rejectReason),void w.k.get(this.editor)?.showMessage(c.rejectReason,t);if(l.token.isCancellationRequested)return void e("returning early - cts1 cancelled");const d=new y.gI(this.editor,5,c.range,this._cts.token),u=this.editor.getModel(),h=this._languageFeaturesService.newSymbolNamesProvider.all(u),g=await Promise.all(h.map((async e=>[e,await e.supportsAutomaticNewSymbolNamesTriggerKind??!1]))),p=(e,t)=>{let i=g.slice();return e===_.YT.Automatic&&(i=i.filter((([e,t])=>t))),i.map((([i])=>i.provideNewSymbolNames(u,c.range,e,t)))};e("creating rename input field and awaiting its result");const m=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),v=await this._renameWidget.getInput(c.range,c.text,m,h.length>0?p:void 0,d);if(e("received response from rename input field"),h.length>0&&this._reportTelemetry(h.length,u.getLanguageId(),v),"boolean"===typeof v)return e(`returning early - rename input field response - ${v}`),v&&this.editor.focus(),void d.dispose();this.editor.focus(),e("requesting rename edits");const b=(0,o.PK)(i.provideRenameEdits(v.newName,d.token),d.token).then((async t=>{if(t)if(this.editor.hasModel()){if(t.rejectReason)return e(`returning early - rejected with reason: ${t.rejectReason}`),void this._notificationService.info(t.rejectReason);this.editor.setSelection(f.Q.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(t,{editor:this.editor,showPreview:v.wantsPreview,label:C.kg("label","Renaming '{0}' to '{1}'",c?.text,v.newName),code:"undoredo.rename",quotableLabel:C.kg("quotableLabel","Renaming {0} to {1}",c?.text,v.newName),respectAutoSaveConfig:!0}).then((t=>{e("edits applied"),t.ariaSummary&&(0,n.xE)(C.kg("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",c.text,v.newName,t.ariaSummary))})).catch((t=>{e(`error when applying edits ${JSON.stringify(t,null,"\t")}`),this._notificationService.error(C.kg("rename.failedApply","Rename failed to apply edits")),this._logService.error(t)}))}else e("returning early - no model after rename edits are provided");else e("returning early - no rename edits result")}),(t=>{e("error when providing rename edits",JSON.stringify(t,null,"\t")),this._notificationService.error(C.kg("rename.failed","Rename failed to compute edits")),this._logService.error(t)})).finally((()=>{d.dispose()}));return e("returning rename operation"),this._progressService.showWhile(b,250),b}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,i){const n="boolean"===typeof i?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:i.stats.source.k,nRenameSuggestions:i.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:i.stats.timeBeforeFirstInputFieldEdit,wantsPreview:i.wantsPreview,nRenameSuggestionsInvocations:i.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:i.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",n)}};re=te=ie([ne(1,E._Y),ne(2,T.Ot),ne(3,h.nu),ne(4,I.N8),ne(5,L.rr),ne(6,b.ITextResourceConfigurationService),ne(7,v.ILanguageFeaturesService),ne(8,R.k)],re);class ae extends u.ks{constructor(){super({id:"editor.action.rename",label:C.kg("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:x.M$.and(m.R.writable,m.R.hasRenameProvider),kbOpts:{kbExpr:m.R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(g.T),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return d.r.isUri(n)&&p.y.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r.dz):super.runCommand(e,t)}run(e,t){const i=e.get(L.rr),n=re.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}(0,u.HW)(re.ID,re,4),(0,u.Fl)(ae);const le=u.DX.bindToContribution(re.get);(0,u.E_)(new le({id:"acceptRenameInput",precondition:Y,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:x.M$.and(m.R.focus,x.M$.not("isComposing")),primary:3}})),(0,u.E_)(new le({id:"acceptRenameInputWithPreview",precondition:x.M$.and(Y,x.M$.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:x.M$.and(m.R.focus,x.M$.not("isComposing")),primary:2051}})),(0,u.E_)(new le({id:"cancelRenameInput",precondition:Y,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:m.R.focus,primary:9,secondary:[1033]}})),(0,S.ug)(class extends S.L{constructor(){super({id:"focusNextRenameSuggestion",title:{...C.aS("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:Y,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(g.T).getFocusedCodeEditor();if(!t)return;const i=re.get(t);i&&i.focusNextRenameSuggestion()}}),(0,S.ug)(class extends S.L{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...C.aS("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:Y,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(g.T).getFocusedCodeEditor();if(!t)return;const i=re.get(t);i&&i.focusPreviousRenameSuggestion()}}),(0,u.ke)("_executeDocumentRenameProvider",(function(e,t,i,...n){const[o]=n;(0,c.j)("string"===typeof o);const{renameProvider:s}=e.get(v.ILanguageFeaturesService);return se(s,t,i,o)})),(0,u.ke)("_executePrepareRename",(async function(e,t,i){const{renameProvider:n}=e.get(v.ILanguageFeaturesService),o=new oe(t,i,n),r=await o.resolveRenameLocation(s.XO.None);if(r?.rejectReason)throw new Error(r.rejectReason);return r})),D.O.as(k.Fd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:C.kg("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},56673:(e,t,i)=>{"use strict";var n=i(9659),o=i(5091),s=i(16259),r=i(50395),a=i(35037),l=i(4117),c=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},d=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends o.jG{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(e.onDidChangeModelLanguage((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(t.onDidChange((t=>{const i=this.editor.getModel()?.getLanguageId();i&&t.affects(i)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(e.onDidChangeConfiguration((t=>{this.options&&!t.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(this.editor.onDidChangeModelContent((e=>{this.computeSectionHeaders.schedule()}))),this._register(e.onDidChangeModelTokens((e=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)}))),this.computeSectionHeaders=this._register(new n.uC((()=>{this.findSectionHeaders()}),250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;return i||n?.markers?{foldingRules:n,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}:void 0}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then((i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)}))}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter((e=>{if(!e.shouldBeInComments)return!0;const i=t.validateRange(e.range),n=t.tokenization.getLineTokens(i.startLineNumber),o=n.findTokenIndexAtOffset(i.startColumn-1),s=n.getStandardTokenType(o),r=n.getLanguageId(o);return r===t.getLanguageId()&&1===s})));const i=Object.values(this.currentOccurrences).map((e=>e.decorationId)),n=e.map((e=>h(e)));this.editor.changeDecorations((t=>{const o=t.deltaDecorations(i,n);this.currentOccurrences={};for(let t=0,i=o.length;t{"use strict";var n,o=i(5091),s=i(14396),r=i(69361),a=i(32828),l=i(9659),c=i(67792),d=i(15911),u=i(4686),h=i(27280),g=i(85983),p=i(84240),f=i(12847),m=i(67284),_=i(36285),v=i(38572),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};let w=class extends o.jG{constructor(e,t,i,n,o,s){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new C(t,e,i,o,s)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];(0,v.K)(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach((e=>{(0,v.K)(e,i,n)&&r(e)})),this._register(t.onModelAdded((e=>{(0,v.K)(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(v.r)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};w=b([y(0,m.ISemanticTokensStylingService),y(1,r.IModelService),y(2,d.Gy),y(3,a.pG),y(4,g.ILanguageFeatureDebounceService),y(5,f.ILanguageFeaturesService)],w);let C=class extends o.jG{static{n=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,s,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:n.REQUEST_MIN_DELAY,max:n.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new l.uC((()=>this._fetchDocumentSemanticTokensNow()),n.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeAttached((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const a=()=>{(0,o.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"===typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};a(),this._register(this._provider.onDidChange((()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,o.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,h.br)(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new c.Qi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,h.aw)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],r=this._model.onDidChangeContent((e=>{o.push(e)})),a=new p.W(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{const t=e&&(s.MB(e)||"string"===typeof e.message&&-1!==e.message.indexOf("busy"));t||s.dz(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let s=0;s{(o.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void r();if((0,h.yS)(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const o=s.data,r=new Uint32Array(o.length+e);let a=o.length,l=r.length;for(let e=t.edits.length-1;e>=0;e--){const c=t.edits[e];if(c.start>o.length)return i.warnInvalidEditStart(s.resultId,t.resultId,e,c.start,o.length),void this._model.tokenization.setSemanticTokens(null,!0);const d=a-(c.start+c.deleteCount);d>0&&(n._copy(o,a-d,r,l-d,d),l-=d),c.data&&(n._copy(c.data,0,r,l-c.data.length,c.data.length),l-=c.data.length),a=c.start}a>0&&n._copy(o,0,r,0,a),t={resultId:t.resultId,data:r}}}if((0,h.BB)(t)){this._currentDocumentResponse=new S(e,t.resultId,t.data);const n=(0,u.toMultilineTokens2)(t,i,this._model.getLanguageId());if(o.length>0)for(const e of o)for(const t of n)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(n,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}else this._model.tokenization.setSemanticTokens(null,!1)}};C=n=b([y(1,m.ISemanticTokensStylingService),y(2,d.Gy),y(3,g.ILanguageFeatureDebounceService),y(4,f.ILanguageFeaturesService)],C);class S{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,_.x)(w)},90445:(e,t,i)=>{"use strict";var n=i(9659),o=i(5091),s=i(16259),r=i(27280),a=i(38572),l=i(4686),c=i(32828),d=i(15911),u=i(85983),h=i(84240),g=i(12847),p=i(67284),f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};let _=class extends o.jG{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,i,o,s,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=o,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new n.uC((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const l=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{l()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),l()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),l()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),l()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(a.r)&&(this._cancelAll(),l())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),l()}))),l()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),o=(0,n.SS)((i=>Promise.resolve((0,r.nZ)(this._provider,e,t,i)))),s=new h.W(!1);return o.then((n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,(0,l.toMultilineTokens2)(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(o)),(()=>this._removeOutstandingRequest(o))),o}};_=f([m(1,p.ISemanticTokensStylingService),m(2,d.Gy),m(3,c.pG),m(4,u.ILanguageFeatureDebounceService),m(5,g.ILanguageFeaturesService)],_),(0,s.HW)(_.ID,_,1)},27280:(e,t,i)=>{"use strict";i.d(t,{BB:()=>h,WG:()=>y,aw:()=>_,br:()=>f,nZ:()=>C,yS:()=>g});var n=i(67792),o=i(14396),s=i(29133),r=i(69361),a=i(72786),l=i(50322),c=i(33699),d=i(8690),u=i(12847);function h(e){return e&&!!e.data}function g(e){return e&&Array.isArray(e.edits)}class p{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function f(e,t){return e.has(t)}function m(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function _(e,t,i,n,o){const s=m(e,t),r=await Promise.all(s.map((async e=>{let s,r=null;try{s=await e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(e){r=e,s=null}return s&&(h(s)||g(s))||(s=null),new p(e,s,r)})));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}function v(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}class b{constructor(e,t){this.provider=e,this.tokens=t}}function y(e,t){return e.has(t)}function w(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function C(e,t,i,n){const s=w(e,t),r=await Promise.all(s.map((async e=>{let s;try{s=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,o.M_)(e),s=null}return s&&h(s)||(s=null),new b(e,s)})));for(const e of r)if(e.tokens)return e;return r.length>0?r[0]:null}a.w.registerCommand("_provideDocumentSemanticTokensLegend",(async(e,...t)=>{const[i]=t;(0,l.j)(i instanceof s.r);const n=e.get(r.IModelService).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(u.ILanguageFeaturesService),c=v(o,n);return c?c[0].getLegend():e.get(a.d).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})),a.w.registerCommand("_provideDocumentSemanticTokens",(async(e,...t)=>{const[i]=t;(0,l.j)(i instanceof s.r);const o=e.get(r.IModelService).getModel(i);if(!o)return;const{documentSemanticTokensProvider:d}=e.get(u.ILanguageFeaturesService);if(!f(d,o))return e.get(a.d).executeCommand("_provideDocumentRangeSemanticTokens",i,o.getFullModelRange());const g=await _(d,o,null,null,n.XO.None);if(!g)return;const{provider:p,tokens:m}=g;if(!m||!h(m))return;const v=(0,c.encodeSemanticTokensDto)({id:0,type:"full",data:m.data});return m.resultId&&p.releaseDocumentSemanticTokens(m.resultId),v})),a.w.registerCommand("_provideDocumentRangeSemanticTokensLegend",(async(e,...t)=>{const[i,o]=t;(0,l.j)(i instanceof s.r);const a=e.get(r.IModelService).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:c}=e.get(u.ILanguageFeaturesService),h=w(c,a);if(0===h.length)return;if(1===h.length)return h[0].getLegend();if(!o||!d.Q.isIRange(o))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),h[0].getLegend();const g=await C(c,a,d.Q.lift(o),n.XO.None);return g?g.provider.getLegend():void 0})),a.w.registerCommand("_provideDocumentRangeSemanticTokens",(async(e,...t)=>{const[i,o]=t;(0,l.j)(i instanceof s.r),(0,l.j)(d.Q.isIRange(o));const a=e.get(r.IModelService).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:h}=e.get(u.ILanguageFeaturesService),g=await C(h,a,d.Q.lift(o),n.XO.None);return g&&g.tokens?(0,c.encodeSemanticTokensDto)({id:0,type:"full",data:g.tokens.data}):void 0}))},38572:(e,t,i)=>{"use strict";i.d(t,{K:()=>o,r:()=>n});const n="editor.semanticHighlighting";function o(e,t,i){const o=i.getValue(n,{overrideIdentifier:e.getLanguageId(),resource:e.uri})?.enabled;return"boolean"===typeof o?o:t.getColorTheme().semanticHighlighting}},7205:(e,t,i)=>{"use strict";i.d(t,{n:()=>r});var n=i(67806),o=i(36788),s=i(8690);class r{async provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;await new Promise((t=>r._bracketsRightYield(t,0,e,n,o))),await new Promise((i=>r._bracketsLeftYield(i,0,e,n,o,t)))}return i}static{this._maxDuration=30}static{this._maxRounds=2}static _bracketsRightYield(e,t,i,o,s){const a=new Map,l=Date.now();while(1){if(t>=r._maxRounds){e();break}if(!o){e();break}const c=i.bracketPairs.findNextBracket(o);if(!c){e();break}const d=Date.now()-l;if(d>r._maxDuration){setTimeout((()=>r._bracketsRightYield(e,t+1,i,o,s)));break}if(c.bracketInfo.isOpeningBracket){const e=c.bracketInfo.bracketText,t=a.has(e)?a.get(e):0;a.set(e,t+1)}else{const e=c.bracketInfo.getOpeningBrackets()[0].bracketText;let t=a.has(e)?a.get(e):0;if(t-=1,a.set(e,Math.max(0,t)),t<0){let t=s.get(e);t||(t=new n.w,s.set(e,t)),t.push(c.range)}}o=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,o,a){const l=new Map,c=Date.now();while(1){if(t>=r._maxRounds&&0===o.size){e();break}if(!n){e();break}const d=i.bracketPairs.findPrevBracket(n);if(!d){e();break}const u=Date.now()-c;if(u>r._maxDuration){setTimeout((()=>r._bracketsLeftYield(e,t+1,i,n,o,a)));break}if(d.bracketInfo.isOpeningBracket){const e=d.bracketInfo.bracketText;let t=l.has(e)?l.get(e):0;if(t-=1,l.set(e,Math.max(0,t)),t<0){const t=o.get(e);if(t){const n=t.shift();0===t.size&&o.delete(e);const l=s.Q.fromPositions(d.range.getEndPosition(),n.getStartPosition()),c=s.Q.fromPositions(d.range.getStartPosition(),n.getEndPosition());a.push({range:l}),a.push({range:c}),r._addBracketLeading(i,c,a)}}}else{const e=d.bracketInfo.getOpeningBrackets()[0].bracketText,t=l.has(e)?l.get(e):0;l.set(e,t+1)}n=d.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(n);0!==r&&r!==t.startColumn&&(i.push({range:s.Q.fromPositions(new o.y(n,r),t.getEndPosition())}),i.push({range:s.Q.fromPositions(new o.y(n,1),t.getEndPosition())}));const a=n-1;if(a>0){const n=e.getLineFirstNonWhitespaceColumn(a);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:s.Q.fromPositions(new o.y(a,n),t.getEndPosition())}),i.push({range:s.Q.fromPositions(new o.y(a,1),t.getEndPosition())}))}}}},52335:(e,t,i)=>{"use strict";var n=i(85053),o=i(67792),s=i(14396),r=i(16259),a=i(36788),l=i(8690),c=i(98581),d=i(57479),u=i(7205),h=i(20601);class g{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:o,startColumn:s}=n,r=i.column-s;let a=r,c=r,d=0;for(;a>=0;a--){const e=o.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if((0,h.Lv)(e)&&(0,h.Wv)(d))break;d=e}for(a+=1;c0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new l.Q(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var p,f=i(41337),m=i(6330),_=i(72786),v=i(12847),b=i(64037),y=i(50322),w=i(29133),C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},S=function(e,t){return function(i,n){t(i,n,e)}};class k{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new k(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let x=class{static{p=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(p.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await I(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(114),o.XO.None).then((e=>{if(n.EI(e)&&e.length===t.length&&this._editor.hasModel()&&n.aI(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new k(0,e))),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)}))}})),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const s=this._state.map((e=>c.L.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}};x=p=C([S(1,v.ILanguageFeaturesService)],x);class E extends r.ks{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=x.get(t);i&&await i.run(this._forward)}}class L extends E{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:f.kg("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:d.R.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:m.D8.MenubarSelectionMenu,group:"1_basic",title:f.kg({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}_.w.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class T extends E{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:f.kg("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:d.R.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:m.D8.MenubarSelectionMenu,group:"1_basic",title:f.kg({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}async function I(e,t,i,o,r){const c=e.all(t).concat(new g(o.selectSubwords));1===c.length&&c.unshift(new u.n);const d=[],h=[];for(const e of c)d.push(Promise.resolve(e.provideSelectionRanges(t,i,r)).then((e=>{if(n.EI(e)&&e.length===i.length)for(let t=0;t{if(0===e.length)return[];e.sort(((e,t)=>a.y.isBefore(e.getStartPosition(),t.getStartPosition())?1:a.y.isBefore(t.getStartPosition(),e.getStartPosition())||a.y.isBefore(e.getEndPosition(),t.getEndPosition())?-1:a.y.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let n;for(const t of e)(!n||l.Q.containsRange(t,n)&&!l.Q.equalsRange(t,n))&&(i.push(t),n=t);if(!o.selectLeadingAndTrailingWhitespace)return i;const s=[i[0]];for(let e=1;e{"use strict";i.d(t,{O:()=>b});var n,o=i(5091),s=i(50322),r=i(16259),a=i(36788),l=i(57479),c=i(50395),d=i(12847),u=i(69547),h=i(41337),g=i(18904),p=i(12660),f=i(2463),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};const v={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let b=class{static{n=this}static{this.ID="snippetController2"}static get(e){return e.getContribution(n.ID)}static{this.InSnippetMode=new g.N1("inSnippetMode",!1,(0,h.kg)("inSnippetMode","Whether the editor in current in snippet mode"))}static{this.HasNextTabstop=new g.N1("hasNextTabstop",!1,(0,h.kg)("hasNextTabstop","Whether there is a next tab stop when in snippet mode"))}static{this.HasPrevTabstop=new g.N1("hasPrevTabstop",!1,(0,h.kg)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"))}constructor(e,t,i,s,r){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=r,this._snippetListener=new o.Cm,this._modelVersionId=-1,this._inSnippet=n.InSnippetMode.bindTo(s),this._hasNextTabstop=n.HasNextTabstop.bindTo(s),this._hasPrevTabstop=n.HasPrevTabstop.bindTo(s)}dispose(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._session?.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,"undefined"===typeof t?v:{...v,...t})}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!==typeof e&&this.cancel(),this._session?((0,s.j)("string"===typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new f.O(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!a.y.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),o=Boolean(i.choice.options.find((e=>e.value===n))),s=[];for(let e=0;e{i?.dispose(),n=!1},s=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:s,disable:o}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:e}=this._session;if(!e||!this._choiceCompletions)return this._choiceCompletions?.disable(),void(this._currentChoice=void 0);this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{(0,u.p3)(this._editor,this._choiceCompletions.provider)})))}finish(){while(this._inSnippet.get())this.next()}cancel(e=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};b=n=m([_(1,p.rr),_(2,d.ILanguageFeaturesService),_(3,g.fN),_(4,c.JZ)],b),(0,r.HW)(b.ID,b,4);const y=r.DX.bindToContribution(b.get);(0,r.E_)(new y({id:"jumpToNextSnippetPlaceholder",precondition:g.M$.and(b.InSnippetMode,b.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:2}})),(0,r.E_)(new y({id:"jumpToPrevSnippetPlaceholder",precondition:g.M$.and(b.InSnippetMode,b.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:1026}})),(0,r.E_)(new y({id:"leaveSnippet",precondition:b.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:9,secondary:[1033]}})),(0,r.E_)(new y({id:"acceptSnippet",precondition:b.InSnippetMode,handler:e=>e.finish()}))},18760:(e,t,i)=>{"use strict";i.d(t,{EY:()=>s,GR:()=>l,Or:()=>a,fr:()=>p,mQ:()=>g});class n{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t,i=0,o=this.value.charCodeAt(e);if(t=n._table[o],"number"===typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(n.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(e+i)}while(n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}if(n.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(e+ ++i)}while(n.isVariableCharacter(o)||n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(e+i)}while(!isNaN(o)&&"undefined"===typeof n._table[o]&&!n.isDigitCharacter(o)&&!n.isVariableCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}}class o{constructor(){this._children=[]}appendChild(e){return e instanceof s&&this._children[this._children.length-1]instanceof s?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;while(1){if(!e)return;if(e instanceof g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class s extends o{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new s(this.value)}}class r extends o{}class a extends r{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){const e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends o{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof s&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new l;return this.options.forEach(e.appendChild,e),e}}class c extends o{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof d&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof d){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new c;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class d extends o{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"===typeof this.ifValue?this.ifValue:Boolean(e)||"string"!==typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){const e=new d(this.index,this.shorthandName,this.ifValue,this.elseValue);return e}}class u extends r{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new s(t)],!0)}clone(){const e=new u(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function h(e,t){const i=[...e];while(i.length>0){const e=i.shift(),n=t(e);if(!n)break;i.unshift(...e.children)}}class g extends o{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof a&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return h([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;while(i)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof u&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){h(this.children,e)}}class p{constructor(){this._scanner=new n,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new g;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;this._scanner.text(e),this._token=this._scanner.next();while(this._parse(t));const n=new Map,o=[];t.walk((e=>(e instanceof a&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):o.push(e)),!0)));const s=(e,i)=>{const o=n.get(e.index);if(!o)return;const r=new a(e.index);r.transform=e.transform;for(const e of o){const t=e.clone();r.appendChild(t),t instanceof a&&n.has(t.index)&&!i.has(t.index)&&(i.add(t.index),s(t,i),i.delete(t.index))}t.replace(e,[r])},r=new Set;for(const e of o)s(e,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){if(t||i&&e.placeholders.length>0){const t=e.placeholders.find((e=>0===e.index));t||e.appendChild(new a(0))}}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;while(this._token.type!==e){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new s(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token,n=this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0));return n?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new u(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token,n=this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0));if(!n)return this._backTo(i);const o=new a(Number(t));if(this._accept(1))while(1){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new s("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else{if(!(o.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i);{const t=new l;while(1){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(t),this._accept(4)))return e.appendChild(o),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];while(1){if(2===this._token.type||7===this._token.type)break;let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new s(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token,n=this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0));if(!n)return this._backTo(i);const o=new u(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i);while(1){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new s("${"+t+":")),o.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new c;let i="",n="";while(1){if(this._accept(6))break;let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}while(1){if(this._accept(6))break;let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new s(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}while(1){if(this._accept(4))break;if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new d(Number(n))),!0;if(this._accept(4))return e.appendChild(new d(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new d(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new d(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new s(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},2463:(e,t,i)=>{"use strict";i.d(t,{O:()=>M});var n=i(85053),o=i(5091),s=i(20601),r=i(28346),a=i(8690),l=i(98581),c=i(50395),d=i(35037),u=i(48056),h=i(81714),g=i(18760),p=i(37531),f=i(25160);function m(e,t=f.uF){return(0,p.No)(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var _=i(52444),v=i(84366),b=i(23264),y=i(41337),w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class S{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class k{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=(0,s.UU)(i,0,this._selection.startColumn-1);let o=n;e.snippet.walk((t=>t!==e&&(t instanceof g.EY&&(o=(0,s.UU)((0,s.uz)(t.value).pop())),!0)));const r=(0,s.Qp)(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${o.substr(r)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class x{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return _.P8(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=_.P8(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===_.pD(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,v.pD)(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class E{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,s.AV)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let L=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};L=w([C(2,c.JZ)],L);class T{constructor(){this._date=new Date}static{this.dayNames=[y.kg("Sunday","Sunday"),y.kg("Monday","Monday"),y.kg("Tuesday","Tuesday"),y.kg("Wednesday","Wednesday"),y.kg("Thursday","Thursday"),y.kg("Friday","Friday"),y.kg("Saturday","Saturday")]}static{this.dayNamesShort=[y.kg("SundayShort","Sun"),y.kg("MondayShort","Mon"),y.kg("TuesdayShort","Tue"),y.kg("WednesdayShort","Wed"),y.kg("ThursdayShort","Thu"),y.kg("FridayShort","Fri"),y.kg("SaturdayShort","Sat")]}static{this.monthNames=[y.kg("January","January"),y.kg("February","February"),y.kg("March","March"),y.kg("April","April"),y.kg("May","May"),y.kg("June","June"),y.kg("July","July"),y.kg("August","August"),y.kg("September","September"),y.kg("October","October"),y.kg("November","November"),y.kg("December","December")]}static{this.monthNamesShort=[y.kg("JanuaryShort","Jan"),y.kg("FebruaryShort","Feb"),y.kg("MarchShort","Mar"),y.kg("AprilShort","Apr"),y.kg("MayShort","May"),y.kg("JuneShort","Jun"),y.kg("JulyShort","Jul"),y.kg("AugustShort","Aug"),y.kg("SeptemberShort","Sep"),y.kg("OctoberShort","Oct"),y.kg("NovemberShort","Nov"),y.kg("DecemberShort","Dec")]}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return T.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return T.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return T.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return T.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,o=Math.abs(e)-60*i,s=o<10?"0"+o:o;return t+n+":"+s}}}class I{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=(0,h.Q_)(this._workspaceService.getWorkspace());return(0,h.A7)(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if((0,h.jB)(e))return _.P8(e.uri.path);let t=_.P8(e.configPath.path);return t.endsWith(h.kF)&&(t=t.substr(0,t.length-h.kF.length-1)),t}_resoveWorkspacePath(e){if((0,h.jB)(e))return m(e.uri.fsPath);const t=_.P8(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?m(i):"/"}}class D{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?(0,b.b)():void 0}}var R,N=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};class O{static{this._decor={active:d.kI.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:d.kI.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:d.kI.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:d.kI.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})}}constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,n.$z)(t.placeholders,g.Or.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),s=a.Q.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),r=i.isFinalTabstop?O._decor.inactiveFinal:O._decor.inactive,l=t.addDecoration(s,r);this._placeholderDecorations.set(i,l)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),s=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),r=this._editor.getModel().getDecorationRange(s);n.push(new l.L(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(s,o.isFinalTabstop?O._decor.activeFinal:O._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?O._decor.activeFinal:O._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?O._decor.inactiveFinal:O._decor.inactive);return n}));return t?this.move(e):i??[]}_hasPlaceholderBeenCollapsed(e){let t=e;while(t){if(t instanceof g.Or){const e=this._placeholderDecorations.get(t),i=this._editor.getModel().getDecorationRange(e);if(i.isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!e?.choice)return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof g.GR,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(-1!==o._offset),console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(s+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),s=o._snippet.fullLen(e),r=a.Q.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+s)),l=i.addDecoration(r,O._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=(0,n.$z)(this._snippet.placeholders,g.Or.compareByIndex)}))}}const P={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let M=R=class{static adjustWhitespace(e,t,i,n,o){const r=e.getLineContent(t.lineNumber),a=(0,s.UU)(r,0,t.column-1);let l;return n.walk((t=>{if(!(t instanceof g.EY)||t.parent instanceof g.GR)return!0;if(o&&!o.has(t))return!0;const s=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)s[0]=e.normalizeIndentation(s[0]);else{l=l??n.toString();const t=l.charCodeAt(i-1);10!==t&&13!==t||(s[0]=e.normalizeIndentation(a+s[0]))}for(let t=1;te.get(h.VR))),v=e.invokeWithinContext((e=>new x(e.get(u.L),m))),b=()=>l,y=m.getValueInRange(R.adjustSelection(m,e.getSelection(),i,0)),w=m.getValueInRange(R.adjustSelection(m,e.getSelection(),0,n)),C=m.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),N=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>a.Q.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:a,idx:l}of N){let u=R.adjustSelection(m,a,i,0),h=R.adjustSelection(m,a,0,n);y!==m.getValueInRange(u)&&(u=a),w!==m.getValueInRange(h)&&(h=a);const x=a.setStartPosition(u.startLineNumber,u.startColumn).setEndPosition(h.endLineNumber,h.endColumn),A=(new g.fr).parse(t,!0,o),P=x.getStartPosition(),M=R.adjustWhitespace(m,P,s||l>0&&C!==m.getLineFirstNonWhitespaceColumn(a.positionLineNumber),A);A.resolveVariables(new S([v,new E(b,l,N.length,"spread"===e.getOption(79)),new k(m,a,l,c),new L(m,a,d),new T,new I(_),new D])),p[l]=r.k.replace(x,A.toString()),p[l].identifier={major:l,minor:0},p[l]._isTracked=!0,f[l]=new O(e,A,M)}return{edits:p,snippets:f}}static createEditsAndSnippetsFromEdits(e,t,i,n,o,s,l){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const c=[],d=e.getModel(),p=new g.fr,f=new g.mQ,m=new S([e.invokeWithinContext((e=>new x(e.get(u.L),d))),new E((()=>o),0,e.getSelections().length,"spread"===e.getOption(79)),new k(d,e.getSelection(),0,s),new L(d,e.getSelection(),l),new T,new I(e.invokeWithinContext((e=>e.get(h.VR)))),new D]);t=t.sort(((e,t)=>a.Q.compareRangesUsingStarts(e.range,t.range)));let _=0;for(let e=0;e0){const n=t[e-1].range,o=a.Q.fromPositions(n.getEndPosition(),i.getStartPosition()),s=new g.EY(d.getValueInRange(o));f.appendChild(s),_+=s.value.length}const o=p.parseFragment(n,f);R.adjustWhitespace(d,i.getStartPosition(),!0,f,new Set(o)),f.resolveVariables(m);const s=f.toString(),l=s.slice(_);_=s.length;const u=r.k.replace(i,l);u.identifier={major:e,minor:0},u._isTracked=!0,c.push(u)}return p.ensureFinalTabstop(f,i,!0),{edits:c,snippets:[new O(e,f,"")]}}constructor(e,t,i=P,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){(0,o.AS)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"===typeof this._template?R.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):R.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let e=0;el.L.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=P){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=R.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let e=0;el.L.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(a.Q.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(a.Q.compareRangesUsingStarts);for(let o=0;o0}};M=R=N([A(3,c.JZ)],M)},71406:(e,t,i)=>{"use strict";var n=i(16259),o=i(41337);const s=Object.freeze({View:(0,o.aS)("view","View"),Help:(0,o.aS)("help","Help"),Test:(0,o.aS)("test","Test"),File:(0,o.aS)("file","File"),Preferences:(0,o.aS)("preferences","Preferences"),Developer:(0,o.aS)({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});var r=i(6330),a=i(32828),l=i(18904),c=i(57479),d=i(5091),u=i(12847),h=i(2150),g=i(21776),p=i(85053),f=i(23740),m=i(83660),_=i(50576),v=i(36788),b=i(13647),y=i(1550),w=i(20529),C=i(45292);class S{constructor(e,t,i,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=i,this.showEndForLine=n}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&(0,p.aI)(this.startLineNumbers,e.startLineNumbers)&&(0,p.aI)(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new S([],[],0)}}const k=(0,g.H)("stickyScrollViewLayer",{createHTML:e=>e}),x="data-sticky-line-index",E="data-sticky-is-line",L="data-sticky-is-line-number",T="data-sticky-is-folding-icon";class I extends d.jG{constructor(e){super(),this._editor=e,this._foldingIconStore=new d.Cm,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof _.t),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&t(),e.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{this._updateWidgetWidth()}))),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find((t=>t.lineNumber===e))}getCurrentLines(){return this._lineNumbers}setState(e,t,i){if(void 0===i&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const n=this._isWidgetHeightZero(e),o=n?void 0:e,s=n?0:this._findLineToRebuildWidgetFrom(e,i);this._renderRootNode(o,t,s),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];return 0===t}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(void 0!==t)return t;const i=this._previousState,n=e.startLineNumbers.findIndex((e=>!i.startLineNumbers.includes(e)));return-1===n?0:n}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",this._editor.getScrollWidth()-e.verticalScrollbarWidth+"px"),this._rootDomNode.style.width=e.width-e.verticalScrollbarWidth+"px"}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;te.scrollWidth)))+n.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){const e=this._editor.getOption(111);"mouseover"===e&&(this._foldingIconStore.add(h.ko(this._lineNumbersDomNode,h.Bx.MOUSE_ENTER,(()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(h.ko(this._lineNumbersDomNode,h.Bx.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const o=this._editor._getViewModel();if(!o)return;const s=o.coordinatesConverter.convertModelPositionToViewPosition(new v.y(t,1)).lineNumber,r=o.getViewLineRenderingData(s),a=this._editor.getOption(68);let l;try{l=y.d.filter(r.inlineDecorations,s,r.minColumn,r.maxColumn)}catch(e){l=[]}const c=new w.zL(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,l,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new b.fe(2e3),u=(0,w.UW)(c,d);let h;h=k?k.createHTML(d.build()):d.build();const g=document.createElement("span");g.setAttribute(x,String(e)),g.setAttribute(E,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=h;const p=document.createElement("span");p.setAttribute(x,String(e)),p.setAttribute(L,""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const f=n.contentLeft;p.style.width=`${f}px`;const m=document.createElement("span");1===a.renderType||3===a.renderType&&t%10===0?m.innerText=t.toString():2===a.renderType&&(m.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),m.className="sticky-line-number-inner",m.style.lineHeight=`${this._lineHeight}px`,m.style.width=`${n.lineNumbersWidth}px`,m.style.paddingLeft=`${n.lineNumbersLeft}px`,p.appendChild(m);const _=this._renderFoldingIconForLine(i,t);_&&p.appendChild(_.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(m),p.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const C=new D(e,t,g,p,_,u.characterMapping,g.scrollWidth);return this._updateTopAndZIndexOfStickyLine(C)}_updateTopAndZIndexOfStickyLine(e){const t=e.index,i=e.lineDomNode,n=e.lineNumberDomNode,o=t===this._lineNumbers.length-1,s="0",r="1";i.style.zIndex=o?s:r,n.style.zIndex=o?s:r;const a=`${t*this._lineHeight+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`,l=t*this._lineHeight+"px";return i.style.top=o?a:l,n.style.top=o?a:l,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(111);if(!e||"never"===i)return;const n=e.regions,o=n.findRange(t),s=n.getStartLineNumber(o),r=t===s;if(!r)return;const a=n.isCollapsed(o),l=new R(a,s,n.getEndLineNumber(o),this._lineHeight);return l.setVisible(!!this._isOnGlyphMargin||(a||"always"===i)),l.domNode.setAttribute(T,""),l}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=(0,m.rk)(t.characterMapping,e,0);return new v.y(t.lineNumber,i)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,x);return t?parseInt(t,10):null}isInStickyLine(e){const t=this._getAttributeValue(e,E);return void 0!==t}isInFoldingIconDomNode(e){const t=this._getAttributeValue(e,T);return void 0!==t}_getAttributeValue(e,t){while(e&&e!==this._rootDomNode){const i=e.getAttribute(t);if(null!==i)return i;e=e.parentElement}}}class D{constructor(e,t,i,n,o,s,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=o,this.characterMapping=s,this.scrollWidth=r}}class R{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=f.L.asClassName(e?C.k0:C.E0)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}var N=i(67792),A=i(9659),O=i(40231),P=i(50395),M=i(83262),F=i(23358),B=i(13387),W=i(8568),H=i(14396);class V{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class j{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class z{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var U,$,q=i(5837),K=i(87778),G=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Q=function(e,t){return function(i,n){t(i,n,e)}};(function(e){e["OUTLINE_MODEL"]="outlineModel",e["FOLDING_PROVIDER_MODEL"]="foldingProviderModel",e["INDENTATION_MODEL"]="indentationModel"})(U||(U={})),function(e){e[e["VALID"]=0]="VALID",e[e["INVALID"]=1]="INVALID",e[e["CANCELED"]=2]="CANCELED"}($||($={}));let Y=class extends d.jG{constructor(e,t,i,n){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new A.ve(300)),this._updateOperation=this._register(new d.Cm),this._editor.getOption(116).defaultModel){case U.OUTLINE_MODEL:this._modelProviders.push(new X(this._editor,n));case U.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new te(this._editor,t,n));case U.INDENTATION_MODEL:this._modelProviders.push(new ee(this._editor,i));break}}dispose(){this._modelProviders.forEach((e=>e.dispose())),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger((async()=>{for(const t of this._modelProviders){const{statusPromise:i,modelPromise:n}=t.computeStickyModel(e);this._modelPromise=n;const o=await i;if(this._modelPromise!==n)return null;switch(o){case $.CANCELED:return this._updateOperation.clear(),null;case $.VALID:return t.stickyModel}}return null})).catch((e=>((0,H.dz)(e),null)))}};Y=G([Q(2,K._Y),Q(3,u.ILanguageFeaturesService)],Y);class Z extends d.jG{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,$.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=(0,A.SS)((e=>this.createModelFromProvider(e)));return{statusPromise:t.then((t=>this.isModelValid(t)?e.isCancellationRequested?$.CANCELED:(this._stickyModel=this.createStickyModel(e,t),$.VALID):this._invalid())).then(void 0,(e=>((0,H.dz)(e),$.CANCELED))),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let X=class extends Z{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return M.i9.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){const{stickyOutlineElement:i,providerID:n}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),o=this._editor.getModel();return new z(o.uri,o.getVersionId(),i,n)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(q.f.first(e.children.values())instanceof M.e0){const n=q.f.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,o="",s=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>s&&(n=i,s=e,o=i.id)}t=o,i=n.children}}else i=e.children;const n=[],o=Array.from(i.values()).sort(((e,t)=>{const i=new V(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new V(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const e of o)n.push(this._stickyModelFromOutlineElement(e,e.symbol.selectionRange.startLineNumber));const s=new j(void 0,n,void 0);return{stickyOutlineElement:s,providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const n of e.children.values())if(n.symbol.selectionRange.startLineNumber!==n.symbol.range.endLineNumber)if(n.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(n,n.symbol.selectionRange.startLineNumber));else for(const e of n.children.values())i.push(this._stickyModelFromOutlineElement(e,n.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new V(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new j(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof M.LC?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};X=G([Q(1,u.ILanguageFeaturesService)],X);class J extends Z{constructor(e){super(e),this._foldingLimitReporter=new F.BP(e)}createStickyModel(e,t){const i=this._fromFoldingRegions(t),n=this._editor.getModel();return new z(n.uri,n.getVersionId(),i,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new j(void 0,[],void 0);for(let o=0;o0&&(this.provider=this._register(new B.M(e.getModel(),n,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return void 0!==this.provider}async createModelFromProvider(e){return this.provider?.compute(e)??null}};te=G([Q(2,u.ILanguageFeaturesService)],te);var ie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ne=function(e,t){return function(i,n){t(i,n,e)}};class oe{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let se=class extends d.jG{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new O.vl),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new d.Cm),this._updateSoon=this._register(new A.uC((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._sessionStore.clear();const e=this._editor.getOption(116);e.enabled&&(this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>this.update()))),this._sessionStore.add((0,d.s)((()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null}))),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null;const e=this._editor;e.hasModel()&&(this._stickyModelProvider=new Y(e,(()=>this._updateSoon.schedule()),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new N.Qi,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization())return void(this._model=null);const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,o){if(0===t.children.length)return;let s=o;const r=[];for(let e=0;ee-t))),l=this.updateIndex((0,p.El)(r,e.startLineNumber+n,((e,t)=>e-t)));for(let r=a;r<=l;r++){const a=t.children[r];if(!a)return;if(a.range){const t=a.range.startLineNumber,o=a.range.endLineNumber;e.startLineNumber<=o+1&&t-1<=e.endLineNumber&&t!==s&&(s=t,i.push(new oe(t,o-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n,o)}}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];let t=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,-1);const i=this._editor._getViewModel()?.getHiddenAreas();if(i)for(const e of i)t=t.filter((t=>!(t.startLineNumber>=e.startLineNumber&&t.endLineNumber<=e.endLineNumber+1)));return t}};se=ie([ne(1,u.ILanguageFeaturesService),ne(2,P.JZ)],se);var re,ae=i(46403),le=i(51170),ce=i(8690),de=i(85901),ue=i(26805),he=i(85983),ge=i(46274),pe=i(17662),fe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},me=function(e,t){return function(i,n){t(i,n,e)}};let _e=class extends d.jG{static{re=this}static{this.ID="store.contrib.stickyScrollController"}constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new d.Cm,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new I(this._editor),this._stickyLineCandidateProvider=new se(this._editor,i,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=S.Empty,this._onDidResize(),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{this._readConfigurationChange(e)}))),this._register(h.ko(a,h.Bx.CONTEXT_MENU,(async e=>{this._onContextMenu(h.zk(a),e)}))),this._stickyScrollFocusedContextKey=c.R.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=c.R.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(h.w5(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(h.ko(a,h.Bx.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(re.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();const e=this._stickyScrollFocusedContextKey.get();!0!==e&&(this._focused=!0,this._focusDisposableStore=new d.Cm,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,(()=>this._editor.revealPosition(e)))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,(()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0)))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(ce.Q.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new d.Cm),t=this._register(new le.gi(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new ce.Q(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(h.b2(n,h.Bx.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new v.y(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}const t=this._stickyScrollWidget.isInFoldingIconDomNode(e.target);if(t){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);return void this._toggleFoldingRegionForLine(t)}const i=this._stickyScrollWidget.isInStickyLine(e.target);if(!i)return;let n=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!n){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===t)return;n=new v.y(t,1)}this._revealPosition(n)}))),this._register(h.b2(n,h.Bx.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}void 0!==this._showEndForLine&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._register(h.ko(n,h.Bx.MOUSE_LEAVE,(e=>{void 0!==this._showEndForLine&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const o=i(t);if(!o||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:s,textElement:r}=o;if(s.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=s,e.clear();const a=new N.Qi;let l;e.add((0,d.s)((()=>a.dispose(!0)))),(0,de.hE)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new v.y(s.startLineNumber,s.startColumn+1),!1,a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add((0,d.s)((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add((0,d.s)((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((async e=>{if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&this._editor.hasModel()&&this._stickyRangeProjectedOnEditor&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(ue.U,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e,t){const i=new ge.P(e,t);this._contextMenuService.showContextMenu({menuId:r.D8.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||null===e)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),i=t?.foldingIcon;if(!i)return;(0,pe.bC)(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(116);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=void 0,this._renderStickyScroll()}))),this._enabled=!0);const t=this._editor.getOption(68);2===t.renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)})))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const e=this._editor.getLayoutInfo(),t=e.height/this._editor.getOption(67);this._maxStickyLines=Math.round(.25*t)}async _renderStickyScroll(e){const t=this._editor.getModel();if(!t||t.isTooLargeForTokenization())return void this._resetState();const i=this._updateAndGetMinRebuildFromLine(e),n=this._stickyLineCandidateProvider.getVersionId(),o=void 0===n||n===t.getVersionId();if(o)if(this._focused)if(-1===this._focusedStickyElementIndex)await this._updateState(i),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const e=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];if(await this._updateState(i),0===this._stickyScrollWidget.lineNumberCount)this._focusedStickyElementIndex=-1;else{const t=this._stickyScrollWidget.lineNumbers.includes(e);t||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}}else await this._updateState(i)}_updateAndGetMinRebuildFromLine(e){if(void 0!==e){const t=void 0!==this._minRebuildFromLine?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await(F.WR.get(this._editor)?.getFoldingModel())??void 0,this._widgetState=this.findScrollWidgetState();const t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=S.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),i=this._editor.getScrollTop();let n=0;const o=[],s=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new V(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,c=r.nestingDepth;if(l-a>0){const r=(c-1)*e,d=c*e,u=this._editor.getBottomForLineNumber(a)-i,h=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>h&&r<=g){o.push(a),s.push(l+1),n=g-d;break}if(d>u&&d<=g&&(o.push(a),s.push(l+1)),o.length===t)break}}}return this._endLineNumbers=s,new S(o,s,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};_e=re=fe([me(1,ae.Z),me(2,u.ILanguageFeaturesService),me(3,K._Y),me(4,P.JZ),me(5,he.ILanguageFeatureDebounceService),me(6,l.fN)],_e);class ve extends r.L{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...(0,o.aS)("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:(0,o.kg)({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:(0,o.aS)("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:s.View,toggled:{condition:l.M$.equals("config.editor.stickyScroll.enabled",!0),title:(0,o.kg)("stickyScroll","Sticky Scroll"),mnemonicTitle:(0,o.kg)({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:r.D8.CommandPalette},{id:r.D8.MenubarAppearanceMenu,group:"4_editor",order:3},{id:r.D8.StickyScrollContext}]})}async run(e){const t=e.get(a.pG),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}}const be=100;class ye extends n.qO{constructor(){super({id:"editor.action.focusStickyScroll",title:{...(0,o.aS)("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:(0,o.kg)({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:l.M$.and(l.M$.has("config.editor.stickyScroll.enabled"),c.R.stickyScrollVisible),menu:[{id:r.D8.CommandPalette}]})}runEditorCommand(e,t){_e.get(t)?.focus()}}class we extends n.qO{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:(0,o.aS)("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:be,primary:18}})}runEditorCommand(e,t){_e.get(t)?.focusNext()}}class Ce extends n.qO{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:(0,o.aS)("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:be,primary:16}})}runEditorCommand(e,t){_e.get(t)?.focusPrevious()}}class Se extends n.qO{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:(0,o.aS)("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:be,primary:3}})}runEditorCommand(e,t){_e.get(t)?.goToFocused()}}class ke extends n.qO{constructor(){super({id:"editor.action.selectEditor",title:(0,o.aS)("selectEditor.title","Select Editor"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:be,primary:9}})}runEditorCommand(e,t){_e.get(t)?.selectEditor()}}(0,n.HW)(_e.ID,_e,1),(0,r.ug)(ve),(0,r.ug)(ye),(0,r.ug)(Ce),(0,r.ug)(we),(0,r.ug)(Se),(0,r.ug)(ke)},85482:(e,t,i)=>{"use strict";i.d(t,{C:()=>a,O:()=>r});var n=i(85053),o=i(10695),s=i(20601);class r{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class a{constructor(e,t,i,n,s,r,l=o.Nd.default,c=void 0){this.clipboardText=c,this._snippetCompareFn=a._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=l,"top"===r?this._snippetCompareFn=a._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=a._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let r="",a="";const l=1===this._refilterKind?this._items:this._filteredItems,c=[],d=!this._options.filterGraceful||l.length>2e3?o.dt:o.uU;for(let n=0;n=p)u.score=o.ne.Default;else if("string"===typeof u.completion.filterText){const t=d(r,a,e,u.completion.filterText,u.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===(0,s.W1)(u.completion.filterText,u.textLabel)?u.score=t:(u.score=(0,o.Jo)(r,a,e,u.textLabel,u.labelLow,0),u.score[0]=t[0])}else{const t=d(r,a,e,u.textLabel,u.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;u.score=t}}u.idx=n,u.distance=this._wordDistance.distance(u.position,u.completion),c.push(u),e.push(u.textLabel.length)}this._filteredItems=c.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,n.SO)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return a._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return a._compareCompletionItems(e,t)}}},69547:(e,t,i)=>{"use strict";i.d(t,{aR:()=>L,dt:()=>w,f3:()=>x,l1:()=>S,ob:()=>y,p3:()=>A,r3:()=>O});var n=i(67792),o=i(14396),s=i(10695),r=i(5091),a=i(84240),l=i(50322),c=i(29133),d=i(36788),u=i(8690),h=i(64037),g=i(18760),p=i(41337),f=i(6330),m=i(72786),_=i(18904),v=i(12847),b=i(73075);const y={Visible:b.dg,HasFocusedSuggestion:new _.N1("suggestWidgetHasFocusedSuggestion",!1,(0,p.kg)("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new _.N1("suggestWidgetDetailsVisible",!1,(0,p.kg)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new _.N1("suggestWidgetMultipleSuggestions",!1,(0,p.kg)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new _.N1("suggestionMakesTextEdit",!0,(0,p.kg)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new _.N1("acceptSuggestionOnEnter",!0,(0,p.kg)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new _.N1("suggestionHasInsertAndReplaceRange",!1,(0,p.kg)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new _.N1("suggestionInsertMode",void 0,{type:"string",description:(0,p.kg)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new _.N1("suggestionCanResolve",!1,(0,p.kg)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new f.D8("suggestWidgetStatusBar");class C{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=s.ne.Default,this.distance=0,this.textLabel="string"===typeof t.label?t.label:t.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,u.Q.isIRange(t.range)?(this.editStart=new d.y(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new d.y(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new d.y(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||u.Q.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new d.y(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new d.y(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new d.y(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||u.Q.spansMultipleLines(t.range.insert)||u.Q.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!==typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new a.W(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed()}),(e=>{(0,o.MB)(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})).finally((()=>{t.dispose()}))}return this._resolveCache}}class S{static{this.default=new S}constructor(e=2,t=new Set,i=new Set,n=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=o}}let k;function x(){return k}class E{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function L(e,t,i,s=S.default,l={triggerKind:0},c=n.XO.None){const d=new a.W;i=i.clone();const h=t.getWordAtPosition(i),p=h?new u.Q(i.lineNumber,h.startColumn,i.lineNumber,h.endColumn):u.Q.fromPositions(i),f={replace:p,insert:p.setEndPosition(i.lineNumber,i.column)},m=[],_=new r.Cm,v=[];let b=!1;const y=(e,t,n)=>{let o=!1;if(!t)return o;for(const n of t.suggestions)if(!s.kindFilter.has(n.kind)){if(!s.showDeprecated&&n?.tags?.includes(1))continue;n.range||(n.range=f),n.sortText||(n.sortText="string"===typeof n.label?n.label:n.label.label),!b&&n.insertTextRules&&4&n.insertTextRules&&(b=g.fr.guessNeedsClipboard(n.insertText)),m.push(new C(i,n,t,e)),o=!0}return(0,r.Xm)(t)&&_.add(t),v.push({providerName:e._debugDisplayName??"unknown_provider",elapsedProvider:t.duration??-1,elapsedOverall:n.elapsed()}),o},w=(async()=>{if(!k||s.kindFilter.has(27))return;const e=s.providerItemsToReuse.get(k);if(e)return void e.forEach((e=>m.push(e)));if(s.providerFilter.size>0&&!s.providerFilter.has(k))return;const n=new a.W,o=await k.provideCompletionItems(t,i,l,c);y(k,o,n)})();for(const n of e.orderedGroups(t)){let e=!1;if(await Promise.all(n.map((async n=>{if(s.providerItemsToReuse.has(n)){const t=s.providerItemsToReuse.get(n);return t.forEach((e=>m.push(e))),void(e=e||t.length>0)}if(!(s.providerFilter.size>0)||s.providerFilter.has(n))try{const o=new a.W,s=await n.provideCompletionItems(t,i,l,c);e=y(n,s,o)||e}catch(e){(0,o.M_)(e)}}))),e||c.isCancellationRequested)break}return await w,c.isCancellationRequested?(_.dispose(),Promise.reject(new o.AL)):new E(m.sort(N(s.snippetSortOrder)),b,{entries:v,elapsed:d.elapsed()},_)}function T(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.textLabelt.textLabel?1:e.completion.kind-t.completion.kind}function I(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return T(e,t)}function D(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return T(e,t)}const R=new Map;function N(e){return R.get(e)}function A(e,t){e.getContribution("editor.contrib.suggestController")?.triggerSuggest((new Set).add(t),void 0,!0)}R.set(0,I),R.set(2,D),R.set(1,T),m.w.registerCommand("_executeCompletionItemProvider",(async(e,...t)=>{const[i,o,s,r]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(d.y.isIPosition(o)),(0,l.j)("string"===typeof s||!s),(0,l.j)("number"===typeof r||!r);const{completionProvider:a}=e.get(v.ILanguageFeaturesService),u=await e.get(h.ITextModelService).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=u.object.textEditorModel.validatePosition(o),l=await L(a,u.object.textEditorModel,i,void 0,{triggerCharacter:s??void 0,triggerKind:s?1:0});for(const i of l.items)t.length<(r??0)&&t.push(i.resolve(n.XO.None)),e.incomplete=e.incomplete||i.container.incomplete,e.suggestions.push(i.completion);try{return await Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{u.dispose()}}));class O{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}},79266:(e,t,i)=>{"use strict";i.d(t,{D:()=>Ke});var n,o=i(19950),s=i(85053),r=i(67792),a=i(14396),l=i(40231),c=i(48770),d=i(5091),u=i(25160),h=i(84240),g=i(50322),p=i(71203),f=i(16259),m=i(28346),_=i(36788),v=i(8690),b=i(57479),y=i(82397),w=i(18760),C=i(49364),S=i(18904),k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t){return function(i,n){t(i,n,e)}};let E=class{static{n=this}static{this.AtEnd=new S.N1("atEndOfWord",!1)}constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=n.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(124)&&this._update())),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(124);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};E=n=k([x(1,S.fN)],E);var L,T=i(41337),I=i(72786),D=i(87778),R=i(12660),N=i(69547),A=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O=function(e,t){return function(i,n){t(i,n,e)}};let P=class{static{L=this}static{this.OtherSuggestions=new S.N1("hasOtherSuggestions",!1)}constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=L.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(0===e.items.length)return void this.reset();const n=L._moveIndex(!0,e,t);n!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let o=t.items.length;o>0;o--){if(n=(n+t.items.length+(e?1:-1))%t.items.length,n===i)break;if(!t.items[n].completion.additionalTextEdits)break}return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=L._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};P=L=A([O(1,S.fN)],P);var M=i(94529);class F{constructor(e,t,i,n){this._disposables=new d.Cm,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((o=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!(0,s.EI)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new M.y;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var B=i(18506);class W{static{this._maxSelectionLength=51200}constructor(e,t){this._disposables=new d.Cm,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eW._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Y=function(e,t){return function(i,n){t(i,n,e)}};let Z=class{constructor(e,t,i,n,o){this._menuId=t,this._menuService=n,this._contextKeyService=o,this._menuDisposables=new d.Cm,this.element=H.BC(e,H.$(".suggest-status-bar"));const s=e=>e instanceof G.Xe?i.createInstance(K.rr,e,{useComma:!0}):void 0;this._leftActions=new q.E(this.element,{actionViewItemProvider:s}),this._rightActions=new q.E(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};Z=Q([Y(2,D._Y),Y(3,G.ez),Y(4,S.fN)],Z);i(94423);var X=i(94216),J=i(66344),ee=i(1474),te=i(15911),ie=i(1606),ne=i(37800),oe=i(25923),se=i(23740),re=i(42325),ae=i(36511),le=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ce=function(e,t){return function(i,n){t(i,n,e)}};function de(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let ue=class{constructor(e,t){this._editor=e,this._onDidClose=new l.vl,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new l.vl,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new d.Cm,this._renderDisposeable=new d.Cm,this._borderWidth=1,this._size=new H.fg(330,0),this.domNode=H.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(ae.T,{editor:e}),this._body=H.$(".body"),this._scrollbar=new ne.MU(this._body,{alwaysConsumeMouseWheel:!0}),H.BC(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=H.BC(this._body,H.$(".header")),this._close=H.BC(this._header,H.$("span"+se.L.asCSSSelector(oe.W.close))),this._close.title=T.kg("details.close","Close"),this._type=H.BC(this._header,H.$("p.type")),this._docs=H.BC(this._body,H.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(120)||t.fontSize,o=e.get(121)||t.lineHeight,s=t.fontWeight,r=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+o/n,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(121)||this._editor.getOption(50).lineHeight,t=this._borderWidth,i=2*t;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=T.kg("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){this._renderDisposeable.clear();let{detail:i,documentation:n}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${e.word??"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${e.completion.commitCharacters?.join("")}\n`,n=(new re.Bc).appendCodeblock("empty",t),i=`Provider: ${e.provider._debugDisplayName}`}if(t||de(e)){if(this.domNode.classList.remove("no-docs","no-type"),i){const e=i.length>1e5?`${i.substr(0,1e5)}…`:i;this._type.textContent=e,this._type.title=e,H.WU(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else H.w_(this._type),this._type.title="",H.jD(this._type),this.domNode.classList.add("no-type");if(H.w_(this._docs),"string"===typeof n)this._docs.classList.remove("markdown-docs"),this._docs.textContent=n;else if(n){this._docs.classList.add("markdown-docs"),H.w_(this._docs);const e=this._markdownRenderer.render(n);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){const i=new H.fg(e,t);H.fg.equals(i,this._size)||(this._size=i,H.Ej(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};ue=le([ce(1,D._Y)],ue);class he{constructor(e,t){let i,n;this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new d.Cm,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new ie.v,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,s=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(s=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+s})}e.done&&(i=void 0,n=void 0,o=0,s=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,i){const n=H.tG(this.getDomNode().ownerDocument.body),o=this.widget.getLayoutInfo(),s=new H.fg(220,2*o.lineHeight),r=e.top,a=function(){const i=n.width-(e.left+e.width+o.borderWidth+o.horizontalPadding),a=-o.borderWidth+e.left+e.width,l=new H.fg(i,n.height-e.top-o.borderHeight-o.verticalPadding),c=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:s.with(Math.min(i,s.width))}}(),l=function(){const i=e.left-o.borderWidth-o.horizontalPadding,a=Math.max(o.horizontalPadding,e.left-t.width-o.borderWidth),l=new H.fg(i,n.height-e.top-o.borderHeight-o.verticalPadding),c=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:s.with(Math.min(i,s.width))}}(),c=function(){const i=e.left,r=-o.borderWidth+e.top+e.height,a=new H.fg(e.width-o.borderHeight,n.height-e.top-e.height-o.verticalPadding);return{top:r,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:s.with(a.width)}}(),d=[a,l,c],u=d.find((e=>e.fit>=0))??d.sort(((e,t)=>t.fit-e.fit))[0],h=e.top+e.height-o.borderHeight;let g,p=t.height;const f=Math.max(u.maxSizeTop.height,u.maxSizeBottom.height);let m;p>f&&(p=f),i?p<=u.maxSizeTop.height?(g=!0,m=u.maxSizeTop):(g=!1,m=u.maxSizeBottom):p<=u.maxSizeBottom.height?(g=!1,m=u.maxSizeBottom):(g=!0,m=u.maxSizeTop);let{top:_,left:v}=u;!g&&p>e.height&&(_=h-p);const b=this._editor.getDomNode();if(b){const e=b.getBoundingClientRect();_-=e.top,v-=e.left}this._applyTopLeft({left:v,top:_}),this._resizable.enableSashes(!g,u===a,g,u!==a),this._resizable.minSize=u.minSize,this._resizable.maxSize=m,this._resizable.layout(p,Math.min(m.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var ge=i(50278),pe=i(10695),fe=i(29133),me=i(35350),_e=i(55885),ve=i(69361),be=i(14573),ye=i(12082),we=i(48401),Ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Se=function(e,t){return function(i,n){t(i,n,e)}};function ke(e){return`suggest-aria-id:${e}`}const xe=(0,we.pU)("suggest-more-info",oe.W.chevronRight,T.kg("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),Ee=new class e{static{this._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/}static{this._regexStrict=new RegExp(`^${e._regexRelaxed.source}$`,"i")}extract(t,i){if(t.textLabel.match(e._regexStrict))return i[0]=t.textLabel,!0;if(t.completion.detail&&t.completion.detail.match(e._regexStrict))return i[0]=t.completion.detail,!0;if(t.completion.documentation){const n="string"===typeof t.completion.documentation?t.completion.documentation:t.completion.documentation.value,o=e._regexRelaxed.exec(n);if(o&&(0===o.index||o.index+o[0].length===n.length))return i[0]=o[0],!0}return!1}};let Le=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new l.vl,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new d.Cm,i=e;i.classList.add("show-file-icons");const n=(0,H.BC)(e,(0,H.$)(".icon")),o=(0,H.BC)(n,(0,H.$)("span.colorspan")),s=(0,H.BC)(e,(0,H.$)(".contents")),r=(0,H.BC)(s,(0,H.$)(".main")),a=(0,H.BC)(r,(0,H.$)(".icon-label.codicon")),l=(0,H.BC)(r,(0,H.$)("span.left")),c=(0,H.BC)(r,(0,H.$)("span.right")),u=new ge.s(l,{supportHighlights:!0,supportIcons:!0});t.add(u);const h=(0,H.BC)(l,(0,H.$)("span.signature-label")),g=(0,H.BC)(l,(0,H.$)("span.qualifier-label")),p=(0,H.BC)(c,(0,H.$)("span.details-label")),f=(0,H.BC)(c,(0,H.$)("span.readMore"+se.L.asCSSSelector(xe)));f.title=T.kg("readMore","Read More");const m=()=>{const e=this._editor.getOptions(),t=e.get(50),o=t.getMassagedFontFamily(),s=t.fontFeatureSettings,a=e.get(120)||t.fontSize,l=e.get(121)||t.lineHeight,c=t.fontWeight,d=t.letterSpacing,u=`${a}px`,h=`${l}px`,g=`${d}px`;i.style.fontSize=u,i.style.fontWeight=c,i.style.letterSpacing=g,r.style.fontFamily=o,r.style.fontFeatureSettings=s,r.style.lineHeight=h,n.style.height=h,n.style.width=h,f.style.height=h,f.style.width=h};return{root:i,left:l,right:c,icon:n,colorspan:o,iconLabel:u,iconContainer:a,parametersLabel:h,qualifierLabel:g,detailsLabel:p,readMore:f,disposables:t,configureFont:m}}renderElement(e,t,i){i.configureFont();const{completion:n}=e;i.root.id=ke(t),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:(0,pe.WJ)(e.score)},s=[];if(19===n.kind&&Ee.extract(e,s))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=s[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=(0,_e.getIconClasses)(this._modelService,this._languageService,fe.r.from({scheme:"fake",path:e.textLabel}),ye.p.FILE),s=(0,_e.getIconClasses)(this._modelService,this._languageService,fe.r.from({scheme:"fake",path:n.detail}),ye.p.FILE);o.extraClasses=t.length>s.length?t:s}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=[(0,_e.getIconClasses)(this._modelService,this._languageService,fe.r.from({scheme:"fake",path:e.textLabel}),ye.p.FOLDER),(0,_e.getIconClasses)(this._modelService,this._languageService,fe.r.from({scheme:"fake",path:n.detail}),ye.p.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...se.L.asClassNameArray(me.HC.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),"string"===typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=Te(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=Te(n.label.detail||""),i.detailsLabel.textContent=Te(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(119).showInlineDetails?(0,H.WU)(i.detailsLabel):(0,H.jD)(i.detailsLabel),de(e)?(i.right.classList.add("can-expand-details"),(0,H.WU)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,H.jD)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Te(e){return e.replace(/\r\n|\r|\n/g,"")}Le=Ce([Se(1,ve.IModelService),Se(2,be.L),Se(3,te.Gy)],Le);var Ie,De=i(13153),Re=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ne=function(e,t){return function(i,n){t(i,n,e)}};(0,J.x1A)("editorSuggestWidget.background",J.CgL,T.kg("editorSuggestWidgetBackground","Background color of the suggest widget.")),(0,J.x1A)("editorSuggestWidget.border",J.sIe,T.kg("editorSuggestWidgetBorder","Border color of the suggest widget."));const Ae=(0,J.x1A)("editorSuggestWidget.foreground",J.By2,T.kg("editorSuggestWidgetForeground","Foreground color of the suggest widget."));(0,J.x1A)("editorSuggestWidget.selectedForeground",J.nH,T.kg("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),(0,J.x1A)("editorSuggestWidget.selectedIconForeground",J.c7i,T.kg("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const Oe=(0,J.x1A)("editorSuggestWidget.selectedBackground",J.AlL,T.kg("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));(0,J.x1A)("editorSuggestWidget.highlightForeground",J.QI5,T.kg("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),(0,J.x1A)("editorSuggestWidget.focusHighlightForeground",J.eMz,T.kg("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused.")),(0,J.x1A)("editorSuggestWidgetStatus.foreground",(0,J.JO0)(Ae,.5),T.kg("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class Pe{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof $.t}`}restore(){const e=this._service.get(this._key,0)??"";try{const t=JSON.parse(e);if(H.fg.is(t))return H.fg.lift(t)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Me=class{static{Ie=this}static{this.LOADING_MESSAGE=T.kg("suggestWidget.loading","Loading...")}static{this.NO_SUGGESTIONS_MESSAGE=T.kg("suggestWidget.noSuggestions","No suggestions.")}constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new d.HE,this._pendingShowDetails=new d.HE,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new j.pc,this._disposables=new d.Cm,this._onDidSelect=new l.fV,this._onDidFocus=new l.fV,this._onDidHide=new l.vl,this._onDidShow=new l.vl,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new l.vl,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ie.v,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Fe(this,e),this._persistedSize=new Pe(t,e);class s{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new s(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:t}=this.getLayoutInfo(),i=Math.round(e/2);let{width:n,height:o}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-o)<=i)&&(o=r.persistedSize?.height??t.height),(!r.persistWidth||Math.abs(r.currentSize.width-n)<=i)&&(n=r.persistedSize?.width??t.width),this._persistedSize.store(new H.fg(n,o))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=H.BC(this.element.domNode,H.$(".message")),this._listElement=H.BC(this.element.domNode,H.$(".tree"));const a=this._disposables.add(o.createInstance(ue,this.editor));a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new he(a,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(119).showIcons);c();const u=o.createInstance(Le,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new V.B8("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>T.kg("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!==typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=T.kg("label.full","{0} {1}, {2}",t,i,n):i?t=T.kg("label.detail","{0} {1}",t,i):n&&(t=T.kg("label.desc","{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion,o=U.GP("{0}{1}",n||"",i?"string"===typeof i?i:i.value:"");return T.kg("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,o)}}}),this._list.style((0,De.t8)({listInactiveFocusBackground:Oe,listInactiveFocusOutline:J.buw})),this._status=o.createInstance(Z,this.element.domNode,N.dt);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(119).showStatusBar);h(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(119)&&(h(),c()),this._completionModel&&(e.hasChanged(50)||e.hasChanged(120)||e.hasChanged(121))&&this._list.splice(0,this._list.length,this._completionModel.items)}))),this._ctxSuggestWidgetVisible=N.ob.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=N.ob.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=N.ob.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=N.ob.HasFocusedSuggestion.bindTo(i),this._disposables.add(H.b2(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){"undefined"!==typeof e.element&&"undefined"!==typeof e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=(0,ee.Bb)(e.type)?2:1}_onListFocus(e){if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const t=e.elements[0],i=e.indexes[0];t!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=t,this._list.reveal(i),this._currentSuggestionDetails=(0,j.SS)((async e=>{const i=(0,j.EQ)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>i.dispose()));try{return await t.resolve(e)}finally{i.dispose(),n.dispose()}})),this._currentSuggestionDetails.then((()=>{i>=this._list.length||t!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[t]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:ke(i)}))})).catch(a.dz)),this._onDidFocus.fire({item:t,index:i,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:H.jD(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ie.LOADING_MESSAGE,H.jD(this._listElement,this._status.element),H.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,o.h5)(Ie.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ie.NO_SUGGESTIONS_MESSAGE,H.jD(this._listElement,this._status.element),H.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,o.h5)(Ie.NO_SUGGESTIONS_MESSAGE);break;case 3:H.jD(this._messageElement),H.WU(this._listElement,this._status.element),this._show();break;case 4:H.jD(this._messageElement),H.WU(this._listElement,this._status.element),this._show();break;case 5:H.jD(this._messageElement),H.WU(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,j.EQ)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,o){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const s=this._completionModel.items.length,r=0===s;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),r)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=H.Oq(H.zk(this.element.domNode),(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!de(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=H.Oq(H.zk(this.element.domNode),(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._pendingLayout.clear(),this._pendingShowDetails.clear(),this._loadingTimeout?.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const e=this._persistedSize.restore(),t=Math.ceil(4.3*this.getLayoutInfo().itemHeight);e&&e.heights&&(o=s);const r=this._completionModel?this._completionModel.stats.pLabelLen*i.typicalHalfwidthCharacterWidth:o,a=i.statusBarHeight+this._list.contentHeight+i.borderHeight,l=i.itemHeight+i.statusBarHeight,c=H.BK(this.editor.getDomNode()),d=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),u=c.top+d.top+d.height,h=Math.min(t.height-u-i.verticalPadding,a),g=c.top+d.top-i.verticalPadding,p=Math.min(g,a);let f=Math.min(Math.max(p,h)+i.borderHeight,a);n===this._cappedHeight?.capped&&(n=this._cappedHeight.wanted),nf&&(n=f);const m=150;n>h||this._forceRenderingAbove&&g>m?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),f=p):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),f=h),this.element.preferredSize=new H.fg(r,i.defaultSize.height),this.element.maxSize=new H.fg(s,f),this.element.minSize=new H.fg(220,l),this._cappedHeight=n===a?{wanted:this._cappedHeight?.wanted??e.height,capped:n}:void 0}this._resize(o,n)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===this._contentWidget.getPosition()?.preference[0])}getLayoutInfo(){const e=this.editor.getOption(50),t=(0,z.qE)(this.editor.getOption(121)||e.lineHeight,8,1e3),i=this.editor.getOption(119).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new H.fg(430,i+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Me=Ie=Re([Ne(1,X.CS),Ne(2,S.fN),Ne(3,te.Gy),Ne(4,D._Y)],Me);class Fe{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new H.fg(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Be,We=i(11086),He=i(84366),Ve=i(65647),je=i(35037),ze=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ue=function(e,t){return function(i,n){t(i,n,e)}};const $e=!1;class qe{constructor(e,t){this._model=e,this._position=t,this._decorationOptions=je.kI.register({description:"suggest-line-suffix",stickiness:1});const i=e.getLineMaxColumn(t.lineNumber);if(i!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);e.changeDecorations((e=>{this._marker&&e.removeDecoration(this._marker),this._marker=e.addDecoration(v.Q.fromPositions(t,n),this._decorationOptions)}))}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations((e=>{e.removeDecoration(this._marker),this._marker=void 0}))}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker),i=this._model.getOffsetAt(t.getStartPosition());return i-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Ke=class{static{Be=this}static{this.ID="editor.contrib.suggestController"}static get(e){return e.getContribution(Be.ID)}constructor(e,t,i,n,o,s,r){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=o,this._logService=s,this._telemetryService=r,this._lineSuffix=new d.HE,this._toDispose=new d.Cm,this._selectors=new Ge((e=>e.priority)),this._onWillInsertSuggestItem=new l.vl,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance(B.Y,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const a=N.ob.InsertMode.bindTo(n);a.set(e.getOption(119).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>a.set(e.getOption(119).insertMode)))),this.widget=this._toDispose.add(new H.Ij((0,H.zk)(e.getDomNode()),(()=>{const e=this._instantiationService.createInstance(Me,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new F(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=N.ob.MakesTextEdit.bindTo(this._contextKeyService),n=N.ob.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=N.ob.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,d.s)((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),s=e.editStart.column,r=t.column;let a=!0;if("smart"===this.editor.getOption(1)&&2===this.model.state&&!e.completion.additionalTextEdits&&!(4&e.completion.insertTextRules)&&r-s===e.completion.insertText.length){const i=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:s,endLineNumber:t.lineNumber,endColumn:r});a=i!==e.completion.insertText}i.set(a),n.set(!_.y.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new c.dG(!0,!1,!1,!1,33))||u.zx&&e.toKeyCodeChord().equals(new c.dG(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new H.Ij((0,H.zk)(e.getDomNode()),(()=>this._toDispose.add(new W(this.editor,this.model))))),this._alternatives=this._toDispose.add(new H.Ij((0,H.zk)(e.getDomNode()),(()=>this._toDispose.add(new P(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(E,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new qe(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const i of this._selectors.itemsOrderedByPriorityDesc)if(t=i.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;if(-1===t&&(t=0),0===this.model.state)return;let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(119);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{$e||(this.model.cancel(),this.model.clear())})));const h=N.ob.AcceptSuggestionsOnEnter.bindTo(n),g=()=>{const e=this.editor.getOption(1);h.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>g()))),g()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=y.O.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),o=n.getAlternativeVersionId(),{item:s}=e,l=[],c=new r.Qi;1&t||this.editor.pushUndoStop();const d=this.getOverwriteInfo(s,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),s);const u=s.isResolved;let g=-1,f=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();const e=p.D.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map((e=>{let t=v.Q.lift(e.range);if(t.startLineNumber===s.position.lineNumber&&t.startColumn>s.position.column){const e=this.editor.getPosition().column-s.position.column,i=e,n=v.Q.spansMultipleLines(t)?0:e;t=new v.Q(t.startLineNumber,t.startColumn+i,t.endLineNumber,t.endColumn+n)}return m.k.replaceMove(t,e.text)}))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!u){const e=new h.W;let i;const o=n.onDidChangeContent((e=>{if(e.isFlush)return c.cancel(),void o.dispose();for(const t of e.changes){const e=v.Q.getEndPosition(t.range);i&&!_.y.isBefore(e,i)||(i=e)}})),r=t;t|=2;let a=!1;const d=this.editor.onWillType((()=>{d.dispose(),a=!0,2&r||this.editor.pushUndoStop()}));l.push(s.resolve(c.token).then((()=>{if(!s.completion.additionalTextEdits||c.token.isCancellationRequested)return;if(i&&s.completion.additionalTextEdits.some((e=>_.y.isBefore(i,v.Q.getStartPosition(e.range)))))return!1;a&&this.editor.pushUndoStop();const e=p.D.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map((e=>m.k.replaceMove(v.Q.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!a&&2&r||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),f=!0===t?1:!1===t?0:-2})).finally((()=>{o.dispose(),d.dispose()})))}let{insertText:b}=s.completion;if(4&s.completion.insertTextRules||(b=w.fr.escape(b)),this.model.cancel(),i.insert(b,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&s.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===Qe.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new h.W;l.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch((e=>{s.completion.extensionId?(0,a.M_)(e):(0,a.dz)(e)})).finally((()=>{g=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{c.cancel();while(n.canUndo()){o!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(s),Promise.all(l).finally((()=>{this._reportSuggestionAcceptedTelemetry(s,n,u,g,f,e.index,e.model.items),this.model.clear(),c.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,o,s,r){if(0===Math.floor(100*Math.random()))return;const a=new Map;for(let e=0;e1,d=c?l[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:e.extensionId?.value??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:(0,Ve.tW)((0,He.P8)(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:(0,He.LC)(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:o,index:s,firstIndex:d})}getOverwriteInfo(e,t){(0,g.j)(this.editor.hasModel());let i="replace"===this.editor.getOption(119).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,r=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+s,overwriteAfter:o+r}}_alertCompletionItem(e){if((0,s.EI)(e.completion.additionalTextEdits)){const t=T.kg("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,o.xE)(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;if(n-i!==e.completion.insertText.length)return!0;const o=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n});return o!==e.completion.insertText};l.Jh.once(this.model.onDidTrigger)((e=>{const t=[];l.Jh.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,d.AS)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,d.AS)(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),s=e.items[o];n(s)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:s,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Ke=Be=ze([Ue(1,C.GS),Ue(2,I.d),Ue(3,S.fN),Ue(4,D._Y),Ue(5,R.rr),Ue(6,We.k)],Ke);class Ge{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class Qe extends f.ks{static{this.id="editor.action.triggerSuggest"}constructor(){super({id:Qe.id,label:T.kg("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:S.M$.and(b.R.writable,b.R.hasCompletionItemProvider,N.ob.Visible.toNegated()),kbOpts:{kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=Ke.get(t);if(!n)return;let o;i&&"object"===typeof i&&!0===i.auto&&(o=!0),n.triggerSuggest(void 0,o,void 0)}}(0,f.HW)(Ke.ID,Ke,2),(0,f.Fl)(Qe);const Ye=190,Ze=f.DX.bindToContribution(Ke.get);(0,f.E_)(new Ze({id:"acceptSelectedSuggestion",precondition:S.M$.and(N.ob.Visible,N.ob.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:S.M$.and(N.ob.Visible,b.R.textInputFocus),weight:Ye},{primary:3,kbExpr:S.M$.and(N.ob.Visible,b.R.textInputFocus,N.ob.AcceptSuggestionsOnEnter,N.ob.MakesTextEdit),weight:Ye}],menuOpts:[{menuId:N.dt,title:T.kg("accept.insert","Insert"),group:"left",order:1,when:N.ob.HasInsertAndReplaceRange.toNegated()},{menuId:N.dt,title:T.kg("accept.insert","Insert"),group:"left",order:1,when:S.M$.and(N.ob.HasInsertAndReplaceRange,N.ob.InsertMode.isEqualTo("insert"))},{menuId:N.dt,title:T.kg("accept.replace","Replace"),group:"left",order:1,when:S.M$.and(N.ob.HasInsertAndReplaceRange,N.ob.InsertMode.isEqualTo("replace"))}]})),(0,f.E_)(new Ze({id:"acceptAlternativeSelectedSuggestion",precondition:S.M$.and(N.ob.Visible,b.R.textInputFocus,N.ob.HasFocusedSuggestion),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:N.dt,group:"left",order:2,when:S.M$.and(N.ob.HasInsertAndReplaceRange,N.ob.InsertMode.isEqualTo("insert")),title:T.kg("accept.replace","Replace")},{menuId:N.dt,group:"left",order:2,when:S.M$.and(N.ob.HasInsertAndReplaceRange,N.ob.InsertMode.isEqualTo("replace")),title:T.kg("accept.insert","Insert")}]})),I.w.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,f.E_)(new Ze({id:"hideSuggestWidget",precondition:N.ob.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:9,secondary:[1033]}})),(0,f.E_)(new Ze({id:"selectNextSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,f.E_)(new Ze({id:"selectNextPageSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:12,secondary:[2060]}})),(0,f.E_)(new Ze({id:"selectLastSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),(0,f.E_)(new Ze({id:"selectPrevSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,f.E_)(new Ze({id:"selectPrevPageSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:11,secondary:[2059]}})),(0,f.E_)(new Ze({id:"selectFirstSuggestion",precondition:S.M$.and(N.ob.Visible,S.M$.or(N.ob.MultipleSuggestions,N.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),(0,f.E_)(new Ze({id:"focusSuggestion",precondition:S.M$.and(N.ob.Visible,N.ob.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,f.E_)(new Ze({id:"focusAndAcceptSuggestion",precondition:S.M$.and(N.ob.Visible,N.ob.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),(0,f.E_)(new Ze({id:"toggleSuggestionDetails",precondition:S.M$.and(N.ob.Visible,N.ob.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:N.dt,group:"right",order:1,when:S.M$.and(N.ob.DetailsVisible,N.ob.CanResolve),title:T.kg("detail.more","Show Less")},{menuId:N.dt,group:"right",order:1,when:S.M$.and(N.ob.DetailsVisible.toNegated(),N.ob.CanResolve),title:T.kg("detail.less","Show More")}]})),(0,f.E_)(new Ze({id:"toggleExplainMode",precondition:N.ob.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,f.E_)(new Ze({id:"toggleSuggestionFocus",precondition:N.ob.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:2570,mac:{primary:778}}})),(0,f.E_)(new Ze({id:"insertBestCompletion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),E.AtEnd,N.ob.Visible.toNegated(),P.OtherSuggestions.toNegated(),y.O.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,g.Gv)(t)?{fallback:"tab",...t}:{fallback:"tab"})},kbOpts:{weight:Ye,primary:2}})),(0,f.E_)(new Ze({id:"insertNextSuggestion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),P.OtherSuggestions,N.ob.Visible.toNegated(),y.O.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:2}})),(0,f.E_)(new Ze({id:"insertPrevSuggestion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),P.OtherSuggestions,N.ob.Visible.toNegated(),y.O.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:Ye,kbExpr:b.R.textInputFocus,primary:1026}})),(0,f.Fl)(class extends f.ks{constructor(){super({id:"editor.action.resetSuggestSize",label:T.kg("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){Ke.get(t)?.resetWidgetSize()}})},21095:(e,t,i)=>{"use strict";var n=i(67792),o=i(10695),s=i(5837),r=i(5091),a=i(94728),l=i(8690),c=i(36285),d=i(12847),u=i(85482),h=i(69547),g=i(49364),p=i(18506),f=i(4338),m=i(28753),_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},v=function(e,t){return function(i,n){t(i,n,e)}};class b{constructor(e,t,i,n,o,s){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=o,this.completion=s}}let y=class extends r.mp{constructor(e,t,i,n,o,s){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=s}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&t.resolve(n.XO.None)}return e}};y=_([v(5,g.GS)],y);let w=class extends r.jG{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){if(i.selectedSuggestionInfo)return;let o;for(const t of this._editorService.listCodeEditors())if(t.getModel()===e){o=t;break}if(!o)return;const s=o.getOption(90);if(h.r3.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const r=e.tokenization.getLineTokens(t.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==h.r3.valueFor(s,a))return;let c,d,g=e.getWordAtPosition(t);if(g?.word||(c=this._getTriggerCharacterInfo(e,t)),!g?.word&&!c)return;if(g||(g=e.getWordUntilPosition(t)),g.endColumn!==t.column)return;const m=e.getValueInRange(new l.Q(t.lineNumber,1,t.lineNumber,t.column));if(!c&&this._lastResult?.canBeReused(e,t.lineNumber,g)){const e=new u.O(m,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),d=this._lastResult}else{const i=await(0,h.aR)(this._languageFeatureService.completionProvider,e,t,new h.l1(void 0,p.Y.createSuggestFilter(o).itemKind,c?.providers),c&&{triggerKind:1,triggerCharacter:c.ch},n);let s;i.needsClipboard&&(s=await this._clipboardService.readText());const r=new u.C(i.items,t.column,new u.O(m,0),f.S.None,o.getOption(119),o.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},s);d=new y(e,t.lineNumber,g,r,i,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,t){t.completion.resolve(n.XO.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const i=e.getValueInRange(l.Q.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(const t of this._languageFeatureService.completionProvider.all(e))t.triggerCharacters?.includes(i)&&n.add(t);if(0!==n.size)return{providers:n,ch:i}}};w=_([v(0,d.ILanguageFeaturesService),v(1,m.h),v(2,g.GS),v(3,a.T)],w),(0,c.x)(w)},49364:(e,t,i)=>{"use strict";i.d(t,{GS:()=>y});var n,o=i(9659),s=i(5091),r=i(21553),a=i(71268),l=i(35350),c=i(32828),d=i(59857),u=i(87778),h=i(94216),g=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}};class f{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let e=0;ea&&l.type===i[t].completion.kind&&l.insertText===i[t].completion.insertText&&(a=l.touch,r=t),i[t].completion.preselect&&-1===s)return t}return-1!==r?r:-1!==s?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[i,n]of e)n.touch=t,n.type="number"===typeof n.type?n.type:l.HC.fromString(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class v extends f{constructor(){super("recentlyUsedByPrefix"),this._trie=a.cB.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const o=`${e.getLanguageId()}/${n}`;let s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let e=0;ee.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"===typeof i.type?i.type:l.HC.fromString(i.type),this._trie.set(t,i)}}}let b=class{static{n=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",v],["recentlyUsed",_],["first",m]])}static{this._storagePrefix="suggest/memories"}constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new s.Cm,this._persistSoon=new o.uC((()=>this._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===h.LP.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(this._strategy?.name!==i){this._saveState();const e=n._strategyCtors.get(i)||m;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections"),t=e?0:1,o=this._storageService.get(`${n._storagePrefix}/${i}`,t);o&&this._strategy.fromJSON(JSON.parse(o))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections"),t=e?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${n._storagePrefix}/${this._strategy.name}`,i,t,1)}}};b=n=g([p(0,h.CS),p(1,c.pG)],b);const y=(0,u.u1)("ISuggestMemories");(0,d.v)(y,b,1)},18506:(e,t,i)=>{"use strict";i.d(t,{Y:()=>R});var n,o=i(9659),s=i(67792),r=i(14396),a=i(40231),l=i(5091),c=i(20601),d=i(98581),u=i(4117),h=i(4338),g=i(28753),p=i(32828),f=i(18904),m=i(12660),_=i(11086),v=i(85482),b=i(69547),y=i(12847),w=i(10695),C=i(50322),S=i(74706),k=i(82397),x=i(31554),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t){return function(i,n){t(i,n,e)}};class T{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&((n.endColumn===i.column||n.startColumn+1===i.column)&&!!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}function I(e,t,i){if(!Boolean(t.getContextKeyValue(S.p.inlineSuggestionVisible.key)))return!0;const n=t.getContextKeyValue(S.p.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(62).suppressSuggestions}function D(e,t,i){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const n=t.getContextKeyValue(S.p.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(62).suppressSuggestions}let R=n=class{constructor(e,t,i,n,s,r,c,u,h){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=r,this._configurationService=c,this._languageFeaturesService=u,this._envService=h,this._toDispose=new l.Cm,this._triggerCharacterListener=new l.Cm,this._triggerQuickSuggest=new o.pc,this._triggerState=void 0,this._completionDisposables=new l.Cm,this._onDidCancel=new a.vl,this._onDidTrigger=new a.vl,this._onDidSuggest=new a.vl,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new d.L(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let g=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{g=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{g=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{g||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{g||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){(0,l.AS)(this._triggerCharacterListener),(0,l.AS)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(92)||!this._editor.hasModel()||!this._editor.getOption(122))return;const e=new Map;for(const t of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);if(!n){n=new Set;const t=(0,b.f3)();t&&n.add(t),e.set(i,n)}n.add(t)}const t=t=>{if(!D(this._editor,this._contextKeyService,this._configurationService))return;if(T.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition(),i=this._editor.getModel();t=i.getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";(0,c.LJ)(t.charCodeAt(t.length-1))?(0,c.pc)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const n=e.get(i);if(n){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())n.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:i,retrigger:Boolean(this._completionModel),clipboardText:this._completionModel?.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),this._requestToken?.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){b.r3.isAllOff(this._editor.getOption(90))||this._editor.getOption(119).snippetsPreventQuickSuggestions&&k.O.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!T.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(90);if(!b.r3.isAllOff(i)){if(!b.r3.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==b.r3.valueFor(i,o))return}I(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(91)))}_refilterCompletionItems(){(0,C.j)(this._editor.hasModel()),(0,C.j)(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new T(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=new T(t,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=i;let o={triggerKind:e.triggerKind??0};e.triggerCharacter&&(o={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new s.Qi;const a=this._editor.getOption(113);let l=1;switch(a){case"top":l=0;break;case"bottom":l=2;break}const{itemKind:c,showDeprecated:d}=n.createSuggestFilter(this._editor),u=new b.l1(l,e.completionOptions?.kindFilter??c,e.completionOptions?.providerFilter,e.completionOptions?.providerItemsToReuse,d),g=h.S.create(this._editorWorkerService,this._editor),p=(0,b.aR)(this._languageFeaturesService.completionProvider,t,this._editor.getPosition(),u,o,this._requestToken.token);Promise.all([p,g]).then((async([t,i])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let n=e?.clipboardText;if(!n&&t.needsClipboard&&(n=await this._clipboardService.readText()),void 0===this._triggerState)return;const o=this._editor.getModel(),s=new T(o,this._editor.getPosition(),e),r={...w.Nd.default,firstMatchCanBeWeak:!this._editor.getOption(119).matchOnWordStartOnly};if(this._completionModel=new v.C(t.items,this._context.column,{leadingLineContent:s.leadingLineContent,characterCountDelta:s.column-this._context.column},i,this._editor.getOption(119),this._editor.getOption(113),r,n),this._completionDisposables.add(t.disposable),this._onNewContext(s),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)})).catch(r.dz)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static createSuggestFilter(e){const t=new Set,i=e.getOption(113);"none"===i&&t.add(27);const n=e.getOption(119);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,c.UU)(e.leadingLineContent)===(0,c.UU)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){const e=T.shouldAutoTrigger(this._editor);if(e&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=T.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};R=n=E([L(1,u.IEditorWorkerService),L(2,g.h),L(3,_.k),L(4,m.rr),L(5,f.fN),L(6,p.pG),L(7,y.ILanguageFeaturesService),L(8,x.k)],R)},4338:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});var n=i(85053),o=i(8690),s=i(7205);class r{static{this.None=new class extends r{distance(){return 0}}}static async create(e,t){if(!t.getOption(119).localityBonus)return r.None;if(!t.hasModel())return r.None;const i=t.getModel(),a=t.getPosition();if(!e.canComputeWordRanges(i.uri))return r.None;const[l]=await(new s.n).provideSelectionRanges(i,[a]);if(0===l.length)return r.None;const c=await e.computeWordRanges(i.uri,l[0].range);if(!c)return r.None;const d=i.getWordUntilPosition(a);return delete c[d.word],new class extends r{distance(e,i){if(!a.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const s="string"===typeof i.label?i.label:i.label.label,r=c[s];if((0,n.Ct)(r))return 2<<20;const d=(0,n.El)(r,o.Q.fromPositions(e),o.Q.compareRangesUsingStarts),u=d>=0?r[d]:r[Math.max(0,~d-1)];let h=l.length;for(const e of l){if(!o.Q.containsRange(e.range,u))break;h-=1}return h}}}}},94423:(e,t,i)=>{"use strict";var n=i(41337),o=i(66344);(0,o.x1A)("symbolIcon.arrayForeground",o.CU6,(0,n.kg)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.booleanForeground",o.CU6,(0,n.kg)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.colorForeground",o.CU6,(0,n.kg)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.constantForeground",o.CU6,(0,n.kg)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.fileForeground",o.CU6,(0,n.kg)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.folderForeground",o.CU6,(0,n.kg)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.keyForeground",o.CU6,(0,n.kg)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.keywordForeground",o.CU6,(0,n.kg)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.moduleForeground",o.CU6,(0,n.kg)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.namespaceForeground",o.CU6,(0,n.kg)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.nullForeground",o.CU6,(0,n.kg)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.numberForeground",o.CU6,(0,n.kg)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.objectForeground",o.CU6,(0,n.kg)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.operatorForeground",o.CU6,(0,n.kg)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.packageForeground",o.CU6,(0,n.kg)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.propertyForeground",o.CU6,(0,n.kg)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.referenceForeground",o.CU6,(0,n.kg)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.snippetForeground",o.CU6,(0,n.kg)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.stringForeground",o.CU6,(0,n.kg)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.structForeground",o.CU6,(0,n.kg)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.textForeground",o.CU6,(0,n.kg)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.typeParameterForeground",o.CU6,(0,n.kg)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.unitForeground",o.CU6,(0,n.kg)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,o.x1A)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))},29587:(e,t,i)=>{"use strict";var n=i(19950),o=i(3692),s=i(41337),r=i(6330);class a extends r.L{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:a.ID,title:s.aS({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:s.aS("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const e=o.M.getTabFocusMode(),t=!e;o.M.setTabFocusMode(t),t?(0,n.xE)(s.kg("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,n.xE)(s.kg("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}(0,r.ug)(a)},47641:(e,t,i)=>{"use strict";var n=i(84240),o=i(16259),s=i(41337);class r extends o.ks{constructor(){super({id:"editor.action.forceRetokenize",label:s.kg("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const o=new n.W;i.tokenization.forceTokenization(i.getLineCount()),o.stop(),console.log(`tokenization took ${o.elapsed()}`)}}(0,o.Fl)(r)},92461:(e,t,i)=>{"use strict";var n=i(9659),o=i(25923),s=i(42325),r=i(5091),a=i(25160),l=i(20601),c=i(16259),d=i(35011),u=i(35037),h=i(97412),g=i(4117),p=i(14573),f=i(10049),m=i(38570),_=i(76035),v=i(2150),b=i(48038),y=i(55664),w=i(36511),C=i(87778),S=i(49822),k=i(68389),x=i(25201),E=i(40231),L=i(10170),T=i(96371),I=i(41187),D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};let N=class extends r.jG{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,o){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=(0,v.BC)(e,(0,v.$)("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??(0,T.nZ)("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const s=this._register(new S.f(this.el,"click")),r=this._register(new S.f(this.el,"keypress")),a=E.Jh.chain(r.event,(e=>e.map((e=>new k.Z(e))).filter((e=>3===e.keyCode)))),l=this._register(new S.f(this.el,x.B.Tap)).event;this._register(x.q.addTarget(this.el));const c=E.Jh.any(s.event,a,l);this._register(c((e=>{this.enabled&&(v.fs.stop(e,!0),i?.opener?i.opener(this._link.href):o.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};N=D([R(3,I.TN),R(4,L.C)],N);var A=i(48401),O=i(23740),P=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},M=function(e,t){return function(i,n){t(i,n,e)}};const F=26;let B=class extends r.jG{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(W))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,F)}};B=P([M(1,C._Y)],B);let W=class extends r.jG{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(w.T,{}),this.element=(0,v.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"===typeof e.message?e.message:void 0}getBannerMessage(e){if("string"===typeof e){const t=(0,v.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,v.w_)(this.element)}show(e){(0,v.w_)(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=(0,v.BC)(this.element,(0,v.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,v.$)(`div${O.L.asCSSSelector(e.icon)}`));const n=(0,v.BC)(this.element,(0,v.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,v.BC)(this.element,(0,v.$)("div.message-actions-container")),e.actions)for(const t of e.actions)this._register(this.instantiationService.createInstance(N,this.messageActionsContainer,{...t,tabIndex:-1},{}));const o=(0,v.BC)(this.element,(0,v.$)("div.action-container"));this.actionBar=this._register(new b.E(o)),this.actionBar.push(this._register(new y.rc("banner.close","Close Banner",O.L.asClassName(A.$_),!0,(()=>{"function"===typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};W=P([M(0,C._Y)],W);var H=i(41337),V=i(32828),j=i(3874),z=i(17602),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$=function(e,t){return function(i,n){t(i,n,e)}};const q=(0,A.pU)("extensions-warning-message",o.W.warning,H.kg("warningIcon","Icon shown with a warning message in the extensions editor."));let K=class extends r.jG{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:H.kg("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new le};else if(e.ambiguousCharacterCount>=t)i={message:H.kg("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new re};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:H.kg("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new ae}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:q,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(B,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(126),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())}))),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=G(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>{if("_os"===e){const e=(new Intl.NumberFormat).resolvedOptions().locale;return e}return"_vscode"===e?a.BH:e}))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new Q(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new Y(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};function G(e,t){return{nonBasicASCII:t.nonBasicASCII===d.XR?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===d.XR?!e:t.includeComments,includeStrings:t.includeStrings===d.XR?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}K=U([$(1,g.IEditorWorkerService),$(2,z.L),$(3,C._Y)],K);let Q=class extends r.jG{constructor(e,t,i,o){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=o,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.uC((()=>this._update()),250)),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:ne.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!(0,f.GN)(t,e))return null;const i=t.getValueInRange(e.range);return{reason:ie(i,this._options),inComment:(0,f.a6)(t,e),inString:(0,f.wc)(t,e)}}};Q=U([$(3,g.IEditorWorkerService)],Q);class Y extends r.jG{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.uC((()=>this._update()),250)),this._register(this._editor.onDidLayoutChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidScrollChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeHiddenAreas((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const t of e){const e=h.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,t);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const e of i.ranges)t.push({range:e,options:ne.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,f.GN)(t,e)?{reason:ie(i,this._options),inComment:(0,f.a6)(t,e),inString:(0,f.wc)(t,e)}:null}}const Z=H.kg("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let X=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(K.ID);if(!n)return[];const o=[],r=new Set;let a=300;for(const e of t){const t=n.getDecorationInfo(e);if(!t)continue;const c=i.getValueInRange(e.range),d=c.codePointAt(0),u=ee(d);let h;switch(t.reason.kind){case 0:h=(0,l.aC)(t.reason.confusableWith)?H.kg("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",u,ee(t.reason.confusableWith.codePointAt(0))):H.kg("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",u,ee(t.reason.confusableWith.codePointAt(0)));break;case 1:h=H.kg("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",u);break;case 2:h=H.kg("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",u);break}if(r.has(h))continue;r.add(h);const g={codePoint:d,reason:t.reason,inComment:t.inComment,inString:t.inString},p=H.kg("unicodeHighlight.adjustSettings","Adjust settings"),f=`command:${ce.ID}?${encodeURIComponent(JSON.stringify(g))}`,m=new s.Bc("",!0).appendMarkdown(h).appendText(" ").appendLink(f,p,Z);o.push(new _.eH(this,e.range,[m],!1,a++))}return o}renderHoverParts(e,t){return(0,_.fm)(e,t,this._editor,this._languageService,this._openerService)}};function J(e){return`U+${e.toString(16).padStart(4,"0")}`}function ee(e){let t=`\`${J(e)}\``;return l.y_.isInvisibleCharacter(e)||(t+=` "${te(e)}"`),t}function te(e){return 96===e?"`` ` ``":"`"+String.fromCodePoint(e)+"`"}function ie(e,t){return h.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(e,t)}X=U([$(1,p.L),$(2,L.C)],X);class ne{constructor(){this.map=new Map}static{this.instance=new ne}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=u.kI.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}class oe extends c.ks{constructor(){super({id:re.ID,label:H.kg("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.includeComments,!1,2)}}class se extends c.ks{constructor(){super({id:re.ID,label:H.kg("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.includeStrings,!1,2)}}class re extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:re.ID,label:H.kg("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.ambiguousCharacters,!1,2)}}class ae extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:ae.ID,label:H.kg("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.invisibleCharacters,!1,2)}}class le extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:le.ID,label:H.kg("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=H.kg("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,i){const n=e?.get(V.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.nonBasicASCII,!1,2)}}class ce extends c.ks{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:ce.ID,label:H.kg("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,i){const{codePoint:n,reason:o,inString:s,inComment:r}=i,a=String.fromCodePoint(n),c=e.get(j.GK),d=e.get(V.pG);function u(e){return l.y_.isInvisibleCharacter(e)?H.kg("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",J(e)):H.kg("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${J(e)} "${a}"`)}const h=[];if(0===o.kind)for(const e of o.notAmbiguousInLocales)h.push({label:H.kg("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',e),run:async()=>{ue(d,[e])}});if(h.push({label:u(n),run:()=>de(d,[n])}),r){const e=new oe;h.push({label:e.label,run:async()=>e.runAction(d)})}else if(s){const e=new se;h.push({label:e.label,run:async()=>e.runAction(d)})}if(0===o.kind){const e=new re;h.push({label:e.label,run:async()=>e.runAction(d)})}else if(1===o.kind){const e=new ae;h.push({label:e.label,run:async()=>e.runAction(d)})}else if(2===o.kind){const e=new le;h.push({label:e.label,run:async()=>e.runAction(d)})}else he(o);const g=await c.pick(h,{title:Z});g&&await g.run()}}async function de(e,t){const i=e.getValue(d.Of.allowedCharacters);let n;n="object"===typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;await e.updateValue(d.Of.allowedCharacters,n,2)}async function ue(e,t){const i=e.inspect(d.Of.allowedLocales).user?.value;let n;n="object"===typeof i&&i?Object.assign({},i):{};for(const e of t)n[e]=!0;await e.updateValue(d.Of.allowedLocales,n,2)}function he(e){throw new Error(`Unexpected value: ${e}`)}(0,c.Fl)(re),(0,c.Fl)(ae),(0,c.Fl)(le),(0,c.Fl)(ce),(0,c.HW)(K.ID,K,1),m.B2.register(X)},11501:(e,t,i)=>{"use strict";var n=i(5091),o=i(84366),s=i(16259),r=i(94728),a=i(41337),l=i(63466),c=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},d=function(e,t){return function(i,n){t(i,n,e)}};const u="ignoreUnusualLineTerminators";function h(e,t,i){e.setModelProperty(t.uri,u,i)}function g(e,t){return e.getModelProperty(t.uri,u)}let p=class extends n.jG{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=g(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(92))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:a.kg("unusualLineTerminators.title","Unusual Line Terminators"),message:a.kg("unusualLineTerminators.message","Detected unusual line terminators"),detail:a.kg("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,o.P8)(e.uri)),primaryButton:a.kg({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:a.kg("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):h(this._codeEditorService,e,!0)}};p=c([d(1,l.X),d(2,r.T)],p),(0,s.HW)(p.ID,p,1)},12321:(e,t,i)=>{"use strict";i.d(t,{P:()=>b,v:()=>y});var n=i(9322),o=i(35037),s=i(35350),r=i(41337),a=i(66344),l=i(15911);const c=(0,a.x1A)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},r.kg("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,a.x1A)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},r.kg("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,a.x1A)("editor.wordHighlightTextBackground",c,r.kg("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const d=(0,a.x1A)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:a.buw,hcLight:a.buw},r.kg("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));(0,a.x1A)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:a.buw,hcLight:a.buw},r.kg("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),(0,a.x1A)("editor.wordHighlightTextBorder",d,r.kg("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const u=(0,a.x1A)("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",r.kg("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),h=(0,a.x1A)("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",r.kg("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),g=(0,a.x1A)("editorOverviewRuler.wordHighlightTextForeground",a.z5H,r.kg("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),p=o.kI.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,l.Yf)(h),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),f=o.kI.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,l.Yf)(g),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),m=o.kI.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,l.Yf)(a.z5H),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),_=o.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),v=o.kI.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,l.Yf)(u),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}});function b(e){return e===s.Kb.Write?p:e===s.Kb.Text?f:v}function y(e){return e?_:m}(0,l.zy)(((e,t)=>{const i=e.getColor(a.QwA);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}))},95168:(e,t,i)=>{"use strict";var n=i(41337),o=i(19950),s=i(9659),r=i(67792),a=i(14396),l=i(5091),c=i(55413),d=i(16259),u=i(94728),h=i(8690),g=i(57479),p=i(9322),f=i(12847),m=i(12321),_=i(18904),v=i(6657),b=i(21553),y=i(35784),w=i(84366),C=i(60939),S=i(35350),k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t){return function(i,n){t(i,n,e)}};class E{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){const n=[],o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(n);if(e.isDisposed())return;const s=e.findMatches(o.word,!0,!1,!0,C.J3,!1);return s.map((e=>({range:e.range,kind:S.Kb.Text})))}provideMultiDocumentHighlights(e,t,i,n){const o=new b.fT,s=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!s)return Promise.resolve(o);for(const t of[e,...i]){if(t.isDisposed())continue;const e=t.findMatches(s.word,!0,!1,!0,C.J3,!1),i=e.map((e=>({range:e.range,kind:S.Kb.Text})));i&&o.set(t.uri,i)}return o}}let L=class extends l.jG{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new E)),this._register(e.multiDocumentHighlightProvider.register("*",new E))}};L=k([x(0,f.ILanguageFeaturesService)],L);var T,I,D=i(36285),R=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};const A=new _.N1("hasWordHighlights",!1);function O(e,t,i,n){const o=e.ordered(t);return(0,s.$1)(o.map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,a.M_))),(e=>void 0!==e&&null!==e)).then((e=>{if(e){const i=new b.fT;return i.set(t.uri,e),i}return new b.fT}))}function P(e,t,i,n,o,r){const l=e.ordered(t);return(0,s.$1)(l.map((e=>()=>{const n=r.filter((e=>(0,p.vd)(e))).filter((t=>(0,y.f)(e.selector,t.uri,t.getLanguageId(),!0,void 0,void 0)>0));return Promise.resolve(e.provideMultiDocumentHighlights(t,i,n,o)).then(void 0,a.M_)})),(e=>void 0!==e&&null!==e))}class M{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,s.SS)((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new h.Q(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,s=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let e=0,t=i.length;!a&&e=s&&(a=!0)}return a}cancel(){this.result.cancel()}}class F extends M{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return O(this._providers,e,t.getPosition(),n).then((e=>e||new b.fT))}}class B extends M{constructor(e,t,i,n,o){super(e,t,i),this._providers=n,this._otherModels=o}_compute(e,t,i,n){return P(this._providers,e,t.getPosition(),i,n,this._otherModels).then((e=>e||new b.fT))}}function W(e,t,i,n,o){return new F(t,i,o,e)}function H(e,t,i,n,o,s){return new B(t,i,o,e,s)}(0,d.ke)("_executeDocumentHighlights",(async(e,t,i)=>{const n=e.get(f.ILanguageFeaturesService),o=await O(n.documentHighlightProvider,t,i,r.XO.None);return o?.get(t.uri)}));let V=class{static{T=this}static{this.storedDecorationIDs=new b.fT}static{this.query=null}constructor(e,t,i,n,o){this.toUnhook=new l.Cm,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new b.fT,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new s.ve(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=o,this._hasWordHighlights=A.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlight&&this.runDelayer.trigger((()=>{this._onPositionChanged(e)}))}))),this.toUnhook.add(e.onDidFocusEditorText((e=>{"off"!==this.occurrencesHighlight&&(this.workerRequest||this.runDelayer.trigger((()=>{this._run()})))}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{(0,v.v$)(this.model.uri,"output")||this._stopAll()}))),this.toUnhook.add(e.onDidChangeModel((e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():T.query&&this._run()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(81);if(this.occurrencesHighlight!==t)switch(this.occurrencesHighlight=t,t){case"off":this._stopAll();break;case"singleFile":this._stopAll(T.query?.modelInfo?.model);break;case"multiFile":T.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",t);break}}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,T.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){"off"!==this.occurrencesHighlight&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(h.Q.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){const s=this.editor.getModel().getLineContent(n.startLineNumber);(0,o.xE)(`${s}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){const s=this.editor.getModel().getLineContent(n.startLineNumber);(0,o.xE)(`${s}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=T.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),T.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const n of t){if(!n.hasModel()||(0,w.n4)(n.getModel().uri,e?.uri))continue;const t=T.storedDecorationIDs.get(n.getModel().uri);if(!t)continue;n.removeDecorations(t),i.push(n.getModel().uri);const o=j.get(n);o?.wordHighlighter&&(o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter.workerRequest=null,o.wordHighlighter._hasWordHighlights.set(!1)))}for(const e of i)T.storedDecorationIDs.delete(e)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==v.ny.vscodeNotebookCell&&T.query?.modelInfo?.model.uri.scheme!==v.ny.vscodeNotebookCell?(T.query=null,this._run()):T.query?.modelInfo&&(T.query.modelInfo=null)),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){"off"!==this.occurrencesHighlight&&(3===e.reason||this.editor.getModel()?.uri.scheme===v.ny.vscodeNotebookCell)?this._run():this._stopAll()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];const t=e.uri.scheme===v.ny.vscodeNotebookCell;if(t){const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){const i=n.getModel();i&&i!==e&&i.uri.scheme===v.ny.vscodeNotebookCell&&t.push(i)}return t}const i=[],n=this.codeEditorService.listCodeEditors();for(const t of n){if(!(0,c.Np)(t))continue;const n=t.getModel();n&&(e===n.modified&&i.push(n.modified))}if(i.length)return i;if("singleFile"===this.occurrencesHighlight)return[];for(const t of n){const n=t.getModel(),o=n&&n!==e;o&&i.push(n)}return i}_run(e){let t;const i=this.editor.hasTextFocus();if(i){const e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber)return T.query=null,void this._stopAll();const i=e.startColumn,n=e.endColumn,o=this._getWord();if(!o||o.startColumn>i||o.endColumn{t===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations())}),a.dz)}}computeWithModel(e,t,i,n){return n.length?H(this.multiDocumentProviders,e,t,i,this.editor.getOption(132),n):W(this.providers,e,t,i,this.editor.getOption(132))}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=this.codeEditorService.listCodeEditors();for(const t of e){const e=j.get(t);if(!e)continue;const i=[],n=t.getModel()?.uri;if(n&&this.workerRequestValue.has(n)){const o=T.storedDecorationIDs.get(n),s=this.workerRequestValue.get(n);if(s)for(const e of s)e.range&&i.push({range:e.range,options:(0,m.P)(e.kind)});let r=[];t.changeDecorations((e=>{r=e.deltaDecorations(o??[],i)})),T.storedDecorationIDs=T.storedDecorationIDs.set(n,r),i.length>0&&(e.wordHighlighter?.decorations.set(i),e.wordHighlighter?._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};V=T=R([N(4,u.T)],V);let j=class extends l.jG{static{I=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(I.ID)}constructor(e,t,i,n){super(),this._wordHighlighter=null;const o=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new V(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,n))};this._register(e.onDidChangeModel((e=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),o()}))),o()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!(!this._wordHighlighter||!this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};j=I=R([N(1,_.fN),N(2,f.ILanguageFeaturesService),N(3,u.T)],j);class z extends d.ks{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=j.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class U extends z{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:n.kg("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:A,kbOpts:{kbExpr:g.R.editorTextFocus,primary:65,weight:100}})}}class $ extends z{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:n.kg("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:A,kbOpts:{kbExpr:g.R.editorTextFocus,primary:1089,weight:100}})}}class q extends d.ks{constructor(){super({id:"editor.action.wordHighlight.trigger",label:n.kg("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:g.R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=j.get(t);n&&n.restoreViewState(!0)}}(0,d.HW)(j.ID,j,0),(0,d.Fl)(U),(0,d.Fl)($),(0,d.Fl)(q),(0,D.x)(L)},23479:(e,t,i)=>{"use strict";i.d(t,{Jk:()=>v,R7:()=>F});var n=i(16259),o=i(50793),s=i(35011),r=i(332),a=i(51232),l=i(90385),c=i(36788),d=i(8690),u=i(98581),h=i(57479),g=i(50395),p=i(41337),f=i(17300),m=i(18904),_=i(5045);class v extends n.DX{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.i)(t.getOption(132),t.getOption(131)),o=t.getModel(),s=t.getSelections(),a=s.length>1,d=s.map((e=>{const t=new c.y(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType,a);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,d.map((e=>r.MF.fromModelSelection(e)))),1===d.length){const e=new c.y(d[0].positionLineNumber,d[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new u.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new u.L(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends v{_move(e,t,i,n,o){return a.z.moveWordLeft(e,t,i,n,o)}}class y extends v{_move(e,t,i,n,o){return a.z.moveWordRight(e,t,i,n)}}class w extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class C extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class S extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:m.M$.and(h.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class k extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class x extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class E extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:m.M$.and(h.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class L extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,o){return super._move((0,l.i)(s.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,o)}}class T extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,o){return super._move((0,l.i)(s.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,o)}}class I extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class D extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:m.M$.and(h.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class R extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class N extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class A extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:m.M$.and(h.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class O extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class P extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,o){return super._move((0,l.i)(s.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,o)}}class M extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,o){return super._move((0,l.i)(s.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,o)}}class F extends n.DX{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(g.JZ);if(!t.hasModel())return;const s=(0,l.i)(t.getOption(132),t.getOption(131)),r=t.getModel(),a=t.getSelections(),c=t.getOption(6),d=t.getOption(11),u=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),p=a.map((e=>{const i=this._delete({wordSeparators:s,model:r,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:c,autoClosingQuotes:d,autoClosingPairs:u,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new o.iu(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,p),t.pushUndoStop()}}class B extends F{_delete(e,t){const i=a.z.deleteWordLeft(e,t);return i||new d.Q(1,1,1,1)}}class W extends F{_delete(e,t){const i=a.z.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new d.Q(n,o,n,o)}}class H extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:h.R.writable})}}class V extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:h.R.writable})}}class j extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:h.R.writable,kbOpts:{kbExpr:h.R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class z extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:h.R.writable})}}class U extends W{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:h.R.writable})}}class $ extends W{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:h.R.writable,kbOpts:{kbExpr:h.R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class q extends n.ks{constructor(){super({id:"deleteInsideWord",precondition:h.R.writable,label:p.kg("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.i)(t.getOption(132),t.getOption(131)),s=t.getModel(),r=t.getSelections(),c=r.map((e=>{const t=a.z.deleteInsideWord(n,s,e);return new o.iu(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}(0,n.E_)(new w),(0,n.E_)(new C),(0,n.E_)(new S),(0,n.E_)(new k),(0,n.E_)(new x),(0,n.E_)(new E),(0,n.E_)(new I),(0,n.E_)(new D),(0,n.E_)(new R),(0,n.E_)(new N),(0,n.E_)(new A),(0,n.E_)(new O),(0,n.E_)(new L),(0,n.E_)(new T),(0,n.E_)(new P),(0,n.E_)(new M),(0,n.E_)(new H),(0,n.E_)(new V),(0,n.E_)(new j),(0,n.E_)(new z),(0,n.E_)(new U),(0,n.E_)(new $),(0,n.Fl)(q)},18469:(e,t,i)=>{"use strict";var n=i(16259),o=i(51232),s=i(8690),r=i(57479),a=i(23479),l=i(72786);class c extends a.R7{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:r.R.writable,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=o.c.deleteWordPartLeft(e);return i||new s.Q(1,1,1,1)}}class d extends a.R7{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:r.R.writable,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=o.c.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),r=e.model.getLineMaxColumn(n);return new s.Q(n,r,n,r)}}class u extends a.Jk{_move(e,t,i,n,s){return o.c.moveWordPartLeft(e,t,i,s)}}class h extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}l.w.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class g extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}l.w.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class p extends a.Jk{_move(e,t,i,n,s){return o.c.moveWordPartRight(e,t,i)}}class f extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class m extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,n.E_)(new c),(0,n.E_)(new d),(0,n.E_)(new h),(0,n.E_)(new g),(0,n.E_)(new f),(0,n.E_)(new m)},87715:(e,t,i)=>{"use strict";var n=i(2150),o=i(5091),s=i(16259),r=i(25160);class a extends o.jG{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,r.un&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(92);!this.widget&&e?this.widget=new l(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}class l extends o.jG{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(n.ko(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(n.ko(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return l.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}(0,s.HW)(a.ID,a,3)},54357:(e,t,i)=>{"use strict";var n,o=i(2150),s=i(85476),r=i(5091),a=i(16259),l=i(35350),c=i(4577),d=i(58403),u=i(14573),h=i(55643),g=i(340),p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends r.jG{static{n=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(l.dG.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new y(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};m=n=p([f(1,h.L),f(2,u.L)],m);class _ extends a.ks{constructor(){super({id:"editor.action.inspectTokens",label:g.YN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=m.get(t);i?.launch()}}function v(e){let t="";for(let i=0,n=e.length;id.r3,tokenize:(e,i,n)=>(0,d.$H)(t,n),tokenizeEncoded:(e,t,i)=>(0,d.Lh)(n,i)}}class y extends r.jG{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=b(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return y._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let n=t.tokens1.length-1;n>=0;n--){const o=t.tokens1[n];if(e.column-1>=o.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}const r=this._model.getLineContent(e.lineNumber);let a="";if(i{"use strict";var n=i(16374),o=i(60018),s=i(340),r=i(94728),a=i(74529),l=i(68254),c=i(28438),d=i(14396),u=i(10695),h=i(90702),g=i(5091),p=i(21553);function f(e){const t=new Map;for(const i of e)t.set(i,(t.get(i)??0)+1);return t}class m{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,o=[];for(const[e,s]of this.documents){if(t.isCancellationRequested)return[];for(const t of s.chunks){const s=this.computeSimilarityScore(t,i,n);s>0&&o.push({key:e,score:s})}}return o}static termFrequencies(e){return f(m.splitTerms(e))}static*splitTerms(e){const t=e=>e.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(const i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const e=[];for(const i of t.textChunks){const t=m.termFrequencies(i);for(const e of t.keys())this.chunkOccurrences.set(e,(this.chunkOccurrences.get(e)??0)+1);e.push({text:i,tf:t})}this.chunkCount+=e.length,this.documents.set(t.key,{chunks:e})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const e of t.chunks)for(const t of e.tf.keys()){const e=this.chunkOccurrences.get(t);if("number"===typeof e){const i=e-1;i<=0?this.chunkOccurrences.delete(t):this.chunkOccurrences.set(t,i)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[o,s]of Object.entries(t)){const t=e.tf.get(o);if(!t)continue;let r=i.get(o);"number"!==typeof r&&(r=this.computeIdf(o),i.set(o,r));const a=t*r;n+=a*s}return n}computeEmbedding(e){const t=m.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}function _(e){const t=e.slice(0);t.sort(((e,t)=>t.score-e.score));const i=t[0]?.score??0;if(i>0)for(const e of t)e.score/=i;return t}var v,b=i(41337),y=i(72786),w=i(32828),C=i(63466),S=i(87778),k=i(13046),x=i(12660),E=i(9659),L=i(67792),T=i(50322);function I(e){const t=e;return Array.isArray(t.items)}function D(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(function(e){e[e["NO_ACTION"]=0]="NO_ACTION",e[e["CLOSE_PICKER"]=1]="CLOSE_PICKER",e[e["REFRESH_PICKER"]=2]="REFRESH_PICKER",e[e["REMOVE_ITEM"]=3]="REMOVE_ITEM"})(v||(v={}));class R extends g.jG{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){const n=new g.Cm;let o;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new g.HE),r=async()=>{const n=s.value=new g.Cm;o?.dispose(!0),e.busy=!1,o=new L.Qi(t);const r=o.token;let a=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(a=a.trim());const l=this._getPicks(a,n,r,i),c=(t,i)=>{let n,o;if(I(t)?(n=t.items,o=t.active):n=t,0===n.length){if(i)return!1;(a.length>0||e.hideInput)&&this.options?.noResultsPick&&(n=(0,T.Tn)(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=n,o&&(e.activeItems=[o]),!0},d=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{"number"===typeof t.mergeDelay&&(await(0,E.wR)(t.mergeDelay),r.isCancellationRequested)||n||(i=c(t.picks,!0))})(),(async()=>{e.busy=!0;try{const n=await t.additionalPicks;if(r.isCancellationRequested)return;let o,s,a,l;if(I(t.picks)?(o=t.picks.items,s=t.picks.active):o=t.picks,I(n)?(a=n.items,l=n.active):a=n,a.length>0||!i){let t;if(!s&&!l){const i=e.activeItems[0];i&&-1!==o.indexOf(i)&&(t=i)}c({items:[...o,...a],active:s||l||t})}}finally{r.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===l);else if(D(l))await d(l);else if(l instanceof Promise){e.busy=!0;try{const e=await l;if(r.isCancellationRequested)return;D(e)?await d(e):c(e)}finally{r.isCancellationRequested||(e.busy=!1)}}else c(l)};n.add(e.onDidChangeValue((()=>r()))),r(),n.add(e.onDidAccept((t=>{if(i?.handleAccept)return t.inBackground||e.hide(),void i.handleAccept?.(e.activeItems[0]);const[n]=e.selectedItems;"function"===typeof n?.accept&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))})));const a=async(i,n)=>{if("function"!==typeof n.trigger)return;const o=n.buttons?.indexOf(i)??-1;if(o>=0){const i=n.trigger(o,e.keyMods),s="number"===typeof i?i:await i;if(t.isCancellationRequested)return;switch(s){case v.NO_ACTION:break;case v.CLOSE_PICKER:e.hide();break;case v.REFRESH_PICKER:r();break;case v.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),o=e.activeItems.filter((e=>e!==n[0])),s=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,o&&(e.activeItems=o),e.keepScrollPosition=s}break}}}};return n.add(e.onDidTriggerItemButton((({button:e,item:t})=>a(e,t)))),n.add(e.onDidTriggerSeparatorButton((({button:e,separator:t})=>a(e,t)))),n}}var N,A,O=i(94216),P=i(11086),M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},F=function(e,t){return function(i,n){t(i,n,e)}};let B=class extends R{static{N=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=(0,u.or)(u.WP,u.J1,u.Tt)}constructor(e,t,i,n,o,s){super(N.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(W)),this.options=e}async _getPicks(e,t,i,n){const o=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const s=(0,h.P)((()=>{const t=new m;t.updateDocuments(o.map((e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]}))));const n=t.calculateScores(e,i);return _(n).filter((e=>e.score>N.TFIDF_THRESHOLD)).slice(0,N.TFIDF_MAX_RESULTS)})),r=[];for(const t of o){const n=N.WORD_FILTER(e,t.label)??void 0,o=t.commandAlias?N.WORD_FILTER(e,t.commandAlias)??void 0:void 0;if(n||o)t.highlights={label:n,detail:this.options.showAlias?o:void 0},r.push(t);else if(e===t.commandId)r.push(t);else if(e.length>=3){const e=s();if(i.isCancellationRequested)return[];const n=e.find((e=>e.key===t.commandId));n&&(t.tfIdfScore=n.score,r.push(t))}}const a=new Map;for(const e of r){const t=a.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):a.set(e.label,e)}r.sort(((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return-1;const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const l=[];let c=!1,d=!0,u=!!this.options.suggestedCommandIds;for(let e=0;e{const t=await this.getAdditionalCommandPicks(o,r,e,i);if(i.isCancellationRequested)return[];const s=t.map((e=>this.toCommandPick(e,n)));return d&&"separator"!==s[0]?.type&&s.unshift({type:"separator",label:(0,b.kg)("suggested","similar commands")}),s})()}:l}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,b.kg)("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(t){(0,d.MB)(t)||this.dialogService.error((0,b.kg)("canNotRun","Command '{0}' resulted in an error",e.label),(0,c.r)(t))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};B=N=M([F(1,S._Y),F(2,k.b),F(3,y.d),F(4,P.k),F(5,C.X)],B);let W=class extends g.jG{static{A=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>this.updateConfiguration(e)))),this._register(this.storageService.onWillSaveState((e=>{e.reason===O.LP.SHUTDOWN&&this.saveState()})))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=A.getConfiguredCommandHistoryLength(this.configurationService),A.cache&&A.cache.limit!==this.configuredCommandsHistoryLength&&(A.cache.limit=this.configuredCommandsHistoryLength,A.hasChanges=!0))}load(){const e=this.storageService.get(A.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(e){this.logService.error(`[CommandsHistory] invalid data: ${e}`)}const i=A.cache=new p.qK(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}A.counter=this.storageService.getNumber(A.PREF_KEY_COUNTER,0,A.counter)}push(e){A.cache&&(A.cache.set(e,A.counter++),A.hasChanges=!0)}peek(e){return A.cache?.peek(e)}saveState(){if(!A.cache)return;if(!A.hasChanges)return;const e={usesLRU:!0,entries:[]};A.cache.forEach(((t,i)=>e.entries.push({key:i,value:t}))),this.storageService.store(A.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(A.PREF_KEY_COUNTER,A.counter,0,0),A.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const t=e.getValue(),i=t.workbench?.commandPalette?.history;return"number"===typeof i?i:A.DEFAULT_COMMANDS_HISTORY_LENGTH}};W=A=M([F(0,O.CS),F(1,w.pG),F(2,x.rr)],W);class H extends B{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions()){let e;i.metadata?.description&&(e=(0,l.f)(i.metadata.description)?i.metadata.description:{original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:e,label:(0,a.pS)(i.label)||i.id})}return t}}var V=i(16259),j=i(57479),z=i(3874),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends H{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,o,s){super({showAlias:!1},e,i,n,o,s),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};q=U([$(0,S._Y),$(1,r.T),$(2,k.b),$(3,y.d),$(4,P.k),$(5,C.X)],q);class K extends V.ks{static{this.ID="editor.action.quickCommand"}constructor(){super({id:K.ID,label:s.gf.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:j.R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(z.GK).quickAccess.show(q.PREFIX)}}(0,V.Fl)(K),n.O.as(o.Fd.Quickaccess).registerQuickAccessProvider({ctor:q,prefix:q.PREFIX,helpEntries:[{description:s.gf.quickCommandHelp,commandId:K.ID}]})},86853:(e,t,i)=>{"use strict";var n=i(5091),o=i(55413),s=i(24246),r=i(41337);class a extends s.o{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,r.kg)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,n.jG.None}provideWithTextEditor(e,t,i){const s=e.editor,r=new n.Cm;r.add(t.onDidAccept((i=>{const[n]=t.selectedItems;if(n){if(!this.isValidLineNumber(s,n.lineNumber))return;this.gotoLocation(e,{range:this.toRange(n.lineNumber,n.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(s,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(s,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(s,e.lineNumber))return void this.clearDecorations(s);const n=this.toRange(e.lineNumber,e.column);s.revealRangeInCenter(n,0),this.addDecorations(s,n)};l(),r.add(t.onDidChangeValue((()=>l())));const c=(0,o.jA)(s);if(c){const e=c.getOptions(),t=e.get(68);2===t.renderType&&(c.updateOptions({lineNumbers:"on"}),r.add((0,n.s)((()=>c.updateOptions({lineNumbers:"relative"})))))}return r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,r.kg)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,r.kg)("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?(0,r.kg)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):(0,r.kg)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!==typeof t)&&(t>0&&t<=this.lineCount(e))}isValidColumn(e,t,i){if(!i||"number"!==typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}var l=i(16374),c=i(60018),d=i(94728),u=i(340),h=i(40231),g=i(16259),p=i(57479),f=i(3874),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=h.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};v=m([_(0,d.T)],v);class b extends g.ks{static{this.ID="editor.action.gotoLine"}constructor(){super({id:b.ID,label:u.Hw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(f.GK).quickAccess.show(v.PREFIX)}}(0,g.Fl)(b),l.O.as(c.Fd.Quickaccess).registerQuickAccessProvider({ctor:v,prefix:v.PREFIX,helpEntries:[{description:u.Hw.gotoLineActionLabel,commandId:b.ID}]})},2845:(e,t,i)=>{"use strict";i(94423);var n=i(9659),o=i(67792),s=i(25923),r=i(23740),a=i(10695),l=i(52444),c=i(25160),d=i(20601);const u=[void 0,[]];function h(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?g(e,o.values,i,n):p(e,t,i,n)}function g(e,t,i,n){let o=0;const s=[];for(const r of t){const[t,a]=p(e,r,i,n);if("number"!==typeof t)return u;o+=t,s.push(...a)}return[o,f(s)]}function p(e,t,i,n){const o=(0,a.dt)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],(0,a.WJ)(o)]:u}Object.freeze({score:0});function f(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)n&&m(n,e)?(n.start=Math.min(n.start,e.start),n.end=Math.max(n.end,e.end)):(n=e,i.push(e));return i}function m(e,t){return!(e.end=0,r=_(e);let a;const c=e.split(v);if(c.length>1)for(const e of c){const t=_(e),{pathNormalized:i,normalized:n,normalizedLowercase:o}=y(e);n&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:i,normalized:n,normalizedLowercase:o,expectContiguousMatch:t}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function y(e){let t;t=c.uF?e.replace(/\//g,l.Vn):e.replace(/\\/g,l.Vn);const i=(0,d.wB)(t).replace(/\s|"/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function w(e){return Array.isArray(e)?b(e.map((e=>e.original)).join(v)):b(e.original)}var C,S=i(5091),k=i(8690),x=i(35350),E=i(83262),L=i(24246),T=i(41337),I=i(12847),D=i(43654),R=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};let A=class extends L.o{static{C=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,T.kg)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),S.jG.None}provideWithTextEditor(e,t,i,n){const o=e.editor,s=this.getModel(o);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i,n):this.doProvideWithoutEditorSymbols(e,s,t,i):S.jG.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new S.Cm;return this.provideLabelPick(i,(0,T.kg)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>{const s=await this.waitForLanguageSymbolRegistry(t,o);s&&!n.isCancellationRequested&&o.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new n.Zv,o=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(o.dispose(),i.complete(!0))})));return t.add((0,S.s)((()=>i.complete(!1)))),i.p}doProvideWithEditorSymbols(e,t,i,n,s){const r=e.editor,a=new S.Cm;a.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),s?.handleAccept?.(n),t.inBackground||i.hide())}))),a.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const l=this.getDocumentSymbols(t,n);let c;const d=async e=>{c?.dispose(!0),i.busy=!1,c=new o.Qi(n),i.busy=!0;try{const o=b(i.value.substr(C.PREFIX.length).trim()),s=await this.doGetSymbolPicks(l,o,void 0,c.token,t);if(n.isCancellationRequested)return;if(s.length>0){if(i.items=s,e&&0===o.original.length){const t=(0,D.Uk)(s,(t=>Boolean("separator"!==t.type&&t.range&&k.Q.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else o.original.length>0?this.provideLabelPick(i,(0,T.kg)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,T.kg)("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue((()=>d(void 0)))),d(r.getSelection()?.getPosition()),a.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(r.revealRangeInCenter(e.range.selection,0),this.addDecorations(r,e.range.decoration))}))),a}async doGetSymbolPicks(e,t,i,n,o){const a=await e;if(n.isCancellationRequested)return[];const l=0===t.original.indexOf(C.SCOPE_PREFIX),c=l?1:0;let u,g,p;t.values&&t.values.length>1?(u=w(t.values[0]),g=w(t.values.slice(1))):u=t;const f=this.options?.openSideBySideDirection?.();f&&(p=[{iconClass:"right"===f?r.L.asClassName(s.W.splitHorizontal):r.L.asClassName(s.W.splitVertical),tooltip:"right"===f?(0,T.kg)("openToSide","Open to the Side"):(0,T.kg)("openToBottom","Open to the Bottom")}]);const m=[];for(let b=0;bc){let F=!1;if(u!==t&&([I,D]=h(E,{...t,values:void 0},c,L),"number"===typeof I&&(F=!0)),"number"!==typeof I&&([I,D]=h(E,u,c,L),"number"!==typeof I))continue;if(!F&&g){if(A&&g.original.length>0&&([R,N]=h(A,g)),"number"!==typeof R)continue;"number"===typeof I&&(I+=R)}}const M=y.tags&&y.tags.indexOf(1)>=0;m.push({index:b,kind:y.kind,score:I,label:E,ariaLabel:(0,x.PK)(y.name,y.kind),description:A,highlights:M?void 0:{label:D,description:N},range:{selection:k.Q.collapseToStart(y.selectionRange),decoration:y.range},uri:o.uri,symbolName:S,strikethrough:M,buttons:p})}const _=m.sort(((e,t)=>l?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let v=[];if(l){let B,W,H=0;function V(){W&&"number"===typeof B&&H>0&&(W.label=(0,d.GP)(P[B]||O,H))}for(const j of _)B!==j.kind?(V(),B=j.kind,H=1,W={type:"separator"},v.push(W)):H++,v.push(j);V()}else _.length>0&&(v=[{label:(0,T.kg)("symbols","symbols ({0})",m.length),type:"separator"},..._]);return v}compareByScore(e,t){if("number"!==typeof e.score&&"number"===typeof t.score)return 1;if("number"===typeof e.score&&"number"!==typeof t.score)return-1;if("number"===typeof e.score&&"number"===typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=P[e.kind]||O,n=P[t.kind]||O,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};A=C=R([N(0,I.ILanguageFeaturesService),N(1,E.gW)],A);const O=(0,T.kg)("property","properties ({0})"),P={5:(0,T.kg)("method","methods ({0})"),11:(0,T.kg)("function","functions ({0})"),8:(0,T.kg)("_constructor","constructors ({0})"),12:(0,T.kg)("variable","variables ({0})"),4:(0,T.kg)("class","classes ({0})"),22:(0,T.kg)("struct","structs ({0})"),23:(0,T.kg)("event","events ({0})"),24:(0,T.kg)("operator","operators ({0})"),10:(0,T.kg)("interface","interfaces ({0})"),2:(0,T.kg)("namespace","namespaces ({0})"),3:(0,T.kg)("package","packages ({0})"),25:(0,T.kg)("typeParameter","type parameters ({0})"),1:(0,T.kg)("modules","modules ({0})"),6:(0,T.kg)("property","properties ({0})"),9:(0,T.kg)("enum","enumerations ({0})"),21:(0,T.kg)("enumMember","enumeration members ({0})"),14:(0,T.kg)("string","strings ({0})"),0:(0,T.kg)("file","files ({0})"),17:(0,T.kg)("array","arrays ({0})"),15:(0,T.kg)("number","numbers ({0})"),16:(0,T.kg)("boolean","booleans ({0})"),18:(0,T.kg)("object","objects ({0})"),19:(0,T.kg)("key","keys ({0})"),7:(0,T.kg)("field","fields ({0})"),13:(0,T.kg)("constant","constants ({0})")};var M=i(16374),F=i(60018),B=i(94728),W=i(340),H=i(40231),V=i(16259),j=i(57479),z=i(3874),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends A{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=H.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};q=U([$(0,B.T),$(1,I.ILanguageFeaturesService),$(2,E.gW)],q);class K extends V.ks{static{this.ID="editor.action.quickOutline"}constructor(){super({id:K.ID,label:W.n9.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:j.R.hasDocumentSymbolProvider,kbOpts:{kbExpr:j.R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(z.GK).quickAccess.show(A.PREFIX,{itemActivation:z.C1.NONE})}}(0,V.Fl)(K),M.O.as(F.Fd.Quickaccess).registerQuickAccessProvider({ctor:q,prefix:A.PREFIX,helpEntries:[{description:W.n9.quickOutlineActionLabel,prefix:A.PREFIX,commandId:K.ID},{description:W.n9.quickOutlineByCategoryActionLabel,prefix:A.PREFIX_BY_CATEGORY}]})},98232:(e,t,i)=>{"use strict";var n,o=i(16374),s=i(60018),r=i(340),a=i(41337),l=i(5091),c=i(13046),d=i(3874),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},h=function(e,t){return function(i,n){t(i,n,e)}};let g=class{static{n=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=o.O.as(s.Fd.Quickaccess)}provide(e){const t=new l.Cm;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(n.PREFIX.length));t&&t.prefix&&t.prefix!==n.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==n.PREFIX)),t}getQuickAccessProviders(){const e=this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)));return e}createPicks(e){return e.helpEntries.map((t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:(0,a.kg)("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}}))}};g=n=u([h(0,d.GK),h(1,c.b)],g),o.O.as(s.Fd.Quickaccess).registerQuickAccessProvider({ctor:g,prefix:"",helpEntries:[{description:r.oq.helpQuickAccessActionLabel}]})},31252:(e,t,i)=>{"use strict";var n=i(16259),o=i(94728),s=i(12443),r=i(32828),a=i(18904),l=i(87778),c=i(95062),d=i(94216),u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},h=function(e,t){return function(i,n){t(i,n,e)}};let g=class extends s.X{constructor(e,t,i,n,o,s,r){super(!0,e,t,i,n,o,s,r)}};g=u([h(1,a.fN),h(2,o.T),h(3,c.Ot),h(4,l._Y),h(5,d.CS),h(6,r.pG)],g),(0,n.HW)(s.X.ID,g,4)},40611:(e,t,i)=>{"use strict";i.d(t,{aQ:()=>B,nr:()=>W,Sx:()=>q,po:()=>F,tj:()=>M});var n=i(2150),o=i(88758),s=i(85476),r=i(40231),a=i(35350),l=i(4577);class c{constructor(e,t,i,n,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}function d(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,o=e.length;n{const i=_(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";while(e.length>=1&&""===e[0].token){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}const s=new g;for(const e of t)s.getId(e);const r=s.getId(n),a=s.getId(o),l=new v(i,r,a),c=new b(l);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e)>>>0}}const f=/\b(comment|string|regex|regexp)\b/;function m(e){const t=e.match(f);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function _(e,t){return et?1:0}class v{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new v(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class b{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const o=this._children.get(i);return"undefined"!==typeof o?o.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const o=e.indexOf(".");let s,r;-1===o?(s=e,r=""):(s=e.substring(0,o),r=e.substring(o+1));let a=this._children.get(s);"undefined"===typeof a&&(a=new b(this._mainRule.clone()),this._children.set(s,a)),a.insert(r,t,i,n)}}function y(e){const t=[];for(let i=1,n=e.length;ii.fire()))),e&&t.add(e.onDidProductIconThemeChange((()=>i.fire()))),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){const t=e?e.getProductIconTheme():new O,i={},s=[],r=[];for(const e of o.getIcons()){const o=t.getIcon(e);if(!o)continue;const a=o.font,l=`--vscode-icon-${e.id}-font-family`,c=`--vscode-icon-${e.id}-content`;a?(i[a.id]=a.definition,r.push(`${l}: ${(0,n.yt)(a.id)};`,`${c}: '${o.fontCharacter}';`),s.push(`.codicon-${e.id}:before { content: '${o.fontCharacter}'; font-family: ${(0,n.yt)(a.id)}; }`)):(r.push(`${c}: '${o.fontCharacter}'; ${l}: 'codicon';`),s.push(`.codicon-${e.id}:before { content: '${o.fontCharacter}'; }`))}for(const e in i){const t=i[e],o=t.weight?`font-weight: ${t.weight};`:"",r=t.style?`font-style: ${t.style};`:"",a=t.src.map((e=>`${(0,n.Tf)(e.location)} format('${e.format}')`)).join(", ");s.push(`@font-face { src: ${a}; font-family: ${(0,n.yt)(e)};${o}${r} font-display: block; }`)}return s.push(`:root { ${r.join(" ")} }`),s.join("\n")}}}class O{getIcon(e){const t=(0,N.HT)();let i=e.defaults;while(R.L.isThemeIcon(i)){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}var P=i(62484);const M="vs",F="vs-dark",B="hc-black",W="hc-light",H=L.O.as(C.FdG.ColorContribution),V=L.O.as(T.Fd.ThemingContribution);class j{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(z(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,s.Q1.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=U(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,s.Q1.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=H.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case M:return D.zM.LIGHT;case B:return D.zM.HIGH_CONTRAST_DARK;case W:return D.zM.HIGH_CONTRAST_LIGHT;default:return D.zM.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=U(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=p.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")),o=n.metadata,s=l.x.getForeground(o),r=l.x.getFontStyle(o);return{foreground:s,italic:Boolean(1&r),bold:Boolean(2&r),underline:Boolean(4&r),strikethrough:Boolean(8&r)}}}function z(e){return e===M||e===F||e===B||e===W}function U(e){switch(e){case M:return S;case F:return k;case B:return x;case W:return E}}function $(e){const t=U(e);return new j(e,t)}class q extends I.jG{constructor(){super(),this._onColorThemeChange=this._register(new r.vl),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new r.vl),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new O,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(M,$(M)),this._knownThemes.set(F,$(F)),this._knownThemes.set(B,$(B)),this._knownThemes.set(W,$(W));const e=this._register(A(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(M),this._onOSSchemeChanged(),this._register(e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}))),(0,o.Dy)(P.G,"(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return n.Cl(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=n.li(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),I.jG.None}_registerShadowDomContainer(e){const t=n.li(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(M),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=P.G.matchMedia("(forced-colors: active)").matches;if(e!==(0,D.Bb)(this._theme.type)){let t;t=(0,D.HD)(this._theme.type)?e?B:F:e?W:M,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};V.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of H.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${(0,C.Bbc)(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join("\n")} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(y(o)),this._themeCSS=e.join("\n"),this._updateCSS(),a.dG.setColorMap(o),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach((e=>e.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},47883:(e,t,i)=>{"use strict";var n=i(16259),o=i(55643),s=i(340),r=i(1474),a=i(40611);class l extends n.ks{constructor(){super({id:"editor.action.toggleHighContrast",label:s.E6.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(o.L),n=i.getColorTheme();(0,r.Bb)(n.type)?(i.setTheme(this._originalThemeName||((0,r.HD)(n.type)?a.po:a.tj)),this._originalThemeName=null):(i.setTheme((0,r.HD)(n.type)?a.aQ:a.nr),this._originalThemeName=n.themeName)}}(0,n.Fl)(l)},55643:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(87778);const o=(0,n.u1)("themeService")},3786:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CompletionAdapter:()=>ze,DefinitionAdapter:()=>nt,DiagnosticsAdapter:()=>He,DocumentColorAdapter:()=>mt,DocumentFormattingEditProvider:()=>gt,DocumentHighlightAdapter:()=>tt,DocumentLinkAdapter:()=>ht,DocumentRangeFormattingEditProvider:()=>pt,DocumentSymbolAdapter:()=>lt,FoldingRangeAdapter:()=>_t,HoverAdapter:()=>Ze,ReferenceAdapter:()=>st,RenameAdapter:()=>rt,SelectionRangeAdapter:()=>bt,WorkerManager:()=>Fe,fromPosition:()=>Ue,fromRange:()=>$e,setupMode:()=>yt,toRange:()=>qe,toTextEdit:()=>Qe});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/c(d,n);var u,h,g,p,f,m,_,v,b,y,w,C,S,k,x,E,L,T,I,R,D,N,A,O,P,M,F,B,W,H,V,j,z,U,$,q,K,G,Q,Y,Z,X,J,ee,te,ie,ne,oe,se,re,ae,le,ce,de,ue,he,ge,pe,fe,me,_e,ve,be,ye,we,Ce,Se,ke,xe,Ee,Le,Te,Ie,Re,De,Ne,Ae,Oe,Pe,Me=12e4,Fe=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;let e=Date.now()-this._lastUsedTime;e>Me&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=d.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then((e=>{t=e})).then((t=>{if(this._worker)return this._worker.withSyncedResources(e)})).then((e=>t))}};(function(e){function t(e){return"string"===typeof e}e.is=t})(u||(u={})),function(e){function t(e){return"string"===typeof e}e.is=t}(h||(h={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=t}(g||(g={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=t}(p||(p={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}}function i(e){let t=e;return Be.objectLiteral(t)&&Be.uinteger(t.line)&&Be.uinteger(t.character)}e.create=t,e.is=i}(f||(f={})),function(e){function t(e,t,i,n){if(Be.uinteger(e)&&Be.uinteger(t)&&Be.uinteger(i)&&Be.uinteger(n))return{start:f.create(e,t),end:f.create(i,n)};if(f.is(e)&&f.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${n}]`)}function i(e){let t=e;return Be.objectLiteral(t)&&f.is(t.start)&&f.is(t.end)}e.create=t,e.is=i}(m||(m={})),function(e){function t(e,t){return{uri:e,range:t}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.range)&&(Be.string(t.uri)||Be.undefined(t.uri))}e.create=t,e.is=i}(_||(_={})),function(e){function t(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.targetRange)&&Be.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||Be.undefined(t.originSelectionRange))}e.create=t,e.is=i}(v||(v={})),function(e){function t(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.numberRange(t.red,0,1)&&Be.numberRange(t.green,0,1)&&Be.numberRange(t.blue,0,1)&&Be.numberRange(t.alpha,0,1)}e.create=t,e.is=i}(b||(b={})),function(e){function t(e,t){return{range:e,color:t}}function i(e){const t=e;return Be.objectLiteral(t)&&m.is(t.range)&&b.is(t.color)}e.create=t,e.is=i}(y||(y={})),function(e){function t(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.undefined(t.textEdit)||R.is(t))&&(Be.undefined(t.additionalTextEdits)||Be.typedArray(t.additionalTextEdits,R.is))}e.create=t,e.is=i}(w||(w={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(C||(C={})),function(e){function t(e,t,i,n,o,s){const r={startLine:e,endLine:t};return Be.defined(i)&&(r.startCharacter=i),Be.defined(n)&&(r.endCharacter=n),Be.defined(o)&&(r.kind=o),Be.defined(s)&&(r.collapsedText=s),r}function i(e){const t=e;return Be.objectLiteral(t)&&Be.uinteger(t.startLine)&&Be.uinteger(t.startLine)&&(Be.undefined(t.startCharacter)||Be.uinteger(t.startCharacter))&&(Be.undefined(t.endCharacter)||Be.uinteger(t.endCharacter))&&(Be.undefined(t.kind)||Be.string(t.kind))}e.create=t,e.is=i}(S||(S={})),function(e){function t(e,t){return{location:e,message:t}}function i(e){let t=e;return Be.defined(t)&&_.is(t.location)&&Be.string(t.message)}e.create=t,e.is=i}(k||(k={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(x||(x={})),function(e){e.Unnecessary=1,e.Deprecated=2}(E||(E={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.href)}e.is=t}(L||(L={})),function(e){function t(e,t,i,n,o,s){let r={range:e,message:t};return Be.defined(i)&&(r.severity=i),Be.defined(n)&&(r.code=n),Be.defined(o)&&(r.source=o),Be.defined(s)&&(r.relatedInformation=s),r}function i(e){var t;let i=e;return Be.defined(i)&&m.is(i.range)&&Be.string(i.message)&&(Be.number(i.severity)||Be.undefined(i.severity))&&(Be.integer(i.code)||Be.string(i.code)||Be.undefined(i.code))&&(Be.undefined(i.codeDescription)||Be.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(Be.string(i.source)||Be.undefined(i.source))&&(Be.undefined(i.relatedInformation)||Be.typedArray(i.relatedInformation,k.is))}e.create=t,e.is=i}(T||(T={})),function(e){function t(e,t,...i){let n={title:e,command:t};return Be.defined(i)&&i.length>0&&(n.arguments=i),n}function i(e){let t=e;return Be.defined(t)&&Be.string(t.title)&&Be.string(t.command)}e.create=t,e.is=i}(I||(I={})),function(e){function t(e,t){return{range:e,newText:t}}function i(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function o(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.newText)&&m.is(t.range)}e.replace=t,e.insert=i,e.del=n,e.is=o}(R||(R={})),function(e){function t(e,t,i){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Be.string(t.description)||void 0===t.description)}e.create=t,e.is=i}(D||(D={})),function(e){function t(e){const t=e;return Be.string(t)}e.is=t}(N||(N={})),function(e){function t(e,t,i){return{range:e,newText:t,annotationId:i}}function i(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}}function n(e,t){return{range:e,newText:"",annotationId:t}}function o(e){const t=e;return R.is(t)&&(D.is(t.annotationId)||N.is(t.annotationId))}e.replace=t,e.insert=i,e.del=n,e.is=o}(A||(A={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function i(e){let t=e;return Be.defined(t)&&V.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=i}(O||(O={})),function(e){function t(e,t,i){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"create"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(P||(P={})),function(e){function t(e,t,i,n){let o={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(o.options=i),void 0!==n&&(o.annotationId=n),o}function i(e){let t=e;return t&&"rename"===t.kind&&Be.string(t.oldUri)&&Be.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(M||(M={})),function(e){function t(e,t,i){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"delete"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Be.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Be.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(F||(F={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Be.string(e.kind)?P.is(e)||M.is(e)||F.is(e):O.is(e))))}e.is=t}(B||(B={})),function(e){function t(e){return{uri:e}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)}e.create=t,e.is=i}(W||(W={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.integer(t.version)}e.create=t,e.is=i}(H||(H={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&(null===t.version||Be.integer(t.version))}e.create=t,e.is=i}(V||(V={})),function(e){function t(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.string(t.languageId)&&Be.integer(t.version)&&Be.string(t.text)}e.create=t,e.is=i}(j||(j={})),function(e){function t(t){const i=t;return i===e.PlainText||i===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",e.is=t}(z||(z={})),function(e){function t(e){const t=e;return Be.objectLiteral(e)&&z.is(t.kind)&&Be.string(t.value)}e.is=t}(U||(U={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}($||($={})),function(e){e.PlainText=1,e.Snippet=2}(q||(q={})),function(e){e.Deprecated=1}(K||(K={})),function(e){function t(e,t,i){return{newText:e,insert:t,replace:i}}function i(e){const t=e;return t&&Be.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.create=t,e.is=i}(G||(G={})),function(e){e.asIs=1,e.adjustIndentation=2}(Q||(Q={})),function(e){function t(e){const t=e;return t&&(Be.string(t.detail)||void 0===t.detail)&&(Be.string(t.description)||void 0===t.description)}e.is=t}(Y||(Y={})),function(e){function t(e){return{label:e}}e.create=t}(Z||(Z={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(X||(X={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function i(e){const t=e;return Be.string(t)||Be.objectLiteral(t)&&Be.string(t.language)&&Be.string(t.value)}e.fromPlainText=t,e.is=i}(J||(J={})),function(e){function t(e){let t=e;return!!t&&Be.objectLiteral(t)&&(U.is(t.contents)||J.is(t.contents)||Be.typedArray(t.contents,J.is))&&(void 0===e.range||m.is(e.range))}e.is=t}(ee||(ee={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(te||(te={})),function(e){function t(e,t,...i){let n={label:e};return Be.defined(t)&&(n.documentation=t),Be.defined(i)?n.parameters=i:n.parameters=[],n}e.create=t}(ie||(ie={})),function(e){e.Text=1,e.Read=2,e.Write=3}(ne||(ne={})),function(e){function t(e,t){let i={range:e};return Be.number(t)&&(i.kind=t),i}e.create=t}(oe||(oe={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(se||(se={})),function(e){e.Deprecated=1}(re||(re={})),function(e){function t(e,t,i,n,o){let s={name:e,kind:t,location:{uri:n,range:i}};return o&&(s.containerName=o),s}e.create=t}(ae||(ae={})),function(e){function t(e,t,i,n){return void 0!==n?{name:e,kind:t,location:{uri:i,range:n}}:{name:e,kind:t,location:{uri:i}}}e.create=t}(le||(le={})),function(e){function t(e,t,i,n,o,s){let r={name:e,detail:t,kind:i,range:n,selectionRange:o};return void 0!==s&&(r.children=s),r}function i(e){let t=e;return t&&Be.string(t.name)&&Be.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(void 0===t.detail||Be.string(t.detail))&&(void 0===t.deprecated||Be.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=i}(ce||(ce={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(de||(de={})),function(e){e.Invoked=1,e.Automatic=2}(ue||(ue={})),function(e){function t(e,t,i){let n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),void 0!==i&&null!==i&&(n.triggerKind=i),n}function i(e){let t=e;return Be.defined(t)&&Be.typedArray(t.diagnostics,T.is)&&(void 0===t.only||Be.typedArray(t.only,Be.string))&&(void 0===t.triggerKind||t.triggerKind===ue.Invoked||t.triggerKind===ue.Automatic)}e.create=t,e.is=i}(he||(he={})),function(e){function t(e,t,i){let n={title:e},o=!0;return"string"===typeof t?(o=!1,n.kind=t):I.is(t)?n.command=t:n.edit=t,o&&void 0!==i&&(n.kind=i),n}function i(e){let t=e;return t&&Be.string(t.title)&&(void 0===t.diagnostics||Be.typedArray(t.diagnostics,T.is))&&(void 0===t.kind||Be.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||I.is(t.command))&&(void 0===t.isPreferred||Be.boolean(t.isPreferred))&&(void 0===t.edit||B.is(t.edit))}e.create=t,e.is=i}(ge||(ge={})),function(e){function t(e,t){let i={range:e};return Be.defined(t)&&(i.data=t),i}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.command)||I.is(t.command))}e.create=t,e.is=i}(pe||(pe={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function i(e){let t=e;return Be.defined(t)&&Be.uinteger(t.tabSize)&&Be.boolean(t.insertSpaces)}e.create=t,e.is=i}(fe||(fe={})),function(e){function t(e,t,i){return{range:e,target:t,data:i}}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.target)||Be.string(t.target))}e.create=t,e.is=i}(me||(me={})),function(e){function t(e,t){return{range:e,parent:t}}function i(t){let i=t;return Be.objectLiteral(i)&&m.is(i.range)&&(void 0===i.parent||e.is(i.parent))}e.create=t,e.is=i}(_e||(_e={})),function(e){e["namespace"]="namespace",e["type"]="type",e["class"]="class",e["enum"]="enum",e["interface"]="interface",e["struct"]="struct",e["typeParameter"]="typeParameter",e["parameter"]="parameter",e["variable"]="variable",e["property"]="property",e["enumMember"]="enumMember",e["event"]="event",e["function"]="function",e["method"]="method",e["macro"]="macro",e["keyword"]="keyword",e["modifier"]="modifier",e["comment"]="comment",e["string"]="string",e["number"]="number",e["regexp"]="regexp",e["operator"]="operator",e["decorator"]="decorator"}(ve||(ve={})),function(e){e["declaration"]="declaration",e["definition"]="definition",e["readonly"]="readonly",e["static"]="static",e["deprecated"]="deprecated",e["abstract"]="abstract",e["async"]="async",e["modification"]="modification",e["documentation"]="documentation",e["defaultLibrary"]="defaultLibrary"}(be||(be={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.resultId||"string"===typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"===typeof t.data[0])}e.is=t}(ye||(ye={})),function(e){function t(e,t){return{range:e,text:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.string(t.text)}e.create=t,e.is=i}(we||(we={})),function(e){function t(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.boolean(t.caseSensitiveLookup)&&(Be.string(t.variableName)||void 0===t.variableName)}e.create=t,e.is=i}(Ce||(Ce={})),function(e){function t(e,t){return{range:e,expression:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&(Be.string(t.expression)||void 0===t.expression)}e.create=t,e.is=i}(Se||(Se={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function i(e){const t=e;return Be.defined(t)&&m.is(e.stoppedLocation)}e.create=t,e.is=i}(ke||(ke={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,e.is=t}(xe||(xe={})),function(e){function t(e){return{value:e}}function i(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.location||_.is(t.location))&&(void 0===t.command||I.is(t.command))}e.create=t,e.is=i}(Ee||(Ee={})),function(e){function t(e,t,i){const n={position:e,label:t};return void 0!==i&&(n.kind=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&f.is(t.position)&&(Be.string(t.label)||Be.typedArray(t.label,Ee.is))&&(void 0===t.kind||xe.is(t.kind))&&void 0===t.textEdits||Be.typedArray(t.textEdits,R.is)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.paddingLeft||Be.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Be.boolean(t.paddingRight))}e.create=t,e.is=i}(Le||(Le={})),function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t}(Te||(Te={})),function(e){function t(e,t,i,n){return{insertText:e,filterText:t,range:i,command:n}}e.create=t}(Ie||(Ie={})),function(e){function t(e){return{items:e}}e.create=t}(Re||(Re={})),function(e){e.Invoked=0,e.Automatic=1}(De||(De={})),function(e){function t(e,t){return{range:e,text:t}}e.create=t}(Ne||(Ne={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t}(Ae||(Ae={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&h.is(t.uri)&&Be.string(t.name)}e.is=t}(Oe||(Oe={})),function(e){function t(e,t,i,n){return new We(e,t,i,n)}function i(e){let t=e;return!!(Be.defined(t)&&Be.string(t.uri)&&(Be.undefined(t.languageId)||Be.string(t.languageId))&&Be.uinteger(t.lineCount)&&Be.func(t.getText)&&Be.func(t.positionAt)&&Be.func(t.offsetAt))}function n(e,t){let i=e.getText(),n=o(t,((e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i})),s=i.length;for(let o=n.length-1;o>=0;o--){let t=n[o],r=e.offsetAt(t.range.start),a=e.offsetAt(t.range.end);if(!(a<=s))throw new Error("Overlapping edit");i=i.substring(0,r)+t.newText+i.substring(a,i.length),s=r}return i}function o(e,t){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),s=e.slice(i);o(n,t),o(s,t);let r=0,a=0,l=0;while(r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),i=0,n=t.length;if(0===n)return f.create(0,e);while(ie?n=o:i=o+1}let o=i-1;return f.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],n=e.line+1{let t,i=e.getLanguageId();i===this._languageId&&(this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(t),t=window.setTimeout((()=>this._doValidate(e.uri,i)),500)})),this._doValidate(e.uri,i))},o=e=>{d.editor.setModelMarkers(e,this._languageId,[]);let t=e.uri.toString(),i=this._listener[t];i&&(i.dispose(),delete this._listener[t])};this._disposables.push(d.editor.onDidCreateModel(n)),this._disposables.push(d.editor.onWillDisposeModel(o)),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{o(e.model),n(e.model)}))),this._disposables.push(i((e=>{d.editor.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),n(e))}))}))),this._disposables.push({dispose:()=>{d.editor.getModels().forEach(o);for(let e in this._listener)this._listener[e].dispose()}}),d.editor.getModels().forEach(n)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables.length=0}_doValidate(e,t){this._worker(e).then((t=>t.doValidation(e.toString()))).then((i=>{const n=i.map((t=>je(e,t)));let o=d.editor.getModel(e);o&&o.getLanguageId()===t&&d.editor.setModelMarkers(o,t,n)})).then(void 0,(e=>{console.error(e)}))}};function Ve(e){switch(e){case x.Error:return d.MarkerSeverity.Error;case x.Warning:return d.MarkerSeverity.Warning;case x.Information:return d.MarkerSeverity.Info;case x.Hint:return d.MarkerSeverity.Hint;default:return d.MarkerSeverity.Info}}function je(e,t){let i="number"===typeof t.code?String(t.code):t.code;return{severity:Ve(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}var ze=class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doComplete(o.toString(),Ue(t)))).then((i=>{if(!i)return;const n=e.getWordUntilPosition(t),o=new d.Range(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn),s=i.items.map((e=>{const t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:Ye(e.command),range:o,kind:Ge(e.kind)};return e.textEdit&&(Ke(e.textEdit)?t.range={insert:qe(e.textEdit.insert),replace:qe(e.textEdit.replace)}:t.range=qe(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),e.insertTextFormat===q.Snippet&&(t.insertTextRules=d.languages.CompletionItemInsertTextRule.InsertAsSnippet),t}));return{isIncomplete:i.isIncomplete,suggestions:s}}))}};function Ue(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function $e(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function qe(e){if(e)return new d.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Ke(e){return"undefined"!==typeof e.insert&&"undefined"!==typeof e.replace}function Ge(e){const t=d.languages.CompletionItemKind;switch(e){case $.Text:return t.Text;case $.Method:return t.Method;case $.Function:return t.Function;case $.Constructor:return t.Constructor;case $.Field:return t.Field;case $.Variable:return t.Variable;case $.Class:return t.Class;case $.Interface:return t.Interface;case $.Module:return t.Module;case $.Property:return t.Property;case $.Unit:return t.Unit;case $.Value:return t.Value;case $.Enum:return t.Enum;case $.Keyword:return t.Keyword;case $.Snippet:return t.Snippet;case $.Color:return t.Color;case $.File:return t.File;case $.Reference:return t.Reference}return t.Property}function Qe(e){if(e)return{range:qe(e.range),text:e.newText}}function Ye(e){return e&&"editor.action.triggerSuggest"===e.command?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ze=class{constructor(e){this._worker=e}provideHover(e,t,i){let n=e.uri;return this._worker(n).then((e=>e.doHover(n.toString(),Ue(t)))).then((e=>{if(e)return{range:qe(e.range),contents:et(e.contents)}}))}};function Xe(e){return e&&"object"===typeof e&&"string"===typeof e.kind}function Je(e){return"string"===typeof e?{value:e}:Xe(e)?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"}}function et(e){if(e)return Array.isArray(e)?e.map(Je):[Je(e)]}var tt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDocumentHighlights(n.toString(),Ue(t)))).then((e=>{if(e)return e.map((e=>({range:qe(e.range),kind:it(e.kind)})))}))}};function it(e){switch(e){case ne.Read:return d.languages.DocumentHighlightKind.Read;case ne.Write:return d.languages.DocumentHighlightKind.Write;case ne.Text:return d.languages.DocumentHighlightKind.Text}return d.languages.DocumentHighlightKind.Text}var nt=class{constructor(e){this._worker=e}provideDefinition(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDefinition(n.toString(),Ue(t)))).then((e=>{if(e)return[ot(e)]}))}};function ot(e){return{uri:d.Uri.parse(e.uri),range:qe(e.range)}}var st=class{constructor(e){this._worker=e}provideReferences(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.findReferences(o.toString(),Ue(t)))).then((e=>{if(e)return e.map(ot)}))}},rt=class{constructor(e){this._worker=e}provideRenameEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doRename(o.toString(),Ue(t),i))).then((e=>at(e)))}};function at(e){if(!e||!e.changes)return;let t=[];for(let i in e.changes){const n=d.Uri.parse(i);for(let o of e.changes[i])t.push({resource:n,versionId:void 0,textEdit:{range:qe(o.range),text:o.newText}})}return{edits:t}}var lt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentSymbols(i.toString()))).then((e=>{if(e)return e.map((e=>ct(e)?dt(e):{name:e.name,detail:"",containerName:e.containerName,kind:ut(e.kind),range:qe(e.location.range),selectionRange:qe(e.location.range),tags:[]}))}))}};function ct(e){return"children"in e}function dt(e){return{name:e.name,detail:e.detail??"",kind:ut(e.kind),range:qe(e.range),selectionRange:qe(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map((e=>dt(e)))}}function ut(e){let t=d.languages.SymbolKind;switch(e){case se.File:return t.File;case se.Module:return t.Module;case se.Namespace:return t.Namespace;case se.Package:return t.Package;case se.Class:return t.Class;case se.Method:return t.Method;case se.Property:return t.Property;case se.Field:return t.Field;case se.Constructor:return t.Constructor;case se.Enum:return t.Enum;case se.Interface:return t.Interface;case se.Function:return t.Function;case se.Variable:return t.Variable;case se.Constant:return t.Constant;case se.String:return t.String;case se.Number:return t.Number;case se.Boolean:return t.Boolean;case se.Array:return t.Array}return t.Function}var ht=class{constructor(e){this._worker=e}provideLinks(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentLinks(i.toString()))).then((e=>{if(e)return{links:e.map((e=>({range:qe(e.range),url:e.target})))}}))}},gt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.format(n.toString(),null,ft(t)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}},pt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.format(o.toString(),$e(t),ft(i)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}};function ft(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var mt=class{constructor(e){this._worker=e}provideDocumentColors(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentColors(i.toString()))).then((e=>{if(e)return e.map((e=>({color:e.color,range:qe(e.range)})))}))}provideColorPresentations(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getColorPresentations(n.toString(),t.color,$e(t.range)))).then((e=>{if(e)return e.map((e=>{let t={label:e.label};return e.textEdit&&(t.textEdit=Qe(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),t}))}))}},_t=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getFoldingRanges(n.toString(),t))).then((e=>{if(e)return e.map((e=>{const t={start:e.startLine+1,end:e.endLine+1};return"undefined"!==typeof e.kind&&(t.kind=vt(e.kind)),t}))}))}};function vt(e){switch(e){case C.Comment:return d.languages.FoldingRangeKind.Comment;case C.Imports:return d.languages.FoldingRangeKind.Imports;case C.Region:return d.languages.FoldingRangeKind.Region}}var bt=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getSelectionRanges(n.toString(),t.map(Ue)))).then((e=>{if(e)return e.map((e=>{const t=[];while(e)t.push({range:qe(e.range)}),e=e.parent;return t}))}))}};function yt(e){const t=[],i=[],n=new Fe(e);t.push(n);const o=(...e)=>n.getLanguageServiceWorker(...e);function s(){const{languageId:t,modeConfiguration:n}=e;Ct(i),n.completionItems&&i.push(d.languages.registerCompletionItemProvider(t,new ze(o,["/","-",":"]))),n.hovers&&i.push(d.languages.registerHoverProvider(t,new Ze(o))),n.documentHighlights&&i.push(d.languages.registerDocumentHighlightProvider(t,new tt(o))),n.definitions&&i.push(d.languages.registerDefinitionProvider(t,new nt(o))),n.references&&i.push(d.languages.registerReferenceProvider(t,new st(o))),n.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(t,new lt(o))),n.rename&&i.push(d.languages.registerRenameProvider(t,new rt(o))),n.colors&&i.push(d.languages.registerColorProvider(t,new mt(o))),n.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(t,new _t(o))),n.diagnostics&&i.push(new He(t,o,e.onDidChange)),n.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(t,new bt(o))),n.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(t,new gt(o))),n.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(t,new pt(o)))}return s(),t.push(wt(i)),wt(t)}function wt(e){return{dispose:()=>Ct(e)}}function Ct(e){while(e.length)e.pop().dispose()}},24010:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CompletionAdapter:()=>ze,DefinitionAdapter:()=>nt,DiagnosticsAdapter:()=>He,DocumentColorAdapter:()=>mt,DocumentFormattingEditProvider:()=>gt,DocumentHighlightAdapter:()=>tt,DocumentLinkAdapter:()=>ht,DocumentRangeFormattingEditProvider:()=>pt,DocumentSymbolAdapter:()=>lt,FoldingRangeAdapter:()=>_t,HoverAdapter:()=>Ze,ReferenceAdapter:()=>st,RenameAdapter:()=>rt,SelectionRangeAdapter:()=>bt,WorkerManager:()=>Fe,fromPosition:()=>Ue,fromRange:()=>$e,setupMode:()=>Ct,setupMode1:()=>wt,toRange:()=>qe,toTextEdit:()=>Qe});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; + *-----------------------------------------------------------------------------*/c(d,n);var u,h,g,p,f,m,_,v,b,y,w,C,S,k,x,E,L,T,I,D,R,N,A,O,P,M,F,B,W,H,V,j,z,U,$,q,K,G,Q,Y,Z,X,J,ee,te,ie,ne,oe,se,re,ae,le,ce,de,ue,he,ge,pe,fe,me,_e,ve,be,ye,we,Ce,Se,ke,xe,Ee,Le,Te,Ie,De,Re,Ne,Ae,Oe,Pe,Me=12e4,Fe=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;let e=Date.now()-this._lastUsedTime;e>Me&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=d.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then((e=>{t=e})).then((t=>{if(this._worker)return this._worker.withSyncedResources(e)})).then((e=>t))}};(function(e){function t(e){return"string"===typeof e}e.is=t})(u||(u={})),function(e){function t(e){return"string"===typeof e}e.is=t}(h||(h={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=t}(g||(g={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=t}(p||(p={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}}function i(e){let t=e;return Be.objectLiteral(t)&&Be.uinteger(t.line)&&Be.uinteger(t.character)}e.create=t,e.is=i}(f||(f={})),function(e){function t(e,t,i,n){if(Be.uinteger(e)&&Be.uinteger(t)&&Be.uinteger(i)&&Be.uinteger(n))return{start:f.create(e,t),end:f.create(i,n)};if(f.is(e)&&f.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${n}]`)}function i(e){let t=e;return Be.objectLiteral(t)&&f.is(t.start)&&f.is(t.end)}e.create=t,e.is=i}(m||(m={})),function(e){function t(e,t){return{uri:e,range:t}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.range)&&(Be.string(t.uri)||Be.undefined(t.uri))}e.create=t,e.is=i}(_||(_={})),function(e){function t(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.targetRange)&&Be.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||Be.undefined(t.originSelectionRange))}e.create=t,e.is=i}(v||(v={})),function(e){function t(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.numberRange(t.red,0,1)&&Be.numberRange(t.green,0,1)&&Be.numberRange(t.blue,0,1)&&Be.numberRange(t.alpha,0,1)}e.create=t,e.is=i}(b||(b={})),function(e){function t(e,t){return{range:e,color:t}}function i(e){const t=e;return Be.objectLiteral(t)&&m.is(t.range)&&b.is(t.color)}e.create=t,e.is=i}(y||(y={})),function(e){function t(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.undefined(t.textEdit)||D.is(t))&&(Be.undefined(t.additionalTextEdits)||Be.typedArray(t.additionalTextEdits,D.is))}e.create=t,e.is=i}(w||(w={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(C||(C={})),function(e){function t(e,t,i,n,o,s){const r={startLine:e,endLine:t};return Be.defined(i)&&(r.startCharacter=i),Be.defined(n)&&(r.endCharacter=n),Be.defined(o)&&(r.kind=o),Be.defined(s)&&(r.collapsedText=s),r}function i(e){const t=e;return Be.objectLiteral(t)&&Be.uinteger(t.startLine)&&Be.uinteger(t.startLine)&&(Be.undefined(t.startCharacter)||Be.uinteger(t.startCharacter))&&(Be.undefined(t.endCharacter)||Be.uinteger(t.endCharacter))&&(Be.undefined(t.kind)||Be.string(t.kind))}e.create=t,e.is=i}(S||(S={})),function(e){function t(e,t){return{location:e,message:t}}function i(e){let t=e;return Be.defined(t)&&_.is(t.location)&&Be.string(t.message)}e.create=t,e.is=i}(k||(k={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(x||(x={})),function(e){e.Unnecessary=1,e.Deprecated=2}(E||(E={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.href)}e.is=t}(L||(L={})),function(e){function t(e,t,i,n,o,s){let r={range:e,message:t};return Be.defined(i)&&(r.severity=i),Be.defined(n)&&(r.code=n),Be.defined(o)&&(r.source=o),Be.defined(s)&&(r.relatedInformation=s),r}function i(e){var t;let i=e;return Be.defined(i)&&m.is(i.range)&&Be.string(i.message)&&(Be.number(i.severity)||Be.undefined(i.severity))&&(Be.integer(i.code)||Be.string(i.code)||Be.undefined(i.code))&&(Be.undefined(i.codeDescription)||Be.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(Be.string(i.source)||Be.undefined(i.source))&&(Be.undefined(i.relatedInformation)||Be.typedArray(i.relatedInformation,k.is))}e.create=t,e.is=i}(T||(T={})),function(e){function t(e,t,...i){let n={title:e,command:t};return Be.defined(i)&&i.length>0&&(n.arguments=i),n}function i(e){let t=e;return Be.defined(t)&&Be.string(t.title)&&Be.string(t.command)}e.create=t,e.is=i}(I||(I={})),function(e){function t(e,t){return{range:e,newText:t}}function i(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function o(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.newText)&&m.is(t.range)}e.replace=t,e.insert=i,e.del=n,e.is=o}(D||(D={})),function(e){function t(e,t,i){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Be.string(t.description)||void 0===t.description)}e.create=t,e.is=i}(R||(R={})),function(e){function t(e){const t=e;return Be.string(t)}e.is=t}(N||(N={})),function(e){function t(e,t,i){return{range:e,newText:t,annotationId:i}}function i(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}}function n(e,t){return{range:e,newText:"",annotationId:t}}function o(e){const t=e;return D.is(t)&&(R.is(t.annotationId)||N.is(t.annotationId))}e.replace=t,e.insert=i,e.del=n,e.is=o}(A||(A={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function i(e){let t=e;return Be.defined(t)&&V.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=i}(O||(O={})),function(e){function t(e,t,i){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"create"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(P||(P={})),function(e){function t(e,t,i,n){let o={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(o.options=i),void 0!==n&&(o.annotationId=n),o}function i(e){let t=e;return t&&"rename"===t.kind&&Be.string(t.oldUri)&&Be.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(M||(M={})),function(e){function t(e,t,i){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"delete"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Be.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Be.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(F||(F={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Be.string(e.kind)?P.is(e)||M.is(e)||F.is(e):O.is(e))))}e.is=t}(B||(B={})),function(e){function t(e){return{uri:e}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)}e.create=t,e.is=i}(W||(W={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.integer(t.version)}e.create=t,e.is=i}(H||(H={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&(null===t.version||Be.integer(t.version))}e.create=t,e.is=i}(V||(V={})),function(e){function t(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.string(t.languageId)&&Be.integer(t.version)&&Be.string(t.text)}e.create=t,e.is=i}(j||(j={})),function(e){function t(t){const i=t;return i===e.PlainText||i===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",e.is=t}(z||(z={})),function(e){function t(e){const t=e;return Be.objectLiteral(e)&&z.is(t.kind)&&Be.string(t.value)}e.is=t}(U||(U={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}($||($={})),function(e){e.PlainText=1,e.Snippet=2}(q||(q={})),function(e){e.Deprecated=1}(K||(K={})),function(e){function t(e,t,i){return{newText:e,insert:t,replace:i}}function i(e){const t=e;return t&&Be.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.create=t,e.is=i}(G||(G={})),function(e){e.asIs=1,e.adjustIndentation=2}(Q||(Q={})),function(e){function t(e){const t=e;return t&&(Be.string(t.detail)||void 0===t.detail)&&(Be.string(t.description)||void 0===t.description)}e.is=t}(Y||(Y={})),function(e){function t(e){return{label:e}}e.create=t}(Z||(Z={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(X||(X={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function i(e){const t=e;return Be.string(t)||Be.objectLiteral(t)&&Be.string(t.language)&&Be.string(t.value)}e.fromPlainText=t,e.is=i}(J||(J={})),function(e){function t(e){let t=e;return!!t&&Be.objectLiteral(t)&&(U.is(t.contents)||J.is(t.contents)||Be.typedArray(t.contents,J.is))&&(void 0===e.range||m.is(e.range))}e.is=t}(ee||(ee={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(te||(te={})),function(e){function t(e,t,...i){let n={label:e};return Be.defined(t)&&(n.documentation=t),Be.defined(i)?n.parameters=i:n.parameters=[],n}e.create=t}(ie||(ie={})),function(e){e.Text=1,e.Read=2,e.Write=3}(ne||(ne={})),function(e){function t(e,t){let i={range:e};return Be.number(t)&&(i.kind=t),i}e.create=t}(oe||(oe={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(se||(se={})),function(e){e.Deprecated=1}(re||(re={})),function(e){function t(e,t,i,n,o){let s={name:e,kind:t,location:{uri:n,range:i}};return o&&(s.containerName=o),s}e.create=t}(ae||(ae={})),function(e){function t(e,t,i,n){return void 0!==n?{name:e,kind:t,location:{uri:i,range:n}}:{name:e,kind:t,location:{uri:i}}}e.create=t}(le||(le={})),function(e){function t(e,t,i,n,o,s){let r={name:e,detail:t,kind:i,range:n,selectionRange:o};return void 0!==s&&(r.children=s),r}function i(e){let t=e;return t&&Be.string(t.name)&&Be.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(void 0===t.detail||Be.string(t.detail))&&(void 0===t.deprecated||Be.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=i}(ce||(ce={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(de||(de={})),function(e){e.Invoked=1,e.Automatic=2}(ue||(ue={})),function(e){function t(e,t,i){let n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),void 0!==i&&null!==i&&(n.triggerKind=i),n}function i(e){let t=e;return Be.defined(t)&&Be.typedArray(t.diagnostics,T.is)&&(void 0===t.only||Be.typedArray(t.only,Be.string))&&(void 0===t.triggerKind||t.triggerKind===ue.Invoked||t.triggerKind===ue.Automatic)}e.create=t,e.is=i}(he||(he={})),function(e){function t(e,t,i){let n={title:e},o=!0;return"string"===typeof t?(o=!1,n.kind=t):I.is(t)?n.command=t:n.edit=t,o&&void 0!==i&&(n.kind=i),n}function i(e){let t=e;return t&&Be.string(t.title)&&(void 0===t.diagnostics||Be.typedArray(t.diagnostics,T.is))&&(void 0===t.kind||Be.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||I.is(t.command))&&(void 0===t.isPreferred||Be.boolean(t.isPreferred))&&(void 0===t.edit||B.is(t.edit))}e.create=t,e.is=i}(ge||(ge={})),function(e){function t(e,t){let i={range:e};return Be.defined(t)&&(i.data=t),i}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.command)||I.is(t.command))}e.create=t,e.is=i}(pe||(pe={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function i(e){let t=e;return Be.defined(t)&&Be.uinteger(t.tabSize)&&Be.boolean(t.insertSpaces)}e.create=t,e.is=i}(fe||(fe={})),function(e){function t(e,t,i){return{range:e,target:t,data:i}}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.target)||Be.string(t.target))}e.create=t,e.is=i}(me||(me={})),function(e){function t(e,t){return{range:e,parent:t}}function i(t){let i=t;return Be.objectLiteral(i)&&m.is(i.range)&&(void 0===i.parent||e.is(i.parent))}e.create=t,e.is=i}(_e||(_e={})),function(e){e["namespace"]="namespace",e["type"]="type",e["class"]="class",e["enum"]="enum",e["interface"]="interface",e["struct"]="struct",e["typeParameter"]="typeParameter",e["parameter"]="parameter",e["variable"]="variable",e["property"]="property",e["enumMember"]="enumMember",e["event"]="event",e["function"]="function",e["method"]="method",e["macro"]="macro",e["keyword"]="keyword",e["modifier"]="modifier",e["comment"]="comment",e["string"]="string",e["number"]="number",e["regexp"]="regexp",e["operator"]="operator",e["decorator"]="decorator"}(ve||(ve={})),function(e){e["declaration"]="declaration",e["definition"]="definition",e["readonly"]="readonly",e["static"]="static",e["deprecated"]="deprecated",e["abstract"]="abstract",e["async"]="async",e["modification"]="modification",e["documentation"]="documentation",e["defaultLibrary"]="defaultLibrary"}(be||(be={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.resultId||"string"===typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"===typeof t.data[0])}e.is=t}(ye||(ye={})),function(e){function t(e,t){return{range:e,text:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.string(t.text)}e.create=t,e.is=i}(we||(we={})),function(e){function t(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.boolean(t.caseSensitiveLookup)&&(Be.string(t.variableName)||void 0===t.variableName)}e.create=t,e.is=i}(Ce||(Ce={})),function(e){function t(e,t){return{range:e,expression:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&(Be.string(t.expression)||void 0===t.expression)}e.create=t,e.is=i}(Se||(Se={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function i(e){const t=e;return Be.defined(t)&&m.is(e.stoppedLocation)}e.create=t,e.is=i}(ke||(ke={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,e.is=t}(xe||(xe={})),function(e){function t(e){return{value:e}}function i(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.location||_.is(t.location))&&(void 0===t.command||I.is(t.command))}e.create=t,e.is=i}(Ee||(Ee={})),function(e){function t(e,t,i){const n={position:e,label:t};return void 0!==i&&(n.kind=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&f.is(t.position)&&(Be.string(t.label)||Be.typedArray(t.label,Ee.is))&&(void 0===t.kind||xe.is(t.kind))&&void 0===t.textEdits||Be.typedArray(t.textEdits,D.is)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.paddingLeft||Be.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Be.boolean(t.paddingRight))}e.create=t,e.is=i}(Le||(Le={})),function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t}(Te||(Te={})),function(e){function t(e,t,i,n){return{insertText:e,filterText:t,range:i,command:n}}e.create=t}(Ie||(Ie={})),function(e){function t(e){return{items:e}}e.create=t}(De||(De={})),function(e){e.Invoked=0,e.Automatic=1}(Re||(Re={})),function(e){function t(e,t){return{range:e,text:t}}e.create=t}(Ne||(Ne={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t}(Ae||(Ae={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&h.is(t.uri)&&Be.string(t.name)}e.is=t}(Oe||(Oe={})),function(e){function t(e,t,i,n){return new We(e,t,i,n)}function i(e){let t=e;return!!(Be.defined(t)&&Be.string(t.uri)&&(Be.undefined(t.languageId)||Be.string(t.languageId))&&Be.uinteger(t.lineCount)&&Be.func(t.getText)&&Be.func(t.positionAt)&&Be.func(t.offsetAt))}function n(e,t){let i=e.getText(),n=o(t,((e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i})),s=i.length;for(let t=n.length-1;t>=0;t--){let o=n[t],r=e.offsetAt(o.range.start),a=e.offsetAt(o.range.end);if(!(a<=s))throw new Error("Overlapping edit");i=i.substring(0,r)+o.newText+i.substring(a,i.length),s=r}return i}function o(e,t){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),s=e.slice(i);o(n,t),o(s,t);let r=0,a=0,l=0;while(r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),i=0,n=t.length;if(0===n)return f.create(0,e);while(ie?n=o:i=o+1}let o=i-1;return f.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],n=e.line+1{let t,i=e.getLanguageId();i===this._languageId&&(this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(t),t=window.setTimeout((()=>this._doValidate(e.uri,i)),500)})),this._doValidate(e.uri,i))},o=e=>{d.editor.setModelMarkers(e,this._languageId,[]);let t=e.uri.toString(),i=this._listener[t];i&&(i.dispose(),delete this._listener[t])};this._disposables.push(d.editor.onDidCreateModel(n)),this._disposables.push(d.editor.onWillDisposeModel(o)),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{o(e.model),n(e.model)}))),this._disposables.push(i((e=>{d.editor.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),n(e))}))}))),this._disposables.push({dispose:()=>{d.editor.getModels().forEach(o);for(let e in this._listener)this._listener[e].dispose()}}),d.editor.getModels().forEach(n)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables.length=0}_doValidate(e,t){this._worker(e).then((t=>t.doValidation(e.toString()))).then((i=>{const n=i.map((t=>je(e,t)));let o=d.editor.getModel(e);o&&o.getLanguageId()===t&&d.editor.setModelMarkers(o,t,n)})).then(void 0,(e=>{console.error(e)}))}};function Ve(e){switch(e){case x.Error:return d.MarkerSeverity.Error;case x.Warning:return d.MarkerSeverity.Warning;case x.Information:return d.MarkerSeverity.Info;case x.Hint:return d.MarkerSeverity.Hint;default:return d.MarkerSeverity.Info}}function je(e,t){let i="number"===typeof t.code?String(t.code):t.code;return{severity:Ve(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}var ze=class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doComplete(o.toString(),Ue(t)))).then((i=>{if(!i)return;const n=e.getWordUntilPosition(t),o=new d.Range(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn),s=i.items.map((e=>{const t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:Ye(e.command),range:o,kind:Ge(e.kind)};return e.textEdit&&(Ke(e.textEdit)?t.range={insert:qe(e.textEdit.insert),replace:qe(e.textEdit.replace)}:t.range=qe(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),e.insertTextFormat===q.Snippet&&(t.insertTextRules=d.languages.CompletionItemInsertTextRule.InsertAsSnippet),t}));return{isIncomplete:i.isIncomplete,suggestions:s}}))}};function Ue(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function $e(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function qe(e){if(e)return new d.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Ke(e){return"undefined"!==typeof e.insert&&"undefined"!==typeof e.replace}function Ge(e){const t=d.languages.CompletionItemKind;switch(e){case $.Text:return t.Text;case $.Method:return t.Method;case $.Function:return t.Function;case $.Constructor:return t.Constructor;case $.Field:return t.Field;case $.Variable:return t.Variable;case $.Class:return t.Class;case $.Interface:return t.Interface;case $.Module:return t.Module;case $.Property:return t.Property;case $.Unit:return t.Unit;case $.Value:return t.Value;case $.Enum:return t.Enum;case $.Keyword:return t.Keyword;case $.Snippet:return t.Snippet;case $.Color:return t.Color;case $.File:return t.File;case $.Reference:return t.Reference}return t.Property}function Qe(e){if(e)return{range:qe(e.range),text:e.newText}}function Ye(e){return e&&"editor.action.triggerSuggest"===e.command?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ze=class{constructor(e){this._worker=e}provideHover(e,t,i){let n=e.uri;return this._worker(n).then((e=>e.doHover(n.toString(),Ue(t)))).then((e=>{if(e)return{range:qe(e.range),contents:et(e.contents)}}))}};function Xe(e){return e&&"object"===typeof e&&"string"===typeof e.kind}function Je(e){return"string"===typeof e?{value:e}:Xe(e)?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"}}function et(e){if(e)return Array.isArray(e)?e.map(Je):[Je(e)]}var tt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDocumentHighlights(n.toString(),Ue(t)))).then((e=>{if(e)return e.map((e=>({range:qe(e.range),kind:it(e.kind)})))}))}};function it(e){switch(e){case ne.Read:return d.languages.DocumentHighlightKind.Read;case ne.Write:return d.languages.DocumentHighlightKind.Write;case ne.Text:return d.languages.DocumentHighlightKind.Text}return d.languages.DocumentHighlightKind.Text}var nt=class{constructor(e){this._worker=e}provideDefinition(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDefinition(n.toString(),Ue(t)))).then((e=>{if(e)return[ot(e)]}))}};function ot(e){return{uri:d.Uri.parse(e.uri),range:qe(e.range)}}var st=class{constructor(e){this._worker=e}provideReferences(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.findReferences(o.toString(),Ue(t)))).then((e=>{if(e)return e.map(ot)}))}},rt=class{constructor(e){this._worker=e}provideRenameEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doRename(o.toString(),Ue(t),i))).then((e=>at(e)))}};function at(e){if(!e||!e.changes)return;let t=[];for(let i in e.changes){const n=d.Uri.parse(i);for(let o of e.changes[i])t.push({resource:n,versionId:void 0,textEdit:{range:qe(o.range),text:o.newText}})}return{edits:t}}var lt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentSymbols(i.toString()))).then((e=>{if(e)return e.map((e=>ct(e)?dt(e):{name:e.name,detail:"",containerName:e.containerName,kind:ut(e.kind),range:qe(e.location.range),selectionRange:qe(e.location.range),tags:[]}))}))}};function ct(e){return"children"in e}function dt(e){return{name:e.name,detail:e.detail??"",kind:ut(e.kind),range:qe(e.range),selectionRange:qe(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map((e=>dt(e)))}}function ut(e){let t=d.languages.SymbolKind;switch(e){case se.File:return t.File;case se.Module:return t.Module;case se.Namespace:return t.Namespace;case se.Package:return t.Package;case se.Class:return t.Class;case se.Method:return t.Method;case se.Property:return t.Property;case se.Field:return t.Field;case se.Constructor:return t.Constructor;case se.Enum:return t.Enum;case se.Interface:return t.Interface;case se.Function:return t.Function;case se.Variable:return t.Variable;case se.Constant:return t.Constant;case se.String:return t.String;case se.Number:return t.Number;case se.Boolean:return t.Boolean;case se.Array:return t.Array}return t.Function}var ht=class{constructor(e){this._worker=e}provideLinks(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentLinks(i.toString()))).then((e=>{if(e)return{links:e.map((e=>({range:qe(e.range),url:e.target})))}}))}},gt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.format(n.toString(),null,ft(t)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}},pt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.format(o.toString(),$e(t),ft(i)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}};function ft(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var mt=class{constructor(e){this._worker=e}provideDocumentColors(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentColors(i.toString()))).then((e=>{if(e)return e.map((e=>({color:e.color,range:qe(e.range)})))}))}provideColorPresentations(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getColorPresentations(n.toString(),t.color,$e(t.range)))).then((e=>{if(e)return e.map((e=>{let t={label:e.label};return e.textEdit&&(t.textEdit=Qe(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),t}))}))}},_t=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getFoldingRanges(n.toString(),t))).then((e=>{if(e)return e.map((e=>{const t={start:e.startLine+1,end:e.endLine+1};return"undefined"!==typeof e.kind&&(t.kind=vt(e.kind)),t}))}))}};function vt(e){switch(e){case C.Comment:return d.languages.FoldingRangeKind.Comment;case C.Imports:return d.languages.FoldingRangeKind.Imports;case C.Region:return d.languages.FoldingRangeKind.Region}}var bt=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getSelectionRanges(n.toString(),t.map(Ue)))).then((e=>{if(e)return e.map((e=>{const t=[];while(e)t.push({range:qe(e.range)}),e=e.parent;return t}))}))}};function yt(e){const t=[],i=[],n=new Fe(e);t.push(n);const o=(...e)=>n.getLanguageServiceWorker(...e);function s(){const{languageId:t,modeConfiguration:n}=e;Ct(i),n.completionItems&&i.push(d.languages.registerCompletionItemProvider(t,new ze(o,["/","-",":"]))),n.hovers&&i.push(d.languages.registerHoverProvider(t,new Ze(o))),n.documentHighlights&&i.push(d.languages.registerDocumentHighlightProvider(t,new tt(o))),n.definitions&&i.push(d.languages.registerDefinitionProvider(t,new nt(o))),n.references&&i.push(d.languages.registerReferenceProvider(t,new st(o))),n.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(t,new lt(o))),n.rename&&i.push(d.languages.registerRenameProvider(t,new rt(o))),n.colors&&i.push(d.languages.registerColorProvider(t,new mt(o))),n.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(t,new _t(o))),n.diagnostics&&i.push(new He(t,o,e.onDidChange)),n.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(t,new bt(o))),n.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(t,new gt(o))),n.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(t,new pt(o)))}return s(),t.push(wt(i)),wt(t)}function wt(e){return{dispose:()=>Ct(e)}}function Ct(e){while(e.length)e.pop().dispose()}},24010:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CompletionAdapter:()=>ze,DefinitionAdapter:()=>nt,DiagnosticsAdapter:()=>He,DocumentColorAdapter:()=>mt,DocumentFormattingEditProvider:()=>gt,DocumentHighlightAdapter:()=>tt,DocumentLinkAdapter:()=>ht,DocumentRangeFormattingEditProvider:()=>pt,DocumentSymbolAdapter:()=>lt,FoldingRangeAdapter:()=>_t,HoverAdapter:()=>Ze,ReferenceAdapter:()=>st,RenameAdapter:()=>rt,SelectionRangeAdapter:()=>bt,WorkerManager:()=>Fe,fromPosition:()=>Ue,fromRange:()=>$e,setupMode:()=>Ct,setupMode1:()=>wt,toRange:()=>qe,toTextEdit:()=>Qe});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/c(d,n);var u,h,g,p,f,m,_,v,b,y,w,C,S,k,x,E,L,T,I,R,D,N,A,O,P,M,F,B,W,H,V,j,z,U,$,q,K,G,Q,Y,Z,X,J,ee,te,ie,ne,oe,se,re,ae,le,ce,de,ue,he,ge,pe,fe,me,_e,ve,be,ye,we,Ce,Se,ke,xe,Ee,Le,Te,Ie,Re,De,Ne,Ae,Oe,Pe,Me=12e4,Fe=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;let e=Date.now()-this._lastUsedTime;e>Me&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=d.editor.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then((e=>{t=e})).then((t=>{if(this._worker)return this._worker.withSyncedResources(e)})).then((e=>t))}};(function(e){function t(e){return"string"===typeof e}e.is=t})(u||(u={})),function(e){function t(e){return"string"===typeof e}e.is=t}(h||(h={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=t}(g||(g={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=t}(p||(p={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}}function i(e){let t=e;return Be.objectLiteral(t)&&Be.uinteger(t.line)&&Be.uinteger(t.character)}e.create=t,e.is=i}(f||(f={})),function(e){function t(e,t,i,n){if(Be.uinteger(e)&&Be.uinteger(t)&&Be.uinteger(i)&&Be.uinteger(n))return{start:f.create(e,t),end:f.create(i,n)};if(f.is(e)&&f.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${n}]`)}function i(e){let t=e;return Be.objectLiteral(t)&&f.is(t.start)&&f.is(t.end)}e.create=t,e.is=i}(m||(m={})),function(e){function t(e,t){return{uri:e,range:t}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.range)&&(Be.string(t.uri)||Be.undefined(t.uri))}e.create=t,e.is=i}(_||(_={})),function(e){function t(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.targetRange)&&Be.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||Be.undefined(t.originSelectionRange))}e.create=t,e.is=i}(v||(v={})),function(e){function t(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.numberRange(t.red,0,1)&&Be.numberRange(t.green,0,1)&&Be.numberRange(t.blue,0,1)&&Be.numberRange(t.alpha,0,1)}e.create=t,e.is=i}(b||(b={})),function(e){function t(e,t){return{range:e,color:t}}function i(e){const t=e;return Be.objectLiteral(t)&&m.is(t.range)&&b.is(t.color)}e.create=t,e.is=i}(y||(y={})),function(e){function t(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.undefined(t.textEdit)||R.is(t))&&(Be.undefined(t.additionalTextEdits)||Be.typedArray(t.additionalTextEdits,R.is))}e.create=t,e.is=i}(w||(w={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(C||(C={})),function(e){function t(e,t,i,n,o,s){const r={startLine:e,endLine:t};return Be.defined(i)&&(r.startCharacter=i),Be.defined(n)&&(r.endCharacter=n),Be.defined(o)&&(r.kind=o),Be.defined(s)&&(r.collapsedText=s),r}function i(e){const t=e;return Be.objectLiteral(t)&&Be.uinteger(t.startLine)&&Be.uinteger(t.startLine)&&(Be.undefined(t.startCharacter)||Be.uinteger(t.startCharacter))&&(Be.undefined(t.endCharacter)||Be.uinteger(t.endCharacter))&&(Be.undefined(t.kind)||Be.string(t.kind))}e.create=t,e.is=i}(S||(S={})),function(e){function t(e,t){return{location:e,message:t}}function i(e){let t=e;return Be.defined(t)&&_.is(t.location)&&Be.string(t.message)}e.create=t,e.is=i}(k||(k={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(x||(x={})),function(e){e.Unnecessary=1,e.Deprecated=2}(E||(E={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.href)}e.is=t}(L||(L={})),function(e){function t(e,t,i,n,o,s){let r={range:e,message:t};return Be.defined(i)&&(r.severity=i),Be.defined(n)&&(r.code=n),Be.defined(o)&&(r.source=o),Be.defined(s)&&(r.relatedInformation=s),r}function i(e){var t;let i=e;return Be.defined(i)&&m.is(i.range)&&Be.string(i.message)&&(Be.number(i.severity)||Be.undefined(i.severity))&&(Be.integer(i.code)||Be.string(i.code)||Be.undefined(i.code))&&(Be.undefined(i.codeDescription)||Be.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(Be.string(i.source)||Be.undefined(i.source))&&(Be.undefined(i.relatedInformation)||Be.typedArray(i.relatedInformation,k.is))}e.create=t,e.is=i}(T||(T={})),function(e){function t(e,t,...i){let n={title:e,command:t};return Be.defined(i)&&i.length>0&&(n.arguments=i),n}function i(e){let t=e;return Be.defined(t)&&Be.string(t.title)&&Be.string(t.command)}e.create=t,e.is=i}(I||(I={})),function(e){function t(e,t){return{range:e,newText:t}}function i(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function o(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.newText)&&m.is(t.range)}e.replace=t,e.insert=i,e.del=n,e.is=o}(R||(R={})),function(e){function t(e,t,i){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Be.string(t.description)||void 0===t.description)}e.create=t,e.is=i}(D||(D={})),function(e){function t(e){const t=e;return Be.string(t)}e.is=t}(N||(N={})),function(e){function t(e,t,i){return{range:e,newText:t,annotationId:i}}function i(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}}function n(e,t){return{range:e,newText:"",annotationId:t}}function o(e){const t=e;return R.is(t)&&(D.is(t.annotationId)||N.is(t.annotationId))}e.replace=t,e.insert=i,e.del=n,e.is=o}(A||(A={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function i(e){let t=e;return Be.defined(t)&&V.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=i}(O||(O={})),function(e){function t(e,t,i){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"create"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(P||(P={})),function(e){function t(e,t,i,n){let o={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(o.options=i),void 0!==n&&(o.annotationId=n),o}function i(e){let t=e;return t&&"rename"===t.kind&&Be.string(t.oldUri)&&Be.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(M||(M={})),function(e){function t(e,t,i){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"delete"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Be.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Be.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(F||(F={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Be.string(e.kind)?P.is(e)||M.is(e)||F.is(e):O.is(e))))}e.is=t}(B||(B={})),function(e){function t(e){return{uri:e}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)}e.create=t,e.is=i}(W||(W={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.integer(t.version)}e.create=t,e.is=i}(H||(H={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&(null===t.version||Be.integer(t.version))}e.create=t,e.is=i}(V||(V={})),function(e){function t(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.string(t.languageId)&&Be.integer(t.version)&&Be.string(t.text)}e.create=t,e.is=i}(j||(j={})),function(e){function t(t){const i=t;return i===e.PlainText||i===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",e.is=t}(z||(z={})),function(e){function t(e){const t=e;return Be.objectLiteral(e)&&z.is(t.kind)&&Be.string(t.value)}e.is=t}(U||(U={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}($||($={})),function(e){e.PlainText=1,e.Snippet=2}(q||(q={})),function(e){e.Deprecated=1}(K||(K={})),function(e){function t(e,t,i){return{newText:e,insert:t,replace:i}}function i(e){const t=e;return t&&Be.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.create=t,e.is=i}(G||(G={})),function(e){e.asIs=1,e.adjustIndentation=2}(Q||(Q={})),function(e){function t(e){const t=e;return t&&(Be.string(t.detail)||void 0===t.detail)&&(Be.string(t.description)||void 0===t.description)}e.is=t}(Y||(Y={})),function(e){function t(e){return{label:e}}e.create=t}(Z||(Z={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(X||(X={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function i(e){const t=e;return Be.string(t)||Be.objectLiteral(t)&&Be.string(t.language)&&Be.string(t.value)}e.fromPlainText=t,e.is=i}(J||(J={})),function(e){function t(e){let t=e;return!!t&&Be.objectLiteral(t)&&(U.is(t.contents)||J.is(t.contents)||Be.typedArray(t.contents,J.is))&&(void 0===e.range||m.is(e.range))}e.is=t}(ee||(ee={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(te||(te={})),function(e){function t(e,t,...i){let n={label:e};return Be.defined(t)&&(n.documentation=t),Be.defined(i)?n.parameters=i:n.parameters=[],n}e.create=t}(ie||(ie={})),function(e){e.Text=1,e.Read=2,e.Write=3}(ne||(ne={})),function(e){function t(e,t){let i={range:e};return Be.number(t)&&(i.kind=t),i}e.create=t}(oe||(oe={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(se||(se={})),function(e){e.Deprecated=1}(re||(re={})),function(e){function t(e,t,i,n,o){let s={name:e,kind:t,location:{uri:n,range:i}};return o&&(s.containerName=o),s}e.create=t}(ae||(ae={})),function(e){function t(e,t,i,n){return void 0!==n?{name:e,kind:t,location:{uri:i,range:n}}:{name:e,kind:t,location:{uri:i}}}e.create=t}(le||(le={})),function(e){function t(e,t,i,n,o,s){let r={name:e,detail:t,kind:i,range:n,selectionRange:o};return void 0!==s&&(r.children=s),r}function i(e){let t=e;return t&&Be.string(t.name)&&Be.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(void 0===t.detail||Be.string(t.detail))&&(void 0===t.deprecated||Be.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=i}(ce||(ce={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(de||(de={})),function(e){e.Invoked=1,e.Automatic=2}(ue||(ue={})),function(e){function t(e,t,i){let n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),void 0!==i&&null!==i&&(n.triggerKind=i),n}function i(e){let t=e;return Be.defined(t)&&Be.typedArray(t.diagnostics,T.is)&&(void 0===t.only||Be.typedArray(t.only,Be.string))&&(void 0===t.triggerKind||t.triggerKind===ue.Invoked||t.triggerKind===ue.Automatic)}e.create=t,e.is=i}(he||(he={})),function(e){function t(e,t,i){let n={title:e},o=!0;return"string"===typeof t?(o=!1,n.kind=t):I.is(t)?n.command=t:n.edit=t,o&&void 0!==i&&(n.kind=i),n}function i(e){let t=e;return t&&Be.string(t.title)&&(void 0===t.diagnostics||Be.typedArray(t.diagnostics,T.is))&&(void 0===t.kind||Be.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||I.is(t.command))&&(void 0===t.isPreferred||Be.boolean(t.isPreferred))&&(void 0===t.edit||B.is(t.edit))}e.create=t,e.is=i}(ge||(ge={})),function(e){function t(e,t){let i={range:e};return Be.defined(t)&&(i.data=t),i}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.command)||I.is(t.command))}e.create=t,e.is=i}(pe||(pe={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function i(e){let t=e;return Be.defined(t)&&Be.uinteger(t.tabSize)&&Be.boolean(t.insertSpaces)}e.create=t,e.is=i}(fe||(fe={})),function(e){function t(e,t,i){return{range:e,target:t,data:i}}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.target)||Be.string(t.target))}e.create=t,e.is=i}(me||(me={})),function(e){function t(e,t){return{range:e,parent:t}}function i(t){let i=t;return Be.objectLiteral(i)&&m.is(i.range)&&(void 0===i.parent||e.is(i.parent))}e.create=t,e.is=i}(_e||(_e={})),function(e){e["namespace"]="namespace",e["type"]="type",e["class"]="class",e["enum"]="enum",e["interface"]="interface",e["struct"]="struct",e["typeParameter"]="typeParameter",e["parameter"]="parameter",e["variable"]="variable",e["property"]="property",e["enumMember"]="enumMember",e["event"]="event",e["function"]="function",e["method"]="method",e["macro"]="macro",e["keyword"]="keyword",e["modifier"]="modifier",e["comment"]="comment",e["string"]="string",e["number"]="number",e["regexp"]="regexp",e["operator"]="operator",e["decorator"]="decorator"}(ve||(ve={})),function(e){e["declaration"]="declaration",e["definition"]="definition",e["readonly"]="readonly",e["static"]="static",e["deprecated"]="deprecated",e["abstract"]="abstract",e["async"]="async",e["modification"]="modification",e["documentation"]="documentation",e["defaultLibrary"]="defaultLibrary"}(be||(be={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.resultId||"string"===typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"===typeof t.data[0])}e.is=t}(ye||(ye={})),function(e){function t(e,t){return{range:e,text:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.string(t.text)}e.create=t,e.is=i}(we||(we={})),function(e){function t(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.boolean(t.caseSensitiveLookup)&&(Be.string(t.variableName)||void 0===t.variableName)}e.create=t,e.is=i}(Ce||(Ce={})),function(e){function t(e,t){return{range:e,expression:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&(Be.string(t.expression)||void 0===t.expression)}e.create=t,e.is=i}(Se||(Se={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function i(e){const t=e;return Be.defined(t)&&m.is(e.stoppedLocation)}e.create=t,e.is=i}(ke||(ke={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,e.is=t}(xe||(xe={})),function(e){function t(e){return{value:e}}function i(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.location||_.is(t.location))&&(void 0===t.command||I.is(t.command))}e.create=t,e.is=i}(Ee||(Ee={})),function(e){function t(e,t,i){const n={position:e,label:t};return void 0!==i&&(n.kind=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&f.is(t.position)&&(Be.string(t.label)||Be.typedArray(t.label,Ee.is))&&(void 0===t.kind||xe.is(t.kind))&&void 0===t.textEdits||Be.typedArray(t.textEdits,R.is)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.paddingLeft||Be.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Be.boolean(t.paddingRight))}e.create=t,e.is=i}(Le||(Le={})),function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t}(Te||(Te={})),function(e){function t(e,t,i,n){return{insertText:e,filterText:t,range:i,command:n}}e.create=t}(Ie||(Ie={})),function(e){function t(e){return{items:e}}e.create=t}(Re||(Re={})),function(e){e.Invoked=0,e.Automatic=1}(De||(De={})),function(e){function t(e,t){return{range:e,text:t}}e.create=t}(Ne||(Ne={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t}(Ae||(Ae={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&h.is(t.uri)&&Be.string(t.name)}e.is=t}(Oe||(Oe={})),function(e){function t(e,t,i,n){return new We(e,t,i,n)}function i(e){let t=e;return!!(Be.defined(t)&&Be.string(t.uri)&&(Be.undefined(t.languageId)||Be.string(t.languageId))&&Be.uinteger(t.lineCount)&&Be.func(t.getText)&&Be.func(t.positionAt)&&Be.func(t.offsetAt))}function n(e,t){let i=e.getText(),n=o(t,((e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i})),s=i.length;for(let o=n.length-1;o>=0;o--){let t=n[o],r=e.offsetAt(t.range.start),a=e.offsetAt(t.range.end);if(!(a<=s))throw new Error("Overlapping edit");i=i.substring(0,r)+t.newText+i.substring(a,i.length),s=r}return i}function o(e,t){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),s=e.slice(i);o(n,t),o(s,t);let r=0,a=0,l=0;while(r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),i=0,n=t.length;if(0===n)return f.create(0,e);while(ie?n=o:i=o+1}let o=i-1;return f.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],n=e.line+1{let t,i=e.getLanguageId();i===this._languageId&&(this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(t),t=window.setTimeout((()=>this._doValidate(e.uri,i)),500)})),this._doValidate(e.uri,i))},o=e=>{d.editor.setModelMarkers(e,this._languageId,[]);let t=e.uri.toString(),i=this._listener[t];i&&(i.dispose(),delete this._listener[t])};this._disposables.push(d.editor.onDidCreateModel(n)),this._disposables.push(d.editor.onWillDisposeModel(o)),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{o(e.model),n(e.model)}))),this._disposables.push(i((e=>{d.editor.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),n(e))}))}))),this._disposables.push({dispose:()=>{d.editor.getModels().forEach(o);for(let e in this._listener)this._listener[e].dispose()}}),d.editor.getModels().forEach(n)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables.length=0}_doValidate(e,t){this._worker(e).then((t=>t.doValidation(e.toString()))).then((i=>{const n=i.map((t=>je(e,t)));let o=d.editor.getModel(e);o&&o.getLanguageId()===t&&d.editor.setModelMarkers(o,t,n)})).then(void 0,(e=>{console.error(e)}))}};function Ve(e){switch(e){case x.Error:return d.MarkerSeverity.Error;case x.Warning:return d.MarkerSeverity.Warning;case x.Information:return d.MarkerSeverity.Info;case x.Hint:return d.MarkerSeverity.Hint;default:return d.MarkerSeverity.Info}}function je(e,t){let i="number"===typeof t.code?String(t.code):t.code;return{severity:Ve(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}var ze=class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doComplete(o.toString(),Ue(t)))).then((i=>{if(!i)return;const n=e.getWordUntilPosition(t),o=new d.Range(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn),s=i.items.map((e=>{const t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:Ye(e.command),range:o,kind:Ge(e.kind)};return e.textEdit&&(Ke(e.textEdit)?t.range={insert:qe(e.textEdit.insert),replace:qe(e.textEdit.replace)}:t.range=qe(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),e.insertTextFormat===q.Snippet&&(t.insertTextRules=d.languages.CompletionItemInsertTextRule.InsertAsSnippet),t}));return{isIncomplete:i.isIncomplete,suggestions:s}}))}};function Ue(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function $e(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function qe(e){if(e)return new d.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Ke(e){return"undefined"!==typeof e.insert&&"undefined"!==typeof e.replace}function Ge(e){const t=d.languages.CompletionItemKind;switch(e){case $.Text:return t.Text;case $.Method:return t.Method;case $.Function:return t.Function;case $.Constructor:return t.Constructor;case $.Field:return t.Field;case $.Variable:return t.Variable;case $.Class:return t.Class;case $.Interface:return t.Interface;case $.Module:return t.Module;case $.Property:return t.Property;case $.Unit:return t.Unit;case $.Value:return t.Value;case $.Enum:return t.Enum;case $.Keyword:return t.Keyword;case $.Snippet:return t.Snippet;case $.Color:return t.Color;case $.File:return t.File;case $.Reference:return t.Reference}return t.Property}function Qe(e){if(e)return{range:qe(e.range),text:e.newText}}function Ye(e){return e&&"editor.action.triggerSuggest"===e.command?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ze=class{constructor(e){this._worker=e}provideHover(e,t,i){let n=e.uri;return this._worker(n).then((e=>e.doHover(n.toString(),Ue(t)))).then((e=>{if(e)return{range:qe(e.range),contents:et(e.contents)}}))}};function Xe(e){return e&&"object"===typeof e&&"string"===typeof e.kind}function Je(e){return"string"===typeof e?{value:e}:Xe(e)?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"}}function et(e){if(e)return Array.isArray(e)?e.map(Je):[Je(e)]}var tt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDocumentHighlights(n.toString(),Ue(t)))).then((e=>{if(e)return e.map((e=>({range:qe(e.range),kind:it(e.kind)})))}))}};function it(e){switch(e){case ne.Read:return d.languages.DocumentHighlightKind.Read;case ne.Write:return d.languages.DocumentHighlightKind.Write;case ne.Text:return d.languages.DocumentHighlightKind.Text}return d.languages.DocumentHighlightKind.Text}var nt=class{constructor(e){this._worker=e}provideDefinition(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDefinition(n.toString(),Ue(t)))).then((e=>{if(e)return[ot(e)]}))}};function ot(e){return{uri:d.Uri.parse(e.uri),range:qe(e.range)}}var st=class{constructor(e){this._worker=e}provideReferences(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.findReferences(o.toString(),Ue(t)))).then((e=>{if(e)return e.map(ot)}))}},rt=class{constructor(e){this._worker=e}provideRenameEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doRename(o.toString(),Ue(t),i))).then((e=>at(e)))}};function at(e){if(!e||!e.changes)return;let t=[];for(let i in e.changes){const n=d.Uri.parse(i);for(let o of e.changes[i])t.push({resource:n,versionId:void 0,textEdit:{range:qe(o.range),text:o.newText}})}return{edits:t}}var lt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentSymbols(i.toString()))).then((e=>{if(e)return e.map((e=>ct(e)?dt(e):{name:e.name,detail:"",containerName:e.containerName,kind:ut(e.kind),range:qe(e.location.range),selectionRange:qe(e.location.range),tags:[]}))}))}};function ct(e){return"children"in e}function dt(e){return{name:e.name,detail:e.detail??"",kind:ut(e.kind),range:qe(e.range),selectionRange:qe(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map((e=>dt(e)))}}function ut(e){let t=d.languages.SymbolKind;switch(e){case se.File:return t.File;case se.Module:return t.Module;case se.Namespace:return t.Namespace;case se.Package:return t.Package;case se.Class:return t.Class;case se.Method:return t.Method;case se.Property:return t.Property;case se.Field:return t.Field;case se.Constructor:return t.Constructor;case se.Enum:return t.Enum;case se.Interface:return t.Interface;case se.Function:return t.Function;case se.Variable:return t.Variable;case se.Constant:return t.Constant;case se.String:return t.String;case se.Number:return t.Number;case se.Boolean:return t.Boolean;case se.Array:return t.Array}return t.Function}var ht=class{constructor(e){this._worker=e}provideLinks(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentLinks(i.toString()))).then((e=>{if(e)return{links:e.map((e=>({range:qe(e.range),url:e.target})))}}))}},gt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.format(n.toString(),null,ft(t)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}},pt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.format(o.toString(),$e(t),ft(i)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}};function ft(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var mt=class{constructor(e){this._worker=e}provideDocumentColors(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentColors(i.toString()))).then((e=>{if(e)return e.map((e=>({color:e.color,range:qe(e.range)})))}))}provideColorPresentations(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getColorPresentations(n.toString(),t.color,$e(t.range)))).then((e=>{if(e)return e.map((e=>{let t={label:e.label};return e.textEdit&&(t.textEdit=Qe(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),t}))}))}},_t=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getFoldingRanges(n.toString(),t))).then((e=>{if(e)return e.map((e=>{const t={start:e.startLine+1,end:e.endLine+1};return"undefined"!==typeof e.kind&&(t.kind=vt(e.kind)),t}))}))}};function vt(e){switch(e){case C.Comment:return d.languages.FoldingRangeKind.Comment;case C.Imports:return d.languages.FoldingRangeKind.Imports;case C.Region:return d.languages.FoldingRangeKind.Region}}var bt=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getSelectionRanges(n.toString(),t.map(Ue)))).then((e=>{if(e)return e.map((e=>{const t=[];while(e)t.push({range:qe(e.range)}),e=e.parent;return t}))}))}},yt=class extends ze{constructor(e){super(e,[".",":","<",'"',"=","/"])}};function wt(e){const t=new Fe(e),i=(...e)=>t.getLanguageServiceWorker(...e);let n=e.languageId;d.languages.registerCompletionItemProvider(n,new yt(i)),d.languages.registerHoverProvider(n,new Ze(i)),d.languages.registerDocumentHighlightProvider(n,new tt(i)),d.languages.registerLinkProvider(n,new ht(i)),d.languages.registerFoldingRangeProvider(n,new _t(i)),d.languages.registerDocumentSymbolProvider(n,new lt(i)),d.languages.registerSelectionRangeProvider(n,new bt(i)),d.languages.registerRenameProvider(n,new rt(i)),"html"===n&&(d.languages.registerDocumentFormattingEditProvider(n,new gt(i)),d.languages.registerDocumentRangeFormattingEditProvider(n,new pt(i)))}function Ct(e){const t=[],i=[],n=new Fe(e);t.push(n);const o=(...e)=>n.getLanguageServiceWorker(...e);function s(){const{languageId:t,modeConfiguration:n}=e;kt(i),n.completionItems&&i.push(d.languages.registerCompletionItemProvider(t,new yt(o))),n.hovers&&i.push(d.languages.registerHoverProvider(t,new Ze(o))),n.documentHighlights&&i.push(d.languages.registerDocumentHighlightProvider(t,new tt(o))),n.links&&i.push(d.languages.registerLinkProvider(t,new ht(o))),n.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(t,new lt(o))),n.rename&&i.push(d.languages.registerRenameProvider(t,new rt(o))),n.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(t,new _t(o))),n.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(t,new bt(o))),n.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(t,new gt(o))),n.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(t,new pt(o)))}return s(),t.push(St(i)),St(t)}function St(e){return{dispose:()=>kt(e)}}function kt(e){while(e.length)e.pop().dispose()}},75368:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CompletionAdapter:()=>ze,DefinitionAdapter:()=>nt,DiagnosticsAdapter:()=>He,DocumentColorAdapter:()=>mt,DocumentFormattingEditProvider:()=>gt,DocumentHighlightAdapter:()=>tt,DocumentLinkAdapter:()=>ht,DocumentRangeFormattingEditProvider:()=>pt,DocumentSymbolAdapter:()=>lt,FoldingRangeAdapter:()=>_t,HoverAdapter:()=>Ze,ReferenceAdapter:()=>st,RenameAdapter:()=>rt,SelectionRangeAdapter:()=>yt,WorkerManager:()=>Fe,fromPosition:()=>Ue,fromRange:()=>$e,getWorker:()=>Kt,setupMode:()=>Qt,toRange:()=>qe,toTextEdit:()=>Qe});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; + *-----------------------------------------------------------------------------*/c(d,n);var u,h,g,p,f,m,_,v,b,y,w,C,S,k,x,E,L,T,I,D,R,N,A,O,P,M,F,B,W,H,V,j,z,U,$,q,K,G,Q,Y,Z,X,J,ee,te,ie,ne,oe,se,re,ae,le,ce,de,ue,he,ge,pe,fe,me,_e,ve,be,ye,we,Ce,Se,ke,xe,Ee,Le,Te,Ie,De,Re,Ne,Ae,Oe,Pe,Me=12e4,Fe=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;let e=Date.now()-this._lastUsedTime;e>Me&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=d.editor.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then((e=>{t=e})).then((t=>{if(this._worker)return this._worker.withSyncedResources(e)})).then((e=>t))}};(function(e){function t(e){return"string"===typeof e}e.is=t})(u||(u={})),function(e){function t(e){return"string"===typeof e}e.is=t}(h||(h={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=t}(g||(g={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=t}(p||(p={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}}function i(e){let t=e;return Be.objectLiteral(t)&&Be.uinteger(t.line)&&Be.uinteger(t.character)}e.create=t,e.is=i}(f||(f={})),function(e){function t(e,t,i,n){if(Be.uinteger(e)&&Be.uinteger(t)&&Be.uinteger(i)&&Be.uinteger(n))return{start:f.create(e,t),end:f.create(i,n)};if(f.is(e)&&f.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${n}]`)}function i(e){let t=e;return Be.objectLiteral(t)&&f.is(t.start)&&f.is(t.end)}e.create=t,e.is=i}(m||(m={})),function(e){function t(e,t){return{uri:e,range:t}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.range)&&(Be.string(t.uri)||Be.undefined(t.uri))}e.create=t,e.is=i}(_||(_={})),function(e){function t(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.targetRange)&&Be.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||Be.undefined(t.originSelectionRange))}e.create=t,e.is=i}(v||(v={})),function(e){function t(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.numberRange(t.red,0,1)&&Be.numberRange(t.green,0,1)&&Be.numberRange(t.blue,0,1)&&Be.numberRange(t.alpha,0,1)}e.create=t,e.is=i}(b||(b={})),function(e){function t(e,t){return{range:e,color:t}}function i(e){const t=e;return Be.objectLiteral(t)&&m.is(t.range)&&b.is(t.color)}e.create=t,e.is=i}(y||(y={})),function(e){function t(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.undefined(t.textEdit)||D.is(t))&&(Be.undefined(t.additionalTextEdits)||Be.typedArray(t.additionalTextEdits,D.is))}e.create=t,e.is=i}(w||(w={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(C||(C={})),function(e){function t(e,t,i,n,o,s){const r={startLine:e,endLine:t};return Be.defined(i)&&(r.startCharacter=i),Be.defined(n)&&(r.endCharacter=n),Be.defined(o)&&(r.kind=o),Be.defined(s)&&(r.collapsedText=s),r}function i(e){const t=e;return Be.objectLiteral(t)&&Be.uinteger(t.startLine)&&Be.uinteger(t.startLine)&&(Be.undefined(t.startCharacter)||Be.uinteger(t.startCharacter))&&(Be.undefined(t.endCharacter)||Be.uinteger(t.endCharacter))&&(Be.undefined(t.kind)||Be.string(t.kind))}e.create=t,e.is=i}(S||(S={})),function(e){function t(e,t){return{location:e,message:t}}function i(e){let t=e;return Be.defined(t)&&_.is(t.location)&&Be.string(t.message)}e.create=t,e.is=i}(k||(k={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(x||(x={})),function(e){e.Unnecessary=1,e.Deprecated=2}(E||(E={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.href)}e.is=t}(L||(L={})),function(e){function t(e,t,i,n,o,s){let r={range:e,message:t};return Be.defined(i)&&(r.severity=i),Be.defined(n)&&(r.code=n),Be.defined(o)&&(r.source=o),Be.defined(s)&&(r.relatedInformation=s),r}function i(e){var t;let i=e;return Be.defined(i)&&m.is(i.range)&&Be.string(i.message)&&(Be.number(i.severity)||Be.undefined(i.severity))&&(Be.integer(i.code)||Be.string(i.code)||Be.undefined(i.code))&&(Be.undefined(i.codeDescription)||Be.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(Be.string(i.source)||Be.undefined(i.source))&&(Be.undefined(i.relatedInformation)||Be.typedArray(i.relatedInformation,k.is))}e.create=t,e.is=i}(T||(T={})),function(e){function t(e,t,...i){let n={title:e,command:t};return Be.defined(i)&&i.length>0&&(n.arguments=i),n}function i(e){let t=e;return Be.defined(t)&&Be.string(t.title)&&Be.string(t.command)}e.create=t,e.is=i}(I||(I={})),function(e){function t(e,t){return{range:e,newText:t}}function i(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function o(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.newText)&&m.is(t.range)}e.replace=t,e.insert=i,e.del=n,e.is=o}(D||(D={})),function(e){function t(e,t,i){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Be.string(t.description)||void 0===t.description)}e.create=t,e.is=i}(R||(R={})),function(e){function t(e){const t=e;return Be.string(t)}e.is=t}(N||(N={})),function(e){function t(e,t,i){return{range:e,newText:t,annotationId:i}}function i(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}}function n(e,t){return{range:e,newText:"",annotationId:t}}function o(e){const t=e;return D.is(t)&&(R.is(t.annotationId)||N.is(t.annotationId))}e.replace=t,e.insert=i,e.del=n,e.is=o}(A||(A={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function i(e){let t=e;return Be.defined(t)&&V.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=i}(O||(O={})),function(e){function t(e,t,i){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"create"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(P||(P={})),function(e){function t(e,t,i,n){let o={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(o.options=i),void 0!==n&&(o.annotationId=n),o}function i(e){let t=e;return t&&"rename"===t.kind&&Be.string(t.oldUri)&&Be.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(M||(M={})),function(e){function t(e,t,i){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"delete"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Be.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Be.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(F||(F={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Be.string(e.kind)?P.is(e)||M.is(e)||F.is(e):O.is(e))))}e.is=t}(B||(B={})),function(e){function t(e){return{uri:e}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)}e.create=t,e.is=i}(W||(W={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.integer(t.version)}e.create=t,e.is=i}(H||(H={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&(null===t.version||Be.integer(t.version))}e.create=t,e.is=i}(V||(V={})),function(e){function t(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.string(t.languageId)&&Be.integer(t.version)&&Be.string(t.text)}e.create=t,e.is=i}(j||(j={})),function(e){function t(t){const i=t;return i===e.PlainText||i===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",e.is=t}(z||(z={})),function(e){function t(e){const t=e;return Be.objectLiteral(e)&&z.is(t.kind)&&Be.string(t.value)}e.is=t}(U||(U={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}($||($={})),function(e){e.PlainText=1,e.Snippet=2}(q||(q={})),function(e){e.Deprecated=1}(K||(K={})),function(e){function t(e,t,i){return{newText:e,insert:t,replace:i}}function i(e){const t=e;return t&&Be.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.create=t,e.is=i}(G||(G={})),function(e){e.asIs=1,e.adjustIndentation=2}(Q||(Q={})),function(e){function t(e){const t=e;return t&&(Be.string(t.detail)||void 0===t.detail)&&(Be.string(t.description)||void 0===t.description)}e.is=t}(Y||(Y={})),function(e){function t(e){return{label:e}}e.create=t}(Z||(Z={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(X||(X={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function i(e){const t=e;return Be.string(t)||Be.objectLiteral(t)&&Be.string(t.language)&&Be.string(t.value)}e.fromPlainText=t,e.is=i}(J||(J={})),function(e){function t(e){let t=e;return!!t&&Be.objectLiteral(t)&&(U.is(t.contents)||J.is(t.contents)||Be.typedArray(t.contents,J.is))&&(void 0===e.range||m.is(e.range))}e.is=t}(ee||(ee={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(te||(te={})),function(e){function t(e,t,...i){let n={label:e};return Be.defined(t)&&(n.documentation=t),Be.defined(i)?n.parameters=i:n.parameters=[],n}e.create=t}(ie||(ie={})),function(e){e.Text=1,e.Read=2,e.Write=3}(ne||(ne={})),function(e){function t(e,t){let i={range:e};return Be.number(t)&&(i.kind=t),i}e.create=t}(oe||(oe={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(se||(se={})),function(e){e.Deprecated=1}(re||(re={})),function(e){function t(e,t,i,n,o){let s={name:e,kind:t,location:{uri:n,range:i}};return o&&(s.containerName=o),s}e.create=t}(ae||(ae={})),function(e){function t(e,t,i,n){return void 0!==n?{name:e,kind:t,location:{uri:i,range:n}}:{name:e,kind:t,location:{uri:i}}}e.create=t}(le||(le={})),function(e){function t(e,t,i,n,o,s){let r={name:e,detail:t,kind:i,range:n,selectionRange:o};return void 0!==s&&(r.children=s),r}function i(e){let t=e;return t&&Be.string(t.name)&&Be.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(void 0===t.detail||Be.string(t.detail))&&(void 0===t.deprecated||Be.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=i}(ce||(ce={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(de||(de={})),function(e){e.Invoked=1,e.Automatic=2}(ue||(ue={})),function(e){function t(e,t,i){let n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),void 0!==i&&null!==i&&(n.triggerKind=i),n}function i(e){let t=e;return Be.defined(t)&&Be.typedArray(t.diagnostics,T.is)&&(void 0===t.only||Be.typedArray(t.only,Be.string))&&(void 0===t.triggerKind||t.triggerKind===ue.Invoked||t.triggerKind===ue.Automatic)}e.create=t,e.is=i}(he||(he={})),function(e){function t(e,t,i){let n={title:e},o=!0;return"string"===typeof t?(o=!1,n.kind=t):I.is(t)?n.command=t:n.edit=t,o&&void 0!==i&&(n.kind=i),n}function i(e){let t=e;return t&&Be.string(t.title)&&(void 0===t.diagnostics||Be.typedArray(t.diagnostics,T.is))&&(void 0===t.kind||Be.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||I.is(t.command))&&(void 0===t.isPreferred||Be.boolean(t.isPreferred))&&(void 0===t.edit||B.is(t.edit))}e.create=t,e.is=i}(ge||(ge={})),function(e){function t(e,t){let i={range:e};return Be.defined(t)&&(i.data=t),i}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.command)||I.is(t.command))}e.create=t,e.is=i}(pe||(pe={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function i(e){let t=e;return Be.defined(t)&&Be.uinteger(t.tabSize)&&Be.boolean(t.insertSpaces)}e.create=t,e.is=i}(fe||(fe={})),function(e){function t(e,t,i){return{range:e,target:t,data:i}}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.target)||Be.string(t.target))}e.create=t,e.is=i}(me||(me={})),function(e){function t(e,t){return{range:e,parent:t}}function i(t){let i=t;return Be.objectLiteral(i)&&m.is(i.range)&&(void 0===i.parent||e.is(i.parent))}e.create=t,e.is=i}(_e||(_e={})),function(e){e["namespace"]="namespace",e["type"]="type",e["class"]="class",e["enum"]="enum",e["interface"]="interface",e["struct"]="struct",e["typeParameter"]="typeParameter",e["parameter"]="parameter",e["variable"]="variable",e["property"]="property",e["enumMember"]="enumMember",e["event"]="event",e["function"]="function",e["method"]="method",e["macro"]="macro",e["keyword"]="keyword",e["modifier"]="modifier",e["comment"]="comment",e["string"]="string",e["number"]="number",e["regexp"]="regexp",e["operator"]="operator",e["decorator"]="decorator"}(ve||(ve={})),function(e){e["declaration"]="declaration",e["definition"]="definition",e["readonly"]="readonly",e["static"]="static",e["deprecated"]="deprecated",e["abstract"]="abstract",e["async"]="async",e["modification"]="modification",e["documentation"]="documentation",e["defaultLibrary"]="defaultLibrary"}(be||(be={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.resultId||"string"===typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"===typeof t.data[0])}e.is=t}(ye||(ye={})),function(e){function t(e,t){return{range:e,text:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.string(t.text)}e.create=t,e.is=i}(we||(we={})),function(e){function t(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.boolean(t.caseSensitiveLookup)&&(Be.string(t.variableName)||void 0===t.variableName)}e.create=t,e.is=i}(Ce||(Ce={})),function(e){function t(e,t){return{range:e,expression:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&(Be.string(t.expression)||void 0===t.expression)}e.create=t,e.is=i}(Se||(Se={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function i(e){const t=e;return Be.defined(t)&&m.is(e.stoppedLocation)}e.create=t,e.is=i}(ke||(ke={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,e.is=t}(xe||(xe={})),function(e){function t(e){return{value:e}}function i(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.location||_.is(t.location))&&(void 0===t.command||I.is(t.command))}e.create=t,e.is=i}(Ee||(Ee={})),function(e){function t(e,t,i){const n={position:e,label:t};return void 0!==i&&(n.kind=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&f.is(t.position)&&(Be.string(t.label)||Be.typedArray(t.label,Ee.is))&&(void 0===t.kind||xe.is(t.kind))&&void 0===t.textEdits||Be.typedArray(t.textEdits,D.is)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.paddingLeft||Be.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Be.boolean(t.paddingRight))}e.create=t,e.is=i}(Le||(Le={})),function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t}(Te||(Te={})),function(e){function t(e,t,i,n){return{insertText:e,filterText:t,range:i,command:n}}e.create=t}(Ie||(Ie={})),function(e){function t(e){return{items:e}}e.create=t}(De||(De={})),function(e){e.Invoked=0,e.Automatic=1}(Re||(Re={})),function(e){function t(e,t){return{range:e,text:t}}e.create=t}(Ne||(Ne={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t}(Ae||(Ae={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&h.is(t.uri)&&Be.string(t.name)}e.is=t}(Oe||(Oe={})),function(e){function t(e,t,i,n){return new We(e,t,i,n)}function i(e){let t=e;return!!(Be.defined(t)&&Be.string(t.uri)&&(Be.undefined(t.languageId)||Be.string(t.languageId))&&Be.uinteger(t.lineCount)&&Be.func(t.getText)&&Be.func(t.positionAt)&&Be.func(t.offsetAt))}function n(e,t){let i=e.getText(),n=o(t,((e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i})),s=i.length;for(let t=n.length-1;t>=0;t--){let o=n[t],r=e.offsetAt(o.range.start),a=e.offsetAt(o.range.end);if(!(a<=s))throw new Error("Overlapping edit");i=i.substring(0,r)+o.newText+i.substring(a,i.length),s=r}return i}function o(e,t){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),s=e.slice(i);o(n,t),o(s,t);let r=0,a=0,l=0;while(r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),i=0,n=t.length;if(0===n)return f.create(0,e);while(ie?n=o:i=o+1}let o=i-1;return f.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],n=e.line+1{let t,i=e.getLanguageId();i===this._languageId&&(this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(t),t=window.setTimeout((()=>this._doValidate(e.uri,i)),500)})),this._doValidate(e.uri,i))},o=e=>{d.editor.setModelMarkers(e,this._languageId,[]);let t=e.uri.toString(),i=this._listener[t];i&&(i.dispose(),delete this._listener[t])};this._disposables.push(d.editor.onDidCreateModel(n)),this._disposables.push(d.editor.onWillDisposeModel(o)),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{o(e.model),n(e.model)}))),this._disposables.push(i((e=>{d.editor.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),n(e))}))}))),this._disposables.push({dispose:()=>{d.editor.getModels().forEach(o);for(let e in this._listener)this._listener[e].dispose()}}),d.editor.getModels().forEach(n)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables.length=0}_doValidate(e,t){this._worker(e).then((t=>t.doValidation(e.toString()))).then((i=>{const n=i.map((t=>je(e,t)));let o=d.editor.getModel(e);o&&o.getLanguageId()===t&&d.editor.setModelMarkers(o,t,n)})).then(void 0,(e=>{console.error(e)}))}};function Ve(e){switch(e){case x.Error:return d.MarkerSeverity.Error;case x.Warning:return d.MarkerSeverity.Warning;case x.Information:return d.MarkerSeverity.Info;case x.Hint:return d.MarkerSeverity.Hint;default:return d.MarkerSeverity.Info}}function je(e,t){let i="number"===typeof t.code?String(t.code):t.code;return{severity:Ve(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}var ze=class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doComplete(o.toString(),Ue(t)))).then((i=>{if(!i)return;const n=e.getWordUntilPosition(t),o=new d.Range(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn),s=i.items.map((e=>{const t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:Ye(e.command),range:o,kind:Ge(e.kind)};return e.textEdit&&(Ke(e.textEdit)?t.range={insert:qe(e.textEdit.insert),replace:qe(e.textEdit.replace)}:t.range=qe(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),e.insertTextFormat===q.Snippet&&(t.insertTextRules=d.languages.CompletionItemInsertTextRule.InsertAsSnippet),t}));return{isIncomplete:i.isIncomplete,suggestions:s}}))}};function Ue(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function $e(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function qe(e){if(e)return new d.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Ke(e){return"undefined"!==typeof e.insert&&"undefined"!==typeof e.replace}function Ge(e){const t=d.languages.CompletionItemKind;switch(e){case $.Text:return t.Text;case $.Method:return t.Method;case $.Function:return t.Function;case $.Constructor:return t.Constructor;case $.Field:return t.Field;case $.Variable:return t.Variable;case $.Class:return t.Class;case $.Interface:return t.Interface;case $.Module:return t.Module;case $.Property:return t.Property;case $.Unit:return t.Unit;case $.Value:return t.Value;case $.Enum:return t.Enum;case $.Keyword:return t.Keyword;case $.Snippet:return t.Snippet;case $.Color:return t.Color;case $.File:return t.File;case $.Reference:return t.Reference}return t.Property}function Qe(e){if(e)return{range:qe(e.range),text:e.newText}}function Ye(e){return e&&"editor.action.triggerSuggest"===e.command?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ze=class{constructor(e){this._worker=e}provideHover(e,t,i){let n=e.uri;return this._worker(n).then((e=>e.doHover(n.toString(),Ue(t)))).then((e=>{if(e)return{range:qe(e.range),contents:et(e.contents)}}))}};function Xe(e){return e&&"object"===typeof e&&"string"===typeof e.kind}function Je(e){return"string"===typeof e?{value:e}:Xe(e)?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"}}function et(e){if(e)return Array.isArray(e)?e.map(Je):[Je(e)]}var tt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDocumentHighlights(n.toString(),Ue(t)))).then((e=>{if(e)return e.map((e=>({range:qe(e.range),kind:it(e.kind)})))}))}};function it(e){switch(e){case ne.Read:return d.languages.DocumentHighlightKind.Read;case ne.Write:return d.languages.DocumentHighlightKind.Write;case ne.Text:return d.languages.DocumentHighlightKind.Text}return d.languages.DocumentHighlightKind.Text}var nt=class{constructor(e){this._worker=e}provideDefinition(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDefinition(n.toString(),Ue(t)))).then((e=>{if(e)return[ot(e)]}))}};function ot(e){return{uri:d.Uri.parse(e.uri),range:qe(e.range)}}var st=class{constructor(e){this._worker=e}provideReferences(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.findReferences(o.toString(),Ue(t)))).then((e=>{if(e)return e.map(ot)}))}},rt=class{constructor(e){this._worker=e}provideRenameEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doRename(o.toString(),Ue(t),i))).then((e=>at(e)))}};function at(e){if(!e||!e.changes)return;let t=[];for(let i in e.changes){const n=d.Uri.parse(i);for(let o of e.changes[i])t.push({resource:n,versionId:void 0,textEdit:{range:qe(o.range),text:o.newText}})}return{edits:t}}var lt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentSymbols(i.toString()))).then((e=>{if(e)return e.map((e=>ct(e)?dt(e):{name:e.name,detail:"",containerName:e.containerName,kind:ut(e.kind),range:qe(e.location.range),selectionRange:qe(e.location.range),tags:[]}))}))}};function ct(e){return"children"in e}function dt(e){return{name:e.name,detail:e.detail??"",kind:ut(e.kind),range:qe(e.range),selectionRange:qe(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map((e=>dt(e)))}}function ut(e){let t=d.languages.SymbolKind;switch(e){case se.File:return t.File;case se.Module:return t.Module;case se.Namespace:return t.Namespace;case se.Package:return t.Package;case se.Class:return t.Class;case se.Method:return t.Method;case se.Property:return t.Property;case se.Field:return t.Field;case se.Constructor:return t.Constructor;case se.Enum:return t.Enum;case se.Interface:return t.Interface;case se.Function:return t.Function;case se.Variable:return t.Variable;case se.Constant:return t.Constant;case se.String:return t.String;case se.Number:return t.Number;case se.Boolean:return t.Boolean;case se.Array:return t.Array}return t.Function}var ht=class{constructor(e){this._worker=e}provideLinks(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentLinks(i.toString()))).then((e=>{if(e)return{links:e.map((e=>({range:qe(e.range),url:e.target})))}}))}},gt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.format(n.toString(),null,ft(t)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}},pt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.format(o.toString(),$e(t),ft(i)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}};function ft(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var mt=class{constructor(e){this._worker=e}provideDocumentColors(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentColors(i.toString()))).then((e=>{if(e)return e.map((e=>({color:e.color,range:qe(e.range)})))}))}provideColorPresentations(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getColorPresentations(n.toString(),t.color,$e(t.range)))).then((e=>{if(e)return e.map((e=>{let t={label:e.label};return e.textEdit&&(t.textEdit=Qe(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),t}))}))}},_t=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getFoldingRanges(n.toString(),t))).then((e=>{if(e)return e.map((e=>{const t={start:e.startLine+1,end:e.endLine+1};return"undefined"!==typeof e.kind&&(t.kind=vt(e.kind)),t}))}))}};function vt(e){switch(e){case C.Comment:return d.languages.FoldingRangeKind.Comment;case C.Imports:return d.languages.FoldingRangeKind.Imports;case C.Region:return d.languages.FoldingRangeKind.Region}}var bt=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getSelectionRanges(n.toString(),t.map(Ue)))).then((e=>{if(e)return e.map((e=>{const t=[];while(e)t.push({range:qe(e.range)}),e=e.parent;return t}))}))}},yt=class extends ze{constructor(e){super(e,[".",":","<",'"',"=","/"])}};function wt(e){const t=new Fe(e),i=(...e)=>t.getLanguageServiceWorker(...e);let n=e.languageId;d.languages.registerCompletionItemProvider(n,new yt(i)),d.languages.registerHoverProvider(n,new Ze(i)),d.languages.registerDocumentHighlightProvider(n,new tt(i)),d.languages.registerLinkProvider(n,new ht(i)),d.languages.registerFoldingRangeProvider(n,new _t(i)),d.languages.registerDocumentSymbolProvider(n,new lt(i)),d.languages.registerSelectionRangeProvider(n,new bt(i)),d.languages.registerRenameProvider(n,new rt(i)),"html"===n&&(d.languages.registerDocumentFormattingEditProvider(n,new gt(i)),d.languages.registerDocumentRangeFormattingEditProvider(n,new pt(i)))}function Ct(e){const t=[],i=[],n=new Fe(e);t.push(n);const o=(...e)=>n.getLanguageServiceWorker(...e);function s(){const{languageId:t,modeConfiguration:n}=e;kt(i),n.completionItems&&i.push(d.languages.registerCompletionItemProvider(t,new yt(o))),n.hovers&&i.push(d.languages.registerHoverProvider(t,new Ze(o))),n.documentHighlights&&i.push(d.languages.registerDocumentHighlightProvider(t,new tt(o))),n.links&&i.push(d.languages.registerLinkProvider(t,new ht(o))),n.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(t,new lt(o))),n.rename&&i.push(d.languages.registerRenameProvider(t,new rt(o))),n.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(t,new _t(o))),n.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(t,new bt(o))),n.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(t,new gt(o))),n.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(t,new pt(o)))}return s(),t.push(St(i)),St(t)}function St(e){return{dispose:()=>kt(e)}}function kt(e){while(e.length)e.pop().dispose()}},75368:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CompletionAdapter:()=>ze,DefinitionAdapter:()=>nt,DiagnosticsAdapter:()=>He,DocumentColorAdapter:()=>mt,DocumentFormattingEditProvider:()=>gt,DocumentHighlightAdapter:()=>tt,DocumentLinkAdapter:()=>ht,DocumentRangeFormattingEditProvider:()=>pt,DocumentSymbolAdapter:()=>lt,FoldingRangeAdapter:()=>_t,HoverAdapter:()=>Ze,ReferenceAdapter:()=>st,RenameAdapter:()=>rt,SelectionRangeAdapter:()=>yt,WorkerManager:()=>Fe,fromPosition:()=>Ue,fromRange:()=>$e,getWorker:()=>Kt,setupMode:()=>Qt,toRange:()=>qe,toTextEdit:()=>Qe});var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/c(d,n);var u,h,g,p,f,m,_,v,b,y,w,C,S,k,x,E,L,T,I,R,D,N,A,O,P,M,F,B,W,H,V,j,z,U,$,q,K,G,Q,Y,Z,X,J,ee,te,ie,ne,oe,se,re,ae,le,ce,de,ue,he,ge,pe,fe,me,_e,ve,be,ye,we,Ce,Se,ke,xe,Ee,Le,Te,Ie,Re,De,Ne,Ae,Oe,Pe,Me=12e4,Fe=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;let e=Date.now()-this._lastUsedTime;e>Me&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=d.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then((e=>{t=e})).then((t=>{if(this._worker)return this._worker.withSyncedResources(e)})).then((e=>t))}};(function(e){function t(e){return"string"===typeof e}e.is=t})(u||(u={})),function(e){function t(e){return"string"===typeof e}e.is=t}(h||(h={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=t}(g||(g={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=t}(p||(p={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}}function i(e){let t=e;return Be.objectLiteral(t)&&Be.uinteger(t.line)&&Be.uinteger(t.character)}e.create=t,e.is=i}(f||(f={})),function(e){function t(e,t,i,n){if(Be.uinteger(e)&&Be.uinteger(t)&&Be.uinteger(i)&&Be.uinteger(n))return{start:f.create(e,t),end:f.create(i,n)};if(f.is(e)&&f.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${n}]`)}function i(e){let t=e;return Be.objectLiteral(t)&&f.is(t.start)&&f.is(t.end)}e.create=t,e.is=i}(m||(m={})),function(e){function t(e,t){return{uri:e,range:t}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.range)&&(Be.string(t.uri)||Be.undefined(t.uri))}e.create=t,e.is=i}(_||(_={})),function(e){function t(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.targetRange)&&Be.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||Be.undefined(t.originSelectionRange))}e.create=t,e.is=i}(v||(v={})),function(e){function t(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.numberRange(t.red,0,1)&&Be.numberRange(t.green,0,1)&&Be.numberRange(t.blue,0,1)&&Be.numberRange(t.alpha,0,1)}e.create=t,e.is=i}(b||(b={})),function(e){function t(e,t){return{range:e,color:t}}function i(e){const t=e;return Be.objectLiteral(t)&&m.is(t.range)&&b.is(t.color)}e.create=t,e.is=i}(y||(y={})),function(e){function t(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.undefined(t.textEdit)||R.is(t))&&(Be.undefined(t.additionalTextEdits)||Be.typedArray(t.additionalTextEdits,R.is))}e.create=t,e.is=i}(w||(w={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(C||(C={})),function(e){function t(e,t,i,n,o,s){const r={startLine:e,endLine:t};return Be.defined(i)&&(r.startCharacter=i),Be.defined(n)&&(r.endCharacter=n),Be.defined(o)&&(r.kind=o),Be.defined(s)&&(r.collapsedText=s),r}function i(e){const t=e;return Be.objectLiteral(t)&&Be.uinteger(t.startLine)&&Be.uinteger(t.startLine)&&(Be.undefined(t.startCharacter)||Be.uinteger(t.startCharacter))&&(Be.undefined(t.endCharacter)||Be.uinteger(t.endCharacter))&&(Be.undefined(t.kind)||Be.string(t.kind))}e.create=t,e.is=i}(S||(S={})),function(e){function t(e,t){return{location:e,message:t}}function i(e){let t=e;return Be.defined(t)&&_.is(t.location)&&Be.string(t.message)}e.create=t,e.is=i}(k||(k={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(x||(x={})),function(e){e.Unnecessary=1,e.Deprecated=2}(E||(E={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.href)}e.is=t}(L||(L={})),function(e){function t(e,t,i,n,o,s){let r={range:e,message:t};return Be.defined(i)&&(r.severity=i),Be.defined(n)&&(r.code=n),Be.defined(o)&&(r.source=o),Be.defined(s)&&(r.relatedInformation=s),r}function i(e){var t;let i=e;return Be.defined(i)&&m.is(i.range)&&Be.string(i.message)&&(Be.number(i.severity)||Be.undefined(i.severity))&&(Be.integer(i.code)||Be.string(i.code)||Be.undefined(i.code))&&(Be.undefined(i.codeDescription)||Be.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(Be.string(i.source)||Be.undefined(i.source))&&(Be.undefined(i.relatedInformation)||Be.typedArray(i.relatedInformation,k.is))}e.create=t,e.is=i}(T||(T={})),function(e){function t(e,t,...i){let n={title:e,command:t};return Be.defined(i)&&i.length>0&&(n.arguments=i),n}function i(e){let t=e;return Be.defined(t)&&Be.string(t.title)&&Be.string(t.command)}e.create=t,e.is=i}(I||(I={})),function(e){function t(e,t){return{range:e,newText:t}}function i(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function o(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.newText)&&m.is(t.range)}e.replace=t,e.insert=i,e.del=n,e.is=o}(R||(R={})),function(e){function t(e,t,i){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Be.string(t.description)||void 0===t.description)}e.create=t,e.is=i}(D||(D={})),function(e){function t(e){const t=e;return Be.string(t)}e.is=t}(N||(N={})),function(e){function t(e,t,i){return{range:e,newText:t,annotationId:i}}function i(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}}function n(e,t){return{range:e,newText:"",annotationId:t}}function o(e){const t=e;return R.is(t)&&(D.is(t.annotationId)||N.is(t.annotationId))}e.replace=t,e.insert=i,e.del=n,e.is=o}(A||(A={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function i(e){let t=e;return Be.defined(t)&&V.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=i}(O||(O={})),function(e){function t(e,t,i){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"create"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(P||(P={})),function(e){function t(e,t,i,n){let o={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(o.options=i),void 0!==n&&(o.annotationId=n),o}function i(e){let t=e;return t&&"rename"===t.kind&&Be.string(t.oldUri)&&Be.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(M||(M={})),function(e){function t(e,t,i){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"delete"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Be.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Be.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(F||(F={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Be.string(e.kind)?P.is(e)||M.is(e)||F.is(e):O.is(e))))}e.is=t}(B||(B={})),function(e){function t(e){return{uri:e}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)}e.create=t,e.is=i}(W||(W={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.integer(t.version)}e.create=t,e.is=i}(H||(H={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&(null===t.version||Be.integer(t.version))}e.create=t,e.is=i}(V||(V={})),function(e){function t(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.string(t.languageId)&&Be.integer(t.version)&&Be.string(t.text)}e.create=t,e.is=i}(j||(j={})),function(e){function t(t){const i=t;return i===e.PlainText||i===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",e.is=t}(z||(z={})),function(e){function t(e){const t=e;return Be.objectLiteral(e)&&z.is(t.kind)&&Be.string(t.value)}e.is=t}(U||(U={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}($||($={})),function(e){e.PlainText=1,e.Snippet=2}(q||(q={})),function(e){e.Deprecated=1}(K||(K={})),function(e){function t(e,t,i){return{newText:e,insert:t,replace:i}}function i(e){const t=e;return t&&Be.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.create=t,e.is=i}(G||(G={})),function(e){e.asIs=1,e.adjustIndentation=2}(Q||(Q={})),function(e){function t(e){const t=e;return t&&(Be.string(t.detail)||void 0===t.detail)&&(Be.string(t.description)||void 0===t.description)}e.is=t}(Y||(Y={})),function(e){function t(e){return{label:e}}e.create=t}(Z||(Z={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(X||(X={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function i(e){const t=e;return Be.string(t)||Be.objectLiteral(t)&&Be.string(t.language)&&Be.string(t.value)}e.fromPlainText=t,e.is=i}(J||(J={})),function(e){function t(e){let t=e;return!!t&&Be.objectLiteral(t)&&(U.is(t.contents)||J.is(t.contents)||Be.typedArray(t.contents,J.is))&&(void 0===e.range||m.is(e.range))}e.is=t}(ee||(ee={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(te||(te={})),function(e){function t(e,t,...i){let n={label:e};return Be.defined(t)&&(n.documentation=t),Be.defined(i)?n.parameters=i:n.parameters=[],n}e.create=t}(ie||(ie={})),function(e){e.Text=1,e.Read=2,e.Write=3}(ne||(ne={})),function(e){function t(e,t){let i={range:e};return Be.number(t)&&(i.kind=t),i}e.create=t}(oe||(oe={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(se||(se={})),function(e){e.Deprecated=1}(re||(re={})),function(e){function t(e,t,i,n,o){let s={name:e,kind:t,location:{uri:n,range:i}};return o&&(s.containerName=o),s}e.create=t}(ae||(ae={})),function(e){function t(e,t,i,n){return void 0!==n?{name:e,kind:t,location:{uri:i,range:n}}:{name:e,kind:t,location:{uri:i}}}e.create=t}(le||(le={})),function(e){function t(e,t,i,n,o,s){let r={name:e,detail:t,kind:i,range:n,selectionRange:o};return void 0!==s&&(r.children=s),r}function i(e){let t=e;return t&&Be.string(t.name)&&Be.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(void 0===t.detail||Be.string(t.detail))&&(void 0===t.deprecated||Be.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=i}(ce||(ce={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(de||(de={})),function(e){e.Invoked=1,e.Automatic=2}(ue||(ue={})),function(e){function t(e,t,i){let n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),void 0!==i&&null!==i&&(n.triggerKind=i),n}function i(e){let t=e;return Be.defined(t)&&Be.typedArray(t.diagnostics,T.is)&&(void 0===t.only||Be.typedArray(t.only,Be.string))&&(void 0===t.triggerKind||t.triggerKind===ue.Invoked||t.triggerKind===ue.Automatic)}e.create=t,e.is=i}(he||(he={})),function(e){function t(e,t,i){let n={title:e},o=!0;return"string"===typeof t?(o=!1,n.kind=t):I.is(t)?n.command=t:n.edit=t,o&&void 0!==i&&(n.kind=i),n}function i(e){let t=e;return t&&Be.string(t.title)&&(void 0===t.diagnostics||Be.typedArray(t.diagnostics,T.is))&&(void 0===t.kind||Be.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||I.is(t.command))&&(void 0===t.isPreferred||Be.boolean(t.isPreferred))&&(void 0===t.edit||B.is(t.edit))}e.create=t,e.is=i}(ge||(ge={})),function(e){function t(e,t){let i={range:e};return Be.defined(t)&&(i.data=t),i}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.command)||I.is(t.command))}e.create=t,e.is=i}(pe||(pe={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function i(e){let t=e;return Be.defined(t)&&Be.uinteger(t.tabSize)&&Be.boolean(t.insertSpaces)}e.create=t,e.is=i}(fe||(fe={})),function(e){function t(e,t,i){return{range:e,target:t,data:i}}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.target)||Be.string(t.target))}e.create=t,e.is=i}(me||(me={})),function(e){function t(e,t){return{range:e,parent:t}}function i(t){let i=t;return Be.objectLiteral(i)&&m.is(i.range)&&(void 0===i.parent||e.is(i.parent))}e.create=t,e.is=i}(_e||(_e={})),function(e){e["namespace"]="namespace",e["type"]="type",e["class"]="class",e["enum"]="enum",e["interface"]="interface",e["struct"]="struct",e["typeParameter"]="typeParameter",e["parameter"]="parameter",e["variable"]="variable",e["property"]="property",e["enumMember"]="enumMember",e["event"]="event",e["function"]="function",e["method"]="method",e["macro"]="macro",e["keyword"]="keyword",e["modifier"]="modifier",e["comment"]="comment",e["string"]="string",e["number"]="number",e["regexp"]="regexp",e["operator"]="operator",e["decorator"]="decorator"}(ve||(ve={})),function(e){e["declaration"]="declaration",e["definition"]="definition",e["readonly"]="readonly",e["static"]="static",e["deprecated"]="deprecated",e["abstract"]="abstract",e["async"]="async",e["modification"]="modification",e["documentation"]="documentation",e["defaultLibrary"]="defaultLibrary"}(be||(be={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.resultId||"string"===typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"===typeof t.data[0])}e.is=t}(ye||(ye={})),function(e){function t(e,t){return{range:e,text:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.string(t.text)}e.create=t,e.is=i}(we||(we={})),function(e){function t(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.boolean(t.caseSensitiveLookup)&&(Be.string(t.variableName)||void 0===t.variableName)}e.create=t,e.is=i}(Ce||(Ce={})),function(e){function t(e,t){return{range:e,expression:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&(Be.string(t.expression)||void 0===t.expression)}e.create=t,e.is=i}(Se||(Se={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function i(e){const t=e;return Be.defined(t)&&m.is(e.stoppedLocation)}e.create=t,e.is=i}(ke||(ke={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,e.is=t}(xe||(xe={})),function(e){function t(e){return{value:e}}function i(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.location||_.is(t.location))&&(void 0===t.command||I.is(t.command))}e.create=t,e.is=i}(Ee||(Ee={})),function(e){function t(e,t,i){const n={position:e,label:t};return void 0!==i&&(n.kind=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&f.is(t.position)&&(Be.string(t.label)||Be.typedArray(t.label,Ee.is))&&(void 0===t.kind||xe.is(t.kind))&&void 0===t.textEdits||Be.typedArray(t.textEdits,R.is)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.paddingLeft||Be.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Be.boolean(t.paddingRight))}e.create=t,e.is=i}(Le||(Le={})),function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t}(Te||(Te={})),function(e){function t(e,t,i,n){return{insertText:e,filterText:t,range:i,command:n}}e.create=t}(Ie||(Ie={})),function(e){function t(e){return{items:e}}e.create=t}(Re||(Re={})),function(e){e.Invoked=0,e.Automatic=1}(De||(De={})),function(e){function t(e,t){return{range:e,text:t}}e.create=t}(Ne||(Ne={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t}(Ae||(Ae={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&h.is(t.uri)&&Be.string(t.name)}e.is=t}(Oe||(Oe={})),function(e){function t(e,t,i,n){return new We(e,t,i,n)}function i(e){let t=e;return!!(Be.defined(t)&&Be.string(t.uri)&&(Be.undefined(t.languageId)||Be.string(t.languageId))&&Be.uinteger(t.lineCount)&&Be.func(t.getText)&&Be.func(t.positionAt)&&Be.func(t.offsetAt))}function n(e,t){let i=e.getText(),n=o(t,((e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i})),s=i.length;for(let o=n.length-1;o>=0;o--){let t=n[o],r=e.offsetAt(t.range.start),a=e.offsetAt(t.range.end);if(!(a<=s))throw new Error("Overlapping edit");i=i.substring(0,r)+t.newText+i.substring(a,i.length),s=r}return i}function o(e,t){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),s=e.slice(i);o(n,t),o(s,t);let r=0,a=0,l=0;while(r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),i=0,n=t.length;if(0===n)return f.create(0,e);while(ie?n=o:i=o+1}let o=i-1;return f.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],n=e.line+1{let t,i=e.getLanguageId();i===this._languageId&&(this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(t),t=window.setTimeout((()=>this._doValidate(e.uri,i)),500)})),this._doValidate(e.uri,i))},o=e=>{d.editor.setModelMarkers(e,this._languageId,[]);let t=e.uri.toString(),i=this._listener[t];i&&(i.dispose(),delete this._listener[t])};this._disposables.push(d.editor.onDidCreateModel(n)),this._disposables.push(d.editor.onWillDisposeModel(o)),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{o(e.model),n(e.model)}))),this._disposables.push(i((e=>{d.editor.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),n(e))}))}))),this._disposables.push({dispose:()=>{d.editor.getModels().forEach(o);for(let e in this._listener)this._listener[e].dispose()}}),d.editor.getModels().forEach(n)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables.length=0}_doValidate(e,t){this._worker(e).then((t=>t.doValidation(e.toString()))).then((i=>{const n=i.map((t=>je(e,t)));let o=d.editor.getModel(e);o&&o.getLanguageId()===t&&d.editor.setModelMarkers(o,t,n)})).then(void 0,(e=>{console.error(e)}))}};function Ve(e){switch(e){case x.Error:return d.MarkerSeverity.Error;case x.Warning:return d.MarkerSeverity.Warning;case x.Information:return d.MarkerSeverity.Info;case x.Hint:return d.MarkerSeverity.Hint;default:return d.MarkerSeverity.Info}}function je(e,t){let i="number"===typeof t.code?String(t.code):t.code;return{severity:Ve(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}var ze=class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doComplete(o.toString(),Ue(t)))).then((i=>{if(!i)return;const n=e.getWordUntilPosition(t),o=new d.Range(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn),s=i.items.map((e=>{const t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:Ye(e.command),range:o,kind:Ge(e.kind)};return e.textEdit&&(Ke(e.textEdit)?t.range={insert:qe(e.textEdit.insert),replace:qe(e.textEdit.replace)}:t.range=qe(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),e.insertTextFormat===q.Snippet&&(t.insertTextRules=d.languages.CompletionItemInsertTextRule.InsertAsSnippet),t}));return{isIncomplete:i.isIncomplete,suggestions:s}}))}};function Ue(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function $e(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function qe(e){if(e)return new d.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Ke(e){return"undefined"!==typeof e.insert&&"undefined"!==typeof e.replace}function Ge(e){const t=d.languages.CompletionItemKind;switch(e){case $.Text:return t.Text;case $.Method:return t.Method;case $.Function:return t.Function;case $.Constructor:return t.Constructor;case $.Field:return t.Field;case $.Variable:return t.Variable;case $.Class:return t.Class;case $.Interface:return t.Interface;case $.Module:return t.Module;case $.Property:return t.Property;case $.Unit:return t.Unit;case $.Value:return t.Value;case $.Enum:return t.Enum;case $.Keyword:return t.Keyword;case $.Snippet:return t.Snippet;case $.Color:return t.Color;case $.File:return t.File;case $.Reference:return t.Reference}return t.Property}function Qe(e){if(e)return{range:qe(e.range),text:e.newText}}function Ye(e){return e&&"editor.action.triggerSuggest"===e.command?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ze=class{constructor(e){this._worker=e}provideHover(e,t,i){let n=e.uri;return this._worker(n).then((e=>e.doHover(n.toString(),Ue(t)))).then((e=>{if(e)return{range:qe(e.range),contents:et(e.contents)}}))}};function Xe(e){return e&&"object"===typeof e&&"string"===typeof e.kind}function Je(e){return"string"===typeof e?{value:e}:Xe(e)?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"}}function et(e){if(e)return Array.isArray(e)?e.map(Je):[Je(e)]}var tt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDocumentHighlights(n.toString(),Ue(t)))).then((e=>{if(e)return e.map((e=>({range:qe(e.range),kind:it(e.kind)})))}))}};function it(e){switch(e){case ne.Read:return d.languages.DocumentHighlightKind.Read;case ne.Write:return d.languages.DocumentHighlightKind.Write;case ne.Text:return d.languages.DocumentHighlightKind.Text}return d.languages.DocumentHighlightKind.Text}var nt=class{constructor(e){this._worker=e}provideDefinition(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDefinition(n.toString(),Ue(t)))).then((e=>{if(e)return[ot(e)]}))}};function ot(e){return{uri:d.Uri.parse(e.uri),range:qe(e.range)}}var st=class{constructor(e){this._worker=e}provideReferences(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.findReferences(o.toString(),Ue(t)))).then((e=>{if(e)return e.map(ot)}))}},rt=class{constructor(e){this._worker=e}provideRenameEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doRename(o.toString(),Ue(t),i))).then((e=>at(e)))}};function at(e){if(!e||!e.changes)return;let t=[];for(let i in e.changes){const n=d.Uri.parse(i);for(let o of e.changes[i])t.push({resource:n,versionId:void 0,textEdit:{range:qe(o.range),text:o.newText}})}return{edits:t}}var lt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentSymbols(i.toString()))).then((e=>{if(e)return e.map((e=>ct(e)?dt(e):{name:e.name,detail:"",containerName:e.containerName,kind:ut(e.kind),range:qe(e.location.range),selectionRange:qe(e.location.range),tags:[]}))}))}};function ct(e){return"children"in e}function dt(e){return{name:e.name,detail:e.detail??"",kind:ut(e.kind),range:qe(e.range),selectionRange:qe(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map((e=>dt(e)))}}function ut(e){let t=d.languages.SymbolKind;switch(e){case se.File:return t.File;case se.Module:return t.Module;case se.Namespace:return t.Namespace;case se.Package:return t.Package;case se.Class:return t.Class;case se.Method:return t.Method;case se.Property:return t.Property;case se.Field:return t.Field;case se.Constructor:return t.Constructor;case se.Enum:return t.Enum;case se.Interface:return t.Interface;case se.Function:return t.Function;case se.Variable:return t.Variable;case se.Constant:return t.Constant;case se.String:return t.String;case se.Number:return t.Number;case se.Boolean:return t.Boolean;case se.Array:return t.Array}return t.Function}var ht=class{constructor(e){this._worker=e}provideLinks(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentLinks(i.toString()))).then((e=>{if(e)return{links:e.map((e=>({range:qe(e.range),url:e.target})))}}))}},gt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.format(n.toString(),null,ft(t)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}},pt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.format(o.toString(),$e(t),ft(i)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}};function ft(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var mt=class{constructor(e){this._worker=e}provideDocumentColors(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentColors(i.toString()))).then((e=>{if(e)return e.map((e=>({color:e.color,range:qe(e.range)})))}))}provideColorPresentations(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getColorPresentations(n.toString(),t.color,$e(t.range)))).then((e=>{if(e)return e.map((e=>{let t={label:e.label};return e.textEdit&&(t.textEdit=Qe(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),t}))}))}},_t=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getFoldingRanges(n.toString(),t))).then((e=>{if(e)return e.map((e=>{const t={start:e.startLine+1,end:e.endLine+1};return"undefined"!==typeof e.kind&&(t.kind=vt(e.kind)),t}))}))}};function vt(e){switch(e){case C.Comment:return d.languages.FoldingRangeKind.Comment;case C.Imports:return d.languages.FoldingRangeKind.Imports;case C.Region:return d.languages.FoldingRangeKind.Region}}var bt,yt=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getSelectionRanges(n.toString(),t.map(Ue)))).then((e=>{if(e)return e.map((e=>{const t=[];while(e)t.push({range:qe(e.range)}),e=e.parent;return t}))}))}};function wt(e,t=!1){const i=e.length;let n=0,o="",s=0,r=16,a=0,l=0,c=0,d=0,u=0;function h(t,i){let o=0,s=0;while(o=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}n++,o++}return o=i){t+=e.substring(o,n),u=2;break}const s=e.charCodeAt(n);if(34===s){t+=e.substring(o,n),n++;break}if(92!==s){if(s>=0&&s<=31){if(St(s)){t+=e.substring(o,n),u=2;break}u=6}n++}else{if(t+=e.substring(o,n),n++,n>=i){u=2;break}const s=e.charCodeAt(n++);switch(s){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=h(4,!0);e>=0?t+=String.fromCharCode(e):u=4;break;default:u=5}o=n}}return t}function m(){if(o="",u=0,s=n,l=a,d=c,n>=i)return s=i,r=17;let t=e.charCodeAt(n);if(Ct(t)){do{n++,o+=String.fromCharCode(t),t=e.charCodeAt(n)}while(Ct(t));return r=15}if(St(t))return n++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,o+="\n"),a++,c=n,r=14;switch(t){case 123:return n++,r=1;case 125:return n++,r=2;case 91:return n++,r=3;case 93:return n++,r=4;case 58:return n++,r=6;case 44:return n++,r=5;case 34:return n++,o=f(),r=10;case 47:const l=n-1;if(47===e.charCodeAt(n+1)){n+=2;while(n=12&&e<=15);return e}return{setPosition:g,getPosition:()=>n,scan:t?v:m,getToken:()=>r,getTokenValue:()=>o,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>l,getTokenStartCharacter:()=>s-d,getTokenError:()=>u}}function Ct(e){return 32===e||9===e}function St(e){return 10===e||13===e}function kt(e){return e>=48&&e<=57}(function(e){e[e["lineFeed"]=10]="lineFeed",e[e["carriageReturn"]=13]="carriageReturn",e[e["space"]=32]="space",e[e["_0"]=48]="_0",e[e["_1"]=49]="_1",e[e["_2"]=50]="_2",e[e["_3"]=51]="_3",e[e["_4"]=52]="_4",e[e["_5"]=53]="_5",e[e["_6"]=54]="_6",e[e["_7"]=55]="_7",e[e["_8"]=56]="_8",e[e["_9"]=57]="_9",e[e["a"]=97]="a",e[e["b"]=98]="b",e[e["c"]=99]="c",e[e["d"]=100]="d",e[e["e"]=101]="e",e[e["f"]=102]="f",e[e["g"]=103]="g",e[e["h"]=104]="h",e[e["i"]=105]="i",e[e["j"]=106]="j",e[e["k"]=107]="k",e[e["l"]=108]="l",e[e["m"]=109]="m",e[e["n"]=110]="n",e[e["o"]=111]="o",e[e["p"]=112]="p",e[e["q"]=113]="q",e[e["r"]=114]="r",e[e["s"]=115]="s",e[e["t"]=116]="t",e[e["u"]=117]="u",e[e["v"]=118]="v",e[e["w"]=119]="w",e[e["x"]=120]="x",e[e["y"]=121]="y",e[e["z"]=122]="z",e[e["A"]=65]="A",e[e["B"]=66]="B",e[e["C"]=67]="C",e[e["D"]=68]="D",e[e["E"]=69]="E",e[e["F"]=70]="F",e[e["G"]=71]="G",e[e["H"]=72]="H",e[e["I"]=73]="I",e[e["J"]=74]="J",e[e["K"]=75]="K",e[e["L"]=76]="L",e[e["M"]=77]="M",e[e["N"]=78]="N",e[e["O"]=79]="O",e[e["P"]=80]="P",e[e["Q"]=81]="Q",e[e["R"]=82]="R",e[e["S"]=83]="S",e[e["T"]=84]="T",e[e["U"]=85]="U",e[e["V"]=86]="V",e[e["W"]=87]="W",e[e["X"]=88]="X",e[e["Y"]=89]="Y",e[e["Z"]=90]="Z",e[e["asterisk"]=42]="asterisk",e[e["backslash"]=92]="backslash",e[e["closeBrace"]=125]="closeBrace",e[e["closeBracket"]=93]="closeBracket",e[e["colon"]=58]="colon",e[e["comma"]=44]="comma",e[e["dot"]=46]="dot",e[e["doubleQuote"]=34]="doubleQuote",e[e["minus"]=45]="minus",e[e["openBrace"]=123]="openBrace",e[e["openBracket"]=91]="openBracket",e[e["plus"]=43]="plus",e[e["slash"]=47]="slash",e[e["formFeed"]=12]="formFeed",e[e["tab"]=9]="tab"})(bt||(bt={}));new Array(20).fill(0).map(((e,t)=>" ".repeat(t)));var xt,Et=200;new Array(Et).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)));(function(e){e.DEFAULT={allowTrailingComma:!1}})(xt||(xt={}));var Lt,Tt,It,Rt=wt;function Dt(e){return{getInitialState:()=>new $t(null,null,!1,null),tokenize:(t,i)=>qt(e,t,i)}}(function(e){e[e["None"]=0]="None",e[e["UnexpectedEndOfComment"]=1]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=2]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=3]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=4]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=5]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=6]="InvalidCharacter"})(Lt||(Lt={})),function(e){e[e["OpenBraceToken"]=1]="OpenBraceToken",e[e["CloseBraceToken"]=2]="CloseBraceToken",e[e["OpenBracketToken"]=3]="OpenBracketToken",e[e["CloseBracketToken"]=4]="CloseBracketToken",e[e["CommaToken"]=5]="CommaToken",e[e["ColonToken"]=6]="ColonToken",e[e["NullKeyword"]=7]="NullKeyword",e[e["TrueKeyword"]=8]="TrueKeyword",e[e["FalseKeyword"]=9]="FalseKeyword",e[e["StringLiteral"]=10]="StringLiteral",e[e["NumericLiteral"]=11]="NumericLiteral",e[e["LineCommentTrivia"]=12]="LineCommentTrivia",e[e["BlockCommentTrivia"]=13]="BlockCommentTrivia",e[e["LineBreakTrivia"]=14]="LineBreakTrivia",e[e["Trivia"]=15]="Trivia",e[e["Unknown"]=16]="Unknown",e[e["EOF"]=17]="EOF"}(Tt||(Tt={})),function(e){e[e["InvalidSymbol"]=1]="InvalidSymbol",e[e["InvalidNumberFormat"]=2]="InvalidNumberFormat",e[e["PropertyNameExpected"]=3]="PropertyNameExpected",e[e["ValueExpected"]=4]="ValueExpected",e[e["ColonExpected"]=5]="ColonExpected",e[e["CommaExpected"]=6]="CommaExpected",e[e["CloseBraceExpected"]=7]="CloseBraceExpected",e[e["CloseBracketExpected"]=8]="CloseBracketExpected",e[e["EndOfFileExpected"]=9]="EndOfFileExpected",e[e["InvalidCommentToken"]=10]="InvalidCommentToken",e[e["UnexpectedEndOfComment"]=11]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=12]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=13]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=14]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=15]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=16]="InvalidCharacter"}(It||(It={}));var Nt,At="delimiter.bracket.json",Ot="delimiter.array.json",Pt="delimiter.colon.json",Mt="delimiter.comma.json",Ft="keyword.json",Bt="keyword.json",Wt="string.value.json",Ht="number.json",Vt="string.key.json",jt="comment.block.json",zt="comment.line.json",Ut=class e{constructor(e,t){this.parent=e,this.type=t}static pop(e){return e?e.parent:null}static push(t,i){return new e(t,i)}static equals(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;while(e&&t){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0}},$t=class e{constructor(e,t,i,n){this._state=e,this.scanError=t,this.lastWasColon=i,this.parents=n}clone(){return new e(this._state,this.scanError,this.lastWasColon,this.parents)}equals(t){return t===this||!!(t&&t instanceof e)&&(this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon&&Ut.equals(this.parents,t.parents))}getStateData(){return this._state}setStateData(e){this._state=e}};function qt(e,t,i,n=0){let o=0,s=!1;switch(i.scanError){case 2:t='"'+t,o=1;break;case 1:t="/*"+t,o=2;break}const r=Rt(t);let a=i.lastWasColon,l=i.parents;const c={tokens:[],endState:i.clone()};while(1){let d=n+r.getPosition(),u="";const h=r.scan();if(17===h)break;if(d===n+r.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(r.getPosition(),3));switch(s&&(d-=o),s=o>0,h){case 1:l=Ut.push(l,0),u=At,a=!1;break;case 2:l=Ut.pop(l),u=At,a=!1;break;case 3:l=Ut.push(l,1),u=Ot,a=!1;break;case 4:l=Ut.pop(l),u=Ot,a=!1;break;case 6:u=Pt,a=!0;break;case 5:u=Mt,a=!1;break;case 8:case 9:u=Ft,a=!1;break;case 7:u=Bt,a=!1;break;case 10:const e=l?l.type:0,t=1===e;u=a||t?Wt:Vt,a=!1;break;case 11:u=Ht,a=!1;break}if(e)switch(h){case 12:u=zt;break;case 13:u=jt;break}c.endState=new $t(i.getStateData(),r.getTokenError(),a,l),c.tokens.push({startIndex:d,scopes:u})}return c}function Kt(){return new Promise(((e,t)=>{if(!Nt)return t("JSON not registered!");e(Nt)}))}var Gt=class extends He{constructor(e,t,i){super(e,t,i.onDidChange),this._disposables.push(d.editor.onWillDisposeModel((e=>{this._resetSchema(e.uri)}))),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{this._resetSchema(e.model.uri)})))}_resetSchema(e){this._worker().then((t=>{t.resetSchema(e.toString())}))}};function Qt(e){const t=[],i=[],n=new Fe(e);function o(){const{languageId:t,modeConfiguration:n}=e;Zt(i),n.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(t,new gt(Nt))),n.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(t,new pt(Nt))),n.completionItems&&i.push(d.languages.registerCompletionItemProvider(t,new ze(Nt,[" ",":",'"']))),n.hovers&&i.push(d.languages.registerHoverProvider(t,new Ze(Nt))),n.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(t,new lt(Nt))),n.tokens&&i.push(d.languages.setTokensProvider(t,Dt(!0))),n.colors&&i.push(d.languages.registerColorProvider(t,new mt(Nt))),n.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(t,new _t(Nt))),n.diagnostics&&i.push(new Gt(t,Nt,e)),n.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(t,new yt(Nt)))}t.push(n),Nt=(...e)=>n.getLanguageServiceWorker(...e),o(),t.push(d.languages.setLanguageConfiguration(e.languageId,Xt));let s=e.modeConfiguration;return e.onDidChange((e=>{e.modeConfiguration!==s&&(s=e.modeConfiguration,o())})),t.push(Yt(i)),Yt(t)}function Yt(e){return{dispose:()=>Zt(e)}}function Zt(e){while(e.length)e.pop().dispose()}var Xt={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}},49556:(e,t,i)=>{"use strict";var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; + *-----------------------------------------------------------------------------*/c(d,n);var u,h,g,p,f,m,_,v,b,y,w,C,S,k,x,E,L,T,I,D,R,N,A,O,P,M,F,B,W,H,V,j,z,U,$,q,K,G,Q,Y,Z,X,J,ee,te,ie,ne,oe,se,re,ae,le,ce,de,ue,he,ge,pe,fe,me,_e,ve,be,ye,we,Ce,Se,ke,xe,Ee,Le,Te,Ie,De,Re,Ne,Ae,Oe,Pe,Me=12e4,Fe=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;let e=Date.now()-this._lastUsedTime;e>Me&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=d.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then((e=>{t=e})).then((t=>{if(this._worker)return this._worker.withSyncedResources(e)})).then((e=>t))}};(function(e){function t(e){return"string"===typeof e}e.is=t})(u||(u={})),function(e){function t(e){return"string"===typeof e}e.is=t}(h||(h={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=t}(g||(g={})),function(e){function t(t){return"number"===typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=t}(p||(p={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}}function i(e){let t=e;return Be.objectLiteral(t)&&Be.uinteger(t.line)&&Be.uinteger(t.character)}e.create=t,e.is=i}(f||(f={})),function(e){function t(e,t,i,n){if(Be.uinteger(e)&&Be.uinteger(t)&&Be.uinteger(i)&&Be.uinteger(n))return{start:f.create(e,t),end:f.create(i,n)};if(f.is(e)&&f.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${i}, ${n}]`)}function i(e){let t=e;return Be.objectLiteral(t)&&f.is(t.start)&&f.is(t.end)}e.create=t,e.is=i}(m||(m={})),function(e){function t(e,t){return{uri:e,range:t}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.range)&&(Be.string(t.uri)||Be.undefined(t.uri))}e.create=t,e.is=i}(_||(_={})),function(e){function t(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}}function i(e){let t=e;return Be.objectLiteral(t)&&m.is(t.targetRange)&&Be.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||Be.undefined(t.originSelectionRange))}e.create=t,e.is=i}(v||(v={})),function(e){function t(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.numberRange(t.red,0,1)&&Be.numberRange(t.green,0,1)&&Be.numberRange(t.blue,0,1)&&Be.numberRange(t.alpha,0,1)}e.create=t,e.is=i}(b||(b={})),function(e){function t(e,t){return{range:e,color:t}}function i(e){const t=e;return Be.objectLiteral(t)&&m.is(t.range)&&b.is(t.color)}e.create=t,e.is=i}(y||(y={})),function(e){function t(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.undefined(t.textEdit)||D.is(t))&&(Be.undefined(t.additionalTextEdits)||Be.typedArray(t.additionalTextEdits,D.is))}e.create=t,e.is=i}(w||(w={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(C||(C={})),function(e){function t(e,t,i,n,o,s){const r={startLine:e,endLine:t};return Be.defined(i)&&(r.startCharacter=i),Be.defined(n)&&(r.endCharacter=n),Be.defined(o)&&(r.kind=o),Be.defined(s)&&(r.collapsedText=s),r}function i(e){const t=e;return Be.objectLiteral(t)&&Be.uinteger(t.startLine)&&Be.uinteger(t.startLine)&&(Be.undefined(t.startCharacter)||Be.uinteger(t.startCharacter))&&(Be.undefined(t.endCharacter)||Be.uinteger(t.endCharacter))&&(Be.undefined(t.kind)||Be.string(t.kind))}e.create=t,e.is=i}(S||(S={})),function(e){function t(e,t){return{location:e,message:t}}function i(e){let t=e;return Be.defined(t)&&_.is(t.location)&&Be.string(t.message)}e.create=t,e.is=i}(k||(k={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(x||(x={})),function(e){e.Unnecessary=1,e.Deprecated=2}(E||(E={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.href)}e.is=t}(L||(L={})),function(e){function t(e,t,i,n,o,s){let r={range:e,message:t};return Be.defined(i)&&(r.severity=i),Be.defined(n)&&(r.code=n),Be.defined(o)&&(r.source=o),Be.defined(s)&&(r.relatedInformation=s),r}function i(e){var t;let i=e;return Be.defined(i)&&m.is(i.range)&&Be.string(i.message)&&(Be.number(i.severity)||Be.undefined(i.severity))&&(Be.integer(i.code)||Be.string(i.code)||Be.undefined(i.code))&&(Be.undefined(i.codeDescription)||Be.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(Be.string(i.source)||Be.undefined(i.source))&&(Be.undefined(i.relatedInformation)||Be.typedArray(i.relatedInformation,k.is))}e.create=t,e.is=i}(T||(T={})),function(e){function t(e,t,...i){let n={title:e,command:t};return Be.defined(i)&&i.length>0&&(n.arguments=i),n}function i(e){let t=e;return Be.defined(t)&&Be.string(t.title)&&Be.string(t.command)}e.create=t,e.is=i}(I||(I={})),function(e){function t(e,t){return{range:e,newText:t}}function i(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function o(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.newText)&&m.is(t.range)}e.replace=t,e.insert=i,e.del=n,e.is=o}(D||(D={})),function(e){function t(e,t,i){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&Be.string(t.label)&&(Be.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Be.string(t.description)||void 0===t.description)}e.create=t,e.is=i}(R||(R={})),function(e){function t(e){const t=e;return Be.string(t)}e.is=t}(N||(N={})),function(e){function t(e,t,i){return{range:e,newText:t,annotationId:i}}function i(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}}function n(e,t){return{range:e,newText:"",annotationId:t}}function o(e){const t=e;return D.is(t)&&(R.is(t.annotationId)||N.is(t.annotationId))}e.replace=t,e.insert=i,e.del=n,e.is=o}(A||(A={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function i(e){let t=e;return Be.defined(t)&&V.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=i}(O||(O={})),function(e){function t(e,t,i){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"create"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(P||(P={})),function(e){function t(e,t,i,n){let o={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(o.options=i),void 0!==n&&(o.annotationId=n),o}function i(e){let t=e;return t&&"rename"===t.kind&&Be.string(t.oldUri)&&Be.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Be.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Be.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(M||(M={})),function(e){function t(e,t,i){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n}function i(e){let t=e;return t&&"delete"===t.kind&&Be.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Be.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Be.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||N.is(t.annotationId))}e.create=t,e.is=i}(F||(F={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Be.string(e.kind)?P.is(e)||M.is(e)||F.is(e):O.is(e))))}e.is=t}(B||(B={})),function(e){function t(e){return{uri:e}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)}e.create=t,e.is=i}(W||(W={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.integer(t.version)}e.create=t,e.is=i}(H||(H={})),function(e){function t(e,t){return{uri:e,version:t}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&(null===t.version||Be.integer(t.version))}e.create=t,e.is=i}(V||(V={})),function(e){function t(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}}function i(e){let t=e;return Be.defined(t)&&Be.string(t.uri)&&Be.string(t.languageId)&&Be.integer(t.version)&&Be.string(t.text)}e.create=t,e.is=i}(j||(j={})),function(e){function t(t){const i=t;return i===e.PlainText||i===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",e.is=t}(z||(z={})),function(e){function t(e){const t=e;return Be.objectLiteral(e)&&z.is(t.kind)&&Be.string(t.value)}e.is=t}(U||(U={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}($||($={})),function(e){e.PlainText=1,e.Snippet=2}(q||(q={})),function(e){e.Deprecated=1}(K||(K={})),function(e){function t(e,t,i){return{newText:e,insert:t,replace:i}}function i(e){const t=e;return t&&Be.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.create=t,e.is=i}(G||(G={})),function(e){e.asIs=1,e.adjustIndentation=2}(Q||(Q={})),function(e){function t(e){const t=e;return t&&(Be.string(t.detail)||void 0===t.detail)&&(Be.string(t.description)||void 0===t.description)}e.is=t}(Y||(Y={})),function(e){function t(e){return{label:e}}e.create=t}(Z||(Z={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(X||(X={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function i(e){const t=e;return Be.string(t)||Be.objectLiteral(t)&&Be.string(t.language)&&Be.string(t.value)}e.fromPlainText=t,e.is=i}(J||(J={})),function(e){function t(e){let t=e;return!!t&&Be.objectLiteral(t)&&(U.is(t.contents)||J.is(t.contents)||Be.typedArray(t.contents,J.is))&&(void 0===e.range||m.is(e.range))}e.is=t}(ee||(ee={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(te||(te={})),function(e){function t(e,t,...i){let n={label:e};return Be.defined(t)&&(n.documentation=t),Be.defined(i)?n.parameters=i:n.parameters=[],n}e.create=t}(ie||(ie={})),function(e){e.Text=1,e.Read=2,e.Write=3}(ne||(ne={})),function(e){function t(e,t){let i={range:e};return Be.number(t)&&(i.kind=t),i}e.create=t}(oe||(oe={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(se||(se={})),function(e){e.Deprecated=1}(re||(re={})),function(e){function t(e,t,i,n,o){let s={name:e,kind:t,location:{uri:n,range:i}};return o&&(s.containerName=o),s}e.create=t}(ae||(ae={})),function(e){function t(e,t,i,n){return void 0!==n?{name:e,kind:t,location:{uri:i,range:n}}:{name:e,kind:t,location:{uri:i}}}e.create=t}(le||(le={})),function(e){function t(e,t,i,n,o,s){let r={name:e,detail:t,kind:i,range:n,selectionRange:o};return void 0!==s&&(r.children=s),r}function i(e){let t=e;return t&&Be.string(t.name)&&Be.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(void 0===t.detail||Be.string(t.detail))&&(void 0===t.deprecated||Be.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=i}(ce||(ce={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(de||(de={})),function(e){e.Invoked=1,e.Automatic=2}(ue||(ue={})),function(e){function t(e,t,i){let n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),void 0!==i&&null!==i&&(n.triggerKind=i),n}function i(e){let t=e;return Be.defined(t)&&Be.typedArray(t.diagnostics,T.is)&&(void 0===t.only||Be.typedArray(t.only,Be.string))&&(void 0===t.triggerKind||t.triggerKind===ue.Invoked||t.triggerKind===ue.Automatic)}e.create=t,e.is=i}(he||(he={})),function(e){function t(e,t,i){let n={title:e},o=!0;return"string"===typeof t?(o=!1,n.kind=t):I.is(t)?n.command=t:n.edit=t,o&&void 0!==i&&(n.kind=i),n}function i(e){let t=e;return t&&Be.string(t.title)&&(void 0===t.diagnostics||Be.typedArray(t.diagnostics,T.is))&&(void 0===t.kind||Be.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||I.is(t.command))&&(void 0===t.isPreferred||Be.boolean(t.isPreferred))&&(void 0===t.edit||B.is(t.edit))}e.create=t,e.is=i}(ge||(ge={})),function(e){function t(e,t){let i={range:e};return Be.defined(t)&&(i.data=t),i}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.command)||I.is(t.command))}e.create=t,e.is=i}(pe||(pe={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function i(e){let t=e;return Be.defined(t)&&Be.uinteger(t.tabSize)&&Be.boolean(t.insertSpaces)}e.create=t,e.is=i}(fe||(fe={})),function(e){function t(e,t,i){return{range:e,target:t,data:i}}function i(e){let t=e;return Be.defined(t)&&m.is(t.range)&&(Be.undefined(t.target)||Be.string(t.target))}e.create=t,e.is=i}(me||(me={})),function(e){function t(e,t){return{range:e,parent:t}}function i(t){let i=t;return Be.objectLiteral(i)&&m.is(i.range)&&(void 0===i.parent||e.is(i.parent))}e.create=t,e.is=i}(_e||(_e={})),function(e){e["namespace"]="namespace",e["type"]="type",e["class"]="class",e["enum"]="enum",e["interface"]="interface",e["struct"]="struct",e["typeParameter"]="typeParameter",e["parameter"]="parameter",e["variable"]="variable",e["property"]="property",e["enumMember"]="enumMember",e["event"]="event",e["function"]="function",e["method"]="method",e["macro"]="macro",e["keyword"]="keyword",e["modifier"]="modifier",e["comment"]="comment",e["string"]="string",e["number"]="number",e["regexp"]="regexp",e["operator"]="operator",e["decorator"]="decorator"}(ve||(ve={})),function(e){e["declaration"]="declaration",e["definition"]="definition",e["readonly"]="readonly",e["static"]="static",e["deprecated"]="deprecated",e["abstract"]="abstract",e["async"]="async",e["modification"]="modification",e["documentation"]="documentation",e["defaultLibrary"]="defaultLibrary"}(be||(be={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.resultId||"string"===typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"===typeof t.data[0])}e.is=t}(ye||(ye={})),function(e){function t(e,t){return{range:e,text:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.string(t.text)}e.create=t,e.is=i}(we||(we={})),function(e){function t(e,t,i){return{range:e,variableName:t,caseSensitiveLookup:i}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&Be.boolean(t.caseSensitiveLookup)&&(Be.string(t.variableName)||void 0===t.variableName)}e.create=t,e.is=i}(Ce||(Ce={})),function(e){function t(e,t){return{range:e,expression:t}}function i(e){const t=e;return void 0!==t&&null!==t&&m.is(t.range)&&(Be.string(t.expression)||void 0===t.expression)}e.create=t,e.is=i}(Se||(Se={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function i(e){const t=e;return Be.defined(t)&&m.is(e.stoppedLocation)}e.create=t,e.is=i}(ke||(ke={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,e.is=t}(xe||(xe={})),function(e){function t(e){return{value:e}}function i(e){const t=e;return Be.objectLiteral(t)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.location||_.is(t.location))&&(void 0===t.command||I.is(t.command))}e.create=t,e.is=i}(Ee||(Ee={})),function(e){function t(e,t,i){const n={position:e,label:t};return void 0!==i&&(n.kind=i),n}function i(e){const t=e;return Be.objectLiteral(t)&&f.is(t.position)&&(Be.string(t.label)||Be.typedArray(t.label,Ee.is))&&(void 0===t.kind||xe.is(t.kind))&&void 0===t.textEdits||Be.typedArray(t.textEdits,D.is)&&(void 0===t.tooltip||Be.string(t.tooltip)||U.is(t.tooltip))&&(void 0===t.paddingLeft||Be.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Be.boolean(t.paddingRight))}e.create=t,e.is=i}(Le||(Le={})),function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t}(Te||(Te={})),function(e){function t(e,t,i,n){return{insertText:e,filterText:t,range:i,command:n}}e.create=t}(Ie||(Ie={})),function(e){function t(e){return{items:e}}e.create=t}(De||(De={})),function(e){e.Invoked=0,e.Automatic=1}(Re||(Re={})),function(e){function t(e,t){return{range:e,text:t}}e.create=t}(Ne||(Ne={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t}(Ae||(Ae={})),function(e){function t(e){const t=e;return Be.objectLiteral(t)&&h.is(t.uri)&&Be.string(t.name)}e.is=t}(Oe||(Oe={})),function(e){function t(e,t,i,n){return new We(e,t,i,n)}function i(e){let t=e;return!!(Be.defined(t)&&Be.string(t.uri)&&(Be.undefined(t.languageId)||Be.string(t.languageId))&&Be.uinteger(t.lineCount)&&Be.func(t.getText)&&Be.func(t.positionAt)&&Be.func(t.offsetAt))}function n(e,t){let i=e.getText(),n=o(t,((e,t)=>{let i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i})),s=i.length;for(let t=n.length-1;t>=0;t--){let o=n[t],r=e.offsetAt(o.range.start),a=e.offsetAt(o.range.end);if(!(a<=s))throw new Error("Overlapping edit");i=i.substring(0,r)+o.newText+i.substring(a,i.length),s=r}return i}function o(e,t){if(e.length<=1)return e;const i=e.length/2|0,n=e.slice(0,i),s=e.slice(i);o(n,t),o(s,t);let r=0,a=0,l=0;while(r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),i=0,n=t.length;if(0===n)return f.create(0,e);while(ie?n=o:i=o+1}let o=i-1;return f.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],n=e.line+1{let t,i=e.getLanguageId();i===this._languageId&&(this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(t),t=window.setTimeout((()=>this._doValidate(e.uri,i)),500)})),this._doValidate(e.uri,i))},o=e=>{d.editor.setModelMarkers(e,this._languageId,[]);let t=e.uri.toString(),i=this._listener[t];i&&(i.dispose(),delete this._listener[t])};this._disposables.push(d.editor.onDidCreateModel(n)),this._disposables.push(d.editor.onWillDisposeModel(o)),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{o(e.model),n(e.model)}))),this._disposables.push(i((e=>{d.editor.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),n(e))}))}))),this._disposables.push({dispose:()=>{d.editor.getModels().forEach(o);for(let e in this._listener)this._listener[e].dispose()}}),d.editor.getModels().forEach(n)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables.length=0}_doValidate(e,t){this._worker(e).then((t=>t.doValidation(e.toString()))).then((i=>{const n=i.map((t=>je(e,t)));let o=d.editor.getModel(e);o&&o.getLanguageId()===t&&d.editor.setModelMarkers(o,t,n)})).then(void 0,(e=>{console.error(e)}))}};function Ve(e){switch(e){case x.Error:return d.MarkerSeverity.Error;case x.Warning:return d.MarkerSeverity.Warning;case x.Information:return d.MarkerSeverity.Info;case x.Hint:return d.MarkerSeverity.Hint;default:return d.MarkerSeverity.Info}}function je(e,t){let i="number"===typeof t.code?String(t.code):t.code;return{severity:Ve(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}var ze=class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doComplete(o.toString(),Ue(t)))).then((i=>{if(!i)return;const n=e.getWordUntilPosition(t),o=new d.Range(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn),s=i.items.map((e=>{const t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:Ye(e.command),range:o,kind:Ge(e.kind)};return e.textEdit&&(Ke(e.textEdit)?t.range={insert:qe(e.textEdit.insert),replace:qe(e.textEdit.replace)}:t.range=qe(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),e.insertTextFormat===q.Snippet&&(t.insertTextRules=d.languages.CompletionItemInsertTextRule.InsertAsSnippet),t}));return{isIncomplete:i.isIncomplete,suggestions:s}}))}};function Ue(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function $e(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function qe(e){if(e)return new d.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Ke(e){return"undefined"!==typeof e.insert&&"undefined"!==typeof e.replace}function Ge(e){const t=d.languages.CompletionItemKind;switch(e){case $.Text:return t.Text;case $.Method:return t.Method;case $.Function:return t.Function;case $.Constructor:return t.Constructor;case $.Field:return t.Field;case $.Variable:return t.Variable;case $.Class:return t.Class;case $.Interface:return t.Interface;case $.Module:return t.Module;case $.Property:return t.Property;case $.Unit:return t.Unit;case $.Value:return t.Value;case $.Enum:return t.Enum;case $.Keyword:return t.Keyword;case $.Snippet:return t.Snippet;case $.Color:return t.Color;case $.File:return t.File;case $.Reference:return t.Reference}return t.Property}function Qe(e){if(e)return{range:qe(e.range),text:e.newText}}function Ye(e){return e&&"editor.action.triggerSuggest"===e.command?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ze=class{constructor(e){this._worker=e}provideHover(e,t,i){let n=e.uri;return this._worker(n).then((e=>e.doHover(n.toString(),Ue(t)))).then((e=>{if(e)return{range:qe(e.range),contents:et(e.contents)}}))}};function Xe(e){return e&&"object"===typeof e&&"string"===typeof e.kind}function Je(e){return"string"===typeof e?{value:e}:Xe(e)?"plaintext"===e.kind?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+"\n"+e.value+"\n```\n"}}function et(e){if(e)return Array.isArray(e)?e.map(Je):[Je(e)]}var tt=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDocumentHighlights(n.toString(),Ue(t)))).then((e=>{if(e)return e.map((e=>({range:qe(e.range),kind:it(e.kind)})))}))}};function it(e){switch(e){case ne.Read:return d.languages.DocumentHighlightKind.Read;case ne.Write:return d.languages.DocumentHighlightKind.Write;case ne.Text:return d.languages.DocumentHighlightKind.Text}return d.languages.DocumentHighlightKind.Text}var nt=class{constructor(e){this._worker=e}provideDefinition(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.findDefinition(n.toString(),Ue(t)))).then((e=>{if(e)return[ot(e)]}))}};function ot(e){return{uri:d.Uri.parse(e.uri),range:qe(e.range)}}var st=class{constructor(e){this._worker=e}provideReferences(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.findReferences(o.toString(),Ue(t)))).then((e=>{if(e)return e.map(ot)}))}},rt=class{constructor(e){this._worker=e}provideRenameEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.doRename(o.toString(),Ue(t),i))).then((e=>at(e)))}};function at(e){if(!e||!e.changes)return;let t=[];for(let i in e.changes){const n=d.Uri.parse(i);for(let o of e.changes[i])t.push({resource:n,versionId:void 0,textEdit:{range:qe(o.range),text:o.newText}})}return{edits:t}}var lt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentSymbols(i.toString()))).then((e=>{if(e)return e.map((e=>ct(e)?dt(e):{name:e.name,detail:"",containerName:e.containerName,kind:ut(e.kind),range:qe(e.location.range),selectionRange:qe(e.location.range),tags:[]}))}))}};function ct(e){return"children"in e}function dt(e){return{name:e.name,detail:e.detail??"",kind:ut(e.kind),range:qe(e.range),selectionRange:qe(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map((e=>dt(e)))}}function ut(e){let t=d.languages.SymbolKind;switch(e){case se.File:return t.File;case se.Module:return t.Module;case se.Namespace:return t.Namespace;case se.Package:return t.Package;case se.Class:return t.Class;case se.Method:return t.Method;case se.Property:return t.Property;case se.Field:return t.Field;case se.Constructor:return t.Constructor;case se.Enum:return t.Enum;case se.Interface:return t.Interface;case se.Function:return t.Function;case se.Variable:return t.Variable;case se.Constant:return t.Constant;case se.String:return t.String;case se.Number:return t.Number;case se.Boolean:return t.Boolean;case se.Array:return t.Array}return t.Function}var ht=class{constructor(e){this._worker=e}provideLinks(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentLinks(i.toString()))).then((e=>{if(e)return{links:e.map((e=>({range:qe(e.range),url:e.target})))}}))}},gt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.format(n.toString(),null,ft(t)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}},pt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,t,i,n){const o=e.uri;return this._worker(o).then((e=>e.format(o.toString(),$e(t),ft(i)).then((e=>{if(e&&0!==e.length)return e.map(Qe)}))))}};function ft(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var mt=class{constructor(e){this._worker=e}provideDocumentColors(e,t){const i=e.uri;return this._worker(i).then((e=>e.findDocumentColors(i.toString()))).then((e=>{if(e)return e.map((e=>({color:e.color,range:qe(e.range)})))}))}provideColorPresentations(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getColorPresentations(n.toString(),t.color,$e(t.range)))).then((e=>{if(e)return e.map((e=>{let t={label:e.label};return e.textEdit&&(t.textEdit=Qe(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(Qe)),t}))}))}},_t=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getFoldingRanges(n.toString(),t))).then((e=>{if(e)return e.map((e=>{const t={start:e.startLine+1,end:e.endLine+1};return"undefined"!==typeof e.kind&&(t.kind=vt(e.kind)),t}))}))}};function vt(e){switch(e){case C.Comment:return d.languages.FoldingRangeKind.Comment;case C.Imports:return d.languages.FoldingRangeKind.Imports;case C.Region:return d.languages.FoldingRangeKind.Region}}var bt,yt=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,i){const n=e.uri;return this._worker(n).then((e=>e.getSelectionRanges(n.toString(),t.map(Ue)))).then((e=>{if(e)return e.map((e=>{const t=[];while(e)t.push({range:qe(e.range)}),e=e.parent;return t}))}))}};function wt(e,t=!1){const i=e.length;let n=0,o="",s=0,r=16,a=0,l=0,c=0,d=0,u=0;function h(t,i){let o=0,s=0;while(o=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}n++,o++}return o=i){t+=e.substring(o,n),u=2;break}const s=e.charCodeAt(n);if(34===s){t+=e.substring(o,n),n++;break}if(92!==s){if(s>=0&&s<=31){if(St(s)){t+=e.substring(o,n),u=2;break}u=6}n++}else{if(t+=e.substring(o,n),n++,n>=i){u=2;break}const s=e.charCodeAt(n++);switch(s){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=h(4,!0);e>=0?t+=String.fromCharCode(e):u=4;break;default:u=5}o=n}}return t}function m(){if(o="",u=0,s=n,l=a,d=c,n>=i)return s=i,r=17;let t=e.charCodeAt(n);if(Ct(t)){do{n++,o+=String.fromCharCode(t),t=e.charCodeAt(n)}while(Ct(t));return r=15}if(St(t))return n++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,o+="\n"),a++,c=n,r=14;switch(t){case 123:return n++,r=1;case 125:return n++,r=2;case 91:return n++,r=3;case 93:return n++,r=4;case 58:return n++,r=6;case 44:return n++,r=5;case 34:return n++,o=f(),r=10;case 47:const l=n-1;if(47===e.charCodeAt(n+1)){n+=2;while(n=12&&e<=15);return e}return{setPosition:g,getPosition:()=>n,scan:t?v:m,getToken:()=>r,getTokenValue:()=>o,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>l,getTokenStartCharacter:()=>s-d,getTokenError:()=>u}}function Ct(e){return 32===e||9===e}function St(e){return 10===e||13===e}function kt(e){return e>=48&&e<=57}(function(e){e[e["lineFeed"]=10]="lineFeed",e[e["carriageReturn"]=13]="carriageReturn",e[e["space"]=32]="space",e[e["_0"]=48]="_0",e[e["_1"]=49]="_1",e[e["_2"]=50]="_2",e[e["_3"]=51]="_3",e[e["_4"]=52]="_4",e[e["_5"]=53]="_5",e[e["_6"]=54]="_6",e[e["_7"]=55]="_7",e[e["_8"]=56]="_8",e[e["_9"]=57]="_9",e[e["a"]=97]="a",e[e["b"]=98]="b",e[e["c"]=99]="c",e[e["d"]=100]="d",e[e["e"]=101]="e",e[e["f"]=102]="f",e[e["g"]=103]="g",e[e["h"]=104]="h",e[e["i"]=105]="i",e[e["j"]=106]="j",e[e["k"]=107]="k",e[e["l"]=108]="l",e[e["m"]=109]="m",e[e["n"]=110]="n",e[e["o"]=111]="o",e[e["p"]=112]="p",e[e["q"]=113]="q",e[e["r"]=114]="r",e[e["s"]=115]="s",e[e["t"]=116]="t",e[e["u"]=117]="u",e[e["v"]=118]="v",e[e["w"]=119]="w",e[e["x"]=120]="x",e[e["y"]=121]="y",e[e["z"]=122]="z",e[e["A"]=65]="A",e[e["B"]=66]="B",e[e["C"]=67]="C",e[e["D"]=68]="D",e[e["E"]=69]="E",e[e["F"]=70]="F",e[e["G"]=71]="G",e[e["H"]=72]="H",e[e["I"]=73]="I",e[e["J"]=74]="J",e[e["K"]=75]="K",e[e["L"]=76]="L",e[e["M"]=77]="M",e[e["N"]=78]="N",e[e["O"]=79]="O",e[e["P"]=80]="P",e[e["Q"]=81]="Q",e[e["R"]=82]="R",e[e["S"]=83]="S",e[e["T"]=84]="T",e[e["U"]=85]="U",e[e["V"]=86]="V",e[e["W"]=87]="W",e[e["X"]=88]="X",e[e["Y"]=89]="Y",e[e["Z"]=90]="Z",e[e["asterisk"]=42]="asterisk",e[e["backslash"]=92]="backslash",e[e["closeBrace"]=125]="closeBrace",e[e["closeBracket"]=93]="closeBracket",e[e["colon"]=58]="colon",e[e["comma"]=44]="comma",e[e["dot"]=46]="dot",e[e["doubleQuote"]=34]="doubleQuote",e[e["minus"]=45]="minus",e[e["openBrace"]=123]="openBrace",e[e["openBracket"]=91]="openBracket",e[e["plus"]=43]="plus",e[e["slash"]=47]="slash",e[e["formFeed"]=12]="formFeed",e[e["tab"]=9]="tab"})(bt||(bt={}));new Array(20).fill(0).map(((e,t)=>" ".repeat(t)));var xt,Et=200;new Array(Et).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),new Array(Et).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)));(function(e){e.DEFAULT={allowTrailingComma:!1}})(xt||(xt={}));var Lt,Tt,It,Dt=wt;function Rt(e){return{getInitialState:()=>new $t(null,null,!1,null),tokenize:(t,i)=>qt(e,t,i)}}(function(e){e[e["None"]=0]="None",e[e["UnexpectedEndOfComment"]=1]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=2]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=3]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=4]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=5]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=6]="InvalidCharacter"})(Lt||(Lt={})),function(e){e[e["OpenBraceToken"]=1]="OpenBraceToken",e[e["CloseBraceToken"]=2]="CloseBraceToken",e[e["OpenBracketToken"]=3]="OpenBracketToken",e[e["CloseBracketToken"]=4]="CloseBracketToken",e[e["CommaToken"]=5]="CommaToken",e[e["ColonToken"]=6]="ColonToken",e[e["NullKeyword"]=7]="NullKeyword",e[e["TrueKeyword"]=8]="TrueKeyword",e[e["FalseKeyword"]=9]="FalseKeyword",e[e["StringLiteral"]=10]="StringLiteral",e[e["NumericLiteral"]=11]="NumericLiteral",e[e["LineCommentTrivia"]=12]="LineCommentTrivia",e[e["BlockCommentTrivia"]=13]="BlockCommentTrivia",e[e["LineBreakTrivia"]=14]="LineBreakTrivia",e[e["Trivia"]=15]="Trivia",e[e["Unknown"]=16]="Unknown",e[e["EOF"]=17]="EOF"}(Tt||(Tt={})),function(e){e[e["InvalidSymbol"]=1]="InvalidSymbol",e[e["InvalidNumberFormat"]=2]="InvalidNumberFormat",e[e["PropertyNameExpected"]=3]="PropertyNameExpected",e[e["ValueExpected"]=4]="ValueExpected",e[e["ColonExpected"]=5]="ColonExpected",e[e["CommaExpected"]=6]="CommaExpected",e[e["CloseBraceExpected"]=7]="CloseBraceExpected",e[e["CloseBracketExpected"]=8]="CloseBracketExpected",e[e["EndOfFileExpected"]=9]="EndOfFileExpected",e[e["InvalidCommentToken"]=10]="InvalidCommentToken",e[e["UnexpectedEndOfComment"]=11]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=12]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=13]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=14]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=15]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=16]="InvalidCharacter"}(It||(It={}));var Nt,At="delimiter.bracket.json",Ot="delimiter.array.json",Pt="delimiter.colon.json",Mt="delimiter.comma.json",Ft="keyword.json",Bt="keyword.json",Wt="string.value.json",Ht="number.json",Vt="string.key.json",jt="comment.block.json",zt="comment.line.json",Ut=class e{constructor(e,t){this.parent=e,this.type=t}static pop(e){return e?e.parent:null}static push(t,i){return new e(t,i)}static equals(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;while(e&&t){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0}},$t=class e{constructor(e,t,i,n){this._state=e,this.scanError=t,this.lastWasColon=i,this.parents=n}clone(){return new e(this._state,this.scanError,this.lastWasColon,this.parents)}equals(t){return t===this||!!(t&&t instanceof e)&&(this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon&&Ut.equals(this.parents,t.parents))}getStateData(){return this._state}setStateData(e){this._state=e}};function qt(e,t,i,n=0){let o=0,s=!1;switch(i.scanError){case 2:t='"'+t,o=1;break;case 1:t="/*"+t,o=2;break}const r=Dt(t);let a=i.lastWasColon,l=i.parents;const c={tokens:[],endState:i.clone()};while(1){let d=n+r.getPosition(),u="";const h=r.scan();if(17===h)break;if(d===n+r.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(r.getPosition(),3));switch(s&&(d-=o),s=o>0,h){case 1:l=Ut.push(l,0),u=At,a=!1;break;case 2:l=Ut.pop(l),u=At,a=!1;break;case 3:l=Ut.push(l,1),u=Ot,a=!1;break;case 4:l=Ut.pop(l),u=Ot,a=!1;break;case 6:u=Pt,a=!0;break;case 5:u=Mt,a=!1;break;case 8:case 9:u=Ft,a=!1;break;case 7:u=Bt,a=!1;break;case 10:const e=l?l.type:0,t=1===e;u=a||t?Wt:Vt,a=!1;break;case 11:u=Ht,a=!1;break}if(e)switch(h){case 12:u=zt;break;case 13:u=jt;break}c.endState=new $t(i.getStateData(),r.getTokenError(),a,l),c.tokens.push({startIndex:d,scopes:u})}return c}function Kt(){return new Promise(((e,t)=>{if(!Nt)return t("JSON not registered!");e(Nt)}))}var Gt=class extends He{constructor(e,t,i){super(e,t,i.onDidChange),this._disposables.push(d.editor.onWillDisposeModel((e=>{this._resetSchema(e.uri)}))),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{this._resetSchema(e.model.uri)})))}_resetSchema(e){this._worker().then((t=>{t.resetSchema(e.toString())}))}};function Qt(e){const t=[],i=[],n=new Fe(e);function o(){const{languageId:t,modeConfiguration:n}=e;Zt(i),n.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(t,new gt(Nt))),n.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(t,new pt(Nt))),n.completionItems&&i.push(d.languages.registerCompletionItemProvider(t,new ze(Nt,[" ",":",'"']))),n.hovers&&i.push(d.languages.registerHoverProvider(t,new Ze(Nt))),n.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(t,new lt(Nt))),n.tokens&&i.push(d.languages.setTokensProvider(t,Rt(!0))),n.colors&&i.push(d.languages.registerColorProvider(t,new mt(Nt))),n.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(t,new _t(Nt))),n.diagnostics&&i.push(new Gt(t,Nt,e)),n.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(t,new yt(Nt)))}t.push(n),Nt=(...e)=>n.getLanguageServiceWorker(...e),o(),t.push(d.languages.setLanguageConfiguration(e.languageId,Xt));let s=e.modeConfiguration;return e.onDidChange((e=>{e.modeConfiguration!==s&&(s=e.modeConfiguration,o())})),t.push(Yt(i)),Yt(t)}function Yt(e){return{dispose:()=>Zt(e)}}function Zt(e){while(e.length)e.pop().dispose()}var Xt={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]}},49556:(e,t,i)=>{"use strict";var n=i(26732),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},c=(e,t,i)=>(l(e,t,"default"),i&&l(i,t,"default")),d={}; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) @@ -1677,17 +1677,17 @@ var n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"], * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/c(u,n);var h=(e=>(e[e["None"]=0]="None",e[e["CommonJS"]=1]="CommonJS",e[e["AMD"]=2]="AMD",e[e["UMD"]=3]="UMD",e[e["System"]=4]="System",e[e["ES2015"]=5]="ES2015",e[e["ESNext"]=99]="ESNext",e))(h||{}),g=(e=>(e[e["None"]=0]="None",e[e["Preserve"]=1]="Preserve",e[e["React"]=2]="React",e[e["ReactNative"]=3]="ReactNative",e[e["ReactJSX"]=4]="ReactJSX",e[e["ReactJSXDev"]=5]="ReactJSXDev",e))(g||{}),p=(e=>(e[e["CarriageReturnLineFeed"]=0]="CarriageReturnLineFeed",e[e["LineFeed"]=1]="LineFeed",e))(p||{}),f=(e=>(e[e["ES3"]=0]="ES3",e[e["ES5"]=1]="ES5",e[e["ES2015"]=2]="ES2015",e[e["ES2016"]=3]="ES2016",e[e["ES2017"]=4]="ES2017",e[e["ES2018"]=5]="ES2018",e[e["ES2019"]=6]="ES2019",e[e["ES2020"]=7]="ES2020",e[e["ESNext"]=99]="ESNext",e[e["JSON"]=100]="JSON",e[e["Latest"]=99]="Latest",e))(f||{}),m=(e=>(e[e["Classic"]=1]="Classic",e[e["NodeJs"]=2]="NodeJs",e))(m||{}),_=class{constructor(e,t,i,n,o){this._onDidChange=new u.Emitter,this._onDidExtraLibsChange=new u.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(o),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i="undefined"===typeof t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content;let n=1;this._removedExtraLibs[e]&&(n=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)}),0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},v=d,b={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},y=new _({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},b),w=new _({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},b),C=()=>k().then((e=>e.getTypeScriptWorker())),S=()=>k().then((e=>e.getJavaScriptWorker()));function k(){return i.e(121).then(i.bind(i,43888))}u.languages.typescript={ModuleKind:h,JsxEmit:g,NewLineKind:p,ScriptTarget:f,ModuleResolutionKind:m,typescriptVersion:v,typescriptDefaults:y,javascriptDefaults:w,getTypeScriptWorker:C,getJavaScriptWorker:S},u.languages.onLanguage("typescript",(()=>k().then((e=>e.setupTypeScript(y))))),u.languages.onLanguage("javascript",(()=>k().then((e=>e.setupJavaScript(w)))))},43888:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Adapter:()=>m,CodeActionAdaptor:()=>O,DefinitionAdapter:()=>k,DiagnosticsAdapter:()=>v,DocumentHighlightAdapter:()=>S,FormatAdapter:()=>N,FormatHelper:()=>D,FormatOnTypeAdapter:()=>A,InlayHintsAdapter:()=>M,Kind:()=>L,LibFiles:()=>_,OutlineAdapter:()=>E,QuickInfoAdapter:()=>C,ReferenceAdapter:()=>x,RenameAdapter:()=>P,SignatureHelpAdapter:()=>w,SuggestAdapter:()=>b,WorkerManager:()=>h,flattenDiagnosticMessageText:()=>p,getJavaScriptWorker:()=>W,getTypeScriptWorker:()=>H,setupJavaScript:()=>B,setupTypeScript:()=>F});var n=i(26732),o=i(78481),s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,c=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let o of a(t))l.call(e,o)||o===i||s(e,o,{get:()=>t[o],enumerable:!(n=r(t,o))||n.enumerable});return e},d=(e,t,i)=>(c(e,t,"default"),i&&c(i,t,"default")),u={};d(u,n);var h=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker())),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange((()=>this._updateExtraLibs()))}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=u.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(u.editor.getModels().filter((e=>e.getLanguageId()===this._modeId)).map((e=>e.uri))):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},g={};function p(e,t,i=0){if("string"===typeof e)return e;if(void 0===e)return"";let n="";if(i){n+=t;for(let e=0;ee.text)).join(""):""}g["lib.d.ts"]=!0,g["lib.decorators.d.ts"]=!0,g["lib.decorators.legacy.d.ts"]=!0,g["lib.dom.asynciterable.d.ts"]=!0,g["lib.dom.d.ts"]=!0,g["lib.dom.iterable.d.ts"]=!0,g["lib.es2015.collection.d.ts"]=!0,g["lib.es2015.core.d.ts"]=!0,g["lib.es2015.d.ts"]=!0,g["lib.es2015.generator.d.ts"]=!0,g["lib.es2015.iterable.d.ts"]=!0,g["lib.es2015.promise.d.ts"]=!0,g["lib.es2015.proxy.d.ts"]=!0,g["lib.es2015.reflect.d.ts"]=!0,g["lib.es2015.symbol.d.ts"]=!0,g["lib.es2015.symbol.wellknown.d.ts"]=!0,g["lib.es2016.array.include.d.ts"]=!0,g["lib.es2016.d.ts"]=!0,g["lib.es2016.full.d.ts"]=!0,g["lib.es2016.intl.d.ts"]=!0,g["lib.es2017.d.ts"]=!0,g["lib.es2017.date.d.ts"]=!0,g["lib.es2017.full.d.ts"]=!0,g["lib.es2017.intl.d.ts"]=!0,g["lib.es2017.object.d.ts"]=!0,g["lib.es2017.sharedmemory.d.ts"]=!0,g["lib.es2017.string.d.ts"]=!0,g["lib.es2017.typedarrays.d.ts"]=!0,g["lib.es2018.asyncgenerator.d.ts"]=!0,g["lib.es2018.asynciterable.d.ts"]=!0,g["lib.es2018.d.ts"]=!0,g["lib.es2018.full.d.ts"]=!0,g["lib.es2018.intl.d.ts"]=!0,g["lib.es2018.promise.d.ts"]=!0,g["lib.es2018.regexp.d.ts"]=!0,g["lib.es2019.array.d.ts"]=!0,g["lib.es2019.d.ts"]=!0,g["lib.es2019.full.d.ts"]=!0,g["lib.es2019.intl.d.ts"]=!0,g["lib.es2019.object.d.ts"]=!0,g["lib.es2019.string.d.ts"]=!0,g["lib.es2019.symbol.d.ts"]=!0,g["lib.es2020.bigint.d.ts"]=!0,g["lib.es2020.d.ts"]=!0,g["lib.es2020.date.d.ts"]=!0,g["lib.es2020.full.d.ts"]=!0,g["lib.es2020.intl.d.ts"]=!0,g["lib.es2020.number.d.ts"]=!0,g["lib.es2020.promise.d.ts"]=!0,g["lib.es2020.sharedmemory.d.ts"]=!0,g["lib.es2020.string.d.ts"]=!0,g["lib.es2020.symbol.wellknown.d.ts"]=!0,g["lib.es2021.d.ts"]=!0,g["lib.es2021.full.d.ts"]=!0,g["lib.es2021.intl.d.ts"]=!0,g["lib.es2021.promise.d.ts"]=!0,g["lib.es2021.string.d.ts"]=!0,g["lib.es2021.weakref.d.ts"]=!0,g["lib.es2022.array.d.ts"]=!0,g["lib.es2022.d.ts"]=!0,g["lib.es2022.error.d.ts"]=!0,g["lib.es2022.full.d.ts"]=!0,g["lib.es2022.intl.d.ts"]=!0,g["lib.es2022.object.d.ts"]=!0,g["lib.es2022.regexp.d.ts"]=!0,g["lib.es2022.sharedmemory.d.ts"]=!0,g["lib.es2022.string.d.ts"]=!0,g["lib.es2023.array.d.ts"]=!0,g["lib.es2023.collection.d.ts"]=!0,g["lib.es2023.d.ts"]=!0,g["lib.es2023.full.d.ts"]=!0,g["lib.es5.d.ts"]=!0,g["lib.es6.d.ts"]=!0,g["lib.esnext.collection.d.ts"]=!0,g["lib.esnext.d.ts"]=!0,g["lib.esnext.decorators.d.ts"]=!0,g["lib.esnext.disposable.d.ts"]=!0,g["lib.esnext.full.d.ts"]=!0,g["lib.esnext.intl.d.ts"]=!0,g["lib.esnext.object.d.ts"]=!0,g["lib.esnext.promise.d.ts"]=!0,g["lib.scripthost.d.ts"]=!0,g["lib.webworker.asynciterable.d.ts"]=!0,g["lib.webworker.d.ts"]=!0,g["lib.webworker.importscripts.d.ts"]=!0,g["lib.webworker.iterable.d.ts"]=!0;var m=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let i=e.getPositionAt(t.start),n=e.getPositionAt(t.start+t.length),{lineNumber:o,column:s}=i,{lineNumber:r,column:a}=n;return{startLineNumber:o,startColumn:s,endLineNumber:r,endColumn:a}}},_=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return!!e&&(0===e.path.indexOf("/lib.")&&!!g[e.path.slice(1)])}getOrCreateModel(e){const t=u.Uri.parse(e),i=u.editor.getModel(t);if(i)return i;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return u.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const n=o.IF.getExtraLibs()[e];return n?u.editor.createModel(n.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then((e=>e.getLibFiles())).then((e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}))),this._fetchLibFilesPromise}},v=class extends m{constructor(e,t,i,n){super(n),this._libFiles=e,this._defaults=t,this._selector=i,this._disposables=[],this._listener=Object.create(null);const o=e=>{if(e.getLanguageId()!==i)return;const t=()=>{const{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)};let n;const o=e.onDidChangeContent((()=>{clearTimeout(n),n=window.setTimeout(t,500)})),s=e.onDidChangeAttached((()=>{const{onlyVisible:i}=this._defaults.getDiagnosticsOptions();i&&(e.isAttachedToEditor()?t():u.editor.setModelMarkers(e,this._selector,[]))}));this._listener[e.uri.toString()]={dispose(){o.dispose(),s.dispose(),clearTimeout(n)}},t()},s=e=>{u.editor.setModelMarkers(e,this._selector,[]);const t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(u.editor.onDidCreateModel((e=>o(e)))),this._disposables.push(u.editor.onWillDisposeModel(s)),this._disposables.push(u.editor.onDidChangeModelLanguage((e=>{s(e.model),o(e.model)}))),this._disposables.push({dispose(){for(const e of u.editor.getModels())s(e)}});const r=()=>{for(const e of u.editor.getModels())s(e),o(e)};this._disposables.push(this._defaults.onDidChange(r)),this._disposables.push(this._defaults.onDidExtraLibsChange(r)),u.editor.getModels().forEach((e=>o(e)))}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const i=[],{noSyntaxValidation:n,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();n||i.push(t.getSyntacticDiagnostics(e.uri.toString())),o||i.push(t.getSemanticDiagnostics(e.uri.toString())),s||i.push(t.getSuggestionDiagnostics(e.uri.toString()));const r=await Promise.all(i);if(!r||e.isDisposed())return;const a=r.reduce(((e,t)=>t.concat(e)),[]).filter((e=>-1===(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code))),l=a.map((e=>e.relatedInformation||[])).reduce(((e,t)=>t.concat(e)),[]).map((e=>e.file?u.Uri.parse(e.file.fileName):null));await this._libFiles.fetchLibFilesIfNecessary(l),e.isDisposed()||u.editor.setModelMarkers(e,this._selector,a.map((t=>this._convertDiagnostics(e,t))))}_convertDiagnostics(e,t){const i=t.start||0,n=t.length||1,{lineNumber:o,column:s}=e.getPositionAt(i),{lineNumber:r,column:a}=e.getPositionAt(i+n),l=[];return t.reportsUnnecessary&&l.push(u.MarkerTag.Unnecessary),t.reportsDeprecated&&l.push(u.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:o,startColumn:s,endLineNumber:r,endColumn:a,message:p(t.messageText,"\n"),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const i=[];return t.forEach((t=>{let n=e;if(t.file&&(n=this._libFiles.getOrCreateModel(t.file.fileName)),!n)return;const o=t.start||0,s=t.length||1,{lineNumber:r,column:a}=n.getPositionAt(o),{lineNumber:l,column:c}=n.getPositionAt(o+s);i.push({resource:n.uri,startLineNumber:r,startColumn:a,endLineNumber:l,endColumn:c,message:p(t.messageText,"\n")})})),i}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return u.MarkerSeverity.Error;case 3:return u.MarkerSeverity.Info;case 0:return u.MarkerSeverity.Warning;case 2:return u.MarkerSeverity.Hint}return u.MarkerSeverity.Info}},b=class e extends m{get triggerCharacters(){return["."]}async provideCompletionItems(t,i,n,o){const s=t.getWordUntilPosition(i),r=new u.Range(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),a=t.uri,l=t.getOffsetAt(i),c=await this._worker(a);if(t.isDisposed())return;const d=await c.getCompletionsAtPosition(a.toString(),l);if(!d||t.isDisposed())return;const h=d.entries.map((n=>{let o=r;if(n.replacementSpan){const e=t.getPositionAt(n.replacementSpan.start),i=t.getPositionAt(n.replacementSpan.start+n.replacementSpan.length);o=new u.Range(e.lineNumber,e.column,i.lineNumber,i.column)}const s=[];return void 0!==n.kindModifiers&&-1!==n.kindModifiers.indexOf("deprecated")&&s.push(u.languages.CompletionItemTag.Deprecated),{uri:a,position:i,offset:l,range:o,label:n.name,insertText:n.name,sortText:n.sortText,kind:e.convertKind(n.kind),tags:s}}));return{suggestions:h}}async resolveCompletionItem(t,i){const n=t,o=n.uri,s=n.position,r=n.offset,a=await this._worker(o),l=await a.getCompletionEntryDetails(o.toString(),r,n.label);return l?{uri:o,position:s,label:l.name,kind:e.convertKind(l.kind),detail:f(l.displayParts),documentation:{value:e.createDocumentationString(l)}}:n}static convertKind(e){switch(e){case L.primitiveType:case L.keyword:return u.languages.CompletionItemKind.Keyword;case L.variable:case L.localVariable:return u.languages.CompletionItemKind.Variable;case L.memberVariable:case L.memberGetAccessor:case L.memberSetAccessor:return u.languages.CompletionItemKind.Field;case L.function:case L.memberFunction:case L.constructSignature:case L.callSignature:case L.indexSignature:return u.languages.CompletionItemKind.Function;case L.enum:return u.languages.CompletionItemKind.Enum;case L.module:return u.languages.CompletionItemKind.Module;case L.class:return u.languages.CompletionItemKind.Class;case L.interface:return u.languages.CompletionItemKind.Interface;case L.warning:return u.languages.CompletionItemKind.File}return u.languages.CompletionItemKind.Property}static createDocumentationString(e){let t=f(e.documentation);if(e.tags)for(const i of e.tags)t+=`\n\n${y(i)}`;return t}};function y(e){let t=`*@${e.name}*`;if("param"===e.name&&e.text){const[i,...n]=e.text;t+=`\`${i.text}\``,n.length>0&&(t+=` — ${n.map((e=>e.text)).join(" ")}`)}else Array.isArray(e.text)?t+=` — ${e.text.map((e=>e.text)).join(" ")}`:e.text&&(t+=` — ${e.text}`);return t}var w=class e extends m{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case u.languages.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case u.languages.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case u.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(t,i,n,o){const s=t.uri,r=t.getOffsetAt(i),a=await this._worker(s);if(t.isDisposed())return;const l=await a.getSignatureHelpItems(s.toString(),r,{triggerReason:e._toSignatureHelpTriggerReason(o)});if(!l||t.isDisposed())return;const c={activeSignature:l.selectedItemIndex,activeParameter:l.argumentIndex,signatures:[]};return l.items.forEach((e=>{const t={label:"",parameters:[]};t.documentation={value:f(e.documentation)},t.label+=f(e.prefixDisplayParts),e.parameters.forEach(((i,n,o)=>{const s=f(i.displayParts),r={label:s,documentation:{value:f(i.documentation)}};t.label+=s,t.parameters.push(r),ny(e))).join(" \n\n"):"",c=f(r.displayParts);return{range:this._textSpanToRange(e,r.textSpan),contents:[{value:"```typescript\n"+c+"\n```\n"},{value:a+(l?"\n\n"+l:"")}]}}},S=class extends m{async provideDocumentHighlights(e,t,i){const n=e.uri,o=e.getOffsetAt(t),s=await this._worker(n);if(e.isDisposed())return;const r=await s.getDocumentHighlights(n.toString(),o,[n.toString()]);return r&&!e.isDisposed()?r.flatMap((t=>t.highlightSpans.map((t=>({range:this._textSpanToRange(e,t.textSpan),kind:"writtenReference"===t.kind?u.languages.DocumentHighlightKind.Write:u.languages.DocumentHighlightKind.Text}))))):void 0}},k=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,i){const n=e.uri,o=e.getOffsetAt(t),s=await this._worker(n);if(e.isDisposed())return;const r=await s.getDefinitionAtPosition(n.toString(),o);if(!r||e.isDisposed())return;if(await this._libFiles.fetchLibFilesIfNecessary(r.map((e=>u.Uri.parse(e.fileName)))),e.isDisposed())return;const a=[];for(let l of r){const e=this._libFiles.getOrCreateModel(l.fileName);e&&a.push({uri:e.uri,range:this._textSpanToRange(e,l.textSpan)})}return a}},x=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,i,n){const o=e.uri,s=e.getOffsetAt(t),r=await this._worker(o);if(e.isDisposed())return;const a=await r.getReferencesAtPosition(o.toString(),s);if(!a||e.isDisposed())return;if(await this._libFiles.fetchLibFilesIfNecessary(a.map((e=>u.Uri.parse(e.fileName)))),e.isDisposed())return;const l=[];for(let c of a){const e=this._libFiles.getOrCreateModel(c.fileName);e&&l.push({uri:e.uri,range:this._textSpanToRange(e,c.textSpan)})}return l}},E=class extends m{async provideDocumentSymbols(e,t){const i=e.uri,n=await this._worker(i);if(e.isDisposed())return;const o=await n.getNavigationTree(i.toString());if(!o||e.isDisposed())return;const s=(t,i)=>{const n={name:t.text,detail:"",kind:T[t.kind]||u.languages.SymbolKind.Variable,range:this._textSpanToRange(e,t.spans[0]),selectionRange:this._textSpanToRange(e,t.spans[0]),tags:[],children:t.childItems?.map((e=>s(e,t.text))),containerName:i};return n},r=o.childItems?o.childItems.map((e=>s(e))):[];return r}},L=class{static{this.unknown=""}static{this.keyword="keyword"}static{this.script="script"}static{this.module="module"}static{this.class="class"}static{this.interface="interface"}static{this.type="type"}static{this.enum="enum"}static{this.variable="var"}static{this.localVariable="local var"}static{this.function="function"}static{this.localFunction="local function"}static{this.memberFunction="method"}static{this.memberGetAccessor="getter"}static{this.memberSetAccessor="setter"}static{this.memberVariable="property"}static{this.constructorImplementation="constructor"}static{this.callSignature="call"}static{this.indexSignature="index"}static{this.constructSignature="construct"}static{this.parameter="parameter"}static{this.typeParameter="type parameter"}static{this.primitiveType="primitive type"}static{this.label="label"}static{this.alias="alias"}static{this.const="const"}static{this.let="let"}static{this.warning="warning"}},T=Object.create(null);T[L.module]=u.languages.SymbolKind.Module,T[L.class]=u.languages.SymbolKind.Class,T[L.enum]=u.languages.SymbolKind.Enum,T[L.interface]=u.languages.SymbolKind.Interface,T[L.memberFunction]=u.languages.SymbolKind.Method,T[L.memberVariable]=u.languages.SymbolKind.Property,T[L.memberGetAccessor]=u.languages.SymbolKind.Property,T[L.memberSetAccessor]=u.languages.SymbolKind.Property,T[L.variable]=u.languages.SymbolKind.Variable,T[L.const]=u.languages.SymbolKind.Variable,T[L.localVariable]=u.languages.SymbolKind.Variable,T[L.variable]=u.languages.SymbolKind.Variable,T[L.function]=u.languages.SymbolKind.Function,T[L.localFunction]=u.languages.SymbolKind.Function;var I,R,D=class extends m{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:"\n",InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}},N=class extends D{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,i,n){const o=e.uri,s=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),r=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),a=await this._worker(o);if(e.isDisposed())return;const l=await a.getFormattingEditsForRange(o.toString(),s,r,D._convertOptions(i));return l&&!e.isDisposed()?l.map((t=>this._convertTextChanges(e,t))):void 0}},A=class extends D{get autoFormatTriggerCharacters(){return[";","}","\n"]}async provideOnTypeFormattingEdits(e,t,i,n,o){const s=e.uri,r=e.getOffsetAt(t),a=await this._worker(s);if(e.isDisposed())return;const l=await a.getFormattingEditsAfterKeystroke(s.toString(),r,i,D._convertOptions(n));return l&&!e.isDisposed()?l.map((t=>this._convertTextChanges(e,t))):void 0}},O=class extends D{async provideCodeActions(e,t,i,n){const o=e.uri,s=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),r=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),a=D._convertOptions(e.getOptions()),l=i.markers.filter((e=>e.code)).map((e=>e.code)).map(Number),c=await this._worker(o);if(e.isDisposed())return;const d=await c.getCodeFixesAtPosition(o.toString(),s,r,l,a);if(!d||e.isDisposed())return{actions:[],dispose:()=>{}};const u=d.filter((e=>0===e.changes.filter((e=>e.isNewFile)).length)).map((t=>this._tsCodeFixActionToMonacoCodeAction(e,i,t)));return{actions:u,dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,i){const n=[];for(const s of i.changes)for(const t of s.textChanges)n.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,t.span),text:t.newText}});const o={title:i.description,edit:{edits:n},diagnostics:t.markers,kind:"quickfix"};return o}},P=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,i,n){const o=e.uri,s=o.toString(),r=e.getOffsetAt(t),a=await this._worker(o);if(e.isDisposed())return;const l=await a.getRenameInfo(s,r,{allowRenameOfImportPath:!1});if(!1===l.canRename)return{edits:[],rejectReason:l.localizedErrorMessage};if(void 0!==l.fileToRename)throw new Error("Renaming files is not supported.");const c=await a.findRenameLocations(s,r,!1,!1,!1);if(!c||e.isDisposed())return;const d=[];for(const u of c){const e=this._libFiles.getOrCreateModel(u.fileName);if(!e)throw new Error(`Unknown file ${u.fileName}.`);d.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,u.textSpan),text:i}})}return{edits:d}}},M=class extends m{async provideInlayHints(e,t,i){const n=e.uri,o=n.toString(),s=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),r=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),a=await this._worker(n);if(e.isDisposed())return null;const l=await a.provideInlayHints(o,s,r),c=l.map((t=>({...t,label:t.text,position:e.getPositionAt(t.position),kind:this._convertHintKind(t.kind)})));return{hints:c,dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return u.languages.InlayHintKind.Parameter;case"Type":return u.languages.InlayHintKind.Type;default:return u.languages.InlayHintKind.Type}}};function F(e){R=V(e,"typescript")}function B(e){I=V(e,"javascript")}function W(){return new Promise(((e,t)=>{if(!I)return t("JavaScript not registered!");e(I)}))}function H(){return new Promise(((e,t)=>{if(!R)return t("TypeScript not registered!");e(R)}))}function V(e,t){const i=[],n=[],o=new h(t,e);i.push(o);const s=(...e)=>o.getLanguageServiceWorker(...e),r=new _(s);function a(){const{modeConfiguration:i}=e;z(n),i.completionItems&&n.push(u.languages.registerCompletionItemProvider(t,new b(s))),i.signatureHelp&&n.push(u.languages.registerSignatureHelpProvider(t,new w(s))),i.hovers&&n.push(u.languages.registerHoverProvider(t,new C(s))),i.documentHighlights&&n.push(u.languages.registerDocumentHighlightProvider(t,new S(s))),i.definitions&&n.push(u.languages.registerDefinitionProvider(t,new k(r,s))),i.references&&n.push(u.languages.registerReferenceProvider(t,new x(r,s))),i.documentSymbols&&n.push(u.languages.registerDocumentSymbolProvider(t,new E(s))),i.rename&&n.push(u.languages.registerRenameProvider(t,new P(r,s))),i.documentRangeFormattingEdits&&n.push(u.languages.registerDocumentRangeFormattingEditProvider(t,new N(s))),i.onTypeFormattingEdits&&n.push(u.languages.registerOnTypeFormattingEditProvider(t,new A(s))),i.codeActions&&n.push(u.languages.registerCodeActionProvider(t,new O(s))),i.inlayHints&&n.push(u.languages.registerInlayHintsProvider(t,new M(s))),i.diagnostics&&n.push(new v(r,e,t,s))}return a(),i.push(j(n)),s}function j(e){return{dispose:()=>z(e)}}function z(e){while(e.length)e.pop().dispose()}},41337:(e,t,i)=>{"use strict";function n(){return globalThis._VSCODE_NLS_MESSAGES}function o(){return globalThis._VSCODE_NLS_LANGUAGE}i.d(t,{i8:()=>o,Ec:()=>n,kg:()=>a,aS:()=>c});const s="pseudo"===o()||"undefined"!==typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function r(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],o=t[n];let s=e;return"string"===typeof o?s=o:"number"!==typeof o&&"boolean"!==typeof o&&void 0!==o&&null!==o||(s=String(o)),s})),s&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function a(e,t,...i){return r("number"===typeof e?l(e,t):t,i)}function l(e,t){const i=n()?.[e];if("string"!==typeof i){if("string"===typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return i}function c(e,t,...i){let n;n="number"===typeof e?l(e,t):t;const o=r(n,i);return{value:o,original:t===n?o:r(t,i)}}},3115:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});const n=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const t=this._implementations.indexOf(e);-1!==t&&this._implementations.splice(t,1)}}}getImplementations(){return this._implementations}}},17300:(e,t,i)=>{"use strict";i.d(t,{f:()=>r,j:()=>s});var n=i(18904),o=i(87778);const s=(0,o.u1)("accessibilityService"),r=new n.N1("accessibilityModeEnabled",!1)},4380:(e,t,i)=>{"use strict";i.d(t,{Nt:()=>s,Rh:()=>l});var n=i(41337),o=i(87778);const s=(0,o.u1)("accessibilitySignalService");Symbol("AcknowledgeDocCommentsToken");class r{static register(e){const t=new r(e.fileName);return t}static{this.error=r.register({fileName:"error.mp3"})}static{this.warning=r.register({fileName:"warning.mp3"})}static{this.success=r.register({fileName:"success.mp3"})}static{this.foldedArea=r.register({fileName:"foldedAreas.mp3"})}static{this.break=r.register({fileName:"break.mp3"})}static{this.quickFixes=r.register({fileName:"quickFixes.mp3"})}static{this.taskCompleted=r.register({fileName:"taskCompleted.mp3"})}static{this.taskFailed=r.register({fileName:"taskFailed.mp3"})}static{this.terminalBell=r.register({fileName:"terminalBell.mp3"})}static{this.diffLineInserted=r.register({fileName:"diffLineInserted.mp3"})}static{this.diffLineDeleted=r.register({fileName:"diffLineDeleted.mp3"})}static{this.diffLineModified=r.register({fileName:"diffLineModified.mp3"})}static{this.chatRequestSent=r.register({fileName:"chatRequestSent.mp3"})}static{this.chatResponseReceived1=r.register({fileName:"chatResponseReceived1.mp3"})}static{this.chatResponseReceived2=r.register({fileName:"chatResponseReceived2.mp3"})}static{this.chatResponseReceived3=r.register({fileName:"chatResponseReceived3.mp3"})}static{this.chatResponseReceived4=r.register({fileName:"chatResponseReceived4.mp3"})}static{this.clear=r.register({fileName:"clear.mp3"})}static{this.save=r.register({fileName:"save.mp3"})}static{this.format=r.register({fileName:"format.mp3"})}static{this.voiceRecordingStarted=r.register({fileName:"voiceRecordingStarted.mp3"})}static{this.voiceRecordingStopped=r.register({fileName:"voiceRecordingStopped.mp3"})}static{this.progress=r.register({fileName:"progress.mp3"})}constructor(e){this.fileName=e}}class a{constructor(e){this.randomOneOf=e}}class l{constructor(e,t,i,n,o,s){this.sound=e,this.name=t,this.legacySoundSettingsKey=i,this.settingsKey=n,this.legacyAnnouncementSettingsKey=o,this.announcementMessage=s}static{this._signals=new Set}static register(e){const t=new a("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new l(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return l._signals.add(i),i}static{this.errorAtPosition=l.register({name:(0,n.kg)("accessibilitySignals.positionHasError.name","Error at Position"),sound:r.error,announcementMessage:(0,n.kg)("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"})}static{this.warningAtPosition=l.register({name:(0,n.kg)("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:r.warning,announcementMessage:(0,n.kg)("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"})}static{this.errorOnLine=l.register({name:(0,n.kg)("accessibilitySignals.lineHasError.name","Error on Line"),sound:r.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:(0,n.kg)("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"})}static{this.warningOnLine=l.register({name:(0,n.kg)("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:r.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:(0,n.kg)("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"})}static{this.foldedArea=l.register({name:(0,n.kg)("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:r.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:(0,n.kg)("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"})}static{this.break=l.register({name:(0,n.kg)("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:r.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:(0,n.kg)("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"})}static{this.inlineSuggestion=l.register({name:(0,n.kg)("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:r.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"})}static{this.terminalQuickFix=l.register({name:(0,n.kg)("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:r.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:(0,n.kg)("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"})}static{this.onDebugBreak=l.register({name:(0,n.kg)("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:r.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:(0,n.kg)("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"})}static{this.noInlayHints=l.register({name:(0,n.kg)("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:r.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:(0,n.kg)("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"})}static{this.taskCompleted=l.register({name:(0,n.kg)("accessibilitySignals.taskCompleted","Task Completed"),sound:r.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:(0,n.kg)("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"})}static{this.taskFailed=l.register({name:(0,n.kg)("accessibilitySignals.taskFailed","Task Failed"),sound:r.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:(0,n.kg)("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"})}static{this.terminalCommandFailed=l.register({name:(0,n.kg)("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:r.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:(0,n.kg)("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"})}static{this.terminalCommandSucceeded=l.register({name:(0,n.kg)("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:r.success,announcementMessage:(0,n.kg)("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"})}static{this.terminalBell=l.register({name:(0,n.kg)("accessibilitySignals.terminalBell","Terminal Bell"),sound:r.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:(0,n.kg)("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"})}static{this.notebookCellCompleted=l.register({name:(0,n.kg)("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:r.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:(0,n.kg)("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"})}static{this.notebookCellFailed=l.register({name:(0,n.kg)("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:r.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:(0,n.kg)("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"})}static{this.diffLineInserted=l.register({name:(0,n.kg)("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:r.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"})}static{this.diffLineDeleted=l.register({name:(0,n.kg)("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:r.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"})}static{this.diffLineModified=l.register({name:(0,n.kg)("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:r.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"})}static{this.chatRequestSent=l.register({name:(0,n.kg)("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:r.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:(0,n.kg)("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"})}static{this.chatResponseReceived=l.register({name:(0,n.kg)("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[r.chatResponseReceived1,r.chatResponseReceived2,r.chatResponseReceived3,r.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"})}static{this.progress=l.register({name:(0,n.kg)("accessibilitySignals.progress","Progress"),sound:r.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:(0,n.kg)("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"})}static{this.clear=l.register({name:(0,n.kg)("accessibilitySignals.clear","Clear"),sound:r.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:(0,n.kg)("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"})}static{this.save=l.register({name:(0,n.kg)("accessibilitySignals.save","Save"),sound:r.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:(0,n.kg)("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"})}static{this.format=l.register({name:(0,n.kg)("accessibilitySignals.format","Format"),sound:r.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:(0,n.kg)("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"})}static{this.voiceRecordingStarted=l.register({name:(0,n.kg)("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:r.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"})}static{this.voiceRecordingStopped=l.register({name:(0,n.kg)("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:r.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"})}}},68254:(e,t,i)=>{"use strict";function n(e){return e&&"object"===typeof e&&"string"===typeof e.original&&"string"===typeof e.value}function o(e){return!!e&&void 0!==e.condition}i.d(t,{N:()=>o,f:()=>n})},85141:(e,t,i)=>{"use strict";i.d(t,{$u:()=>I,Ot:()=>R,oq:()=>N,rN:()=>F,rr:()=>A});var n=i(2150),o=i(68389),s=i(64236),r=i(53876),a=i(55664),l=i(59812),c=i(5091),d=i(25160),u=i(41337),h=i(6330),g=i(68254),p=i(18904),f=i(46403),m=i(87778),_=i(13046),v=i(95062),b=i(94216),y=i(15911),w=i(23740),C=i(1474),S=i(50322),k=i(66344),x=i(13153),E=i(17300),L=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},T=function(e,t){return function(i,n){t(i,n,e)}};function I(e,t,i,o){let s,r,a;if(Array.isArray(e))a=e,s=t,r=i;else{const n=t;a=e.getActions(n),s=i,r=o}const l=n.Di.getInstance(),c=l.keyStatus.altKey||(d.uF||d.j9)&&l.keyStatus.shiftKey;D(a,s,c,r?e=>e===r:e=>"navigation"===e)}function R(e,t,i,n,o,s){let r,a,l,c,d;if(Array.isArray(e))d=e,r=t,a=i,l=n,c=o;else{const u=t;d=e.getActions(u),r=i,a=n,l=o,c=s}const u="string"===typeof a?e=>e===a:a;D(d,r,!1,u,l,c)}function D(e,t,i,n=e=>"navigation"===e,o=()=>!1,s=!1){let r,l;Array.isArray(t)?(r=t,l=t):(r=t.primary,l=t.secondary);const c=new Set;for(const[d,u]of e){let e;n(d)?(e=r,e.length>0&&s&&e.push(new a.wv)):(e=l,e.length>0&&e.push(new a.wv));for(let t of u){i&&(t=t instanceof h.Xe&&t.alt?t.alt:t);const n=e.push(t);t instanceof a.YH&&c.add({group:d,action:t,index:n-1})}}for(const{group:a,action:d,index:u}of c){const e=n(a)?r:l,t=d.actions;o(d,a,e.length)&&e.splice(u,1,...t)}}let N=class extends s.Z4{constructor(e,t,i,o,s,r,a,l){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._options=t,this._keybindingService=i,this._notificationService=o,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new c.HE),this._altKey=n.Di.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{const e=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register((0,n.ko)(e,"mouseleave",(e=>{t=!1,i()}))),this._register((0,n.ko)(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?(0,u.kg)("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),o=i?(0,u.kg)("titleAndKb","{0} ({1})",e,i):e;n=(0,u.kg)("titleAndKbAndAlt","{0}\n[{1}] {2}",n,l.Of.modifierLabels[d.OS].altKey,o)}return n}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const o=this._commandAction.checked&&(0,g.N)(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(o)if(w.L.isThemeIcon(o)){const e=w.L.asClassNameArray(o);i.classList.add(...e),this._itemClassDispose.value=(0,c.s)((()=>{i.classList.remove(...e)}))}else i.style.backgroundImage=(0,C.HD)(this._themeService.getColorTheme().type)?(0,n.Tf)(o.dark):(0,n.Tf)(o.light),i.classList.add("icon"),this._itemClassDispose.value=(0,c.qE)((0,c.s)((()=>{i.style.backgroundImage="",i.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}};N=L([T(2,_.b),T(3,v.Ot),T(4,p.fN),T(5,y.Gy),T(6,f.Z),T(7,E.j)],N);class A extends N{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=A._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=(0,u.kg)({key:"content2",comment:['A label with keybindg like "ESC to dismiss"']},"{1} to {0}",this._action.label,t):this.label.textContent=(0,u.kg)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let O=class extends r.d{constructor(e,t,i,n,o){const s={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(w.L.isThemeIcon(e.item.icon)?w.L.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(e=>i.lookupKeybinding(e.id))};super(e,{getActions:()=>e.actions},n,s),this._keybindingService=i,this._contextMenuService=n,this._themeService=o}render(e){super.render(e),(0,S.j)(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!w.L.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=(0,C.HD)(this._themeService.getColorTheme().type)?(0,n.Tf)(i.dark):(0,n.Tf)(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};O=L([T(2,_.b),T(3,f.Z),T(4,y.Gy)],O);let P=class extends s.EH{constructor(e,t,i,n,o,s,l,c){let d;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=l,this._storageService=c,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const u=t?.persistLastActionId?c.get(this._storageKey,1):void 0;u&&(d=e.actions.find((e=>u===e.id))),d||(d=e.actions[0]),this._defaultAction=this._instaService.createInstance(N,d,{keybinding:this._getDefaultActionKeybindingLabel(d)});const g={keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??new a.LN};this._dropdown=new r.d(e,e.actions,this._contextMenuService,g),this._register(this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof h.Xe&&this.update(e.action)})))}update(e){this._options?.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(N,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends a.LN{async runAction(e,t){await e.run(void 0)}},this._container&&this._defaultAction.render((0,n.Hs)(this._container,(0,n.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(t=`(${i.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=(0,n.$)(".action-container");this._defaultAction.render((0,n.BC)(this._container,t)),this._register((0,n.ko)(t,n.Bx.KEY_DOWN,(e=>{const t=new o.Z(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=(0,n.$)(".dropdown-action-container");this._dropdown.render((0,n.BC)(this._container,i)),this._register((0,n.ko)(i,n.Bx.KEY_DOWN,(e=>{const t=new o.Z(e);t.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),t.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};P=L([T(2,_.b),T(3,v.Ot),T(4,f.Z),T(5,h.ez),T(6,m._Y),T(7,b.CS)],P);let M=class extends s.XF{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===a.wv.ID?"─────────":e.label,isDisabled:!e.enabled}))),0,t,x.RE,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=(0,k.GuP)(k.HcB)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function F(e,t,i){return t instanceof h.Xe?e.createInstance(N,t,i):t instanceof h.nI?t.item.isSelection?e.createInstance(M,t):t.item.rememberDefaultAction?e.createInstance(P,t,{...i,persistLastActionId:!0}):e.createInstance(O,t,i):void 0}M=L([T(1,f.l)],M)},64164:(e,t,i)=>{"use strict";i.d(t,{m:()=>D,p:()=>R});var n=i(2150),o=i(46274),s=i(48038),r=i(53876),a=i(55664),l=i(25923),c=i(23740),d=i(40231),u=i(5091),h=i(41337),g=i(96371);class p extends u.jG{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new d._B),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new u.Cm),i.hoverDelegate=i.hoverDelegate??this._register((0,g.bW)()),this.options=i,this.toggleMenuAction=this._register(new f((()=>this.toggleMenuActionViewItem?.show()),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new s.E(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(e,n)=>{if(e.id===f.ID)return this.toggleMenuActionViewItem=new r.d(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:c.L.asClassNameArray(i.moreIcon??l.W.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof a.YH){const i=new r.d(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){const t=this.options.getKeyBinding?.(e);return t?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class f extends a.rc{static{this.ID="toolbar.toggle.more"}constructor(e,t){t=t||h.kg("moreActions","More Actions..."),super(f.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}var m=i(85053),_=i(52782),v=i(14396),b=i(5837),y=i(85141),w=i(6330),C=i(17219),S=i(72786),k=i(18904),x=i(46403),E=i(13046),L=i(11086),T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};let R=class extends p{constructor(e,t,i,n,o,s,r,a){super(e,o,{getKeyBinding:e=>s.lookupKeybinding(e.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:"string"===typeof t?.telemetrySource}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=o,this._keybindingService=s,this._commandService=r,this._sessionDisposables=this._store.add(new u.Cm);const l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun((e=>a.publicLog2("workbenchActionExecuted",{id:e.action.id,from:l}))))}setActions(e,t=[],i){this._sessionDisposables.clear();const s=e.slice(),r=t.slice(),l=[];let c=0;const d=[];let u=!1;if(-1!==this._options?.hiddenItemStrategy)for(let n=0;ne?.id))),t=this._options.overflowBehavior.maxItems-e.size;let i=0;for(let n=0;n=t&&(s[n]=void 0,d[n]=o))}}(0,m.SK)(s),(0,m.SK)(d),super.setActions(s,a.wv.join(d,r)),(l.length>0||s.length>0)&&this._sessionDisposables.add((0,n.ko)(this.getElement(),"contextmenu",(e=>{const t=new o.P((0,n.zk)(this.getElement()),e),s=this.getItemAction(t.target);if(!s)return;t.preventDefault(),t.stopPropagation();const r=[];if(s instanceof w.Xe&&s.menuKeybinding)r.push(s.menuKeybinding);else if(!(s instanceof w.nI||s instanceof f)){const e=!!this._keybindingService.lookupKeybinding(s.id);r.push((0,C.D)(this._commandService,this._keybindingService,s.id,void 0,e))}if(l.length>0){let e=!1;if(1===c&&0===this._options?.hiddenItemStrategy){e=!0;for(let e=0;ethis._menuService.resetHiddenStates(i)}))),0!==d.length&&this._contextMenuService.showContextMenu({getAnchor:()=>t,getActions:()=>d,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:"string"===typeof this._options?.telemetrySource,contextKeyService:this._contextKeyService})})))}};R=T([I(2,w.ez),I(3,k.fN),I(4,x.Z),I(5,E.b),I(6,S.d),I(7,L.k)],R);let D=class extends R{constructor(e,t,i,n,o,s,r,a,l){super(e,{resetMenu:t,...i},n,o,s,r,a,l),this._onDidChangeMenuItems=this._store.add(new d.vl),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const c=this._store.add(n.createMenu(t,o,{emitEventsForSubmenuChanges:!0})),u=()=>{const t=[],n=[];(0,y.Ot)(c,i?.menuOptions,{primary:t,secondary:n},i?.toolbarOptions?.primaryGroup,i?.toolbarOptions?.shouldInlineSubmenu,i?.toolbarOptions?.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",0===t.length&&0===n.length),super.setActions(t,n)};this._store.add(c.onDidChange((()=>{u(),this._onDidChangeMenuItems.fire(this)}))),u()}setActions(){throw new v.D7("This toolbar is populated from a menu.")}};D=T([I(3,w.ez),I(4,k.fN),I(5,x.Z),I(6,E.b),I(7,S.d),I(8,L.k)],D)},6330:(e,t,i)=>{"use strict";i.d(t,{D8:()=>_,L:()=>S,Xe:()=>C,ZG:()=>y,ez:()=>v,i1:()=>m,is:()=>f,nI:()=>w,ug:()=>k});var n,o=i(55664),s=i(23740),r=i(40231),a=i(5091),l=i(67806),c=i(72786),d=i(18904),u=i(87778),h=i(78386),g=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}};function f(e){return void 0!==e.command}function m(e){return void 0!==e.submenu}class _{static{this._instances=new Map}static{this.CommandPalette=new _("CommandPalette")}static{this.DebugBreakpointsContext=new _("DebugBreakpointsContext")}static{this.DebugCallStackContext=new _("DebugCallStackContext")}static{this.DebugConsoleContext=new _("DebugConsoleContext")}static{this.DebugVariablesContext=new _("DebugVariablesContext")}static{this.NotebookVariablesContext=new _("NotebookVariablesContext")}static{this.DebugHoverContext=new _("DebugHoverContext")}static{this.DebugWatchContext=new _("DebugWatchContext")}static{this.DebugToolBar=new _("DebugToolBar")}static{this.DebugToolBarStop=new _("DebugToolBarStop")}static{this.DebugCallStackToolbar=new _("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new _("DebugCreateConfiguration")}static{this.EditorContext=new _("EditorContext")}static{this.SimpleEditorContext=new _("SimpleEditorContext")}static{this.EditorContent=new _("EditorContent")}static{this.EditorLineNumberContext=new _("EditorLineNumberContext")}static{this.EditorContextCopy=new _("EditorContextCopy")}static{this.EditorContextPeek=new _("EditorContextPeek")}static{this.EditorContextShare=new _("EditorContextShare")}static{this.EditorTitle=new _("EditorTitle")}static{this.EditorTitleRun=new _("EditorTitleRun")}static{this.EditorTitleContext=new _("EditorTitleContext")}static{this.EditorTitleContextShare=new _("EditorTitleContextShare")}static{this.EmptyEditorGroup=new _("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new _("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new _("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new _("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new _("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new _("EditorActionsPositionSubmenu")}static{this.ExplorerContext=new _("ExplorerContext")}static{this.ExplorerContextShare=new _("ExplorerContextShare")}static{this.ExtensionContext=new _("ExtensionContext")}static{this.GlobalActivity=new _("GlobalActivity")}static{this.CommandCenter=new _("CommandCenter")}static{this.CommandCenterCenter=new _("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new _("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new _("LayoutControlMenu")}static{this.MenubarMainMenu=new _("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new _("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new _("MenubarDebugMenu")}static{this.MenubarEditMenu=new _("MenubarEditMenu")}static{this.MenubarCopy=new _("MenubarCopy")}static{this.MenubarFileMenu=new _("MenubarFileMenu")}static{this.MenubarGoMenu=new _("MenubarGoMenu")}static{this.MenubarHelpMenu=new _("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new _("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new _("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new _("PanelAlignmentMenu")}static{this.PanelPositionMenu=new _("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new _("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new _("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new _("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new _("MenubarSelectionMenu")}static{this.MenubarShare=new _("MenubarShare")}static{this.MenubarSwitchEditorMenu=new _("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new _("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new _("MenubarTerminalMenu")}static{this.MenubarViewMenu=new _("MenubarViewMenu")}static{this.MenubarHomeMenu=new _("MenubarHomeMenu")}static{this.OpenEditorsContext=new _("OpenEditorsContext")}static{this.OpenEditorsContextShare=new _("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new _("ProblemsPanelContext")}static{this.SCMInputBox=new _("SCMInputBox")}static{this.SCMChangesSeparator=new _("SCMChangesSeparator")}static{this.SCMChangesContext=new _("SCMChangesContext")}static{this.SCMIncomingChanges=new _("SCMIncomingChanges")}static{this.SCMIncomingChangesContext=new _("SCMIncomingChangesContext")}static{this.SCMIncomingChangesSetting=new _("SCMIncomingChangesSetting")}static{this.SCMOutgoingChanges=new _("SCMOutgoingChanges")}static{this.SCMOutgoingChangesContext=new _("SCMOutgoingChangesContext")}static{this.SCMOutgoingChangesSetting=new _("SCMOutgoingChangesSetting")}static{this.SCMIncomingChangesAllChangesContext=new _("SCMIncomingChangesAllChangesContext")}static{this.SCMIncomingChangesHistoryItemContext=new _("SCMIncomingChangesHistoryItemContext")}static{this.SCMOutgoingChangesAllChangesContext=new _("SCMOutgoingChangesAllChangesContext")}static{this.SCMOutgoingChangesHistoryItemContext=new _("SCMOutgoingChangesHistoryItemContext")}static{this.SCMChangeContext=new _("SCMChangeContext")}static{this.SCMResourceContext=new _("SCMResourceContext")}static{this.SCMResourceContextShare=new _("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new _("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new _("SCMResourceGroupContext")}static{this.SCMSourceControl=new _("SCMSourceControl")}static{this.SCMSourceControlInline=new _("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new _("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new _("SCMHistoryTitle")}static{this.SCMTitle=new _("SCMTitle")}static{this.SearchContext=new _("SearchContext")}static{this.SearchActionMenu=new _("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new _("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new _("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new _("StickyScrollContext")}static{this.TestItem=new _("TestItem")}static{this.TestItemGutter=new _("TestItemGutter")}static{this.TestProfilesContext=new _("TestProfilesContext")}static{this.TestMessageContext=new _("TestMessageContext")}static{this.TestMessageContent=new _("TestMessageContent")}static{this.TestPeekElement=new _("TestPeekElement")}static{this.TestPeekTitle=new _("TestPeekTitle")}static{this.TestCallStack=new _("TestCallStack")}static{this.TouchBarContext=new _("TouchBarContext")}static{this.TitleBarContext=new _("TitleBarContext")}static{this.TitleBarTitleContext=new _("TitleBarTitleContext")}static{this.TunnelContext=new _("TunnelContext")}static{this.TunnelPrivacy=new _("TunnelPrivacy")}static{this.TunnelProtocol=new _("TunnelProtocol")}static{this.TunnelPortInline=new _("TunnelInline")}static{this.TunnelTitle=new _("TunnelTitle")}static{this.TunnelLocalAddressInline=new _("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new _("TunnelOriginInline")}static{this.ViewItemContext=new _("ViewItemContext")}static{this.ViewContainerTitle=new _("ViewContainerTitle")}static{this.ViewContainerTitleContext=new _("ViewContainerTitleContext")}static{this.ViewTitle=new _("ViewTitle")}static{this.ViewTitleContext=new _("ViewTitleContext")}static{this.CommentEditorActions=new _("CommentEditorActions")}static{this.CommentThreadTitle=new _("CommentThreadTitle")}static{this.CommentThreadActions=new _("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new _("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new _("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new _("CommentThreadCommentContext")}static{this.CommentTitle=new _("CommentTitle")}static{this.CommentActions=new _("CommentActions")}static{this.CommentsViewThreadActions=new _("CommentsViewThreadActions")}static{this.InteractiveToolbar=new _("InteractiveToolbar")}static{this.InteractiveCellTitle=new _("InteractiveCellTitle")}static{this.InteractiveCellDelete=new _("InteractiveCellDelete")}static{this.InteractiveCellExecute=new _("InteractiveCellExecute")}static{this.InteractiveInputExecute=new _("InteractiveInputExecute")}static{this.InteractiveInputConfig=new _("InteractiveInputConfig")}static{this.ReplInputExecute=new _("ReplInputExecute")}static{this.IssueReporter=new _("IssueReporter")}static{this.NotebookToolbar=new _("NotebookToolbar")}static{this.NotebookStickyScrollContext=new _("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new _("NotebookCellTitle")}static{this.NotebookCellDelete=new _("NotebookCellDelete")}static{this.NotebookCellInsert=new _("NotebookCellInsert")}static{this.NotebookCellBetween=new _("NotebookCellBetween")}static{this.NotebookCellListTop=new _("NotebookCellTop")}static{this.NotebookCellExecute=new _("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new _("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new _("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new _("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new _("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new _("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new _("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new _("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new _("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new _("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new _("NotebookKernelSource")}static{this.BulkEditTitle=new _("BulkEditTitle")}static{this.BulkEditContext=new _("BulkEditContext")}static{this.TimelineItemContext=new _("TimelineItemContext")}static{this.TimelineTitle=new _("TimelineTitle")}static{this.TimelineTitleContext=new _("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new _("TimelineFilterSubMenu")}static{this.AccountsContext=new _("AccountsContext")}static{this.SidebarTitle=new _("SidebarTitle")}static{this.PanelTitle=new _("PanelTitle")}static{this.AuxiliaryBarTitle=new _("AuxiliaryBarTitle")}static{this.AuxiliaryBarHeader=new _("AuxiliaryBarHeader")}static{this.TerminalInstanceContext=new _("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new _("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new _("TerminalNewDropdownContext")}static{this.TerminalTabContext=new _("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new _("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new _("TerminalStickyScrollContext")}static{this.WebviewContext=new _("WebviewContext")}static{this.InlineCompletionsActions=new _("InlineCompletionsActions")}static{this.InlineEditsActions=new _("InlineEditsActions")}static{this.InlineEditActions=new _("InlineEditActions")}static{this.NewFile=new _("NewFile")}static{this.MergeInput1Toolbar=new _("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new _("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new _("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new _("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new _("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new _("InlineEditToolbar")}static{this.ChatContext=new _("ChatContext")}static{this.ChatCodeBlock=new _("ChatCodeblock")}static{this.ChatCompareBlock=new _("ChatCompareBlock")}static{this.ChatMessageTitle=new _("ChatMessageTitle")}static{this.ChatExecute=new _("ChatExecute")}static{this.ChatExecuteSecondary=new _("ChatExecuteSecondary")}static{this.ChatInputSide=new _("ChatInputSide")}static{this.AccessibleView=new _("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new _("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new _("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new _("DiffEditorSelectionToolbar")}constructor(e){if(_._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);_._instances.set(e,this),this.id=e}}const v=(0,u.u1)("menuService");class b{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new b(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof b&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}const y=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new r.QT({merge:b.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(b.for(_.CommandPalette)),(0,a.s)((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(b.for(_.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new l.w,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(b.for(e)),(0,a.s)((()=>{n(),this._onDidChangeMenu.fire(b.for(e))}))}appendMenuItems(e){const t=new a.Cm;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===_.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)f(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class w extends o.YH{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"===typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let C=n=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?"string"===typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"===typeof e.title?e.title:e.title.value}constructor(e,t,i,o,r,a,l){let c;if(this.hideActions=o,this.menuKeybinding=r,this._commandService=l,this.id=e.id,this.label=n.label(e,i),this.tooltip=("string"===typeof e.tooltip?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||a.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=a.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"===typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&s.L.isThemeIcon(t.icon)&&(c=t.icon),this.checked&&t.title&&(this.label="string"===typeof t.title?t.title:t.title.value)}c||(c=s.L.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,o,void 0,a,l):void 0,this._options=i,this.class=c&&s.L.asClassName(c)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};C=n=g([p(5,d.fN),p(6,c.d)],C);class S{constructor(e){this.desc=e}}function k(e){const t=[],i=new e,{f1:n,menu:o,keybinding:s,...r}=i.desc;if(c.w.getCommand(r.id))throw new Error(`Cannot register two commands with the same id: ${r.id}`);if(t.push(c.w.registerCommand({id:r.id,handler:(e,...t)=>i.run(e,...t),metadata:r.metadata})),Array.isArray(o))for(const a of o)t.push(y.appendMenuItem(a.id,{command:{...r,precondition:null===a.precondition?void 0:r.precondition},...a}));else o&&t.push(y.appendMenuItem(o.id,{command:{...r,precondition:null===o.precondition?void 0:r.precondition},...o}));if(n&&(t.push(y.appendMenuItem(_.CommandPalette,{command:r,when:r.precondition})),t.push(y.addCommand(r))),Array.isArray(s))for(const a of s)t.push(h.f.registerKeybindingRule({...a,id:r.id,when:r.precondition?d.M$.and(r.precondition,a.when):a.when}));else s&&t.push(h.f.registerKeybindingRule({...s,id:r.id,when:r.precondition?d.M$.and(r.precondition,s.when):s.when}));return{dispose(){(0,a.AS)(t)}}}},17219:(e,t,i)=>{"use strict";i.d(t,{$:()=>v,D:()=>k});var n,o,s=i(9659),r=i(40231),a=i(5091),l=i(6330),c=i(72786),d=i(18904),u=i(55664),h=i(94216),g=i(85053),p=i(41337),f=i(13046),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new b(i)}createMenu(e,t,i){return new C(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){const n=new C(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),o=n.getActions(i);return n.dispose(),o}resetHiddenStates(e){this._hiddenStates.reset(e)}};v=m([_(0,c.d),_(1,f.b),_(2,h.CS)],v);let b=class{static{n=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new a.Cm,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(t){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,n._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){const i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){const n=this._isHiddenByDefault(e,t);n&&(i=!i);const o=this._data[e.id];if(i)if(o){const e=o.indexOf(t);e<0&&o.push(t)}else this._data[e.id]=[t];else if(o){const i=o.indexOf(t);i>=0&&(0,g.UH)(o,i),0===o.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(n._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};b=n=m([_(0,h.CS)],b);class y{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=this._sort(l.ZG.getMenuItems(this._id));let t;for(const i of e){const e=i.group||"";t&&t[0]===e||(t=[e,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeysAndSubmenuIds(i)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(y._fillInKbExprKeys(e.when,this._structureContextKeys),(0,l.is)(e)){if(e.command.precondition&&y._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;y._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(l.ZG.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}}let w=o=class extends y{constructor(e,t,i,n,o,s){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=o,this._contextKeyService=s,this.refresh()}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,s]=i;let r;for(const t of s)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,l.is)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);const n=S(this._id,i?t.command:t,this._hiddenStates);if(i){const i=k(this._commandService,this._keybindingService,t.command.id,t.when);(r??=[]).push(new l.Xe(t.command,t.alt,e,n,i,this._contextKeyService,this._commandService))}else{const i=new o(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),s=u.wv.join(...i.map((e=>e[1])));s.length>0&&(r??=[]).push(new l.nI(t,n,s))}}r&&r.length>0&&t.push([n,r])}return t}_sort(e){return e.sort(o._compareMenuItems)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const s=e.order||0,r=t.order||0;return sr?1:o._compareTitles((0,l.is)(e)?e.command.title:e.title,(0,l.is)(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"===typeof e?e:e.original,n="string"===typeof t?t:t.original;return i.localeCompare(n)}};w=o=m([_(3,c.d),_(4,f.b),_(5,d.fN)],w);let C=class{constructor(e,t,i,n,o,c){this._disposables=new a.Cm,this._menuInfo=new w(e,t,i.emitEventsForSubmenuChanges,n,o,c);const d=new s.uC((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(d),this._disposables.add(l.ZG.onDidChangeMenu((e=>{for(const t of this._menuInfo.allMenuIds)if(e.has(t)){d.schedule();break}})));const u=this._disposables.add(new a.Cm),h=e=>{let t=!1,i=!1,n=!1;for(const o of e)if(t=t||o.isStructuralChange,i=i||o.isEnablementChange,n=n||o.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}},g=()=>{u.add(c.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),u.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))};this._onDidChange=new r.uI({onWillAddFirstListener:g,onDidRemoveLastListener:u.clear.bind(u),delay:i.eventDebounceDelay,merge:h}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function S(e,t,i){const n=(0,l.i1)(t)?t.submenu.id:t.id,o="string"===typeof t.title?t.title:t.title.value,s=(0,u.ih)({id:`hide/${e.id}/${n}`,label:(0,p.kg)("hide.label","Hide '{0}'",o),run(){i.updateHidden(e,n,!0)}}),r=(0,u.ih)({id:`toggle/${e.id}/${n}`,label:o,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}function k(e,t,i,n=void 0,o=!0){return(0,u.ih)({id:`configureKeybinding/${i}`,label:(0,p.kg)("configure keybinding","Configure Keybinding"),enabled:o,run(){const o=!!t.lookupKeybinding(i),s=!o&&n?n.serialize():void 0;e.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(s?` +when:${s}`:""))}})}C=m([_(3,c.d),_(4,f.b),_(5,d.fN)],C)},28753:(e,t,i)=>{"use strict";i.d(t,{h:()=>o});var n=i(87778);const o=(0,n.u1)("clipboardService")},72786:(e,t,i)=>{"use strict";i.d(t,{d:()=>c,w:()=>d});var n=i(40231),o=i(5837),s=i(5091),r=i(67806),a=i(50322),l=i(87778);const c=(0,l.u1)("commandService"),d=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.vl,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"===typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.metadata&&Array.isArray(e.metadata.args)){const t=[];for(const n of e.metadata.args)t.push(n.constraint);const i=e.handler;e.handler=function(e,...n){return(0,a.jx)(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new r.w,this._commands.set(i,n));const o=n.unshift(e),l=(0,s.s)((()=>{o();const e=this._commands.get(i);e?.isEmpty()&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return d.registerCommand(e,((e,...i)=>e.get(c).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return o.f.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};d.registerCommand("noop",(()=>{}))},32828:(e,t,i)=>{"use strict";i.d(t,{Mo:()=>d,ad:()=>s,gD:()=>c,iB:()=>a,kW:()=>r,pG:()=>o});var n=i(87778);const o=(0,n.u1)("configurationService");function s(e,t){const i=Object.create(null);for(const n in e)r(i,n,e[n],t);return i}function r(e,t,i,n){const o=t.split("."),s=o.pop();let r=e;for(let l=0;l{"use strict";i.d(t,{Fd:()=>d,Gv:()=>k,rC:()=>S});var n=i(85053),o=i(40231),s=i(50322),r=i(41337),a=i(32828),l=i(86223),c=i(16374);const d={Configuration:"base.contributions.configuration"},u={properties:{},patternProperties:{}},h={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},_="vscode://schemas/settings/resourceLanguage",v=c.O.as(l.F.JSONContribution);class b{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new o.vl,this._onDidUpdateConfiguration=new o.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:r.kg("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},v.registerSchema(_,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),v.registerSchema(_,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const i=[];for(const{overrides:n,source:o}of e)for(const e in n){t.add(e);const s=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),r=n[e];if(s.configurationDefaultOverrides.push({value:r,source:o}),S.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,r,o,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,o),i.push(...k(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,r,o,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t;const i=this.configurationProperties[e];i&&(this.updatePropertyDefaultValue(e,i),this.updateSchema(e,i))}}this.doRegisterOverrideIdentifiers(i)}updateDefaultOverrideProperty(e,t,i){const n={type:"object",default:t.value,description:r.kg("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,a.Mo)(e)),$ref:_,defaultDefaultValue:t.value,source:i,defaultValueSource:i};this.configurationProperties[e]=n,this.defaultLanguageConfigurationOverridesNode.properties[e]=n}mergeDefaultConfigurationsForOverrideIdentifier(e,t,i,n){const o=n?.value||{},r=n?.source??new Map;if(r instanceof Map){for(const e of Object.keys(t)){const n=t[e],a=s.Gv(n)&&(s.b0(o[e])||s.Gv(o[e]));if(a){if(o[e]={...o[e]??{},...n},i)for(const t in n)r.set(`${e}.${t}`,i)}else o[e]=n,i?r.set(e,i):r.delete(e)}return{value:o,source:r}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,i,n){const o=this.configurationProperties[e],r=n?.value??o?.defaultDefaultValue;let a=i;const l=s.Gv(t)&&(void 0!==o&&"object"===o.type||void 0===o&&(s.b0(r)||s.Gv(r)));if(l){if(a=n?.source??new Map,!(a instanceof Map))return void console.error("defaultValueSource is not a Map");for(const n in t)i&&a.set(`${e}.${n}`,i);t={...s.Gv(r)?r:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,o=3,r){o=s.z(e.scope)?o:e.scope;const a=e.properties;if(a)for(const c in a){const e=a[c];t&&L(c,e)?delete a[c]:(e.source=i,e.defaultDefaultValue=a[c].default,this.updatePropertyDefaultValue(c,e),S.test(c)?e.scope=void 0:(e.scope=s.z(e.scope)?o:e.scope,e.restricted=s.z(e.restricted)?!!n?.includes(c):e.restricted),!a[c].hasOwnProperty("included")||a[c].included?(this.configurationProperties[c]=a[c],a[c].policy?.name&&this.policyConfigurations.set(a[c].policy.name,c),!a[c].deprecationMessage&&a[c].markdownDeprecationMessage&&(a[c].deprecationMessage=a[c].markdownDeprecationMessage),r.add(c)):(this.excludedConfigurationProperties[c]=a[c],delete a[c]))}const l=e.allOf;if(l)for(const s of l)this.validateAndRegisterProperties(s,t,i,n,o,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const t in i)this.updateSchema(t,i[t]);const n=e.allOf;n?.forEach(t)};t(e)}updateSchema(e,t){switch(u.properties[e]=t,t.scope){case 1:h.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:f.properties[e]=t;break;case 4:m.properties[e]=t;break;case 5:m.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:r.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,i),u.properties[t]=i,h.properties[t]=i,g.properties[t]=i,p.properties[t]=i,f.properties[t]=i,m.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:r.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};u.patternProperties[C]=e,h.patternProperties[C]=e,g.patternProperties[C]=e,p.patternProperties[C]=e,f.patternProperties[C]=e,m.patternProperties[C]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let n,o;!i||t.disallowConfigurationDefault&&i.source||(n=i.value,o=i.source),s.b0(n)&&(n=t.defaultDefaultValue,o=void 0),s.b0(n)&&(n=x(t.type)),t.default=n,t.defaultValueSource=o}}const y="\\[([^\\]]+)\\]",w=new RegExp(y,"g"),C=`^(${y})+$`,S=new RegExp(C);function k(e){const t=[];if(S.test(e)){let i=w.exec(e);while(i?.length){const n=i[1].trim();n&&t.push(n),i=w.exec(e)}}return(0,n.dM)(t)}function x(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const E=new b;function L(e,t){return e.trim()?S.test(e)?r.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==E.getConfigurationProperties()[e]?r.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==E.getPolicyConfigurations().get(t.policy?.name)?r.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,E.getPolicyConfigurations().get(t.policy?.name)):null:r.kg("config.property.empty","Cannot register an empty property")}c.O.add(d.Configuration,E)},18904:(e,t,i)=>{"use strict";i.d(t,{f1:()=>R,M$:()=>k,fN:()=>q,N1:()=>$,jQ:()=>x,M0:()=>Q});var n=i(25160),o=i(20601),s=i(14396),r=i(41337);function a(...e){switch(e.length){case 1:return(0,r.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,r.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,r.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const l=(0,r.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),c=(0,r.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class d{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw(0,s.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){while(!this._isAtEnd()){this._start=this._current;const e=this._advance();switch(e){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(a("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(a("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(a("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&(this._input.charCodeAt(this._current)===e&&(this._current++,!0))}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=d._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){while(39!==this._peek()&&!this._isAtEnd())this._advance();this._isAtEnd()?this._error(l):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;while(1){if(e>=this._input.length)return this._current=e,void this._error(c);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}while(e=this._input.length}}var u=i(87778);const h=new Map;h.set("false",!1),h.set("true",!0),h.set("isMac",n.zx),h.set("isLinux",n.j9),h.set("isWindows",n.uF),h.set("isWeb",n.HZ),h.set("isMacNative",n.zx&&!n.HZ),h.set("isEdge",n.UP),h.set("isFirefox",n.gm),h.set("isChrome",n.H8),h.set("isSafari",n.nr);const g=Object.prototype.hasOwnProperty,p={regexParsingWithErrorRecovery:!0},f=(0,r.kg)("contextkey.parser.error.emptyString","Empty context key expression"),m=(0,r.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),_=(0,r.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),v=(0,r.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),b=(0,r.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),y=(0,r.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),w=(0,r.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),C=(0,r.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class S{static{this._parseError=new Error}constructor(e=p){this._config=e,this._scanner=new d,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?y:void 0;throw this._parsingErrors.push({message:b,offset:e.offset,lexeme:d.getLexeme(e),additionalInfo:t}),S._parseError}return e}catch(t){if(t!==S._parseError)throw t;return}}else this._parsingErrors.push({message:f,offset:0,lexeme:"",additionalInfo:m})}_expr(){return this._or()}_or(){const e=[this._and()];while(this._matchOne(16)){const t=this._and();e.push(t)}return 1===e.length?e[0]:k.or(...e)}_and(){const e=[this._term()];while(this._matchOne(15)){const t=this._term();e.push(t)}return 1===e.length?e[0]:k.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),L.INSTANCE;case 12:return this._advance(),T.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,v),e?.negate()}case 17:return this._advance(),O.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),k.true();case 12:return this._advance(),k.false();case 0:{this._advance();const e=this._expr();return this._consume(1,v),e}case 17:{const n=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,o=i.lastIndexOf("/"),s=o===i.length-1?void 0:this._removeFlagsGY(i.substring(o+1));let r;try{r=new RegExp(i.substring(1,o),s)}catch(t){throw this._errExpectedButGot("REGEX",e)}return H.create(n,r)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let o=this._peek(),s=0;for(let t=0;t=0){const r=t.slice(n+1,o),a="i"===t[o+1]?"i":"";try{s=new RegExp(r,a)}catch(i){throw this._errExpectedButGot("REGEX",e)}}}if(null===s)throw this._errExpectedButGot("REGEX",e);return H.create(n,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,_);const e=this._value();return k.notIn(n,e)}const s=this._peek().type;switch(s){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return k.equals(n,e);switch(e){case"true":return k.has(n);case"false":return k.not(n);default:return k.equals(n,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return k.notEquals(n,e);switch(e){case"true":return k.not(n);case"false":return k.has(n);default:return k.notEquals(n,e)}}case 5:return this._advance(),B.create(n,this._value());case 6:return this._advance(),W.create(n,this._value());case 7:return this._advance(),M.create(n,this._value());case 8:return this._advance(),F.create(n,this._value());case 13:return this._advance(),k.in(n,this._value());default:return k.has(n)}}case 20:throw this._parsingErrors.push({message:w,offset:e.offset,lexeme:"",additionalInfo:C}),S._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=(0,r.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,d.getLexeme(t)),o=t.offset,s=d.getLexeme(t);return this._parsingErrors.push({message:n,offset:o,lexeme:s,additionalInfo:i}),S._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class k{static false(){return L.INSTANCE}static true(){return T.INSTANCE}static has(e){return I.create(e)}static equals(e,t){return R.create(e,t)}static notEquals(e,t){return A.create(e,t)}static regex(e,t){return H.create(e,t)}static in(e,t){return D.create(e,t)}static notIn(e,t){return N.create(e,t)}static not(e){return O.create(e)}static and(...e){return z.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static{this._parser=new S({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(void 0===e||null===e)return;const t=this._parser.parse(e);return t}}function x(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}function E(e,t){return e.cmp(t)}class L{static{this.INSTANCE=new L}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return T.INSTANCE}}class T{static{this.INSTANCE=new T}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return L.INSTANCE}}class I{static create(e,t=null){const i=h.get(e);return"boolean"===typeof i?i?T.INSTANCE:L.INSTANCE:new I(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=h.get(this.key);return"boolean"===typeof e?e?T.INSTANCE:L.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this)),this.negated}}class R{static create(e,t,i=null){if("boolean"===typeof t)return t?I.create(e,i):O.create(e,i);const n=h.get(e);if("boolean"===typeof n){const e=n?"true":"false";return t===e?T.INSTANCE:L.INSTANCE}return new R(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=h.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?T.INSTANCE:L.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class D{static create(e,t){return new D(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"===typeof i&&"object"===typeof t&&null!==t&&g.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=N.create(this.key,this.valueKey)),this.negated}}class N{static create(e,t){return new N(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=D.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class A{static create(e,t,i=null){if("boolean"===typeof t)return t?O.create(e,i):I.create(e,i);const n=h.get(e);if("boolean"===typeof n){const e=n?"true":"false";return t===e?L.INSTANCE:T.INSTANCE}return new A(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=h.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?L.INSTANCE:T.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class O{static create(e,t=null){const i=h.get(e);return"boolean"===typeof i?i?L.INSTANCE:T.INSTANCE:new O(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=h.get(this.key);return"boolean"===typeof e?e?L.INSTANCE:T.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this)),this.negated}}function P(e,t){if("string"===typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"===typeof e||"number"===typeof e?t(e):L.INSTANCE}class M{static create(e,t,i=null){return P(t,(t=>new M(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,i=null){return P(t,(t=>new F(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class B{static create(e,t,i=null){return P(t,(t=>new B(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))new W(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class H{static create(e,t){return new H(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this)),this.negated}}class V{static create(e){return new V(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function j(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),o=0===n.length,s=U.create(e.expr.map((e=>z.create([e,t],null,i))),null,o);s&&(n.push(s),n.sort(E))}if(1===n.length)return n[0];if(i){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,i){return U._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());while(e.length>1){const t=e.shift(),i=e.shift(),n=[];for(const e of Z(t))for(const t of Z(i))n.push(z.create([e,t],null,!1));e.unshift(U.create(n,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class $ extends I{static{this._info=[]}static all(){return $._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"===typeof i?$._info.push({...i,key:e}):!0!==i&&$._info.push({key:e,description:i,type:null!==t&&void 0!==t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return R.create(this.key,e)}}const q=(0,u.u1)("contextKeyService");function K(e,t){return et?1:0}function G(e,t,i,n){return ei?1:tn?1:0}function Q(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&Y(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(Q(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return Y(t.expr,e.expr);for(const i of e.expr)if(Q(i,t))return!0;return!1}return e.equals(t)}function Y(e,t){let i=0,n=0;while(i{"use strict";i.d(t,{J7:()=>c,W0:()=>a,aV:()=>l,nd:()=>r});var n=i(25160),o=i(41337),s=i(18904);new s.N1("isMac",n.zx,(0,o.kg)("isMac","Whether the operating system is macOS")),new s.N1("isLinux",n.j9,(0,o.kg)("isLinux","Whether the operating system is Linux"));const r=new s.N1("isWindows",n.uF,(0,o.kg)("isWindows","Whether the operating system is Windows")),a=new s.N1("isWeb",n.HZ,(0,o.kg)("isWeb","Whether the platform is a web browser")),l=(new s.N1("isMacNative",n.zx&&!n.HZ,(0,o.kg)("isMacNative","Whether the operating system is macOS on a non-browser platform")),new s.N1("isIOS",n.un,(0,o.kg)("isIOS","Whether the operating system is iOS")),new s.N1("isMobile",n.Fr,(0,o.kg)("isMobile","Whether the platform is a mobile web browser")),new s.N1("isDevelopment",!1,!0),new s.N1("productQualityType","",(0,o.kg)("productQualityType","Quality type of VS Code")),"inputFocus"),c=new s.N1(l,!1,(0,o.kg)("inputFocus","Whether keyboard focus is inside an input box"))},46403:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s,l:()=>o});var n=i(87778);const o=(0,n.u1)("contextViewService"),s=(0,n.u1)("contextMenuService")},63466:(e,t,i)=>{"use strict";i.d(t,{X:()=>o});var n=i(87778);const o=(0,n.u1)("dialogService")},47747:(e,t,i)=>{"use strict";i.d(t,{PD:()=>a,sV:()=>o});var n=i(16374);const o={EDITORS:"CodeEditors",FILES:"CodeFiles"};class s{}const r={DragAndDropContribution:"workbench.contributions.dragAndDrop"};n.O.add(r.DragAndDropContribution,new s);class a{static{this.INSTANCE=new a}constructor(){}static getInstance(){return a.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}},31554:(e,t,i)=>{"use strict";i.d(t,{k:()=>o});var n=i(87778);const o=(0,n.u1)("environmentService")},12082:(e,t,i)=>{"use strict";var n;i.d(t,{p:()=>n}),function(e){e[e["FILE"]=0]="FILE",e[e["FOLDER"]=1]="FOLDER",e[e["ROOT_FOLDER"]=2]="ROOT_FOLDER"}(n||(n={}))},73075:(e,t,i)=>{"use strict";i.d(t,{pG:()=>T,_Q:()=>I,dg:()=>w});var n=i(95994),o=i(2150),s=i(83092),r=i(76358),a=i(52469),l=i(25923),c=i(40231),d=i(41337),u=i(96371);const h=d.kg("defaultLabel","input"),g=d.kg("label.preserveCaseToggle","Preserve Case");class p extends s.l{constructor(e){super({icon:l.W.preserveCase,title:g+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,u.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class f extends a.x{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new c.vl),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new c.vl),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new c.vl),this._onInput=this._register(new c.vl),this._onKeyUp=this._register(new c.vl),this._onPreserveCaseKeyDown=this._register(new c.vl),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||h;const s=n.appendPreserveCaseLabel||"",a=n.history||[],l=!!n.flexibleHeight,d=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new r.mJ(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:d,flexibleMaxHeight:u,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new p({appendTitle:s,isChecked:!1,...n.toggleStyles})),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const g=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=g.indexOf(this.domNode.ownerDocument.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%g.length:e.equals(15)&&(i=0===t?g.length-1:t-1),e.equals(9)?(g[t].blur(),this.inputBox.focus()):i>=0&&g[i].focus(),o.fs.stop(e,!0)}}}));const f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.preserveCase.domNode),this.domNode.appendChild(f),e?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox?.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var m=i(18904),_=i(78386),v=i(5091),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};const w=new m.N1("suggestWidgetVisible",!1,(0,d.kg)("suggestWidgetVisible","Whether suggestion are visible")),C="historyNavigationWidgetFocus",S="historyNavigationForwardsEnabled",k="historyNavigationBackwardsEnabled";let x;const E=[];function L(e,t){if(E.includes(t))throw new Error("Cannot register the same widget multiple times");E.push(t);const i=new v.Cm,n=new m.N1(C,!1).bindTo(e),s=new m.N1(S,!0).bindTo(e),r=new m.N1(k,!0).bindTo(e),a=()=>{n.set(!0),x=t},l=()=>{n.set(!1),x===t&&(x=void 0)};return(0,o.X7)(t.element)&&a(),i.add(t.onDidFocus((()=>a()))),i.add(t.onDidBlur((()=>l()))),i.add((0,v.s)((()=>{E.splice(E.indexOf(t),1),l()}))),{historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:r,dispose(){i.dispose()}}}let T=class extends n.c{constructor(e,t,i,n){super(e,t,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(L(o,this.inputBox))}};T=b([y(3,m.fN)],T);let I=class extends f{constructor(e,t,i,n,o=!1){super(e,t,o,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(L(s,this.inputBox))}};I=b([y(3,m.fN)],I),_.f.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:m.M$.and(m.M$.has(C),m.M$.equals(k,!0),m.M$.not("isComposing"),w.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{x?.showPreviousValue()}}),_.f.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:m.M$.and(m.M$.has(C),m.M$.equals(S,!0),m.M$.not("isComposing"),w.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{x?.showNextValue()}})},41187:(e,t,i)=>{"use strict";i.d(t,{TN:()=>c,fO:()=>d});var n=i(87778),o=i(5091),s=i(32828),r=i(2150),a=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},l=function(e,t){return function(i,n){t(i,n,e)}};const c=(0,n.u1)("hoverService");let d=class extends o.jG{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,t,i={},n,s){super(),this.placement=e,this.instantHover=t,this.overrideOptions=i,this.configurationService=n,this.hoverService=s,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new o.Cm),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))})))}showHover(e,t){const i="function"===typeof this.overrideOptions?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();const n=(0,r.sb)(e.target)?[e.target]:e.target.targetElements;for(const s of n)this.hoverDisposables.add((0,r.b2)(s,"keydown",(e=>{e.equals(9)&&this.hoverService.hideHover()})));const o=(0,r.sb)(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...i,persistence:{hideOnKeyDown:!0,...i.persistence},id:o,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...i.appearance}},t)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime{"use strict";i.d(t,{d:()=>n});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},59857:(e,t,i)=>{"use strict";i.d(t,{N:()=>r,v:()=>s});var n=i(4629);const o=[];function s(e,t,i){t instanceof n.d||(t=new n.d(t,[],Boolean(i))),o.push([e,t])}function r(){return o}},87778:(e,t,i)=>{"use strict";var n;i.d(t,{_$:()=>n,_Y:()=>o,u1:()=>r}),function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t}(n||(n={}));const o=r("instantiationService");function s(e,t,i){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i}],t[n.DI_TARGET]=t)}function r(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(t,e,n)};return t.toString=()=>e,n.serviceIds.set(e,t),t}},48836:(e,t,i)=>{"use strict";i.d(t,{a:()=>n});class n{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}},86223:(e,t,i)=>{"use strict";i.d(t,{F:()=>s});var n=i(40231),o=i(16374);const s={JSONContribution:"base.contributions.json"};function r(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class a{constructor(){this._onDidChangeSchema=new n.vl,this.schemasById={}}registerSchema(e,t){this.schemasById[r(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const l=new a;o.O.add(s.JSONContribution,l)},13046:(e,t,i)=>{"use strict";i.d(t,{b:()=>o});var n=i(87778);const o=(0,n.u1)("keybindingService")},78386:(e,t,i)=>{"use strict";i.d(t,{f:()=>d});var n=i(48770),o=i(25160),s=i(72786),r=i(16374),a=i(5091),l=i(67806);class c{constructor(){this._coreKeybindings=new l.w,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=c.bindToCurrentPlatform(e),i=new a.Cm;if(t&&t.primary){const s=(0,n.Zv)(t.primary,o.OS);s&&i.add(this._registerDefaultKeybinding(s,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let s=0,r=t.secondary.length;s{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(h)),this._cachedMergedKeybindings.slice(0)}}const d=new c,u={EditorModes:"platform.keybindingsRegistry"};function h(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}r.O.add(u.EditorModes,d)},48056:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(87778);const o=(0,n.u1)("labelService")},72033:(e,t,i)=>{"use strict";i.d(t,{PE:()=>Le,aG:()=>Te,er:()=>kt,YD:()=>Ae,zL:()=>wt,Nf:()=>We,cH:()=>Ve});var n=i(2150),o=i(85053),s=i(67792),r=i(40231),a=i(5091),l=i(31304);class c{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{data:t,disposable:a.jG.None}}renderElement(e,t,i,n){if(i.disposable?.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const r=new s.Qi,a=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class d{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function u(e,t){return{...t,accessibilityProvider:t.accessibilityProvider&&new d(e,t.accessibilityProvider)}}class h{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new c(e,s)));this.list=new l.B8(e,t,i,r,u(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return r.Jh.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return r.Jh.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return r.Jh.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,o.y1)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var g=i(50799),p=i(96371),f=i(90154);class m{static{this.TemplateId="row"}constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=m.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const o of e){const e=n.get(o.templateId);if(!e)throw new Error(`Table cell renderer for template id ${o.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.BC)(e,(0,n.$)(".monaco-table-tr")),i=[],o=[];for(let r=0;rthis.disposables.add(new v(e,t)))),u={size:d.reduce(((e,t)=>e+t.column.weight),0),views:d.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new f.U(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:u})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const h=new m(o,s,(e=>this.splitview.getViewSize(e)));this.list=this.disposables.add(new l.B8(e,this.domNode,_(i),[h],c)),r.Jh.any(...d.map((e=>e.onDidLayout)))((([e,t])=>h.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=o.reduce(((e,t)=>e+t.weight),0),i=o[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=(0,n.li)(this.domNode),this.style(l.bG)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}var y=i(55798),w=i(90487),C=i(41197),S=i(57688),k=i(5837);class x{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new C.G6(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(e,t){return i.sorter.compare(e.element,t.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=k.f.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=k.f.empty(),i){const n=new Set,o=new Set,s=e=>{if(null===e.element)return;const t=e;if(n.add(t.element),this.nodes.set(t.element,t),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();o.add(e),this.nodesByIdentity.set(e,t)}i.onDidCreateNode?.(t)},r=e=>{if(null===e.element)return;const t=e;if(n.has(t.element)||this.nodes.delete(t.element),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}i.onDidDeleteNode?.(t)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:s,onDidDeleteNode:r})}preserveCollapseState(e=k.f.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),k.f.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t="undefined"===typeof e.collapsed?void 0:e.collapsed===S.Yo.Collapsed||e.collapsed===S.Yo.PreserveOrCollapsed||e.collapsed!==S.Yo.Expanded&&e.collapsed!==S.Yo.PreserveOrExpanded&&Boolean(e.collapsed),{...e,children:this.preserveCollapseState(e.children),collapsed:t}}const i="boolean"===typeof e.collapsible?e.collapsible:t.collapsible;let n;return n="undefined"===typeof e.collapsed||e.collapsed===S.Yo.PreserveOrCollapsed||e.collapsed===S.Yo.PreserveOrExpanded?t.collapsed:e.collapsed===S.Yo.Collapsed||e.collapsed!==S.Yo.Expanded&&Boolean(e.collapsed),{...e,collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)}}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new S.jh(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new S.jh(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new S.jh(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i),o=this.model.getNode(n);return o.element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new S.jh(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function E(e){const t=[e.element],i=e.incompressible||!1;return{element:{elements:t,incompressible:i},children:k.f.map(k.f.from(e.children),E),collapsible:e.collapsible,collapsed:e.collapsed}}function L(e){const t=[e.element],i=e.incompressible||!1;let n,o;while(1){if([o,n]=k.f.consume(k.f.from(e.children),2),1!==o.length)break;if(o[0].incompressible)break;e=o[0],t.push(e.element)}return{element:{elements:t,incompressible:i},children:k.f.map(k.f.concat(o,n),L),collapsible:e.collapsible,collapsed:e.collapsed}}function T(e,t=0){let i;return i=tT(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function I(e){return T(e,0)}function R(e,t,i){return e.element===t?{...e,children:i}:{...e,children:k.f.map(k.f.from(e.children),(e=>R(e,t,i)))}}const D=e=>({getId(t){return t.elements.map((t=>e.getId(t).toString())).join("\0")}});class N{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new x(e,t,i),this.enabled="undefined"===typeof i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=k.f.empty(),i){const n=i.diffIdentityProvider&&D(i.diffIdentityProvider);if(null===e){const e=k.f.map(t,this.enabled?L:E);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new S.jh(this.user,"Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=I(r),d=R(c,e,t),u=(this.enabled?L:E)(d),h=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if((0,o.aI)(u.element.elements,r.element.elements,h))return void this._setChildren(s,u.children||k.f.empty(),{diffIdentityProvider:n,diffDepth:1});const g=l.children.map((e=>e===r?u:e));this._setChildren(l.element,g,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode(),i=t.children,n=k.f.map(i,I),o=k.f.map(n,e?L:E);this._setChildren(null,o,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,o=e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},s=e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)};this.model.setChildren(e,t,{...i,onDidCreateNode:o,onDidDeleteNode:s})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if("undefined"===typeof e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new S.jh(this.user,`Tree element not found: ${e}`);return t}}const A=e=>e[e.length-1];class O{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new O(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}function P(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}function M(e,t){return{...t,identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(e(i))}},sorter:t.sorter&&{compare(e,i){return t.sorter.compare(e.elements[0],i.elements[0])}},filter:t.filter&&{filter(i,n){return t.filter.filter(e(i),n)}}}}class F{get onDidSplice(){return r.Jh.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return r.Jh.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return r.Jh.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||A;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new S.y2((e=>new O(n,e))),this.model=new N(e,P(this.nodeMapper,t),M(n,i))}setChildren(e,t=k.f.empty(),i={}){this.model.setChildren(e,t,i)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null===t||"undefined"===typeof t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var B=i(34125),W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class H extends y.DO{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}setChildren(e,t=k.f.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new x(e,t,i)}}class V{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,i){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,i,n){let o=this.stickyScrollDelegate.getCompressedNode(e);o||(o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements?.(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement?.(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}W([B.B],V.prototype,"compressedTreeNodeProvider",null);class j{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,i){if(this.compressedStickyNodes.clear(),0===e.length)return[];for(let n=0;ni;if(r||n>=t-1&&tthis,r=new j((()=>this.model)),a=n.map((e=>new V(s,r,e)));super(e,t,i,a,{...z(s,o),stickyScrollDelegate:r})}setChildren(e,t=k.f.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new F(e,t,i)}updateOptions(e={}){super.updateOptions(e),"undefined"!==typeof e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var $=i(9659),q=i(25923),K=i(23740),G=i(14396),Q=i(50322);function Y(e){return{...e,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function Z(e,t){return!!t.parent&&(t.parent===e||Z(e,t.parent))}function X(e,t){return e===t||Z(e,t)||Z(t,e)}class J{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new J(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class ee{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...K.L.asClassNameArray(q.W.treeItemLoading)),!0):(t.classList.remove(...K.L.asClassNameArray(q.W.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function te(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function ie(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class ne extends w.ur{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function oe(e){return e instanceof w.ur?new ne(e):e}class se{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart?.(oe(e),t)}onDragOver(e,t,i,n,o,s=!0){return this.dnd.onDragOver(oe(e),t&&t.element,i,n,o)}drop(e,t,i,n,o){this.dnd.drop(oe(e),t&&t.element,i,n,o)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.dnd.dispose()}}function re(e){return e&&{...e,collapseByDefault:!0,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new se(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>!!e.accessibilityProvider?.isChecked(t.element):void 0,getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},filter:e.filter&&{filter(t,i){return e.filter.filter(t.element,i)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}},sorter:void 0,expandOnlyOnTwistieClick:"undefined"===typeof e.expandOnlyOnTwistieClick?void 0:"function"!==typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"===typeof e.defaultFindVisibility?e.defaultFindVisibility:"undefined"===typeof e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)}}function ae(e,t){t(e),e.children.forEach((e=>ae(e,t)))}class le{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return r.Jh.map(this.tree.onDidChangeFocus,te)}get onDidChangeSelection(){return r.Jh.map(this.tree.onDidChangeSelection,te)}get onMouseDblClick(){return r.Jh.map(this.tree.onMouseDblClick,ie)}get onPointer(){return r.Jh.map(this.tree.onPointer,ie)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.vl,this._onDidChangeNodeSlowState=new r.vl,this.nodeMapper=new S.y2((e=>new J(e))),this.disposables=new a.Cm,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren="undefined"!==typeof s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=e=>s.collapseByDefault?s.collapseByDefault(e)?S.Yo.PreserveOrCollapsed:S.Yo.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,i,n,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=Y({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,o){const s=new y.w0(i),r=n.map((e=>new ee(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=re(o)||{};return new H(e,t,s,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"===typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,i=!1,n,o){if("undefined"===typeof this.root.element)throw new S.jh(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch{}}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if("undefined"===typeof this.root.element)throw new S.jh(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){const e=this.tree.getSelection();return e.map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){const e=this.tree.getFocus();return e.map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new S.jh(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i,n){await this.refreshNode(e,t,i),this.disposables.isDisposed||this.render(e,i,n)}async refreshNode(e,t,i){let n;if(this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&X(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n)return n;if(e!==this.root){const n=this.tree.getNode(e);if(n.collapsed)return e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,void this.setChildren(e,[],t,i)}return this.doRefreshSubTree(e,t,i)}async doRefreshSubTree(e,t,i){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=await this.doRefreshNode(e,t,i);e.stale=!1,await $.HC.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}async doRefreshNode(e,t,i){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if((0,Q.xZ)(t))n=Promise.resolve(t);else{const i=(0,$.wR)(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(k.f.empty());try{const o=await n;return this.setChildren(e,o,t,i)}catch(o){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,G.MB)(o))return[];throw o}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return(0,Q.xZ)(i)?this.processChildren(i):(t=(0,$.SS)((async()=>this.processChildren(await i))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(G.dz))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const c of e.children)s.set(c.element,c),this.identityProvider&&r.set(c.id,{node:c,collapsed:this.tree.hasElement(c)&&this.tree.isCollapsed(c)});const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=Y({element:t,parent:e,hasChildren:o,defaultCollapseState:this.getDefaultCollapseState(t)});return o&&i.defaultCollapseState===S.Yo.PreserveOrExpanded&&a.push(i),i}const l=this.identityProvider.getId(t).toString(),c=r.get(l);if(c){const e=c.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach((e=>ae(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&!c.collapsed&&a.push(e),e}const d=Y({element:t,parent:e,id:l,hasChildren:o,defaultCollapseState:this.getDefaultCollapseState(t)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1||o&&d.defaultCollapseState===S.Yo.PreserveOrExpanded)&&a.push(d),d}));for(const c of s.values())ae(c,(e=>this.nodes.delete(e.element)));for(const c of l)this.nodes.set(c.element,c);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].forceExpanded=!0,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(e){return i.diffIdentityProvider.getId(e.element)}}};this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?k.f.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class ce{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new ce(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class de{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...K.L.asClassNameArray(q.W.treeItemLoading)),!0):(t.classList.remove(...K.L.asClassNameArray(q.W.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,a.AS)(this.disposables)}}function ue(e){const t=e&&re(e);return t&&{...t,keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))}}}}class he extends le{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new S.y2((e=>new ce(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new y.w0(i),r=n.map((e=>new de(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=ue(o)||{};return new U(e,t,s,r,a)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,i){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),o=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},s=o(this.tree.getSelection()),r=o(this.tree.getFocus());super.render(e,t,i);const a=this.getSelection();let l=!1;const c=this.getFocus();let d=!1;const u=e=>{const t=e.element;if(t)for(let i=0;i{const t=this.filter.filter(e,1),i=ge(t);if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i}))),super.processChildren(e)}}function ge(e){return"boolean"===typeof e?e?1:0:(0,C.iZ)(e)?(0,C.Mn)(e.visibility):(0,C.Mn)(e)}class pe extends y.DO{constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,i){return new x(e,t,i)}}var fe=i(41337),me=i(32828),_e=i(27503),ve=i(18904),be=i(5045),ye=i(46403),we=i(87778),Ce=i(13046),Se=i(16374),ke=i(13153),xe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ee=function(e,t){return function(i,n){t(i,n,e)}};const Le=(0,we.u1)("listService");class Te{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new a.Cm,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){e!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new l.hb((0,n.li)(),"");e.style(ke.IN)}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),(0,n.X7)(e.getHTMLElement())&&this.setLastFocusedList(e),(0,a.qE)(e.onDidFocus((()=>this.setLastFocusedList(e))),(0,a.s)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}}const Ie=new ve.N1("listScrollAtBoundary","none"),Re=(ve.M$.or(Ie.isEqualTo("top"),Ie.isEqualTo("both")),ve.M$.or(Ie.isEqualTo("bottom"),Ie.isEqualTo("both")),new ve.N1("listFocus",!0)),De=new ve.N1("treestickyScrollFocused",!1),Ne=new ve.N1("listSupportsMultiselect",!0),Ae=ve.M$.and(Re,ve.M$.not(be.aV),De.negate()),Oe=new ve.N1("listHasSelectionOrFocus",!1),Pe=new ve.N1("listDoubleSelection",!1),Me=new ve.N1("listMultiSelection",!1),Fe=new ve.N1("listSelectionNavigation",!1),Be=new ve.N1("listSupportsFind",!0),We=new ve.N1("treeElementCanCollapse",!1),He=new ve.N1("treeElementHasParent",!1),Ve=new ve.N1("treeElementCanExpand",!1),je=new ve.N1("treeElementHasChild",!1),ze=new ve.N1("treeFindOpen",!1),Ue="listTypeNavigationMode",$e="listAutomaticKeyboardNavigation";function qe(e,t){const i=e.createScoped(t.getHTMLElement());return Re.bindTo(i),i}function Ke(e,t){const i=Ie.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const Ge="workbench.list.multiSelectModifier",Qe="workbench.list.openMode",Ye="workbench.list.horizontalScrolling",Ze="workbench.list.defaultFindMode",Xe="workbench.list.typeNavigationMode",Je="workbench.list.keyboardNavigation",et="workbench.list.scrollByPage",tt="workbench.list.defaultFindMatchType",it="workbench.tree.indent",nt="workbench.tree.renderIndentGuides",ot="workbench.list.smoothScrolling",st="workbench.list.mouseWheelScrollSensitivity",rt="workbench.list.fastScrollSensitivity",at="workbench.tree.expandMode",lt="workbench.tree.enableStickyScroll",ct="workbench.tree.stickyScrollMaxItemCount";function dt(e){return"alt"===e.getValue(Ge)}class ut extends a.jG{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=dt(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ge)&&(this.useAltAsMultipleSelectionModifier=dt(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,l.tX)(e)}isSelectionRangeChangeEvent(e){return(0,l.mh)(e)}}function ht(e,t){const i=e.get(me.pG),n=e.get(Ce.b),o=new a.Cm,s={...t,keyboardNavigationDelegate:{mightProducePrintableCharacter(e){return n.mightProducePrintableCharacter(e)}},smoothScrolling:Boolean(i.getValue(ot)),mouseWheelScrollSensitivity:i.getValue(st),fastScrollSensitivity:i.getValue(rt),multipleSelectionController:t.multipleSelectionController??o.add(new ut(i)),keyboardNavigationEventFilter:yt(n),scrollByPage:Boolean(i.getValue(et))};return[s,o]}let gt=class extends l.B8{constructor(e,t,i,n,o,s,r,a,l){const c="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:Boolean(a.getValue(Ye)),[d,u]=l.invokeFunction(ht,o);super(e,t,i,n,{keyboardSupport:!1,...d,horizontalScrolling:c}),this.disposables.add(u),this.contextKeyService=qe(s,this),this.disposables.add(Ke(this.contextKeyService,this)),this.listSupportsMultiSelect=Ne.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);const h=Fe.bindTo(this.contextKeyService);h.set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=Oe.bindTo(this.contextKeyService),this.listDoubleSelection=Pe.bindTo(this.contextKeyService),this.listMultiSelection=Me.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=dt(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=dt(a));let t={};if(e.affectsConfiguration(Ye)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(Ye));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(et)){const e=Boolean(a.getValue(et));t={...t,scrollByPage:e}}if(e.affectsConfiguration(ot)){const e=Boolean(a.getValue(ot));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(st)){const e=a.getValue(st);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(rt)){const e=a.getValue(rt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new _t(this,{configurationService:a,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ke.t8)(e):ke.IN)}};gt=xe([Ee(5,ve.fN),Ee(6,Le),Ee(7,me.pG),Ee(8,we._Y)],gt);let pt=class extends h{constructor(e,t,i,n,o,s,r,l,c){const d="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(Ye)),[u,h]=c.invokeFunction(ht,o);super(e,t,i,n,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables=new a.Cm,this.disposables.add(h),this.contextKeyService=qe(s,this),this.disposables.add(Ke(this.contextKeyService,this.widget)),this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=Ne.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);const g=Fe.bindTo(this.contextKeyService);g.set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=dt(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=dt(l));let t={};if(e.affectsConfiguration(Ye)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Ye));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(et)){const e=Boolean(l.getValue(et));t={...t,scrollByPage:e}}if(e.affectsConfiguration(ot)){const e=Boolean(l.getValue(ot));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(st)){const e=l.getValue(st);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(rt)){const e=l.getValue(rt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new _t(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ke.t8)(e):ke.IN)}dispose(){this.disposables.dispose(),super.dispose()}};pt=xe([Ee(5,ve.fN),Ee(6,Le),Ee(7,me.pG),Ee(8,we._Y)],pt);let ft=class extends b{constructor(e,t,i,n,o,s,r,a,l,c){const d="undefined"!==typeof s.horizontalScrolling?s.horizontalScrolling:Boolean(l.getValue(Ye)),[u,h]=c.invokeFunction(ht,s);super(e,t,i,n,o,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables.add(h),this.contextKeyService=qe(r,this),this.disposables.add(Ke(this.contextKeyService,this)),this.listSupportsMultiSelect=Ne.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport);const g=Fe.bindTo(this.contextKeyService);g.set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=Oe.bindTo(this.contextKeyService),this.listDoubleSelection=Pe.bindTo(this.contextKeyService),this.listMultiSelection=Me.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=dt(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=dt(l));let t={};if(e.affectsConfiguration(Ye)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Ye));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(et)){const e=Boolean(l.getValue(et));t={...t,scrollByPage:e}}if(e.affectsConfiguration(ot)){const e=Boolean(l.getValue(ot));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(st)){const e=l.getValue(st);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(rt)){const e=l.getValue(rt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new vt(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ke.t8)(e):ke.IN)}dispose(){this.disposables.dispose(),super.dispose()}};ft=xe([Ee(6,ve.fN),Ee(7,Le),Ee(8,me.pG),Ee(9,we._Y)],ft);class mt extends a.jG{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new r.vl),this.onDidOpen=this._onDidOpen.event,this._register(r.Jh.filter(this.widget.onDidChangeSelection,(e=>(0,n.kx)(e.browserEvent)))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!==typeof t?.openOnSingleClick&&t?.configurationService?(this.openOnSingleClick="doubleClick"!==t?.configurationService.getValue(Qe),this._register(t?.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Qe)&&(this.openOnSingleClick="doubleClick"!==t?.configurationService.getValue(Qe))})))):this.openOnSingleClick=t?.openOnSingleClick??!0}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!==typeof t.preserveFocus||t.preserveFocus,n="boolean"===typeof t.pinned?t.pinned:!i,o=!1;this._open(this.getSelectedElement(),i,n,o,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;const i=2===t.detail;if(i)return;const n=1===t.button,o=!0,s=n,r=t.ctrlKey||t.metaKey||t.altKey;this._open(e,o,s,r,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16;if(n)return;const o=!1,s=!0,r=t.ctrlKey||t.metaKey||t.altKey;this._open(e,o,s,r,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class _t extends mt{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class vt extends mt{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class bt extends mt{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function yt(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let wt=class extends H{constructor(e,t,i,n,o,s,r,a,l){const{options:c,getTypeNavigationMode:d,disposable:u}=s.invokeFunction(Tt,o);super(e,t,i,n,c),this.disposables.add(u),this.internals=new It(this,o,d,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};wt=xe([Ee(5,we._Y),Ee(6,ve.fN),Ee(7,Le),Ee(8,me.pG)],wt);let Ct=class extends U{constructor(e,t,i,n,o,s,r,a,l){const{options:c,getTypeNavigationMode:d,disposable:u}=s.invokeFunction(Tt,o);super(e,t,i,n,c),this.disposables.add(u),this.internals=new It(this,o,d,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Ct=xe([Ee(5,we._Y),Ee(6,ve.fN),Ee(7,Le),Ee(8,me.pG)],Ct);let St=class extends pe{constructor(e,t,i,n,o,s,r,a,l,c){const{options:d,getTypeNavigationMode:u,disposable:h}=r.invokeFunction(Tt,s);super(e,t,i,n,o,d),this.disposables.add(h),this.internals=new It(this,s,u,s.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};St=xe([Ee(6,we._Y),Ee(7,ve.fN),Ee(8,Le),Ee(9,me.pG)],St);let kt=class extends le{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,o,s,r,a,l,c){const{options:d,getTypeNavigationMode:u,disposable:h}=r.invokeFunction(Tt,s);super(e,t,i,n,o,d),this.disposables.add(h),this.internals=new It(this,s,u,s.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};kt=xe([Ee(6,we._Y),Ee(7,ve.fN),Ee(8,Le),Ee(9,me.pG)],kt);let xt=class extends he{constructor(e,t,i,n,o,s,r,a,l,c,d){const{options:u,getTypeNavigationMode:h,disposable:g}=a.invokeFunction(Tt,r);super(e,t,i,n,o,s,u),this.disposables.add(g),this.internals=new It(this,r,h,r.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function Et(e){const t=e.getValue(Ze);if("highlight"===t)return y.vD.Highlight;if("filter"===t)return y.vD.Filter;const i=e.getValue(Je);return"simple"===i||"highlight"===i?y.vD.Highlight:"filter"===i?y.vD.Filter:void 0}function Lt(e){const t=e.getValue(tt);return"fuzzy"===t?y.RD.Fuzzy:"contiguous"===t?y.RD.Contiguous:void 0}function Tt(e,t){const i=e.get(me.pG),n=e.get(ye.l),o=e.get(ve.fN),s=e.get(we._Y),r=()=>{const e=o.getContextKeyValue(Ue);if("automatic"===e)return l._C.Automatic;if("trigger"===e)return l._C.Trigger;const t=o.getContextKeyValue($e);if(!1===t)return l._C.Trigger;const n=i.getValue(Xe);return"automatic"===n?l._C.Automatic:"trigger"===n?l._C.Trigger:void 0},a=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(i.getValue(Ye)),[c,d]=s.invokeFunction(ht,t),u=t.paddingBottom,h=void 0!==t.renderIndentGuides?t.renderIndentGuides:i.getValue(nt);return{getTypeNavigationMode:r,disposable:d,options:{keyboardSupport:!1,...c,indent:"number"===typeof i.getValue(it)?i.getValue(it):void 0,renderIndentGuides:h,smoothScrolling:Boolean(i.getValue(ot)),defaultFindMode:Et(i),defaultFindMatchType:Lt(i),horizontalScrolling:a,scrollByPage:Boolean(i.getValue(et)),paddingBottom:u,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:t.expandOnlyOnTwistieClick??"doubleClick"===i.getValue(at),contextViewProvider:n,findWidgetStyles:ke.Dk,enableStickyScroll:Boolean(i.getValue(lt)),stickyScrollMaxItemCount:Number(i.getValue(ct))}}}xt=xe([Ee(7,we._Y),Ee(8,ve.fN),Ee(9,Le),Ee(10,me.pG)],xt);let It=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,o,s,r){this.tree=e,this.disposables=[],this.contextKeyService=qe(o,e),this.disposables.push(Ke(this.contextKeyService,e)),this.listSupportsMultiSelect=Ne.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);const a=Fe.bindTo(this.contextKeyService);a.set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=Be.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=Oe.bindTo(this.contextKeyService),this.hasDoubleSelection=Pe.bindTo(this.contextKeyService),this.hasMultiSelection=Me.bindTo(this.contextKeyService),this.treeElementCanCollapse=We.bindTo(this.contextKeyService),this.treeElementHasParent=He.bindTo(this.contextKeyService),this.treeElementCanExpand=Ve.bindTo(this.contextKeyService),this.treeElementHasChild=je.bindTo(this.contextKeyService),this.treeFindOpen=ze.bindTo(this.contextKeyService),this.treeStickyScrollFocused=De.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=dt(r),this.updateStyleOverrides(n);const l=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},c=new Set;c.add(Ue),c.add($e),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),l()})),e.onDidChangeCollapseState(l),e.onDidChangeModel(l),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),e.onDidChangeStickyScrollFocused((e=>this.treeStickyScrollFocused.set(e))),r.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=dt(r)),n.affectsConfiguration(it)){const e=r.getValue(it);o={...o,indent:e}}if(n.affectsConfiguration(nt)&&void 0===t.renderIndentGuides){const e=r.getValue(nt);o={...o,renderIndentGuides:e}}if(n.affectsConfiguration(ot)){const e=Boolean(r.getValue(ot));o={...o,smoothScrolling:e}}if(n.affectsConfiguration(Ze)||n.affectsConfiguration(Je)){const e=Et(r);o={...o,defaultFindMode:e}}if(n.affectsConfiguration(Xe)||n.affectsConfiguration(Je)){const e=i();o={...o,typeNavigationMode:e}}if(n.affectsConfiguration(tt)){const e=Lt(r);o={...o,defaultFindMatchType:e}}if(n.affectsConfiguration(Ye)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(Ye));o={...o,horizontalScrolling:e}}if(n.affectsConfiguration(et)){const e=Boolean(r.getValue(et));o={...o,scrollByPage:e}}if(n.affectsConfiguration(at)&&void 0===t.expandOnlyOnTwistieClick&&(o={...o,expandOnlyOnTwistieClick:"doubleClick"===r.getValue(at)}),n.affectsConfiguration(lt)){const e=r.getValue(lt);o={...o,enableStickyScroll:e}}if(n.affectsConfiguration(ct)){const e=Math.max(1,r.getValue(ct));o={...o,stickyScrollMaxItemCount:e}}if(n.affectsConfiguration(st)){const e=r.getValue(st);o={...o,mouseWheelScrollSensitivity:e}}if(n.affectsConfiguration(rt)){const e=r.getValue(rt);o={...o,fastScrollSensitivity:e}}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(c)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new bt(e,{configurationService:r,...t}),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?(0,ke.t8)(e):ke.IN)}dispose(){this.disposables=(0,a.AS)(this.disposables)}};It=xe([Ee(4,ve.fN),Ee(5,Le),Ee(6,me.pG)],It);const Rt=Se.O.as(_e.Fd.Configuration);Rt.registerConfiguration({id:"workbench",order:7,title:(0,fe.kg)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Ge]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,fe.kg)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,fe.kg)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,fe.kg)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[Qe]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,fe.kg)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Ye]:{type:"boolean",default:!1,description:(0,fe.kg)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[et]:{type:"boolean",default:!1,description:(0,fe.kg)("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[it]:{type:"number",default:8,minimum:4,maximum:40,description:(0,fe.kg)("tree indent setting","Controls tree indentation in pixels.")},[nt]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,fe.kg)("render tree indent guides","Controls whether the tree should render indent guides.")},[ot]:{type:"boolean",default:!1,description:(0,fe.kg)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[st]:{type:"number",default:1,markdownDescription:(0,fe.kg)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[rt]:{type:"number",default:5,markdownDescription:(0,fe.kg)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[Ze]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,fe.kg)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,fe.kg)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,fe.kg)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[Je]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,fe.kg)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,fe.kg)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,fe.kg)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,fe.kg)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,fe.kg)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[tt]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,fe.kg)("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),(0,fe.kg)("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:(0,fe.kg)("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[at]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,fe.kg)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[lt]:{type:"boolean",default:!0,description:(0,fe.kg)("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[ct]:{type:"number",minimum:1,default:7,markdownDescription:(0,fe.kg)("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[Xe]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:(0,fe.kg)("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})},12660:(e,t,i)=>{"use strict";i.d(t,{$b:()=>l,Cr:()=>u,Dk:()=>h,rr:()=>a});var n=i(40231),o=i(5091),s=i(18904),r=i(87778);const a=(0,r.u1)("logService");var l;(function(e){e[e["Off"]=0]="Off",e[e["Trace"]=1]="Trace",e[e["Debug"]=2]="Debug",e[e["Info"]=3]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=5]="Error"})(l||(l={}));const c=l.Info;class d extends o.jG{constructor(){super(...arguments),this.level=c,this._onDidChangeLogLevel=this._register(new n.vl),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==l.Off&&this.level<=e}}class u extends d{constructor(e=c,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(l.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(l.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(l.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(l.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(l.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}}class h extends d{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}function g(e){switch(e){case l.Trace:return"trace";case l.Debug:return"debug";case l.Info:return"info";case l.Warning:return"warn";case l.Error:return"error";case l.Off:return"off"}}new s.N1("logLevel",g(l.Info))},45658:(e,t,i)=>{"use strict";i.d(t,{DR:()=>l,cj:()=>n,oc:()=>o});var n,o,s=i(73124),r=i(41337),a=i(87778);(function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"})(n||(n={})),function(e){function t(e,t){return t-e}e.compare=t;const i=Object.create(null);function n(e){return i[e]||""}function o(t){switch(t){case s.A.Error:return e.Error;case s.A.Warning:return e.Warning;case s.A.Info:return e.Info;case s.A.Ignore:return e.Hint}}function a(t){switch(t){case e.Error:return s.A.Error;case e.Warning:return s.A.Warning;case e.Info:return s.A.Info;case e.Hint:return s.A.Ignore}}i[e.Error]=(0,r.kg)("sev.error","Error"),i[e.Warning]=(0,r.kg)("sev.warning","Warning"),i[e.Info]=(0,r.kg)("sev.info","Info"),e.toString=n,e.fromSeverity=o,e.toSeverity=a}(n||(n={})),function(e){const t="";function i(e){return o(e,!0)}function o(e,i){const o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"===typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(n.toString(e.severity)):o.push(t),e.message&&i?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=i,e.makeKeyOptionalMessage=o}(o||(o={}));const l=(0,a.u1)("markerService")},95062:(e,t,i)=>{"use strict";i.d(t,{AI:()=>s,Kz:()=>a,Ot:()=>r});var n=i(73124),o=i(87778),s=n.A;const r=(0,o.u1)("notificationService");class a{}},5480:(e,t,i)=>{"use strict";i.d(t,{V:()=>s,w:()=>r});var n=i(39751),o=i(79741);function s(e,t,i){return(0,o.eP)({debugName:()=>`Configuration Key "${e}"`},(t=>i.onDidChangeConfiguration((i=>{i.affectsConfiguration(e)&&t(i)}))),(()=>i.getValue(e)??t))}function r(e,t,i){const o=e.bindTo(t);return(0,n.zL)({debugName:()=>`Set Context Key "${e.key}"`},(e=>{o.set(i(e))}))}},10170:(e,t,i)=>{"use strict";i.d(t,{C:()=>o,e:()=>s});var n=i(87778);const o=(0,n.u1)("openerService");function s(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},44838:(e,t,i)=>{"use strict";i.d(t,{G5:()=>o,N8:()=>r,ke:()=>s});var n=i(87778);const o=(0,n.u1)("progressService");Object.freeze({total(){},worked(){},done(){}});class s{static{this.None=Object.freeze({report(){}})}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}const r=(0,n.u1)("editorProgressService")},60018:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>a,aJ:()=>n});var n,o=i(85053),s=i(5091),r=i(16374);(function(e){e[e["PRESERVE"]=0]="PRESERVE",e[e["LAST"]=1]="LAST"})(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};class l{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.s)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,o.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){const t=e&&this.providers.find((t=>e.startsWith(t.prefix)))||void 0;return t||this.defaultProvider}}r.O.add(a.Quickaccess,new l)},3874:(e,t,i)=>{"use strict";i.d(t,{C1:()=>r,Fp:()=>a,GK:()=>d,Ym:()=>o,dH:()=>l,kF:()=>s});var n=i(87778);const o={ctrlCmd:!1,alt:!1};var s,r,a,l;(function(e){e[e["Blur"]=1]="Blur",e[e["Gesture"]=2]="Gesture",e[e["Other"]=3]="Other"})(s||(s={})),function(e){e[e["NONE"]=0]="NONE",e[e["FIRST"]=1]="FIRST",e[e["SECOND"]=2]="SECOND",e[e["LAST"]=3]="LAST"}(r||(r={})),function(e){e[e["First"]=1]="First",e[e["Second"]=2]="Second",e[e["Last"]=3]="Last",e[e["Next"]=4]="Next",e[e["Previous"]=5]="Previous",e[e["NextPage"]=6]="NextPage",e[e["PreviousPage"]=7]="PreviousPage",e[e["NextSeparator"]=8]="NextSeparator",e[e["PreviousSeparator"]=9]="PreviousSeparator"}(a||(a={})),function(e){e[e["Title"]=1]="Title",e[e["Inline"]=2]="Inline"}(l||(l={}));class c{constructor(e){this.options=e}}new c;const d=(0,n.u1)("quickInputService")},16374:(e,t,i)=>{"use strict";i.d(t,{O:()=>r});var n=i(79109),o=i(50322);class s{constructor(){this.data=new Map}add(e,t){n.ok(o.Kg(e)),n.ok(o.Gv(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const r=new s},94216:(e,t,i)=>{"use strict";i.d(t,{CS:()=>p,pc:()=>v,LP:()=>f});var n,o,s=i(40231),r=i(5091),a=i(50322),l=i(9659),c=i(61565);(function(e){e[e["STORAGE_DOES_NOT_EXIST"]=0]="STORAGE_DOES_NOT_EXIST",e[e["STORAGE_IN_MEMORY"]=1]="STORAGE_IN_MEMORY"})(n||(n={})),function(e){e[e["None"]=0]="None",e[e["Initialized"]=1]="Initialized",e[e["Closed"]=2]="Closed"}(o||(o={}));class d extends r.jG{static{this.DEFAULT_FLUSH_DELAY=100}constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new s.fV),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=o.None,this.cache=new Map,this.flushDelayer=this._register(new l.Th(d.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach(((e,t)=>this.acceptExternal(t,e))),e.deleted?.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===o.Closed)return;let i=!1;if((0,a.z)(t))i=this.cache.delete(e);else{const n=this.cache.get(e);n!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return(0,a.z)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.z)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.z)(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===o.Closed)return;if((0,a.z)(t))return this.delete(e,i);const n=(0,a.Gv)(t)||Array.isArray(t)?(0,c.As)(t):String(t),s=this.cache.get(e);return s!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}async delete(e,t=!1){if(this.state===o.Closed)return;const i=this.cache.delete(e);return i?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{if(!this.hasPending)while(this.whenFlushedCallbacks.length)this.whenFlushedCallbacks.pop()?.()}))}async doFlush(e){return this.options.hint===n.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger((()=>this.flushPending()),e)}}class u{constructor(){this.onDidChangeItemsExternal=s.Jh.None,this.items=new Map}async updateItems(e){e.insert?.forEach(((e,t)=>this.items.set(t,e))),e.delete?.forEach((e=>this.items.delete(e)))}}var h=i(87778);const g="__$__targetStorageMarker",p=(0,h.u1)("storageService");var f;function m(e){const t=e.get(g);if(t)try{return JSON.parse(t)}catch(i){}return Object.create(null)}(function(e){e[e["NONE"]=0]="NONE",e[e["SHUTDOWN"]=1]="SHUTDOWN"})(f||(f={}));class _ extends r.jG{static{this.DEFAULT_FLUSH_INTERVAL=6e4}constructor(e={flushInterval:_.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new s.fV),this._onDidChangeTarget=this._register(new s.fV),this._onWillSaveState=this._register(new s.vl),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return s.Jh.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===g){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){return this.getStorage(t)?.get(e,i)}getBoolean(e,t,i){return this.getStorage(t)?.getBoolean(e,i)}getNumber(e,t,i){return this.getStorage(t)?.getNumber(e,i)}store(e,t,i,n,o=!1){(0,a.z)(t)?this.remove(e,i,o):this.withPausedEmitters((()=>{this.updateKeyTarget(e,i,n),this.getStorage(i)?.set(e,t,o)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,i)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){const o=this.getKeyTargets(t);"number"===typeof i?o[e]!==i&&(o[e]=i,this.getStorage(t)?.set(g,JSON.stringify(o),n)):"number"===typeof o[e]&&(delete o[e],this.getStorage(t)?.set(g,JSON.stringify(o),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?m(t):Object.create(null)}}class v extends _{constructor(){super(),this.applicationStorage=this._register(new d(new u,{hint:n.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new d(new u,{hint:n.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new d(new u,{hint:n.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},11086:(e,t,i)=>{"use strict";i.d(t,{k:()=>o});var n=i(87778);const o=(0,n.u1)("telemetryService")},13153:(e,t,i)=>{"use strict";i.d(t,{Dk:()=>u,IN:()=>g,RE:()=>f,XS:()=>m,cv:()=>a,ho:()=>d,ir:()=>r,m$:()=>h,mk:()=>c,oJ:()=>l,t8:()=>p});var n=i(66344),o=i(85476);function s(e,t){const i={...t};for(const o in e){const t=e[o];i[o]=void 0!==t?(0,n.GuP)(t):void 0}return i}const r={keybindingLabelBackground:(0,n.GuP)(n.HDX),keybindingLabelForeground:(0,n.GuP)(n.eUu),keybindingLabelBorder:(0,n.GuP)(n.zUX),keybindingLabelBottomBorder:(0,n.GuP)(n.Qfh),keybindingLabelShadow:(0,n.GuP)(n.f9l)},a={buttonForeground:(0,n.GuP)(n.G_h),buttonSeparator:(0,n.GuP)(n.Q1$),buttonBackground:(0,n.GuP)(n.XJc),buttonHoverBackground:(0,n.GuP)(n.T9h),buttonSecondaryForeground:(0,n.GuP)(n.Inn),buttonSecondaryBackground:(0,n.GuP)(n.xOA),buttonSecondaryHoverBackground:(0,n.GuP)(n.nZG),buttonBorder:(0,n.GuP)(n.raQ)},l={progressBarBackground:(0,n.GuP)(n.BTi)},c={inputActiveOptionBorder:(0,n.GuP)(n.uNK),inputActiveOptionForeground:(0,n.GuP)(n.$$0),inputActiveOptionBackground:(0,n.GuP)(n.c1f)},d=((0,n.GuP)(n.jOE),(0,n.GuP)(n.Ukx),(0,n.GuP)(n.Ips),(0,n.GuP)(n.kPT),(0,n.GuP)(n.xWN),(0,n.GuP)(n.ZBU),(0,n.GuP)(n.jr9),(0,n.GuP)(n.OcU),(0,n.GuP)(n.C5U),(0,n.GuP)(n.t0B),(0,n.GuP)(n.CgL),(0,n.GuP)(n.FiB),(0,n.GuP)(n.f9l),(0,n.GuP)(n.b1q),(0,n.GuP)(n.tYX),(0,n.GuP)(n.JPj),(0,n.GuP)(n.bNw),(0,n.GuP)(n.vwp),{inputBackground:(0,n.GuP)(n.L4c),inputForeground:(0,n.GuP)(n.cws),inputBorder:(0,n.GuP)(n.Zgs),inputValidationInfoBorder:(0,n.GuP)(n.YSW),inputValidationInfoBackground:(0,n.GuP)(n.I$A),inputValidationInfoForeground:(0,n.GuP)(n.L9Z),inputValidationWarningBorder:(0,n.GuP)(n.C1n),inputValidationWarningBackground:(0,n.GuP)(n.ULt),inputValidationWarningForeground:(0,n.GuP)(n.T5N),inputValidationErrorBorder:(0,n.GuP)(n.eYZ),inputValidationErrorBackground:(0,n.GuP)(n._$n),inputValidationErrorForeground:(0,n.GuP)(n.h9z)}),u={listFilterWidgetBackground:(0,n.GuP)(n.pnl),listFilterWidgetOutline:(0,n.GuP)(n.fiM),listFilterWidgetNoMatchesOutline:(0,n.GuP)(n.P9Z),listFilterWidgetShadow:(0,n.GuP)(n.H8q),inputBoxStyles:d,toggleStyles:c},h={badgeBackground:(0,n.GuP)(n.WMx),badgeForeground:(0,n.GuP)(n.zRE),badgeBorder:(0,n.GuP)(n.b1q)},g=((0,n.GuP)(n.vV$),(0,n.GuP)(n.mc0),(0,n.GuP)(n.etE),(0,n.GuP)(n.etE),(0,n.GuP)(n.sAS),{listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.GuP)(n.VFX),listFocusForeground:(0,n.GuP)(n.efJ),listFocusOutline:(0,n.GuP)(n.p7Y),listActiveSelectionBackground:(0,n.GuP)(n.Rjz),listActiveSelectionForeground:(0,n.GuP)(n.GVV),listActiveSelectionIconForeground:(0,n.GuP)(n.fED),listFocusAndSelectionOutline:(0,n.GuP)(n.gtq),listFocusAndSelectionBackground:(0,n.GuP)(n.Rjz),listFocusAndSelectionForeground:(0,n.GuP)(n.GVV),listInactiveSelectionBackground:(0,n.GuP)(n.uNx),listInactiveSelectionIconForeground:(0,n.GuP)(n.C9U),listInactiveSelectionForeground:(0,n.GuP)(n.f4y),listInactiveFocusBackground:(0,n.GuP)(n.CQ3),listInactiveFocusOutline:(0,n.GuP)(n.ijf),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listDropOverBackground:(0,n.GuP)(n.Yoe),listDropBetweenBackground:(0,n.GuP)(n.yIp),listSelectionOutline:(0,n.GuP)(n.buw),listHoverOutline:(0,n.GuP)(n.buw),treeIndentGuidesStroke:(0,n.GuP)(n.U4U),treeInactiveIndentGuidesStroke:(0,n.GuP)(n.pft),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:(0,n.GuP)(n.bXl),tableColumnsBorder:(0,n.GuP)(n.k5u),tableOddRowsBackgroundColor:(0,n.GuP)(n.sbQ)});function p(e){return s(e,g)}const f={selectBackground:(0,n.GuP)(n.rvE),selectListBackground:(0,n.GuP)(n.lWP),selectForeground:(0,n.GuP)(n.yqq),decoratorRightForeground:(0,n.GuP)(n.NBf),selectBorder:(0,n.GuP)(n.HcB),focusBorder:(0,n.GuP)(n.tAP),listFocusBackground:(0,n.GuP)(n.AlL),listInactiveSelectionIconForeground:(0,n.GuP)(n.c7i),listFocusForeground:(0,n.GuP)(n.nH),listFocusOutline:(0,n.HP_)(n.buw,o.Q1.transparent.toString()),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listHoverOutline:(0,n.GuP)(n.buw),selectListBorder:(0,n.GuP)(n.sIe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},m={shadowColor:(0,n.GuP)(n.f9l),borderColor:(0,n.GuP)(n.g$2),foregroundColor:(0,n.GuP)(n.dd_),backgroundColor:(0,n.GuP)(n.c6Y),selectionForegroundColor:(0,n.GuP)(n.pmr),selectionBackgroundColor:(0,n.GuP)(n.Ux$),selectionBorderColor:(0,n.GuP)(n.SNb),separatorColor:(0,n.GuP)(n.D7X),scrollbarShadow:(0,n.GuP)(n.bXl),scrollbarSliderBackground:(0,n.GuP)(n.gnV),scrollbarSliderHoverBackground:(0,n.GuP)(n.cI_),scrollbarSliderActiveBackground:(0,n.GuP)(n.mhZ)}},66344:(e,t,i)=>{"use strict";i.d(t,{FdG:()=>n.Fd,buw:()=>d,GuP:()=>n.Gu,Bbc:()=>n.Bb,HP_:()=>n.HP,WMx:()=>h,zRE:()=>g,sAS:()=>ce,vV$:()=>ae,etE:()=>le,mc0:()=>re,XJc:()=>tt,raQ:()=>nt,G_h:()=>Je,T9h:()=>it,xOA:()=>st,Inn:()=>ot,nZG:()=>rt,Q1$:()=>et,OcU:()=>pt,C5U:()=>mt,t0B:()=>ft,b1q:()=>c,EY1:()=>Z,ZEf:()=>X,Gj6:()=>J,ld8:()=>te,$BZ:()=>ie,GNm:()=>ee,Ztu:()=>N,YtV:()=>b,AN$:()=>x,Rbi:()=>k,f3U:()=>F,Ubg:()=>B,ECk:()=>H,p8Y:()=>W,S5J:()=>V,By2:()=>y,i61:()=>D,WfR:()=>j,oZ8:()=>z,tan:()=>P,IIb:()=>R,pOz:()=>I,WL6:()=>$,P6i:()=>U,B2L:()=>Q,sjA:()=>G,_pU:()=>K,HwT:()=>q,seu:()=>A,rm4:()=>O,QwA:()=>M,whs:()=>E,Stt:()=>T,Hng:()=>L,CgL:()=>w,sIe:()=>S,FiB:()=>C,tAP:()=>l,CU6:()=>r,t4B:()=>a,c1f:()=>Be,uNK:()=>Me,$$0:()=>We,L4c:()=>Ae,Zgs:()=>Pe,cws:()=>Oe,_$n:()=>qe,eYZ:()=>Ge,h9z:()=>Ke,I$A:()=>He,YSW:()=>je,L9Z:()=>Ve,ULt:()=>ze,C1n:()=>$e,T5N:()=>Ue,HDX:()=>_t,zUX:()=>bt,Qfh:()=>yt,eUu:()=>vt,Rjz:()=>xt,GVV:()=>Et,fED:()=>Lt,yIp:()=>Mt,Yoe:()=>Pt,pnl:()=>Wt,P9Z:()=>Vt,fiM:()=>Ht,H8q:()=>jt,gtq:()=>kt,VFX:()=>wt,efJ:()=>Ct,eMz:()=>Bt,p7Y:()=>St,QI5:()=>Ft,lO1:()=>At,QRv:()=>Ot,CQ3:()=>Dt,ijf:()=>Nt,uNx:()=>Tt,f4y:()=>It,C9U:()=>Rt,c6Y:()=>Qt,g$2:()=>Kt,dd_:()=>Gt,Ux$:()=>Zt,SNb:()=>Xt,pmr:()=>Yt,D7X:()=>Jt,ILr:()=>De,yLC:()=>Re,AjU:()=>xe,K1Z:()=>Ne,KoI:()=>Te,yr0:()=>Le,Xp1:()=>Ee,uMG:()=>Ie,yLr:()=>n.yL,fAP:()=>ye,z5H:()=>we,iwL:()=>oi,NBf:()=>ni,tYX:()=>Ce,bNw:()=>ke,JPj:()=>Se,BTi:()=>v,ELA:()=>ei,HJZ:()=>ti,AlL:()=>li,nH:()=>ri,c7i:()=>ai,er1:()=>ii,Ukx:()=>lt,Ips:()=>ct,jOE:()=>at,xWN:()=>ut,ZBU:()=>ht,kPT:()=>dt,jr9:()=>gt,x1A:()=>n.x1,bXl:()=>p,mhZ:()=>_,gnV:()=>f,cI_:()=>m,rvE:()=>Qe,HcB:()=>Xe,yqq:()=>Ze,lWP:()=>Ye,k5u:()=>$t,sbQ:()=>qt,vwp:()=>u,JO0:()=>n.JO,pft:()=>Ut,U4U:()=>zt,DSL:()=>oe,f9l:()=>ne});var n=i(75115),o=i(41337),s=i(85476);const r=(0,n.x1)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},o.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),a=((0,n.x1)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},o.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),(0,n.x1)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},o.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),(0,n.x1)("descriptionForeground",{light:"#717171",dark:(0,n.JO)(r,.7),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},o.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),(0,n.x1)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},o.kg("iconForeground","The default color for icons in the workbench."))),l=(0,n.x1)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},o.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),c=(0,n.x1)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},o.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),d=(0,n.x1)("contrastActiveBorder",{light:null,dark:null,hcDark:l,hcLight:l},o.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),u=((0,n.x1)("selection.background",null,o.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),(0,n.x1)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},o.kg("textLinkForeground","Foreground color for links in text."))),h=((0,n.x1)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},o.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),(0,n.x1)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Q1.black,hcLight:"#292929"},o.kg("textSeparatorForeground","Color for text separators.")),(0,n.x1)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},o.kg("textPreformatForeground","Foreground color for preformatted text segments.")),(0,n.x1)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},o.kg("textPreformatBackground","Background color for preformatted text segments.")),(0,n.x1)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},o.kg("textBlockQuoteBackground","Background color for block quotes in text.")),(0,n.x1)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Q1.white,hcLight:"#292929"},o.kg("textBlockQuoteBorder","Border color for block quotes in text.")),(0,n.x1)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Q1.black,hcLight:"#F2F2F2"},o.kg("textCodeBlockBackground","Background color for code blocks in text.")),(0,n.x1)("sash.hoverBorder",l,o.kg("sashActiveBorder","Border color of active sashes.")),(0,n.x1)("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Q1.black,hcLight:"#0F4A85"},o.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),g=(0,n.x1)("badge.foreground",{dark:s.Q1.white,light:"#333",hcDark:s.Q1.white,hcLight:s.Q1.white},o.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),p=(0,n.x1)("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},o.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),f=(0,n.x1)("scrollbarSlider.background",{dark:s.Q1.fromHex("#797979").transparent(.4),light:s.Q1.fromHex("#646464").transparent(.4),hcDark:(0,n.JO)(c,.6),hcLight:(0,n.JO)(c,.4)},o.kg("scrollbarSliderBackground","Scrollbar slider background color.")),m=(0,n.x1)("scrollbarSlider.hoverBackground",{dark:s.Q1.fromHex("#646464").transparent(.7),light:s.Q1.fromHex("#646464").transparent(.7),hcDark:(0,n.JO)(c,.8),hcLight:(0,n.JO)(c,.8)},o.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),_=(0,n.x1)("scrollbarSlider.activeBackground",{dark:s.Q1.fromHex("#BFBFBF").transparent(.4),light:s.Q1.fromHex("#000000").transparent(.6),hcDark:c,hcLight:c},o.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),v=(0,n.x1)("progressBar.background",{dark:s.Q1.fromHex("#0E70C0"),light:s.Q1.fromHex("#0E70C0"),hcDark:c,hcLight:c},o.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),b=(0,n.x1)("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("editorBackground","Editor background color.")),y=(0,n.x1)("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Q1.white,hcLight:r},o.kg("editorForeground","Editor default foreground color.")),w=((0,n.x1)("editorStickyScroll.background",b,o.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),(0,n.x1)("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},o.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),(0,n.x1)("editorStickyScroll.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),(0,n.x1)("editorStickyScroll.shadow",p,o.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),(0,n.x1)("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Q1.white},o.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),C=(0,n.x1)("editorWidget.foreground",r,o.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),S=(0,n.x1)("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:c,hcLight:c},o.kg("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),k=((0,n.x1)("editorWidget.resizeBorder",null,o.kg("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),(0,n.x1)("editorError.background",null,o.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},o.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),x=(0,n.x1)("editorError.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},o.kg("errorBorder","If set, color of double underlines for errors in the editor.")),E=(0,n.x1)("editorWarning.background",null,o.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),L=(0,n.x1)("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},o.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),T=(0,n.x1)("editorWarning.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#FFCC00").transparent(.8),hcLight:s.Q1.fromHex("#FFCC00").transparent(.8)},o.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),I=((0,n.x1)("editorInfo.background",null,o.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},o.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),R=(0,n.x1)("editorInfo.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},o.kg("infoBorder","If set, color of double underlines for infos in the editor.")),D=(0,n.x1)("editorHint.foreground",{dark:s.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},o.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),N=((0,n.x1)("editorHint.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},o.kg("hintBorder","If set, color of double underlines for hints in the editor.")),(0,n.x1)("editorLink.activeForeground",{dark:"#4E94CE",light:s.Q1.blue,hcDark:s.Q1.cyan,hcLight:"#292929"},o.kg("activeLinkForeground","Color of active links."))),A=(0,n.x1)("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},o.kg("editorSelectionBackground","Color of the editor selection.")),O=(0,n.x1)("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Q1.white},o.kg("editorSelectionForeground","Color of the selected text for high contrast.")),P=(0,n.x1)("editor.inactiveSelectionBackground",{light:(0,n.JO)(A,.5),dark:(0,n.JO)(A,.5),hcDark:(0,n.JO)(A,.7),hcLight:(0,n.JO)(A,.5)},o.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),M=(0,n.x1)("editor.selectionHighlightBackground",{light:(0,n.oG)(A,b,.3,.6),dark:(0,n.oG)(A,b,.3,.6),hcDark:null,hcLight:null},o.kg("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),F=((0,n.x1)("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:d,hcLight:d},o.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),(0,n.x1)("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},o.kg("editorFindMatch","Color of the current search match.")),(0,n.x1)("editor.findMatchForeground",null,o.kg("editorFindMatchForeground","Text color of the current search match."))),B=(0,n.x1)("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},o.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),W=(0,n.x1)("editor.findMatchHighlightForeground",null,o.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),H=((0,n.x1)("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},o.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editor.findMatchBorder",{light:null,dark:null,hcDark:d,hcLight:d},o.kg("editorFindMatchBorder","Border color of the current search match.")),(0,n.x1)("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:d,hcLight:d},o.kg("findMatchHighlightBorder","Border color of the other search matches."))),V=(0,n.x1)("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:(0,n.JO)(d,.4),hcLight:(0,n.JO)(d,.4)},o.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),j=((0,n.x1)("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},o.kg("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorHoverWidget.background",w,o.kg("hoverBackground","Background color of the editor hover."))),z=((0,n.x1)("editorHoverWidget.foreground",C,o.kg("hoverForeground","Foreground color of the editor hover.")),(0,n.x1)("editorHoverWidget.border",S,o.kg("hoverBorder","Border color of the editor hover."))),U=((0,n.x1)("editorHoverWidget.statusBarBackground",{dark:(0,n.a)(j,.2),light:(0,n.e$)(j,.05),hcDark:w,hcLight:w},o.kg("statusBarBackground","Background color of the editor hover status bar.")),(0,n.x1)("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Q1.white,hcLight:s.Q1.black},o.kg("editorInlayHintForeground","Foreground color of inline hints"))),$=(0,n.x1)("editorInlayHint.background",{dark:(0,n.JO)(h,.1),light:(0,n.JO)(h,.1),hcDark:(0,n.JO)(s.Q1.white,.1),hcLight:(0,n.JO)(h,.1)},o.kg("editorInlayHintBackground","Background color of inline hints")),q=(0,n.x1)("editorInlayHint.typeForeground",U,o.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),K=(0,n.x1)("editorInlayHint.typeBackground",$,o.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),G=(0,n.x1)("editorInlayHint.parameterForeground",U,o.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Q=(0,n.x1)("editorInlayHint.parameterBackground",$,o.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),Y=(0,n.x1)("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},o.kg("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Z=((0,n.x1)("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},o.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),(0,n.x1)("editorLightBulbAi.foreground",Y,o.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),(0,n.x1)("editor.snippetTabstopHighlightBackground",{dark:new s.Q1(new s.bU(124,124,124,.3)),light:new s.Q1(new s.bU(10,50,100,.2)),hcDark:new s.Q1(new s.bU(124,124,124,.3)),hcLight:new s.Q1(new s.bU(10,50,100,.2))},o.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),(0,n.x1)("editor.snippetTabstopHighlightBorder",null,o.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBackground",null,o.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Q1(new s.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},o.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new s.Q1(new s.bU(155,185,85,.2))),X=new s.Q1(new s.bU(255,0,0,.2)),J=(0,n.x1)("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},o.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ee=(0,n.x1)("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},o.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),te=((0,n.x1)("diffEditor.insertedLineBackground",{dark:Z,light:Z,hcDark:null,hcLight:null},o.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditor.removedLineBackground",{dark:X,light:X,hcDark:null,hcLight:null},o.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditorGutter.insertedLineBackground",null,o.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),(0,n.x1)("diffEditorGutter.removedLineBackground",null,o.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),(0,n.x1)("diffEditorOverview.insertedForeground",null,o.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content."))),ie=(0,n.x1)("diffEditorOverview.removedForeground",null,o.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),ne=((0,n.x1)("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},o.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),(0,n.x1)("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},o.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),(0,n.x1)("diffEditor.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("diffEditorBorder","Border color between the two text editors.")),(0,n.x1)("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},o.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),(0,n.x1)("diffEditor.unchangedRegionBackground","sideBar.background",o.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedRegionForeground","foreground",o.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},o.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),(0,n.x1)("widget.shadow",{dark:(0,n.JO)(s.Q1.black,.36),light:(0,n.JO)(s.Q1.black,.16),hcDark:null,hcLight:null},o.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),oe=(0,n.x1)("widget.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),se=(0,n.x1)("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},o.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),re=((0,n.x1)("toolbar.hoverOutline",{dark:null,light:null,hcDark:d,hcLight:d},o.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),(0,n.x1)("toolbar.activeBackground",{dark:(0,n.a)(se,.1),light:(0,n.e$)(se,.1),hcDark:null,hcLight:null},o.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),(0,n.x1)("breadcrumb.foreground",(0,n.JO)(r,.8),o.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items."))),ae=(0,n.x1)("breadcrumb.background",b,o.kg("breadcrumbsBackground","Background color of breadcrumb items.")),le=(0,n.x1)("breadcrumb.focusForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},o.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),ce=(0,n.x1)("breadcrumb.activeSelectionForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},o.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),de=((0,n.x1)("breadcrumbPicker.background",w,o.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),.5),ue=s.Q1.fromHex("#40C8AE").transparent(de),he=s.Q1.fromHex("#40A6FF").transparent(de),ge=s.Q1.fromHex("#606060").transparent(.4),pe=.4,fe=1,me=(0,n.x1)("merge.currentHeaderBackground",{dark:ue,light:ue,hcDark:null,hcLight:null},o.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),_e=((0,n.x1)("merge.currentContentBackground",(0,n.JO)(me,pe),o.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.incomingHeaderBackground",{dark:he,light:he,hcDark:null,hcLight:null},o.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),ve=((0,n.x1)("merge.incomingContentBackground",(0,n.JO)(_e,pe),o.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.commonHeaderBackground",{dark:ge,light:ge,hcDark:null,hcLight:null},o.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),be=((0,n.x1)("merge.commonContentBackground",(0,n.JO)(ve,pe),o.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},o.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),ye=((0,n.x1)("editorOverviewRuler.currentContentForeground",{dark:(0,n.JO)(me,fe),light:(0,n.JO)(me,fe),hcDark:be,hcLight:be},o.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.incomingContentForeground",{dark:(0,n.JO)(_e,fe),light:(0,n.JO)(_e,fe),hcDark:be,hcLight:be},o.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.commonContentForeground",{dark:(0,n.JO)(ve,fe),light:(0,n.JO)(ve,fe),hcDark:be,hcLight:be},o.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},o.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),we=(0,n.x1)("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",o.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Ce=(0,n.x1)("problemsErrorIcon.foreground",k,o.kg("problemsErrorIconForeground","The color used for the problems error icon.")),Se=(0,n.x1)("problemsWarningIcon.foreground",L,o.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),ke=(0,n.x1)("problemsInfoIcon.foreground",I,o.kg("problemsInfoIconForeground","The color used for the problems info icon.")),xe=(0,n.x1)("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},o.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Ee=(0,n.x1)("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},o.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),Le=(0,n.x1)("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},o.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Te=(0,n.x1)("minimap.infoHighlight",{dark:I,light:I,hcDark:R,hcLight:R},o.kg("minimapInfo","Minimap marker color for infos.")),Ie=(0,n.x1)("minimap.warningHighlight",{dark:L,light:L,hcDark:T,hcLight:T},o.kg("overviewRuleWarning","Minimap marker color for warnings.")),Re=(0,n.x1)("minimap.errorHighlight",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},o.kg("minimapError","Minimap marker color for errors.")),De=(0,n.x1)("minimap.background",null,o.kg("minimapBackground","Minimap background color.")),Ne=(0,n.x1)("minimap.foregroundOpacity",s.Q1.fromHex("#000f"),o.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Ae=((0,n.x1)("minimapSlider.background",(0,n.JO)(f,.5),o.kg("minimapSliderBackground","Minimap slider background color.")),(0,n.x1)("minimapSlider.hoverBackground",(0,n.JO)(m,.5),o.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),(0,n.x1)("minimapSlider.activeBackground",(0,n.JO)(_,.5),o.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),(0,n.x1)("charts.foreground",r,o.kg("chartsForeground","The foreground color used in charts.")),(0,n.x1)("charts.lines",(0,n.JO)(r,.5),o.kg("chartsLines","The color used for horizontal lines in charts.")),(0,n.x1)("charts.red",k,o.kg("chartsRed","The red color used in chart visualizations.")),(0,n.x1)("charts.blue",I,o.kg("chartsBlue","The blue color used in chart visualizations.")),(0,n.x1)("charts.yellow",L,o.kg("chartsYellow","The yellow color used in chart visualizations.")),(0,n.x1)("charts.orange",xe,o.kg("chartsOrange","The orange color used in chart visualizations.")),(0,n.x1)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},o.kg("chartsGreen","The green color used in chart visualizations.")),(0,n.x1)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},o.kg("chartsPurple","The purple color used in chart visualizations.")),(0,n.x1)("input.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("inputBoxBackground","Input box background."))),Oe=(0,n.x1)("input.foreground",r,o.kg("inputBoxForeground","Input box foreground.")),Pe=(0,n.x1)("input.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("inputBoxBorder","Input box border.")),Me=(0,n.x1)("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:c,hcLight:c},o.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Fe=(0,n.x1)("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},o.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),Be=(0,n.x1)("inputOption.activeBackground",{dark:(0,n.JO)(l,.4),light:(0,n.JO)(l,.2),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},o.kg("inputOption.activeBackground","Background hover color of options in input fields.")),We=(0,n.x1)("inputOption.activeForeground",{dark:s.Q1.white,light:s.Q1.black,hcDark:r,hcLight:r},o.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),He=((0,n.x1)("input.placeholderForeground",{light:(0,n.JO)(r,.5),dark:(0,n.JO)(r,.5),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},o.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),(0,n.x1)("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("inputValidationInfoBackground","Input validation background color for information severity."))),Ve=(0,n.x1)("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:r},o.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),je=(0,n.x1)("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:c,hcLight:c},o.kg("inputValidationInfoBorder","Input validation border color for information severity.")),ze=(0,n.x1)("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),Ue=(0,n.x1)("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:r},o.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),$e=(0,n.x1)("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:c,hcLight:c},o.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),qe=(0,n.x1)("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("inputValidationErrorBackground","Input validation background color for error severity.")),Ke=(0,n.x1)("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:r},o.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),Ge=(0,n.x1)("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:c,hcLight:c},o.kg("inputValidationErrorBorder","Input validation border color for error severity.")),Qe=(0,n.x1)("dropdown.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("dropdownBackground","Dropdown background.")),Ye=(0,n.x1)("dropdown.listBackground",{dark:null,light:null,hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("dropdownListBackground","Dropdown list background.")),Ze=(0,n.x1)("dropdown.foreground",{dark:"#F0F0F0",light:r,hcDark:s.Q1.white,hcLight:r},o.kg("dropdownForeground","Dropdown foreground.")),Xe=(0,n.x1)("dropdown.border",{dark:Qe,light:"#CECECE",hcDark:c,hcLight:c},o.kg("dropdownBorder","Dropdown border.")),Je=(0,n.x1)("button.foreground",s.Q1.white,o.kg("buttonForeground","Button foreground color.")),et=(0,n.x1)("button.separator",(0,n.JO)(Je,.4),o.kg("buttonSeparator","Button separator color.")),tt=(0,n.x1)("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},o.kg("buttonBackground","Button background color.")),it=(0,n.x1)("button.hoverBackground",{dark:(0,n.a)(tt,.2),light:(0,n.e$)(tt,.2),hcDark:tt,hcLight:tt},o.kg("buttonHoverBackground","Button background color when hovering.")),nt=(0,n.x1)("button.border",c,o.kg("buttonBorder","Button border color.")),ot=(0,n.x1)("button.secondaryForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:s.Q1.white,hcLight:r},o.kg("buttonSecondaryForeground","Secondary button foreground color.")),st=(0,n.x1)("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Q1.white},o.kg("buttonSecondaryBackground","Secondary button background color.")),rt=(0,n.x1)("button.secondaryHoverBackground",{dark:(0,n.a)(st,.2),light:(0,n.e$)(st,.2),hcDark:null,hcLight:null},o.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),at=(0,n.x1)("radio.activeForeground",We,o.kg("radioActiveForeground","Foreground color of active radio option.")),lt=(0,n.x1)("radio.activeBackground",Be,o.kg("radioBackground","Background color of active radio option.")),ct=(0,n.x1)("radio.activeBorder",Me,o.kg("radioActiveBorder","Border color of the active radio option.")),dt=(0,n.x1)("radio.inactiveForeground",null,o.kg("radioInactiveForeground","Foreground color of inactive radio option.")),ut=(0,n.x1)("radio.inactiveBackground",null,o.kg("radioInactiveBackground","Background color of inactive radio option.")),ht=(0,n.x1)("radio.inactiveBorder",{light:(0,n.JO)(at,.2),dark:(0,n.JO)(at,.2),hcDark:(0,n.JO)(at,.4),hcLight:(0,n.JO)(at,.2)},o.kg("radioInactiveBorder","Border color of the inactive radio option.")),gt=(0,n.x1)("radio.inactiveHoverBackground",Fe,o.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),pt=(0,n.x1)("checkbox.background",Qe,o.kg("checkbox.background","Background color of checkbox widget.")),ft=((0,n.x1)("checkbox.selectBackground",w,o.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),(0,n.x1)("checkbox.foreground",Ze,o.kg("checkbox.foreground","Foreground color of checkbox widget."))),mt=(0,n.x1)("checkbox.border",Xe,o.kg("checkbox.border","Border color of checkbox widget.")),_t=((0,n.x1)("checkbox.selectBorder",a,o.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),(0,n.x1)("keybindingLabel.background",{dark:new s.Q1(new s.bU(128,128,128,.17)),light:new s.Q1(new s.bU(221,221,221,.4)),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},o.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut."))),vt=(0,n.x1)("keybindingLabel.foreground",{dark:s.Q1.fromHex("#CCCCCC"),light:s.Q1.fromHex("#555555"),hcDark:s.Q1.white,hcLight:r},o.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),bt=(0,n.x1)("keybindingLabel.border",{dark:new s.Q1(new s.bU(51,51,51,.6)),light:new s.Q1(new s.bU(204,204,204,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:c},o.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),yt=(0,n.x1)("keybindingLabel.bottomBorder",{dark:new s.Q1(new s.bU(68,68,68,.6)),light:new s.Q1(new s.bU(187,187,187,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:r},o.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),wt=(0,n.x1)("list.focusBackground",null,o.kg("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ct=(0,n.x1)("list.focusForeground",null,o.kg("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),St=(0,n.x1)("list.focusOutline",{dark:l,light:l,hcDark:d,hcLight:d},o.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),kt=(0,n.x1)("list.focusAndSelectionOutline",null,o.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),xt=(0,n.x1)("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},o.kg("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Et=(0,n.x1)("list.activeSelectionForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:null,hcLight:null},o.kg("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Lt=(0,n.x1)("list.activeSelectionIconForeground",null,o.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Tt=(0,n.x1)("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},o.kg("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),It=(0,n.x1)("list.inactiveSelectionForeground",null,o.kg("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Rt=(0,n.x1)("list.inactiveSelectionIconForeground",null,o.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Dt=(0,n.x1)("list.inactiveFocusBackground",null,o.kg("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Nt=(0,n.x1)("list.inactiveFocusOutline",null,o.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),At=(0,n.x1)("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Q1.white.transparent(.1),hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},o.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Ot=(0,n.x1)("list.hoverForeground",null,o.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Pt=(0,n.x1)("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},o.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),Mt=(0,n.x1)("list.dropBetweenBackground",{dark:a,light:a,hcDark:null,hcLight:null},o.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),Ft=(0,n.x1)("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:l,hcLight:l},o.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Bt=(0,n.x1)("list.focusHighlightForeground",{dark:Ft,light:(0,n.Hz)(xt,Ft,"#BBE7FF"),hcDark:Ft,hcLight:Ft},o.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),Wt=((0,n.x1)("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},o.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),(0,n.x1)("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},o.kg("listErrorForeground","Foreground color of list items containing errors.")),(0,n.x1)("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},o.kg("listWarningForeground","Foreground color of list items containing warnings.")),(0,n.x1)("listFilterWidget.background",{light:(0,n.e$)(w,0),dark:(0,n.a)(w,0),hcDark:w,hcLight:w},o.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees."))),Ht=(0,n.x1)("listFilterWidget.outline",{dark:s.Q1.transparent,light:s.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},o.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Vt=(0,n.x1)("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:c,hcLight:c},o.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),jt=(0,n.x1)("listFilterWidget.shadow",ne,o.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),zt=((0,n.x1)("list.filterMatchBackground",{dark:B,light:B,hcDark:null,hcLight:null},o.kg("listFilterMatchHighlight","Background color of the filtered match.")),(0,n.x1)("list.filterMatchBorder",{dark:H,light:H,hcDark:c,hcLight:d},o.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),(0,n.x1)("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},o.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),(0,n.x1)("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},o.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),Ut=(0,n.x1)("tree.inactiveIndentGuidesStroke",(0,n.JO)(zt,.4),o.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),$t=(0,n.x1)("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},o.kg("tableColumnsBorder","Table border color between columns.")),qt=(0,n.x1)("tree.tableOddRowsBackground",{dark:(0,n.JO)(r,.04),light:(0,n.JO)(r,.04),hcDark:null,hcLight:null},o.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),Kt=((0,n.x1)("editorActionList.background",w,o.kg("editorActionListBackground","Action List background color.")),(0,n.x1)("editorActionList.foreground",C,o.kg("editorActionListForeground","Action List foreground color.")),(0,n.x1)("editorActionList.focusForeground",Et,o.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),(0,n.x1)("editorActionList.focusBackground",xt,o.kg("editorActionListFocusBackground","Action List background color for the focused item.")),(0,n.x1)("menu.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("menuBorder","Border color of menus."))),Gt=(0,n.x1)("menu.foreground",Ze,o.kg("menuForeground","Foreground color of menu items.")),Qt=(0,n.x1)("menu.background",Qe,o.kg("menuBackground","Background color of menu items.")),Yt=(0,n.x1)("menu.selectionForeground",Et,o.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Zt=(0,n.x1)("menu.selectionBackground",xt,o.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),Xt=(0,n.x1)("menu.selectionBorder",{dark:null,light:null,hcDark:d,hcLight:d},o.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),Jt=(0,n.x1)("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:c,hcLight:c},o.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),ei=(0,n.x1)("quickInput.background",w,o.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),ti=(0,n.x1)("quickInput.foreground",C,o.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),ii=(0,n.x1)("quickInputTitle.background",{dark:new s.Q1(new s.bU(255,255,255,.105)),light:new s.Q1(new s.bU(0,0,0,.06)),hcDark:"#000000",hcLight:s.Q1.white},o.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),ni=(0,n.x1)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Q1.white,hcLight:"#0F4A85"},o.kg("pickerGroupForeground","Quick picker color for grouping labels.")),oi=(0,n.x1)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Q1.white,hcLight:"#0F4A85"},o.kg("pickerGroupBorder","Quick picker color for grouping borders.")),si=(0,n.x1)("quickInput.list.focusBackground",null,"",void 0,o.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),ri=(0,n.x1)("quickInputList.focusForeground",Et,o.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),ai=(0,n.x1)("quickInputList.focusIconForeground",Lt,o.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),li=(0,n.x1)("quickInputList.focusBackground",{dark:(0,n.yL)(si,xt),light:(0,n.yL)(si,xt),hcDark:null,hcLight:null},o.kg("quickInput.listFocusBackground","Quick picker background color for the focused item."));(0,n.x1)("search.resultsInfoForeground",{light:r,dark:(0,n.JO)(r,.65),hcDark:r,hcLight:r},o.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),(0,n.x1)("searchEditor.findMatchBackground",{light:(0,n.JO)(B,.66),dark:(0,n.JO)(B,.66),hcDark:B,hcLight:B},o.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),(0,n.x1)("searchEditor.findMatchBorder",{light:(0,n.JO)(H,.66),dark:(0,n.JO)(H,.66),hcDark:H,hcLight:H},o.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},75115:(e,t,i)=>{"use strict";i.d(t,{Bb:()=>d,Fd:()=>p,Gu:()=>u,HP:()=>h,Hz:()=>k,JO:()=>C,a:()=>w,e$:()=>y,oG:()=>x,x1:()=>v,yL:()=>S});var n=i(79109),o=i(9659),s=i(85476),r=i(40231),a=i(86223),l=i(16374),c=i(41337);function d(e){return`--vscode-${e.replace(/\./g,"-")}`}function u(e){return`var(${d(e)})`}function h(e,t){return`var(${d(e)}, ${t})`}function g(e){return null!==e&&"object"===typeof e&&"light"in e&&"dark"in e}const p={ColorContribution:"base.contributions.colors"},f="default";class m{constructor(){this._onDidChangeSchema=new r.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){const s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;const r={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),n&&(r.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",r.patternErrorMessage=c.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:i,oneOf:[r,{type:"string",const:f,description:c.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i?.defaults){const e=g(i.defaults)?i.defaults[t.type]:i.defaults;return E(e,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}}const _=new m;function v(e,t,i,n,o){return _.registerColor(e,t,i,n,o)}function b(e,t){switch(e.op){case 0:return E(e.value,t)?.darken(e.factor);case 1:return E(e.value,t)?.lighten(e.factor);case 2:return E(e.value,t)?.transparent(e.factor);case 3:{const i=E(e.background,t);return i?E(e.value,t)?.makeOpaque(i):E(e.value,t)}case 4:for(const i of e.values){const e=E(i,t);if(e)return e}return;case 6:return E(t.defines(e.if)?e.then:e.else,t);case 5:{const i=E(e.value,t);if(!i)return;const n=E(e.background,t);return n?i.isDarkerThan(n)?s.Q1.getLighterColor(i,n,e.factor).transparent(e.transparency):s.Q1.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw(0,n.xb)(e)}}function y(e,t){return{op:0,value:e,factor:t}}function w(e,t){return{op:1,value:e,factor:t}}function C(e,t){return{op:2,value:e,factor:t}}function S(...e){return{op:4,values:e}}function k(e,t,i){return{op:6,if:e,then:t,else:i}}function x(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function E(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?s.Q1.fromHex(e):t.getColor(e):e instanceof s.Q1?e:"object"===typeof e?b(e,t):void 0}l.O.add(p.ColorContribution,_);const L="vscode://schemas/workbench-colors",T=l.O.as(a.F.JSONContribution);T.registerSchema(L,_.getColorSchema());const I=new o.uC((()=>T.notifySchemaChanged(L)),200);_.onDidChangeSchema((()=>{I.isScheduled()||I.schedule()}))},48401:(e,t,i)=>{"use strict";i.d(t,{$_:()=>k,HT:()=>b,pU:()=>v});var n=i(9659),o=i(25923),s=i(79855),r=i(23740),a=i(40231),l=i(50322),c=i(29133),d=i(41337),u=i(86223),h=i(16374);const g={IconContribution:"base.contributions.icons"};var p,f;(function(e){function t(e,t){let i=e.defaults;while(r.L.isThemeIcon(i)){const e=_.getIcon(i.id);if(!e)return;i=e.defaults}return i}e.getDefinition=t})(p||(p={})),function(e){function t(e){return{weight:e.weight,style:e.style,src:e.src.map((e=>({format:e.format,location:e.location.toString()})))}}function i(e){const t=e=>(0,l.Kg)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>(0,l.Kg)(e.format)&&(0,l.Kg)(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:c.r.parse(e.location)})))}}e.toJSONObject=t,e.fromJSONObject=i}(f||(f={}));class m{constructor(){this._onDidChange=new a.vl,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,d.kg)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,d.kg)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${r.L.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}const s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{while(r.L.isThemeIcon(e.defaults))e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const o of n.filter((e=>!!e.description)).sort(e))i.push(`||${o.id}|${r.L.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!r.L.isThemeIcon(e.defaults))).sort(e))i.push(`||${o.id}|`);return i.join("\n")}}const _=new m;function v(e,t,i,n){return _.registerIcon(e,t,i,n)}function b(){return _}function y(){const e=(0,s.J)();for(const t in e){const i="\\"+e[t].toString(16);_.registerIcon(t,{fontCharacter:i})}}h.O.add(g.IconContribution,_),y();const w="vscode://schemas/icons",C=h.O.as(u.F.JSONContribution);C.registerSchema(w,_.getIconSchema());const S=new n.uC((()=>C.notifySchemaChanged(w)),200);_.onDidChange((()=>{S.isScheduled()||S.schedule()}));const k=v("widget-close",o.W.close,(0,d.kg)("widgetClose","Icon for the close action in widgets."));v("goto-previous-location",o.W.arrowUp,(0,d.kg)("previousChangeIcon","Icon for goto previous editor location.")),v("goto-next-location",o.W.arrowDown,(0,d.kg)("nextChangeIcon","Icon for goto next editor location.")),r.L.modify(o.W.sync,"spin"),r.L.modify(o.W.loading,"spin")},1474:(e,t,i)=>{"use strict";var n;function o(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function s(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{Bb:()=>o,HD:()=>s,zM:()=>n}),function(e){e["DARK"]="dark",e["LIGHT"]="light",e["HIGH_CONTRAST_DARK"]="hcDark",e["HIGH_CONTRAST_LIGHT"]="hcLight"}(n||(n={}))},15911:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>u,Gy:()=>l,Pz:()=>d,Yf:()=>c,lR:()=>f,zy:()=>p});var n=i(40231),o=i(5091),s=i(87778),r=i(16374),a=i(1474);const l=(0,s.u1)("themeService");function c(e){return{id:e}}function d(e){switch(e){case a.zM.DARK:return"vs-dark";case a.zM.HIGH_CONTRAST_DARK:return"hc-black";case a.zM.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const u={ThemingContribution:"base.contributions.theming"};class h{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new n.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}}const g=new h;function p(e){return g.onColorThemeChange(e)}r.O.add(u.ThemingContribution,g);class f extends o.jG{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},57642:(e,t,i)=>{"use strict";i.d(t,{$D:()=>o,I_:()=>r,To:()=>s,Ym:()=>a});var n=i(87778);const o=(0,n.u1)("undoRedoService");class s{constructor(e,t){this.resource=e,this.elements=t}}class r{static{this._ID=0}constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new r}}class a{static{this._ID=0}constructor(){this.id=a._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new a}}},81714:(e,t,i)=>{"use strict";i.d(t,{A7:()=>c,Q_:()=>h,VR:()=>a,cn:()=>m,ct:()=>_,jB:()=>l,kF:()=>f,mX:()=>p});var n=i(41337),o=i(52444),s=(i(71268),i(29133)),r=i(87778);const a=(0,r.u1)("contextService");function l(e){const t=e;return"string"===typeof t?.id&&s.r.isUri(t.uri)}function c(e){const t=e;return"string"===typeof t?.id&&!l(e)&&!g(e)}const d={id:"ext-dev"},u={id:"empty-window"};function h(e,t){if("string"===typeof e||"undefined"===typeof e)return"string"===typeof e?{id:(0,o.P8)(e)}:t?d:u;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}function g(e){const t=e;return"string"===typeof t?.id&&s.r.isUri(t.configPath)}class p{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const f="code-workspace",m=((0,n.kg)("codeWorkspace","Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");function _(e){return e.id===m}},17602:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(87778);const o=(0,n.u1)("workspaceTrustManagementService")},65242:(e,t,i)=>{"use strict";var n=i(37927);Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0;var o=n(i(94660)),s=n(i(49818)),r=function(){function e(){var t,i,n,s,r,a,l,c,d,u,h,g,p,f,m,_,v,b,y=this,w=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o["default"])(this,e),this.server=w.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(t=this.server.cacheSearchResultsForSeconds)&&void 0!==t?t:120,this.additionalSearchParameters=null!==(i=w.additionalSearchParameters)&&void 0!==i?i:{},this.additionalSearchParameters.query_by=null!==(n=null!==(s=this.additionalSearchParameters.queryBy)&&void 0!==s?s:this.additionalSearchParameters.query_by)&&void 0!==n?n:"",this.additionalSearchParameters.preset=null!==(r=null!==(a=this.additionalSearchParameters.preset)&&void 0!==a?a:this.additionalSearchParameters.preset)&&void 0!==r?r:"",this.additionalSearchParameters.sort_by=null!==(l=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==l?l:"",this.additionalSearchParameters.highlight_full_fields=null!==(d=null!==(u=this.additionalSearchParameters.highlightFullFields)&&void 0!==u?u:this.additionalSearchParameters.highlight_full_fields)&&void 0!==d?d:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(h=w.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(g=w.facetableFieldsWithSpecialCharacters)&&void 0!==g?g:[],this.collectionSpecificSearchParameters=null!==(p=w.collectionSpecificSearchParameters)&&void 0!==p?p:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(e){var t,i,n,o,s,r,a=y.collectionSpecificSearchParameters[e];a.query_by=null!==(t=a.queryBy)&&void 0!==t?t:a.query_by,a.preset=null!==(i=a.preset)&&void 0!==i?i:a.preset,a.sort_by=null!==(n=a.sortBy)&&void 0!==n?n:a.sort_by,a.highlight_full_fields=null!==(o=null!==(s=null!==(r=a.highlightFullFields)&&void 0!==r?r:a.highlight_full_fields)&&void 0!==s?s:y.additionalSearchParameters.highlight_full_fields)&&void 0!==o?o:a.query_by,Object.keys(a).forEach((function(e){return void 0===a[e]?delete a[e]:{}}))})),this.renderingContent=w.renderingContent,this.flattenGroupedHits=null===(f=w.flattenGroupedHits)||void 0===f||f,this.facetByOptions=null!==(m=w.facetByOptions)&&void 0!==m?m:{},this.filterByOptions=null!==(_=w.filterByOptions)&&void 0!==_?_:{},this.collectionSpecificFacetByOptions=null!==(v=w.collectionSpecificFacetByOptions)&&void 0!==v?v:{},this.collectionSpecificFilterByOptions=null!==(b=w.collectionSpecificFilterByOptions)&&void 0!==b?b:{}}return(0,s["default"])(e,[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(e){return e.queryBy})))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some((function(e){return 0===(e.query_by||"").length&&0===(e.preset||"").length}))))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}]),e}();t.Configuration=r},74789:(e,t,i)=>{"use strict";var n=i(37927);Object.defineProperty(t,"__esModule",{value:!0}),t.FacetSearchResponseAdapter=void 0;var o=n(i(94660)),s=n(i(49818)),r=i(13161),a=function(){function e(t,i){(0,o["default"])(this,e),this.typesenseResponse=t,this.instantsearchRequest=i}return(0,s["default"])(e,[{key:"_adaptFacetHits",value:function(e){var t=this,i={},n=e.find((function(e){return e.field_name===t.instantsearchRequest.params.facetName}));return i=n.counts.map((function(e){return{value:e.value,highlighted:t._adaptHighlightTag(e.highlighted,t.instantsearchRequest.params.highlightPreTag,t.instantsearchRequest.params.highlightPostTag),count:e.count}})),i}},{key:"adapt",value:function(){var e={facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms};return e}}]),e}();t.FacetSearchResponseAdapter=a,Object.assign(a.prototype,r.utils)},28094:(e,t,i)=>{"use strict";var n=i(37927);Object.defineProperty(t,"__esModule",{value:!0}),t.SearchRequestAdapter=void 0;var o=n(i(85917)),s=n(i(45254)),r=n(i(99550)),a=n(i(94660)),l=n(i(49818)),c=function(){function e(t,i,n){(0,a["default"])(this,e),this.instantsearchRequests=t,this.typesenseClient=i,this.configuration=n,this.additionalSearchParameters=n.additionalSearchParameters,this.collectionSpecificSearchParameters=n.collectionSpecificSearchParameters}return(0,l["default"])(e,[{key:"_shouldUseExactMatchForField",value:function(e,t){var i,n;return!1!==(null===(i=this.configuration.collectionSpecificFilterByOptions)||void 0===i||null===(i=i[t])||void 0===i||null===(i=i[e])||void 0===i?void 0:i.exactMatch)&&!1!==(null===(n=this.configuration.filterByOptions)||void 0===n||null===(n=n[e])||void 0===n?void 0:n.exactMatch)}},{key:"_adaptFacetFilters",value:function(e,t){var i=this,n="";if(!e)return n;var o=e.map((function(e){if(Array.isArray(e)){var n={};e.forEach((function(e){var t=i._parseFacetFilter(e),o=t.fieldName,s=t.fieldValue;n[o]=n[o]||[],n[o].push(s)})),Object.keys(n).length>1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(n).join(",")));var o=Object.keys(n)[0],s=n[o],a=s.reduce((function(e,t){return t.startsWith("-")&&!i._isNumber(t)?e[0].push(t.substring(1)):e[1].push(t),e}),[[],[]]),l=(0,r["default"])(a,2),c=l[0],d=l[1],u=[];if(d.length>0){var h=i._shouldUseExactMatchForField(o,t)?":=":":";u.push("".concat(o).concat(h,"[").concat(d.map((function(e){return i._escapeFacetValue(e)})).join(","),"]"))}if(c.length>0){var g=i._shouldUseExactMatchForField(o,t)?":!=":":!";u.push("".concat(o).concat(g,"[").concat(c.map((function(e){return i._escapeFacetValue(e)})).join(","),"]"))}var p=u.filter((function(e){return e})).join(" && ");return p}var f,m=i._parseFacetFilter(e),_=m.fieldName,v=m.fieldValue;if(v.startsWith("-")&&!i._isNumber(v)){var b=i._shouldUseExactMatchForField(_,t)?":!=":":!";f="".concat(_).concat(b,"[").concat(i._escapeFacetValue(v.substring(1)),"]")}else{var y=i._shouldUseExactMatchForField(_,t)?":=":":";f="".concat(_).concat(y,"[").concat(i._escapeFacetValue(v),"]")}return f}));return n=o.join(" && "),n}},{key:"_parseFacetFilter",value:function(e){var t,i,n,o,s;if((null===(t=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===t?void 0:t.length)>0){var r=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(i=new RegExp("^(".concat(r.join("|"),"):(.*)$")),n=e.match(i),null!=n)return o="".concat(n[1]),s="".concat(n[2]),{fieldName:o,fieldValue:s}}return i=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,n=e.match(i),null==n?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(e,"` with the Regex `").concat(i,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(o="".concat(n[1]).concat(n[2]),s="".concat(n[3])),{fieldName:o,fieldValue:s}}},{key:"_escapeFacetValue",value:function(e){return"boolean"===typeof e||"true"===e||"false"===e||this._isNumber(e)?e:"`".concat(e,"`")}},{key:"_isNumber",value:function(e){return Number.isInteger(e%1)||!!(e%1)}},{key:"_adaptNumericFilters",value:function(e){var t=this,i="";if(!e)return i;var n={};e.forEach((function(e){var i=t._parseNumericFilter(e),o=i.fieldName,s=i.operator,r=i.fieldValue;n[o]=n[o]||{},n[o][s]=r}));var o=[];return Object.keys(n).forEach((function(e){null!=n[e]["<="]&&null!=n[e][">="]?o.push("".concat(e,":=[").concat(n[e][">="],"..").concat(n[e]["<="],"]")):null!=n[e]["<="]?o.push("".concat(e,":<=").concat(n[e]["<="])):null!=n[e][">="]?o.push("".concat(e,":>=").concat(n[e][">="])):null!=n[e]["="]?o.push("".concat(e,":=").concat(n[e]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(n[e])))})),i=o.join(" && "),i}},{key:"_parseNumericFilter",value:function(e){var t,i,n,o,s,a;if((null===(t=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===t?void 0:t.length)>0){var l=this.configuration.facetableFieldsWithSpecialCharacters.map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(i=new RegExp("^(".concat(l.join("|"),")(<=|>=|>|<|=)(.*)$")),n=e.match(i),null!=n){var c=n,d=(0,r["default"])(c,4);return o=d[1],s=d[2],a=d[3],{fieldName:o,operator:s,fieldValue:a}}}if(i=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,n=e.match(i),null==n)console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(e,"` with the Regex `").concat(i,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var u=n,h=(0,r["default"])(u,4);o=h[1],s=h[2],a=h[3]}return{fieldName:o,operator:s,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(e){var t=e.insideBoundingBox,i=e.aroundRadius,n=e.aroundLatLng,o=e.insidePolygon;if(t){var s,a,l,c;if(Array.isArray(t)){var d=t.flat(),u=(0,r["default"])(d,4);s=u[0],a=u[1],l=u[2],c=u[3]}else{var h=t.split(","),g=(0,r["default"])(h,4);s=g[0],a=g[1],l=g[2],c=g[3]}return"".concat(this.configuration.geoLocationField,":(").concat(s,", ").concat(a,", ").concat(s,", ").concat(c,", ").concat(l,", ").concat(c,", ").concat(l,", ").concat(a,")")}if(n||i){if(!i||"all"===i)throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var p="".concat(parseFloat(i)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(n,", ").concat(p,")")}if(o){var f=o;return Array.isArray(o)&&(f=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(f,")")}}},{key:"_adaptFilters",value:function(e,t){var i=[];return e.filters&&i.push(e.filters),i.push(this._adaptFacetFilters(e.facetFilters,t)),i.push(this._adaptNumericFilters(e.numericFilters)),i.push(this._adaptGeoFilter(e)),i.filter((function(e){return e&&""!==e})).join(" && ")}},{key:"_adaptIndexName",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(e,t){var i=this;return[e].flat().map((function(e){var n;return null!==(n=i.configuration.collectionSpecificFacetByOptions)&&void 0!==n&&null!==(n=n[t])&&void 0!==n&&n[e]?"".concat(e).concat(i.configuration.collectionSpecificFacetByOptions[t][e]):i.configuration.facetByOptions[e]?"".concat(e).concat(i.configuration.facetByOptions[e]):e})).join(",")}},{key:"_buildSearchParameters",value:function(e){for(var t=e.params,i=e.indexName,n=this._adaptIndexName(i),o={},s=0,a=Object.entries(this.additionalSearchParameters);s=|>|<|=)(.*)")}}]),e}();t.SearchRequestAdapter=c},45010:(e,t,i)=>{"use strict";var n=i(37927);Object.defineProperty(t,"__esModule",{value:!0}),t.SearchResponseAdapter=void 0;var o=n(i(63053)),s=n(i(99550)),r=n(i(8445)),a=n(i(91134)),l=n(i(94660)),c=n(i(49818)),d=i(13161);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function h(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:[];(0,l["default"])(this,e),this.typesenseResponse=t,this.instantsearchRequest=i,this.configuration=n,this.allTypesenseResponses=o}return(0,c["default"])(e,[{key:"_adaptGroupedHits",value:function(e){var t=this,i=[];return i=e.map((function(e){var i=t._adaptHits(e.hits);return i.forEach((function(t){t["group_key"]=t["_group_key"]=e.group_key,e.found&&(t["_group_found"]=e.found)})),i})),i=this.configuration.flattenGroupedHits?i.flat():i.map((function(e){return h(h({},e[0]),{},{_grouped_hits:e})})),i}},{key:"_adaptHits",value:function(e){var t=this,i=[];return i=e.map((function(e){var i=h({},e.document);i.objectID=e.document.id,i._snippetResult=t._adaptHighlightResult(e,"snippet"),i._highlightResult=t._adaptHighlightResult(e,"value"),i._rawTypesenseHit=e,["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(t){Object.keys(e).includes(t)&&!Object.keys(i).includes(t)&&(i[t]=e[t])}));var n=i[t.configuration.geoLocationField];return n&&(i._geoloc={lat:n[0],lng:n[1]}),i})),i}},{key:"_adaptHighlightResult",value:function(e,t){var i={};return null!=e.highlight&&this.isHighlightPost0240RCN32Format(e.highlight)?this.adaptHighlightObject(e,i,t):this.adaptHighlightsArray(e,i,t),i}},{key:"isHighlightPost0240RCN32Format",value:function(e){return null==e.full&&null==e.snippet}},{key:"adaptHighlightsArray",value:function(e,t,i){var n=this;Object.assign.apply(Object,[t].concat((0,r["default"])(Object.entries(e.document).map((function(e){var t=(0,s["default"])(e,2),i=t[0],n=t[1];return(0,a["default"])({},i,{value:n,matchLevel:"none",matchedWords:[]})}))))),e.highlights.forEach((function(e){t[e.field]={value:e[i]||e["".concat(i,"s")],matchLevel:"full",matchedWords:e.matched_tokens},e.indices&&(t[e.field]["matchedIndices"]=e.indices)})),Object.entries(t).forEach((function(r){var a=(0,s["default"])(r,2),l=a[0],c=a[1],d=l,u=c.value,h=c.matchLevel,g=c.matchedWords,p=c.matchedIndices;null==u?t[d]=n._adaptHighlightNullValue():Array.isArray(u)?(t[d]=[],e.document[d].forEach((function(e,s){p&&p.includes(s)?t[d].push({value:n._adaptHighlightTag("".concat(u[p.indexOf(s)]),n.instantsearchRequest.params.highlightPreTag,n.instantsearchRequest.params.highlightPostTag),matchLevel:h,matchedWords:g[s]}):"object"===(0,o["default"])(e)?t[d].push(n._adaptHighlightInObjectValue(e,{},i)):t[d].push({value:"".concat(e),matchLevel:"none",matchedWords:[]})}))):"object"===(0,o["default"])(u)?t[d]=n._adaptHighlightInObjectValue(u,{},i):t[d].value=n._adaptHighlightTag("".concat(u),n.instantsearchRequest.params.highlightPreTag,n.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(e,t,i){Object.assign(t,this._adaptHighlightInObjectValue(e.document,e.highlight,i))}},{key:"_adaptHighlightInObjectValue",value:function(e,t,i){var n=this;return Object.assign.apply(Object,[{}].concat((0,r["default"])(Object.entries(e).map((function(e){var r,l=(0,s["default"])(e,2),c=l[0],d=l[1];if(null==d)r=n._adaptHighlightNullValue();else if(Array.isArray(d)){var u;r=n._adaptHighlightInArrayValue(d,null!==(u=null===t||void 0===t?void 0:t[c])&&void 0!==u?u:[],i)}else if("object"===(0,o["default"])(d)){var h;r=n._adaptHighlightInObjectValue(d,null!==(h=null===t||void 0===t?void 0:t[c])&&void 0!==h?h:{},i)}else r=n._adaptHighlightInPrimitiveValue(d,null===t||void 0===t?void 0:t[c],i);return(0,a["default"])({},c,r)})))))}},{key:"_adaptHighlightInArrayValue",value:function(e,t,i){var n=this;return e.map((function(e,s){var r;if(null==e)r=n._adaptHighlightNullValue();else if(Array.isArray(e)){var a;r=n._adaptHighlightInArrayValue(e,null!==(a=null===t||void 0===t?void 0:t[s])&&void 0!==a?a:[],i)}else if("object"===(0,o["default"])(e)){var l;r=n._adaptHighlightInObjectValue(e,null!==(l=null===t||void 0===t?void 0:t[s])&&void 0!==l?l:{},i)}else r=n._adaptHighlightInPrimitiveValue(e,null===t||void 0===t?void 0:t[s],i);return r}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(e,t,i){var n,o;return null!=t?{value:this._adaptHighlightTag("".concat(null!==(n=null!==(o=t[i])&&void 0!==o?o:t["highlight"])&&void 0!==n?n:t["snippet"]),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(t.matched_tokens||[]).length>0?"full":"none",matchedWords:t.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(e),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(e){var t={};return e.forEach((function(e){Object.assign(t,(0,a["default"])({},e.field_name,Object.assign.apply(Object,[{}].concat((0,r["default"])(e.counts.map((function(e){return(0,a["default"])({},e.value,e.count)})))))))})),t}},{key:"_adaptFacetStats",value:function(e){var t={};return e.forEach((function(e){Object.keys(e.stats).length>0&&Object.assign(t,(0,a["default"])({},e.field_name,e.stats))})),t}},{key:"_adaptRenderingContent",value:function(e){var t,i=Object.assign({},this.configuration.renderingContent);return null==(null===(t=i.facetOrdering)||void 0===t||null===(t=t.facets)||void 0===t?void 0:t.order)&&(i.facetOrdering=i.facetOrdering||{},i.facetOrdering.facets=i.facetOrdering.facets||{},i.facetOrdering.facets.order=(0,r["default"])(new Set(e.map((function(e){return e["field_name"]})).concat(this.allTypesenseResponses.map((function(e){return e.facet_counts||[]})).flat().map((function(e){return e["field_name"]})).filter((function(e){return e})))))),i}},{key:"adapt",value:function(){var e=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),t=h({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(e).length>0?{renderingContent:e}:null);return t}}]),e}();t.SearchResponseAdapter=g,Object.assign(g.prototype,d.utils)},5286:(e,t,i)=>{"use strict";var n=i(37927);t.A=void 0;var o=n(i(85917)),s=n(i(45254)),r=n(i(94660)),a=n(i(49818)),l=i(65242),c=i(86520),d=i(28094),u=i(45010),h=i(74789),g=function(){function e(t){var i=this;(0,r["default"])(this,e),this.updateConfiguration(t),this.searchClient={clearCache:function(){return i.clearCache()},search:function(e){return i.searchTypesenseAndAdapt(e)},searchForFacetValues:function(e){return i.searchTypesenseForFacetValuesAndAdapt(e)}}}return(0,a["default"])(e,[{key:"searchTypesenseAndAdapt",value:function(){var e=(0,s["default"])(o["default"].mark((function e(t){var i,n,s=this;return o["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return i=e.sent,n=i.results.map((function(e,n){s._validateTypesenseResult(e);var o=new u.SearchResponseAdapter(e,t[n],s.configuration,i.results);return o.adapt()})),e.abrupt("return",{results:n});case 8:throw e.prev=8,e.t0=e["catch"](0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"searchTypesenseForFacetValuesAndAdapt",value:function(){var e=(0,s["default"])(o["default"].mark((function e(t){var i,n,s=this;return o["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return i=e.sent,n=i.results.map((function(e,i){s._validateTypesenseResult(e);var n=new h.FacetSearchResponseAdapter(e,t[i],s.configuration);return n.adapt()})),e.abrupt("return",n);case 8:throw e.prev=8,e.t0=e["catch"](0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_adaptAndPerformTypesenseRequest",value:function(){var e=(0,s["default"])(o["default"].mark((function e(t){var i,n;return o["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=new d.SearchRequestAdapter(t,this.typesenseClient,this.configuration),e.next=3,i.request();case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"clearCache",value:function(){return this.typesenseClient=new c.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(e){return this.configuration=new l.Configuration(e),this.configuration.validate(),this.typesenseClient=new c.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(e){if(e.error)throw new Error("".concat(e.code," - ").concat(e.error));if(!e.hits&&!e.grouped_hits)throw new Error("Did not find any hits. ".concat(e.code," - ").concat(e.error))}}]),e}();t.A=g},13161:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utils=void 0;var i={_adaptHighlightTag:function(e,t,i){return e.replace(new RegExp("","g"),t||"").replace(new RegExp("","g"),i||"")},_adaptNumberOfPages:function(){var e=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(e)?Math.ceil(e):1}};t.utils=i},86520:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return o(t,e),t},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Errors=t.SearchClient=t.Client=void 0;var a=r(i(49560));t.Client=a.default;var l=r(i(65564));t.SearchClient=l.default;var c=s(i(61967));t.Errors=c,t["default"]={Client:a.default,SearchClient:l.default,Errors:c}},88575:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0},transformResponse:[function(e,t){var i=e;return void 0!==t&&"string"===typeof e&&t["content-type"]&&t["content-type"].startsWith("application/json")&&(i=JSON.parse(e)),i}]},!0!==C&&(b.timeout=1e3*g.connectionTimeoutSeconds),h&&0!==Object.keys(h).length&&(b.params=h),g.sendApiKeyAsQueryParam&&(b.params=b.params||{},b.params["x-typesense-api-key"]=g.apiKey),g.configuration.httpAgent&&(g.logger.debug("Request #".concat(i,": Using custom httpAgent")),b.httpAgent=g.configuration.httpAgent),g.configuration.httpsAgent&&(g.logger.debug("Request #".concat(i,": Using custom httpsAgent")),b.httpsAgent=g.configuration.httpsAgent),p&&("string"===typeof p&&0!==p.length||"object"===typeof p&&0!==Object.keys(p).length)&&(b.data=p),v&&(w=r.default.CancelToken,S=w.source(),_=function(){return S.cancel()},v.addEventListener("abort",_),b.cancelToken=S.token),[4,(0,r.default)(b)];case 2:if(k=o.sent(),k.status>=1&&k.status<=499&&g.setNodeHealthcheck(f,d),g.logger.debug("Request #".concat(i,": Request to Node ").concat(f.index," was made. Response Code was ").concat(k.status,".")),k.status>=200&&k.status<300)return[2,{value:Promise.resolve(k.data)}];if(k.status<500)return[2,{value:Promise.reject(g.customErrorForResponse(k,null===(s=k.data)||void 0===s?void 0:s.message))}];throw g.customErrorForResponse(k,null===(a=k.data)||void 0===a?void 0:a.message);case 3:return x=o.sent(),g.setNodeHealthcheck(f,u),n=x,g.logger.warn("Request #".concat(i,": Request to Node ").concat(f.index,' failed due to "').concat(x.code," ").concat(x.message).concat(null==x.response?"":" - "+JSON.stringify(null===(l=x.response)||void 0===l?void 0:l.data),'"')),g.logger.warn("Request #".concat(i,": Sleeping for ").concat(g.retryIntervalSeconds,"s and then retrying request...")),[4,g.timer(g.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return v&&_&&v.removeEventListener("abort",_),[7];case 6:return[2]}}))},g=this,f=1,b.label=1;case 1:return f<=this.numRetriesPerRequest+1?[5,c(f)]:[3,4];case 2:if(_=b.sent(),"object"===typeof _)return[2,_.value];b.label=3;case 3:return f++,[3,1];case 4:return this.logger.debug("Request #".concat(i,": No retries left. Raising last error")),[2,Promise.reject(n)]}}))}))},e.prototype.getNextNode=function(e){if(void 0===e&&(e=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(e,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(e,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(e,": Nodes Health: ").concat(this.nodes.map((function(e){return"Node ".concat(e.index," is ").concat(!0===e.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var t=this.nodes[0],i=0;i<=this.nodes.length;i++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,t=this.nodes[this.currentNodeIndex],!0===t.isHealthy||this.nodeDueForHealthcheck(t,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(t.index)),t;return this.logger.debug("Request #".concat(e,": No healthy nodes were found. Returning the next node, Node ").concat(t.index)),t},e.prototype.nodeDueForHealthcheck=function(e,t){void 0===t&&(t=0);var i=Date.now()-e.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return i&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),i},e.prototype.initializeMetadataForNodes=function(){var e=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,d)),this.nodes.forEach((function(t,i){t.index=i,e.setNodeHealthcheck(t,d)}))},e.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},e.prototype.uriFor=function(e,t){return null!=t.url?"".concat(t.url).concat(e):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path).concat(e)},e.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e[c]=this.apiKey),e["Content-Type"]="application/json",e},e.prototype.timer=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,new Promise((function(t){return setTimeout(t,1e3*e)}))]}))}))},e.prototype.customErrorForResponse=function(e,t){var i="Request failed with HTTP code ".concat(e.status);"string"===typeof t&&""!==t.trim()&&(i+=" | Server said: ".concat(t));var n=new l.default(i);return n=400===e.status?new a.RequestMalformed(i):401===e.status?new a.RequestUnauthorized(i):404===e.status?new a.ObjectNotFound(i):409===e.status?new a.ObjectAlreadyExists(i):422===e.status?new a.ObjectUnprocessable(i):e.status>=500&&e.status<=599?new a.ServerError(i):new a.HTTPError(i),n.httpStatus=e.status,n},e}();t["default"]=h},49560:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(17569)),s=n(i(69195)),r=n(i(26698)),a=n(i(2895)),l=n(i(76995)),c=n(i(88575)),d=n(i(20503)),u=n(i(99336)),h=n(i(94960)),g=n(i(78818)),p=n(i(70461)),f=n(i(33653)),m=n(i(19710)),_=n(i(64295)),v=n(i(22584)),b=n(i(68211)),y=n(i(27510)),w=n(i(55731)),C=n(i(19087)),S=n(i(53200)),k=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null!==(t=e.sendApiKeyAsQueryParam)&&void 0!==t&&t,this.configuration=new o.default(e),this.apiCall=new s.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new g.default(this.apiCall),this.health=new p.default(this.apiCall),this.operations=new f.default(this.apiCall),this.multiSearch=new m.default(this.apiCall,this.configuration),this._collections=new r.default(this.apiCall),this.individualCollections={},this._aliases=new l.default(this.apiCall),this.individualAliases={},this._keys=new d.default(this.apiCall),this.individualKeys={},this._presets=new _.default(this.apiCall),this.individualPresets={},this._stopwords=new y.default(this.apiCall),this.individualStopwords={},this.analytics=new b.default(this.apiCall),this._conversations=new C.default(this.apiCall),this.individualConversations={}}return e.prototype.collections=function(e){return void 0===e?this._collections:(void 0===this.individualCollections[e]&&(this.individualCollections[e]=new a.default(e,this.apiCall,this.configuration)),this.individualCollections[e])},e.prototype.aliases=function(e){return void 0===e?this._aliases:(void 0===this.individualAliases[e]&&(this.individualAliases[e]=new c.default(e,this.apiCall)),this.individualAliases[e])},e.prototype.keys=function(e){return void 0===e?this._keys:(void 0===this.individualKeys[e]&&(this.individualKeys[e]=new u.default(e,this.apiCall)),this.individualKeys[e])},e.prototype.presets=function(e){return void 0===e?this._presets:(void 0===this.individualPresets[e]&&(this.individualPresets[e]=new v.default(e,this.apiCall)),this.individualPresets[e])},e.prototype.stopwords=function(e){return void 0===e?this._stopwords:(void 0===this.individualStopwords[e]&&(this.individualStopwords[e]=new w.default(e,this.apiCall)),this.individualStopwords[e])},e.prototype.conversations=function(e){return void 0===e?this._conversations:(void 0===this.individualConversations[e]&&(this.individualConversations[e]=new S.default(e,this.apiCall)),this.individualConversations[e])},e}();t["default"]=k},2895:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0;i--){var n=Math.floor(Math.random()*(i+1));t=[e[n],e[i]],e[i]=t[0],e[n]=t[1]}},e}();t["default"]=c},53200:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)throw new r.ImportError("".concat(o.length-a.length," documents imported successfully, ").concat(a.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,n]}}))}))},t.prototype.export=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e)]}))}))},t.prototype.exportStream=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e,{responseType:"stream"})]}))}))},t}(a.SearchOnlyDocuments);t["default"]=l},81789:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},26670:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(t,i){var n=e.call(this,t)||this;return n.importResults=i,n}return n(t,e),t}(s.default);t["default"]=r},49447:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},96190:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},8703:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},64338:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},32577:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},89424:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},54164:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},56675:function(e,t){"use strict";var i=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){var i=this.constructor,n=e.call(this,t)||this;return n.name=i.name,Object.setPrototypeOf(n,i.prototype),n}return i(t,e),t}(Error);t["default"]=n},61967:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportError=t.TypesenseError=t.ServerError=t.RequestUnauthorized=t.RequestMalformed=t.ObjectUnprocessable=t.ObjectNotFound=t.ObjectAlreadyExists=t.MissingConfigurationError=t.HTTPError=void 0;var o=n(i(81789));t.HTTPError=o.default;var s=n(i(49447));t.MissingConfigurationError=s.default;var r=n(i(96190));t.ObjectAlreadyExists=r.default;var a=n(i(8703));t.ObjectNotFound=a.default;var l=n(i(64338));t.ObjectUnprocessable=l.default;var c=n(i(32577));t.RequestMalformed=c.default;var d=n(i(89424));t.RequestUnauthorized=d.default;var u=n(i(54164));t.ServerError=u.default;var h=n(i(26670));t.ImportError=h.default;var g=n(i(56675));t.TypesenseError=g.default},70461:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]u,y&&(C=this.responseCache.keys().next().value,this.responseCache.delete(C)),w=this.responsePromiseCache.size>u,w&&(C=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(C)),[2,b]}}))}))},e}();t["default"]=a},65564:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(17569)),s=n(i(69195)),r=n(i(19710)),a=i(85394),l=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null===(t=e.sendApiKeyAsQueryParam)||void 0===t||t,!0===e.sendApiKeyAsQueryParam&&(e.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),e.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(e),this.apiCall=new s.default(this.configuration),this.multiSearch=new r.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return e.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(e){e[0];var t=e[1];t.documents().clearCache()}))},e.prototype.collections=function(e){if(e)return void 0===this.individualCollections[e]&&(this.individualCollections[e]=new a.SearchOnlyCollection(e,this.apiCall,this.configuration)),this.individualCollections[e];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},e}();t["default"]=l},85394:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOnlyCollection=void 0;var n=i(51491),o=function(){function e(e,t,i){this.name=e,this.apiCall=t,this.configuration=i,this._documents=new n.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return e.prototype.documents=function(){return this._documents},e}();t.SearchOnlyCollection=o},51491:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0},transformResponse:[function(e,t){var i=e;return void 0!==t&&"string"===typeof e&&t["content-type"]&&t["content-type"].startsWith("application/json")&&(i=JSON.parse(e)),i}]},!0!==C&&(b.timeout=1e3*g.connectionTimeoutSeconds),h&&0!==Object.keys(h).length&&(b.params=h),g.sendApiKeyAsQueryParam&&(b.params=b.params||{},b.params["x-typesense-api-key"]=g.apiKey),g.configuration.httpAgent&&(g.logger.debug("Request #".concat(i,": Using custom httpAgent")),b.httpAgent=g.configuration.httpAgent),g.configuration.httpsAgent&&(g.logger.debug("Request #".concat(i,": Using custom httpsAgent")),b.httpsAgent=g.configuration.httpsAgent),p&&("string"===typeof p&&0!==p.length||"object"===typeof p&&0!==Object.keys(p).length)&&(b.data=p),v&&(w=r.default.CancelToken,S=w.source(),_=function(){return S.cancel()},v.addEventListener("abort",_),b.cancelToken=S.token),[4,(0,r.default)(b)];case 2:if(k=o.sent(),k.status>=1&&k.status<=499&&g.setNodeHealthcheck(f,d),g.logger.debug("Request #".concat(i,": Request to Node ").concat(f.index," was made. Response Code was ").concat(k.status,".")),k.status>=200&&k.status<300)return[2,{value:Promise.resolve(k.data)}];if(k.status<500)return[2,{value:Promise.reject(g.customErrorForResponse(k,null===(s=k.data)||void 0===s?void 0:s.message))}];throw g.customErrorForResponse(k,null===(a=k.data)||void 0===a?void 0:a.message);case 3:return x=o.sent(),g.setNodeHealthcheck(f,u),n=x,g.logger.warn("Request #".concat(i,": Request to Node ").concat(f.index,' failed due to "').concat(x.code," ").concat(x.message).concat(null==x.response?"":" - "+JSON.stringify(null===(l=x.response)||void 0===l?void 0:l.data),'"')),g.logger.warn("Request #".concat(i,": Sleeping for ").concat(g.retryIntervalSeconds,"s and then retrying request...")),[4,g.timer(g.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return v&&_&&v.removeEventListener("abort",_),[7];case 6:return[2]}}))},g=this,f=1,b.label=1;case 1:return f<=this.numRetriesPerRequest+1?[5,c(f)]:[3,4];case 2:if(_=b.sent(),"object"===typeof _)return[2,_.value];b.label=3;case 3:return f++,[3,1];case 4:return this.logger.debug("Request #".concat(i,": No retries left. Raising last error")),[2,Promise.reject(n)]}}))}))},e.prototype.getNextNode=function(e){if(void 0===e&&(e=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(e,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(e,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(e,": Nodes Health: ").concat(this.nodes.map((function(e){return"Node ".concat(e.index," is ").concat(!0===e.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var t=this.nodes[0],i=0;i<=this.nodes.length;i++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,t=this.nodes[this.currentNodeIndex],!0===t.isHealthy||this.nodeDueForHealthcheck(t,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(t.index)),t;return this.logger.debug("Request #".concat(e,": No healthy nodes were found. Returning the next node, Node ").concat(t.index)),t},e.prototype.nodeDueForHealthcheck=function(e,t){void 0===t&&(t=0);var i=Date.now()-e.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return i&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),i},e.prototype.initializeMetadataForNodes=function(){var e=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,d)),this.nodes.forEach((function(t,i){t.index=i,e.setNodeHealthcheck(t,d)}))},e.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},e.prototype.uriFor=function(e,t){return null!=t.url?"".concat(t.url).concat(e):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path).concat(e)},e.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e[c]=this.apiKey),e["Content-Type"]="application/json",e},e.prototype.timer=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,new Promise((function(t){return setTimeout(t,1e3*e)}))]}))}))},e.prototype.customErrorForResponse=function(e,t){var i="Request failed with HTTP code ".concat(e.status);"string"===typeof t&&""!==t.trim()&&(i+=" | Server said: ".concat(t));var n=new l.default(i);return n=400===e.status?new a.RequestMalformed(i):401===e.status?new a.RequestUnauthorized(i):404===e.status?new a.ObjectNotFound(i):409===e.status?new a.ObjectAlreadyExists(i):422===e.status?new a.ObjectUnprocessable(i):e.status>=500&&e.status<=599?new a.ServerError(i):new a.HTTPError(i),n.httpStatus=e.status,n},e}();t["default"]=h},13260:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(11485)),s=n(i(75031)),r=n(i(70750)),a=n(i(75179)),l=n(i(56463)),c=n(i(76051)),d=n(i(83667)),u=n(i(60860)),h=n(i(63164)),g=n(i(46310)),p=n(i(79449)),f=n(i(74337)),m=n(i(38034)),_=n(i(31835)),v=n(i(50388)),b=n(i(42087)),y=n(i(58810)),w=n(i(83231)),C=n(i(14787)),S=n(i(4076)),k=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null!==(t=e.sendApiKeyAsQueryParam)&&void 0!==t&&t,this.configuration=new o.default(e),this.apiCall=new s.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new g.default(this.apiCall),this.health=new p.default(this.apiCall),this.operations=new f.default(this.apiCall),this.multiSearch=new m.default(this.apiCall,this.configuration),this._collections=new r.default(this.apiCall),this.individualCollections={},this._aliases=new l.default(this.apiCall),this.individualAliases={},this._keys=new d.default(this.apiCall),this.individualKeys={},this._presets=new _.default(this.apiCall),this.individualPresets={},this._stopwords=new y.default(this.apiCall),this.individualStopwords={},this.analytics=new b.default(this.apiCall),this._conversations=new C.default(this.apiCall),this.individualConversations={}}return e.prototype.collections=function(e){return void 0===e?this._collections:(void 0===this.individualCollections[e]&&(this.individualCollections[e]=new a.default(e,this.apiCall,this.configuration)),this.individualCollections[e])},e.prototype.aliases=function(e){return void 0===e?this._aliases:(void 0===this.individualAliases[e]&&(this.individualAliases[e]=new c.default(e,this.apiCall)),this.individualAliases[e])},e.prototype.keys=function(e){return void 0===e?this._keys:(void 0===this.individualKeys[e]&&(this.individualKeys[e]=new u.default(e,this.apiCall)),this.individualKeys[e])},e.prototype.presets=function(e){return void 0===e?this._presets:(void 0===this.individualPresets[e]&&(this.individualPresets[e]=new v.default(e,this.apiCall)),this.individualPresets[e])},e.prototype.stopwords=function(e){return void 0===e?this._stopwords:(void 0===this.individualStopwords[e]&&(this.individualStopwords[e]=new w.default(e,this.apiCall)),this.individualStopwords[e])},e.prototype.conversations=function(e){return void 0===e?this._conversations:(void 0===this.individualConversations[e]&&(this.individualConversations[e]=new S.default(e,this.apiCall)),this.individualConversations[e])},e}();t["default"]=k},75179:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0;i--){var n=Math.floor(Math.random()*(i+1));t=[e[n],e[i]],e[i]=t[0],e[n]=t[1]}},e}();t["default"]=c},4076:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)throw new r.ImportError("".concat(o.length-a.length," documents imported successfully, ").concat(a.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,n]}}))}))},t.prototype.export=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e)]}))}))},t.prototype.exportStream=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e,{responseType:"stream"})]}))}))},t}(a.SearchOnlyDocuments);t["default"]=l},63497:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},49298:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(t,i){var n=e.call(this,t)||this;return n.importResults=i,n}return n(t,e),t}(s.default);t["default"]=r},70875:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},72106:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},91051:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},86886:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},66301:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},50884:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},15016:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},80351:function(e,t){"use strict";var i=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){var i=this.constructor,n=e.call(this,t)||this;return n.name=i.name,Object.setPrototypeOf(n,i.prototype),n}return i(t,e),t}(Error);t["default"]=n},90755:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportError=t.TypesenseError=t.ServerError=t.RequestUnauthorized=t.RequestMalformed=t.ObjectUnprocessable=t.ObjectNotFound=t.ObjectAlreadyExists=t.MissingConfigurationError=t.HTTPError=void 0;var o=n(i(63497));t.HTTPError=o.default;var s=n(i(70875));t.MissingConfigurationError=s.default;var r=n(i(72106));t.ObjectAlreadyExists=r.default;var a=n(i(91051));t.ObjectNotFound=a.default;var l=n(i(86886));t.ObjectUnprocessable=l.default;var c=n(i(66301));t.RequestMalformed=c.default;var d=n(i(50884));t.RequestUnauthorized=d.default;var u=n(i(15016));t.ServerError=u.default;var h=n(i(49298));t.ImportError=h.default;var g=n(i(80351));t.TypesenseError=g.default},79449:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]u,y&&(C=this.responseCache.keys().next().value,this.responseCache.delete(C)),w=this.responsePromiseCache.size>u,w&&(C=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(C)),[2,b]}}))}))},e}();t["default"]=a},32712:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(11485)),s=n(i(75031)),r=n(i(38034)),a=i(82465),l=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null===(t=e.sendApiKeyAsQueryParam)||void 0===t||t,!0===e.sendApiKeyAsQueryParam&&(e.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),e.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(e),this.apiCall=new s.default(this.configuration),this.multiSearch=new r.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return e.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(e){e[0];var t=e[1];t.documents().clearCache()}))},e.prototype.collections=function(e){if(e)return void 0===this.individualCollections[e]&&(this.individualCollections[e]=new a.SearchOnlyCollection(e,this.apiCall,this.configuration)),this.individualCollections[e];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},e}();t["default"]=l},82465:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOnlyCollection=void 0;var n=i(28439),o=function(){function e(e,t,i){this.name=e,this.apiCall=t,this.configuration=i,this._documents=new n.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return e.prototype.documents=function(){return this._documents},e}();t.SearchOnlyCollection=o},28439:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[n,o]of t)i[n]=o;return i}},36980:(e,t,i)=>{"use strict";i.d(t,{y$:()=>ee});var n=i(61758),o=i(38734);function s(){return r().__VUE_DEVTOOLS_GLOBAL_HOOK__}function r(){return"undefined"!==typeof navigator&&"undefined"!==typeof window?window:"undefined"!==typeof i.g?i.g:{}}const a="function"===typeof Proxy,l="devtools-plugin:setup",c="plugin:settings:set";let d,u;function h(){var e;return void 0!==d||("undefined"!==typeof window&&window.performance?(d=!0,u=window.performance):"undefined"!==typeof i.g&&(null===(e=i.g.perf_hooks)||void 0===e?void 0:e.performance)?(d=!0,u=i.g.perf_hooks.performance):d=!1),d}function g(){return h()?u.now():Date.now()}class p{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const i={};if(e.settings)for(const r in e.settings){const t=e.settings[r];i[r]=t.defaultValue}const n=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},i);try{const e=localStorage.getItem(n),t=JSON.parse(e);Object.assign(o,t)}catch(s){}this.fallbacks={getSettings(){return o},setSettings(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(s){}o=e},now(){return g()}},t&&t.on(c,((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((i=>{this.targetQueue.push({method:t,args:e,resolve:i})}))})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function f(e,t){const i=e,n=r(),o=s(),c=a&&i.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&c){const e=c?new p(i,o):null,s=n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[];s.push({pluginDescriptor:i,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else o.emit(l,e,t)} + *-----------------------------------------------------------------------------*/c(u,n);var h=(e=>(e[e["None"]=0]="None",e[e["CommonJS"]=1]="CommonJS",e[e["AMD"]=2]="AMD",e[e["UMD"]=3]="UMD",e[e["System"]=4]="System",e[e["ES2015"]=5]="ES2015",e[e["ESNext"]=99]="ESNext",e))(h||{}),g=(e=>(e[e["None"]=0]="None",e[e["Preserve"]=1]="Preserve",e[e["React"]=2]="React",e[e["ReactNative"]=3]="ReactNative",e[e["ReactJSX"]=4]="ReactJSX",e[e["ReactJSXDev"]=5]="ReactJSXDev",e))(g||{}),p=(e=>(e[e["CarriageReturnLineFeed"]=0]="CarriageReturnLineFeed",e[e["LineFeed"]=1]="LineFeed",e))(p||{}),f=(e=>(e[e["ES3"]=0]="ES3",e[e["ES5"]=1]="ES5",e[e["ES2015"]=2]="ES2015",e[e["ES2016"]=3]="ES2016",e[e["ES2017"]=4]="ES2017",e[e["ES2018"]=5]="ES2018",e[e["ES2019"]=6]="ES2019",e[e["ES2020"]=7]="ES2020",e[e["ESNext"]=99]="ESNext",e[e["JSON"]=100]="JSON",e[e["Latest"]=99]="Latest",e))(f||{}),m=(e=>(e[e["Classic"]=1]="Classic",e[e["NodeJs"]=2]="NodeJs",e))(m||{}),_=class{constructor(e,t,i,n,o){this._onDidChange=new u.Emitter,this._onDidExtraLibsChange=new u.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(o),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i="undefined"===typeof t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content;let n=1;this._removedExtraLibs[e]&&(n=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)}),0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},v=d,b={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},y=new _({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},b),w=new _({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},b),C=()=>k().then((e=>e.getTypeScriptWorker())),S=()=>k().then((e=>e.getJavaScriptWorker()));function k(){return i.e(121).then(i.bind(i,43888))}u.languages.typescript={ModuleKind:h,JsxEmit:g,NewLineKind:p,ScriptTarget:f,ModuleResolutionKind:m,typescriptVersion:v,typescriptDefaults:y,javascriptDefaults:w,getTypeScriptWorker:C,getJavaScriptWorker:S},u.languages.onLanguage("typescript",(()=>k().then((e=>e.setupTypeScript(y))))),u.languages.onLanguage("javascript",(()=>k().then((e=>e.setupJavaScript(w)))))},43888:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Adapter:()=>m,CodeActionAdaptor:()=>O,DefinitionAdapter:()=>k,DiagnosticsAdapter:()=>v,DocumentHighlightAdapter:()=>S,FormatAdapter:()=>N,FormatHelper:()=>R,FormatOnTypeAdapter:()=>A,InlayHintsAdapter:()=>M,Kind:()=>L,LibFiles:()=>_,OutlineAdapter:()=>E,QuickInfoAdapter:()=>C,ReferenceAdapter:()=>x,RenameAdapter:()=>P,SignatureHelpAdapter:()=>w,SuggestAdapter:()=>b,WorkerManager:()=>h,flattenDiagnosticMessageText:()=>p,getJavaScriptWorker:()=>W,getTypeScriptWorker:()=>H,setupJavaScript:()=>B,setupTypeScript:()=>F});var n=i(26732),o=i(78481),s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,c=(e,t,i,n)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let o of a(t))l.call(e,o)||o===i||s(e,o,{get:()=>t[o],enumerable:!(n=r(t,o))||n.enumerable});return e},d=(e,t,i)=>(c(e,t,"default"),i&&c(i,t,"default")),u={};d(u,n);var h=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker())),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange((()=>this._updateExtraLibs()))}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=u.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(u.editor.getModels().filter((e=>e.getLanguageId()===this._modeId)).map((e=>e.uri))):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},g={};function p(e,t,i=0){if("string"===typeof e)return e;if(void 0===e)return"";let n="";if(i){n+=t;for(let e=0;ee.text)).join(""):""}g["lib.d.ts"]=!0,g["lib.decorators.d.ts"]=!0,g["lib.decorators.legacy.d.ts"]=!0,g["lib.dom.asynciterable.d.ts"]=!0,g["lib.dom.d.ts"]=!0,g["lib.dom.iterable.d.ts"]=!0,g["lib.es2015.collection.d.ts"]=!0,g["lib.es2015.core.d.ts"]=!0,g["lib.es2015.d.ts"]=!0,g["lib.es2015.generator.d.ts"]=!0,g["lib.es2015.iterable.d.ts"]=!0,g["lib.es2015.promise.d.ts"]=!0,g["lib.es2015.proxy.d.ts"]=!0,g["lib.es2015.reflect.d.ts"]=!0,g["lib.es2015.symbol.d.ts"]=!0,g["lib.es2015.symbol.wellknown.d.ts"]=!0,g["lib.es2016.array.include.d.ts"]=!0,g["lib.es2016.d.ts"]=!0,g["lib.es2016.full.d.ts"]=!0,g["lib.es2016.intl.d.ts"]=!0,g["lib.es2017.d.ts"]=!0,g["lib.es2017.date.d.ts"]=!0,g["lib.es2017.full.d.ts"]=!0,g["lib.es2017.intl.d.ts"]=!0,g["lib.es2017.object.d.ts"]=!0,g["lib.es2017.sharedmemory.d.ts"]=!0,g["lib.es2017.string.d.ts"]=!0,g["lib.es2017.typedarrays.d.ts"]=!0,g["lib.es2018.asyncgenerator.d.ts"]=!0,g["lib.es2018.asynciterable.d.ts"]=!0,g["lib.es2018.d.ts"]=!0,g["lib.es2018.full.d.ts"]=!0,g["lib.es2018.intl.d.ts"]=!0,g["lib.es2018.promise.d.ts"]=!0,g["lib.es2018.regexp.d.ts"]=!0,g["lib.es2019.array.d.ts"]=!0,g["lib.es2019.d.ts"]=!0,g["lib.es2019.full.d.ts"]=!0,g["lib.es2019.intl.d.ts"]=!0,g["lib.es2019.object.d.ts"]=!0,g["lib.es2019.string.d.ts"]=!0,g["lib.es2019.symbol.d.ts"]=!0,g["lib.es2020.bigint.d.ts"]=!0,g["lib.es2020.d.ts"]=!0,g["lib.es2020.date.d.ts"]=!0,g["lib.es2020.full.d.ts"]=!0,g["lib.es2020.intl.d.ts"]=!0,g["lib.es2020.number.d.ts"]=!0,g["lib.es2020.promise.d.ts"]=!0,g["lib.es2020.sharedmemory.d.ts"]=!0,g["lib.es2020.string.d.ts"]=!0,g["lib.es2020.symbol.wellknown.d.ts"]=!0,g["lib.es2021.d.ts"]=!0,g["lib.es2021.full.d.ts"]=!0,g["lib.es2021.intl.d.ts"]=!0,g["lib.es2021.promise.d.ts"]=!0,g["lib.es2021.string.d.ts"]=!0,g["lib.es2021.weakref.d.ts"]=!0,g["lib.es2022.array.d.ts"]=!0,g["lib.es2022.d.ts"]=!0,g["lib.es2022.error.d.ts"]=!0,g["lib.es2022.full.d.ts"]=!0,g["lib.es2022.intl.d.ts"]=!0,g["lib.es2022.object.d.ts"]=!0,g["lib.es2022.regexp.d.ts"]=!0,g["lib.es2022.sharedmemory.d.ts"]=!0,g["lib.es2022.string.d.ts"]=!0,g["lib.es2023.array.d.ts"]=!0,g["lib.es2023.collection.d.ts"]=!0,g["lib.es2023.d.ts"]=!0,g["lib.es2023.full.d.ts"]=!0,g["lib.es5.d.ts"]=!0,g["lib.es6.d.ts"]=!0,g["lib.esnext.collection.d.ts"]=!0,g["lib.esnext.d.ts"]=!0,g["lib.esnext.decorators.d.ts"]=!0,g["lib.esnext.disposable.d.ts"]=!0,g["lib.esnext.full.d.ts"]=!0,g["lib.esnext.intl.d.ts"]=!0,g["lib.esnext.object.d.ts"]=!0,g["lib.esnext.promise.d.ts"]=!0,g["lib.scripthost.d.ts"]=!0,g["lib.webworker.asynciterable.d.ts"]=!0,g["lib.webworker.d.ts"]=!0,g["lib.webworker.importscripts.d.ts"]=!0,g["lib.webworker.iterable.d.ts"]=!0;var m=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let i=e.getPositionAt(t.start),n=e.getPositionAt(t.start+t.length),{lineNumber:o,column:s}=i,{lineNumber:r,column:a}=n;return{startLineNumber:o,startColumn:s,endLineNumber:r,endColumn:a}}},_=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return!!e&&(0===e.path.indexOf("/lib.")&&!!g[e.path.slice(1)])}getOrCreateModel(e){const t=u.Uri.parse(e),i=u.editor.getModel(t);if(i)return i;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return u.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const n=o.IF.getExtraLibs()[e];return n?u.editor.createModel(n.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then((e=>e.getLibFiles())).then((e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}))),this._fetchLibFilesPromise}},v=class extends m{constructor(e,t,i,n){super(n),this._libFiles=e,this._defaults=t,this._selector=i,this._disposables=[],this._listener=Object.create(null);const o=e=>{if(e.getLanguageId()!==i)return;const t=()=>{const{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)};let n;const o=e.onDidChangeContent((()=>{clearTimeout(n),n=window.setTimeout(t,500)})),s=e.onDidChangeAttached((()=>{const{onlyVisible:i}=this._defaults.getDiagnosticsOptions();i&&(e.isAttachedToEditor()?t():u.editor.setModelMarkers(e,this._selector,[]))}));this._listener[e.uri.toString()]={dispose(){o.dispose(),s.dispose(),clearTimeout(n)}},t()},s=e=>{u.editor.setModelMarkers(e,this._selector,[]);const t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(u.editor.onDidCreateModel((e=>o(e)))),this._disposables.push(u.editor.onWillDisposeModel(s)),this._disposables.push(u.editor.onDidChangeModelLanguage((e=>{s(e.model),o(e.model)}))),this._disposables.push({dispose(){for(const e of u.editor.getModels())s(e)}});const r=()=>{for(const e of u.editor.getModels())s(e),o(e)};this._disposables.push(this._defaults.onDidChange(r)),this._disposables.push(this._defaults.onDidExtraLibsChange(r)),u.editor.getModels().forEach((e=>o(e)))}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const i=[],{noSyntaxValidation:n,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();n||i.push(t.getSyntacticDiagnostics(e.uri.toString())),o||i.push(t.getSemanticDiagnostics(e.uri.toString())),s||i.push(t.getSuggestionDiagnostics(e.uri.toString()));const r=await Promise.all(i);if(!r||e.isDisposed())return;const a=r.reduce(((e,t)=>t.concat(e)),[]).filter((e=>-1===(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code))),l=a.map((e=>e.relatedInformation||[])).reduce(((e,t)=>t.concat(e)),[]).map((e=>e.file?u.Uri.parse(e.file.fileName):null));await this._libFiles.fetchLibFilesIfNecessary(l),e.isDisposed()||u.editor.setModelMarkers(e,this._selector,a.map((t=>this._convertDiagnostics(e,t))))}_convertDiagnostics(e,t){const i=t.start||0,n=t.length||1,{lineNumber:o,column:s}=e.getPositionAt(i),{lineNumber:r,column:a}=e.getPositionAt(i+n),l=[];return t.reportsUnnecessary&&l.push(u.MarkerTag.Unnecessary),t.reportsDeprecated&&l.push(u.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:o,startColumn:s,endLineNumber:r,endColumn:a,message:p(t.messageText,"\n"),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const i=[];return t.forEach((t=>{let n=e;if(t.file&&(n=this._libFiles.getOrCreateModel(t.file.fileName)),!n)return;const o=t.start||0,s=t.length||1,{lineNumber:r,column:a}=n.getPositionAt(o),{lineNumber:l,column:c}=n.getPositionAt(o+s);i.push({resource:n.uri,startLineNumber:r,startColumn:a,endLineNumber:l,endColumn:c,message:p(t.messageText,"\n")})})),i}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return u.MarkerSeverity.Error;case 3:return u.MarkerSeverity.Info;case 0:return u.MarkerSeverity.Warning;case 2:return u.MarkerSeverity.Hint}return u.MarkerSeverity.Info}},b=class e extends m{get triggerCharacters(){return["."]}async provideCompletionItems(t,i,n,o){const s=t.getWordUntilPosition(i),r=new u.Range(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),a=t.uri,l=t.getOffsetAt(i),c=await this._worker(a);if(t.isDisposed())return;const d=await c.getCompletionsAtPosition(a.toString(),l);if(!d||t.isDisposed())return;const h=d.entries.map((n=>{let o=r;if(n.replacementSpan){const e=t.getPositionAt(n.replacementSpan.start),i=t.getPositionAt(n.replacementSpan.start+n.replacementSpan.length);o=new u.Range(e.lineNumber,e.column,i.lineNumber,i.column)}const s=[];return void 0!==n.kindModifiers&&-1!==n.kindModifiers.indexOf("deprecated")&&s.push(u.languages.CompletionItemTag.Deprecated),{uri:a,position:i,offset:l,range:o,label:n.name,insertText:n.name,sortText:n.sortText,kind:e.convertKind(n.kind),tags:s}}));return{suggestions:h}}async resolveCompletionItem(t,i){const n=t,o=n.uri,s=n.position,r=n.offset,a=await this._worker(o),l=await a.getCompletionEntryDetails(o.toString(),r,n.label);return l?{uri:o,position:s,label:l.name,kind:e.convertKind(l.kind),detail:f(l.displayParts),documentation:{value:e.createDocumentationString(l)}}:n}static convertKind(e){switch(e){case L.primitiveType:case L.keyword:return u.languages.CompletionItemKind.Keyword;case L.variable:case L.localVariable:return u.languages.CompletionItemKind.Variable;case L.memberVariable:case L.memberGetAccessor:case L.memberSetAccessor:return u.languages.CompletionItemKind.Field;case L.function:case L.memberFunction:case L.constructSignature:case L.callSignature:case L.indexSignature:return u.languages.CompletionItemKind.Function;case L.enum:return u.languages.CompletionItemKind.Enum;case L.module:return u.languages.CompletionItemKind.Module;case L.class:return u.languages.CompletionItemKind.Class;case L.interface:return u.languages.CompletionItemKind.Interface;case L.warning:return u.languages.CompletionItemKind.File}return u.languages.CompletionItemKind.Property}static createDocumentationString(e){let t=f(e.documentation);if(e.tags)for(const i of e.tags)t+=`\n\n${y(i)}`;return t}};function y(e){let t=`*@${e.name}*`;if("param"===e.name&&e.text){const[i,...n]=e.text;t+=`\`${i.text}\``,n.length>0&&(t+=` — ${n.map((e=>e.text)).join(" ")}`)}else Array.isArray(e.text)?t+=` — ${e.text.map((e=>e.text)).join(" ")}`:e.text&&(t+=` — ${e.text}`);return t}var w=class e extends m{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case u.languages.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case u.languages.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case u.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(t,i,n,o){const s=t.uri,r=t.getOffsetAt(i),a=await this._worker(s);if(t.isDisposed())return;const l=await a.getSignatureHelpItems(s.toString(),r,{triggerReason:e._toSignatureHelpTriggerReason(o)});if(!l||t.isDisposed())return;const c={activeSignature:l.selectedItemIndex,activeParameter:l.argumentIndex,signatures:[]};return l.items.forEach((e=>{const t={label:"",parameters:[]};t.documentation={value:f(e.documentation)},t.label+=f(e.prefixDisplayParts),e.parameters.forEach(((i,n,o)=>{const s=f(i.displayParts),r={label:s,documentation:{value:f(i.documentation)}};t.label+=s,t.parameters.push(r),ny(e))).join(" \n\n"):"",c=f(r.displayParts);return{range:this._textSpanToRange(e,r.textSpan),contents:[{value:"```typescript\n"+c+"\n```\n"},{value:a+(l?"\n\n"+l:"")}]}}},S=class extends m{async provideDocumentHighlights(e,t,i){const n=e.uri,o=e.getOffsetAt(t),s=await this._worker(n);if(e.isDisposed())return;const r=await s.getDocumentHighlights(n.toString(),o,[n.toString()]);return r&&!e.isDisposed()?r.flatMap((t=>t.highlightSpans.map((t=>({range:this._textSpanToRange(e,t.textSpan),kind:"writtenReference"===t.kind?u.languages.DocumentHighlightKind.Write:u.languages.DocumentHighlightKind.Text}))))):void 0}},k=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,i){const n=e.uri,o=e.getOffsetAt(t),s=await this._worker(n);if(e.isDisposed())return;const r=await s.getDefinitionAtPosition(n.toString(),o);if(!r||e.isDisposed())return;if(await this._libFiles.fetchLibFilesIfNecessary(r.map((e=>u.Uri.parse(e.fileName)))),e.isDisposed())return;const a=[];for(let e of r){const t=this._libFiles.getOrCreateModel(e.fileName);t&&a.push({uri:t.uri,range:this._textSpanToRange(t,e.textSpan)})}return a}},x=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,i,n){const o=e.uri,s=e.getOffsetAt(t),r=await this._worker(o);if(e.isDisposed())return;const a=await r.getReferencesAtPosition(o.toString(),s);if(!a||e.isDisposed())return;if(await this._libFiles.fetchLibFilesIfNecessary(a.map((e=>u.Uri.parse(e.fileName)))),e.isDisposed())return;const l=[];for(let e of a){const t=this._libFiles.getOrCreateModel(e.fileName);t&&l.push({uri:t.uri,range:this._textSpanToRange(t,e.textSpan)})}return l}},E=class extends m{async provideDocumentSymbols(e,t){const i=e.uri,n=await this._worker(i);if(e.isDisposed())return;const o=await n.getNavigationTree(i.toString());if(!o||e.isDisposed())return;const s=(t,i)=>{const n={name:t.text,detail:"",kind:T[t.kind]||u.languages.SymbolKind.Variable,range:this._textSpanToRange(e,t.spans[0]),selectionRange:this._textSpanToRange(e,t.spans[0]),tags:[],children:t.childItems?.map((e=>s(e,t.text))),containerName:i};return n},r=o.childItems?o.childItems.map((e=>s(e))):[];return r}},L=class{static{this.unknown=""}static{this.keyword="keyword"}static{this.script="script"}static{this.module="module"}static{this.class="class"}static{this.interface="interface"}static{this.type="type"}static{this.enum="enum"}static{this.variable="var"}static{this.localVariable="local var"}static{this.function="function"}static{this.localFunction="local function"}static{this.memberFunction="method"}static{this.memberGetAccessor="getter"}static{this.memberSetAccessor="setter"}static{this.memberVariable="property"}static{this.constructorImplementation="constructor"}static{this.callSignature="call"}static{this.indexSignature="index"}static{this.constructSignature="construct"}static{this.parameter="parameter"}static{this.typeParameter="type parameter"}static{this.primitiveType="primitive type"}static{this.label="label"}static{this.alias="alias"}static{this.const="const"}static{this.let="let"}static{this.warning="warning"}},T=Object.create(null);T[L.module]=u.languages.SymbolKind.Module,T[L.class]=u.languages.SymbolKind.Class,T[L.enum]=u.languages.SymbolKind.Enum,T[L.interface]=u.languages.SymbolKind.Interface,T[L.memberFunction]=u.languages.SymbolKind.Method,T[L.memberVariable]=u.languages.SymbolKind.Property,T[L.memberGetAccessor]=u.languages.SymbolKind.Property,T[L.memberSetAccessor]=u.languages.SymbolKind.Property,T[L.variable]=u.languages.SymbolKind.Variable,T[L.const]=u.languages.SymbolKind.Variable,T[L.localVariable]=u.languages.SymbolKind.Variable,T[L.variable]=u.languages.SymbolKind.Variable,T[L.function]=u.languages.SymbolKind.Function,T[L.localFunction]=u.languages.SymbolKind.Function;var I,D,R=class extends m{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:"\n",InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}},N=class extends R{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,i,n){const o=e.uri,s=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),r=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),a=await this._worker(o);if(e.isDisposed())return;const l=await a.getFormattingEditsForRange(o.toString(),s,r,R._convertOptions(i));return l&&!e.isDisposed()?l.map((t=>this._convertTextChanges(e,t))):void 0}},A=class extends R{get autoFormatTriggerCharacters(){return[";","}","\n"]}async provideOnTypeFormattingEdits(e,t,i,n,o){const s=e.uri,r=e.getOffsetAt(t),a=await this._worker(s);if(e.isDisposed())return;const l=await a.getFormattingEditsAfterKeystroke(s.toString(),r,i,R._convertOptions(n));return l&&!e.isDisposed()?l.map((t=>this._convertTextChanges(e,t))):void 0}},O=class extends R{async provideCodeActions(e,t,i,n){const o=e.uri,s=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),r=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),a=R._convertOptions(e.getOptions()),l=i.markers.filter((e=>e.code)).map((e=>e.code)).map(Number),c=await this._worker(o);if(e.isDisposed())return;const d=await c.getCodeFixesAtPosition(o.toString(),s,r,l,a);if(!d||e.isDisposed())return{actions:[],dispose:()=>{}};const u=d.filter((e=>0===e.changes.filter((e=>e.isNewFile)).length)).map((t=>this._tsCodeFixActionToMonacoCodeAction(e,i,t)));return{actions:u,dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,i){const n=[];for(const t of i.changes)for(const i of t.textChanges)n.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,i.span),text:i.newText}});const o={title:i.description,edit:{edits:n},diagnostics:t.markers,kind:"quickfix"};return o}},P=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,i,n){const o=e.uri,s=o.toString(),r=e.getOffsetAt(t),a=await this._worker(o);if(e.isDisposed())return;const l=await a.getRenameInfo(s,r,{allowRenameOfImportPath:!1});if(!1===l.canRename)return{edits:[],rejectReason:l.localizedErrorMessage};if(void 0!==l.fileToRename)throw new Error("Renaming files is not supported.");const c=await a.findRenameLocations(s,r,!1,!1,!1);if(!c||e.isDisposed())return;const d=[];for(const e of c){const t=this._libFiles.getOrCreateModel(e.fileName);if(!t)throw new Error(`Unknown file ${e.fileName}.`);d.push({resource:t.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(t,e.textSpan),text:i}})}return{edits:d}}},M=class extends m{async provideInlayHints(e,t,i){const n=e.uri,o=n.toString(),s=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),r=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),a=await this._worker(n);if(e.isDisposed())return null;const l=await a.provideInlayHints(o,s,r),c=l.map((t=>({...t,label:t.text,position:e.getPositionAt(t.position),kind:this._convertHintKind(t.kind)})));return{hints:c,dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return u.languages.InlayHintKind.Parameter;case"Type":return u.languages.InlayHintKind.Type;default:return u.languages.InlayHintKind.Type}}};function F(e){D=V(e,"typescript")}function B(e){I=V(e,"javascript")}function W(){return new Promise(((e,t)=>{if(!I)return t("JavaScript not registered!");e(I)}))}function H(){return new Promise(((e,t)=>{if(!D)return t("TypeScript not registered!");e(D)}))}function V(e,t){const i=[],n=[],o=new h(t,e);i.push(o);const s=(...e)=>o.getLanguageServiceWorker(...e),r=new _(s);function a(){const{modeConfiguration:i}=e;z(n),i.completionItems&&n.push(u.languages.registerCompletionItemProvider(t,new b(s))),i.signatureHelp&&n.push(u.languages.registerSignatureHelpProvider(t,new w(s))),i.hovers&&n.push(u.languages.registerHoverProvider(t,new C(s))),i.documentHighlights&&n.push(u.languages.registerDocumentHighlightProvider(t,new S(s))),i.definitions&&n.push(u.languages.registerDefinitionProvider(t,new k(r,s))),i.references&&n.push(u.languages.registerReferenceProvider(t,new x(r,s))),i.documentSymbols&&n.push(u.languages.registerDocumentSymbolProvider(t,new E(s))),i.rename&&n.push(u.languages.registerRenameProvider(t,new P(r,s))),i.documentRangeFormattingEdits&&n.push(u.languages.registerDocumentRangeFormattingEditProvider(t,new N(s))),i.onTypeFormattingEdits&&n.push(u.languages.registerOnTypeFormattingEditProvider(t,new A(s))),i.codeActions&&n.push(u.languages.registerCodeActionProvider(t,new O(s))),i.inlayHints&&n.push(u.languages.registerInlayHintsProvider(t,new M(s))),i.diagnostics&&n.push(new v(r,e,t,s))}return a(),i.push(j(n)),s}function j(e){return{dispose:()=>z(e)}}function z(e){while(e.length)e.pop().dispose()}},41337:(e,t,i)=>{"use strict";function n(){return globalThis._VSCODE_NLS_MESSAGES}function o(){return globalThis._VSCODE_NLS_LANGUAGE}i.d(t,{i8:()=>o,Ec:()=>n,kg:()=>a,aS:()=>c});const s="pseudo"===o()||"undefined"!==typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function r(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],o=t[n];let s=e;return"string"===typeof o?s=o:"number"!==typeof o&&"boolean"!==typeof o&&void 0!==o&&null!==o||(s=String(o)),s})),s&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function a(e,t,...i){return r("number"===typeof e?l(e,t):t,i)}function l(e,t){const i=n()?.[e];if("string"!==typeof i){if("string"===typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return i}function c(e,t,...i){let n;n="number"===typeof e?l(e,t):t;const o=r(n,i);return{value:o,original:t===n?o:r(t,i)}}},3115:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});const n=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const t=this._implementations.indexOf(e);-1!==t&&this._implementations.splice(t,1)}}}getImplementations(){return this._implementations}}},17300:(e,t,i)=>{"use strict";i.d(t,{f:()=>r,j:()=>s});var n=i(18904),o=i(87778);const s=(0,o.u1)("accessibilityService"),r=new n.N1("accessibilityModeEnabled",!1)},4380:(e,t,i)=>{"use strict";i.d(t,{Nt:()=>s,Rh:()=>l});var n=i(41337),o=i(87778);const s=(0,o.u1)("accessibilitySignalService");Symbol("AcknowledgeDocCommentsToken");class r{static register(e){const t=new r(e.fileName);return t}static{this.error=r.register({fileName:"error.mp3"})}static{this.warning=r.register({fileName:"warning.mp3"})}static{this.success=r.register({fileName:"success.mp3"})}static{this.foldedArea=r.register({fileName:"foldedAreas.mp3"})}static{this.break=r.register({fileName:"break.mp3"})}static{this.quickFixes=r.register({fileName:"quickFixes.mp3"})}static{this.taskCompleted=r.register({fileName:"taskCompleted.mp3"})}static{this.taskFailed=r.register({fileName:"taskFailed.mp3"})}static{this.terminalBell=r.register({fileName:"terminalBell.mp3"})}static{this.diffLineInserted=r.register({fileName:"diffLineInserted.mp3"})}static{this.diffLineDeleted=r.register({fileName:"diffLineDeleted.mp3"})}static{this.diffLineModified=r.register({fileName:"diffLineModified.mp3"})}static{this.chatRequestSent=r.register({fileName:"chatRequestSent.mp3"})}static{this.chatResponseReceived1=r.register({fileName:"chatResponseReceived1.mp3"})}static{this.chatResponseReceived2=r.register({fileName:"chatResponseReceived2.mp3"})}static{this.chatResponseReceived3=r.register({fileName:"chatResponseReceived3.mp3"})}static{this.chatResponseReceived4=r.register({fileName:"chatResponseReceived4.mp3"})}static{this.clear=r.register({fileName:"clear.mp3"})}static{this.save=r.register({fileName:"save.mp3"})}static{this.format=r.register({fileName:"format.mp3"})}static{this.voiceRecordingStarted=r.register({fileName:"voiceRecordingStarted.mp3"})}static{this.voiceRecordingStopped=r.register({fileName:"voiceRecordingStopped.mp3"})}static{this.progress=r.register({fileName:"progress.mp3"})}constructor(e){this.fileName=e}}class a{constructor(e){this.randomOneOf=e}}class l{constructor(e,t,i,n,o,s){this.sound=e,this.name=t,this.legacySoundSettingsKey=i,this.settingsKey=n,this.legacyAnnouncementSettingsKey=o,this.announcementMessage=s}static{this._signals=new Set}static register(e){const t=new a("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new l(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return l._signals.add(i),i}static{this.errorAtPosition=l.register({name:(0,n.kg)("accessibilitySignals.positionHasError.name","Error at Position"),sound:r.error,announcementMessage:(0,n.kg)("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"})}static{this.warningAtPosition=l.register({name:(0,n.kg)("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:r.warning,announcementMessage:(0,n.kg)("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"})}static{this.errorOnLine=l.register({name:(0,n.kg)("accessibilitySignals.lineHasError.name","Error on Line"),sound:r.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:(0,n.kg)("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"})}static{this.warningOnLine=l.register({name:(0,n.kg)("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:r.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:(0,n.kg)("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"})}static{this.foldedArea=l.register({name:(0,n.kg)("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:r.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:(0,n.kg)("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"})}static{this.break=l.register({name:(0,n.kg)("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:r.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:(0,n.kg)("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"})}static{this.inlineSuggestion=l.register({name:(0,n.kg)("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:r.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"})}static{this.terminalQuickFix=l.register({name:(0,n.kg)("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:r.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:(0,n.kg)("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"})}static{this.onDebugBreak=l.register({name:(0,n.kg)("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:r.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:(0,n.kg)("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"})}static{this.noInlayHints=l.register({name:(0,n.kg)("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:r.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:(0,n.kg)("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"})}static{this.taskCompleted=l.register({name:(0,n.kg)("accessibilitySignals.taskCompleted","Task Completed"),sound:r.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:(0,n.kg)("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"})}static{this.taskFailed=l.register({name:(0,n.kg)("accessibilitySignals.taskFailed","Task Failed"),sound:r.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:(0,n.kg)("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"})}static{this.terminalCommandFailed=l.register({name:(0,n.kg)("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:r.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:(0,n.kg)("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"})}static{this.terminalCommandSucceeded=l.register({name:(0,n.kg)("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:r.success,announcementMessage:(0,n.kg)("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"})}static{this.terminalBell=l.register({name:(0,n.kg)("accessibilitySignals.terminalBell","Terminal Bell"),sound:r.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:(0,n.kg)("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"})}static{this.notebookCellCompleted=l.register({name:(0,n.kg)("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:r.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:(0,n.kg)("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"})}static{this.notebookCellFailed=l.register({name:(0,n.kg)("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:r.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:(0,n.kg)("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"})}static{this.diffLineInserted=l.register({name:(0,n.kg)("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:r.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"})}static{this.diffLineDeleted=l.register({name:(0,n.kg)("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:r.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"})}static{this.diffLineModified=l.register({name:(0,n.kg)("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:r.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"})}static{this.chatRequestSent=l.register({name:(0,n.kg)("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:r.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:(0,n.kg)("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"})}static{this.chatResponseReceived=l.register({name:(0,n.kg)("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[r.chatResponseReceived1,r.chatResponseReceived2,r.chatResponseReceived3,r.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"})}static{this.progress=l.register({name:(0,n.kg)("accessibilitySignals.progress","Progress"),sound:r.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:(0,n.kg)("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"})}static{this.clear=l.register({name:(0,n.kg)("accessibilitySignals.clear","Clear"),sound:r.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:(0,n.kg)("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"})}static{this.save=l.register({name:(0,n.kg)("accessibilitySignals.save","Save"),sound:r.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:(0,n.kg)("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"})}static{this.format=l.register({name:(0,n.kg)("accessibilitySignals.format","Format"),sound:r.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:(0,n.kg)("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"})}static{this.voiceRecordingStarted=l.register({name:(0,n.kg)("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:r.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"})}static{this.voiceRecordingStopped=l.register({name:(0,n.kg)("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:r.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"})}}},68254:(e,t,i)=>{"use strict";function n(e){return e&&"object"===typeof e&&"string"===typeof e.original&&"string"===typeof e.value}function o(e){return!!e&&void 0!==e.condition}i.d(t,{N:()=>o,f:()=>n})},85141:(e,t,i)=>{"use strict";i.d(t,{$u:()=>I,Ot:()=>D,oq:()=>N,rN:()=>F,rr:()=>A});var n=i(2150),o=i(68389),s=i(64236),r=i(53876),a=i(55664),l=i(59812),c=i(5091),d=i(25160),u=i(41337),h=i(6330),g=i(68254),p=i(18904),f=i(46403),m=i(87778),_=i(13046),v=i(95062),b=i(94216),y=i(15911),w=i(23740),C=i(1474),S=i(50322),k=i(66344),x=i(13153),E=i(17300),L=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},T=function(e,t){return function(i,n){t(i,n,e)}};function I(e,t,i,o){let s,r,a;if(Array.isArray(e))a=e,s=t,r=i;else{const n=t;a=e.getActions(n),s=i,r=o}const l=n.Di.getInstance(),c=l.keyStatus.altKey||(d.uF||d.j9)&&l.keyStatus.shiftKey;R(a,s,c,r?e=>e===r:e=>"navigation"===e)}function D(e,t,i,n,o,s){let r,a,l,c,d;if(Array.isArray(e))d=e,r=t,a=i,l=n,c=o;else{const u=t;d=e.getActions(u),r=i,a=n,l=o,c=s}const u="string"===typeof a?e=>e===a:a;R(d,r,!1,u,l,c)}function R(e,t,i,n=e=>"navigation"===e,o=()=>!1,s=!1){let r,l;Array.isArray(t)?(r=t,l=t):(r=t.primary,l=t.secondary);const c=new Set;for(const[t,o]of e){let e;n(t)?(e=r,e.length>0&&s&&e.push(new a.wv)):(e=l,e.length>0&&e.push(new a.wv));for(let n of o){i&&(n=n instanceof h.Xe&&n.alt?n.alt:n);const o=e.push(n);n instanceof a.YH&&c.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of c){const s=n(e)?r:l,a=t.actions;o(t,e,s.length)&&s.splice(i,1,...a)}}let N=class extends s.Z4{constructor(e,t,i,o,s,r,a,l){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._options=t,this._keybindingService=i,this._notificationService=o,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new c.HE),this._altKey=n.Di.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{const e=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register((0,n.ko)(e,"mouseleave",(e=>{t=!1,i()}))),this._register((0,n.ko)(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?(0,u.kg)("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),o=i?(0,u.kg)("titleAndKb","{0} ({1})",e,i):e;n=(0,u.kg)("titleAndKbAndAlt","{0}\n[{1}] {2}",n,l.Of.modifierLabels[d.OS].altKey,o)}return n}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const o=this._commandAction.checked&&(0,g.N)(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(o)if(w.L.isThemeIcon(o)){const e=w.L.asClassNameArray(o);i.classList.add(...e),this._itemClassDispose.value=(0,c.s)((()=>{i.classList.remove(...e)}))}else i.style.backgroundImage=(0,C.HD)(this._themeService.getColorTheme().type)?(0,n.Tf)(o.dark):(0,n.Tf)(o.light),i.classList.add("icon"),this._itemClassDispose.value=(0,c.qE)((0,c.s)((()=>{i.style.backgroundImage="",i.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}};N=L([T(2,_.b),T(3,v.Ot),T(4,p.fN),T(5,y.Gy),T(6,f.Z),T(7,E.j)],N);class A extends N{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=A._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=(0,u.kg)({key:"content2",comment:['A label with keybindg like "ESC to dismiss"']},"{1} to {0}",this._action.label,t):this.label.textContent=(0,u.kg)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let O=class extends r.d{constructor(e,t,i,n,o){const s={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(w.L.isThemeIcon(e.item.icon)?w.L.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(e=>i.lookupKeybinding(e.id))};super(e,{getActions:()=>e.actions},n,s),this._keybindingService=i,this._contextMenuService=n,this._themeService=o}render(e){super.render(e),(0,S.j)(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!w.L.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=(0,C.HD)(this._themeService.getColorTheme().type)?(0,n.Tf)(i.dark):(0,n.Tf)(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};O=L([T(2,_.b),T(3,f.Z),T(4,y.Gy)],O);let P=class extends s.EH{constructor(e,t,i,n,o,s,l,c){let d;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=l,this._storageService=c,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const u=t?.persistLastActionId?c.get(this._storageKey,1):void 0;u&&(d=e.actions.find((e=>u===e.id))),d||(d=e.actions[0]),this._defaultAction=this._instaService.createInstance(N,d,{keybinding:this._getDefaultActionKeybindingLabel(d)});const g={keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??new a.LN};this._dropdown=new r.d(e,e.actions,this._contextMenuService,g),this._register(this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof h.Xe&&this.update(e.action)})))}update(e){this._options?.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(N,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends a.LN{async runAction(e,t){await e.run(void 0)}},this._container&&this._defaultAction.render((0,n.Hs)(this._container,(0,n.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(t=`(${i.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=(0,n.$)(".action-container");this._defaultAction.render((0,n.BC)(this._container,t)),this._register((0,n.ko)(t,n.Bx.KEY_DOWN,(e=>{const t=new o.Z(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=(0,n.$)(".dropdown-action-container");this._dropdown.render((0,n.BC)(this._container,i)),this._register((0,n.ko)(i,n.Bx.KEY_DOWN,(e=>{const t=new o.Z(e);t.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),t.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};P=L([T(2,_.b),T(3,v.Ot),T(4,f.Z),T(5,h.ez),T(6,m._Y),T(7,b.CS)],P);let M=class extends s.XF{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===a.wv.ID?"─────────":e.label,isDisabled:!e.enabled}))),0,t,x.RE,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=(0,k.GuP)(k.HcB)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function F(e,t,i){return t instanceof h.Xe?e.createInstance(N,t,i):t instanceof h.nI?t.item.isSelection?e.createInstance(M,t):t.item.rememberDefaultAction?e.createInstance(P,t,{...i,persistLastActionId:!0}):e.createInstance(O,t,i):void 0}M=L([T(1,f.l)],M)},64164:(e,t,i)=>{"use strict";i.d(t,{m:()=>R,p:()=>D});var n=i(2150),o=i(46274),s=i(48038),r=i(53876),a=i(55664),l=i(25923),c=i(23740),d=i(40231),u=i(5091),h=i(41337),g=i(96371);class p extends u.jG{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new d._B),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new u.Cm),i.hoverDelegate=i.hoverDelegate??this._register((0,g.bW)()),this.options=i,this.toggleMenuAction=this._register(new f((()=>this.toggleMenuActionViewItem?.show()),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new s.E(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(e,n)=>{if(e.id===f.ID)return this.toggleMenuActionViewItem=new r.d(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:c.L.asClassNameArray(i.moreIcon??l.W.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof a.YH){const i=new r.d(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){const t=this.options.getKeyBinding?.(e);return t?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class f extends a.rc{static{this.ID="toolbar.toggle.more"}constructor(e,t){t=t||h.kg("moreActions","More Actions..."),super(f.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}var m=i(85053),_=i(52782),v=i(14396),b=i(5837),y=i(85141),w=i(6330),C=i(17219),S=i(72786),k=i(18904),x=i(46403),E=i(13046),L=i(11086),T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};let D=class extends p{constructor(e,t,i,n,o,s,r,a){super(e,o,{getKeyBinding:e=>s.lookupKeybinding(e.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:"string"===typeof t?.telemetrySource}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=o,this._keybindingService=s,this._commandService=r,this._sessionDisposables=this._store.add(new u.Cm);const l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun((e=>a.publicLog2("workbenchActionExecuted",{id:e.action.id,from:l}))))}setActions(e,t=[],i){this._sessionDisposables.clear();const s=e.slice(),r=t.slice(),l=[];let c=0;const d=[];let u=!1;if(-1!==this._options?.hiddenItemStrategy)for(let e=0;ee?.id))),t=this._options.overflowBehavior.maxItems-e.size;let i=0;for(let n=0;n=t&&(s[n]=void 0,d[n]=o))}}(0,m.SK)(s),(0,m.SK)(d),super.setActions(s,a.wv.join(d,r)),(l.length>0||s.length>0)&&this._sessionDisposables.add((0,n.ko)(this.getElement(),"contextmenu",(e=>{const t=new o.P((0,n.zk)(this.getElement()),e),s=this.getItemAction(t.target);if(!s)return;t.preventDefault(),t.stopPropagation();const r=[];if(s instanceof w.Xe&&s.menuKeybinding)r.push(s.menuKeybinding);else if(!(s instanceof w.nI||s instanceof f)){const e=!!this._keybindingService.lookupKeybinding(s.id);r.push((0,C.D)(this._commandService,this._keybindingService,s.id,void 0,e))}if(l.length>0){let e=!1;if(1===c&&0===this._options?.hiddenItemStrategy){e=!0;for(let e=0;ethis._menuService.resetHiddenStates(i)}))),0!==d.length&&this._contextMenuService.showContextMenu({getAnchor:()=>t,getActions:()=>d,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:"string"===typeof this._options?.telemetrySource,contextKeyService:this._contextKeyService})})))}};D=T([I(2,w.ez),I(3,k.fN),I(4,x.Z),I(5,E.b),I(6,S.d),I(7,L.k)],D);let R=class extends D{constructor(e,t,i,n,o,s,r,a,l){super(e,{resetMenu:t,...i},n,o,s,r,a,l),this._onDidChangeMenuItems=this._store.add(new d.vl),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const c=this._store.add(n.createMenu(t,o,{emitEventsForSubmenuChanges:!0})),u=()=>{const t=[],n=[];(0,y.Ot)(c,i?.menuOptions,{primary:t,secondary:n},i?.toolbarOptions?.primaryGroup,i?.toolbarOptions?.shouldInlineSubmenu,i?.toolbarOptions?.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",0===t.length&&0===n.length),super.setActions(t,n)};this._store.add(c.onDidChange((()=>{u(),this._onDidChangeMenuItems.fire(this)}))),u()}setActions(){throw new v.D7("This toolbar is populated from a menu.")}};R=T([I(3,w.ez),I(4,k.fN),I(5,x.Z),I(6,E.b),I(7,S.d),I(8,L.k)],R)},6330:(e,t,i)=>{"use strict";i.d(t,{D8:()=>_,L:()=>S,Xe:()=>C,ZG:()=>y,ez:()=>v,i1:()=>m,is:()=>f,nI:()=>w,ug:()=>k});var n,o=i(55664),s=i(23740),r=i(40231),a=i(5091),l=i(67806),c=i(72786),d=i(18904),u=i(87778),h=i(78386),g=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}};function f(e){return void 0!==e.command}function m(e){return void 0!==e.submenu}class _{static{this._instances=new Map}static{this.CommandPalette=new _("CommandPalette")}static{this.DebugBreakpointsContext=new _("DebugBreakpointsContext")}static{this.DebugCallStackContext=new _("DebugCallStackContext")}static{this.DebugConsoleContext=new _("DebugConsoleContext")}static{this.DebugVariablesContext=new _("DebugVariablesContext")}static{this.NotebookVariablesContext=new _("NotebookVariablesContext")}static{this.DebugHoverContext=new _("DebugHoverContext")}static{this.DebugWatchContext=new _("DebugWatchContext")}static{this.DebugToolBar=new _("DebugToolBar")}static{this.DebugToolBarStop=new _("DebugToolBarStop")}static{this.DebugCallStackToolbar=new _("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new _("DebugCreateConfiguration")}static{this.EditorContext=new _("EditorContext")}static{this.SimpleEditorContext=new _("SimpleEditorContext")}static{this.EditorContent=new _("EditorContent")}static{this.EditorLineNumberContext=new _("EditorLineNumberContext")}static{this.EditorContextCopy=new _("EditorContextCopy")}static{this.EditorContextPeek=new _("EditorContextPeek")}static{this.EditorContextShare=new _("EditorContextShare")}static{this.EditorTitle=new _("EditorTitle")}static{this.EditorTitleRun=new _("EditorTitleRun")}static{this.EditorTitleContext=new _("EditorTitleContext")}static{this.EditorTitleContextShare=new _("EditorTitleContextShare")}static{this.EmptyEditorGroup=new _("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new _("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new _("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new _("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new _("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new _("EditorActionsPositionSubmenu")}static{this.ExplorerContext=new _("ExplorerContext")}static{this.ExplorerContextShare=new _("ExplorerContextShare")}static{this.ExtensionContext=new _("ExtensionContext")}static{this.GlobalActivity=new _("GlobalActivity")}static{this.CommandCenter=new _("CommandCenter")}static{this.CommandCenterCenter=new _("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new _("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new _("LayoutControlMenu")}static{this.MenubarMainMenu=new _("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new _("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new _("MenubarDebugMenu")}static{this.MenubarEditMenu=new _("MenubarEditMenu")}static{this.MenubarCopy=new _("MenubarCopy")}static{this.MenubarFileMenu=new _("MenubarFileMenu")}static{this.MenubarGoMenu=new _("MenubarGoMenu")}static{this.MenubarHelpMenu=new _("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new _("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new _("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new _("PanelAlignmentMenu")}static{this.PanelPositionMenu=new _("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new _("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new _("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new _("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new _("MenubarSelectionMenu")}static{this.MenubarShare=new _("MenubarShare")}static{this.MenubarSwitchEditorMenu=new _("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new _("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new _("MenubarTerminalMenu")}static{this.MenubarViewMenu=new _("MenubarViewMenu")}static{this.MenubarHomeMenu=new _("MenubarHomeMenu")}static{this.OpenEditorsContext=new _("OpenEditorsContext")}static{this.OpenEditorsContextShare=new _("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new _("ProblemsPanelContext")}static{this.SCMInputBox=new _("SCMInputBox")}static{this.SCMChangesSeparator=new _("SCMChangesSeparator")}static{this.SCMChangesContext=new _("SCMChangesContext")}static{this.SCMIncomingChanges=new _("SCMIncomingChanges")}static{this.SCMIncomingChangesContext=new _("SCMIncomingChangesContext")}static{this.SCMIncomingChangesSetting=new _("SCMIncomingChangesSetting")}static{this.SCMOutgoingChanges=new _("SCMOutgoingChanges")}static{this.SCMOutgoingChangesContext=new _("SCMOutgoingChangesContext")}static{this.SCMOutgoingChangesSetting=new _("SCMOutgoingChangesSetting")}static{this.SCMIncomingChangesAllChangesContext=new _("SCMIncomingChangesAllChangesContext")}static{this.SCMIncomingChangesHistoryItemContext=new _("SCMIncomingChangesHistoryItemContext")}static{this.SCMOutgoingChangesAllChangesContext=new _("SCMOutgoingChangesAllChangesContext")}static{this.SCMOutgoingChangesHistoryItemContext=new _("SCMOutgoingChangesHistoryItemContext")}static{this.SCMChangeContext=new _("SCMChangeContext")}static{this.SCMResourceContext=new _("SCMResourceContext")}static{this.SCMResourceContextShare=new _("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new _("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new _("SCMResourceGroupContext")}static{this.SCMSourceControl=new _("SCMSourceControl")}static{this.SCMSourceControlInline=new _("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new _("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new _("SCMHistoryTitle")}static{this.SCMTitle=new _("SCMTitle")}static{this.SearchContext=new _("SearchContext")}static{this.SearchActionMenu=new _("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new _("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new _("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new _("StickyScrollContext")}static{this.TestItem=new _("TestItem")}static{this.TestItemGutter=new _("TestItemGutter")}static{this.TestProfilesContext=new _("TestProfilesContext")}static{this.TestMessageContext=new _("TestMessageContext")}static{this.TestMessageContent=new _("TestMessageContent")}static{this.TestPeekElement=new _("TestPeekElement")}static{this.TestPeekTitle=new _("TestPeekTitle")}static{this.TestCallStack=new _("TestCallStack")}static{this.TouchBarContext=new _("TouchBarContext")}static{this.TitleBarContext=new _("TitleBarContext")}static{this.TitleBarTitleContext=new _("TitleBarTitleContext")}static{this.TunnelContext=new _("TunnelContext")}static{this.TunnelPrivacy=new _("TunnelPrivacy")}static{this.TunnelProtocol=new _("TunnelProtocol")}static{this.TunnelPortInline=new _("TunnelInline")}static{this.TunnelTitle=new _("TunnelTitle")}static{this.TunnelLocalAddressInline=new _("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new _("TunnelOriginInline")}static{this.ViewItemContext=new _("ViewItemContext")}static{this.ViewContainerTitle=new _("ViewContainerTitle")}static{this.ViewContainerTitleContext=new _("ViewContainerTitleContext")}static{this.ViewTitle=new _("ViewTitle")}static{this.ViewTitleContext=new _("ViewTitleContext")}static{this.CommentEditorActions=new _("CommentEditorActions")}static{this.CommentThreadTitle=new _("CommentThreadTitle")}static{this.CommentThreadActions=new _("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new _("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new _("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new _("CommentThreadCommentContext")}static{this.CommentTitle=new _("CommentTitle")}static{this.CommentActions=new _("CommentActions")}static{this.CommentsViewThreadActions=new _("CommentsViewThreadActions")}static{this.InteractiveToolbar=new _("InteractiveToolbar")}static{this.InteractiveCellTitle=new _("InteractiveCellTitle")}static{this.InteractiveCellDelete=new _("InteractiveCellDelete")}static{this.InteractiveCellExecute=new _("InteractiveCellExecute")}static{this.InteractiveInputExecute=new _("InteractiveInputExecute")}static{this.InteractiveInputConfig=new _("InteractiveInputConfig")}static{this.ReplInputExecute=new _("ReplInputExecute")}static{this.IssueReporter=new _("IssueReporter")}static{this.NotebookToolbar=new _("NotebookToolbar")}static{this.NotebookStickyScrollContext=new _("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new _("NotebookCellTitle")}static{this.NotebookCellDelete=new _("NotebookCellDelete")}static{this.NotebookCellInsert=new _("NotebookCellInsert")}static{this.NotebookCellBetween=new _("NotebookCellBetween")}static{this.NotebookCellListTop=new _("NotebookCellTop")}static{this.NotebookCellExecute=new _("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new _("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new _("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new _("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new _("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new _("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new _("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new _("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new _("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new _("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new _("NotebookKernelSource")}static{this.BulkEditTitle=new _("BulkEditTitle")}static{this.BulkEditContext=new _("BulkEditContext")}static{this.TimelineItemContext=new _("TimelineItemContext")}static{this.TimelineTitle=new _("TimelineTitle")}static{this.TimelineTitleContext=new _("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new _("TimelineFilterSubMenu")}static{this.AccountsContext=new _("AccountsContext")}static{this.SidebarTitle=new _("SidebarTitle")}static{this.PanelTitle=new _("PanelTitle")}static{this.AuxiliaryBarTitle=new _("AuxiliaryBarTitle")}static{this.AuxiliaryBarHeader=new _("AuxiliaryBarHeader")}static{this.TerminalInstanceContext=new _("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new _("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new _("TerminalNewDropdownContext")}static{this.TerminalTabContext=new _("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new _("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new _("TerminalStickyScrollContext")}static{this.WebviewContext=new _("WebviewContext")}static{this.InlineCompletionsActions=new _("InlineCompletionsActions")}static{this.InlineEditsActions=new _("InlineEditsActions")}static{this.InlineEditActions=new _("InlineEditActions")}static{this.NewFile=new _("NewFile")}static{this.MergeInput1Toolbar=new _("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new _("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new _("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new _("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new _("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new _("InlineEditToolbar")}static{this.ChatContext=new _("ChatContext")}static{this.ChatCodeBlock=new _("ChatCodeblock")}static{this.ChatCompareBlock=new _("ChatCompareBlock")}static{this.ChatMessageTitle=new _("ChatMessageTitle")}static{this.ChatExecute=new _("ChatExecute")}static{this.ChatExecuteSecondary=new _("ChatExecuteSecondary")}static{this.ChatInputSide=new _("ChatInputSide")}static{this.AccessibleView=new _("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new _("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new _("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new _("DiffEditorSelectionToolbar")}constructor(e){if(_._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);_._instances.set(e,this),this.id=e}}const v=(0,u.u1)("menuService");class b{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new b(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof b&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}const y=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new r.QT({merge:b.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(b.for(_.CommandPalette)),(0,a.s)((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(b.for(_.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new l.w,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(b.for(e)),(0,a.s)((()=>{n(),this._onDidChangeMenu.fire(b.for(e))}))}appendMenuItems(e){const t=new a.Cm;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===_.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)f(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class w extends o.YH{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"===typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let C=n=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?"string"===typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"===typeof e.title?e.title:e.title.value}constructor(e,t,i,o,r,a,l){let c;if(this.hideActions=o,this.menuKeybinding=r,this._commandService=l,this.id=e.id,this.label=n.label(e,i),this.tooltip=("string"===typeof e.tooltip?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||a.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=a.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"===typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&s.L.isThemeIcon(t.icon)&&(c=t.icon),this.checked&&t.title&&(this.label="string"===typeof t.title?t.title:t.title.value)}c||(c=s.L.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,o,void 0,a,l):void 0,this._options=i,this.class=c&&s.L.asClassName(c)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};C=n=g([p(5,d.fN),p(6,c.d)],C);class S{constructor(e){this.desc=e}}function k(e){const t=[],i=new e,{f1:n,menu:o,keybinding:s,...r}=i.desc;if(c.w.getCommand(r.id))throw new Error(`Cannot register two commands with the same id: ${r.id}`);if(t.push(c.w.registerCommand({id:r.id,handler:(e,...t)=>i.run(e,...t),metadata:r.metadata})),Array.isArray(o))for(const e of o)t.push(y.appendMenuItem(e.id,{command:{...r,precondition:null===e.precondition?void 0:r.precondition},...e}));else o&&t.push(y.appendMenuItem(o.id,{command:{...r,precondition:null===o.precondition?void 0:r.precondition},...o}));if(n&&(t.push(y.appendMenuItem(_.CommandPalette,{command:r,when:r.precondition})),t.push(y.addCommand(r))),Array.isArray(s))for(const e of s)t.push(h.f.registerKeybindingRule({...e,id:r.id,when:r.precondition?d.M$.and(r.precondition,e.when):e.when}));else s&&t.push(h.f.registerKeybindingRule({...s,id:r.id,when:r.precondition?d.M$.and(r.precondition,s.when):s.when}));return{dispose(){(0,a.AS)(t)}}}},17219:(e,t,i)=>{"use strict";i.d(t,{$:()=>v,D:()=>k});var n,o,s=i(9659),r=i(40231),a=i(5091),l=i(6330),c=i(72786),d=i(18904),u=i(55664),h=i(94216),g=i(85053),p=i(41337),f=i(13046),m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new b(i)}createMenu(e,t,i){return new C(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){const n=new C(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),o=n.getActions(i);return n.dispose(),o}resetHiddenStates(e){this._hiddenStates.reset(e)}};v=m([_(0,c.d),_(1,f.b),_(2,h.CS)],v);let b=class{static{n=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new a.Cm,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,n._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){const i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){const n=this._isHiddenByDefault(e,t);n&&(i=!i);const o=this._data[e.id];if(i)if(o){const e=o.indexOf(t);e<0&&o.push(t)}else this._data[e.id]=[t];else if(o){const i=o.indexOf(t);i>=0&&(0,g.UH)(o,i),0===o.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(n._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};b=n=m([_(0,h.CS)],b);class y{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=this._sort(l.ZG.getMenuItems(this._id));let t;for(const i of e){const e=i.group||"";t&&t[0]===e||(t=[e,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeysAndSubmenuIds(i)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(y._fillInKbExprKeys(e.when,this._structureContextKeys),(0,l.is)(e)){if(e.command.precondition&&y._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;y._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(l.ZG.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}}let w=o=class extends y{constructor(e,t,i,n,o,s){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=o,this._contextKeyService=s,this.refresh()}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,s]=i;let r;for(const t of s)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,l.is)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);const n=S(this._id,i?t.command:t,this._hiddenStates);if(i){const i=k(this._commandService,this._keybindingService,t.command.id,t.when);(r??=[]).push(new l.Xe(t.command,t.alt,e,n,i,this._contextKeyService,this._commandService))}else{const i=new o(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),s=u.wv.join(...i.map((e=>e[1])));s.length>0&&(r??=[]).push(new l.nI(t,n,s))}}r&&r.length>0&&t.push([n,r])}return t}_sort(e){return e.sort(o._compareMenuItems)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const s=e.order||0,r=t.order||0;return sr?1:o._compareTitles((0,l.is)(e)?e.command.title:e.title,(0,l.is)(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"===typeof e?e:e.original,n="string"===typeof t?t:t.original;return i.localeCompare(n)}};w=o=m([_(3,c.d),_(4,f.b),_(5,d.fN)],w);let C=class{constructor(e,t,i,n,o,c){this._disposables=new a.Cm,this._menuInfo=new w(e,t,i.emitEventsForSubmenuChanges,n,o,c);const d=new s.uC((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(d),this._disposables.add(l.ZG.onDidChangeMenu((e=>{for(const t of this._menuInfo.allMenuIds)if(e.has(t)){d.schedule();break}})));const u=this._disposables.add(new a.Cm),h=e=>{let t=!1,i=!1,n=!1;for(const o of e)if(t=t||o.isStructuralChange,i=i||o.isEnablementChange,n=n||o.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}},g=()=>{u.add(c.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),u.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))};this._onDidChange=new r.uI({onWillAddFirstListener:g,onDidRemoveLastListener:u.clear.bind(u),delay:i.eventDebounceDelay,merge:h}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function S(e,t,i){const n=(0,l.i1)(t)?t.submenu.id:t.id,o="string"===typeof t.title?t.title:t.title.value,s=(0,u.ih)({id:`hide/${e.id}/${n}`,label:(0,p.kg)("hide.label","Hide '{0}'",o),run(){i.updateHidden(e,n,!0)}}),r=(0,u.ih)({id:`toggle/${e.id}/${n}`,label:o,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}function k(e,t,i,n=void 0,o=!0){return(0,u.ih)({id:`configureKeybinding/${i}`,label:(0,p.kg)("configure keybinding","Configure Keybinding"),enabled:o,run(){const o=!!t.lookupKeybinding(i),s=!o&&n?n.serialize():void 0;e.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(s?` +when:${s}`:""))}})}C=m([_(3,c.d),_(4,f.b),_(5,d.fN)],C)},28753:(e,t,i)=>{"use strict";i.d(t,{h:()=>o});var n=i(87778);const o=(0,n.u1)("clipboardService")},72786:(e,t,i)=>{"use strict";i.d(t,{d:()=>c,w:()=>d});var n=i(40231),o=i(5837),s=i(5091),r=i(67806),a=i(50322),l=i(87778);const c=(0,l.u1)("commandService"),d=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.vl,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"===typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.metadata&&Array.isArray(e.metadata.args)){const t=[];for(const i of e.metadata.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,a.jx)(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new r.w,this._commands.set(i,n));const o=n.unshift(e),l=(0,s.s)((()=>{o();const e=this._commands.get(i);e?.isEmpty()&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return d.registerCommand(e,((e,...i)=>e.get(c).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return o.f.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};d.registerCommand("noop",(()=>{}))},32828:(e,t,i)=>{"use strict";i.d(t,{Mo:()=>d,ad:()=>s,gD:()=>c,iB:()=>a,kW:()=>r,pG:()=>o});var n=i(87778);const o=(0,n.u1)("configurationService");function s(e,t){const i=Object.create(null);for(const n in e)r(i,n,e[n],t);return i}function r(e,t,i,n){const o=t.split("."),s=o.pop();let r=e;for(let e=0;e{"use strict";i.d(t,{Fd:()=>d,Gv:()=>k,rC:()=>S});var n=i(85053),o=i(40231),s=i(50322),r=i(41337),a=i(32828),l=i(86223),c=i(16374);const d={Configuration:"base.contributions.configuration"},u={properties:{},patternProperties:{}},h={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},_="vscode://schemas/settings/resourceLanguage",v=c.O.as(l.F.JSONContribution);class b{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new o.vl,this._onDidUpdateConfiguration=new o.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:r.kg("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},v.registerSchema(_,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),v.registerSchema(_,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const i=[];for(const{overrides:n,source:o}of e)for(const e in n){t.add(e);const s=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),r=n[e];if(s.configurationDefaultOverrides.push({value:r,source:o}),S.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,r,o,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,o),i.push(...k(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,r,o,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t;const i=this.configurationProperties[e];i&&(this.updatePropertyDefaultValue(e,i),this.updateSchema(e,i))}}this.doRegisterOverrideIdentifiers(i)}updateDefaultOverrideProperty(e,t,i){const n={type:"object",default:t.value,description:r.kg("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,a.Mo)(e)),$ref:_,defaultDefaultValue:t.value,source:i,defaultValueSource:i};this.configurationProperties[e]=n,this.defaultLanguageConfigurationOverridesNode.properties[e]=n}mergeDefaultConfigurationsForOverrideIdentifier(e,t,i,n){const o=n?.value||{},r=n?.source??new Map;if(r instanceof Map){for(const e of Object.keys(t)){const n=t[e],a=s.Gv(n)&&(s.b0(o[e])||s.Gv(o[e]));if(a){if(o[e]={...o[e]??{},...n},i)for(const t in n)r.set(`${e}.${t}`,i)}else o[e]=n,i?r.set(e,i):r.delete(e)}return{value:o,source:r}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,i,n){const o=this.configurationProperties[e],r=n?.value??o?.defaultDefaultValue;let a=i;const l=s.Gv(t)&&(void 0!==o&&"object"===o.type||void 0===o&&(s.b0(r)||s.Gv(r)));if(l){if(a=n?.source??new Map,!(a instanceof Map))return void console.error("defaultValueSource is not a Map");for(const n in t)i&&a.set(`${e}.${n}`,i);t={...s.Gv(r)?r:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,o=3,r){o=s.z(e.scope)?o:e.scope;const a=e.properties;if(a)for(const e in a){const l=a[e];t&&L(e,l)?delete a[e]:(l.source=i,l.defaultDefaultValue=a[e].default,this.updatePropertyDefaultValue(e,l),S.test(e)?l.scope=void 0:(l.scope=s.z(l.scope)?o:l.scope,l.restricted=s.z(l.restricted)?!!n?.includes(e):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],a[e].policy?.name&&this.policyConfigurations.set(a[e].policy.name,e),!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),r.add(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e]))}const l=e.allOf;if(l)for(const e of l)this.validateAndRegisterProperties(e,t,i,n,o,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);const n=e.allOf;n?.forEach(t)};t(e)}updateSchema(e,t){switch(u.properties[e]=t,t.scope){case 1:h.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:f.properties[e]=t;break;case 4:m.properties[e]=t;break;case 5:m.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:r.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,i),u.properties[t]=i,h.properties[t]=i,g.properties[t]=i,p.properties[t]=i,f.properties[t]=i,m.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:r.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};u.patternProperties[C]=e,h.patternProperties[C]=e,g.patternProperties[C]=e,p.patternProperties[C]=e,f.patternProperties[C]=e,m.patternProperties[C]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let n,o;!i||t.disallowConfigurationDefault&&i.source||(n=i.value,o=i.source),s.b0(n)&&(n=t.defaultDefaultValue,o=void 0),s.b0(n)&&(n=x(t.type)),t.default=n,t.defaultValueSource=o}}const y="\\[([^\\]]+)\\]",w=new RegExp(y,"g"),C=`^(${y})+$`,S=new RegExp(C);function k(e){const t=[];if(S.test(e)){let i=w.exec(e);while(i?.length){const n=i[1].trim();n&&t.push(n),i=w.exec(e)}}return(0,n.dM)(t)}function x(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const E=new b;function L(e,t){return e.trim()?S.test(e)?r.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==E.getConfigurationProperties()[e]?r.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==E.getPolicyConfigurations().get(t.policy?.name)?r.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,E.getPolicyConfigurations().get(t.policy?.name)):null:r.kg("config.property.empty","Cannot register an empty property")}c.O.add(d.Configuration,E)},18904:(e,t,i)=>{"use strict";i.d(t,{f1:()=>D,M$:()=>k,fN:()=>q,N1:()=>$,jQ:()=>x,M0:()=>Q});var n=i(25160),o=i(20601),s=i(14396),r=i(41337);function a(...e){switch(e.length){case 1:return(0,r.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,r.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,r.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const l=(0,r.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),c=(0,r.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class d{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw(0,s.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){while(!this._isAtEnd()){this._start=this._current;const e=this._advance();switch(e){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(a("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(a("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(a("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&(this._input.charCodeAt(this._current)===e&&(this._current++,!0))}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=d._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){while(39!==this._peek()&&!this._isAtEnd())this._advance();this._isAtEnd()?this._error(l):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;while(1){if(e>=this._input.length)return this._current=e,void this._error(c);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}while(e=this._input.length}}var u=i(87778);const h=new Map;h.set("false",!1),h.set("true",!0),h.set("isMac",n.zx),h.set("isLinux",n.j9),h.set("isWindows",n.uF),h.set("isWeb",n.HZ),h.set("isMacNative",n.zx&&!n.HZ),h.set("isEdge",n.UP),h.set("isFirefox",n.gm),h.set("isChrome",n.H8),h.set("isSafari",n.nr);const g=Object.prototype.hasOwnProperty,p={regexParsingWithErrorRecovery:!0},f=(0,r.kg)("contextkey.parser.error.emptyString","Empty context key expression"),m=(0,r.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),_=(0,r.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),v=(0,r.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),b=(0,r.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),y=(0,r.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),w=(0,r.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),C=(0,r.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class S{static{this._parseError=new Error}constructor(e=p){this._config=e,this._scanner=new d,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?y:void 0;throw this._parsingErrors.push({message:b,offset:e.offset,lexeme:d.getLexeme(e),additionalInfo:t}),S._parseError}return e}catch(e){if(e!==S._parseError)throw e;return}}else this._parsingErrors.push({message:f,offset:0,lexeme:"",additionalInfo:m})}_expr(){return this._or()}_or(){const e=[this._and()];while(this._matchOne(16)){const t=this._and();e.push(t)}return 1===e.length?e[0]:k.or(...e)}_and(){const e=[this._term()];while(this._matchOne(15)){const t=this._term();e.push(t)}return 1===e.length?e[0]:k.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),L.INSTANCE;case 12:return this._advance(),T.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,v),e?.negate()}case 17:return this._advance(),O.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),k.true();case 12:return this._advance(),k.false();case 0:{this._advance();const e=this._expr();return this._consume(1,v),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,n=i.lastIndexOf("/"),o=n===i.length-1?void 0:this._removeFlagsGY(i.substring(n+1));let s;try{s=new RegExp(i.substring(1,n),o)}catch(t){throw this._errExpectedButGot("REGEX",e)}return H.create(t,s)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let n=this._peek(),o=0;for(let t=0;t=0){const s=i.slice(t+1,o),r="i"===i[o+1]?"i":"";try{n=new RegExp(s,r)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===n)throw this._errExpectedButGot("REGEX",e);return H.create(t,n)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,_);const e=this._value();return k.notIn(t,e)}const i=this._peek().type;switch(i){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return k.equals(t,e);switch(e){case"true":return k.has(t);case"false":return k.not(t);default:return k.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return k.notEquals(t,e);switch(e){case"true":return k.not(t);case"false":return k.has(t);default:return k.notEquals(t,e)}}case 5:return this._advance(),B.create(t,this._value());case 6:return this._advance(),W.create(t,this._value());case 7:return this._advance(),M.create(t,this._value());case 8:return this._advance(),F.create(t,this._value());case 13:return this._advance(),k.in(t,this._value());default:return k.has(t)}}case 20:throw this._parsingErrors.push({message:w,offset:e.offset,lexeme:"",additionalInfo:C}),S._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=(0,r.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,d.getLexeme(t)),o=t.offset,s=d.getLexeme(t);return this._parsingErrors.push({message:n,offset:o,lexeme:s,additionalInfo:i}),S._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class k{static false(){return L.INSTANCE}static true(){return T.INSTANCE}static has(e){return I.create(e)}static equals(e,t){return D.create(e,t)}static notEquals(e,t){return A.create(e,t)}static regex(e,t){return H.create(e,t)}static in(e,t){return R.create(e,t)}static notIn(e,t){return N.create(e,t)}static not(e){return O.create(e)}static and(...e){return z.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static{this._parser=new S({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(void 0===e||null===e)return;const t=this._parser.parse(e);return t}}function x(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}function E(e,t){return e.cmp(t)}class L{static{this.INSTANCE=new L}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return T.INSTANCE}}class T{static{this.INSTANCE=new T}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return L.INSTANCE}}class I{static create(e,t=null){const i=h.get(e);return"boolean"===typeof i?i?T.INSTANCE:L.INSTANCE:new I(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=h.get(this.key);return"boolean"===typeof e?e?T.INSTANCE:L.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this)),this.negated}}class D{static create(e,t,i=null){if("boolean"===typeof t)return t?I.create(e,i):O.create(e,i);const n=h.get(e);if("boolean"===typeof n){const e=n?"true":"false";return t===e?T.INSTANCE:L.INSTANCE}return new D(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=h.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?T.INSTANCE:L.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class R{static create(e,t){return new R(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"===typeof i&&"object"===typeof t&&null!==t&&g.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=N.create(this.key,this.valueKey)),this.negated}}class N{static create(e,t){return new N(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=R.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class A{static create(e,t,i=null){if("boolean"===typeof t)return t?O.create(e,i):I.create(e,i);const n=h.get(e);if("boolean"===typeof n){const e=n?"true":"false";return t===e?L.INSTANCE:T.INSTANCE}return new A(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=h.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?L.INSTANCE:T.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class O{static create(e,t=null){const i=h.get(e);return"boolean"===typeof i?i?L.INSTANCE:T.INSTANCE:new O(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=h.get(this.key);return"boolean"===typeof e?e?L.INSTANCE:T.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this)),this.negated}}function P(e,t){if("string"===typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"===typeof e||"number"===typeof e?t(e):L.INSTANCE}class M{static create(e,t,i=null){return P(t,(t=>new M(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,i=null){return P(t,(t=>new F(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class B{static create(e,t,i=null){return P(t,(t=>new B(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))new W(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class H{static create(e,t){return new H(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this)),this.negated}}class V{static create(e){return new V(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function j(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),o=0===n.length,s=U.create(e.expr.map((e=>z.create([e,t],null,i))),null,o);s&&(n.push(s),n.sort(E))}if(1===n.length)return n[0];if(i){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,i){return U._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());while(e.length>1){const t=e.shift(),i=e.shift(),n=[];for(const e of Z(t))for(const t of Z(i))n.push(z.create([e,t],null,!1));e.unshift(U.create(n,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class $ extends I{static{this._info=[]}static all(){return $._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"===typeof i?$._info.push({...i,key:e}):!0!==i&&$._info.push({key:e,description:i,type:null!==t&&void 0!==t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return D.create(this.key,e)}}const q=(0,u.u1)("contextKeyService");function K(e,t){return et?1:0}function G(e,t,i,n){return ei?1:tn?1:0}function Q(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&Y(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(Q(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return Y(t.expr,e.expr);for(const i of e.expr)if(Q(i,t))return!0;return!1}return e.equals(t)}function Y(e,t){let i=0,n=0;while(i{"use strict";i.d(t,{J7:()=>c,W0:()=>a,aV:()=>l,nd:()=>r});var n=i(25160),o=i(41337),s=i(18904);new s.N1("isMac",n.zx,(0,o.kg)("isMac","Whether the operating system is macOS")),new s.N1("isLinux",n.j9,(0,o.kg)("isLinux","Whether the operating system is Linux"));const r=new s.N1("isWindows",n.uF,(0,o.kg)("isWindows","Whether the operating system is Windows")),a=new s.N1("isWeb",n.HZ,(0,o.kg)("isWeb","Whether the platform is a web browser")),l=(new s.N1("isMacNative",n.zx&&!n.HZ,(0,o.kg)("isMacNative","Whether the operating system is macOS on a non-browser platform")),new s.N1("isIOS",n.un,(0,o.kg)("isIOS","Whether the operating system is iOS")),new s.N1("isMobile",n.Fr,(0,o.kg)("isMobile","Whether the platform is a mobile web browser")),new s.N1("isDevelopment",!1,!0),new s.N1("productQualityType","",(0,o.kg)("productQualityType","Quality type of VS Code")),"inputFocus"),c=new s.N1(l,!1,(0,o.kg)("inputFocus","Whether keyboard focus is inside an input box"))},46403:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s,l:()=>o});var n=i(87778);const o=(0,n.u1)("contextViewService"),s=(0,n.u1)("contextMenuService")},63466:(e,t,i)=>{"use strict";i.d(t,{X:()=>o});var n=i(87778);const o=(0,n.u1)("dialogService")},47747:(e,t,i)=>{"use strict";i.d(t,{PD:()=>a,sV:()=>o});var n=i(16374);const o={EDITORS:"CodeEditors",FILES:"CodeFiles"};class s{}const r={DragAndDropContribution:"workbench.contributions.dragAndDrop"};n.O.add(r.DragAndDropContribution,new s);class a{static{this.INSTANCE=new a}constructor(){}static getInstance(){return a.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}},31554:(e,t,i)=>{"use strict";i.d(t,{k:()=>o});var n=i(87778);const o=(0,n.u1)("environmentService")},12082:(e,t,i)=>{"use strict";var n;i.d(t,{p:()=>n}),function(e){e[e["FILE"]=0]="FILE",e[e["FOLDER"]=1]="FOLDER",e[e["ROOT_FOLDER"]=2]="ROOT_FOLDER"}(n||(n={}))},73075:(e,t,i)=>{"use strict";i.d(t,{pG:()=>T,_Q:()=>I,dg:()=>w});var n=i(95994),o=i(2150),s=i(83092),r=i(76358),a=i(52469),l=i(25923),c=i(40231),d=i(41337),u=i(96371);const h=d.kg("defaultLabel","input"),g=d.kg("label.preserveCaseToggle","Preserve Case");class p extends s.l{constructor(e){super({icon:l.W.preserveCase,title:g+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,u.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class f extends a.x{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new c.vl),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new c.vl),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new c.vl),this._onInput=this._register(new c.vl),this._onKeyUp=this._register(new c.vl),this._onPreserveCaseKeyDown=this._register(new c.vl),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||h;const s=n.appendPreserveCaseLabel||"",a=n.history||[],l=!!n.flexibleHeight,d=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new r.mJ(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:d,flexibleMaxHeight:u,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new p({appendTitle:s,isChecked:!1,...n.toggleStyles})),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const g=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=g.indexOf(this.domNode.ownerDocument.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%g.length:e.equals(15)&&(i=0===t?g.length-1:t-1),e.equals(9)?(g[t].blur(),this.inputBox.focus()):i>=0&&g[i].focus(),o.fs.stop(e,!0)}}}));const f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.preserveCase.domNode),this.domNode.appendChild(f),e?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox?.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var m=i(18904),_=i(78386),v=i(5091),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}};const w=new m.N1("suggestWidgetVisible",!1,(0,d.kg)("suggestWidgetVisible","Whether suggestion are visible")),C="historyNavigationWidgetFocus",S="historyNavigationForwardsEnabled",k="historyNavigationBackwardsEnabled";let x;const E=[];function L(e,t){if(E.includes(t))throw new Error("Cannot register the same widget multiple times");E.push(t);const i=new v.Cm,n=new m.N1(C,!1).bindTo(e),s=new m.N1(S,!0).bindTo(e),r=new m.N1(k,!0).bindTo(e),a=()=>{n.set(!0),x=t},l=()=>{n.set(!1),x===t&&(x=void 0)};return(0,o.X7)(t.element)&&a(),i.add(t.onDidFocus((()=>a()))),i.add(t.onDidBlur((()=>l()))),i.add((0,v.s)((()=>{E.splice(E.indexOf(t),1),l()}))),{historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:r,dispose(){i.dispose()}}}let T=class extends n.c{constructor(e,t,i,n){super(e,t,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(L(o,this.inputBox))}};T=b([y(3,m.fN)],T);let I=class extends f{constructor(e,t,i,n,o=!1){super(e,t,o,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(L(s,this.inputBox))}};I=b([y(3,m.fN)],I),_.f.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:m.M$.and(m.M$.has(C),m.M$.equals(k,!0),m.M$.not("isComposing"),w.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{x?.showPreviousValue()}}),_.f.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:m.M$.and(m.M$.has(C),m.M$.equals(S,!0),m.M$.not("isComposing"),w.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{x?.showNextValue()}})},41187:(e,t,i)=>{"use strict";i.d(t,{TN:()=>c,fO:()=>d});var n=i(87778),o=i(5091),s=i(32828),r=i(2150),a=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},l=function(e,t){return function(i,n){t(i,n,e)}};const c=(0,n.u1)("hoverService");let d=class extends o.jG{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,t,i={},n,s){super(),this.placement=e,this.instantHover=t,this.overrideOptions=i,this.configurationService=n,this.hoverService=s,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new o.Cm),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))})))}showHover(e,t){const i="function"===typeof this.overrideOptions?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();const n=(0,r.sb)(e.target)?[e.target]:e.target.targetElements;for(const e of n)this.hoverDisposables.add((0,r.b2)(e,"keydown",(e=>{e.equals(9)&&this.hoverService.hideHover()})));const o=(0,r.sb)(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...i,persistence:{hideOnKeyDown:!0,...i.persistence},id:o,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...i.appearance}},t)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime{"use strict";i.d(t,{d:()=>n});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},59857:(e,t,i)=>{"use strict";i.d(t,{N:()=>r,v:()=>s});var n=i(4629);const o=[];function s(e,t,i){t instanceof n.d||(t=new n.d(t,[],Boolean(i))),o.push([e,t])}function r(){return o}},87778:(e,t,i)=>{"use strict";var n;i.d(t,{_$:()=>n,_Y:()=>o,u1:()=>r}),function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t}(n||(n={}));const o=r("instantiationService");function s(e,t,i){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i}],t[n.DI_TARGET]=t)}function r(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(t,e,n)};return t.toString=()=>e,n.serviceIds.set(e,t),t}},48836:(e,t,i)=>{"use strict";i.d(t,{a:()=>n});class n{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}},86223:(e,t,i)=>{"use strict";i.d(t,{F:()=>s});var n=i(40231),o=i(16374);const s={JSONContribution:"base.contributions.json"};function r(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class a{constructor(){this._onDidChangeSchema=new n.vl,this.schemasById={}}registerSchema(e,t){this.schemasById[r(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const l=new a;o.O.add(s.JSONContribution,l)},13046:(e,t,i)=>{"use strict";i.d(t,{b:()=>o});var n=i(87778);const o=(0,n.u1)("keybindingService")},78386:(e,t,i)=>{"use strict";i.d(t,{f:()=>d});var n=i(48770),o=i(25160),s=i(72786),r=i(16374),a=i(5091),l=i(67806);class c{constructor(){this._coreKeybindings=new l.w,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=c.bindToCurrentPlatform(e),i=new a.Cm;if(t&&t.primary){const s=(0,n.Zv)(t.primary,o.OS);s&&i.add(this._registerDefaultKeybinding(s,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let s=0,r=t.secondary.length;s{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(h)),this._cachedMergedKeybindings.slice(0)}}const d=new c,u={EditorModes:"platform.keybindingsRegistry"};function h(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}r.O.add(u.EditorModes,d)},48056:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(87778);const o=(0,n.u1)("labelService")},72033:(e,t,i)=>{"use strict";i.d(t,{PE:()=>Le,aG:()=>Te,er:()=>kt,YD:()=>Ae,zL:()=>wt,Nf:()=>We,cH:()=>Ve});var n=i(2150),o=i(85053),s=i(67792),r=i(40231),a=i(5091),l=i(31304);class c{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{data:t,disposable:a.jG.None}}renderElement(e,t,i,n){if(i.disposable?.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const r=new s.Qi,a=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class d{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function u(e,t){return{...t,accessibilityProvider:t.accessibilityProvider&&new d(e,t.accessibilityProvider)}}class h{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new c(e,s)));this.list=new l.B8(e,t,i,r,u(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return r.Jh.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return r.Jh.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return r.Jh.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,o.y1)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var g=i(50799),p=i(96371),f=i(90154);class m{static{this.TemplateId="row"}constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=m.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.BC)(e,(0,n.$)(".monaco-table-tr")),i=[],o=[];for(let e=0;ethis.disposables.add(new v(e,t)))),u={size:d.reduce(((e,t)=>e+t.column.weight),0),views:d.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new f.U(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:u})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const h=new m(o,s,(e=>this.splitview.getViewSize(e)));this.list=this.disposables.add(new l.B8(e,this.domNode,_(i),[h],c)),r.Jh.any(...d.map((e=>e.onDidLayout)))((([e,t])=>h.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=o.reduce(((e,t)=>e+t.weight),0),i=o[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=(0,n.li)(this.domNode),this.style(l.bG)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}var y=i(55798),w=i(90487),C=i(41197),S=i(57688),k=i(5837);class x{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new C.G6(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(e,t){return i.sorter.compare(e.element,t.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=k.f.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=k.f.empty(),i){const n=new Set,o=new Set,s=e=>{if(null===e.element)return;const t=e;if(n.add(t.element),this.nodes.set(t.element,t),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();o.add(e),this.nodesByIdentity.set(e,t)}i.onDidCreateNode?.(t)},r=e=>{if(null===e.element)return;const t=e;if(n.has(t.element)||this.nodes.delete(t.element),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}i.onDidDeleteNode?.(t)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:s,onDidDeleteNode:r})}preserveCollapseState(e=k.f.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),k.f.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t="undefined"===typeof e.collapsed?void 0:e.collapsed===S.Yo.Collapsed||e.collapsed===S.Yo.PreserveOrCollapsed||e.collapsed!==S.Yo.Expanded&&e.collapsed!==S.Yo.PreserveOrExpanded&&Boolean(e.collapsed),{...e,children:this.preserveCollapseState(e.children),collapsed:t}}const i="boolean"===typeof e.collapsible?e.collapsible:t.collapsible;let n;return n="undefined"===typeof e.collapsed||e.collapsed===S.Yo.PreserveOrCollapsed||e.collapsed===S.Yo.PreserveOrExpanded?t.collapsed:e.collapsed===S.Yo.Collapsed||e.collapsed!==S.Yo.Expanded&&Boolean(e.collapsed),{...e,collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)}}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new S.jh(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new S.jh(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new S.jh(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i),o=this.model.getNode(n);return o.element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new S.jh(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function E(e){const t=[e.element],i=e.incompressible||!1;return{element:{elements:t,incompressible:i},children:k.f.map(k.f.from(e.children),E),collapsible:e.collapsible,collapsed:e.collapsed}}function L(e){const t=[e.element],i=e.incompressible||!1;let n,o;while(1){if([o,n]=k.f.consume(k.f.from(e.children),2),1!==o.length)break;if(o[0].incompressible)break;e=o[0],t.push(e.element)}return{element:{elements:t,incompressible:i},children:k.f.map(k.f.concat(o,n),L),collapsible:e.collapsible,collapsed:e.collapsed}}function T(e,t=0){let i;return i=tT(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function I(e){return T(e,0)}function D(e,t,i){return e.element===t?{...e,children:i}:{...e,children:k.f.map(k.f.from(e.children),(e=>D(e,t,i)))}}const R=e=>({getId(t){return t.elements.map((t=>e.getId(t).toString())).join("\0")}});class N{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new x(e,t,i),this.enabled="undefined"===typeof i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=k.f.empty(),i){const n=i.diffIdentityProvider&&R(i.diffIdentityProvider);if(null===e){const e=k.f.map(t,this.enabled?L:E);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new S.jh(this.user,"Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=I(r),d=D(c,e,t),u=(this.enabled?L:E)(d),h=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if((0,o.aI)(u.element.elements,r.element.elements,h))return void this._setChildren(s,u.children||k.f.empty(),{diffIdentityProvider:n,diffDepth:1});const g=l.children.map((e=>e===r?u:e));this._setChildren(l.element,g,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode(),i=t.children,n=k.f.map(i,I),o=k.f.map(n,e?L:E);this._setChildren(null,o,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,o=e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},s=e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)};this.model.setChildren(e,t,{...i,onDidCreateNode:o,onDidDeleteNode:s})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if("undefined"===typeof e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new S.jh(this.user,`Tree element not found: ${e}`);return t}}const A=e=>e[e.length-1];class O{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new O(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}function P(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}function M(e,t){return{...t,identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(e(i))}},sorter:t.sorter&&{compare(e,i){return t.sorter.compare(e.elements[0],i.elements[0])}},filter:t.filter&&{filter(i,n){return t.filter.filter(e(i),n)}}}}class F{get onDidSplice(){return r.Jh.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return r.Jh.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return r.Jh.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||A;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new S.y2((e=>new O(n,e))),this.model=new N(e,P(this.nodeMapper,t),M(n,i))}setChildren(e,t=k.f.empty(),i={}){this.model.setChildren(e,t,i)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null===t||"undefined"===typeof t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var B=i(34125),W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class H extends y.DO{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}setChildren(e,t=k.f.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new x(e,t,i)}}class V{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,i){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,i,n){let o=this.stickyScrollDelegate.getCompressedNode(e);o||(o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements?.(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement?.(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}W([B.B],V.prototype,"compressedTreeNodeProvider",null);class j{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,i){if(this.compressedStickyNodes.clear(),0===e.length)return[];for(let n=0;ni;if(r||n>=t-1&&tthis,r=new j((()=>this.model)),a=n.map((e=>new V(s,r,e)));super(e,t,i,a,{...z(s,o),stickyScrollDelegate:r})}setChildren(e,t=k.f.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new F(e,t,i)}updateOptions(e={}){super.updateOptions(e),"undefined"!==typeof e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var $=i(9659),q=i(25923),K=i(23740),G=i(14396),Q=i(50322);function Y(e){return{...e,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function Z(e,t){return!!t.parent&&(t.parent===e||Z(e,t.parent))}function X(e,t){return e===t||Z(e,t)||Z(t,e)}class J{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new J(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class ee{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...K.L.asClassNameArray(q.W.treeItemLoading)),!0):(t.classList.remove(...K.L.asClassNameArray(q.W.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function te(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function ie(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class ne extends w.ur{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function oe(e){return e instanceof w.ur?new ne(e):e}class se{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart?.(oe(e),t)}onDragOver(e,t,i,n,o,s=!0){return this.dnd.onDragOver(oe(e),t&&t.element,i,n,o)}drop(e,t,i,n,o){this.dnd.drop(oe(e),t&&t.element,i,n,o)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.dnd.dispose()}}function re(e){return e&&{...e,collapseByDefault:!0,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new se(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>!!e.accessibilityProvider?.isChecked(t.element):void 0,getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},filter:e.filter&&{filter(t,i){return e.filter.filter(t.element,i)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}},sorter:void 0,expandOnlyOnTwistieClick:"undefined"===typeof e.expandOnlyOnTwistieClick?void 0:"function"!==typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"===typeof e.defaultFindVisibility?e.defaultFindVisibility:"undefined"===typeof e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)}}function ae(e,t){t(e),e.children.forEach((e=>ae(e,t)))}class le{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return r.Jh.map(this.tree.onDidChangeFocus,te)}get onDidChangeSelection(){return r.Jh.map(this.tree.onDidChangeSelection,te)}get onMouseDblClick(){return r.Jh.map(this.tree.onMouseDblClick,ie)}get onPointer(){return r.Jh.map(this.tree.onPointer,ie)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.vl,this._onDidChangeNodeSlowState=new r.vl,this.nodeMapper=new S.y2((e=>new J(e))),this.disposables=new a.Cm,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren="undefined"!==typeof s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=e=>s.collapseByDefault?s.collapseByDefault(e)?S.Yo.PreserveOrCollapsed:S.Yo.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,i,n,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=Y({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,o){const s=new y.w0(i),r=n.map((e=>new ee(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=re(o)||{};return new H(e,t,s,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"===typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,i=!1,n,o){if("undefined"===typeof this.root.element)throw new S.jh(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch{}}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if("undefined"===typeof this.root.element)throw new S.jh(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){const e=this.tree.getSelection();return e.map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){const e=this.tree.getFocus();return e.map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new S.jh(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i,n){await this.refreshNode(e,t,i),this.disposables.isDisposed||this.render(e,i,n)}async refreshNode(e,t,i){let n;if(this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&X(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n)return n;if(e!==this.root){const n=this.tree.getNode(e);if(n.collapsed)return e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,void this.setChildren(e,[],t,i)}return this.doRefreshSubTree(e,t,i)}async doRefreshSubTree(e,t,i){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=await this.doRefreshNode(e,t,i);e.stale=!1,await $.HC.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}async doRefreshNode(e,t,i){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if((0,Q.xZ)(t))n=Promise.resolve(t);else{const i=(0,$.wR)(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(k.f.empty());try{const o=await n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,G.MB)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return(0,Q.xZ)(i)?this.processChildren(i):(t=(0,$.SS)((async()=>this.processChildren(await i))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(G.dz))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const t of e.children)s.set(t.element,t),this.identityProvider&&r.set(t.id,{node:t,collapsed:this.tree.hasElement(t)&&this.tree.isCollapsed(t)});const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=Y({element:t,parent:e,hasChildren:o,defaultCollapseState:this.getDefaultCollapseState(t)});return o&&i.defaultCollapseState===S.Yo.PreserveOrExpanded&&a.push(i),i}const l=this.identityProvider.getId(t).toString(),c=r.get(l);if(c){const e=c.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach((e=>ae(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&!c.collapsed&&a.push(e),e}const d=Y({element:t,parent:e,id:l,hasChildren:o,defaultCollapseState:this.getDefaultCollapseState(t)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1||o&&d.defaultCollapseState===S.Yo.PreserveOrExpanded)&&a.push(d),d}));for(const e of s.values())ae(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].forceExpanded=!0,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(e){return i.diffIdentityProvider.getId(e.element)}}};this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?k.f.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class ce{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new ce(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class de{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...K.L.asClassNameArray(q.W.treeItemLoading)),!0):(t.classList.remove(...K.L.asClassNameArray(q.W.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,a.AS)(this.disposables)}}function ue(e){const t=e&&re(e);return t&&{...t,keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))}}}}class he extends le{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new S.y2((e=>new ce(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new y.w0(i),r=n.map((e=>new de(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=ue(o)||{};return new U(e,t,s,r,a)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,i){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),o=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},s=o(this.tree.getSelection()),r=o(this.tree.getFocus());super.render(e,t,i);const a=this.getSelection();let l=!1;const c=this.getFocus();let d=!1;const u=e=>{const t=e.element;if(t)for(let e=0;e{const t=this.filter.filter(e,1),i=ge(t);if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i}))),super.processChildren(e)}}function ge(e){return"boolean"===typeof e?e?1:0:(0,C.iZ)(e)?(0,C.Mn)(e.visibility):(0,C.Mn)(e)}class pe extends y.DO{constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,i){return new x(e,t,i)}}var fe=i(41337),me=i(32828),_e=i(27503),ve=i(18904),be=i(5045),ye=i(46403),we=i(87778),Ce=i(13046),Se=i(16374),ke=i(13153),xe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ee=function(e,t){return function(i,n){t(i,n,e)}};const Le=(0,we.u1)("listService");class Te{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new a.Cm,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){e!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new l.hb((0,n.li)(),"");e.style(ke.IN)}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),(0,n.X7)(e.getHTMLElement())&&this.setLastFocusedList(e),(0,a.qE)(e.onDidFocus((()=>this.setLastFocusedList(e))),(0,a.s)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}}const Ie=new ve.N1("listScrollAtBoundary","none"),De=(ve.M$.or(Ie.isEqualTo("top"),Ie.isEqualTo("both")),ve.M$.or(Ie.isEqualTo("bottom"),Ie.isEqualTo("both")),new ve.N1("listFocus",!0)),Re=new ve.N1("treestickyScrollFocused",!1),Ne=new ve.N1("listSupportsMultiselect",!0),Ae=ve.M$.and(De,ve.M$.not(be.aV),Re.negate()),Oe=new ve.N1("listHasSelectionOrFocus",!1),Pe=new ve.N1("listDoubleSelection",!1),Me=new ve.N1("listMultiSelection",!1),Fe=new ve.N1("listSelectionNavigation",!1),Be=new ve.N1("listSupportsFind",!0),We=new ve.N1("treeElementCanCollapse",!1),He=new ve.N1("treeElementHasParent",!1),Ve=new ve.N1("treeElementCanExpand",!1),je=new ve.N1("treeElementHasChild",!1),ze=new ve.N1("treeFindOpen",!1),Ue="listTypeNavigationMode",$e="listAutomaticKeyboardNavigation";function qe(e,t){const i=e.createScoped(t.getHTMLElement());return De.bindTo(i),i}function Ke(e,t){const i=Ie.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const Ge="workbench.list.multiSelectModifier",Qe="workbench.list.openMode",Ye="workbench.list.horizontalScrolling",Ze="workbench.list.defaultFindMode",Xe="workbench.list.typeNavigationMode",Je="workbench.list.keyboardNavigation",et="workbench.list.scrollByPage",tt="workbench.list.defaultFindMatchType",it="workbench.tree.indent",nt="workbench.tree.renderIndentGuides",ot="workbench.list.smoothScrolling",st="workbench.list.mouseWheelScrollSensitivity",rt="workbench.list.fastScrollSensitivity",at="workbench.tree.expandMode",lt="workbench.tree.enableStickyScroll",ct="workbench.tree.stickyScrollMaxItemCount";function dt(e){return"alt"===e.getValue(Ge)}class ut extends a.jG{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=dt(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ge)&&(this.useAltAsMultipleSelectionModifier=dt(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,l.tX)(e)}isSelectionRangeChangeEvent(e){return(0,l.mh)(e)}}function ht(e,t){const i=e.get(me.pG),n=e.get(Ce.b),o=new a.Cm,s={...t,keyboardNavigationDelegate:{mightProducePrintableCharacter(e){return n.mightProducePrintableCharacter(e)}},smoothScrolling:Boolean(i.getValue(ot)),mouseWheelScrollSensitivity:i.getValue(st),fastScrollSensitivity:i.getValue(rt),multipleSelectionController:t.multipleSelectionController??o.add(new ut(i)),keyboardNavigationEventFilter:yt(n),scrollByPage:Boolean(i.getValue(et))};return[s,o]}let gt=class extends l.B8{constructor(e,t,i,n,o,s,r,a,l){const c="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:Boolean(a.getValue(Ye)),[d,u]=l.invokeFunction(ht,o);super(e,t,i,n,{keyboardSupport:!1,...d,horizontalScrolling:c}),this.disposables.add(u),this.contextKeyService=qe(s,this),this.disposables.add(Ke(this.contextKeyService,this)),this.listSupportsMultiSelect=Ne.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);const h=Fe.bindTo(this.contextKeyService);h.set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=Oe.bindTo(this.contextKeyService),this.listDoubleSelection=Pe.bindTo(this.contextKeyService),this.listMultiSelection=Me.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=dt(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=dt(a));let t={};if(e.affectsConfiguration(Ye)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(Ye));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(et)){const e=Boolean(a.getValue(et));t={...t,scrollByPage:e}}if(e.affectsConfiguration(ot)){const e=Boolean(a.getValue(ot));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(st)){const e=a.getValue(st);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(rt)){const e=a.getValue(rt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new _t(this,{configurationService:a,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ke.t8)(e):ke.IN)}};gt=xe([Ee(5,ve.fN),Ee(6,Le),Ee(7,me.pG),Ee(8,we._Y)],gt);let pt=class extends h{constructor(e,t,i,n,o,s,r,l,c){const d="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(Ye)),[u,h]=c.invokeFunction(ht,o);super(e,t,i,n,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables=new a.Cm,this.disposables.add(h),this.contextKeyService=qe(s,this),this.disposables.add(Ke(this.contextKeyService,this.widget)),this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=Ne.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);const g=Fe.bindTo(this.contextKeyService);g.set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=dt(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=dt(l));let t={};if(e.affectsConfiguration(Ye)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Ye));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(et)){const e=Boolean(l.getValue(et));t={...t,scrollByPage:e}}if(e.affectsConfiguration(ot)){const e=Boolean(l.getValue(ot));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(st)){const e=l.getValue(st);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(rt)){const e=l.getValue(rt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new _t(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ke.t8)(e):ke.IN)}dispose(){this.disposables.dispose(),super.dispose()}};pt=xe([Ee(5,ve.fN),Ee(6,Le),Ee(7,me.pG),Ee(8,we._Y)],pt);let ft=class extends b{constructor(e,t,i,n,o,s,r,a,l,c){const d="undefined"!==typeof s.horizontalScrolling?s.horizontalScrolling:Boolean(l.getValue(Ye)),[u,h]=c.invokeFunction(ht,s);super(e,t,i,n,o,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables.add(h),this.contextKeyService=qe(r,this),this.disposables.add(Ke(this.contextKeyService,this)),this.listSupportsMultiSelect=Ne.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport);const g=Fe.bindTo(this.contextKeyService);g.set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=Oe.bindTo(this.contextKeyService),this.listDoubleSelection=Pe.bindTo(this.contextKeyService),this.listMultiSelection=Me.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=dt(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=dt(l));let t={};if(e.affectsConfiguration(Ye)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Ye));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(et)){const e=Boolean(l.getValue(et));t={...t,scrollByPage:e}}if(e.affectsConfiguration(ot)){const e=Boolean(l.getValue(ot));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(st)){const e=l.getValue(st);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(rt)){const e=l.getValue(rt);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new vt(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ke.t8)(e):ke.IN)}dispose(){this.disposables.dispose(),super.dispose()}};ft=xe([Ee(6,ve.fN),Ee(7,Le),Ee(8,me.pG),Ee(9,we._Y)],ft);class mt extends a.jG{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new r.vl),this.onDidOpen=this._onDidOpen.event,this._register(r.Jh.filter(this.widget.onDidChangeSelection,(e=>(0,n.kx)(e.browserEvent)))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!==typeof t?.openOnSingleClick&&t?.configurationService?(this.openOnSingleClick="doubleClick"!==t?.configurationService.getValue(Qe),this._register(t?.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Qe)&&(this.openOnSingleClick="doubleClick"!==t?.configurationService.getValue(Qe))})))):this.openOnSingleClick=t?.openOnSingleClick??!0}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!==typeof t.preserveFocus||t.preserveFocus,n="boolean"===typeof t.pinned?t.pinned:!i,o=!1;this._open(this.getSelectedElement(),i,n,o,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;const i=2===t.detail;if(i)return;const n=1===t.button,o=!0,s=n,r=t.ctrlKey||t.metaKey||t.altKey;this._open(e,o,s,r,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16;if(n)return;const o=!1,s=!0,r=t.ctrlKey||t.metaKey||t.altKey;this._open(e,o,s,r,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class _t extends mt{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class vt extends mt{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class bt extends mt{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function yt(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let wt=class extends H{constructor(e,t,i,n,o,s,r,a,l){const{options:c,getTypeNavigationMode:d,disposable:u}=s.invokeFunction(Tt,o);super(e,t,i,n,c),this.disposables.add(u),this.internals=new It(this,o,d,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};wt=xe([Ee(5,we._Y),Ee(6,ve.fN),Ee(7,Le),Ee(8,me.pG)],wt);let Ct=class extends U{constructor(e,t,i,n,o,s,r,a,l){const{options:c,getTypeNavigationMode:d,disposable:u}=s.invokeFunction(Tt,o);super(e,t,i,n,c),this.disposables.add(u),this.internals=new It(this,o,d,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Ct=xe([Ee(5,we._Y),Ee(6,ve.fN),Ee(7,Le),Ee(8,me.pG)],Ct);let St=class extends pe{constructor(e,t,i,n,o,s,r,a,l,c){const{options:d,getTypeNavigationMode:u,disposable:h}=r.invokeFunction(Tt,s);super(e,t,i,n,o,d),this.disposables.add(h),this.internals=new It(this,s,u,s.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};St=xe([Ee(6,we._Y),Ee(7,ve.fN),Ee(8,Le),Ee(9,me.pG)],St);let kt=class extends le{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,o,s,r,a,l,c){const{options:d,getTypeNavigationMode:u,disposable:h}=r.invokeFunction(Tt,s);super(e,t,i,n,o,d),this.disposables.add(h),this.internals=new It(this,s,u,s.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};kt=xe([Ee(6,we._Y),Ee(7,ve.fN),Ee(8,Le),Ee(9,me.pG)],kt);let xt=class extends he{constructor(e,t,i,n,o,s,r,a,l,c,d){const{options:u,getTypeNavigationMode:h,disposable:g}=a.invokeFunction(Tt,r);super(e,t,i,n,o,s,u),this.disposables.add(g),this.internals=new It(this,r,h,r.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function Et(e){const t=e.getValue(Ze);if("highlight"===t)return y.vD.Highlight;if("filter"===t)return y.vD.Filter;const i=e.getValue(Je);return"simple"===i||"highlight"===i?y.vD.Highlight:"filter"===i?y.vD.Filter:void 0}function Lt(e){const t=e.getValue(tt);return"fuzzy"===t?y.RD.Fuzzy:"contiguous"===t?y.RD.Contiguous:void 0}function Tt(e,t){const i=e.get(me.pG),n=e.get(ye.l),o=e.get(ve.fN),s=e.get(we._Y),r=()=>{const e=o.getContextKeyValue(Ue);if("automatic"===e)return l._C.Automatic;if("trigger"===e)return l._C.Trigger;const t=o.getContextKeyValue($e);if(!1===t)return l._C.Trigger;const n=i.getValue(Xe);return"automatic"===n?l._C.Automatic:"trigger"===n?l._C.Trigger:void 0},a=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(i.getValue(Ye)),[c,d]=s.invokeFunction(ht,t),u=t.paddingBottom,h=void 0!==t.renderIndentGuides?t.renderIndentGuides:i.getValue(nt);return{getTypeNavigationMode:r,disposable:d,options:{keyboardSupport:!1,...c,indent:"number"===typeof i.getValue(it)?i.getValue(it):void 0,renderIndentGuides:h,smoothScrolling:Boolean(i.getValue(ot)),defaultFindMode:Et(i),defaultFindMatchType:Lt(i),horizontalScrolling:a,scrollByPage:Boolean(i.getValue(et)),paddingBottom:u,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:t.expandOnlyOnTwistieClick??"doubleClick"===i.getValue(at),contextViewProvider:n,findWidgetStyles:ke.Dk,enableStickyScroll:Boolean(i.getValue(lt)),stickyScrollMaxItemCount:Number(i.getValue(ct))}}}xt=xe([Ee(7,we._Y),Ee(8,ve.fN),Ee(9,Le),Ee(10,me.pG)],xt);let It=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,o,s,r){this.tree=e,this.disposables=[],this.contextKeyService=qe(o,e),this.disposables.push(Ke(this.contextKeyService,e)),this.listSupportsMultiSelect=Ne.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);const a=Fe.bindTo(this.contextKeyService);a.set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=Be.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=Oe.bindTo(this.contextKeyService),this.hasDoubleSelection=Pe.bindTo(this.contextKeyService),this.hasMultiSelection=Me.bindTo(this.contextKeyService),this.treeElementCanCollapse=We.bindTo(this.contextKeyService),this.treeElementHasParent=He.bindTo(this.contextKeyService),this.treeElementCanExpand=Ve.bindTo(this.contextKeyService),this.treeElementHasChild=je.bindTo(this.contextKeyService),this.treeFindOpen=ze.bindTo(this.contextKeyService),this.treeStickyScrollFocused=Re.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=dt(r),this.updateStyleOverrides(n);const l=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},c=new Set;c.add(Ue),c.add($e),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),l()})),e.onDidChangeCollapseState(l),e.onDidChangeModel(l),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),e.onDidChangeStickyScrollFocused((e=>this.treeStickyScrollFocused.set(e))),r.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=dt(r)),n.affectsConfiguration(it)){const e=r.getValue(it);o={...o,indent:e}}if(n.affectsConfiguration(nt)&&void 0===t.renderIndentGuides){const e=r.getValue(nt);o={...o,renderIndentGuides:e}}if(n.affectsConfiguration(ot)){const e=Boolean(r.getValue(ot));o={...o,smoothScrolling:e}}if(n.affectsConfiguration(Ze)||n.affectsConfiguration(Je)){const e=Et(r);o={...o,defaultFindMode:e}}if(n.affectsConfiguration(Xe)||n.affectsConfiguration(Je)){const e=i();o={...o,typeNavigationMode:e}}if(n.affectsConfiguration(tt)){const e=Lt(r);o={...o,defaultFindMatchType:e}}if(n.affectsConfiguration(Ye)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(Ye));o={...o,horizontalScrolling:e}}if(n.affectsConfiguration(et)){const e=Boolean(r.getValue(et));o={...o,scrollByPage:e}}if(n.affectsConfiguration(at)&&void 0===t.expandOnlyOnTwistieClick&&(o={...o,expandOnlyOnTwistieClick:"doubleClick"===r.getValue(at)}),n.affectsConfiguration(lt)){const e=r.getValue(lt);o={...o,enableStickyScroll:e}}if(n.affectsConfiguration(ct)){const e=Math.max(1,r.getValue(ct));o={...o,stickyScrollMaxItemCount:e}}if(n.affectsConfiguration(st)){const e=r.getValue(st);o={...o,mouseWheelScrollSensitivity:e}}if(n.affectsConfiguration(rt)){const e=r.getValue(rt);o={...o,fastScrollSensitivity:e}}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(c)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new bt(e,{configurationService:r,...t}),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?(0,ke.t8)(e):ke.IN)}dispose(){this.disposables=(0,a.AS)(this.disposables)}};It=xe([Ee(4,ve.fN),Ee(5,Le),Ee(6,me.pG)],It);const Dt=Se.O.as(_e.Fd.Configuration);Dt.registerConfiguration({id:"workbench",order:7,title:(0,fe.kg)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Ge]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,fe.kg)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,fe.kg)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,fe.kg)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[Qe]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,fe.kg)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Ye]:{type:"boolean",default:!1,description:(0,fe.kg)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[et]:{type:"boolean",default:!1,description:(0,fe.kg)("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[it]:{type:"number",default:8,minimum:4,maximum:40,description:(0,fe.kg)("tree indent setting","Controls tree indentation in pixels.")},[nt]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,fe.kg)("render tree indent guides","Controls whether the tree should render indent guides.")},[ot]:{type:"boolean",default:!1,description:(0,fe.kg)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[st]:{type:"number",default:1,markdownDescription:(0,fe.kg)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[rt]:{type:"number",default:5,markdownDescription:(0,fe.kg)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[Ze]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,fe.kg)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,fe.kg)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,fe.kg)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[Je]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,fe.kg)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,fe.kg)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,fe.kg)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,fe.kg)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,fe.kg)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[tt]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,fe.kg)("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),(0,fe.kg)("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:(0,fe.kg)("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[at]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,fe.kg)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[lt]:{type:"boolean",default:!0,description:(0,fe.kg)("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[ct]:{type:"number",minimum:1,default:7,markdownDescription:(0,fe.kg)("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[Xe]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:(0,fe.kg)("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})},12660:(e,t,i)=>{"use strict";i.d(t,{$b:()=>l,Cr:()=>u,Dk:()=>h,rr:()=>a});var n=i(40231),o=i(5091),s=i(18904),r=i(87778);const a=(0,r.u1)("logService");var l;(function(e){e[e["Off"]=0]="Off",e[e["Trace"]=1]="Trace",e[e["Debug"]=2]="Debug",e[e["Info"]=3]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=5]="Error"})(l||(l={}));const c=l.Info;class d extends o.jG{constructor(){super(...arguments),this.level=c,this._onDidChangeLogLevel=this._register(new n.vl),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==l.Off&&this.level<=e}}class u extends d{constructor(e=c,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(l.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(l.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(l.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(l.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(l.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}}class h extends d{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}function g(e){switch(e){case l.Trace:return"trace";case l.Debug:return"debug";case l.Info:return"info";case l.Warning:return"warn";case l.Error:return"error";case l.Off:return"off"}}new s.N1("logLevel",g(l.Info))},45658:(e,t,i)=>{"use strict";i.d(t,{DR:()=>l,cj:()=>n,oc:()=>o});var n,o,s=i(73124),r=i(41337),a=i(87778);(function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"})(n||(n={})),function(e){function t(e,t){return t-e}e.compare=t;const i=Object.create(null);function n(e){return i[e]||""}function o(t){switch(t){case s.A.Error:return e.Error;case s.A.Warning:return e.Warning;case s.A.Info:return e.Info;case s.A.Ignore:return e.Hint}}function a(t){switch(t){case e.Error:return s.A.Error;case e.Warning:return s.A.Warning;case e.Info:return s.A.Info;case e.Hint:return s.A.Ignore}}i[e.Error]=(0,r.kg)("sev.error","Error"),i[e.Warning]=(0,r.kg)("sev.warning","Warning"),i[e.Info]=(0,r.kg)("sev.info","Info"),e.toString=n,e.fromSeverity=o,e.toSeverity=a}(n||(n={})),function(e){const t="";function i(e){return o(e,!0)}function o(e,i){const o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"===typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(n.toString(e.severity)):o.push(t),e.message&&i?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=i,e.makeKeyOptionalMessage=o}(o||(o={}));const l=(0,a.u1)("markerService")},95062:(e,t,i)=>{"use strict";i.d(t,{AI:()=>s,Kz:()=>a,Ot:()=>r});var n=i(73124),o=i(87778),s=n.A;const r=(0,o.u1)("notificationService");class a{}},5480:(e,t,i)=>{"use strict";i.d(t,{V:()=>s,w:()=>r});var n=i(39751),o=i(79741);function s(e,t,i){return(0,o.eP)({debugName:()=>`Configuration Key "${e}"`},(t=>i.onDidChangeConfiguration((i=>{i.affectsConfiguration(e)&&t(i)}))),(()=>i.getValue(e)??t))}function r(e,t,i){const o=e.bindTo(t);return(0,n.zL)({debugName:()=>`Set Context Key "${e.key}"`},(e=>{o.set(i(e))}))}},10170:(e,t,i)=>{"use strict";i.d(t,{C:()=>o,e:()=>s});var n=i(87778);const o=(0,n.u1)("openerService");function s(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},44838:(e,t,i)=>{"use strict";i.d(t,{G5:()=>o,N8:()=>r,ke:()=>s});var n=i(87778);const o=(0,n.u1)("progressService");Object.freeze({total(){},worked(){},done(){}});class s{static{this.None=Object.freeze({report(){}})}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}const r=(0,n.u1)("editorProgressService")},60018:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>a,aJ:()=>n});var n,o=i(85053),s=i(5091),r=i(16374);(function(e){e[e["PRESERVE"]=0]="PRESERVE",e[e["LAST"]=1]="LAST"})(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};class l{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.s)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,o.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){const t=e&&this.providers.find((t=>e.startsWith(t.prefix)))||void 0;return t||this.defaultProvider}}r.O.add(a.Quickaccess,new l)},3874:(e,t,i)=>{"use strict";i.d(t,{C1:()=>r,Fp:()=>a,GK:()=>d,Ym:()=>o,dH:()=>l,kF:()=>s});var n=i(87778);const o={ctrlCmd:!1,alt:!1};var s,r,a,l;(function(e){e[e["Blur"]=1]="Blur",e[e["Gesture"]=2]="Gesture",e[e["Other"]=3]="Other"})(s||(s={})),function(e){e[e["NONE"]=0]="NONE",e[e["FIRST"]=1]="FIRST",e[e["SECOND"]=2]="SECOND",e[e["LAST"]=3]="LAST"}(r||(r={})),function(e){e[e["First"]=1]="First",e[e["Second"]=2]="Second",e[e["Last"]=3]="Last",e[e["Next"]=4]="Next",e[e["Previous"]=5]="Previous",e[e["NextPage"]=6]="NextPage",e[e["PreviousPage"]=7]="PreviousPage",e[e["NextSeparator"]=8]="NextSeparator",e[e["PreviousSeparator"]=9]="PreviousSeparator"}(a||(a={})),function(e){e[e["Title"]=1]="Title",e[e["Inline"]=2]="Inline"}(l||(l={}));class c{constructor(e){this.options=e}}new c;const d=(0,n.u1)("quickInputService")},16374:(e,t,i)=>{"use strict";i.d(t,{O:()=>r});var n=i(79109),o=i(50322);class s{constructor(){this.data=new Map}add(e,t){n.ok(o.Kg(e)),n.ok(o.Gv(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const r=new s},94216:(e,t,i)=>{"use strict";i.d(t,{CS:()=>p,pc:()=>v,LP:()=>f});var n,o,s=i(40231),r=i(5091),a=i(50322),l=i(9659),c=i(61565);(function(e){e[e["STORAGE_DOES_NOT_EXIST"]=0]="STORAGE_DOES_NOT_EXIST",e[e["STORAGE_IN_MEMORY"]=1]="STORAGE_IN_MEMORY"})(n||(n={})),function(e){e[e["None"]=0]="None",e[e["Initialized"]=1]="Initialized",e[e["Closed"]=2]="Closed"}(o||(o={}));class d extends r.jG{static{this.DEFAULT_FLUSH_DELAY=100}constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new s.fV),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=o.None,this.cache=new Map,this.flushDelayer=this._register(new l.Th(d.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach(((e,t)=>this.acceptExternal(t,e))),e.deleted?.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===o.Closed)return;let i=!1;if((0,a.z)(t))i=this.cache.delete(e);else{const n=this.cache.get(e);n!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return(0,a.z)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.z)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.z)(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===o.Closed)return;if((0,a.z)(t))return this.delete(e,i);const n=(0,a.Gv)(t)||Array.isArray(t)?(0,c.As)(t):String(t),s=this.cache.get(e);return s!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}async delete(e,t=!1){if(this.state===o.Closed)return;const i=this.cache.delete(e);return i?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{if(!this.hasPending)while(this.whenFlushedCallbacks.length)this.whenFlushedCallbacks.pop()?.()}))}async doFlush(e){return this.options.hint===n.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger((()=>this.flushPending()),e)}}class u{constructor(){this.onDidChangeItemsExternal=s.Jh.None,this.items=new Map}async updateItems(e){e.insert?.forEach(((e,t)=>this.items.set(t,e))),e.delete?.forEach((e=>this.items.delete(e)))}}var h=i(87778);const g="__$__targetStorageMarker",p=(0,h.u1)("storageService");var f;function m(e){const t=e.get(g);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}(function(e){e[e["NONE"]=0]="NONE",e[e["SHUTDOWN"]=1]="SHUTDOWN"})(f||(f={}));class _ extends r.jG{static{this.DEFAULT_FLUSH_INTERVAL=6e4}constructor(e={flushInterval:_.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new s.fV),this._onDidChangeTarget=this._register(new s.fV),this._onWillSaveState=this._register(new s.vl),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return s.Jh.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===g){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){return this.getStorage(t)?.get(e,i)}getBoolean(e,t,i){return this.getStorage(t)?.getBoolean(e,i)}getNumber(e,t,i){return this.getStorage(t)?.getNumber(e,i)}store(e,t,i,n,o=!1){(0,a.z)(t)?this.remove(e,i,o):this.withPausedEmitters((()=>{this.updateKeyTarget(e,i,n),this.getStorage(i)?.set(e,t,o)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,i)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){const o=this.getKeyTargets(t);"number"===typeof i?o[e]!==i&&(o[e]=i,this.getStorage(t)?.set(g,JSON.stringify(o),n)):"number"===typeof o[e]&&(delete o[e],this.getStorage(t)?.set(g,JSON.stringify(o),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?m(t):Object.create(null)}}class v extends _{constructor(){super(),this.applicationStorage=this._register(new d(new u,{hint:n.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new d(new u,{hint:n.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new d(new u,{hint:n.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},11086:(e,t,i)=>{"use strict";i.d(t,{k:()=>o});var n=i(87778);const o=(0,n.u1)("telemetryService")},13153:(e,t,i)=>{"use strict";i.d(t,{Dk:()=>u,IN:()=>g,RE:()=>f,XS:()=>m,cv:()=>a,ho:()=>d,ir:()=>r,m$:()=>h,mk:()=>c,oJ:()=>l,t8:()=>p});var n=i(66344),o=i(85476);function s(e,t){const i={...t};for(const t in e){const o=e[t];i[t]=void 0!==o?(0,n.GuP)(o):void 0}return i}const r={keybindingLabelBackground:(0,n.GuP)(n.HDX),keybindingLabelForeground:(0,n.GuP)(n.eUu),keybindingLabelBorder:(0,n.GuP)(n.zUX),keybindingLabelBottomBorder:(0,n.GuP)(n.Qfh),keybindingLabelShadow:(0,n.GuP)(n.f9l)},a={buttonForeground:(0,n.GuP)(n.G_h),buttonSeparator:(0,n.GuP)(n.Q1$),buttonBackground:(0,n.GuP)(n.XJc),buttonHoverBackground:(0,n.GuP)(n.T9h),buttonSecondaryForeground:(0,n.GuP)(n.Inn),buttonSecondaryBackground:(0,n.GuP)(n.xOA),buttonSecondaryHoverBackground:(0,n.GuP)(n.nZG),buttonBorder:(0,n.GuP)(n.raQ)},l={progressBarBackground:(0,n.GuP)(n.BTi)},c={inputActiveOptionBorder:(0,n.GuP)(n.uNK),inputActiveOptionForeground:(0,n.GuP)(n.$$0),inputActiveOptionBackground:(0,n.GuP)(n.c1f)},d=((0,n.GuP)(n.jOE),(0,n.GuP)(n.Ukx),(0,n.GuP)(n.Ips),(0,n.GuP)(n.kPT),(0,n.GuP)(n.xWN),(0,n.GuP)(n.ZBU),(0,n.GuP)(n.jr9),(0,n.GuP)(n.OcU),(0,n.GuP)(n.C5U),(0,n.GuP)(n.t0B),(0,n.GuP)(n.CgL),(0,n.GuP)(n.FiB),(0,n.GuP)(n.f9l),(0,n.GuP)(n.b1q),(0,n.GuP)(n.tYX),(0,n.GuP)(n.JPj),(0,n.GuP)(n.bNw),(0,n.GuP)(n.vwp),{inputBackground:(0,n.GuP)(n.L4c),inputForeground:(0,n.GuP)(n.cws),inputBorder:(0,n.GuP)(n.Zgs),inputValidationInfoBorder:(0,n.GuP)(n.YSW),inputValidationInfoBackground:(0,n.GuP)(n.I$A),inputValidationInfoForeground:(0,n.GuP)(n.L9Z),inputValidationWarningBorder:(0,n.GuP)(n.C1n),inputValidationWarningBackground:(0,n.GuP)(n.ULt),inputValidationWarningForeground:(0,n.GuP)(n.T5N),inputValidationErrorBorder:(0,n.GuP)(n.eYZ),inputValidationErrorBackground:(0,n.GuP)(n._$n),inputValidationErrorForeground:(0,n.GuP)(n.h9z)}),u={listFilterWidgetBackground:(0,n.GuP)(n.pnl),listFilterWidgetOutline:(0,n.GuP)(n.fiM),listFilterWidgetNoMatchesOutline:(0,n.GuP)(n.P9Z),listFilterWidgetShadow:(0,n.GuP)(n.H8q),inputBoxStyles:d,toggleStyles:c},h={badgeBackground:(0,n.GuP)(n.WMx),badgeForeground:(0,n.GuP)(n.zRE),badgeBorder:(0,n.GuP)(n.b1q)},g=((0,n.GuP)(n.vV$),(0,n.GuP)(n.mc0),(0,n.GuP)(n.etE),(0,n.GuP)(n.etE),(0,n.GuP)(n.sAS),{listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.GuP)(n.VFX),listFocusForeground:(0,n.GuP)(n.efJ),listFocusOutline:(0,n.GuP)(n.p7Y),listActiveSelectionBackground:(0,n.GuP)(n.Rjz),listActiveSelectionForeground:(0,n.GuP)(n.GVV),listActiveSelectionIconForeground:(0,n.GuP)(n.fED),listFocusAndSelectionOutline:(0,n.GuP)(n.gtq),listFocusAndSelectionBackground:(0,n.GuP)(n.Rjz),listFocusAndSelectionForeground:(0,n.GuP)(n.GVV),listInactiveSelectionBackground:(0,n.GuP)(n.uNx),listInactiveSelectionIconForeground:(0,n.GuP)(n.C9U),listInactiveSelectionForeground:(0,n.GuP)(n.f4y),listInactiveFocusBackground:(0,n.GuP)(n.CQ3),listInactiveFocusOutline:(0,n.GuP)(n.ijf),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listDropOverBackground:(0,n.GuP)(n.Yoe),listDropBetweenBackground:(0,n.GuP)(n.yIp),listSelectionOutline:(0,n.GuP)(n.buw),listHoverOutline:(0,n.GuP)(n.buw),treeIndentGuidesStroke:(0,n.GuP)(n.U4U),treeInactiveIndentGuidesStroke:(0,n.GuP)(n.pft),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:(0,n.GuP)(n.bXl),tableColumnsBorder:(0,n.GuP)(n.k5u),tableOddRowsBackgroundColor:(0,n.GuP)(n.sbQ)});function p(e){return s(e,g)}const f={selectBackground:(0,n.GuP)(n.rvE),selectListBackground:(0,n.GuP)(n.lWP),selectForeground:(0,n.GuP)(n.yqq),decoratorRightForeground:(0,n.GuP)(n.NBf),selectBorder:(0,n.GuP)(n.HcB),focusBorder:(0,n.GuP)(n.tAP),listFocusBackground:(0,n.GuP)(n.AlL),listInactiveSelectionIconForeground:(0,n.GuP)(n.c7i),listFocusForeground:(0,n.GuP)(n.nH),listFocusOutline:(0,n.HP_)(n.buw,o.Q1.transparent.toString()),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listHoverOutline:(0,n.GuP)(n.buw),selectListBorder:(0,n.GuP)(n.sIe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},m={shadowColor:(0,n.GuP)(n.f9l),borderColor:(0,n.GuP)(n.g$2),foregroundColor:(0,n.GuP)(n.dd_),backgroundColor:(0,n.GuP)(n.c6Y),selectionForegroundColor:(0,n.GuP)(n.pmr),selectionBackgroundColor:(0,n.GuP)(n.Ux$),selectionBorderColor:(0,n.GuP)(n.SNb),separatorColor:(0,n.GuP)(n.D7X),scrollbarShadow:(0,n.GuP)(n.bXl),scrollbarSliderBackground:(0,n.GuP)(n.gnV),scrollbarSliderHoverBackground:(0,n.GuP)(n.cI_),scrollbarSliderActiveBackground:(0,n.GuP)(n.mhZ)}},66344:(e,t,i)=>{"use strict";i.d(t,{FdG:()=>n.Fd,buw:()=>d,GuP:()=>n.Gu,Bbc:()=>n.Bb,HP_:()=>n.HP,WMx:()=>h,zRE:()=>g,sAS:()=>ce,vV$:()=>ae,etE:()=>le,mc0:()=>re,XJc:()=>tt,raQ:()=>nt,G_h:()=>Je,T9h:()=>it,xOA:()=>st,Inn:()=>ot,nZG:()=>rt,Q1$:()=>et,OcU:()=>pt,C5U:()=>mt,t0B:()=>ft,b1q:()=>c,EY1:()=>Z,ZEf:()=>X,Gj6:()=>J,ld8:()=>te,$BZ:()=>ie,GNm:()=>ee,Ztu:()=>N,YtV:()=>b,AN$:()=>x,Rbi:()=>k,f3U:()=>F,Ubg:()=>B,ECk:()=>H,p8Y:()=>W,S5J:()=>V,By2:()=>y,i61:()=>R,WfR:()=>j,oZ8:()=>z,tan:()=>P,IIb:()=>D,pOz:()=>I,WL6:()=>$,P6i:()=>U,B2L:()=>Q,sjA:()=>G,_pU:()=>K,HwT:()=>q,seu:()=>A,rm4:()=>O,QwA:()=>M,whs:()=>E,Stt:()=>T,Hng:()=>L,CgL:()=>w,sIe:()=>S,FiB:()=>C,tAP:()=>l,CU6:()=>r,t4B:()=>a,c1f:()=>Be,uNK:()=>Me,$$0:()=>We,L4c:()=>Ae,Zgs:()=>Pe,cws:()=>Oe,_$n:()=>qe,eYZ:()=>Ge,h9z:()=>Ke,I$A:()=>He,YSW:()=>je,L9Z:()=>Ve,ULt:()=>ze,C1n:()=>$e,T5N:()=>Ue,HDX:()=>_t,zUX:()=>bt,Qfh:()=>yt,eUu:()=>vt,Rjz:()=>xt,GVV:()=>Et,fED:()=>Lt,yIp:()=>Mt,Yoe:()=>Pt,pnl:()=>Wt,P9Z:()=>Vt,fiM:()=>Ht,H8q:()=>jt,gtq:()=>kt,VFX:()=>wt,efJ:()=>Ct,eMz:()=>Bt,p7Y:()=>St,QI5:()=>Ft,lO1:()=>At,QRv:()=>Ot,CQ3:()=>Rt,ijf:()=>Nt,uNx:()=>Tt,f4y:()=>It,C9U:()=>Dt,c6Y:()=>Qt,g$2:()=>Kt,dd_:()=>Gt,Ux$:()=>Zt,SNb:()=>Xt,pmr:()=>Yt,D7X:()=>Jt,ILr:()=>Re,yLC:()=>De,AjU:()=>xe,K1Z:()=>Ne,KoI:()=>Te,yr0:()=>Le,Xp1:()=>Ee,uMG:()=>Ie,yLr:()=>n.yL,fAP:()=>ye,z5H:()=>we,iwL:()=>oi,NBf:()=>ni,tYX:()=>Ce,bNw:()=>ke,JPj:()=>Se,BTi:()=>v,ELA:()=>ei,HJZ:()=>ti,AlL:()=>li,nH:()=>ri,c7i:()=>ai,er1:()=>ii,Ukx:()=>lt,Ips:()=>ct,jOE:()=>at,xWN:()=>ut,ZBU:()=>ht,kPT:()=>dt,jr9:()=>gt,x1A:()=>n.x1,bXl:()=>p,mhZ:()=>_,gnV:()=>f,cI_:()=>m,rvE:()=>Qe,HcB:()=>Xe,yqq:()=>Ze,lWP:()=>Ye,k5u:()=>$t,sbQ:()=>qt,vwp:()=>u,JO0:()=>n.JO,pft:()=>Ut,U4U:()=>zt,DSL:()=>oe,f9l:()=>ne});var n=i(75115),o=i(41337),s=i(85476);const r=(0,n.x1)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},o.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),a=((0,n.x1)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},o.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),(0,n.x1)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},o.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),(0,n.x1)("descriptionForeground",{light:"#717171",dark:(0,n.JO)(r,.7),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},o.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),(0,n.x1)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},o.kg("iconForeground","The default color for icons in the workbench."))),l=(0,n.x1)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},o.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),c=(0,n.x1)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},o.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),d=(0,n.x1)("contrastActiveBorder",{light:null,dark:null,hcDark:l,hcLight:l},o.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),u=((0,n.x1)("selection.background",null,o.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),(0,n.x1)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},o.kg("textLinkForeground","Foreground color for links in text."))),h=((0,n.x1)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},o.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),(0,n.x1)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Q1.black,hcLight:"#292929"},o.kg("textSeparatorForeground","Color for text separators.")),(0,n.x1)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},o.kg("textPreformatForeground","Foreground color for preformatted text segments.")),(0,n.x1)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},o.kg("textPreformatBackground","Background color for preformatted text segments.")),(0,n.x1)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},o.kg("textBlockQuoteBackground","Background color for block quotes in text.")),(0,n.x1)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Q1.white,hcLight:"#292929"},o.kg("textBlockQuoteBorder","Border color for block quotes in text.")),(0,n.x1)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Q1.black,hcLight:"#F2F2F2"},o.kg("textCodeBlockBackground","Background color for code blocks in text.")),(0,n.x1)("sash.hoverBorder",l,o.kg("sashActiveBorder","Border color of active sashes.")),(0,n.x1)("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Q1.black,hcLight:"#0F4A85"},o.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),g=(0,n.x1)("badge.foreground",{dark:s.Q1.white,light:"#333",hcDark:s.Q1.white,hcLight:s.Q1.white},o.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),p=(0,n.x1)("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},o.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),f=(0,n.x1)("scrollbarSlider.background",{dark:s.Q1.fromHex("#797979").transparent(.4),light:s.Q1.fromHex("#646464").transparent(.4),hcDark:(0,n.JO)(c,.6),hcLight:(0,n.JO)(c,.4)},o.kg("scrollbarSliderBackground","Scrollbar slider background color.")),m=(0,n.x1)("scrollbarSlider.hoverBackground",{dark:s.Q1.fromHex("#646464").transparent(.7),light:s.Q1.fromHex("#646464").transparent(.7),hcDark:(0,n.JO)(c,.8),hcLight:(0,n.JO)(c,.8)},o.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),_=(0,n.x1)("scrollbarSlider.activeBackground",{dark:s.Q1.fromHex("#BFBFBF").transparent(.4),light:s.Q1.fromHex("#000000").transparent(.6),hcDark:c,hcLight:c},o.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),v=(0,n.x1)("progressBar.background",{dark:s.Q1.fromHex("#0E70C0"),light:s.Q1.fromHex("#0E70C0"),hcDark:c,hcLight:c},o.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),b=(0,n.x1)("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("editorBackground","Editor background color.")),y=(0,n.x1)("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Q1.white,hcLight:r},o.kg("editorForeground","Editor default foreground color.")),w=((0,n.x1)("editorStickyScroll.background",b,o.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),(0,n.x1)("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},o.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),(0,n.x1)("editorStickyScroll.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),(0,n.x1)("editorStickyScroll.shadow",p,o.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),(0,n.x1)("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Q1.white},o.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),C=(0,n.x1)("editorWidget.foreground",r,o.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),S=(0,n.x1)("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:c,hcLight:c},o.kg("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),k=((0,n.x1)("editorWidget.resizeBorder",null,o.kg("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),(0,n.x1)("editorError.background",null,o.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},o.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),x=(0,n.x1)("editorError.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},o.kg("errorBorder","If set, color of double underlines for errors in the editor.")),E=(0,n.x1)("editorWarning.background",null,o.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),L=(0,n.x1)("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},o.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),T=(0,n.x1)("editorWarning.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#FFCC00").transparent(.8),hcLight:s.Q1.fromHex("#FFCC00").transparent(.8)},o.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),I=((0,n.x1)("editorInfo.background",null,o.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},o.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),D=(0,n.x1)("editorInfo.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},o.kg("infoBorder","If set, color of double underlines for infos in the editor.")),R=(0,n.x1)("editorHint.foreground",{dark:s.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},o.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),N=((0,n.x1)("editorHint.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},o.kg("hintBorder","If set, color of double underlines for hints in the editor.")),(0,n.x1)("editorLink.activeForeground",{dark:"#4E94CE",light:s.Q1.blue,hcDark:s.Q1.cyan,hcLight:"#292929"},o.kg("activeLinkForeground","Color of active links."))),A=(0,n.x1)("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},o.kg("editorSelectionBackground","Color of the editor selection.")),O=(0,n.x1)("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Q1.white},o.kg("editorSelectionForeground","Color of the selected text for high contrast.")),P=(0,n.x1)("editor.inactiveSelectionBackground",{light:(0,n.JO)(A,.5),dark:(0,n.JO)(A,.5),hcDark:(0,n.JO)(A,.7),hcLight:(0,n.JO)(A,.5)},o.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),M=(0,n.x1)("editor.selectionHighlightBackground",{light:(0,n.oG)(A,b,.3,.6),dark:(0,n.oG)(A,b,.3,.6),hcDark:null,hcLight:null},o.kg("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),F=((0,n.x1)("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:d,hcLight:d},o.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),(0,n.x1)("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},o.kg("editorFindMatch","Color of the current search match.")),(0,n.x1)("editor.findMatchForeground",null,o.kg("editorFindMatchForeground","Text color of the current search match."))),B=(0,n.x1)("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},o.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),W=(0,n.x1)("editor.findMatchHighlightForeground",null,o.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),H=((0,n.x1)("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},o.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editor.findMatchBorder",{light:null,dark:null,hcDark:d,hcLight:d},o.kg("editorFindMatchBorder","Border color of the current search match.")),(0,n.x1)("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:d,hcLight:d},o.kg("findMatchHighlightBorder","Border color of the other search matches."))),V=(0,n.x1)("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:(0,n.JO)(d,.4),hcLight:(0,n.JO)(d,.4)},o.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),j=((0,n.x1)("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},o.kg("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorHoverWidget.background",w,o.kg("hoverBackground","Background color of the editor hover."))),z=((0,n.x1)("editorHoverWidget.foreground",C,o.kg("hoverForeground","Foreground color of the editor hover.")),(0,n.x1)("editorHoverWidget.border",S,o.kg("hoverBorder","Border color of the editor hover."))),U=((0,n.x1)("editorHoverWidget.statusBarBackground",{dark:(0,n.a)(j,.2),light:(0,n.e$)(j,.05),hcDark:w,hcLight:w},o.kg("statusBarBackground","Background color of the editor hover status bar.")),(0,n.x1)("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Q1.white,hcLight:s.Q1.black},o.kg("editorInlayHintForeground","Foreground color of inline hints"))),$=(0,n.x1)("editorInlayHint.background",{dark:(0,n.JO)(h,.1),light:(0,n.JO)(h,.1),hcDark:(0,n.JO)(s.Q1.white,.1),hcLight:(0,n.JO)(h,.1)},o.kg("editorInlayHintBackground","Background color of inline hints")),q=(0,n.x1)("editorInlayHint.typeForeground",U,o.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),K=(0,n.x1)("editorInlayHint.typeBackground",$,o.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),G=(0,n.x1)("editorInlayHint.parameterForeground",U,o.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Q=(0,n.x1)("editorInlayHint.parameterBackground",$,o.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),Y=(0,n.x1)("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},o.kg("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Z=((0,n.x1)("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},o.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),(0,n.x1)("editorLightBulbAi.foreground",Y,o.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),(0,n.x1)("editor.snippetTabstopHighlightBackground",{dark:new s.Q1(new s.bU(124,124,124,.3)),light:new s.Q1(new s.bU(10,50,100,.2)),hcDark:new s.Q1(new s.bU(124,124,124,.3)),hcLight:new s.Q1(new s.bU(10,50,100,.2))},o.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),(0,n.x1)("editor.snippetTabstopHighlightBorder",null,o.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBackground",null,o.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Q1(new s.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},o.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new s.Q1(new s.bU(155,185,85,.2))),X=new s.Q1(new s.bU(255,0,0,.2)),J=(0,n.x1)("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},o.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ee=(0,n.x1)("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},o.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),te=((0,n.x1)("diffEditor.insertedLineBackground",{dark:Z,light:Z,hcDark:null,hcLight:null},o.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditor.removedLineBackground",{dark:X,light:X,hcDark:null,hcLight:null},o.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditorGutter.insertedLineBackground",null,o.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),(0,n.x1)("diffEditorGutter.removedLineBackground",null,o.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),(0,n.x1)("diffEditorOverview.insertedForeground",null,o.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content."))),ie=(0,n.x1)("diffEditorOverview.removedForeground",null,o.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),ne=((0,n.x1)("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},o.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),(0,n.x1)("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},o.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),(0,n.x1)("diffEditor.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("diffEditorBorder","Border color between the two text editors.")),(0,n.x1)("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},o.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),(0,n.x1)("diffEditor.unchangedRegionBackground","sideBar.background",o.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedRegionForeground","foreground",o.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},o.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),(0,n.x1)("widget.shadow",{dark:(0,n.JO)(s.Q1.black,.36),light:(0,n.JO)(s.Q1.black,.16),hcDark:null,hcLight:null},o.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),oe=(0,n.x1)("widget.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),se=(0,n.x1)("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},o.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),re=((0,n.x1)("toolbar.hoverOutline",{dark:null,light:null,hcDark:d,hcLight:d},o.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),(0,n.x1)("toolbar.activeBackground",{dark:(0,n.a)(se,.1),light:(0,n.e$)(se,.1),hcDark:null,hcLight:null},o.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),(0,n.x1)("breadcrumb.foreground",(0,n.JO)(r,.8),o.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items."))),ae=(0,n.x1)("breadcrumb.background",b,o.kg("breadcrumbsBackground","Background color of breadcrumb items.")),le=(0,n.x1)("breadcrumb.focusForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},o.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),ce=(0,n.x1)("breadcrumb.activeSelectionForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},o.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),de=((0,n.x1)("breadcrumbPicker.background",w,o.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),.5),ue=s.Q1.fromHex("#40C8AE").transparent(de),he=s.Q1.fromHex("#40A6FF").transparent(de),ge=s.Q1.fromHex("#606060").transparent(.4),pe=.4,fe=1,me=(0,n.x1)("merge.currentHeaderBackground",{dark:ue,light:ue,hcDark:null,hcLight:null},o.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),_e=((0,n.x1)("merge.currentContentBackground",(0,n.JO)(me,pe),o.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.incomingHeaderBackground",{dark:he,light:he,hcDark:null,hcLight:null},o.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),ve=((0,n.x1)("merge.incomingContentBackground",(0,n.JO)(_e,pe),o.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.commonHeaderBackground",{dark:ge,light:ge,hcDark:null,hcLight:null},o.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),be=((0,n.x1)("merge.commonContentBackground",(0,n.JO)(ve,pe),o.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},o.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),ye=((0,n.x1)("editorOverviewRuler.currentContentForeground",{dark:(0,n.JO)(me,fe),light:(0,n.JO)(me,fe),hcDark:be,hcLight:be},o.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.incomingContentForeground",{dark:(0,n.JO)(_e,fe),light:(0,n.JO)(_e,fe),hcDark:be,hcLight:be},o.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.commonContentForeground",{dark:(0,n.JO)(ve,fe),light:(0,n.JO)(ve,fe),hcDark:be,hcLight:be},o.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},o.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),we=(0,n.x1)("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",o.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Ce=(0,n.x1)("problemsErrorIcon.foreground",k,o.kg("problemsErrorIconForeground","The color used for the problems error icon.")),Se=(0,n.x1)("problemsWarningIcon.foreground",L,o.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),ke=(0,n.x1)("problemsInfoIcon.foreground",I,o.kg("problemsInfoIconForeground","The color used for the problems info icon.")),xe=(0,n.x1)("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},o.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Ee=(0,n.x1)("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},o.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),Le=(0,n.x1)("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},o.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Te=(0,n.x1)("minimap.infoHighlight",{dark:I,light:I,hcDark:D,hcLight:D},o.kg("minimapInfo","Minimap marker color for infos.")),Ie=(0,n.x1)("minimap.warningHighlight",{dark:L,light:L,hcDark:T,hcLight:T},o.kg("overviewRuleWarning","Minimap marker color for warnings.")),De=(0,n.x1)("minimap.errorHighlight",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},o.kg("minimapError","Minimap marker color for errors.")),Re=(0,n.x1)("minimap.background",null,o.kg("minimapBackground","Minimap background color.")),Ne=(0,n.x1)("minimap.foregroundOpacity",s.Q1.fromHex("#000f"),o.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Ae=((0,n.x1)("minimapSlider.background",(0,n.JO)(f,.5),o.kg("minimapSliderBackground","Minimap slider background color.")),(0,n.x1)("minimapSlider.hoverBackground",(0,n.JO)(m,.5),o.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),(0,n.x1)("minimapSlider.activeBackground",(0,n.JO)(_,.5),o.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),(0,n.x1)("charts.foreground",r,o.kg("chartsForeground","The foreground color used in charts.")),(0,n.x1)("charts.lines",(0,n.JO)(r,.5),o.kg("chartsLines","The color used for horizontal lines in charts.")),(0,n.x1)("charts.red",k,o.kg("chartsRed","The red color used in chart visualizations.")),(0,n.x1)("charts.blue",I,o.kg("chartsBlue","The blue color used in chart visualizations.")),(0,n.x1)("charts.yellow",L,o.kg("chartsYellow","The yellow color used in chart visualizations.")),(0,n.x1)("charts.orange",xe,o.kg("chartsOrange","The orange color used in chart visualizations.")),(0,n.x1)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},o.kg("chartsGreen","The green color used in chart visualizations.")),(0,n.x1)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},o.kg("chartsPurple","The purple color used in chart visualizations.")),(0,n.x1)("input.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("inputBoxBackground","Input box background."))),Oe=(0,n.x1)("input.foreground",r,o.kg("inputBoxForeground","Input box foreground.")),Pe=(0,n.x1)("input.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("inputBoxBorder","Input box border.")),Me=(0,n.x1)("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:c,hcLight:c},o.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Fe=(0,n.x1)("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},o.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),Be=(0,n.x1)("inputOption.activeBackground",{dark:(0,n.JO)(l,.4),light:(0,n.JO)(l,.2),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},o.kg("inputOption.activeBackground","Background hover color of options in input fields.")),We=(0,n.x1)("inputOption.activeForeground",{dark:s.Q1.white,light:s.Q1.black,hcDark:r,hcLight:r},o.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),He=((0,n.x1)("input.placeholderForeground",{light:(0,n.JO)(r,.5),dark:(0,n.JO)(r,.5),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},o.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),(0,n.x1)("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("inputValidationInfoBackground","Input validation background color for information severity."))),Ve=(0,n.x1)("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:r},o.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),je=(0,n.x1)("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:c,hcLight:c},o.kg("inputValidationInfoBorder","Input validation border color for information severity.")),ze=(0,n.x1)("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),Ue=(0,n.x1)("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:r},o.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),$e=(0,n.x1)("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:c,hcLight:c},o.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),qe=(0,n.x1)("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("inputValidationErrorBackground","Input validation background color for error severity.")),Ke=(0,n.x1)("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:r},o.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),Ge=(0,n.x1)("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:c,hcLight:c},o.kg("inputValidationErrorBorder","Input validation border color for error severity.")),Qe=(0,n.x1)("dropdown.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("dropdownBackground","Dropdown background.")),Ye=(0,n.x1)("dropdown.listBackground",{dark:null,light:null,hcDark:s.Q1.black,hcLight:s.Q1.white},o.kg("dropdownListBackground","Dropdown list background.")),Ze=(0,n.x1)("dropdown.foreground",{dark:"#F0F0F0",light:r,hcDark:s.Q1.white,hcLight:r},o.kg("dropdownForeground","Dropdown foreground.")),Xe=(0,n.x1)("dropdown.border",{dark:Qe,light:"#CECECE",hcDark:c,hcLight:c},o.kg("dropdownBorder","Dropdown border.")),Je=(0,n.x1)("button.foreground",s.Q1.white,o.kg("buttonForeground","Button foreground color.")),et=(0,n.x1)("button.separator",(0,n.JO)(Je,.4),o.kg("buttonSeparator","Button separator color.")),tt=(0,n.x1)("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},o.kg("buttonBackground","Button background color.")),it=(0,n.x1)("button.hoverBackground",{dark:(0,n.a)(tt,.2),light:(0,n.e$)(tt,.2),hcDark:tt,hcLight:tt},o.kg("buttonHoverBackground","Button background color when hovering.")),nt=(0,n.x1)("button.border",c,o.kg("buttonBorder","Button border color.")),ot=(0,n.x1)("button.secondaryForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:s.Q1.white,hcLight:r},o.kg("buttonSecondaryForeground","Secondary button foreground color.")),st=(0,n.x1)("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Q1.white},o.kg("buttonSecondaryBackground","Secondary button background color.")),rt=(0,n.x1)("button.secondaryHoverBackground",{dark:(0,n.a)(st,.2),light:(0,n.e$)(st,.2),hcDark:null,hcLight:null},o.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),at=(0,n.x1)("radio.activeForeground",We,o.kg("radioActiveForeground","Foreground color of active radio option.")),lt=(0,n.x1)("radio.activeBackground",Be,o.kg("radioBackground","Background color of active radio option.")),ct=(0,n.x1)("radio.activeBorder",Me,o.kg("radioActiveBorder","Border color of the active radio option.")),dt=(0,n.x1)("radio.inactiveForeground",null,o.kg("radioInactiveForeground","Foreground color of inactive radio option.")),ut=(0,n.x1)("radio.inactiveBackground",null,o.kg("radioInactiveBackground","Background color of inactive radio option.")),ht=(0,n.x1)("radio.inactiveBorder",{light:(0,n.JO)(at,.2),dark:(0,n.JO)(at,.2),hcDark:(0,n.JO)(at,.4),hcLight:(0,n.JO)(at,.2)},o.kg("radioInactiveBorder","Border color of the inactive radio option.")),gt=(0,n.x1)("radio.inactiveHoverBackground",Fe,o.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),pt=(0,n.x1)("checkbox.background",Qe,o.kg("checkbox.background","Background color of checkbox widget.")),ft=((0,n.x1)("checkbox.selectBackground",w,o.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),(0,n.x1)("checkbox.foreground",Ze,o.kg("checkbox.foreground","Foreground color of checkbox widget."))),mt=(0,n.x1)("checkbox.border",Xe,o.kg("checkbox.border","Border color of checkbox widget.")),_t=((0,n.x1)("checkbox.selectBorder",a,o.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),(0,n.x1)("keybindingLabel.background",{dark:new s.Q1(new s.bU(128,128,128,.17)),light:new s.Q1(new s.bU(221,221,221,.4)),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},o.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut."))),vt=(0,n.x1)("keybindingLabel.foreground",{dark:s.Q1.fromHex("#CCCCCC"),light:s.Q1.fromHex("#555555"),hcDark:s.Q1.white,hcLight:r},o.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),bt=(0,n.x1)("keybindingLabel.border",{dark:new s.Q1(new s.bU(51,51,51,.6)),light:new s.Q1(new s.bU(204,204,204,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:c},o.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),yt=(0,n.x1)("keybindingLabel.bottomBorder",{dark:new s.Q1(new s.bU(68,68,68,.6)),light:new s.Q1(new s.bU(187,187,187,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:r},o.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),wt=(0,n.x1)("list.focusBackground",null,o.kg("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ct=(0,n.x1)("list.focusForeground",null,o.kg("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),St=(0,n.x1)("list.focusOutline",{dark:l,light:l,hcDark:d,hcLight:d},o.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),kt=(0,n.x1)("list.focusAndSelectionOutline",null,o.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),xt=(0,n.x1)("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},o.kg("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Et=(0,n.x1)("list.activeSelectionForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:null,hcLight:null},o.kg("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Lt=(0,n.x1)("list.activeSelectionIconForeground",null,o.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Tt=(0,n.x1)("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},o.kg("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),It=(0,n.x1)("list.inactiveSelectionForeground",null,o.kg("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Dt=(0,n.x1)("list.inactiveSelectionIconForeground",null,o.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Rt=(0,n.x1)("list.inactiveFocusBackground",null,o.kg("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Nt=(0,n.x1)("list.inactiveFocusOutline",null,o.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),At=(0,n.x1)("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Q1.white.transparent(.1),hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},o.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Ot=(0,n.x1)("list.hoverForeground",null,o.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Pt=(0,n.x1)("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},o.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),Mt=(0,n.x1)("list.dropBetweenBackground",{dark:a,light:a,hcDark:null,hcLight:null},o.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),Ft=(0,n.x1)("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:l,hcLight:l},o.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Bt=(0,n.x1)("list.focusHighlightForeground",{dark:Ft,light:(0,n.Hz)(xt,Ft,"#BBE7FF"),hcDark:Ft,hcLight:Ft},o.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),Wt=((0,n.x1)("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},o.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),(0,n.x1)("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},o.kg("listErrorForeground","Foreground color of list items containing errors.")),(0,n.x1)("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},o.kg("listWarningForeground","Foreground color of list items containing warnings.")),(0,n.x1)("listFilterWidget.background",{light:(0,n.e$)(w,0),dark:(0,n.a)(w,0),hcDark:w,hcLight:w},o.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees."))),Ht=(0,n.x1)("listFilterWidget.outline",{dark:s.Q1.transparent,light:s.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},o.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Vt=(0,n.x1)("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:c,hcLight:c},o.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),jt=(0,n.x1)("listFilterWidget.shadow",ne,o.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),zt=((0,n.x1)("list.filterMatchBackground",{dark:B,light:B,hcDark:null,hcLight:null},o.kg("listFilterMatchHighlight","Background color of the filtered match.")),(0,n.x1)("list.filterMatchBorder",{dark:H,light:H,hcDark:c,hcLight:d},o.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),(0,n.x1)("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},o.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),(0,n.x1)("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},o.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),Ut=(0,n.x1)("tree.inactiveIndentGuidesStroke",(0,n.JO)(zt,.4),o.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),$t=(0,n.x1)("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},o.kg("tableColumnsBorder","Table border color between columns.")),qt=(0,n.x1)("tree.tableOddRowsBackground",{dark:(0,n.JO)(r,.04),light:(0,n.JO)(r,.04),hcDark:null,hcLight:null},o.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),Kt=((0,n.x1)("editorActionList.background",w,o.kg("editorActionListBackground","Action List background color.")),(0,n.x1)("editorActionList.foreground",C,o.kg("editorActionListForeground","Action List foreground color.")),(0,n.x1)("editorActionList.focusForeground",Et,o.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),(0,n.x1)("editorActionList.focusBackground",xt,o.kg("editorActionListFocusBackground","Action List background color for the focused item.")),(0,n.x1)("menu.border",{dark:null,light:null,hcDark:c,hcLight:c},o.kg("menuBorder","Border color of menus."))),Gt=(0,n.x1)("menu.foreground",Ze,o.kg("menuForeground","Foreground color of menu items.")),Qt=(0,n.x1)("menu.background",Qe,o.kg("menuBackground","Background color of menu items.")),Yt=(0,n.x1)("menu.selectionForeground",Et,o.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Zt=(0,n.x1)("menu.selectionBackground",xt,o.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),Xt=(0,n.x1)("menu.selectionBorder",{dark:null,light:null,hcDark:d,hcLight:d},o.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),Jt=(0,n.x1)("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:c,hcLight:c},o.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),ei=(0,n.x1)("quickInput.background",w,o.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),ti=(0,n.x1)("quickInput.foreground",C,o.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),ii=(0,n.x1)("quickInputTitle.background",{dark:new s.Q1(new s.bU(255,255,255,.105)),light:new s.Q1(new s.bU(0,0,0,.06)),hcDark:"#000000",hcLight:s.Q1.white},o.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),ni=(0,n.x1)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Q1.white,hcLight:"#0F4A85"},o.kg("pickerGroupForeground","Quick picker color for grouping labels.")),oi=(0,n.x1)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Q1.white,hcLight:"#0F4A85"},o.kg("pickerGroupBorder","Quick picker color for grouping borders.")),si=(0,n.x1)("quickInput.list.focusBackground",null,"",void 0,o.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),ri=(0,n.x1)("quickInputList.focusForeground",Et,o.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),ai=(0,n.x1)("quickInputList.focusIconForeground",Lt,o.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),li=(0,n.x1)("quickInputList.focusBackground",{dark:(0,n.yL)(si,xt),light:(0,n.yL)(si,xt),hcDark:null,hcLight:null},o.kg("quickInput.listFocusBackground","Quick picker background color for the focused item."));(0,n.x1)("search.resultsInfoForeground",{light:r,dark:(0,n.JO)(r,.65),hcDark:r,hcLight:r},o.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),(0,n.x1)("searchEditor.findMatchBackground",{light:(0,n.JO)(B,.66),dark:(0,n.JO)(B,.66),hcDark:B,hcLight:B},o.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),(0,n.x1)("searchEditor.findMatchBorder",{light:(0,n.JO)(H,.66),dark:(0,n.JO)(H,.66),hcDark:H,hcLight:H},o.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},75115:(e,t,i)=>{"use strict";i.d(t,{Bb:()=>d,Fd:()=>p,Gu:()=>u,HP:()=>h,Hz:()=>k,JO:()=>C,a:()=>w,e$:()=>y,oG:()=>x,x1:()=>v,yL:()=>S});var n=i(79109),o=i(9659),s=i(85476),r=i(40231),a=i(86223),l=i(16374),c=i(41337);function d(e){return`--vscode-${e.replace(/\./g,"-")}`}function u(e){return`var(${d(e)})`}function h(e,t){return`var(${d(e)}, ${t})`}function g(e){return null!==e&&"object"===typeof e&&"light"in e&&"dark"in e}const p={ColorContribution:"base.contributions.colors"},f="default";class m{constructor(){this._onDidChangeSchema=new r.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){const s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;const r={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),n&&(r.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",r.patternErrorMessage=c.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:i,oneOf:[r,{type:"string",const:f,description:c.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i?.defaults){const e=g(i.defaults)?i.defaults[t.type]:i.defaults;return E(e,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}}const _=new m;function v(e,t,i,n,o){return _.registerColor(e,t,i,n,o)}function b(e,t){switch(e.op){case 0:return E(e.value,t)?.darken(e.factor);case 1:return E(e.value,t)?.lighten(e.factor);case 2:return E(e.value,t)?.transparent(e.factor);case 3:{const i=E(e.background,t);return i?E(e.value,t)?.makeOpaque(i):E(e.value,t)}case 4:for(const i of e.values){const e=E(i,t);if(e)return e}return;case 6:return E(t.defines(e.if)?e.then:e.else,t);case 5:{const i=E(e.value,t);if(!i)return;const n=E(e.background,t);return n?i.isDarkerThan(n)?s.Q1.getLighterColor(i,n,e.factor).transparent(e.transparency):s.Q1.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw(0,n.xb)(e)}}function y(e,t){return{op:0,value:e,factor:t}}function w(e,t){return{op:1,value:e,factor:t}}function C(e,t){return{op:2,value:e,factor:t}}function S(...e){return{op:4,values:e}}function k(e,t,i){return{op:6,if:e,then:t,else:i}}function x(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function E(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?s.Q1.fromHex(e):t.getColor(e):e instanceof s.Q1?e:"object"===typeof e?b(e,t):void 0}l.O.add(p.ColorContribution,_);const L="vscode://schemas/workbench-colors",T=l.O.as(a.F.JSONContribution);T.registerSchema(L,_.getColorSchema());const I=new o.uC((()=>T.notifySchemaChanged(L)),200);_.onDidChangeSchema((()=>{I.isScheduled()||I.schedule()}))},48401:(e,t,i)=>{"use strict";i.d(t,{$_:()=>k,HT:()=>b,pU:()=>v});var n=i(9659),o=i(25923),s=i(79855),r=i(23740),a=i(40231),l=i(50322),c=i(29133),d=i(41337),u=i(86223),h=i(16374);const g={IconContribution:"base.contributions.icons"};var p,f;(function(e){function t(e,t){let i=e.defaults;while(r.L.isThemeIcon(i)){const e=_.getIcon(i.id);if(!e)return;i=e.defaults}return i}e.getDefinition=t})(p||(p={})),function(e){function t(e){return{weight:e.weight,style:e.style,src:e.src.map((e=>({format:e.format,location:e.location.toString()})))}}function i(e){const t=e=>(0,l.Kg)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>(0,l.Kg)(e.format)&&(0,l.Kg)(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:c.r.parse(e.location)})))}}e.toJSONObject=t,e.fromJSONObject=i}(f||(f={}));class m{constructor(){this._onDidChange=new a.vl,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,d.kg)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,d.kg)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${r.L.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}const s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{while(r.L.isThemeIcon(e.defaults))e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const o of n.filter((e=>!!e.description)).sort(e))i.push(`||${o.id}|${r.L.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!r.L.isThemeIcon(e.defaults))).sort(e))i.push(`||${o.id}|`);return i.join("\n")}}const _=new m;function v(e,t,i,n){return _.registerIcon(e,t,i,n)}function b(){return _}function y(){const e=(0,s.J)();for(const t in e){const i="\\"+e[t].toString(16);_.registerIcon(t,{fontCharacter:i})}}h.O.add(g.IconContribution,_),y();const w="vscode://schemas/icons",C=h.O.as(u.F.JSONContribution);C.registerSchema(w,_.getIconSchema());const S=new n.uC((()=>C.notifySchemaChanged(w)),200);_.onDidChange((()=>{S.isScheduled()||S.schedule()}));const k=v("widget-close",o.W.close,(0,d.kg)("widgetClose","Icon for the close action in widgets."));v("goto-previous-location",o.W.arrowUp,(0,d.kg)("previousChangeIcon","Icon for goto previous editor location.")),v("goto-next-location",o.W.arrowDown,(0,d.kg)("nextChangeIcon","Icon for goto next editor location.")),r.L.modify(o.W.sync,"spin"),r.L.modify(o.W.loading,"spin")},1474:(e,t,i)=>{"use strict";var n;function o(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function s(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{Bb:()=>o,HD:()=>s,zM:()=>n}),function(e){e["DARK"]="dark",e["LIGHT"]="light",e["HIGH_CONTRAST_DARK"]="hcDark",e["HIGH_CONTRAST_LIGHT"]="hcLight"}(n||(n={}))},15911:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>u,Gy:()=>l,Pz:()=>d,Yf:()=>c,lR:()=>f,zy:()=>p});var n=i(40231),o=i(5091),s=i(87778),r=i(16374),a=i(1474);const l=(0,s.u1)("themeService");function c(e){return{id:e}}function d(e){switch(e){case a.zM.DARK:return"vs-dark";case a.zM.HIGH_CONTRAST_DARK:return"hc-black";case a.zM.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const u={ThemingContribution:"base.contributions.theming"};class h{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new n.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}}const g=new h;function p(e){return g.onColorThemeChange(e)}r.O.add(u.ThemingContribution,g);class f extends o.jG{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},57642:(e,t,i)=>{"use strict";i.d(t,{$D:()=>o,I_:()=>r,To:()=>s,Ym:()=>a});var n=i(87778);const o=(0,n.u1)("undoRedoService");class s{constructor(e,t){this.resource=e,this.elements=t}}class r{static{this._ID=0}constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new r}}class a{static{this._ID=0}constructor(){this.id=a._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new a}}},81714:(e,t,i)=>{"use strict";i.d(t,{A7:()=>c,Q_:()=>h,VR:()=>a,cn:()=>m,ct:()=>_,jB:()=>l,kF:()=>f,mX:()=>p});var n=i(41337),o=i(52444),s=(i(71268),i(29133)),r=i(87778);const a=(0,r.u1)("contextService");function l(e){const t=e;return"string"===typeof t?.id&&s.r.isUri(t.uri)}function c(e){const t=e;return"string"===typeof t?.id&&!l(e)&&!g(e)}const d={id:"ext-dev"},u={id:"empty-window"};function h(e,t){if("string"===typeof e||"undefined"===typeof e)return"string"===typeof e?{id:(0,o.P8)(e)}:t?d:u;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}function g(e){const t=e;return"string"===typeof t?.id&&s.r.isUri(t.configPath)}class p{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const f="code-workspace",m=((0,n.kg)("codeWorkspace","Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");function _(e){return e.id===m}},17602:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(87778);const o=(0,n.u1)("workspaceTrustManagementService")},65242:(e,t,i)=>{"use strict";var n=i(37927);Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0;var o=n(i(94660)),s=n(i(49818)),r=function(){function e(){var t,i,n,s,r,a,l,c,d,u,h,g,p,f,m,_,v,b,y=this,w=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o["default"])(this,e),this.server=w.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!==(t=this.server.cacheSearchResultsForSeconds)&&void 0!==t?t:120,this.additionalSearchParameters=null!==(i=w.additionalSearchParameters)&&void 0!==i?i:{},this.additionalSearchParameters.query_by=null!==(n=null!==(s=this.additionalSearchParameters.queryBy)&&void 0!==s?s:this.additionalSearchParameters.query_by)&&void 0!==n?n:"",this.additionalSearchParameters.preset=null!==(r=null!==(a=this.additionalSearchParameters.preset)&&void 0!==a?a:this.additionalSearchParameters.preset)&&void 0!==r?r:"",this.additionalSearchParameters.sort_by=null!==(l=null!==(c=this.additionalSearchParameters.sortBy)&&void 0!==c?c:this.additionalSearchParameters.sort_by)&&void 0!==l?l:"",this.additionalSearchParameters.highlight_full_fields=null!==(d=null!==(u=this.additionalSearchParameters.highlightFullFields)&&void 0!==u?u:this.additionalSearchParameters.highlight_full_fields)&&void 0!==d?d:this.additionalSearchParameters.query_by,this.geoLocationField=null!==(h=w.geoLocationField)&&void 0!==h?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!==(g=w.facetableFieldsWithSpecialCharacters)&&void 0!==g?g:[],this.collectionSpecificSearchParameters=null!==(p=w.collectionSpecificSearchParameters)&&void 0!==p?p:{},Object.keys(this.collectionSpecificSearchParameters).forEach((function(e){var t,i,n,o,s,r,a=y.collectionSpecificSearchParameters[e];a.query_by=null!==(t=a.queryBy)&&void 0!==t?t:a.query_by,a.preset=null!==(i=a.preset)&&void 0!==i?i:a.preset,a.sort_by=null!==(n=a.sortBy)&&void 0!==n?n:a.sort_by,a.highlight_full_fields=null!==(o=null!==(s=null!==(r=a.highlightFullFields)&&void 0!==r?r:a.highlight_full_fields)&&void 0!==s?s:y.additionalSearchParameters.highlight_full_fields)&&void 0!==o?o:a.query_by,Object.keys(a).forEach((function(e){return void 0===a[e]?delete a[e]:{}}))})),this.renderingContent=w.renderingContent,this.flattenGroupedHits=null===(f=w.flattenGroupedHits)||void 0===f||f,this.facetByOptions=null!==(m=w.facetByOptions)&&void 0!==m?m:{},this.filterByOptions=null!==(_=w.filterByOptions)&&void 0!==_?_:{},this.collectionSpecificFacetByOptions=null!==(v=w.collectionSpecificFacetByOptions)&&void 0!==v?v:{},this.collectionSpecificFilterByOptions=null!==(b=w.collectionSpecificFilterByOptions)&&void 0!==b?b:{}}return(0,s["default"])(e,[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some((function(e){return e.queryBy})))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some((function(e){return 0===(e.query_by||"").length&&0===(e.preset||"").length}))))throw new Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}]),e}();t.Configuration=r},74789:(e,t,i)=>{"use strict";var n=i(37927);Object.defineProperty(t,"__esModule",{value:!0}),t.FacetSearchResponseAdapter=void 0;var o=n(i(94660)),s=n(i(49818)),r=i(13161),a=function(){function e(t,i){(0,o["default"])(this,e),this.typesenseResponse=t,this.instantsearchRequest=i}return(0,s["default"])(e,[{key:"_adaptFacetHits",value:function(e){var t=this,i={},n=e.find((function(e){return e.field_name===t.instantsearchRequest.params.facetName}));return i=n.counts.map((function(e){return{value:e.value,highlighted:t._adaptHighlightTag(e.highlighted,t.instantsearchRequest.params.highlightPreTag,t.instantsearchRequest.params.highlightPostTag),count:e.count}})),i}},{key:"adapt",value:function(){var e={facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms};return e}}]),e}();t.FacetSearchResponseAdapter=a,Object.assign(a.prototype,r.utils)},28094:(e,t,i)=>{"use strict";var n=i(37927);Object.defineProperty(t,"__esModule",{value:!0}),t.SearchRequestAdapter=void 0;var o=n(i(85917)),s=n(i(45254)),r=n(i(99550)),a=n(i(94660)),l=n(i(49818)),c=function(){function e(t,i,n){(0,a["default"])(this,e),this.instantsearchRequests=t,this.typesenseClient=i,this.configuration=n,this.additionalSearchParameters=n.additionalSearchParameters,this.collectionSpecificSearchParameters=n.collectionSpecificSearchParameters}return(0,l["default"])(e,[{key:"_shouldUseExactMatchForField",value:function(e,t){var i,n;return!1!==(null===(i=this.configuration.collectionSpecificFilterByOptions)||void 0===i||null===(i=i[t])||void 0===i||null===(i=i[e])||void 0===i?void 0:i.exactMatch)&&!1!==(null===(n=this.configuration.filterByOptions)||void 0===n||null===(n=n[e])||void 0===n?void 0:n.exactMatch)}},{key:"_adaptFacetFilters",value:function(e,t){var i=this,n="";if(!e)return n;var o=e.map((function(e){if(Array.isArray(e)){var n={};e.forEach((function(e){var t=i._parseFacetFilter(e),o=t.fieldName,s=t.fieldValue;n[o]=n[o]||[],n[o].push(s)})),Object.keys(n).length>1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(n).join(",")));var o=Object.keys(n)[0],s=n[o],a=s.reduce((function(e,t){return t.startsWith("-")&&!i._isNumber(t)?e[0].push(t.substring(1)):e[1].push(t),e}),[[],[]]),l=(0,r["default"])(a,2),c=l[0],d=l[1],u=[];if(d.length>0){var h=i._shouldUseExactMatchForField(o,t)?":=":":";u.push("".concat(o).concat(h,"[").concat(d.map((function(e){return i._escapeFacetValue(e)})).join(","),"]"))}if(c.length>0){var g=i._shouldUseExactMatchForField(o,t)?":!=":":!";u.push("".concat(o).concat(g,"[").concat(c.map((function(e){return i._escapeFacetValue(e)})).join(","),"]"))}var p=u.filter((function(e){return e})).join(" && ");return p}var f,m=i._parseFacetFilter(e),_=m.fieldName,v=m.fieldValue;if(v.startsWith("-")&&!i._isNumber(v)){var b=i._shouldUseExactMatchForField(_,t)?":!=":":!";f="".concat(_).concat(b,"[").concat(i._escapeFacetValue(v.substring(1)),"]")}else{var y=i._shouldUseExactMatchForField(_,t)?":=":":";f="".concat(_).concat(y,"[").concat(i._escapeFacetValue(v),"]")}return f}));return n=o.join(" && "),n}},{key:"_parseFacetFilter",value:function(e){var t,i,n,o,s;if((null===(t=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===t?void 0:t.length)>0){var r=this.configuration.facetableFieldsWithSpecialCharacters.flat().map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(i=new RegExp("^(".concat(r.join("|"),"):(.*)$")),n=e.match(i),null!=n)return o="".concat(n[1]),s="".concat(n[2]),{fieldName:o,fieldValue:s}}return i=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,n=e.match(i),null==n?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(e,"` with the Regex `").concat(i,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(o="".concat(n[1]).concat(n[2]),s="".concat(n[3])),{fieldName:o,fieldValue:s}}},{key:"_escapeFacetValue",value:function(e){return"boolean"===typeof e||"true"===e||"false"===e||this._isNumber(e)?e:"`".concat(e,"`")}},{key:"_isNumber",value:function(e){return Number.isInteger(e%1)||!!(e%1)}},{key:"_adaptNumericFilters",value:function(e){var t=this,i="";if(!e)return i;var n={};e.forEach((function(e){var i=t._parseNumericFilter(e),o=i.fieldName,s=i.operator,r=i.fieldValue;n[o]=n[o]||{},n[o][s]=r}));var o=[];return Object.keys(n).forEach((function(e){null!=n[e]["<="]&&null!=n[e][">="]?o.push("".concat(e,":=[").concat(n[e][">="],"..").concat(n[e]["<="],"]")):null!=n[e]["<="]?o.push("".concat(e,":<=").concat(n[e]["<="])):null!=n[e][">="]?o.push("".concat(e,":>=").concat(n[e][">="])):null!=n[e]["="]?o.push("".concat(e,":=").concat(n[e]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(n[e])))})),i=o.join(" && "),i}},{key:"_parseNumericFilter",value:function(e){var t,i,n,o,s,a;if((null===(t=this.configuration.facetableFieldsWithSpecialCharacters)||void 0===t?void 0:t.length)>0){var l=this.configuration.facetableFieldsWithSpecialCharacters.map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));if(i=new RegExp("^(".concat(l.join("|"),")(<=|>=|>|<|=)(.*)$")),n=e.match(i),null!=n){var c=n,d=(0,r["default"])(c,4);return o=d[1],s=d[2],a=d[3],{fieldName:o,operator:s,fieldValue:a}}}if(i=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,n=e.match(i),null==n)console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(e,"` with the Regex `").concat(i,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var u=n,h=(0,r["default"])(u,4);o=h[1],s=h[2],a=h[3]}return{fieldName:o,operator:s,fieldValue:a}}},{key:"_adaptGeoFilter",value:function(e){var t=e.insideBoundingBox,i=e.aroundRadius,n=e.aroundLatLng,o=e.insidePolygon;if(t){var s,a,l,c;if(Array.isArray(t)){var d=t.flat(),u=(0,r["default"])(d,4);s=u[0],a=u[1],l=u[2],c=u[3]}else{var h=t.split(","),g=(0,r["default"])(h,4);s=g[0],a=g[1],l=g[2],c=g[3]}return"".concat(this.configuration.geoLocationField,":(").concat(s,", ").concat(a,", ").concat(s,", ").concat(c,", ").concat(l,", ").concat(c,", ").concat(l,", ").concat(a,")")}if(n||i){if(!i||"all"===i)throw new Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var p="".concat(parseFloat(i)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(n,", ").concat(p,")")}if(o){var f=o;return Array.isArray(o)&&(f=o.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(f,")")}}},{key:"_adaptFilters",value:function(e,t){var i=[];return e.filters&&i.push(e.filters),i.push(this._adaptFacetFilters(e.facetFilters,t)),i.push(this._adaptNumericFilters(e.numericFilters)),i.push(this._adaptGeoFilter(e)),i.filter((function(e){return e&&""!==e})).join(" && ")}},{key:"_adaptIndexName",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(e,t){var i=this;return[e].flat().map((function(e){var n;return null!==(n=i.configuration.collectionSpecificFacetByOptions)&&void 0!==n&&null!==(n=n[t])&&void 0!==n&&n[e]?"".concat(e).concat(i.configuration.collectionSpecificFacetByOptions[t][e]):i.configuration.facetByOptions[e]?"".concat(e).concat(i.configuration.facetByOptions[e]):e})).join(",")}},{key:"_buildSearchParameters",value:function(e){for(var t=e.params,i=e.indexName,n=this._adaptIndexName(i),o={},s=0,a=Object.entries(this.additionalSearchParameters);s=|>|<|=)(.*)")}}]),e}();t.SearchRequestAdapter=c},45010:(e,t,i)=>{"use strict";var n=i(37927);Object.defineProperty(t,"__esModule",{value:!0}),t.SearchResponseAdapter=void 0;var o=n(i(63053)),s=n(i(99550)),r=n(i(8445)),a=n(i(91134)),l=n(i(94660)),c=n(i(49818)),d=i(13161);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function h(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:[];(0,l["default"])(this,e),this.typesenseResponse=t,this.instantsearchRequest=i,this.configuration=n,this.allTypesenseResponses=o}return(0,c["default"])(e,[{key:"_adaptGroupedHits",value:function(e){var t=this,i=[];return i=e.map((function(e){var i=t._adaptHits(e.hits);return i.forEach((function(t){t["group_key"]=t["_group_key"]=e.group_key,e.found&&(t["_group_found"]=e.found)})),i})),i=this.configuration.flattenGroupedHits?i.flat():i.map((function(e){return h(h({},e[0]),{},{_grouped_hits:e})})),i}},{key:"_adaptHits",value:function(e){var t=this,i=[];return i=e.map((function(e){var i=h({},e.document);i.objectID=e.document.id,i._snippetResult=t._adaptHighlightResult(e,"snippet"),i._highlightResult=t._adaptHighlightResult(e,"value"),i._rawTypesenseHit=e,["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach((function(t){Object.keys(e).includes(t)&&!Object.keys(i).includes(t)&&(i[t]=e[t])}));var n=i[t.configuration.geoLocationField];return n&&(i._geoloc={lat:n[0],lng:n[1]}),i})),i}},{key:"_adaptHighlightResult",value:function(e,t){var i={};return null!=e.highlight&&this.isHighlightPost0240RCN32Format(e.highlight)?this.adaptHighlightObject(e,i,t):this.adaptHighlightsArray(e,i,t),i}},{key:"isHighlightPost0240RCN32Format",value:function(e){return null==e.full&&null==e.snippet}},{key:"adaptHighlightsArray",value:function(e,t,i){var n=this;Object.assign.apply(Object,[t].concat((0,r["default"])(Object.entries(e.document).map((function(e){var t=(0,s["default"])(e,2),i=t[0],n=t[1];return(0,a["default"])({},i,{value:n,matchLevel:"none",matchedWords:[]})}))))),e.highlights.forEach((function(e){t[e.field]={value:e[i]||e["".concat(i,"s")],matchLevel:"full",matchedWords:e.matched_tokens},e.indices&&(t[e.field]["matchedIndices"]=e.indices)})),Object.entries(t).forEach((function(r){var a=(0,s["default"])(r,2),l=a[0],c=a[1],d=l,u=c.value,h=c.matchLevel,g=c.matchedWords,p=c.matchedIndices;null==u?t[d]=n._adaptHighlightNullValue():Array.isArray(u)?(t[d]=[],e.document[d].forEach((function(e,s){p&&p.includes(s)?t[d].push({value:n._adaptHighlightTag("".concat(u[p.indexOf(s)]),n.instantsearchRequest.params.highlightPreTag,n.instantsearchRequest.params.highlightPostTag),matchLevel:h,matchedWords:g[s]}):"object"===(0,o["default"])(e)?t[d].push(n._adaptHighlightInObjectValue(e,{},i)):t[d].push({value:"".concat(e),matchLevel:"none",matchedWords:[]})}))):"object"===(0,o["default"])(u)?t[d]=n._adaptHighlightInObjectValue(u,{},i):t[d].value=n._adaptHighlightTag("".concat(u),n.instantsearchRequest.params.highlightPreTag,n.instantsearchRequest.params.highlightPostTag)}))}},{key:"adaptHighlightObject",value:function(e,t,i){Object.assign(t,this._adaptHighlightInObjectValue(e.document,e.highlight,i))}},{key:"_adaptHighlightInObjectValue",value:function(e,t,i){var n=this;return Object.assign.apply(Object,[{}].concat((0,r["default"])(Object.entries(e).map((function(e){var r,l=(0,s["default"])(e,2),c=l[0],d=l[1];if(null==d)r=n._adaptHighlightNullValue();else if(Array.isArray(d)){var u;r=n._adaptHighlightInArrayValue(d,null!==(u=null===t||void 0===t?void 0:t[c])&&void 0!==u?u:[],i)}else if("object"===(0,o["default"])(d)){var h;r=n._adaptHighlightInObjectValue(d,null!==(h=null===t||void 0===t?void 0:t[c])&&void 0!==h?h:{},i)}else r=n._adaptHighlightInPrimitiveValue(d,null===t||void 0===t?void 0:t[c],i);return(0,a["default"])({},c,r)})))))}},{key:"_adaptHighlightInArrayValue",value:function(e,t,i){var n=this;return e.map((function(e,s){var r;if(null==e)r=n._adaptHighlightNullValue();else if(Array.isArray(e)){var a;r=n._adaptHighlightInArrayValue(e,null!==(a=null===t||void 0===t?void 0:t[s])&&void 0!==a?a:[],i)}else if("object"===(0,o["default"])(e)){var l;r=n._adaptHighlightInObjectValue(e,null!==(l=null===t||void 0===t?void 0:t[s])&&void 0!==l?l:{},i)}else r=n._adaptHighlightInPrimitiveValue(e,null===t||void 0===t?void 0:t[s],i);return r}))}},{key:"_adaptHighlightInPrimitiveValue",value:function(e,t,i){var n,o;return null!=t?{value:this._adaptHighlightTag("".concat(null!==(n=null!==(o=t[i])&&void 0!==o?o:t["highlight"])&&void 0!==n?n:t["snippet"]),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(t.matched_tokens||[]).length>0?"full":"none",matchedWords:t.matched_tokens||[]}:{value:this._adaptHighlightTag("".concat(e),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(e){var t={};return e.forEach((function(e){Object.assign(t,(0,a["default"])({},e.field_name,Object.assign.apply(Object,[{}].concat((0,r["default"])(e.counts.map((function(e){return(0,a["default"])({},e.value,e.count)})))))))})),t}},{key:"_adaptFacetStats",value:function(e){var t={};return e.forEach((function(e){Object.keys(e.stats).length>0&&Object.assign(t,(0,a["default"])({},e.field_name,e.stats))})),t}},{key:"_adaptRenderingContent",value:function(e){var t,i=Object.assign({},this.configuration.renderingContent);return null==(null===(t=i.facetOrdering)||void 0===t||null===(t=t.facets)||void 0===t?void 0:t.order)&&(i.facetOrdering=i.facetOrdering||{},i.facetOrdering.facets=i.facetOrdering.facets||{},i.facetOrdering.facets.order=(0,r["default"])(new Set(e.map((function(e){return e["field_name"]})).concat(this.allTypesenseResponses.map((function(e){return e.facet_counts||[]})).flat().map((function(e){return e["field_name"]})).filter((function(e){return e})))))),i}},{key:"adapt",value:function(){var e=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),t=h({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(e).length>0?{renderingContent:e}:null);return t}}]),e}();t.SearchResponseAdapter=g,Object.assign(g.prototype,d.utils)},5286:(e,t,i)=>{"use strict";var n=i(37927);t.A=void 0;var o=n(i(85917)),s=n(i(45254)),r=n(i(94660)),a=n(i(49818)),l=i(65242),c=i(86520),d=i(28094),u=i(45010),h=i(74789),g=function(){function e(t){var i=this;(0,r["default"])(this,e),this.updateConfiguration(t),this.searchClient={clearCache:function(){return i.clearCache()},search:function(e){return i.searchTypesenseAndAdapt(e)},searchForFacetValues:function(e){return i.searchTypesenseForFacetValuesAndAdapt(e)}}}return(0,a["default"])(e,[{key:"searchTypesenseAndAdapt",value:function(){var e=(0,s["default"])(o["default"].mark((function e(t){var i,n,s=this;return o["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return i=e.sent,n=i.results.map((function(e,n){s._validateTypesenseResult(e);var o=new u.SearchResponseAdapter(e,t[n],s.configuration,i.results);return o.adapt()})),e.abrupt("return",{results:n});case 8:throw e.prev=8,e.t0=e["catch"](0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"searchTypesenseForFacetValuesAndAdapt",value:function(){var e=(0,s["default"])(o["default"].mark((function e(t){var i,n,s=this;return o["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return i=e.sent,n=i.results.map((function(e,i){s._validateTypesenseResult(e);var n=new h.FacetSearchResponseAdapter(e,t[i],s.configuration);return n.adapt()})),e.abrupt("return",n);case 8:throw e.prev=8,e.t0=e["catch"](0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_adaptAndPerformTypesenseRequest",value:function(){var e=(0,s["default"])(o["default"].mark((function e(t){var i,n;return o["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=new d.SearchRequestAdapter(t,this.typesenseClient,this.configuration),e.next=3,i.request();case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"clearCache",value:function(){return this.typesenseClient=new c.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(e){return this.configuration=new l.Configuration(e),this.configuration.validate(),this.typesenseClient=new c.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(e){if(e.error)throw new Error("".concat(e.code," - ").concat(e.error));if(!e.hits&&!e.grouped_hits)throw new Error("Did not find any hits. ".concat(e.code," - ").concat(e.error))}}]),e}();t.A=g},13161:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utils=void 0;var i={_adaptHighlightTag:function(e,t,i){return e.replace(new RegExp("","g"),t||"").replace(new RegExp("","g"),i||"")},_adaptNumberOfPages:function(){var e=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(e)?Math.ceil(e):1}};t.utils=i},86520:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return o(t,e),t},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Errors=t.SearchClient=t.Client=void 0;var a=r(i(49560));t.Client=a.default;var l=r(i(65564));t.SearchClient=l.default;var c=s(i(61967));t.Errors=c,t["default"]={Client:a.default,SearchClient:l.default,Errors:c}},88575:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0},transformResponse:[function(e,t){var i=e;return void 0!==t&&"string"===typeof e&&t["content-type"]&&t["content-type"].startsWith("application/json")&&(i=JSON.parse(e)),i}]},!0!==C&&(b.timeout=1e3*g.connectionTimeoutSeconds),h&&0!==Object.keys(h).length&&(b.params=h),g.sendApiKeyAsQueryParam&&(b.params=b.params||{},b.params["x-typesense-api-key"]=g.apiKey),g.configuration.httpAgent&&(g.logger.debug("Request #".concat(i,": Using custom httpAgent")),b.httpAgent=g.configuration.httpAgent),g.configuration.httpsAgent&&(g.logger.debug("Request #".concat(i,": Using custom httpsAgent")),b.httpsAgent=g.configuration.httpsAgent),p&&("string"===typeof p&&0!==p.length||"object"===typeof p&&0!==Object.keys(p).length)&&(b.data=p),v&&(w=r.default.CancelToken,S=w.source(),_=function(){return S.cancel()},v.addEventListener("abort",_),b.cancelToken=S.token),[4,(0,r.default)(b)];case 2:if(k=o.sent(),k.status>=1&&k.status<=499&&g.setNodeHealthcheck(f,d),g.logger.debug("Request #".concat(i,": Request to Node ").concat(f.index," was made. Response Code was ").concat(k.status,".")),k.status>=200&&k.status<300)return[2,{value:Promise.resolve(k.data)}];if(k.status<500)return[2,{value:Promise.reject(g.customErrorForResponse(k,null===(s=k.data)||void 0===s?void 0:s.message))}];throw g.customErrorForResponse(k,null===(a=k.data)||void 0===a?void 0:a.message);case 3:return x=o.sent(),g.setNodeHealthcheck(f,u),n=x,g.logger.warn("Request #".concat(i,": Request to Node ").concat(f.index,' failed due to "').concat(x.code," ").concat(x.message).concat(null==x.response?"":" - "+JSON.stringify(null===(l=x.response)||void 0===l?void 0:l.data),'"')),g.logger.warn("Request #".concat(i,": Sleeping for ").concat(g.retryIntervalSeconds,"s and then retrying request...")),[4,g.timer(g.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return v&&_&&v.removeEventListener("abort",_),[7];case 6:return[2]}}))},g=this,f=1,b.label=1;case 1:return f<=this.numRetriesPerRequest+1?[5,c(f)]:[3,4];case 2:if(_=b.sent(),"object"===typeof _)return[2,_.value];b.label=3;case 3:return f++,[3,1];case 4:return this.logger.debug("Request #".concat(i,": No retries left. Raising last error")),[2,Promise.reject(n)]}}))}))},e.prototype.getNextNode=function(e){if(void 0===e&&(e=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(e,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(e,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(e,": Nodes Health: ").concat(this.nodes.map((function(e){return"Node ".concat(e.index," is ").concat(!0===e.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var t=this.nodes[0],i=0;i<=this.nodes.length;i++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,t=this.nodes[this.currentNodeIndex],!0===t.isHealthy||this.nodeDueForHealthcheck(t,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(t.index)),t;return this.logger.debug("Request #".concat(e,": No healthy nodes were found. Returning the next node, Node ").concat(t.index)),t},e.prototype.nodeDueForHealthcheck=function(e,t){void 0===t&&(t=0);var i=Date.now()-e.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return i&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),i},e.prototype.initializeMetadataForNodes=function(){var e=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,d)),this.nodes.forEach((function(t,i){t.index=i,e.setNodeHealthcheck(t,d)}))},e.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},e.prototype.uriFor=function(e,t){return null!=t.url?"".concat(t.url).concat(e):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path).concat(e)},e.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e[c]=this.apiKey),e["Content-Type"]="application/json",e},e.prototype.timer=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,new Promise((function(t){return setTimeout(t,1e3*e)}))]}))}))},e.prototype.customErrorForResponse=function(e,t){var i="Request failed with HTTP code ".concat(e.status);"string"===typeof t&&""!==t.trim()&&(i+=" | Server said: ".concat(t));var n=new l.default(i);return n=400===e.status?new a.RequestMalformed(i):401===e.status?new a.RequestUnauthorized(i):404===e.status?new a.ObjectNotFound(i):409===e.status?new a.ObjectAlreadyExists(i):422===e.status?new a.ObjectUnprocessable(i):e.status>=500&&e.status<=599?new a.ServerError(i):new a.HTTPError(i),n.httpStatus=e.status,n},e}();t["default"]=h},49560:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(17569)),s=n(i(69195)),r=n(i(26698)),a=n(i(2895)),l=n(i(76995)),c=n(i(88575)),d=n(i(20503)),u=n(i(99336)),h=n(i(94960)),g=n(i(78818)),p=n(i(70461)),f=n(i(33653)),m=n(i(19710)),_=n(i(64295)),v=n(i(22584)),b=n(i(68211)),y=n(i(27510)),w=n(i(55731)),C=n(i(19087)),S=n(i(53200)),k=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null!==(t=e.sendApiKeyAsQueryParam)&&void 0!==t&&t,this.configuration=new o.default(e),this.apiCall=new s.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new g.default(this.apiCall),this.health=new p.default(this.apiCall),this.operations=new f.default(this.apiCall),this.multiSearch=new m.default(this.apiCall,this.configuration),this._collections=new r.default(this.apiCall),this.individualCollections={},this._aliases=new l.default(this.apiCall),this.individualAliases={},this._keys=new d.default(this.apiCall),this.individualKeys={},this._presets=new _.default(this.apiCall),this.individualPresets={},this._stopwords=new y.default(this.apiCall),this.individualStopwords={},this.analytics=new b.default(this.apiCall),this._conversations=new C.default(this.apiCall),this.individualConversations={}}return e.prototype.collections=function(e){return void 0===e?this._collections:(void 0===this.individualCollections[e]&&(this.individualCollections[e]=new a.default(e,this.apiCall,this.configuration)),this.individualCollections[e])},e.prototype.aliases=function(e){return void 0===e?this._aliases:(void 0===this.individualAliases[e]&&(this.individualAliases[e]=new c.default(e,this.apiCall)),this.individualAliases[e])},e.prototype.keys=function(e){return void 0===e?this._keys:(void 0===this.individualKeys[e]&&(this.individualKeys[e]=new u.default(e,this.apiCall)),this.individualKeys[e])},e.prototype.presets=function(e){return void 0===e?this._presets:(void 0===this.individualPresets[e]&&(this.individualPresets[e]=new v.default(e,this.apiCall)),this.individualPresets[e])},e.prototype.stopwords=function(e){return void 0===e?this._stopwords:(void 0===this.individualStopwords[e]&&(this.individualStopwords[e]=new w.default(e,this.apiCall)),this.individualStopwords[e])},e.prototype.conversations=function(e){return void 0===e?this._conversations:(void 0===this.individualConversations[e]&&(this.individualConversations[e]=new S.default(e,this.apiCall)),this.individualConversations[e])},e}();t["default"]=k},2895:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0;i--){var n=Math.floor(Math.random()*(i+1));t=[e[n],e[i]],e[i]=t[0],e[n]=t[1]}},e}();t["default"]=c},53200:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)throw new r.ImportError("".concat(o.length-a.length," documents imported successfully, ").concat(a.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,n]}}))}))},t.prototype.export=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e)]}))}))},t.prototype.exportStream=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e,{responseType:"stream"})]}))}))},t}(a.SearchOnlyDocuments);t["default"]=l},81789:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},26670:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(t,i){var n=e.call(this,t)||this;return n.importResults=i,n}return n(t,e),t}(s.default);t["default"]=r},49447:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},96190:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},8703:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},64338:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},32577:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},89424:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},54164:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(56675)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},56675:function(e,t){"use strict";var i=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){var i=this.constructor,n=e.call(this,t)||this;return n.name=i.name,Object.setPrototypeOf(n,i.prototype),n}return i(t,e),t}(Error);t["default"]=n},61967:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportError=t.TypesenseError=t.ServerError=t.RequestUnauthorized=t.RequestMalformed=t.ObjectUnprocessable=t.ObjectNotFound=t.ObjectAlreadyExists=t.MissingConfigurationError=t.HTTPError=void 0;var o=n(i(81789));t.HTTPError=o.default;var s=n(i(49447));t.MissingConfigurationError=s.default;var r=n(i(96190));t.ObjectAlreadyExists=r.default;var a=n(i(8703));t.ObjectNotFound=a.default;var l=n(i(64338));t.ObjectUnprocessable=l.default;var c=n(i(32577));t.RequestMalformed=c.default;var d=n(i(89424));t.RequestUnauthorized=d.default;var u=n(i(54164));t.ServerError=u.default;var h=n(i(26670));t.ImportError=h.default;var g=n(i(56675));t.TypesenseError=g.default},70461:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]u,y&&(C=this.responseCache.keys().next().value,this.responseCache.delete(C)),w=this.responsePromiseCache.size>u,w&&(C=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(C)),[2,b]}}))}))},e}();t["default"]=a},65564:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(17569)),s=n(i(69195)),r=n(i(19710)),a=i(85394),l=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null===(t=e.sendApiKeyAsQueryParam)||void 0===t||t,!0===e.sendApiKeyAsQueryParam&&(e.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),e.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(e),this.apiCall=new s.default(this.configuration),this.multiSearch=new r.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return e.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(e){e[0];var t=e[1];t.documents().clearCache()}))},e.prototype.collections=function(e){if(e)return void 0===this.individualCollections[e]&&(this.individualCollections[e]=new a.SearchOnlyCollection(e,this.apiCall,this.configuration)),this.individualCollections[e];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},e}();t["default"]=l},85394:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOnlyCollection=void 0;var n=i(51491),o=function(){function e(e,t,i){this.name=e,this.apiCall=t,this.configuration=i,this._documents=new n.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return e.prototype.documents=function(){return this._documents},e}();t.SearchOnlyCollection=o},51491:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0},transformResponse:[function(e,t){var i=e;return void 0!==t&&"string"===typeof e&&t["content-type"]&&t["content-type"].startsWith("application/json")&&(i=JSON.parse(e)),i}]},!0!==C&&(b.timeout=1e3*g.connectionTimeoutSeconds),h&&0!==Object.keys(h).length&&(b.params=h),g.sendApiKeyAsQueryParam&&(b.params=b.params||{},b.params["x-typesense-api-key"]=g.apiKey),g.configuration.httpAgent&&(g.logger.debug("Request #".concat(i,": Using custom httpAgent")),b.httpAgent=g.configuration.httpAgent),g.configuration.httpsAgent&&(g.logger.debug("Request #".concat(i,": Using custom httpsAgent")),b.httpsAgent=g.configuration.httpsAgent),p&&("string"===typeof p&&0!==p.length||"object"===typeof p&&0!==Object.keys(p).length)&&(b.data=p),v&&(w=r.default.CancelToken,S=w.source(),_=function(){return S.cancel()},v.addEventListener("abort",_),b.cancelToken=S.token),[4,(0,r.default)(b)];case 2:if(k=o.sent(),k.status>=1&&k.status<=499&&g.setNodeHealthcheck(f,d),g.logger.debug("Request #".concat(i,": Request to Node ").concat(f.index," was made. Response Code was ").concat(k.status,".")),k.status>=200&&k.status<300)return[2,{value:Promise.resolve(k.data)}];if(k.status<500)return[2,{value:Promise.reject(g.customErrorForResponse(k,null===(s=k.data)||void 0===s?void 0:s.message))}];throw g.customErrorForResponse(k,null===(a=k.data)||void 0===a?void 0:a.message);case 3:return x=o.sent(),g.setNodeHealthcheck(f,u),n=x,g.logger.warn("Request #".concat(i,": Request to Node ").concat(f.index,' failed due to "').concat(x.code," ").concat(x.message).concat(null==x.response?"":" - "+JSON.stringify(null===(l=x.response)||void 0===l?void 0:l.data),'"')),g.logger.warn("Request #".concat(i,": Sleeping for ").concat(g.retryIntervalSeconds,"s and then retrying request...")),[4,g.timer(g.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return v&&_&&v.removeEventListener("abort",_),[7];case 6:return[2]}}))},g=this,f=1,b.label=1;case 1:return f<=this.numRetriesPerRequest+1?[5,c(f)]:[3,4];case 2:if(_=b.sent(),"object"===typeof _)return[2,_.value];b.label=3;case 3:return f++,[3,1];case 4:return this.logger.debug("Request #".concat(i,": No retries left. Raising last error")),[2,Promise.reject(n)]}}))}))},e.prototype.getNextNode=function(e){if(void 0===e&&(e=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(e,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(e,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(e,": Nodes Health: ").concat(this.nodes.map((function(e){return"Node ".concat(e.index," is ").concat(!0===e.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var t=this.nodes[0],i=0;i<=this.nodes.length;i++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,t=this.nodes[this.currentNodeIndex],!0===t.isHealthy||this.nodeDueForHealthcheck(t,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(t.index)),t;return this.logger.debug("Request #".concat(e,": No healthy nodes were found. Returning the next node, Node ").concat(t.index)),t},e.prototype.nodeDueForHealthcheck=function(e,t){void 0===t&&(t=0);var i=Date.now()-e.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return i&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),i},e.prototype.initializeMetadataForNodes=function(){var e=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,d)),this.nodes.forEach((function(t,i){t.index=i,e.setNodeHealthcheck(t,d)}))},e.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},e.prototype.uriFor=function(e,t){return null!=t.url?"".concat(t.url).concat(e):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path).concat(e)},e.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e[c]=this.apiKey),e["Content-Type"]="application/json",e},e.prototype.timer=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,new Promise((function(t){return setTimeout(t,1e3*e)}))]}))}))},e.prototype.customErrorForResponse=function(e,t){var i="Request failed with HTTP code ".concat(e.status);"string"===typeof t&&""!==t.trim()&&(i+=" | Server said: ".concat(t));var n=new l.default(i);return n=400===e.status?new a.RequestMalformed(i):401===e.status?new a.RequestUnauthorized(i):404===e.status?new a.ObjectNotFound(i):409===e.status?new a.ObjectAlreadyExists(i):422===e.status?new a.ObjectUnprocessable(i):e.status>=500&&e.status<=599?new a.ServerError(i):new a.HTTPError(i),n.httpStatus=e.status,n},e}();t["default"]=h},13260:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(11485)),s=n(i(75031)),r=n(i(70750)),a=n(i(75179)),l=n(i(56463)),c=n(i(76051)),d=n(i(83667)),u=n(i(60860)),h=n(i(63164)),g=n(i(46310)),p=n(i(79449)),f=n(i(74337)),m=n(i(38034)),_=n(i(31835)),v=n(i(50388)),b=n(i(42087)),y=n(i(58810)),w=n(i(83231)),C=n(i(14787)),S=n(i(4076)),k=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null!==(t=e.sendApiKeyAsQueryParam)&&void 0!==t&&t,this.configuration=new o.default(e),this.apiCall=new s.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new g.default(this.apiCall),this.health=new p.default(this.apiCall),this.operations=new f.default(this.apiCall),this.multiSearch=new m.default(this.apiCall,this.configuration),this._collections=new r.default(this.apiCall),this.individualCollections={},this._aliases=new l.default(this.apiCall),this.individualAliases={},this._keys=new d.default(this.apiCall),this.individualKeys={},this._presets=new _.default(this.apiCall),this.individualPresets={},this._stopwords=new y.default(this.apiCall),this.individualStopwords={},this.analytics=new b.default(this.apiCall),this._conversations=new C.default(this.apiCall),this.individualConversations={}}return e.prototype.collections=function(e){return void 0===e?this._collections:(void 0===this.individualCollections[e]&&(this.individualCollections[e]=new a.default(e,this.apiCall,this.configuration)),this.individualCollections[e])},e.prototype.aliases=function(e){return void 0===e?this._aliases:(void 0===this.individualAliases[e]&&(this.individualAliases[e]=new c.default(e,this.apiCall)),this.individualAliases[e])},e.prototype.keys=function(e){return void 0===e?this._keys:(void 0===this.individualKeys[e]&&(this.individualKeys[e]=new u.default(e,this.apiCall)),this.individualKeys[e])},e.prototype.presets=function(e){return void 0===e?this._presets:(void 0===this.individualPresets[e]&&(this.individualPresets[e]=new v.default(e,this.apiCall)),this.individualPresets[e])},e.prototype.stopwords=function(e){return void 0===e?this._stopwords:(void 0===this.individualStopwords[e]&&(this.individualStopwords[e]=new w.default(e,this.apiCall)),this.individualStopwords[e])},e.prototype.conversations=function(e){return void 0===e?this._conversations:(void 0===this.individualConversations[e]&&(this.individualConversations[e]=new S.default(e,this.apiCall)),this.individualConversations[e])},e}();t["default"]=k},75179:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0;i--){var n=Math.floor(Math.random()*(i+1));t=[e[n],e[i]],e[i]=t[0],e[n]=t[1]}},e}();t["default"]=c},4076:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)throw new r.ImportError("".concat(o.length-a.length," documents imported successfully, ").concat(a.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,n]}}))}))},t.prototype.export=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e)]}))}))},t.prototype.exportStream=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e,{responseType:"stream"})]}))}))},t}(a.SearchOnlyDocuments);t["default"]=l},63497:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},49298:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(t,i){var n=e.call(this,t)||this;return n.importResults=i,n}return n(t,e),t}(s.default);t["default"]=r},70875:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},72106:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},91051:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},86886:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},66301:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},50884:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},15016:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(i(80351)),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s.default);t["default"]=r},80351:function(e,t){"use strict";var i=this&&this.__extends||function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){var i=this.constructor,n=e.call(this,t)||this;return n.name=i.name,Object.setPrototypeOf(n,i.prototype),n}return i(t,e),t}(Error);t["default"]=n},90755:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportError=t.TypesenseError=t.ServerError=t.RequestUnauthorized=t.RequestMalformed=t.ObjectUnprocessable=t.ObjectNotFound=t.ObjectAlreadyExists=t.MissingConfigurationError=t.HTTPError=void 0;var o=n(i(63497));t.HTTPError=o.default;var s=n(i(70875));t.MissingConfigurationError=s.default;var r=n(i(72106));t.ObjectAlreadyExists=r.default;var a=n(i(91051));t.ObjectNotFound=a.default;var l=n(i(86886));t.ObjectUnprocessable=l.default;var c=n(i(66301));t.RequestMalformed=c.default;var d=n(i(50884));t.RequestUnauthorized=d.default;var u=n(i(15016));t.ServerError=u.default;var h=n(i(49298));t.ImportError=h.default;var g=n(i(80351));t.TypesenseError=g.default},79449:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]u,y&&(C=this.responseCache.keys().next().value,this.responseCache.delete(C)),w=this.responsePromiseCache.size>u,w&&(C=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(C)),[2,b]}}))}))},e}();t["default"]=a},32712:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(i(11485)),s=n(i(75031)),r=n(i(38034)),a=i(82465),l=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null===(t=e.sendApiKeyAsQueryParam)||void 0===t||t,!0===e.sendApiKeyAsQueryParam&&(e.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),e.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(e),this.apiCall=new s.default(this.configuration),this.multiSearch=new r.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return e.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(e){e[0];var t=e[1];t.documents().clearCache()}))},e.prototype.collections=function(e){if(e)return void 0===this.individualCollections[e]&&(this.individualCollections[e]=new a.SearchOnlyCollection(e,this.apiCall,this.configuration)),this.individualCollections[e];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},e}();t["default"]=l},82465:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOnlyCollection=void 0;var n=i(28439),o=function(){function e(e,t,i){this.name=e,this.apiCall=t,this.configuration=i,this._documents=new n.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return e.prototype.documents=function(){return this._documents},e}();t.SearchOnlyCollection=o},28439:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(i=1,n&&(o=2&a[0]?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[e,n]of t)i[e]=n;return i}},36980:(e,t,i)=>{"use strict";i.d(t,{y$:()=>ee});var n=i(61758),o=i(38734);function s(){return r().__VUE_DEVTOOLS_GLOBAL_HOOK__}function r(){return"undefined"!==typeof navigator&&"undefined"!==typeof window?window:"undefined"!==typeof i.g?i.g:{}}const a="function"===typeof Proxy,l="devtools-plugin:setup",c="plugin:settings:set";let d,u;function h(){var e;return void 0!==d||("undefined"!==typeof window&&window.performance?(d=!0,u=window.performance):"undefined"!==typeof i.g&&(null===(e=i.g.perf_hooks)||void 0===e?void 0:e.performance)?(d=!0,u=i.g.perf_hooks.performance):d=!1),d}function g(){return h()?u.now():Date.now()}class p{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const i={};if(e.settings)for(const t in e.settings){const n=e.settings[t];i[t]=n.defaultValue}const n=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},i);try{const e=localStorage.getItem(n),t=JSON.parse(e);Object.assign(o,t)}catch(e){}this.fallbacks={getSettings(){return o},setSettings(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(e){}o=e},now(){return g()}},t&&t.on(c,((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((i=>{this.targetQueue.push({method:t,args:e,resolve:i})}))})}async setRealTarget(e){this.target=e;for(const e of this.onQueue)this.target.on[e.method](...e.args);for(const e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}}function f(e,t){const i=e,n=r(),o=s(),c=a&&i.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&c){const e=c?new p(i,o):null,s=n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[];s.push({pluginDescriptor:i,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else o.emit(l,e,t)} /*! * vuex v4.1.0 * (c) 2022 Evan You * @license MIT */ -var m="store";function _(e,t){Object.keys(e).forEach((function(i){return t(e[i],i)}))}function v(e){return null!==e&&"object"===typeof e}function b(e){return e&&"function"===typeof e.then}function y(e,t){return function(){return e(t)}}function w(e,t,i){return t.indexOf(e)<0&&(i&&i.prepend?t.unshift(e):t.push(e)),function(){var i=t.indexOf(e);i>-1&&t.splice(i,1)}}function C(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var i=e.state;k(e,i,[],e._modules.root,!0),S(e,i,t)}function S(e,t,i){var s=e._state,r=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,l={},c={},d=(0,o.uY)(!0);d.run((function(){_(a,(function(t,i){l[i]=y(t,e),c[i]=(0,n.EW)((function(){return l[i]()})),Object.defineProperty(e.getters,i,{get:function(){return c[i].value},enumerable:!0})}))})),e._state=(0,o.Kh)({data:t}),e._scope=d,e.strict&&R(e),s&&i&&e._withCommit((function(){s.data=null})),r&&r.stop()}function k(e,t,i,n,o){var s=!i.length,r=e._modules.getNamespace(i);if(n.namespaced&&(e._modulesNamespaceMap[r],e._modulesNamespaceMap[r]=n),!s&&!o){var a=D(t,i.slice(0,-1)),l=i[i.length-1];e._withCommit((function(){a[l]=n.state}))}var c=n.context=x(e,r,i);n.forEachMutation((function(t,i){var n=r+i;L(e,n,t,c)})),n.forEachAction((function(t,i){var n=t.root?i:r+i,o=t.handler||t;T(e,n,o,c)})),n.forEachGetter((function(t,i){var n=r+i;I(e,n,t,c)})),n.forEachChild((function(n,s){k(e,t,i.concat(s),n,o)}))}function x(e,t,i){var n=""===t,o={dispatch:n?e.dispatch:function(i,n,o){var s=N(i,n,o),r=s.payload,a=s.options,l=s.type;return a&&a.root||(l=t+l),e.dispatch(l,r)},commit:n?e.commit:function(i,n,o){var s=N(i,n,o),r=s.payload,a=s.options,l=s.type;a&&a.root||(l=t+l),e.commit(l,r,a)}};return Object.defineProperties(o,{getters:{get:n?function(){return e.getters}:function(){return E(e,t)}},state:{get:function(){return D(e.state,i)}}}),o}function E(e,t){if(!e._makeLocalGettersCache[t]){var i={},n=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,n)===t){var s=o.slice(n);Object.defineProperty(i,s,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=i}return e._makeLocalGettersCache[t]}function L(e,t,i,n){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){i.call(e,n.state,t)}))}function T(e,t,i,n){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o=i.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t);return b(o)||(o=Promise.resolve(o)),e._devtoolHook?o.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):o}))}function I(e,t,i,n){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return i(n.state,n.getters,e.state,e.getters)})}function R(e){(0,n.wB)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function D(e,t){return t.reduce((function(e,t){return e[t]}),e)}function N(e,t,i){return v(e)&&e.type&&(i=t,t=e,e=e.type),{type:e,payload:t,options:i}}var A="vuex bindings",O="vuex:mutations",P="vuex:actions",M="vuex",F=0;function B(e,t){f({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[A]},(function(i){i.addTimelineLayer({id:O,label:"Vuex Mutations",color:W}),i.addTimelineLayer({id:P,label:"Vuex Actions",color:W}),i.addInspector({id:M,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),i.on.getInspectorTree((function(i){if(i.app===e&&i.inspectorId===M)if(i.filter){var n=[];$(n,t._modules.root,i.filter,""),i.rootNodes=n}else i.rootNodes=[U(t._modules.root,"")]})),i.on.getInspectorState((function(i){if(i.app===e&&i.inspectorId===M){var n=i.nodeId;E(t,n),i.state=q(G(t._modules,n),"root"===n?t.getters:t._makeLocalGettersCache,n)}})),i.on.editInspectorState((function(i){if(i.app===e&&i.inspectorId===M){var n=i.nodeId,o=i.path;"root"!==n&&(o=n.split("/").filter(Boolean).concat(o)),t._withCommit((function(){i.set(t._state.data,o,i.state.value)}))}})),t.subscribe((function(e,t){var n={};e.payload&&(n.payload=e.payload),n.state=t,i.notifyComponentUpdate(),i.sendInspectorTree(M),i.sendInspectorState(M),i.addTimelineEvent({layerId:O,event:{time:Date.now(),title:e.type,data:n}})})),t.subscribeAction({before:function(e,t){var n={};e.payload&&(n.payload=e.payload),e._id=F++,e._time=Date.now(),n.state=t,i.addTimelineEvent({layerId:P,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:n}})},after:function(e,t){var n={},o=Date.now()-e._time;n.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(n.payload=e.payload),n.state=t,i.addTimelineEvent({layerId:P,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:n}})}})}))}var W=8702998,H=6710886,V=16777215,j={label:"namespaced",textColor:V,backgroundColor:H};function z(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function U(e,t){return{id:t||"root",label:z(t),tags:e.namespaced?[j]:[],children:Object.keys(e._children).map((function(i){return U(e._children[i],t+i+"/")}))}}function $(e,t,i,n){n.includes(i)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[j]:[]}),Object.keys(t._children).forEach((function(o){$(e,t._children[o],i,n+o+"/")}))}function q(e,t,i){t="root"===i?t:t[i];var n=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(n.length){var s=K(t);o.getters=Object.keys(s).map((function(e){return{key:e.endsWith("/")?z(e):e,editable:!1,value:Q((function(){return s[e]}))}}))}return o}function K(e){var t={};return Object.keys(e).forEach((function(i){var n=i.split("/");if(n.length>1){var o=t,s=n.pop();n.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[s]=Q((function(){return e[i]}))}else t[i]=Q((function(){return e[i]}))})),t}function G(e,t){var i=t.split("/").filter((function(e){return e}));return i.reduce((function(e,n,o){var s=e[n];if(!s)throw new Error('Missing module "'+n+'" for path "'+t+'".');return o===i.length-1?s:s._children}),"root"===t?e:e.root._children)}function Q(e){try{return e()}catch(t){return t}}var Y=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var i=e.state;this.state=("function"===typeof i?i():i)||{}},Z={namespaced:{configurable:!0}};Z.namespaced.get=function(){return!!this._rawModule.namespaced},Y.prototype.addChild=function(e,t){this._children[e]=t},Y.prototype.removeChild=function(e){delete this._children[e]},Y.prototype.getChild=function(e){return this._children[e]},Y.prototype.hasChild=function(e){return e in this._children},Y.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Y.prototype.forEachChild=function(e){_(this._children,e)},Y.prototype.forEachGetter=function(e){this._rawModule.getters&&_(this._rawModule.getters,e)},Y.prototype.forEachAction=function(e){this._rawModule.actions&&_(this._rawModule.actions,e)},Y.prototype.forEachMutation=function(e){this._rawModule.mutations&&_(this._rawModule.mutations,e)},Object.defineProperties(Y.prototype,Z);var X=function(e){this.register([],e,!1)};function J(e,t,i){if(t.update(i),i.modules)for(var n in i.modules){if(!t.getChild(n))return void 0;J(e.concat(n),t.getChild(n),i.modules[n])}}X.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},X.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,i){return t=t.getChild(i),e+(t.namespaced?i+"/":"")}),"")},X.prototype.update=function(e){J([],this.root,e)},X.prototype.register=function(e,t,i){var n=this;void 0===i&&(i=!0);var o=new Y(t,i);if(0===e.length)this.root=o;else{var s=this.get(e.slice(0,-1));s.addChild(e[e.length-1],o)}t.modules&&_(t.modules,(function(t,o){n.register(e.concat(o),t,i)}))},X.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),i=e[e.length-1],n=t.getChild(i);n&&n.runtime&&t.removeChild(i)},X.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),i=e[e.length-1];return!!t&&t.hasChild(i)};function ee(e){return new te(e)}var te=function(e){var t=this;void 0===e&&(e={});var i=e.plugins;void 0===i&&(i=[]);var n=e.strict;void 0===n&&(n=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new X(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var s=this,r=this,a=r.dispatch,l=r.commit;this.dispatch=function(e,t){return a.call(s,e,t)},this.commit=function(e,t,i){return l.call(s,e,t,i)},this.strict=n;var c=this._modules.root.state;k(this,c,[],this._modules.root),S(this,c),i.forEach((function(e){return e(t)}))},ie={state:{configurable:!0}};te.prototype.install=function(e,t){e.provide(t||m,this),e.config.globalProperties.$store=this;var i=void 0!==this._devtools&&this._devtools;i&&B(e,this)},ie.state.get=function(){return this._state.data},ie.state.set=function(e){0},te.prototype.commit=function(e,t,i){var n=this,o=N(e,t,i),s=o.type,r=o.payload,a=(o.options,{type:s,payload:r}),l=this._mutations[s];l&&(this._withCommit((function(){l.forEach((function(e){e(r)}))})),this._subscribers.slice().forEach((function(e){return e(a,n.state)})))},te.prototype.dispatch=function(e,t){var i=this,n=N(e,t),o=n.type,s=n.payload,r={type:o,payload:s},a=this._actions[o];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(r,i.state)}))}catch(c){0}var l=a.length>1?Promise.all(a.map((function(e){return e(s)}))):a[0](s);return new Promise((function(e,t){l.then((function(t){try{i._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(r,i.state)}))}catch(c){0}e(t)}),(function(e){try{i._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(r,i.state,e)}))}catch(c){0}t(e)}))}))}},te.prototype.subscribe=function(e,t){return w(e,this._subscribers,t)},te.prototype.subscribeAction=function(e,t){var i="function"===typeof e?{before:e}:e;return w(i,this._actionSubscribers,t)},te.prototype.watch=function(e,t,i){var o=this;return(0,n.wB)((function(){return e(o.state,o.getters)}),t,Object.assign({},i))},te.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},te.prototype.registerModule=function(e,t,i){void 0===i&&(i={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),k(this,this.state,e,this._modules.get(e),i.preserveState),S(this,this.state)},te.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var i=D(t.state,e.slice(0,-1));delete i[e[e.length-1]]})),C(this)},te.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},te.prototype.hotUpdate=function(e){this._modules.update(e),C(this,!0)},te.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(te.prototype,ie);se((function(e,t){var i={};return ne(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=this.$store.state,i=this.$store.getters;if(e){var n=re(this.$store,"mapState",e);if(!n)return;t=n.context.state,i=n.context.getters}return"function"===typeof o?o.call(this,t,i):t[o]},i[n].vuex=!0})),i})),se((function(e,t){var i={};return ne(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=[],i=arguments.length;while(i--)t[i]=arguments[i];var n=this.$store.commit;if(e){var s=re(this.$store,"mapMutations",e);if(!s)return;n=s.context.commit}return"function"===typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),i})),se((function(e,t){var i={};return ne(t).forEach((function(t){var n=t.key,o=t.val;o=e+o,i[n]=function(){if(!e||re(this.$store,"mapGetters",e))return this.$store.getters[o]},i[n].vuex=!0})),i})),se((function(e,t){var i={};return ne(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=[],i=arguments.length;while(i--)t[i]=arguments[i];var n=this.$store.dispatch;if(e){var s=re(this.$store,"mapActions",e);if(!s)return;n=s.context.dispatch}return"function"===typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),i}));function ne(e){return oe(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function oe(e){return Array.isArray(e)||v(e)}function se(e){return function(t,i){return"string"!==typeof t?(i=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,i)}}function re(e,t,i){var n=e._modulesNamespaceMap[i];return n}},60455:(e,t,i)=>{"use strict";i.d(t,{Bt:()=>ce,aE:()=>ot});var n=i(61758),o=i(38734); +var m="store";function _(e,t){Object.keys(e).forEach((function(i){return t(e[i],i)}))}function v(e){return null!==e&&"object"===typeof e}function b(e){return e&&"function"===typeof e.then}function y(e,t){return function(){return e(t)}}function w(e,t,i){return t.indexOf(e)<0&&(i&&i.prepend?t.unshift(e):t.push(e)),function(){var i=t.indexOf(e);i>-1&&t.splice(i,1)}}function C(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var i=e.state;k(e,i,[],e._modules.root,!0),S(e,i,t)}function S(e,t,i){var s=e._state,r=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,l={},c={},d=(0,o.uY)(!0);d.run((function(){_(a,(function(t,i){l[i]=y(t,e),c[i]=(0,n.EW)((function(){return l[i]()})),Object.defineProperty(e.getters,i,{get:function(){return c[i].value},enumerable:!0})}))})),e._state=(0,o.Kh)({data:t}),e._scope=d,e.strict&&D(e),s&&i&&e._withCommit((function(){s.data=null})),r&&r.stop()}function k(e,t,i,n,o){var s=!i.length,r=e._modules.getNamespace(i);if(n.namespaced&&(e._modulesNamespaceMap[r],e._modulesNamespaceMap[r]=n),!s&&!o){var a=R(t,i.slice(0,-1)),l=i[i.length-1];e._withCommit((function(){a[l]=n.state}))}var c=n.context=x(e,r,i);n.forEachMutation((function(t,i){var n=r+i;L(e,n,t,c)})),n.forEachAction((function(t,i){var n=t.root?i:r+i,o=t.handler||t;T(e,n,o,c)})),n.forEachGetter((function(t,i){var n=r+i;I(e,n,t,c)})),n.forEachChild((function(n,s){k(e,t,i.concat(s),n,o)}))}function x(e,t,i){var n=""===t,o={dispatch:n?e.dispatch:function(i,n,o){var s=N(i,n,o),r=s.payload,a=s.options,l=s.type;return a&&a.root||(l=t+l),e.dispatch(l,r)},commit:n?e.commit:function(i,n,o){var s=N(i,n,o),r=s.payload,a=s.options,l=s.type;a&&a.root||(l=t+l),e.commit(l,r,a)}};return Object.defineProperties(o,{getters:{get:n?function(){return e.getters}:function(){return E(e,t)}},state:{get:function(){return R(e.state,i)}}}),o}function E(e,t){if(!e._makeLocalGettersCache[t]){var i={},n=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,n)===t){var s=o.slice(n);Object.defineProperty(i,s,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=i}return e._makeLocalGettersCache[t]}function L(e,t,i,n){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){i.call(e,n.state,t)}))}function T(e,t,i,n){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o=i.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t);return b(o)||(o=Promise.resolve(o)),e._devtoolHook?o.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):o}))}function I(e,t,i,n){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return i(n.state,n.getters,e.state,e.getters)})}function D(e){(0,n.wB)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function R(e,t){return t.reduce((function(e,t){return e[t]}),e)}function N(e,t,i){return v(e)&&e.type&&(i=t,t=e,e=e.type),{type:e,payload:t,options:i}}var A="vuex bindings",O="vuex:mutations",P="vuex:actions",M="vuex",F=0;function B(e,t){f({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[A]},(function(i){i.addTimelineLayer({id:O,label:"Vuex Mutations",color:W}),i.addTimelineLayer({id:P,label:"Vuex Actions",color:W}),i.addInspector({id:M,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),i.on.getInspectorTree((function(i){if(i.app===e&&i.inspectorId===M)if(i.filter){var n=[];$(n,t._modules.root,i.filter,""),i.rootNodes=n}else i.rootNodes=[U(t._modules.root,"")]})),i.on.getInspectorState((function(i){if(i.app===e&&i.inspectorId===M){var n=i.nodeId;E(t,n),i.state=q(G(t._modules,n),"root"===n?t.getters:t._makeLocalGettersCache,n)}})),i.on.editInspectorState((function(i){if(i.app===e&&i.inspectorId===M){var n=i.nodeId,o=i.path;"root"!==n&&(o=n.split("/").filter(Boolean).concat(o)),t._withCommit((function(){i.set(t._state.data,o,i.state.value)}))}})),t.subscribe((function(e,t){var n={};e.payload&&(n.payload=e.payload),n.state=t,i.notifyComponentUpdate(),i.sendInspectorTree(M),i.sendInspectorState(M),i.addTimelineEvent({layerId:O,event:{time:Date.now(),title:e.type,data:n}})})),t.subscribeAction({before:function(e,t){var n={};e.payload&&(n.payload=e.payload),e._id=F++,e._time=Date.now(),n.state=t,i.addTimelineEvent({layerId:P,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:n}})},after:function(e,t){var n={},o=Date.now()-e._time;n.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(n.payload=e.payload),n.state=t,i.addTimelineEvent({layerId:P,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:n}})}})}))}var W=8702998,H=6710886,V=16777215,j={label:"namespaced",textColor:V,backgroundColor:H};function z(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function U(e,t){return{id:t||"root",label:z(t),tags:e.namespaced?[j]:[],children:Object.keys(e._children).map((function(i){return U(e._children[i],t+i+"/")}))}}function $(e,t,i,n){n.includes(i)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[j]:[]}),Object.keys(t._children).forEach((function(o){$(e,t._children[o],i,n+o+"/")}))}function q(e,t,i){t="root"===i?t:t[i];var n=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(n.length){var s=K(t);o.getters=Object.keys(s).map((function(e){return{key:e.endsWith("/")?z(e):e,editable:!1,value:Q((function(){return s[e]}))}}))}return o}function K(e){var t={};return Object.keys(e).forEach((function(i){var n=i.split("/");if(n.length>1){var o=t,s=n.pop();n.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[s]=Q((function(){return e[i]}))}else t[i]=Q((function(){return e[i]}))})),t}function G(e,t){var i=t.split("/").filter((function(e){return e}));return i.reduce((function(e,n,o){var s=e[n];if(!s)throw new Error('Missing module "'+n+'" for path "'+t+'".');return o===i.length-1?s:s._children}),"root"===t?e:e.root._children)}function Q(e){try{return e()}catch(e){return e}}var Y=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var i=e.state;this.state=("function"===typeof i?i():i)||{}},Z={namespaced:{configurable:!0}};Z.namespaced.get=function(){return!!this._rawModule.namespaced},Y.prototype.addChild=function(e,t){this._children[e]=t},Y.prototype.removeChild=function(e){delete this._children[e]},Y.prototype.getChild=function(e){return this._children[e]},Y.prototype.hasChild=function(e){return e in this._children},Y.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Y.prototype.forEachChild=function(e){_(this._children,e)},Y.prototype.forEachGetter=function(e){this._rawModule.getters&&_(this._rawModule.getters,e)},Y.prototype.forEachAction=function(e){this._rawModule.actions&&_(this._rawModule.actions,e)},Y.prototype.forEachMutation=function(e){this._rawModule.mutations&&_(this._rawModule.mutations,e)},Object.defineProperties(Y.prototype,Z);var X=function(e){this.register([],e,!1)};function J(e,t,i){if(t.update(i),i.modules)for(var n in i.modules){if(!t.getChild(n))return void 0;J(e.concat(n),t.getChild(n),i.modules[n])}}X.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},X.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,i){return t=t.getChild(i),e+(t.namespaced?i+"/":"")}),"")},X.prototype.update=function(e){J([],this.root,e)},X.prototype.register=function(e,t,i){var n=this;void 0===i&&(i=!0);var o=new Y(t,i);if(0===e.length)this.root=o;else{var s=this.get(e.slice(0,-1));s.addChild(e[e.length-1],o)}t.modules&&_(t.modules,(function(t,o){n.register(e.concat(o),t,i)}))},X.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),i=e[e.length-1],n=t.getChild(i);n&&n.runtime&&t.removeChild(i)},X.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),i=e[e.length-1];return!!t&&t.hasChild(i)};function ee(e){return new te(e)}var te=function(e){var t=this;void 0===e&&(e={});var i=e.plugins;void 0===i&&(i=[]);var n=e.strict;void 0===n&&(n=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new X(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var s=this,r=this,a=r.dispatch,l=r.commit;this.dispatch=function(e,t){return a.call(s,e,t)},this.commit=function(e,t,i){return l.call(s,e,t,i)},this.strict=n;var c=this._modules.root.state;k(this,c,[],this._modules.root),S(this,c),i.forEach((function(e){return e(t)}))},ie={state:{configurable:!0}};te.prototype.install=function(e,t){e.provide(t||m,this),e.config.globalProperties.$store=this;var i=void 0!==this._devtools&&this._devtools;i&&B(e,this)},ie.state.get=function(){return this._state.data},ie.state.set=function(e){0},te.prototype.commit=function(e,t,i){var n=this,o=N(e,t,i),s=o.type,r=o.payload,a=(o.options,{type:s,payload:r}),l=this._mutations[s];l&&(this._withCommit((function(){l.forEach((function(e){e(r)}))})),this._subscribers.slice().forEach((function(e){return e(a,n.state)})))},te.prototype.dispatch=function(e,t){var i=this,n=N(e,t),o=n.type,s=n.payload,r={type:o,payload:s},a=this._actions[o];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(r,i.state)}))}catch(e){0}var l=a.length>1?Promise.all(a.map((function(e){return e(s)}))):a[0](s);return new Promise((function(e,t){l.then((function(t){try{i._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(r,i.state)}))}catch(e){0}e(t)}),(function(e){try{i._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(r,i.state,e)}))}catch(e){0}t(e)}))}))}},te.prototype.subscribe=function(e,t){return w(e,this._subscribers,t)},te.prototype.subscribeAction=function(e,t){var i="function"===typeof e?{before:e}:e;return w(i,this._actionSubscribers,t)},te.prototype.watch=function(e,t,i){var o=this;return(0,n.wB)((function(){return e(o.state,o.getters)}),t,Object.assign({},i))},te.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},te.prototype.registerModule=function(e,t,i){void 0===i&&(i={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),k(this,this.state,e,this._modules.get(e),i.preserveState),S(this,this.state)},te.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var i=R(t.state,e.slice(0,-1));delete i[e[e.length-1]]})),C(this)},te.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},te.prototype.hotUpdate=function(e){this._modules.update(e),C(this,!0)},te.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(te.prototype,ie);se((function(e,t){var i={};return ne(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=this.$store.state,i=this.$store.getters;if(e){var n=re(this.$store,"mapState",e);if(!n)return;t=n.context.state,i=n.context.getters}return"function"===typeof o?o.call(this,t,i):t[o]},i[n].vuex=!0})),i})),se((function(e,t){var i={};return ne(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=[],i=arguments.length;while(i--)t[i]=arguments[i];var n=this.$store.commit;if(e){var s=re(this.$store,"mapMutations",e);if(!s)return;n=s.context.commit}return"function"===typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),i})),se((function(e,t){var i={};return ne(t).forEach((function(t){var n=t.key,o=t.val;o=e+o,i[n]=function(){if(!e||re(this.$store,"mapGetters",e))return this.$store.getters[o]},i[n].vuex=!0})),i})),se((function(e,t){var i={};return ne(t).forEach((function(t){var n=t.key,o=t.val;i[n]=function(){var t=[],i=arguments.length;while(i--)t[i]=arguments[i];var n=this.$store.dispatch;if(e){var s=re(this.$store,"mapActions",e);if(!s)return;n=s.context.dispatch}return"function"===typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),i}));function ne(e){return oe(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function oe(e){return Array.isArray(e)||v(e)}function se(e){return function(t,i){return"string"!==typeof t?(i=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,i)}}function re(e,t,i){var n=e._modulesNamespaceMap[i];return n}},60455:(e,t,i)=>{"use strict";i.d(t,{Bt:()=>ce,aE:()=>ot});var n=i(61758),o=i(38734); /*! * vue-router v4.4.5 * (c) 2024 Eduardo San Martin Morote * @license MIT */ -const s="undefined"!==typeof document;function r(e){return"object"===typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}function a(e){return e.__esModule||"Module"===e[Symbol.toStringTag]||e.default&&r(e.default)}const l=Object.assign;function c(e,t){const i={};for(const n in t){const o=t[n];i[n]=u(o)?o.map(e):e(o)}return i}const d=()=>{},u=Array.isArray;const h=/#/g,g=/&/g,p=/\//g,f=/=/g,m=/\?/g,_=/\+/g,v=/%5B/g,b=/%5D/g,y=/%5E/g,w=/%60/g,C=/%7B/g,S=/%7C/g,k=/%7D/g,x=/%20/g;function E(e){return encodeURI(""+e).replace(S,"|").replace(v,"[").replace(b,"]")}function L(e){return E(e).replace(C,"{").replace(k,"}").replace(y,"^")}function T(e){return E(e).replace(_,"%2B").replace(x,"+").replace(h,"%23").replace(g,"%26").replace(w,"`").replace(C,"{").replace(k,"}").replace(y,"^")}function I(e){return T(e).replace(f,"%3D")}function R(e){return E(e).replace(h,"%23").replace(m,"%3F")}function D(e){return null==e?"":R(e).replace(p,"%2F")}function N(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}const A=/\/$/,O=e=>e.replace(A,"");function P(e,t,i="/"){let n,o={},s="",r="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(n=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),o=e(s)),a>-1&&(n=n||t.slice(0,a),r=t.slice(a,t.length)),n=z(null!=n?n:t,i),{fullPath:n+(s&&"?")+s+r,path:n,query:o,hash:N(r)}}function M(e,t){const i=t.query?e(t.query):"";return t.path+(i&&"?")+i+(t.hash||"")}function F(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function B(e,t,i){const n=t.matched.length-1,o=i.matched.length-1;return n>-1&&n===o&&W(t.matched[n],i.matched[o])&&H(t.params,i.params)&&e(t.query)===e(i.query)&&t.hash===i.hash}function W(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function H(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!V(e[i],t[i]))return!1;return!0}function V(e,t){return u(e)?j(e,t):u(t)?j(t,e):e===t}function j(e,t){return u(t)?e.length===t.length&&e.every(((e,i)=>e===t[i])):1===e.length&&e[0]===t}function z(e,t){if(e.startsWith("/"))return e;if(!e)return t;const i=t.split("/"),n=e.split("/"),o=n[n.length-1];".."!==o&&"."!==o||n.push("");let s,r,a=i.length-1;for(s=0;s1&&a--}return i.slice(0,a).join("/")+"/"+n.slice(s).join("/")}const U={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var $,q;(function(e){e["pop"]="pop",e["push"]="push"})($||($={})),function(e){e["back"]="back",e["forward"]="forward",e["unknown"]=""}(q||(q={}));function K(e){if(!e)if(s){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),O(e)}const G=/^[^#]+#/;function Q(e,t){return e.replace(G,"#")+t}function Y(e,t){const i=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-i.left-(t.left||0),top:n.top-i.top-(t.top||0)}}const Z=()=>({left:window.scrollX,top:window.scrollY});function X(e){let t;if("el"in e){const i=e.el,n="string"===typeof i&&i.startsWith("#");0;const o="string"===typeof i?n?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!o)return;t=Y(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}function J(e,t){const i=history.state?history.state.position-t:-1;return i+e}const ee=new Map;function te(e,t){ee.set(e,t)}function ie(e){const t=ee.get(e);return ee.delete(e),t}let ne=()=>location.protocol+"//"+location.host;function oe(e,t){const{pathname:i,search:n,hash:o}=t,s=e.indexOf("#");if(s>-1){let t=o.includes(e.slice(s))?e.slice(s).length:1,i=o.slice(t);return"/"!==i[0]&&(i="/"+i),F(i,"")}const r=F(i,e);return r+n+o}function se(e,t,i,n){let o=[],s=[],r=null;const a=({state:s})=>{const a=oe(e,location),l=i.value,c=t.value;let d=0;if(s){if(i.value=a,t.value=s,r&&r===l)return void(r=null);d=c?s.position-c.position:0}else n(a);o.forEach((e=>{e(i.value,l,{delta:d,type:$.pop,direction:d?d>0?q.forward:q.back:q.unknown})}))};function c(){r=i.value}function d(e){o.push(e);const t=()=>{const t=o.indexOf(e);t>-1&&o.splice(t,1)};return s.push(t),t}function u(){const{history:e}=window;e.state&&e.replaceState(l({},e.state,{scroll:Z()}),"")}function h(){for(const e of s)e();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:c,listen:d,destroy:h}}function re(e,t,i,n=!1,o=!1){return{back:e,current:t,forward:i,replaced:n,position:window.history.length,scroll:o?Z():null}}function ae(e){const{history:t,location:i}=window,n={value:oe(e,i)},o={value:t.state};function s(n,s,r){const a=e.indexOf("#"),l=a>-1?(i.host&&document.querySelector("base")?e:e.slice(a))+n:ne()+e+n;try{t[r?"replaceState":"pushState"](s,"",l),o.value=s}catch(c){console.error(c),i[r?"replace":"assign"](l)}}function r(e,i){const r=l({},t.state,re(o.value.back,e,o.value.forward,!0),i,{position:o.value.position});s(e,r,!0),n.value=e}function a(e,i){const r=l({},o.value,t.state,{forward:e,scroll:Z()});s(r.current,r,!0);const a=l({},re(n.value,e,null),{position:r.position+1},i);s(e,a,!1),n.value=e}return o.value||s(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:n,state:o,push:a,replace:r}}function le(e){e=K(e);const t=ae(e),i=se(e,t.state,t.location,t.replace);function n(e,t=!0){t||i.pauseListeners(),history.go(e)}const o=l({location:"",base:e,go:n,createHref:Q.bind(null,e)},t,i);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function ce(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),le(e)}function de(e){return"string"===typeof e||e&&"object"===typeof e}function ue(e){return"string"===typeof e||"symbol"===typeof e}const he=Symbol("");var ge;(function(e){e[e["aborted"]=4]="aborted",e[e["cancelled"]=8]="cancelled",e[e["duplicated"]=16]="duplicated"})(ge||(ge={}));function pe(e,t){return l(new Error,{type:e,[he]:!0},t)}function fe(e,t){return e instanceof Error&&he in e&&(null==t||!!(e.type&t))}const me="[^/]+?",_e={sensitive:!1,strict:!1,start:!0,end:!0},ve=/[.+*?^${}()[\]/\\]/g;function be(e,t){const i=l({},_e,t),n=[];let o=i.start?"^":"";const s=[];for(const l of e){const e=l.length?[]:[90];i.strict&&!l.length&&(o+="/");for(let t=0;tt.length?1===t.length&&80===t[0]?1:-1:0}function we(e,t){let i=0;const n=e.score,o=t.score;while(i0&&t[t.length-1]<0}const Se={type:0,value:""},ke=/[a-zA-Z0-9_]/;function xe(e){if(!e)return[[]];if("/"===e)return[[Se]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(e){throw new Error(`ERR (${i})/"${c}": ${e}`)}let i=0,n=i;const o=[];let s;function r(){s&&o.push(s),s=[]}let a,l=0,c="",d="";function u(){c&&(0===i?s.push({type:0,value:c}):1===i||2===i||3===i?(s.length>1&&("*"===a||"+"===a)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:d,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):t("Invalid state to consume buffer"),c="")}function h(){c+=a}while(l{r(p)}:d}function r(e){if(ue(e)){const t=n.get(e);t&&(n.delete(e),i.splice(i.indexOf(t),1),t.children.forEach(r),t.alias.forEach(r))}else{const t=i.indexOf(e);t>-1&&(i.splice(t,1),e.record.name&&n.delete(e.record.name),e.children.forEach(r),e.alias.forEach(r))}}function a(){return i}function c(e){const t=Oe(e,i);i.splice(t,0,e),e.record.name&&!De(e)&&n.set(e.record.name,e)}function u(e,t){let o,s,r,a={};if("name"in e&&e.name){if(o=n.get(e.name),!o)throw pe(1,{location:e});0,r=o.record.name,a=l(Te(t.params,o.keys.filter((e=>!e.optional)).concat(o.parent?o.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&Te(e.params,o.keys.map((e=>e.name)))),s=o.stringify(a)}else if(null!=e.path)s=e.path,o=i.find((e=>e.re.test(s))),o&&(a=o.parse(s),r=o.record.name);else{if(o=t.name?n.get(t.name):i.find((e=>e.re.test(t.path))),!o)throw pe(1,{location:e,currentLocation:t});r=o.record.name,a=l({},t.params,e.params),s=o.stringify(a)}const c=[];let d=o;while(d)c.unshift(d.record),d=d.parent;return{name:r,path:s,params:a,matched:c,meta:Ne(c)}}function h(){i.length=0,n.clear()}return t=Ae({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>s(e))),{addRoute:s,resolve:u,removeRoute:r,clearRoutes:h,getRoutes:a,getRecordMatcher:o}}function Te(e,t){const i={};for(const n of t)n in e&&(i[n]=e[n]);return i}function Ie(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Re(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Re(e){const t={},i=e.props||!1;if("component"in e)t.default=i;else for(const n in e.components)t[n]="object"===typeof i?i[n]:i;return t}function De(e){while(e){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ne(e){return e.reduce(((e,t)=>l(e,t.meta)),{})}function Ae(e,t){const i={};for(const n in e)i[n]=n in t?t[n]:e[n];return i}function Oe(e,t){let i=0,n=t.length;while(i!==n){const o=i+n>>1,s=we(e,t[o]);s<0?n=o:i=o+1}const o=Pe(e);return o&&(n=t.lastIndexOf(o,n-1)),n}function Pe(e){let t=e;while(t=t.parent)if(Me(t)&&0===we(e,t))return t}function Me({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Fe(e){const t={};if(""===e||"?"===e)return t;const i="?"===e[0],n=(i?e.slice(1):e).split("&");for(let o=0;oe&&T(e))):[n&&T(n)];o.forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+i,null!=e&&(t+="="+e))}))}return t}function We(e){const t={};for(const i in e){const n=e[i];void 0!==n&&(t[i]=u(n)?n.map((e=>null==e?null:""+e)):null==n?n:""+n)}return t}const He=Symbol(""),Ve=Symbol(""),je=Symbol(""),ze=Symbol(""),Ue=Symbol("");function $e(){let e=[];function t(t){return e.push(t),()=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)}}function i(){e=[]}return{add:t,list:()=>e.slice(),reset:i}}function qe(e,t,i,n,o,s=e=>e()){const r=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise(((a,l)=>{const c=e=>{!1===e?l(pe(4,{from:i,to:t})):e instanceof Error?l(e):de(e)?l(pe(2,{from:t,to:e})):(r&&n.enterCallbacks[o]===r&&"function"===typeof e&&r.push(e),a())},d=s((()=>e.call(n&&n.instances[o],t,i,c)));let u=Promise.resolve(d);e.length<3&&(u=u.then(c)),u.catch((e=>l(e)))}))}function Ke(e,t,i,n,o=e=>e()){const s=[];for(const l of e){0;for(const e in l.components){let c=l.components[e];if("beforeRouteEnter"===t||l.instances[e])if(r(c)){const r=c.__vccOpts||c,a=r[t];a&&s.push(qe(a,i,n,l,e,o))}else{let r=c();0,s.push((()=>r.then((s=>{if(!s)throw new Error(`Couldn't resolve component "${e}" at "${l.path}"`);const r=a(s)?s.default:s;l.mods[e]=s,l.components[e]=r;const c=r.__vccOpts||r,d=c[t];return d&&qe(d,i,n,l,e,o)()}))))}}}return s}function Ge(e){const t=(0,n.WQ)(je),i=(0,n.WQ)(ze);const s=(0,n.EW)((()=>{const i=(0,o.R1)(e.to);return t.resolve(i)})),r=(0,n.EW)((()=>{const{matched:e}=s.value,{length:t}=e,n=e[t-1],o=i.matched;if(!n||!o.length)return-1;const r=o.findIndex(W.bind(null,n));if(r>-1)return r;const a=Je(e[t-2]);return t>1&&Je(n)===a&&o[o.length-1].path!==a?o.findIndex(W.bind(null,e[t-2])):r})),a=(0,n.EW)((()=>r.value>-1&&Xe(i.params,s.value.params))),l=(0,n.EW)((()=>r.value>-1&&r.value===i.matched.length-1&&H(i.params,s.value.params)));function c(i={}){return Ze(i)?t[(0,o.R1)(e.replace)?"replace":"push"]((0,o.R1)(e.to)).catch(d):Promise.resolve()}return{route:s,href:(0,n.EW)((()=>s.value.href)),isActive:a,isExactActive:l,navigate:c}}const Qe=(0,n.pM)({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ge,setup(e,{slots:t}){const i=(0,o.Kh)(Ge(e)),{options:s}=(0,n.WQ)(je),r=(0,n.EW)((()=>({[et(e.activeClass,s.linkActiveClass,"router-link-active")]:i.isActive,[et(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive})));return()=>{const o=t.default&&t.default(i);return e.custom?o:(0,n.h)("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:r.value},o)}}}),Ye=Qe;function Ze(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(void 0===e.button||0===e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Xe(e,t){for(const i in t){const n=t[i],o=e[i];if("string"===typeof n){if(n!==o)return!1}else if(!u(o)||o.length!==n.length||n.some(((e,t)=>e!==o[t])))return!1}return!0}function Je(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const et=(e,t,i)=>null!=e?e:null!=t?t:i,tt=(0,n.pM)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){const s=(0,n.WQ)(Ue),r=(0,n.EW)((()=>e.route||s.value)),a=(0,n.WQ)(Ve,0),c=(0,n.EW)((()=>{let e=(0,o.R1)(a);const{matched:t}=r.value;let i;while((i=t[e])&&!i.components)e++;return e})),d=(0,n.EW)((()=>r.value.matched[c.value]));(0,n.Gt)(Ve,(0,n.EW)((()=>c.value+1))),(0,n.Gt)(He,d),(0,n.Gt)(Ue,r);const u=(0,o.KR)();return(0,n.wB)((()=>[u.value,d.value,e.name]),(([e,t,i],[n,o,s])=>{t&&(t.instances[i]=e,o&&o!==t&&e&&e===n&&(t.leaveGuards.size||(t.leaveGuards=o.leaveGuards),t.updateGuards.size||(t.updateGuards=o.updateGuards))),!e||!t||o&&W(t,o)&&n||(t.enterCallbacks[i]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=r.value,s=e.name,a=d.value,c=a&&a.components[s];if(!c)return it(i.default,{Component:c,route:o});const h=a.props[s],g=h?!0===h?o.params:"function"===typeof h?h(o):h:null,p=e=>{e.component.isUnmounted&&(a.instances[s]=null)},f=(0,n.h)(c,l({},g,t,{onVnodeUnmounted:p,ref:u}));return it(i.default,{Component:f,route:o})||f}}});function it(e,t){if(!e)return null;const i=e(t);return 1===i.length?i[0]:i}const nt=tt;function ot(e){const t=Le(e.routes,e),i=e.parseQuery||Fe,r=e.stringifyQuery||Be,a=e.history;const h=$e(),g=$e(),p=$e(),f=(0,o.IJ)(U);let m=U;s&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const _=c.bind(null,(e=>""+e)),v=c.bind(null,D),b=c.bind(null,N);function y(e,i){let n,o;return ue(e)?(n=t.getRecordMatcher(e),o=i):o=e,t.addRoute(o,n)}function w(e){const i=t.getRecordMatcher(e);i&&t.removeRoute(i)}function C(){return t.getRoutes().map((e=>e.record))}function S(e){return!!t.getRecordMatcher(e)}function k(e,n){if(n=l({},n||f.value),"string"===typeof e){const o=P(i,e,n.path),s=t.resolve({path:o.path},n),r=a.createHref(o.fullPath);return l(o,s,{params:b(s.params),hash:N(o.hash),redirectedFrom:void 0,href:r})}let o;if(null!=e.path)o=l({},e,{path:P(i,e.path,n.path).path});else{const t=l({},e.params);for(const e in t)null==t[e]&&delete t[e];o=l({},e,{params:v(t)}),n.params=v(n.params)}const s=t.resolve(o,n),c=e.hash||"";s.params=_(b(s.params));const d=M(r,l({},e,{hash:L(c),path:s.path})),u=a.createHref(d);return l({fullPath:d,hash:c,query:r===Be?We(e.query):e.query||{}},s,{redirectedFrom:void 0,href:u})}function x(e){return"string"===typeof e?P(i,e,f.value.path):l({},e)}function E(e,t){if(m!==e)return pe(8,{from:t,to:e})}function T(e){return A(e)}function I(e){return T(l(x(e),{replace:!0}))}function R(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:i}=t;let n="function"===typeof i?i(e):i;return"string"===typeof n&&(n=n.includes("?")||n.includes("#")?n=x(n):{path:n},n.params={}),l({query:e.query,hash:e.hash,params:null!=n.path?{}:e.params},n)}}function A(e,t){const i=m=k(e),n=f.value,o=e.state,s=e.force,a=!0===e.replace,c=R(i);if(c)return A(l(x(c),{state:"object"===typeof c?l({},o,c.state):o,force:s,replace:a}),t||i);const d=i;let u;return d.redirectedFrom=t,!s&&B(r,n,i)&&(u=pe(16,{to:d,from:n}),ne(n,n,!0,!1)),(u?Promise.resolve(u):W(d,n)).catch((e=>fe(e)?fe(e,2)?e:ee(e):Q(e,d,n))).then((e=>{if(e){if(fe(e,2))return A(l({replace:a},x(e.to),{state:"object"===typeof e.to?l({},o,e.to.state):o,force:s}),t||d)}else e=V(d,n,!0,a,o);return H(d,n,e),e}))}function O(e,t){const i=E(e,t);return i?Promise.reject(i):Promise.resolve()}function F(e){const t=re.values().next().value;return t&&"function"===typeof t.runWithContext?t.runWithContext(e):e()}function W(e,t){let i;const[n,o,s]=st(e,t);i=Ke(n.reverse(),"beforeRouteLeave",e,t);for(const a of n)a.leaveGuards.forEach((n=>{i.push(qe(n,e,t))}));const r=O.bind(null,e,t);return i.push(r),le(i).then((()=>{i=[];for(const n of h.list())i.push(qe(n,e,t));return i.push(r),le(i)})).then((()=>{i=Ke(o,"beforeRouteUpdate",e,t);for(const n of o)n.updateGuards.forEach((n=>{i.push(qe(n,e,t))}));return i.push(r),le(i)})).then((()=>{i=[];for(const n of s)if(n.beforeEnter)if(u(n.beforeEnter))for(const o of n.beforeEnter)i.push(qe(o,e,t));else i.push(qe(n.beforeEnter,e,t));return i.push(r),le(i)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),i=Ke(s,"beforeRouteEnter",e,t,F),i.push(r),le(i)))).then((()=>{i=[];for(const n of g.list())i.push(qe(n,e,t));return i.push(r),le(i)})).catch((e=>fe(e,8)?e:Promise.reject(e)))}function H(e,t,i){p.list().forEach((n=>F((()=>n(e,t,i)))))}function V(e,t,i,n,o){const r=E(e,t);if(r)return r;const c=t===U,d=s?history.state:{};i&&(n||c?a.replace(e.fullPath,l({scroll:c&&d&&d.scroll},o)):a.push(e.fullPath,o)),f.value=e,ne(e,t,i,c),ee()}let j;function z(){j||(j=a.listen(((e,t,i)=>{if(!ae.listening)return;const n=k(e),o=R(n);if(o)return void A(l(o,{replace:!0}),n).catch(d);m=n;const r=f.value;s&&te(J(r.fullPath,i.delta),Z()),W(n,r).catch((e=>fe(e,12)?e:fe(e,2)?(A(e.to,n).then((e=>{fe(e,20)&&!i.delta&&i.type===$.pop&&a.go(-1,!1)})).catch(d),Promise.reject()):(i.delta&&a.go(-i.delta,!1),Q(e,n,r)))).then((e=>{e=e||V(n,r,!1),e&&(i.delta&&!fe(e,8)?a.go(-i.delta,!1):i.type===$.pop&&fe(e,20)&&a.go(-1,!1)),H(n,r,e)})).catch(d)})))}let q,K=$e(),G=$e();function Q(e,t,i){ee(e);const n=G.list();return n.length?n.forEach((n=>n(e,t,i))):console.error(e),Promise.reject(e)}function Y(){return q&&f.value!==U?Promise.resolve():new Promise(((e,t)=>{K.add([e,t])}))}function ee(e){return q||(q=!e,z(),K.list().forEach((([t,i])=>e?i(e):t())),K.reset()),e}function ne(t,i,o,r){const{scrollBehavior:a}=e;if(!s||!a)return Promise.resolve();const l=!o&&ie(J(t.fullPath,0))||(r||!o)&&history.state&&history.state.scroll||null;return(0,n.dY)().then((()=>a(t,i,l))).then((e=>e&&X(e))).catch((e=>Q(e,t,i)))}const oe=e=>a.go(e);let se;const re=new Set,ae={currentRoute:f,listening:!0,addRoute:y,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:S,getRoutes:C,resolve:k,options:e,push:T,replace:I,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:h.add,beforeResolve:g.add,afterEach:p.add,onError:G.add,isReady:Y,install(e){const t=this;e.component("RouterLink",Ye),e.component("RouterView",nt),e.config.globalProperties.$router=t,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,o.R1)(f)}),s&&!se&&f.value===U&&(se=!0,T(a.location).catch((e=>{0})));const i={};for(const o in U)Object.defineProperty(i,o,{get:()=>f.value[o],enumerable:!0});e.provide(je,t),e.provide(ze,(0,o.Gc)(i)),e.provide(Ue,f);const n=e.unmount;re.add(e),e.unmount=function(){re.delete(e),re.size<1&&(m=U,j&&j(),j=null,f.value=U,se=!1,q=!1),n()}}};function le(e){return e.reduce(((e,t)=>e.then((()=>F(t)))),Promise.resolve())}return ae}function st(e,t){const i=[],n=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let r=0;rW(e,s)))?n.push(s):i.push(s));const a=e.matched[r];a&&(t.matched.find((e=>W(e,a)))||o.push(a))}return[i,n,o]}},55008:e=>{function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i{function t(e){if(Array.isArray(e))return e}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},15760:(e,t,i)=>{var n=i(55008);function o(e){if(Array.isArray(e))return n(e)}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},45254:e=>{function t(e,t,i,n,o,s,r){try{var a=e[s](r),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function i(e){return function(){var i=this,n=arguments;return new Promise((function(o,s){var r=e.apply(i,n);function a(e){t(r,o,s,a,l,"next",e)}function l(e){t(r,o,s,a,l,"throw",e)}a(void 0)}))}}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},94660:e=>{function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},49818:(e,t,i)=>{var n=i(52025);function o(e,t){for(var i=0;i{var n=i(52025);function o(e,t,i){return(t=n(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},37927:e=>{function t(e){return e&&e.__esModule?e:{default:e}}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},43306:e=>{function t(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},70767:(e,t,i)=>{function n(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i["return"]&&(r=i["return"](),Object(r)!==r))return}finally{if(c)throw o}}return a}}i(10239),e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},1265:e=>{function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},35492:e=>{function t(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},7454:(e,t,i)=>{i(10239);var n=i(63053)["default"];function o(){"use strict"; -/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=o=function(){return i},e.exports.__esModule=!0,e.exports["default"]=e.exports;var t,i={},s=Object.prototype,r=s.hasOwnProperty,a=Object.defineProperty||function(e,t,i){e[t]=i.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",d=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(t){h=function(e,t,i){return e[t]=i}}function g(e,t,i,n){var o=t&&t.prototype instanceof y?t:y,s=Object.create(o.prototype),r=new A(n||[]);return a(s,"_invoke",{value:I(e,i,r)}),s}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}i.wrap=g;var f="suspendedStart",m="suspendedYield",_="executing",v="completed",b={};function y(){}function w(){}function C(){}var S={};h(S,c,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(O([])));x&&x!==s&&r.call(x,c)&&(S=x);var E=C.prototype=y.prototype=Object.create(S);function L(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function i(o,s,a,l){var c=p(e[o],e,s);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==n(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):t.resolve(u).then((function(e){d.value=e,a(d)}),(function(e){return i("throw",e,a,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,n){function s(){return new t((function(t,o){i(e,n,t,o)}))}return o=o?o.then(s,s):s()}})}function I(e,i,n){var o=f;return function(s,r){if(o===_)throw Error("Generator is already running");if(o===v){if("throw"===s)throw r;return{value:t,done:!0}}for(n.method=s,n.arg=r;;){var a=n.delegate;if(a){var l=R(a,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=_;var c=p(e,i,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(e,i){var n=i.method,o=e.iterator[n];if(o===t)return i.delegate=null,"throw"===n&&e.iterator["return"]&&(i.method="return",i.arg=t,R(e,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var s=p(o,e.iterator,i.arg);if("throw"===s.type)return i.method="throw",i.arg=s.arg,i.delegate=null,b;var r=s.arg;return r?r.done?(i[e.resultName]=r.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,b):r:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,b)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function O(e){if(e||""===e){var i=e[c];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function i(){for(;++o=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var l=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),N(i),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var o=n.arg;N(i)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:O(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),b}},i}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},99550:(e,t,i)=>{var n=i(9796),o=i(70767),s=i(82813),r=i(1265);function a(e,t){return n(e)||o(e,t)||s(e,t)||r()}e.exports=a,e.exports.__esModule=!0,e.exports["default"]=e.exports},8445:(e,t,i)=>{var n=i(15760),o=i(43306),s=i(82813),r=i(35492);function a(e){return n(e)||o(e)||s(e)||r()}e.exports=a,e.exports.__esModule=!0,e.exports["default"]=e.exports},23132:(e,t,i)=>{var n=i(63053)["default"];function o(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},52025:(e,t,i)=>{var n=i(63053)["default"],o=i(23132);function s(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""}e.exports=s,e.exports.__esModule=!0,e.exports["default"]=e.exports},63053:e=>{function t(i){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports["default"]=e.exports,t(i)}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},82813:(e,t,i)=>{var n=i(55008);function o(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},85917:(e,t,i)=>{var n=i(7454)();e.exports=n;try{regeneratorRuntime=n}catch(o){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},84401:(e,t,i)=>{"use strict";var n=i(76428),o=i(43798),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(o(e)+" is not a function")}},90633:(e,t,i)=>{"use strict";var n=i(83496),o=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s("Can't set "+o(e)+" as a prototype")}},25050:(e,t,i)=>{"use strict";var n=i(42399),o=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(o(e)+" is not an object")}},35884:e=>{"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},74551:(e,t,i)=>{"use strict";var n,o,s,r=i(35884),a=i(99389),l=i(5389),c=i(76428),d=i(42399),u=i(97586),h=i(41374),g=i(43798),p=i(92792),f=i(17189),m=i(37685),_=i(34914),v=i(34314),b=i(29182),y=i(30522),w=i(15841),C=i(54510),S=C.enforce,k=C.get,x=l.Int8Array,E=x&&x.prototype,L=l.Uint8ClampedArray,T=L&&L.prototype,I=x&&v(x),R=E&&v(E),D=Object.prototype,N=l.TypeError,A=y("toStringTag"),O=w("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",M=r&&!!b&&"Opera"!==h(l.opera),F=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},W={BigInt64Array:8,BigUint64Array:8},H=function(e){if(!d(e))return!1;var t=h(e);return"DataView"===t||u(B,t)||u(W,t)},V=function(e){var t=v(e);if(d(t)){var i=k(t);return i&&u(i,P)?i[P]:V(t)}},j=function(e){if(!d(e))return!1;var t=h(e);return u(B,t)||u(W,t)},z=function(e){if(j(e))return e;throw new N("Target is not a typed array")},U=function(e){if(c(e)&&(!b||_(I,e)))return e;throw new N(g(e)+" is not a typed array constructor")},$=function(e,t,i,n){if(a){if(i)for(var o in B){var s=l[o];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(r){try{s.prototype[e]=t}catch(c){}}}R[e]&&!i||f(R,e,i?t:M&&E[e]||t,n)}},q=function(e,t,i){var n,o;if(a){if(b){if(i)for(n in B)if(o=l[n],o&&u(o,e))try{delete o[e]}catch(s){}if(I[e]&&!i)return;try{return f(I,e,i?t:M&&I[e]||t)}catch(s){}}for(n in B)o=l[n],!o||o[e]&&!i||f(o,e,t)}};for(n in B)o=l[n],s=o&&o.prototype,s?S(s)[P]=o:M=!1;for(n in W)o=l[n],s=o&&o.prototype,s&&(S(s)[P]=o);if((!M||!c(I)||I===Function.prototype)&&(I=function(){throw new N("Incorrect invocation")},M))for(n in B)l[n]&&b(l[n],I);if((!M||!R||R===D)&&(R=I.prototype,M))for(n in B)l[n]&&b(l[n].prototype,R);if(M&&v(T)!==R&&b(T,R),a&&!u(R,A))for(n in F=!0,m(R,A,{configurable:!0,get:function(){return d(this)?this[O]:void 0}}),B)l[n]&&p(l[n],O,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:M,TYPED_ARRAY_TAG:F&&O,aTypedArray:z,aTypedArrayConstructor:U,exportTypedArrayMethod:$,exportTypedArrayStaticMethod:q,getTypedArrayConstructor:V,isView:H,isTypedArray:j,TypedArray:I,TypedArrayPrototype:R}},62711:(e,t,i)=>{"use strict";var n=i(30925);e.exports=function(e,t,i){var o=0,s=arguments.length>2?i:n(t),r=new e(s);while(s>o)r[o]=t[o++];return r}},99986:(e,t,i)=>{"use strict";var n=i(44716),o=i(21971),s=i(30925),r=function(e){return function(t,i,r){var a=n(t),l=s(a);if(0===l)return!e&&-1;var c,d=o(r,l);if(e&&i!==i){while(l>d)if(c=a[d++],c!==c)return!0}else for(;l>d;d++)if((e||d in a)&&a[d]===i)return e||d||0;return!e&&-1}};e.exports={includes:r(!0),indexOf:r(!1)}},5062:(e,t,i)=>{"use strict";var n=i(63133),o=i(46160),s=i(25644),r=i(30925),a=function(e){var t=1===e;return function(i,a,l){var c,d,u=s(i),h=o(u),g=r(h),p=n(a,l);while(g-- >0)if(c=h[g],d=p(c,g,u),d)switch(e){case 0:return c;case 1:return g}return t?-1:void 0}};e.exports={findLast:a(0),findLastIndex:a(1)}},80848:(e,t,i)=>{"use strict";var n=i(99389),o=i(11391),s=TypeError,r=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(o(e)&&!r(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},47001:(e,t,i)=>{"use strict";var n=i(30925);e.exports=function(e,t){for(var i=n(e),o=new t(i),s=0;s{"use strict";var n=i(30925),o=i(76552),s=RangeError;e.exports=function(e,t,i,r){var a=n(e),l=o(i),c=l<0?a+l:l;if(c>=a||c<0)throw new s("Incorrect index");for(var d=new t(a),u=0;u{"use strict";var n=i(76785),o=n({}.toString),s=n("".slice);e.exports=function(e){return s(o(e),8,-1)}},41374:(e,t,i)=>{"use strict";var n=i(40785),o=i(76428),s=i(7713),r=i(30522),a=r("toStringTag"),l=Object,c="Arguments"===s(function(){return arguments}()),d=function(e,t){try{return e[t]}catch(i){}};e.exports=n?s:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=d(t=l(e),a))?i:c?s(t):"Object"===(n=s(t))&&o(t.callee)?"Arguments":n}},82849:(e,t,i)=>{"use strict";var n=i(97586),o=i(58992),s=i(22552),r=i(57618);e.exports=function(e,t,i){for(var a=o(t),l=r.f,c=s.f,d=0;d{"use strict";var n=i(90770);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},92792:(e,t,i)=>{"use strict";var n=i(99389),o=i(57618),s=i(54419);e.exports=n?function(e,t,i){return o.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},54419:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},37685:(e,t,i)=>{"use strict";var n=i(41058),o=i(57618);e.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),o.f(e,t,i)}},17189:(e,t,i)=>{"use strict";var n=i(76428),o=i(57618),s=i(41058),r=i(95022);e.exports=function(e,t,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(n(i)&&s(i,c,a),a.global)l?e[t]=i:r(t,i);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(d){}l?e[t]=i:o.f(e,t,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},95022:(e,t,i)=>{"use strict";var n=i(5389),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},86553:(e,t,i)=>{"use strict";var n=i(43798),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw new o("Cannot delete property "+n(t)+" of "+n(e))}},99389:(e,t,i)=>{"use strict";var n=i(90770);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},87814:(e,t,i)=>{"use strict";var n=i(5389),o=i(42399),s=n.document,r=o(s)&&o(s.createElement);e.exports=function(e){return r?s.createElement(e):{}}},40914:e=>{"use strict";var t=TypeError,i=9007199254740991;e.exports=function(e){if(e>i)throw t("Maximum allowed index exceeded");return e}},55226:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},74828:(e,t,i)=>{"use strict";var n=i(5389),o=n.navigator,s=o&&o.userAgent;e.exports=s?String(s):""},53792:(e,t,i)=>{"use strict";var n,o,s=i(5389),r=i(74828),a=s.process,l=s.Deno,c=a&&a.versions||l&&l.version,d=c&&c.v8;d&&(n=d.split("."),o=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&r&&(n=r.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=r.match(/Chrome\/(\d+)/),n&&(o=+n[1]))),e.exports=o},57485:(e,t,i)=>{"use strict";var n=i(5389),o=i(22552).f,s=i(92792),r=i(17189),a=i(95022),l=i(82849),c=i(81513);e.exports=function(e,t){var i,d,u,h,g,p,f=e.target,m=e.global,_=e.stat;if(d=m?n:_?n[f]||a(f,{}):n[f]&&n[f].prototype,d)for(u in t){if(g=t[u],e.dontCallGetSet?(p=o(d,u),h=p&&p.value):h=d[u],i=c(m?u:f+(_?".":"#")+u,e.forced),!i&&void 0!==h){if(typeof g==typeof h)continue;l(g,h)}(e.sham||h&&h.sham)&&s(g,"sham",!0),r(d,u,g,e)}}},90770:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},63133:(e,t,i)=>{"use strict";var n=i(53547),o=i(84401),s=i(99391),r=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:s?r(e,t):function(){return e.apply(t,arguments)}}},99391:(e,t,i)=>{"use strict";var n=i(90770);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},27624:(e,t,i)=>{"use strict";var n=i(99391),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},91391:(e,t,i)=>{"use strict";var n=i(99389),o=i(97586),s=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,a=o(s,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&r(s,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},86129:(e,t,i)=>{"use strict";var n=i(76785),o=i(84401);e.exports=function(e,t,i){try{return n(o(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(s){}}},53547:(e,t,i)=>{"use strict";var n=i(7713),o=i(76785);e.exports=function(e){if("Function"===n(e))return o(e)}},76785:(e,t,i)=>{"use strict";var n=i(99391),o=Function.prototype,s=o.call,r=n&&o.bind.bind(s,s);e.exports=n?r:function(e){return function(){return s.apply(e,arguments)}}},97060:(e,t,i)=>{"use strict";var n=i(5389),o=i(76428),s=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(n[e]):n[e]&&n[e][t]}},8209:(e,t,i)=>{"use strict";var n=i(84401),o=i(23614);e.exports=function(e,t){var i=e[t];return o(i)?void 0:n(i)}},5389:function(e,t,i){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},97586:(e,t,i)=>{"use strict";var n=i(76785),o=i(25644),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(o(e),t)}},90020:e=>{"use strict";e.exports={}},21030:(e,t,i)=>{"use strict";var n=i(99389),o=i(90770),s=i(87814);e.exports=!n&&!o((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},46160:(e,t,i)=>{"use strict";var n=i(76785),o=i(90770),s=i(7713),r=Object,a=n("".split);e.exports=o((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===s(e)?a(e,""):r(e)}:r},63013:(e,t,i)=>{"use strict";var n=i(76785),o=i(76428),s=i(68294),r=n(Function.toString);o(s.inspectSource)||(s.inspectSource=function(e){return r(e)}),e.exports=s.inspectSource},54510:(e,t,i)=>{"use strict";var n,o,s,r=i(18393),a=i(5389),l=i(42399),c=i(92792),d=i(97586),u=i(68294),h=i(92200),g=i(90020),p="Object already initialized",f=a.TypeError,m=a.WeakMap,_=function(e){return s(e)?o(e):n(e,{})},v=function(e){return function(t){var i;if(!l(t)||(i=o(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return i}};if(r||u.state){var b=u.state||(u.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,n=function(e,t){if(b.has(e))throw new f(p);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var y=h("state");g[y]=!0,n=function(e,t){if(d(e,y))throw new f(p);return t.facade=e,c(e,y,t),t},o=function(e){return d(e,y)?e[y]:{}},s=function(e){return d(e,y)}}e.exports={set:n,get:o,has:s,enforce:_,getterFor:v}},11391:(e,t,i)=>{"use strict";var n=i(7713);e.exports=Array.isArray||function(e){return"Array"===n(e)}},13208:(e,t,i)=>{"use strict";var n=i(41374);e.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},76428:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},81513:(e,t,i)=>{"use strict";var n=i(90770),o=i(76428),s=/#|\.prototype\./,r=function(e,t){var i=l[a(e)];return i===d||i!==c&&(o(t)?n(t):!!t)},a=r.normalize=function(e){return String(e).replace(s,".").toLowerCase()},l=r.data={},c=r.NATIVE="N",d=r.POLYFILL="P";e.exports=r},23614:e=>{"use strict";e.exports=function(e){return null===e||void 0===e}},42399:(e,t,i)=>{"use strict";var n=i(76428);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},83496:(e,t,i)=>{"use strict";var n=i(42399);e.exports=function(e){return n(e)||null===e}},25046:e=>{"use strict";e.exports=!1},59920:(e,t,i)=>{"use strict";var n=i(97060),o=i(76428),s=i(34914),r=i(29361),a=Object;e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&s(t.prototype,a(e))}},30925:(e,t,i)=>{"use strict";var n=i(12395);e.exports=function(e){return n(e.length)}},41058:(e,t,i)=>{"use strict";var n=i(76785),o=i(90770),s=i(76428),r=i(97586),a=i(99389),l=i(91391).CONFIGURABLE,c=i(63013),d=i(54510),u=d.enforce,h=d.get,g=String,p=Object.defineProperty,f=n("".slice),m=n("".replace),_=n([].join),v=a&&!o((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),y=e.exports=function(e,t,i){"Symbol("===f(g(t),0,7)&&(t="["+m(g(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!r(e,"name")||l&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),v&&i&&r(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&r(i,"constructor")&&i.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var n=u(e);return r(n,"source")||(n.source=_(b,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return s(this)&&h(this).source||c(this)}),"toString")},37998:e=>{"use strict";var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?i:t)(n)}},57618:(e,t,i)=>{"use strict";var n=i(99389),o=i(21030),s=i(86067),r=i(25050),a=i(15656),l=TypeError,c=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",h="configurable",g="writable";t.f=n?s?function(e,t,i){if(r(e),t=a(t),r(i),"function"===typeof e&&"prototype"===t&&"value"in i&&g in i&&!i[g]){var n=d(e,t);n&&n[g]&&(e[t]=i.value,i={configurable:h in i?i[h]:n[h],enumerable:u in i?i[u]:n[u],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(r(e),t=a(t),r(i),o)try{return c(e,t,i)}catch(n){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},22552:(e,t,i)=>{"use strict";var n=i(99389),o=i(27624),s=i(21680),r=i(54419),a=i(44716),l=i(15656),c=i(97586),d=i(21030),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=a(e),t=l(t),d)try{return u(e,t)}catch(i){}if(c(e,t))return r(!o(s.f,e,t),e[t])}},30365:(e,t,i)=>{"use strict";var n=i(85587),o=i(55226),s=o.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,s)}},89964:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},34314:(e,t,i)=>{"use strict";var n=i(97586),o=i(76428),s=i(25644),r=i(92200),a=i(86392),l=r("IE_PROTO"),c=Object,d=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=s(e);if(n(t,l))return t[l];var i=t.constructor;return o(i)&&t instanceof i?i.prototype:t instanceof c?d:null}},34914:(e,t,i)=>{"use strict";var n=i(76785);e.exports=n({}.isPrototypeOf)},85587:(e,t,i)=>{"use strict";var n=i(76785),o=i(97586),s=i(44716),r=i(99986).indexOf,a=i(90020),l=n([].push);e.exports=function(e,t){var i,n=s(e),c=0,d=[];for(i in n)!o(a,i)&&o(n,i)&&l(d,i);while(t.length>c)o(n,i=t[c++])&&(~r(d,i)||l(d,i));return d}},21680:(e,t)=>{"use strict";var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!i.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:i},29182:(e,t,i)=>{"use strict";var n=i(86129),o=i(42399),s=i(34997),r=i(90633);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=n(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch(a){}return function(i,n){return s(i),r(n),o(i)?(t?e(i,n):i.__proto__=n,i):i}}():void 0)},73615:(e,t,i)=>{"use strict";var n=i(27624),o=i(76428),s=i(42399),r=TypeError;e.exports=function(e,t){var i,a;if("string"===t&&o(i=e.toString)&&!s(a=n(i,e)))return a;if(o(i=e.valueOf)&&!s(a=n(i,e)))return a;if("string"!==t&&o(i=e.toString)&&!s(a=n(i,e)))return a;throw new r("Can't convert object to primitive value")}},58992:(e,t,i)=>{"use strict";var n=i(97060),o=i(76785),s=i(30365),r=i(89964),a=i(25050),l=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=s.f(a(e)),i=r.f;return i?l(t,i(e)):t}},22740:(e,t,i)=>{"use strict";var n=i(25050);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},34997:(e,t,i)=>{"use strict";var n=i(23614),o=TypeError;e.exports=function(e){if(n(e))throw new o("Can't call method on "+e);return e}},92200:(e,t,i)=>{"use strict";var n=i(55066),o=i(15841),s=n("keys");e.exports=function(e){return s[e]||(s[e]=o(e))}},68294:(e,t,i)=>{"use strict";var n=i(25046),o=i(5389),s=i(95022),r="__core-js_shared__",a=e.exports=o[r]||s(r,{});(a.versions||(a.versions=[])).push({version:"3.38.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},55066:(e,t,i)=>{"use strict";var n=i(68294);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},39120:(e,t,i)=>{"use strict";var n=i(53792),o=i(90770),s=i(5389),r=s.String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},21971:(e,t,i)=>{"use strict";var n=i(76552),o=Math.max,s=Math.min;e.exports=function(e,t){var i=n(e);return i<0?o(i+t,0):s(i,t)}},4149:(e,t,i)=>{"use strict";var n=i(61266),o=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new o("Can't convert number to bigint");return BigInt(t)}},44716:(e,t,i)=>{"use strict";var n=i(46160),o=i(34997);e.exports=function(e){return n(o(e))}},76552:(e,t,i)=>{"use strict";var n=i(37998);e.exports=function(e){var t=+e;return t!==t||0===t?0:n(t)}},12395:(e,t,i)=>{"use strict";var n=i(76552),o=Math.min;e.exports=function(e){var t=n(e);return t>0?o(t,9007199254740991):0}},25644:(e,t,i)=>{"use strict";var n=i(34997),o=Object;e.exports=function(e){return o(n(e))}},61266:(e,t,i)=>{"use strict";var n=i(27624),o=i(42399),s=i(59920),r=i(8209),a=i(73615),l=i(30522),c=TypeError,d=l("toPrimitive");e.exports=function(e,t){if(!o(e)||s(e))return e;var i,l=r(e,d);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!o(i)||s(i))return i;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},15656:(e,t,i)=>{"use strict";var n=i(61266),o=i(59920);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},40785:(e,t,i)=>{"use strict";var n=i(30522),o=n("toStringTag"),s={};s[o]="z",e.exports="[object z]"===String(s)},43798:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(i){return"Object"}}},15841:(e,t,i)=>{"use strict";var n=i(76785),o=0,s=Math.random(),r=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++o+s,36)}},29361:(e,t,i)=>{"use strict";var n=i(39120);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},86067:(e,t,i)=>{"use strict";var n=i(99389),o=i(90770);e.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},18393:(e,t,i)=>{"use strict";var n=i(5389),o=i(76428),s=n.WeakMap;e.exports=o(s)&&/native code/.test(String(s))},30522:(e,t,i)=>{"use strict";var n=i(5389),o=i(55066),s=i(97586),r=i(15841),a=i(39120),l=i(29361),c=n.Symbol,d=o("wks"),u=l?c["for"]||c:c&&c.withoutSetter||r;e.exports=function(e){return s(d,e)||(d[e]=a&&s(c,e)?c[e]:u("Symbol."+e)),d[e]}},10239:(e,t,i)=>{"use strict";var n=i(57485),o=i(25644),s=i(30925),r=i(80848),a=i(40914),l=i(90770),c=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),d=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},u=c||!d();n({target:"Array",proto:!0,arity:1,forced:u},{push:function(e){var t=o(this),i=s(t),n=arguments.length;a(i+n);for(var l=0;l{"use strict";var n=i(57485),o=i(25644),s=i(30925),r=i(80848),a=i(86553),l=i(40914),c=1!==[].unshift(0),d=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}},u=c||!d();n({target:"Array",proto:!0,arity:1,forced:u},{unshift:function(e){var t=o(this),i=s(t),n=arguments.length;if(n){l(i+n);var c=i;while(c--){var d=c+n;c in t?t[d]=t[c]:a(t,d)}for(var u=0;u{"use strict";var n=i(5389),o=i(99389),s=i(37685),r=i(22740),a=i(90770),l=n.RegExp,c=l.prototype,d=o&&a((function(){var e=!0;try{l(".","d")}catch(d){e=!1}var t={},i="",n=e?"dgimsy":"gimsy",o=function(e,n){Object.defineProperty(t,e,{get:function(){return i+=n,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var r in e&&(s.hasIndices="d"),s)o(r,s[r]);var a=Object.getOwnPropertyDescriptor(c,"flags").get.call(t);return a!==n||i!==n}));d&&s(c,"flags",{configurable:!0,get:r})},52321:(e,t,i)=>{"use strict";var n=i(74551),o=i(30925),s=i(76552),r=n.aTypedArray,a=n.exportTypedArrayMethod;a("at",(function(e){var t=r(this),i=o(t),n=s(e),a=n>=0?n:i+n;return a<0||a>=i?void 0:t[a]}))},13765:(e,t,i)=>{"use strict";var n=i(74551),o=i(5062).findLastIndex,s=n.aTypedArray,r=n.exportTypedArrayMethod;r("findLastIndex",(function(e){return o(s(this),e,arguments.length>1?arguments[1]:void 0)}))},42452:(e,t,i)=>{"use strict";var n=i(74551),o=i(5062).findLast,s=n.aTypedArray,r=n.exportTypedArrayMethod;r("findLast",(function(e){return o(s(this),e,arguments.length>1?arguments[1]:void 0)}))},55516:(e,t,i)=>{"use strict";var n=i(47001),o=i(74551),s=o.aTypedArray,r=o.exportTypedArrayMethod,a=o.getTypedArrayConstructor;r("toReversed",(function(){return n(s(this),a(this))}))},48635:(e,t,i)=>{"use strict";var n=i(74551),o=i(76785),s=i(84401),r=i(62711),a=n.aTypedArray,l=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,d=o(n.TypedArrayPrototype.sort);c("toSorted",(function(e){void 0!==e&&s(e);var t=a(this),i=r(l(t),t);return d(i,e)}))},9048:(e,t,i)=>{"use strict";var n=i(95091),o=i(74551),s=i(13208),r=i(76552),a=i(4149),l=o.aTypedArray,c=o.getTypedArrayConstructor,d=o.exportTypedArrayMethod,u=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();d("with",{with:function(e,t){var i=l(this),o=r(e),d=s(i)?a(t):+t;return n(i,c(i),o,d)}}["with"],!u)},82957:(e,t,i)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,r=(e=>t=>{const i=o.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),a=e=>(e=e.toLowerCase(),t=>r(t)===e),l=e=>t=>typeof t===e,{isArray:c}=Array,d=l("undefined");function u(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h=a("ArrayBuffer");function g(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t}const p=l("string"),f=l("function"),m=l("number"),_=e=>null!==e&&"object"===typeof e,v=e=>!0===e||!1===e,b=e=>{if("object"!==r(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},y=a("Date"),w=a("File"),C=a("Blob"),S=a("FileList"),k=e=>_(e)&&f(e.pipe),x=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=r(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},E=a("URLSearchParams"),L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function T(e,t,{allOwnKeys:i=!1}={}){if(null===e||"undefined"===typeof e)return;let n,o;if("object"!==typeof e&&(e=[e]),c(e))for(n=0,o=e.length;n0)if(n=i[o],t===n.toLowerCase())return n;return null}const R=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:i.g)(),D=e=>!d(e)&&e!==R;function N(){const{caseless:e}=D(this)&&this||{},t={},i=(i,n)=>{const o=e&&I(t,n)||n;b(t[o])&&b(i)?t[o]=N(t[o],i):b(i)?t[o]=N({},i):c(i)?t[o]=i.slice():t[o]=i};for(let n=0,o=arguments.length;n(T(t,((t,o)=>{i&&f(t)?e[o]=n(t,i):e[o]=t}),{allOwnKeys:o}),e),O=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),P=(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},M=(e,t,i,n)=>{let o,r,a;const l={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),r=o.length;while(r-- >0)a=o[r],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&s(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},F=(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},B=e=>{if(!e)return null;if(c(e))return e;let t=e.length;if(!m(t))return null;const i=new Array(t);while(t-- >0)i[t]=e[t];return i},W=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&s(Uint8Array)),H=(e,t)=>{const i=e&&e[Symbol.iterator],n=i.call(e);let o;while((o=n.next())&&!o.done){const i=o.value;t.call(e,i[0],i[1])}},V=(e,t)=>{let i;const n=[];while(null!==(i=e.exec(t)))n.push(i);return n},j=a("HTMLFormElement"),z=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),U=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),$=a("RegExp"),q=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};T(i,((i,o)=>{let s;!1!==(s=t(i,o,e))&&(n[o]=s||i)})),Object.defineProperties(e,n)},K=e=>{q(e,((t,i)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];f(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},G=(e,t)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return c(e)?n(e):n(String(e).split(t)),i},Q=()=>{},Y=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Z="abcdefghijklmnopqrstuvwxyz",X="0123456789",J={DIGIT:X,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+X},ee=(e=16,t=J.ALPHA_DIGIT)=>{let i="";const{length:n}=t;while(e--)i+=t[Math.random()*n|0];return i};function te(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const ie=e=>{const t=new Array(10),i=(e,n)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=c(e)?[]:{};return T(e,((e,t)=>{const s=i(e,n+1);!d(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return i(e,0)},ne=a("AsyncFunction"),oe=e=>e&&(_(e)||f(e))&&f(e.then)&&f(e.catch);var se={isArray:c,isArrayBuffer:h,isBuffer:u,isFormData:x,isArrayBufferView:g,isString:p,isNumber:m,isBoolean:v,isObject:_,isPlainObject:b,isUndefined:d,isDate:y,isFile:w,isBlob:C,isRegExp:$,isFunction:f,isStream:k,isURLSearchParams:E,isTypedArray:W,isFileList:S,forEach:T,merge:N,extend:A,trim:L,stripBOM:O,inherits:P,toFlatObject:M,kindOf:r,kindOfTest:a,endsWith:F,toArray:B,forEachEntry:H,matchAll:V,isHTMLForm:j,hasOwnProperty:U,hasOwnProp:U,reduceDescriptors:q,freezeMethods:K,toObjectSet:G,toCamelCase:z,noop:Q,toFiniteNumber:Y,findKey:I,global:R,isContextDefined:D,ALPHABET:J,generateString:ee,isSpecCompliantForm:te,toJSONObject:ie,isAsyncFn:ne,isThenable:oe};function re(e,t,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o)}se.inherits(re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ae=re.prototype,le={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{le[e]={value:e}})),Object.defineProperties(re,le),Object.defineProperty(ae,"isAxiosError",{value:!0}),re.from=(e,t,i,n,o,s)=>{const r=Object.create(ae);return se.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),re.call(r,e.message,t,i,n,o),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};var ce=null;function de(e){return se.isPlainObject(e)||se.isArray(e)}function ue(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function he(e,t,i){return e?e.concat(t).map((function(e,t){return e=ue(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}function ge(e){return se.isArray(e)&&!e.some(de)}const pe=se.toFlatObject(se,{},null,(function(e){return/^is[A-Z]/.test(e)}));function fe(e,t,i){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,i=se.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!se.isUndefined(t[e])}));const n=i.metaTokens,o=i.visitor||d,s=i.dots,r=i.indexes,a=i.Blob||"undefined"!==typeof Blob&&Blob,l=a&&se.isSpecCompliantForm(t);if(!se.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(se.isDate(e))return e.toISOString();if(!l&&se.isBlob(e))throw new re("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(e)||se.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,i,o){let a=e;if(e&&!o&&"object"===typeof e)if(se.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(se.isArray(e)&&ge(e)||(se.isFileList(e)||se.endsWith(i,"[]"))&&(a=se.toArray(e)))return i=ue(i),a.forEach((function(e,n){!se.isUndefined(e)&&null!==e&&t.append(!0===r?he([i],n,s):null===r?i:i+"[]",c(e))})),!1;return!!de(e)||(t.append(he(o,i,s),c(e)),!1)}const u=[],h=Object.assign(pe,{defaultVisitor:d,convertValue:c,isVisitable:de});function g(e,i){if(!se.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+i.join("."));u.push(e),se.forEach(e,(function(e,n){const s=!(se.isUndefined(e)||null===e)&&o.call(t,e,se.isString(n)?n.trim():n,i,h);!0===s&&g(e,i?i.concat(n):[n])})),u.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return g(e),t}function me(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function _e(e,t){this._pairs=[],e&&fe(e,this,t)}const ve=_e.prototype;function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ye(e,t,i){if(!t)return e;const n=i&&i.encode||be,o=i&&i.serialize;let s;if(s=o?o(t,i):se.isURLSearchParams(t)?t.toString():new _e(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}ve.append=function(e,t){this._pairs.push([e,t])},ve.toString=function(e){const t=e?function(t){return e.call(this,t,me)}:me;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class we{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){se.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Ce=we,Se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ke="undefined"!==typeof URLSearchParams?URLSearchParams:_e,xe="undefined"!==typeof FormData?FormData:null,Ee="undefined"!==typeof Blob?Blob:null,Le={isBrowser:!0,classes:{URLSearchParams:ke,FormData:xe,Blob:Ee},protocols:["http","https","file","blob","url","data"]};const Te="undefined"!==typeof window&&"undefined"!==typeof document,Ie=(e=>Te&&["ReactNative","NativeScript","NS"].indexOf(e)<0)("undefined"!==typeof navigator&&navigator.product),Re=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)();var De=Object.freeze({__proto__:null,hasBrowserEnv:Te,hasStandardBrowserWebWorkerEnv:Re,hasStandardBrowserEnv:Ie}),Ne={...De,...Le};function Ae(e,t){return fe(e,new Ne.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,n){return Ne.isNode&&se.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function Oe(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function Pe(e){const t={},i=Object.keys(e);let n;const o=i.length;let s;for(n=0;n=e.length;if(s=!s&&se.isArray(n)?n.length:s,a)return se.hasOwnProp(n,s)?n[s]=[n[s],i]:n[s]=i,!r;n[s]&&se.isObject(n[s])||(n[s]=[]);const l=t(e,i,n[s],o);return l&&se.isArray(n[s])&&(n[s]=Pe(n[s])),!r}if(se.isFormData(e)&&se.isFunction(e.entries)){const i={};return se.forEachEntry(e,((e,n)=>{t(Oe(e),n,i,0)})),i}return null}function Fe(e,t,i){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(i||JSON.stringify)(e)}const Be={transitional:Se,adapter:["xhr","http"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,o=se.isObject(e);o&&se.isHTMLForm(e)&&(e=new FormData(e));const s=se.isFormData(e);if(s)return n?JSON.stringify(Me(e)):e;if(se.isArrayBuffer(e)||se.isBuffer(e)||se.isStream(e)||se.isFile(e)||se.isBlob(e))return e;if(se.isArrayBufferView(e))return e.buffer;if(se.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ae(e,this.formSerializer).toString();if((r=se.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return fe(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),Fe(e)):e}],transformResponse:[function(e){const t=this.transitional||Be.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&se.isString(e)&&(i&&!this.responseType||n)){const i=t&&t.silentJSONParsing,s=!i&&n;try{return JSON.parse(e)}catch(o){if(s){if("SyntaxError"===o.name)throw re.from(o,re.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],(e=>{Be.headers[e]={}}));var We=Be;const He=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ve=e=>{const t={};let i,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),i=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!i||t[i]&&He[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)})),t};const je=Symbol("internals");function ze(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return!1===e||null==e?e:se.isArray(e)?e.map(Ue):String(e)}function $e(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=i.exec(e))t[n[1]]=n[2];return t}const qe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ke(e,t,i,n,o){return se.isFunction(n)?n.call(this,t,i):(o&&(t=i),se.isString(t)?se.isString(n)?-1!==t.indexOf(n):se.isRegExp(n)?n.test(t):void 0:void 0)}function Ge(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}function Qe(e,t){const i=se.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+i,{value:function(e,i,o){return this[n].call(this,t,e,i,o)},configurable:!0})}))}class Ye{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function o(e,t,i){const o=ze(t);if(!o)throw new Error("header name must be a non-empty string");const s=se.findKey(n,o);(!s||void 0===n[s]||!0===i||void 0===i&&!1!==n[s])&&(n[s||t]=Ue(e))}const s=(e,t)=>se.forEach(e,((e,i)=>o(e,i,t)));return se.isPlainObject(e)||e instanceof this.constructor?s(e,t):se.isString(e)&&(e=e.trim())&&!qe(e)?s(Ve(e),t):null!=e&&o(t,e,i),this}get(e,t){if(e=ze(e),e){const i=se.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return $e(e);if(se.isFunction(t))return t.call(this,e,i);if(se.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ze(e),e){const i=se.findKey(this,e);return!(!i||void 0===this[i]||t&&!Ke(this,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function o(e){if(e=ze(e),e){const o=se.findKey(i,e);!o||t&&!Ke(i,i[o],o,t)||(delete i[o],n=!0)}}return se.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;while(i--){const o=t[i];e&&!Ke(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,i={};return se.forEach(this,((n,o)=>{const s=se.findKey(i,o);if(s)return t[s]=Ue(n),void delete t[o];const r=e?Ge(o):String(o).trim();r!==o&&delete t[o],t[r]=Ue(n),i[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return se.forEach(this,((i,n)=>{null!=i&&!1!==i&&(t[n]=e&&se.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=this[je]=this[je]={accessors:{}},i=t.accessors,n=this.prototype;function o(e){const t=ze(e);i[t]||(Qe(n,e),i[t]=!0)}return se.isArray(e)?e.forEach(o):o(e),this}}Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(Ye.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),se.freezeMethods(Ye);var Ze=Ye;function Xe(e,t){const i=this||We,n=t||i,o=Ze.from(n.headers);let s=n.data;return se.forEach(e,(function(e){s=e.call(i,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function Je(e){return!(!e||!e.__CANCEL__)}function et(e,t,i){re.call(this,null==e?"canceled":e,re.ERR_CANCELED,t,i),this.name="CanceledError"}function tt(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new re("Request failed with status code "+i.status,[re.ERR_BAD_REQUEST,re.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}se.inherits(et,re,{__CANCEL__:!0});var it=Ne.hasStandardBrowserEnv?{write(e,t,i,n,o,s){const r=[e+"="+encodeURIComponent(t)];se.isNumber(i)&&r.push("expires="+new Date(i).toGMTString()),se.isString(n)&&r.push("path="+n),se.isString(o)&&r.push("domain="+o),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ot(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function st(e,t){return e&&!nt(t)?ot(e,t):t}var rt=Ne.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function n(i){let n=i;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(e){const t=se.isString(e)?n(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return function(){return!0}}();function at(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lt(e,t){e=e||10;const i=new Array(e),n=new Array(e);let o,s=0,r=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[r];o||(o=l),i[s]=a,n[s]=l;let d=r,u=0;while(d!==s)u+=i[d++],d%=e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-o{const s=o.loaded,r=o.lengthComputable?o.total:void 0,a=s-i,l=n(a),c=s<=r;i=s;const d={loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&c?(r-s)/l:void 0,event:o};d[t?"download":"upload"]=!0,e(d)}}const dt="undefined"!==typeof XMLHttpRequest;var ut=dt&&function(e){return new Promise((function(t,i){let n=e.data;const o=Ze.from(e.headers).normalize();let s,r,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(se.isFormData(n))if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(r=o.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",i=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+i))}const u=st(e.baseURL,e.url);function h(){if(!d)return;const n=Ze.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),o=a&&"text"!==a&&"json"!==a?d.response:d.responseText,s={data:o,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};tt((function(e){t(e),c()}),(function(e){i(e),c()}),s),d=null}if(d.open(e.method.toUpperCase(),ye(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(i(new re("Request aborted",re.ECONNABORTED,e,d)),d=null)},d.onerror=function(){i(new re("Network Error",re.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Se;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(new re(t,n.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,d)),d=null},Ne.hasStandardBrowserEnv&&(l&&se.isFunction(l)&&(l=l(e)),l||!1!==l&&rt(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&it.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in d&&se.forEach(o.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),se.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&"json"!==a&&(d.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",ct(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",ct(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{d&&(i(!t||t.type?new et(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const g=at(u);g&&-1===Ne.protocols.indexOf(g)?i(new re("Unsupported protocol "+g+":",re.ERR_BAD_REQUEST,e)):d.send(n||null)}))};const ht={http:ce,xhr:ut};se.forEach(ht,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(i){}Object.defineProperty(e,"adapterName",{value:t})}}));const gt=e=>`- ${e}`,pt=e=>se.isFunction(e)||null===e||!1===e;var ft={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let i,n;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let i=t?e.length>1?"since :\n"+e.map(gt).join("\n"):" "+gt(e[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:ht};function mt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new et(null,e)}function _t(e){mt(e),e.headers=Ze.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=ft.getAdapter(e.adapter||We.adapter);return t(e).then((function(t){return mt(e),t.data=Xe.call(e,e.transformResponse,t),t.headers=Ze.from(t.headers),t}),(function(t){return Je(t)||(mt(e),t&&t.response&&(t.response.data=Xe.call(e,e.transformResponse,t.response),t.response.headers=Ze.from(t.response.headers))),Promise.reject(t)}))}const vt=e=>e instanceof Ze?{...e}:e;function bt(e,t){t=t||{};const i={};function n(e,t,i){return se.isPlainObject(e)&&se.isPlainObject(t)?se.merge.call({caseless:i},e,t):se.isPlainObject(t)?se.merge({},t):se.isArray(t)?t.slice():t}function o(e,t,i){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e,i):n(e,t,i)}function s(e,t){if(!se.isUndefined(t))return n(void 0,t)}function r(e,t){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,o,s){return s in t?n(i,o):s in e?n(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>o(vt(e),vt(t),!0)};return se.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,r=s(e[n],t[n],n);se.isUndefined(r)&&s!==a||(i[n]=r)})),i}const yt="1.6.8",wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const Ct={};function St(e,t,i){if("object"!==typeof e)throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;while(o-- >0){const s=n[o],r=t[s];if(r){const t=e[s],i=void 0===t||r(t,s,e);if(!0!==i)throw new re("option "+s+" must be "+i,re.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new re("Unknown option "+s,re.ERR_BAD_OPTION)}}wt.transitional=function(e,t,i){function n(e,t){return"[Axios v"+yt+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,o,s)=>{if(!1===e)throw new re(n(o," has been removed"+(t?" in "+t:"")),re.ERR_DEPRECATED);return t&&!Ct[o]&&(Ct[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,o,s)}};var kt={assertOptions:St,validators:wt};const xt=kt.validators;class Et{constructor(e){this.defaults=e,this.interceptors={request:new Ce,response:new Ce}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";i.stack?t&&!String(i.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(i.stack+="\n"+t):i.stack=t}throw i}}_request(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=bt(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:o}=t;void 0!==i&&kt.assertOptions(i,{silentJSONParsing:xt.transitional(xt.boolean),forcedJSONParsing:xt.transitional(xt.boolean),clarifyTimeoutError:xt.transitional(xt.boolean)},!1),null!=n&&(se.isFunction(n)?t.paramsSerializer={serialize:n}:kt.assertOptions(n,{encode:xt.function,serialize:xt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&se.merge(o.common,o[t.method]);o&&se.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ze.concat(s,o);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[_t.bind(this),void 0];e.unshift.apply(e,r),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);while(u{if(!i._listeners)return;let t=i._listeners.length;while(t-- >0)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{i.subscribe(e),t=e})).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e((function(e,n,o){i.reason||(i.reason=new et(e,n,o),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Tt((function(t){e=t}));return{token:t,cancel:e}}}var It=Tt;function Rt(e){return function(t){return e.apply(null,t)}}function Dt(e){return se.isObject(e)&&!0===e.isAxiosError}const Nt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Nt).forEach((([e,t])=>{Nt[t]=e}));var At=Nt;function Ot(e){const t=new Lt(e),i=n(Lt.prototype.request,t);return se.extend(i,Lt.prototype,t,{allOwnKeys:!0}),se.extend(i,t,null,{allOwnKeys:!0}),i.create=function(t){return Ot(bt(e,t))},i}const Pt=Ot(We);Pt.Axios=Lt,Pt.CanceledError=et,Pt.CancelToken=It,Pt.isCancel=Je,Pt.VERSION=yt,Pt.toFormData=fe,Pt.AxiosError=re,Pt.Cancel=Pt.CanceledError,Pt.all=function(e){return Promise.all(e)},Pt.spread=Rt,Pt.isAxiosError=Dt,Pt.mergeConfig=bt,Pt.AxiosHeaders=Ze,Pt.formToJSON=e=>Me(se.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=ft.getAdapter,Pt.HttpStatusCode=At,Pt.default=Pt,e.exports=Pt},27735:(e,t,i)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,r=(e=>t=>{const i=o.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),a=e=>(e=e.toLowerCase(),t=>r(t)===e),l=e=>t=>typeof t===e,{isArray:c}=Array,d=l("undefined");function u(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h=a("ArrayBuffer");function g(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t}const p=l("string"),f=l("function"),m=l("number"),_=e=>null!==e&&"object"===typeof e,v=e=>!0===e||!1===e,b=e=>{if("object"!==r(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},y=a("Date"),w=a("File"),C=a("Blob"),S=a("FileList"),k=e=>_(e)&&f(e.pipe),x=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=r(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},E=a("URLSearchParams"),L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function T(e,t,{allOwnKeys:i=!1}={}){if(null===e||"undefined"===typeof e)return;let n,o;if("object"!==typeof e&&(e=[e]),c(e))for(n=0,o=e.length;n0)if(n=i[o],t===n.toLowerCase())return n;return null}const R=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:i.g)(),D=e=>!d(e)&&e!==R;function N(){const{caseless:e}=D(this)&&this||{},t={},i=(i,n)=>{const o=e&&I(t,n)||n;b(t[o])&&b(i)?t[o]=N(t[o],i):b(i)?t[o]=N({},i):c(i)?t[o]=i.slice():t[o]=i};for(let n=0,o=arguments.length;n(T(t,((t,o)=>{i&&f(t)?e[o]=n(t,i):e[o]=t}),{allOwnKeys:o}),e),O=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),P=(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},M=(e,t,i,n)=>{let o,r,a;const l={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),r=o.length;while(r-- >0)a=o[r],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&s(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},F=(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},B=e=>{if(!e)return null;if(c(e))return e;let t=e.length;if(!m(t))return null;const i=new Array(t);while(t-- >0)i[t]=e[t];return i},W=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&s(Uint8Array)),H=(e,t)=>{const i=e&&e[Symbol.iterator],n=i.call(e);let o;while((o=n.next())&&!o.done){const i=o.value;t.call(e,i[0],i[1])}},V=(e,t)=>{let i;const n=[];while(null!==(i=e.exec(t)))n.push(i);return n},j=a("HTMLFormElement"),z=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),U=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),$=a("RegExp"),q=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};T(i,((i,o)=>{let s;!1!==(s=t(i,o,e))&&(n[o]=s||i)})),Object.defineProperties(e,n)},K=e=>{q(e,((t,i)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];f(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},G=(e,t)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return c(e)?n(e):n(String(e).split(t)),i},Q=()=>{},Y=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Z="abcdefghijklmnopqrstuvwxyz",X="0123456789",J={DIGIT:X,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+X},ee=(e=16,t=J.ALPHA_DIGIT)=>{let i="";const{length:n}=t;while(e--)i+=t[Math.random()*n|0];return i};function te(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const ie=e=>{const t=new Array(10),i=(e,n)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=c(e)?[]:{};return T(e,((e,t)=>{const s=i(e,n+1);!d(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return i(e,0)},ne=a("AsyncFunction"),oe=e=>e&&(_(e)||f(e))&&f(e.then)&&f(e.catch);var se={isArray:c,isArrayBuffer:h,isBuffer:u,isFormData:x,isArrayBufferView:g,isString:p,isNumber:m,isBoolean:v,isObject:_,isPlainObject:b,isUndefined:d,isDate:y,isFile:w,isBlob:C,isRegExp:$,isFunction:f,isStream:k,isURLSearchParams:E,isTypedArray:W,isFileList:S,forEach:T,merge:N,extend:A,trim:L,stripBOM:O,inherits:P,toFlatObject:M,kindOf:r,kindOfTest:a,endsWith:F,toArray:B,forEachEntry:H,matchAll:V,isHTMLForm:j,hasOwnProperty:U,hasOwnProp:U,reduceDescriptors:q,freezeMethods:K,toObjectSet:G,toCamelCase:z,noop:Q,toFiniteNumber:Y,findKey:I,global:R,isContextDefined:D,ALPHABET:J,generateString:ee,isSpecCompliantForm:te,toJSONObject:ie,isAsyncFn:ne,isThenable:oe};function re(e,t,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o)}se.inherits(re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ae=re.prototype,le={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{le[e]={value:e}})),Object.defineProperties(re,le),Object.defineProperty(ae,"isAxiosError",{value:!0}),re.from=(e,t,i,n,o,s)=>{const r=Object.create(ae);return se.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),re.call(r,e.message,t,i,n,o),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};var ce=null;function de(e){return se.isPlainObject(e)||se.isArray(e)}function ue(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function he(e,t,i){return e?e.concat(t).map((function(e,t){return e=ue(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}function ge(e){return se.isArray(e)&&!e.some(de)}const pe=se.toFlatObject(se,{},null,(function(e){return/^is[A-Z]/.test(e)}));function fe(e,t,i){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,i=se.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!se.isUndefined(t[e])}));const n=i.metaTokens,o=i.visitor||d,s=i.dots,r=i.indexes,a=i.Blob||"undefined"!==typeof Blob&&Blob,l=a&&se.isSpecCompliantForm(t);if(!se.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(se.isDate(e))return e.toISOString();if(!l&&se.isBlob(e))throw new re("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(e)||se.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,i,o){let a=e;if(e&&!o&&"object"===typeof e)if(se.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(se.isArray(e)&&ge(e)||(se.isFileList(e)||se.endsWith(i,"[]"))&&(a=se.toArray(e)))return i=ue(i),a.forEach((function(e,n){!se.isUndefined(e)&&null!==e&&t.append(!0===r?he([i],n,s):null===r?i:i+"[]",c(e))})),!1;return!!de(e)||(t.append(he(o,i,s),c(e)),!1)}const u=[],h=Object.assign(pe,{defaultVisitor:d,convertValue:c,isVisitable:de});function g(e,i){if(!se.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+i.join("."));u.push(e),se.forEach(e,(function(e,n){const s=!(se.isUndefined(e)||null===e)&&o.call(t,e,se.isString(n)?n.trim():n,i,h);!0===s&&g(e,i?i.concat(n):[n])})),u.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return g(e),t}function me(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function _e(e,t){this._pairs=[],e&&fe(e,this,t)}const ve=_e.prototype;function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ye(e,t,i){if(!t)return e;const n=i&&i.encode||be,o=i&&i.serialize;let s;if(s=o?o(t,i):se.isURLSearchParams(t)?t.toString():new _e(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}ve.append=function(e,t){this._pairs.push([e,t])},ve.toString=function(e){const t=e?function(t){return e.call(this,t,me)}:me;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class we{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){se.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Ce=we,Se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ke="undefined"!==typeof URLSearchParams?URLSearchParams:_e,xe="undefined"!==typeof FormData?FormData:null,Ee="undefined"!==typeof Blob?Blob:null,Le={isBrowser:!0,classes:{URLSearchParams:ke,FormData:xe,Blob:Ee},protocols:["http","https","file","blob","url","data"]};const Te="undefined"!==typeof window&&"undefined"!==typeof document,Ie=(e=>Te&&["ReactNative","NativeScript","NS"].indexOf(e)<0)("undefined"!==typeof navigator&&navigator.product),Re=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)();var De=Object.freeze({__proto__:null,hasBrowserEnv:Te,hasStandardBrowserWebWorkerEnv:Re,hasStandardBrowserEnv:Ie}),Ne={...De,...Le};function Ae(e,t){return fe(e,new Ne.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,n){return Ne.isNode&&se.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function Oe(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function Pe(e){const t={},i=Object.keys(e);let n;const o=i.length;let s;for(n=0;n=e.length;if(s=!s&&se.isArray(n)?n.length:s,a)return se.hasOwnProp(n,s)?n[s]=[n[s],i]:n[s]=i,!r;n[s]&&se.isObject(n[s])||(n[s]=[]);const l=t(e,i,n[s],o);return l&&se.isArray(n[s])&&(n[s]=Pe(n[s])),!r}if(se.isFormData(e)&&se.isFunction(e.entries)){const i={};return se.forEachEntry(e,((e,n)=>{t(Oe(e),n,i,0)})),i}return null}function Fe(e,t,i){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(i||JSON.stringify)(e)}const Be={transitional:Se,adapter:["xhr","http"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,o=se.isObject(e);o&&se.isHTMLForm(e)&&(e=new FormData(e));const s=se.isFormData(e);if(s)return n?JSON.stringify(Me(e)):e;if(se.isArrayBuffer(e)||se.isBuffer(e)||se.isStream(e)||se.isFile(e)||se.isBlob(e))return e;if(se.isArrayBufferView(e))return e.buffer;if(se.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ae(e,this.formSerializer).toString();if((r=se.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return fe(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),Fe(e)):e}],transformResponse:[function(e){const t=this.transitional||Be.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&se.isString(e)&&(i&&!this.responseType||n)){const i=t&&t.silentJSONParsing,s=!i&&n;try{return JSON.parse(e)}catch(o){if(s){if("SyntaxError"===o.name)throw re.from(o,re.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],(e=>{Be.headers[e]={}}));var We=Be;const He=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ve=e=>{const t={};let i,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),i=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!i||t[i]&&He[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)})),t};const je=Symbol("internals");function ze(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return!1===e||null==e?e:se.isArray(e)?e.map(Ue):String(e)}function $e(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=i.exec(e))t[n[1]]=n[2];return t}const qe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ke(e,t,i,n,o){return se.isFunction(n)?n.call(this,t,i):(o&&(t=i),se.isString(t)?se.isString(n)?-1!==t.indexOf(n):se.isRegExp(n)?n.test(t):void 0:void 0)}function Ge(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}function Qe(e,t){const i=se.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+i,{value:function(e,i,o){return this[n].call(this,t,e,i,o)},configurable:!0})}))}class Ye{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function o(e,t,i){const o=ze(t);if(!o)throw new Error("header name must be a non-empty string");const s=se.findKey(n,o);(!s||void 0===n[s]||!0===i||void 0===i&&!1!==n[s])&&(n[s||t]=Ue(e))}const s=(e,t)=>se.forEach(e,((e,i)=>o(e,i,t)));return se.isPlainObject(e)||e instanceof this.constructor?s(e,t):se.isString(e)&&(e=e.trim())&&!qe(e)?s(Ve(e),t):null!=e&&o(t,e,i),this}get(e,t){if(e=ze(e),e){const i=se.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return $e(e);if(se.isFunction(t))return t.call(this,e,i);if(se.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ze(e),e){const i=se.findKey(this,e);return!(!i||void 0===this[i]||t&&!Ke(this,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function o(e){if(e=ze(e),e){const o=se.findKey(i,e);!o||t&&!Ke(i,i[o],o,t)||(delete i[o],n=!0)}}return se.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;while(i--){const o=t[i];e&&!Ke(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,i={};return se.forEach(this,((n,o)=>{const s=se.findKey(i,o);if(s)return t[s]=Ue(n),void delete t[o];const r=e?Ge(o):String(o).trim();r!==o&&delete t[o],t[r]=Ue(n),i[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return se.forEach(this,((i,n)=>{null!=i&&!1!==i&&(t[n]=e&&se.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=this[je]=this[je]={accessors:{}},i=t.accessors,n=this.prototype;function o(e){const t=ze(e);i[t]||(Qe(n,e),i[t]=!0)}return se.isArray(e)?e.forEach(o):o(e),this}}Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(Ye.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),se.freezeMethods(Ye);var Ze=Ye;function Xe(e,t){const i=this||We,n=t||i,o=Ze.from(n.headers);let s=n.data;return se.forEach(e,(function(e){s=e.call(i,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function Je(e){return!(!e||!e.__CANCEL__)}function et(e,t,i){re.call(this,null==e?"canceled":e,re.ERR_CANCELED,t,i),this.name="CanceledError"}function tt(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new re("Request failed with status code "+i.status,[re.ERR_BAD_REQUEST,re.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}se.inherits(et,re,{__CANCEL__:!0});var it=Ne.hasStandardBrowserEnv?{write(e,t,i,n,o,s){const r=[e+"="+encodeURIComponent(t)];se.isNumber(i)&&r.push("expires="+new Date(i).toGMTString()),se.isString(n)&&r.push("path="+n),se.isString(o)&&r.push("domain="+o),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ot(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function st(e,t){return e&&!nt(t)?ot(e,t):t}var rt=Ne.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function n(i){let n=i;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(e){const t=se.isString(e)?n(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return function(){return!0}}();function at(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lt(e,t){e=e||10;const i=new Array(e),n=new Array(e);let o,s=0,r=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[r];o||(o=l),i[s]=a,n[s]=l;let d=r,u=0;while(d!==s)u+=i[d++],d%=e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-o{const s=o.loaded,r=o.lengthComputable?o.total:void 0,a=s-i,l=n(a),c=s<=r;i=s;const d={loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&c?(r-s)/l:void 0,event:o};d[t?"download":"upload"]=!0,e(d)}}const dt="undefined"!==typeof XMLHttpRequest;var ut=dt&&function(e){return new Promise((function(t,i){let n=e.data;const o=Ze.from(e.headers).normalize();let s,r,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(se.isFormData(n))if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(r=o.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",i=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+i))}const u=st(e.baseURL,e.url);function h(){if(!d)return;const n=Ze.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),o=a&&"text"!==a&&"json"!==a?d.response:d.responseText,s={data:o,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};tt((function(e){t(e),c()}),(function(e){i(e),c()}),s),d=null}if(d.open(e.method.toUpperCase(),ye(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(i(new re("Request aborted",re.ECONNABORTED,e,d)),d=null)},d.onerror=function(){i(new re("Network Error",re.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Se;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(new re(t,n.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,d)),d=null},Ne.hasStandardBrowserEnv&&(l&&se.isFunction(l)&&(l=l(e)),l||!1!==l&&rt(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&it.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in d&&se.forEach(o.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),se.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&"json"!==a&&(d.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",ct(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",ct(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{d&&(i(!t||t.type?new et(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const g=at(u);g&&-1===Ne.protocols.indexOf(g)?i(new re("Unsupported protocol "+g+":",re.ERR_BAD_REQUEST,e)):d.send(n||null)}))};const ht={http:ce,xhr:ut};se.forEach(ht,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(i){}Object.defineProperty(e,"adapterName",{value:t})}}));const gt=e=>`- ${e}`,pt=e=>se.isFunction(e)||null===e||!1===e;var ft={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let i,n;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let i=t?e.length>1?"since :\n"+e.map(gt).join("\n"):" "+gt(e[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:ht};function mt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new et(null,e)}function _t(e){mt(e),e.headers=Ze.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=ft.getAdapter(e.adapter||We.adapter);return t(e).then((function(t){return mt(e),t.data=Xe.call(e,e.transformResponse,t),t.headers=Ze.from(t.headers),t}),(function(t){return Je(t)||(mt(e),t&&t.response&&(t.response.data=Xe.call(e,e.transformResponse,t.response),t.response.headers=Ze.from(t.response.headers))),Promise.reject(t)}))}const vt=e=>e instanceof Ze?{...e}:e;function bt(e,t){t=t||{};const i={};function n(e,t,i){return se.isPlainObject(e)&&se.isPlainObject(t)?se.merge.call({caseless:i},e,t):se.isPlainObject(t)?se.merge({},t):se.isArray(t)?t.slice():t}function o(e,t,i){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e,i):n(e,t,i)}function s(e,t){if(!se.isUndefined(t))return n(void 0,t)}function r(e,t){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,o,s){return s in t?n(i,o):s in e?n(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>o(vt(e),vt(t),!0)};return se.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,r=s(e[n],t[n],n);se.isUndefined(r)&&s!==a||(i[n]=r)})),i}const yt="1.6.8",wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const Ct={};function St(e,t,i){if("object"!==typeof e)throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;while(o-- >0){const s=n[o],r=t[s];if(r){const t=e[s],i=void 0===t||r(t,s,e);if(!0!==i)throw new re("option "+s+" must be "+i,re.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new re("Unknown option "+s,re.ERR_BAD_OPTION)}}wt.transitional=function(e,t,i){function n(e,t){return"[Axios v"+yt+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,o,s)=>{if(!1===e)throw new re(n(o," has been removed"+(t?" in "+t:"")),re.ERR_DEPRECATED);return t&&!Ct[o]&&(Ct[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,o,s)}};var kt={assertOptions:St,validators:wt};const xt=kt.validators;class Et{constructor(e){this.defaults=e,this.interceptors={request:new Ce,response:new Ce}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";i.stack?t&&!String(i.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(i.stack+="\n"+t):i.stack=t}throw i}}_request(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=bt(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:o}=t;void 0!==i&&kt.assertOptions(i,{silentJSONParsing:xt.transitional(xt.boolean),forcedJSONParsing:xt.transitional(xt.boolean),clarifyTimeoutError:xt.transitional(xt.boolean)},!1),null!=n&&(se.isFunction(n)?t.paramsSerializer={serialize:n}:kt.assertOptions(n,{encode:xt.function,serialize:xt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&se.merge(o.common,o[t.method]);o&&se.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ze.concat(s,o);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[_t.bind(this),void 0];e.unshift.apply(e,r),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);while(u{if(!i._listeners)return;let t=i._listeners.length;while(t-- >0)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{i.subscribe(e),t=e})).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e((function(e,n,o){i.reason||(i.reason=new et(e,n,o),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Tt((function(t){e=t}));return{token:t,cancel:e}}}var It=Tt;function Rt(e){return function(t){return e.apply(null,t)}}function Dt(e){return se.isObject(e)&&!0===e.isAxiosError}const Nt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Nt).forEach((([e,t])=>{Nt[t]=e}));var At=Nt;function Ot(e){const t=new Lt(e),i=n(Lt.prototype.request,t);return se.extend(i,Lt.prototype,t,{allOwnKeys:!0}),se.extend(i,t,null,{allOwnKeys:!0}),i.create=function(t){return Ot(bt(e,t))},i}const Pt=Ot(We);Pt.Axios=Lt,Pt.CanceledError=et,Pt.CancelToken=It,Pt.isCancel=Je,Pt.VERSION=yt,Pt.toFormData=fe,Pt.AxiosError=re,Pt.Cancel=Pt.CanceledError,Pt.all=function(e){return Promise.all(e)},Pt.spread=Rt,Pt.isAxiosError=Dt,Pt.mergeConfig=bt,Pt.AxiosHeaders=Ze,Pt.formToJSON=e=>Me(se.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=ft.getAdapter,Pt.HttpStatusCode=At,Pt.default=Pt,e.exports=Pt},82303:(e,t,i)=>{"use strict";i.d(t,{A:()=>vi});var n={};function o(e,t){return function(){return e.apply(t,arguments)}}i.r(n),i.d(n,{hasBrowserEnv:()=>Be,hasStandardBrowserEnv:()=>He,hasStandardBrowserWebWorkerEnv:()=>Ve,navigator:()=>We,origin:()=>je});const{toString:s}=Object.prototype,{getPrototypeOf:r}=Object,a=(e=>t=>{const i=s.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),l=e=>(e=e.toLowerCase(),t=>a(t)===e),c=e=>t=>typeof t===e,{isArray:d}=Array,u=c("undefined");function h(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=l("ArrayBuffer");function p(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t}const f=c("string"),m=c("function"),_=c("number"),v=e=>null!==e&&"object"===typeof e,b=e=>!0===e||!1===e,y=e=>{if("object"!==a(e))return!1;const t=r(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},w=l("Date"),C=l("File"),S=l("Blob"),k=l("FileList"),x=e=>v(e)&&m(e.pipe),E=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=a(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},L=l("URLSearchParams"),[T,I,R,D]=["ReadableStream","Request","Response","Headers"].map(l),N=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function A(e,t,{allOwnKeys:i=!1}={}){if(null===e||"undefined"===typeof e)return;let n,o;if("object"!==typeof e&&(e=[e]),d(e))for(n=0,o=e.length;n0)if(n=i[o],t===n.toLowerCase())return n;return null}const P=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),M=e=>!u(e)&&e!==P;function F(){const{caseless:e}=M(this)&&this||{},t={},i=(i,n)=>{const o=e&&O(t,n)||n;y(t[o])&&y(i)?t[o]=F(t[o],i):y(i)?t[o]=F({},i):d(i)?t[o]=i.slice():t[o]=i};for(let n=0,o=arguments.length;n(A(t,((t,n)=>{i&&m(t)?e[n]=o(t,i):e[n]=t}),{allOwnKeys:n}),e),W=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),H=(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},V=(e,t,i,n)=>{let o,s,a;const l={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),s=o.length;while(s-- >0)a=o[s],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&r(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},j=(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},z=e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!_(t))return null;const i=new Array(t);while(t-- >0)i[t]=e[t];return i},U=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&r(Uint8Array)),$=(e,t)=>{const i=e&&e[Symbol.iterator],n=i.call(e);let o;while((o=n.next())&&!o.done){const i=o.value;t.call(e,i[0],i[1])}},q=(e,t)=>{let i;const n=[];while(null!==(i=e.exec(t)))n.push(i);return n},K=l("HTMLFormElement"),G=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),Q=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),Y=l("RegExp"),Z=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};A(i,((i,o)=>{let s;!1!==(s=t(i,o,e))&&(n[o]=s||i)})),Object.defineProperties(e,n)},X=e=>{Z(e,((t,i)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];m(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},J=(e,t)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return d(e)?n(e):n(String(e).split(t)),i},ee=()=>{},te=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,ie="abcdefghijklmnopqrstuvwxyz",ne="0123456789",oe={DIGIT:ne,ALPHA:ie,ALPHA_DIGIT:ie+ie.toUpperCase()+ne},se=(e=16,t=oe.ALPHA_DIGIT)=>{let i="";const{length:n}=t;while(e--)i+=t[Math.random()*n|0];return i};function re(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const ae=e=>{const t=new Array(10),i=(e,n)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=d(e)?[]:{};return A(e,((e,t)=>{const s=i(e,n+1);!u(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return i(e,0)},le=l("AsyncFunction"),ce=e=>e&&(v(e)||m(e))&&m(e.then)&&m(e.catch),de=((e,t)=>e?setImmediate:t?((e,t)=>(P.addEventListener("message",(({source:i,data:n})=>{i===P&&n===e&&t.length&&t.shift()()}),!1),i=>{t.push(i),P.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))("function"===typeof setImmediate,m(P.postMessage)),ue="undefined"!==typeof queueMicrotask?queueMicrotask.bind(P):"undefined"!==typeof process&&process.nextTick||de,he={isArray:d,isArrayBuffer:g,isBuffer:h,isFormData:E,isArrayBufferView:p,isString:f,isNumber:_,isBoolean:b,isObject:v,isPlainObject:y,isReadableStream:T,isRequest:I,isResponse:R,isHeaders:D,isUndefined:u,isDate:w,isFile:C,isBlob:S,isRegExp:Y,isFunction:m,isStream:x,isURLSearchParams:L,isTypedArray:U,isFileList:k,forEach:A,merge:F,extend:B,trim:N,stripBOM:W,inherits:H,toFlatObject:V,kindOf:a,kindOfTest:l,endsWith:j,toArray:z,forEachEntry:$,matchAll:q,isHTMLForm:K,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:Z,freezeMethods:X,toObjectSet:J,toCamelCase:G,noop:ee,toFiniteNumber:te,findKey:O,global:P,isContextDefined:M,ALPHABET:oe,generateString:se,isSpecCompliantForm:re,toJSONObject:ae,isAsyncFn:le,isThenable:ce,setImmediate:de,asap:ue};function ge(e,t,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}he.inherits(ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:he.toJSONObject(this.config),code:this.code,status:this.status}}});const pe=ge.prototype,fe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{fe[e]={value:e}})),Object.defineProperties(ge,fe),Object.defineProperty(pe,"isAxiosError",{value:!0}),ge.from=(e,t,i,n,o,s)=>{const r=Object.create(pe);return he.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ge.call(r,e.message,t,i,n,o),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const me=ge,_e=null;function ve(e){return he.isPlainObject(e)||he.isArray(e)}function be(e){return he.endsWith(e,"[]")?e.slice(0,-2):e}function ye(e,t,i){return e?e.concat(t).map((function(e,t){return e=be(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}function we(e){return he.isArray(e)&&!e.some(ve)}const Ce=he.toFlatObject(he,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Se(e,t,i){if(!he.isObject(e))throw new TypeError("target must be an object");t=t||new(_e||FormData),i=he.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!he.isUndefined(t[e])}));const n=i.metaTokens,o=i.visitor||d,s=i.dots,r=i.indexes,a=i.Blob||"undefined"!==typeof Blob&&Blob,l=a&&he.isSpecCompliantForm(t);if(!he.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(he.isDate(e))return e.toISOString();if(!l&&he.isBlob(e))throw new me("Blob is not supported. Use a Buffer instead.");return he.isArrayBuffer(e)||he.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,i,o){let a=e;if(e&&!o&&"object"===typeof e)if(he.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(he.isArray(e)&&we(e)||(he.isFileList(e)||he.endsWith(i,"[]"))&&(a=he.toArray(e)))return i=be(i),a.forEach((function(e,n){!he.isUndefined(e)&&null!==e&&t.append(!0===r?ye([i],n,s):null===r?i:i+"[]",c(e))})),!1;return!!ve(e)||(t.append(ye(o,i,s),c(e)),!1)}const u=[],h=Object.assign(Ce,{defaultVisitor:d,convertValue:c,isVisitable:ve});function g(e,i){if(!he.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+i.join("."));u.push(e),he.forEach(e,(function(e,n){const s=!(he.isUndefined(e)||null===e)&&o.call(t,e,he.isString(n)?n.trim():n,i,h);!0===s&&g(e,i?i.concat(n):[n])})),u.pop()}}if(!he.isObject(e))throw new TypeError("data must be an object");return g(e),t}const ke=Se;function xe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ee(e,t){this._pairs=[],e&&ke(e,this,t)}const Le=Ee.prototype;Le.append=function(e,t){this._pairs.push([e,t])},Le.toString=function(e){const t=e?function(t){return e.call(this,t,xe)}:xe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Te=Ee;function Ie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Re(e,t,i){if(!t)return e;const n=i&&i.encode||Ie,o=i&&i.serialize;let s;if(s=o?o(t,i):he.isURLSearchParams(t)?t.toString():new Te(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}class De{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){he.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const Ne=De,Ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oe="undefined"!==typeof URLSearchParams?URLSearchParams:Te,Pe="undefined"!==typeof FormData?FormData:null,Me="undefined"!==typeof Blob?Blob:null,Fe={isBrowser:!0,classes:{URLSearchParams:Oe,FormData:Pe,Blob:Me},protocols:["http","https","file","blob","url","data"]},Be="undefined"!==typeof window&&"undefined"!==typeof document,We="object"===typeof navigator&&navigator||void 0,He=Be&&(!We||["ReactNative","NativeScript","NS"].indexOf(We.product)<0),Ve=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),je=Be&&window.location.href||"http://localhost",ze={...n,...Fe};function Ue(e,t){return ke(e,new ze.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,n){return ze.isNode&&he.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function $e(e){return he.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function qe(e){const t={},i=Object.keys(e);let n;const o=i.length;let s;for(n=0;n=e.length;if(s=!s&&he.isArray(n)?n.length:s,a)return he.hasOwnProp(n,s)?n[s]=[n[s],i]:n[s]=i,!r;n[s]&&he.isObject(n[s])||(n[s]=[]);const l=t(e,i,n[s],o);return l&&he.isArray(n[s])&&(n[s]=qe(n[s])),!r}if(he.isFormData(e)&&he.isFunction(e.entries)){const i={};return he.forEachEntry(e,((e,n)=>{t($e(e),n,i,0)})),i}return null}const Ge=Ke;function Qe(e,t,i){if(he.isString(e))try{return(t||JSON.parse)(e),he.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(i||JSON.stringify)(e)}const Ye={transitional:Ae,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,o=he.isObject(e);o&&he.isHTMLForm(e)&&(e=new FormData(e));const s=he.isFormData(e);if(s)return n?JSON.stringify(Ge(e)):e;if(he.isArrayBuffer(e)||he.isBuffer(e)||he.isStream(e)||he.isFile(e)||he.isBlob(e)||he.isReadableStream(e))return e;if(he.isArrayBufferView(e))return e.buffer;if(he.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ue(e,this.formSerializer).toString();if((r=he.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ke(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),Qe(e)):e}],transformResponse:[function(e){const t=this.transitional||Ye.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(he.isResponse(e)||he.isReadableStream(e))return e;if(e&&he.isString(e)&&(i&&!this.responseType||n)){const i=t&&t.silentJSONParsing,s=!i&&n;try{return JSON.parse(e)}catch(o){if(s){if("SyntaxError"===o.name)throw me.from(o,me.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ze.classes.FormData,Blob:ze.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};he.forEach(["delete","get","head","post","put","patch"],(e=>{Ye.headers[e]={}}));const Ze=Ye,Xe=he.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Je=e=>{const t={};let i,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),i=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!i||t[i]&&Xe[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)})),t},et=Symbol("internals");function tt(e){return e&&String(e).trim().toLowerCase()}function it(e){return!1===e||null==e?e:he.isArray(e)?e.map(it):String(e)}function nt(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=i.exec(e))t[n[1]]=n[2];return t}const ot=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function st(e,t,i,n,o){return he.isFunction(n)?n.call(this,t,i):(o&&(t=i),he.isString(t)?he.isString(n)?-1!==t.indexOf(n):he.isRegExp(n)?n.test(t):void 0:void 0)}function rt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}function at(e,t){const i=he.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+i,{value:function(e,i,o){return this[n].call(this,t,e,i,o)},configurable:!0})}))}class lt{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function o(e,t,i){const o=tt(t);if(!o)throw new Error("header name must be a non-empty string");const s=he.findKey(n,o);(!s||void 0===n[s]||!0===i||void 0===i&&!1!==n[s])&&(n[s||t]=it(e))}const s=(e,t)=>he.forEach(e,((e,i)=>o(e,i,t)));if(he.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(he.isString(e)&&(e=e.trim())&&!ot(e))s(Je(e),t);else if(he.isHeaders(e))for(const[r,a]of e.entries())o(a,r,i);else null!=e&&o(t,e,i);return this}get(e,t){if(e=tt(e),e){const i=he.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return nt(e);if(he.isFunction(t))return t.call(this,e,i);if(he.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=tt(e),e){const i=he.findKey(this,e);return!(!i||void 0===this[i]||t&&!st(this,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function o(e){if(e=tt(e),e){const o=he.findKey(i,e);!o||t&&!st(i,i[o],o,t)||(delete i[o],n=!0)}}return he.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;while(i--){const o=t[i];e&&!st(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,i={};return he.forEach(this,((n,o)=>{const s=he.findKey(i,o);if(s)return t[s]=it(n),void delete t[o];const r=e?rt(o):String(o).trim();r!==o&&delete t[o],t[r]=it(n),i[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return he.forEach(this,((i,n)=>{null!=i&&!1!==i&&(t[n]=e&&he.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=this[et]=this[et]={accessors:{}},i=t.accessors,n=this.prototype;function o(e){const t=tt(e);i[t]||(at(n,e),i[t]=!0)}return he.isArray(e)?e.forEach(o):o(e),this}}lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),he.reduceDescriptors(lt.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),he.freezeMethods(lt);const ct=lt;function dt(e,t){const i=this||Ze,n=t||i,o=ct.from(n.headers);let s=n.data;return he.forEach(e,(function(e){s=e.call(i,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ut(e){return!(!e||!e.__CANCEL__)}function ht(e,t,i){me.call(this,null==e?"canceled":e,me.ERR_CANCELED,t,i),this.name="CanceledError"}he.inherits(ht,me,{__CANCEL__:!0});const gt=ht;function pt(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new me("Request failed with status code "+i.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}function ft(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function mt(e,t){e=e||10;const i=new Array(e),n=new Array(e);let o,s=0,r=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[r];o||(o=l),i[s]=a,n[s]=l;let d=r,u=0;while(d!==s)u+=i[d++],d%=e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-o{o=s,i=null,n&&(clearTimeout(n),n=null),e.apply(null,t)},a=(...e)=>{const t=Date.now(),a=t-o;a>=s?r(e,t):(i=e,n||(n=setTimeout((()=>{n=null,r(i)}),s-a)))},l=()=>i&&r(i);return[a,l]}const bt=vt,yt=(e,t,i=3)=>{let n=0;const o=_t(50,250);return bt((i=>{const s=i.loaded,r=i.lengthComputable?i.total:void 0,a=s-n,l=o(a),c=s<=r;n=s;const d={loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&c?(r-s)/l:void 0,event:i,lengthComputable:null!=r,[t?"download":"upload"]:!0};e(d)}),i)},wt=(e,t)=>{const i=null!=e;return[n=>t[0]({lengthComputable:i,total:e,loaded:n}),t[1]]},Ct=e=>(...t)=>he.asap((()=>e(...t))),St=ze.hasStandardBrowserEnv?function(){const e=ze.navigator&&/(msie|trident)/i.test(ze.navigator.userAgent),t=document.createElement("a");let i;function n(i){let n=i;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(e){const t=he.isString(e)?n(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return function(){return!0}}(),kt=ze.hasStandardBrowserEnv?{write(e,t,i,n,o,s){const r=[e+"="+encodeURIComponent(t)];he.isNumber(i)&&r.push("expires="+new Date(i).toGMTString()),he.isString(n)&&r.push("path="+n),he.isString(o)&&r.push("domain="+o),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Et(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Lt(e,t){return e&&!xt(t)?Et(e,t):t}const Tt=e=>e instanceof ct?{...e}:e;function It(e,t){t=t||{};const i={};function n(e,t,i){return he.isPlainObject(e)&&he.isPlainObject(t)?he.merge.call({caseless:i},e,t):he.isPlainObject(t)?he.merge({},t):he.isArray(t)?t.slice():t}function o(e,t,i){return he.isUndefined(t)?he.isUndefined(e)?void 0:n(void 0,e,i):n(e,t,i)}function s(e,t){if(!he.isUndefined(t))return n(void 0,t)}function r(e,t){return he.isUndefined(t)?he.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,o,s){return s in t?n(i,o):s in e?n(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>o(Tt(e),Tt(t),!0)};return he.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,r=s(e[n],t[n],n);he.isUndefined(r)&&s!==a||(i[n]=r)})),i}const Rt=e=>{const t=It({},e);let i,{data:n,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:r,headers:a,auth:l}=t;if(t.headers=a=ct.from(a),t.url=Re(Lt(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),he.isFormData(n))if(ze.hasStandardBrowserEnv||ze.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(i=a.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ze.hasStandardBrowserEnv&&(o&&he.isFunction(o)&&(o=o(t)),o||!1!==o&&St(t.url))){const e=s&&r&&kt.read(r);e&&a.set(s,e)}return t},Dt="undefined"!==typeof XMLHttpRequest,Nt=Dt&&function(e){return new Promise((function(t,i){const n=Rt(e);let o=n.data;const s=ct.from(n.headers).normalize();let r,a,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:g}=n;function p(){c&&c(),d&&d(),n.cancelToken&&n.cancelToken.unsubscribe(r),n.signal&&n.signal.removeEventListener("abort",r)}let f=new XMLHttpRequest;function m(){if(!f)return;const n=ct.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),o=u&&"text"!==u&&"json"!==u?f.response:f.responseText,s={data:o,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};pt((function(e){t(e),p()}),(function(e){i(e),p()}),s),f=null}f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(i(new me("Request aborted",me.ECONNABORTED,e,f)),f=null)},f.onerror=function(){i(new me("Network Error",me.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Ae;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),i(new me(t,o.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,f)),f=null},void 0===o&&s.setContentType(null),"setRequestHeader"in f&&he.forEach(s.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),he.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),u&&"json"!==u&&(f.responseType=n.responseType),g&&([l,d]=yt(g,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=yt(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(r=t=>{f&&(i(!t||t.type?new gt(null,e,f):t),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(r),n.signal&&(n.signal.aborted?r():n.signal.addEventListener("abort",r)));const _=ft(n.url);_&&-1===ze.protocols.indexOf(_)?i(new me("Unsupported protocol "+_+":",me.ERR_BAD_REQUEST,e)):f.send(o||null)}))},At=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let i,n=new AbortController;const o=function(e){if(!i){i=!0,r();const t=e instanceof Error?e:this.reason;n.abort(t instanceof me?t:new gt(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new me(`timeout ${t} of ms exceeded`,me.ETIMEDOUT))}),t);const r=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=n;return a.unsubscribe=()=>he.asap(r),a}},Ot=At,Pt=function*(e,t){let i=e.byteLength;if(!t||i{const o=Mt(e,t);let s,r=0,a=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let s=n.byteLength;if(i){let e=r+=s;i(e)}e.enqueue(new Uint8Array(n))}catch(t){throw a(t),t}},cancel(e){return a(e),o.return()}},{highWaterMark:2})},Wt="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,Ht=Wt&&"function"===typeof ReadableStream,Vt=Wt&&("function"===typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),jt=(e,...t)=>{try{return!!e(...t)}catch(i){return!1}},zt=Ht&&jt((()=>{let e=!1;const t=new Request(ze.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ut=65536,$t=Ht&&jt((()=>he.isReadableStream(new Response("").body))),qt={stream:$t&&(e=>e.body)};Wt&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!qt[t]&&(qt[t]=he.isFunction(e[t])?e=>e[t]():(e,i)=>{throw new me(`Response type '${t}' is not supported`,me.ERR_NOT_SUPPORT,i)})}))})(new Response);const Kt=async e=>{if(null==e)return 0;if(he.isBlob(e))return e.size;if(he.isSpecCompliantForm(e)){const t=new Request(ze.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return he.isArrayBufferView(e)||he.isArrayBuffer(e)?e.byteLength:(he.isURLSearchParams(e)&&(e+=""),he.isString(e)?(await Vt(e)).byteLength:void 0)},Gt=async(e,t)=>{const i=he.toFiniteNumber(e.getContentLength());return null==i?Kt(t):i},Qt=Wt&&(async e=>{let{url:t,method:i,data:n,signal:o,cancelToken:s,timeout:r,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:d,withCredentials:u="same-origin",fetchOptions:h}=Rt(e);c=c?(c+"").toLowerCase():"text";let g,p=Ot([o,s&&s.toAbortSignal()],r);const f=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(l&&zt&&"get"!==i&&"head"!==i&&0!==(m=await Gt(d,n))){let e,i=new Request(t,{method:"POST",body:n,duplex:"half"});if(he.isFormData(n)&&(e=i.headers.get("content-type"))&&d.setContentType(e),i.body){const[e,t]=wt(m,yt(Ct(l)));n=Bt(i.body,Ut,e,t)}}he.isString(u)||(u=u?"include":"omit");const o="credentials"in Request.prototype;g=new Request(t,{...h,signal:p,method:i.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:o?u:void 0});let s=await fetch(g);const r=$t&&("stream"===c||"response"===c);if($t&&(a||r&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=he.toFiniteNumber(s.headers.get("content-length")),[i,n]=a&&wt(t,yt(Ct(a),!0))||[];s=new Response(Bt(s.body,Ut,i,(()=>{n&&n(),f&&f()})),e)}c=c||"text";let _=await qt[he.findKey(qt,c)||"text"](s,e);return!r&&f&&f(),await new Promise(((t,i)=>{pt(t,i,{data:_,headers:ct.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:g})}))}catch(_){if(f&&f(),_&&"TypeError"===_.name&&/fetch/i.test(_.message))throw Object.assign(new me("Network Error",me.ERR_NETWORK,e,g),{cause:_.cause||_});throw me.from(_,_&&_.code,e,g)}}),Yt={http:_e,xhr:Nt,fetch:Qt};he.forEach(Yt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(i){}Object.defineProperty(e,"adapterName",{value:t})}}));const Zt=e=>`- ${e}`,Xt=e=>he.isFunction(e)||null===e||!1===e,Jt={getAdapter:e=>{e=he.isArray(e)?e:[e];const{length:t}=e;let i,n;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let i=t?e.length>1?"since :\n"+e.map(Zt).join("\n"):" "+Zt(e[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:Yt};function ei(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gt(null,e)}function ti(e){ei(e),e.headers=ct.from(e.headers),e.data=dt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=Jt.getAdapter(e.adapter||Ze.adapter);return t(e).then((function(t){return ei(e),t.data=dt.call(e,e.transformResponse,t),t.headers=ct.from(t.headers),t}),(function(t){return ut(t)||(ei(e),t&&t.response&&(t.response.data=dt.call(e,e.transformResponse,t.response),t.response.headers=ct.from(t.response.headers))),Promise.reject(t)}))}const ii="1.7.7",ni={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ni[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const oi={};function si(e,t,i){if("object"!==typeof e)throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;while(o-- >0){const s=n[o],r=t[s];if(r){const t=e[s],i=void 0===t||r(t,s,e);if(!0!==i)throw new me("option "+s+" must be "+i,me.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new me("Unknown option "+s,me.ERR_BAD_OPTION)}}ni.transitional=function(e,t,i){function n(e,t){return"[Axios v"+ii+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,o,s)=>{if(!1===e)throw new me(n(o," has been removed"+(t?" in "+t:"")),me.ERR_DEPRECATED);return t&&!oi[o]&&(oi[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,o,s)}};const ri={assertOptions:si,validators:ni},ai=ri.validators;class li{constructor(e){this.defaults=e,this.interceptors={request:new Ne,response:new Ne}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{i.stack?t&&!String(i.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(i.stack+="\n"+t):i.stack=t}catch(n){}}throw i}}_request(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=It(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:o}=t;void 0!==i&&ri.assertOptions(i,{silentJSONParsing:ai.transitional(ai.boolean),forcedJSONParsing:ai.transitional(ai.boolean),clarifyTimeoutError:ai.transitional(ai.boolean)},!1),null!=n&&(he.isFunction(n)?t.paramsSerializer={serialize:n}:ri.assertOptions(n,{encode:ai.function,serialize:ai.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&he.merge(o.common,o[t.method]);o&&he.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ct.concat(s,o);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[ti.bind(this),void 0];e.unshift.apply(e,r),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);while(u{if(!i._listeners)return;let t=i._listeners.length;while(t-- >0)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{i.subscribe(e),t=e})).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e((function(e,n,o){i.reason||(i.reason=new gt(e,n,o),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new di((function(t){e=t}));return{token:t,cancel:e}}}const ui=di;function hi(e){return function(t){return e.apply(null,t)}}function gi(e){return he.isObject(e)&&!0===e.isAxiosError}const pi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pi).forEach((([e,t])=>{pi[t]=e}));const fi=pi;function mi(e){const t=new ci(e),i=o(ci.prototype.request,t);return he.extend(i,ci.prototype,t,{allOwnKeys:!0}),he.extend(i,t,null,{allOwnKeys:!0}),i.create=function(t){return mi(It(e,t))},i}const _i=mi(Ze);_i.Axios=ci,_i.CanceledError=gt,_i.CancelToken=ui,_i.isCancel=ut,_i.VERSION=ii,_i.toFormData=ke,_i.AxiosError=me,_i.Cancel=_i.CanceledError,_i.all=function(e){return Promise.all(e)},_i.spread=hi,_i.isAxiosError=gi,_i.mergeConfig=It,_i.AxiosHeaders=ct,_i.formToJSON=e=>Ge(he.isHTMLForm(e)?new FormData(e):e),_i.getAdapter=Jt.getAdapter,_i.HttpStatusCode=fi,_i.default=_i;const vi=_i},3952:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(50492),s=i(61906),r=i(29467),a=i(65139);const l=(0,r.a0)({name:"QAvatar",props:{...s.x_,fontSize:String,color:String,textColor:String,icon:String,square:Boolean,rounded:Boolean},setup(e,{slots:t}){const i=(0,s.Ay)(e),r=(0,n.EW)((()=>"q-avatar"+(e.color?` bg-${e.color}`:"")+(e.textColor?` text-${e.textColor} q-chip--colored`:"")+(!0===e.square?" q-avatar--square":!0===e.rounded?" rounded-borders":""))),l=(0,n.EW)((()=>e.fontSize?{fontSize:e.fontSize}:null));return()=>{const s=void 0!==e.icon?[(0,n.h)(o.A,{name:e.icon})]:void 0;return(0,n.h)("div",{class:r.value,style:i.value},[(0,n.h)("div",{class:"q-avatar__content row flex-center overflow-hidden",style:l.value},(0,a.bG)(t.default,s))])}}})},23954:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(29467),s=i(65139);const r=["top","middle","bottom"],a=(0,o.a0)({name:"QBadge",props:{color:String,textColor:String,floating:Boolean,transparent:Boolean,multiLine:Boolean,outline:Boolean,rounded:Boolean,label:[Number,String],align:{type:String,validator:e=>r.includes(e)}},setup(e,{slots:t}){const i=(0,n.EW)((()=>void 0!==e.align?{verticalAlign:e.align}:null)),o=(0,n.EW)((()=>{const t=!0===e.outline&&e.color||e.textColor;return`q-badge flex inline items-center no-wrap q-badge--${!0===e.multiLine?"multi":"single"}-line`+(!0===e.outline?" q-badge--outline":void 0!==e.color?` bg-${e.color}`:"")+(void 0!==t?` text-${t}`:"")+(!0===e.floating?" q-badge--floating":"")+(!0===e.rounded?" q-badge--rounded":"")+(!0===e.transparent?" q-badge--transparent":"")}));return()=>(0,n.h)("div",{class:o.value,style:i.value,role:"status","aria-label":e.label},(0,s.Hp)(t.default,void 0!==e.label?[e.label]:[]))}})},46868:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});i(10239);var n=i(61758),o=i(29467),s=i(16372),r=i(65139);const a=(0,o.a0)({name:"QBanner",props:{...s.C,inlineActions:Boolean,dense:Boolean,rounded:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),o=(0,s.A)(e,i),a=(0,n.EW)((()=>"q-banner row items-center"+(!0===e.dense?" q-banner--dense":"")+(!0===o.value?" q-banner--dark q-dark":"")+(!0===e.rounded?" rounded-borders":""))),l=(0,n.EW)((()=>"q-banner__actions row items-center justify-end col-"+(!0===e.inlineActions?"auto":"all")));return()=>{const i=[(0,n.h)("div",{class:"q-banner__avatar col-auto row items-center self-start"},(0,r.zm)(t.avatar)),(0,n.h)("div",{class:"q-banner__content col text-body2"},(0,r.zm)(t.default))],o=(0,r.zm)(t.action);return void 0!==o&&i.push((0,n.h)("div",{class:l.value},o)),(0,n.h)("div",{class:a.value+(!1===e.inlineActions&&void 0!==o?" q-banner--top-padding":""),role:"alert"},i)}}})},1693:(e,t,i)=>{"use strict";i.d(t,{A:()=>I});i(10239);var n=i(61758),o=i(38734),s=i(29104),r=i(50492),a=i(30564),l=i(39626),c=i(20018),d=i(61906),u=i(47502);const h={none:0,xs:4,sm:8,md:16,lg:24,xl:32},g={xs:8,sm:10,md:14,lg:20,xl:24},p=["button","submit","reset"],f=/[^\s]\/[^\s]/,m=["flat","outline","push","unelevated"];function _(e,t){return!0===e.flat?"flat":!0===e.outline?"outline":!0===e.push?"push":!0===e.unelevated?"unelevated":t}const v={...d.x_,...u.ni,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...m.reduce(((e,t)=>(e[t]=Boolean)&&e),{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...c.fR.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},b={...v,round:Boolean};function y(e){const t=(0,d.Ay)(e,g),i=(0,c.Ay)(e),{hasRouterLink:o,hasLink:s,linkTag:r,linkAttrs:a,navigateOnClick:l}=(0,u.Ay)({fallbackTag:"button"}),m=(0,n.EW)((()=>{const i=!1===e.fab&&!1===e.fabMini?t.value:{};return void 0!==e.padding?Object.assign({},i,{padding:e.padding.split(/\s+/).map((e=>e in h?h[e]+"px":e)).join(" "),minWidth:"0",minHeight:"0"}):i})),v=(0,n.EW)((()=>!0===e.rounded||!0===e.fab||!0===e.fabMini)),b=(0,n.EW)((()=>!0!==e.disable&&!0!==e.loading)),y=(0,n.EW)((()=>!0===b.value?e.tabindex||0:-1)),w=(0,n.EW)((()=>_(e,"standard"))),C=(0,n.EW)((()=>{const t={tabindex:y.value};return!0===s.value?Object.assign(t,a.value):!0===p.includes(e.type)&&(t.type=e.type),"a"===r.value?(!0===e.disable?t["aria-disabled"]="true":void 0===t.href&&(t.role="button"),!0!==o.value&&!0===f.test(e.type)&&(t.type=e.type)):!0===e.disable&&(t.disabled="",t["aria-disabled"]="true"),!0===e.loading&&void 0!==e.percentage&&Object.assign(t,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),t})),S=(0,n.EW)((()=>{let t;void 0!==e.color?t=!0===e.flat||!0===e.outline?`text-${e.textColor||e.color}`:`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(t=`text-${e.textColor}`);const i=!0===e.round?"round":"rectangle"+(!0===v.value?" q-btn--rounded":!0===e.square?" q-btn--square":"");return`q-btn--${w.value} q-btn--${i}`+(void 0!==t?" "+t:"")+(!0===b.value?" q-btn--actionable q-focusable q-hoverable":!0===e.disable?" disabled":"")+(!0===e.fab?" q-btn--fab":!0===e.fabMini?" q-btn--fab-mini":"")+(!0===e.noCaps?" q-btn--no-uppercase":"")+(!0===e.dense?" q-btn--dense":"")+(!0===e.stretch?" no-border-radius self-stretch":"")+(!0===e.glossy?" glossy":"")+(e.square?" q-btn--square":"")})),k=(0,n.EW)((()=>i.value+(!0===e.stack?" column":" row")+(!0===e.noWrap?" no-wrap text-no-wrap":"")+(!0===e.loading?" q-btn__content--hidden":"")));return{classes:S,style:m,innerClasses:k,attributes:C,hasLink:s,linkTag:r,navigateOnClick:l,isActionable:b}}var w=i(29467),C=i(65139),S=i(22500),k=i(2906);const{passiveCapture:x}=S.mG;let E=null,L=null,T=null;const I=(0,w.a0)({name:"QBtn",props:{...b,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:t,emit:i}){const{proxy:c}=(0,n.nI)(),{classes:d,style:u,innerClasses:h,attributes:g,hasLink:p,linkTag:f,navigateOnClick:m,isActionable:_}=y(e),v=(0,o.KR)(null),b=(0,o.KR)(null);let w,I=null,R=null;const D=(0,n.EW)((()=>void 0!==e.label&&null!==e.label&&""!==e.label)),N=(0,n.EW)((()=>!0!==e.disable&&!1!==e.ripple&&{keyCodes:!0===p.value?[13,32]:[13],...!0===e.ripple?{}:e.ripple})),A=(0,n.EW)((()=>({center:e.round}))),O=(0,n.EW)((()=>{const t=Math.max(0,Math.min(100,e.percentage));return t>0?{transition:"transform 0.6s",transform:`translateX(${t-100}%)`}:{}})),P=(0,n.EW)((()=>{if(!0===e.loading)return{onMousedown:z,onTouchstart:z,onClick:z,onKeydown:z,onKeyup:z};if(!0===_.value){const t={onClick:F,onKeydown:B,onMousedown:H};if(!0===c.$q.platform.has.touch){const i=void 0!==e.onTouchstart?"":"Passive";t[`onTouchstart${i}`]=W}return t}return{onClick:S.Gu}})),M=(0,n.EW)((()=>({ref:v,class:"q-btn q-btn-item non-selectable no-outline "+d.value,style:u.value,...g.value,...P.value})));function F(t){if(null!==v.value){if(void 0!==t){if(!0===t.defaultPrevented)return;const i=document.activeElement;if("submit"===e.type&&i!==document.body&&!1===v.value.contains(i)&&!1===i.contains(v.value)){v.value.focus();const e=()=>{document.removeEventListener("keydown",S.Gu,!0),document.removeEventListener("keyup",e,x),null!==v.value&&v.value.removeEventListener("blur",e,x)};document.addEventListener("keydown",S.Gu,!0),document.addEventListener("keyup",e,x),v.value.addEventListener("blur",e,x)}}m(t)}}function B(e){null!==v.value&&(i("keydown",e),!0===(0,k.Dv)(e,[13,32])&&L!==v.value&&(null!==L&&j(),!0!==e.defaultPrevented&&(v.value.focus(),L=v.value,v.value.classList.add("q-btn--active"),document.addEventListener("keyup",V,!0),v.value.addEventListener("blur",V,x)),(0,S.Gu)(e)))}function W(e){null!==v.value&&(i("touchstart",e),!0!==e.defaultPrevented&&(E!==v.value&&(null!==E&&j(),E=v.value,I=e.target,I.addEventListener("touchcancel",V,x),I.addEventListener("touchend",V,x)),w=!0,null!==R&&clearTimeout(R),R=setTimeout((()=>{R=null,w=!1}),200)))}function H(e){null!==v.value&&(e.qSkipRipple=!0===w,i("mousedown",e),!0!==e.defaultPrevented&&T!==v.value&&(null!==T&&j(),T=v.value,v.value.classList.add("q-btn--active"),document.addEventListener("mouseup",V,x)))}function V(e){if(null!==v.value&&(void 0===e||"blur"!==e.type||document.activeElement!==v.value)){if(void 0!==e&&"keyup"===e.type){if(L===v.value&&!0===(0,k.Dv)(e,[13,32])){const t=new MouseEvent("click",e);t.qKeyEvent=!0,!0===e.defaultPrevented&&(0,S.F4)(t),!0===e.cancelBubble&&(0,S.ds)(t),v.value.dispatchEvent(t),(0,S.Gu)(e),e.qKeyEvent=!0}i("keyup",e)}j()}}function j(e){const t=b.value;!0===e||E!==v.value&&T!==v.value||null===t||t===document.activeElement||(t.setAttribute("tabindex",-1),t.focus()),E===v.value&&(null!==I&&(I.removeEventListener("touchcancel",V,x),I.removeEventListener("touchend",V,x)),E=I=null),T===v.value&&(document.removeEventListener("mouseup",V,x),T=null),L===v.value&&(document.removeEventListener("keyup",V,!0),null!==v.value&&v.value.removeEventListener("blur",V,x),L=null),null!==v.value&&v.value.classList.remove("q-btn--active")}function z(e){(0,S.Gu)(e),e.qSkipRipple=!0}return(0,n.xo)((()=>{j(!0)})),Object.assign(c,{click:e=>{!0===_.value&&F(e)}}),()=>{let i=[];void 0!==e.icon&&i.push((0,n.h)(r.A,{name:e.icon,left:!0!==e.stack&&!0===D.value,role:"img"})),!0===D.value&&i.push((0,n.h)("span",{class:"block"},[e.label])),i=(0,C.Hp)(t.default,i),void 0!==e.iconRight&&!1===e.round&&i.push((0,n.h)(r.A,{name:e.iconRight,right:!0!==e.stack&&!0===D.value,role:"img"}));const o=[(0,n.h)("span",{class:"q-focus-helper",ref:b})];return!0===e.loading&&void 0!==e.percentage&&o.push((0,n.h)("span",{class:"q-btn__progress absolute-full overflow-hidden"+(!0===e.darkPercentage?" q-btn__progress--dark":"")},[(0,n.h)("span",{class:"q-btn__progress-indicator fit block",style:O.value})])),o.push((0,n.h)("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+h.value},i)),null!==e.loading&&o.push((0,n.h)(s.eB,{name:"q-transition--fade"},(()=>!0===e.loading?[(0,n.h)("span",{key:"loading",class:"absolute-full flex flex-center"},void 0!==t.loading?t.loading():[(0,n.h)(a.A)])]:null))),(0,n.bo)((0,n.h)(f.value,M.value,o),[[l.A,N.value,void 0,A.value]])}}})},23316:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(16372),s=i(29467),r=i(65139);const a=(0,s.a0)({name:"QCard",props:{...o.C,tag:{type:String,default:"div"},square:Boolean,flat:Boolean,bordered:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),s=(0,o.A)(e,i),a=(0,n.EW)((()=>"q-card"+(!0===s.value?" q-card--dark q-dark":"")+(!0===e.bordered?" q-card--bordered":"")+(!0===e.square?" q-card--square no-border-radius":"")+(!0===e.flat?" q-card--flat no-shadow":"")));return()=>(0,n.h)(e.tag,{class:a.value},(0,r.zm)(t.default))}})},62669:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(20018),s=i(29467),r=i(65139);const a=(0,s.a0)({name:"QCardActions",props:{...o.fR,vertical:Boolean},setup(e,{slots:t}){const i=(0,o.Ay)(e),s=(0,n.EW)((()=>`q-card__actions ${i.value} q-card__actions--`+(!0===e.vertical?"vert column":"horiz row")));return()=>(0,n.h)("div",{class:s.value},(0,r.zm)(t.default))}})},44189:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QCardSection",props:{tag:{type:String,default:"div"},horizontal:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-card__section q-card__section--"+(!0===e.horizontal?"horiz row no-wrap":"vert")));return()=>(0,n.h)(e.tag,{class:i.value},(0,s.zm)(t.default))}})},80460:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(50492),s=i(29467),r=i(80003);const a=()=>(0,n.h)("div",{key:"svg",class:"q-checkbox__bg absolute"},[(0,n.h)("svg",{class:"q-checkbox__svg fit absolute-full",viewBox:"0 0 24 24"},[(0,n.h)("path",{class:"q-checkbox__truthy",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}),(0,n.h)("path",{class:"q-checkbox__indet",d:"M4,14H20V10H4"})])]),l=(0,s.a0)({name:"QCheckbox",props:r.jh,emits:r.LA,setup(e){const t=a();function i(i,s){const r=(0,n.EW)((()=>(!0===i.value?e.checkedIcon:!0===s.value?e.indeterminateIcon:e.uncheckedIcon)||null));return()=>null!==r.value?[(0,n.h)("div",{key:"icon",class:"q-checkbox__icon-container absolute-full flex flex-center no-wrap"},[(0,n.h)(o.A,{class:"q-checkbox__icon",name:r.value})])]:[t]}return(0,r.Ay)("checkbox",i)}})},80003:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>p,LA:()=>g,jh:()=>h});i(10239);var n=i(61758),o=i(38734),s=i(16372),r=i(61906),a=i(8014),l=i(52510),c=i(10447),d=i(22500),u=i(65139);const h={...s.C,...r.x_,...l.Sc,modelValue:{required:!0,default:null},val:{},trueValue:{default:!0},falseValue:{default:!1},indeterminateValue:{default:null},checkedIcon:String,uncheckedIcon:String,indeterminateIcon:String,toggleOrder:{type:String,validator:e=>"tf"===e||"ft"===e},toggleIndeterminate:Boolean,label:String,leftLabel:Boolean,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},g=["update:modelValue"];function p(e,t){const{props:i,slots:h,emit:g,proxy:p}=(0,n.nI)(),{$q:f}=p,m=(0,s.A)(i,f),_=(0,o.KR)(null),{refocusTargetEl:v,refocusTarget:b}=(0,a.A)(i,_),y=(0,r.Ay)(i,c.A),w=(0,n.EW)((()=>void 0!==i.val&&Array.isArray(i.modelValue))),C=(0,n.EW)((()=>{const e=(0,o.ux)(i.val);return!0===w.value?i.modelValue.findIndex((t=>(0,o.ux)(t)===e)):-1})),S=(0,n.EW)((()=>!0===w.value?-1!==C.value:(0,o.ux)(i.modelValue)===(0,o.ux)(i.trueValue))),k=(0,n.EW)((()=>!0===w.value?-1===C.value:(0,o.ux)(i.modelValue)===(0,o.ux)(i.falseValue))),x=(0,n.EW)((()=>!1===S.value&&!1===k.value)),E=(0,n.EW)((()=>!0===i.disable?-1:i.tabindex||0)),L=(0,n.EW)((()=>`q-${e} cursor-pointer no-outline row inline no-wrap items-center`+(!0===i.disable?" disabled":"")+(!0===m.value?` q-${e}--dark`:"")+(!0===i.dense?` q-${e}--dense`:"")+(!0===i.leftLabel?" reverse":""))),T=(0,n.EW)((()=>{const t=!0===S.value?"truthy":!0===k.value?"falsy":"indet",n=void 0===i.color||!0!==i.keepColor&&("toggle"===e?!0!==S.value:!0===k.value)?"":` text-${i.color}`;return`q-${e}__inner relative-position non-selectable q-${e}__inner--${t}${n}`})),I=(0,n.EW)((()=>{const e={type:"checkbox"};return void 0!==i.name&&Object.assign(e,{".checked":S.value,"^checked":!0===S.value?"checked":void 0,name:i.name,value:!0===w.value?i.val:i.trueValue}),e})),R=(0,l.vq)(I),D=(0,n.EW)((()=>{const t={tabindex:E.value,role:"toggle"===e?"switch":"checkbox","aria-label":i.label,"aria-checked":!0===x.value?"mixed":!0===S.value?"true":"false"};return!0===i.disable&&(t["aria-disabled"]="true"),t}));function N(e){void 0!==e&&((0,d.Gu)(e),b(e)),!0!==i.disable&&g("update:modelValue",A(),e)}function A(){if(!0===w.value){if(!0===S.value){const e=i.modelValue.slice();return e.splice(C.value,1),e}return i.modelValue.concat([i.val])}if(!0===S.value){if("ft"!==i.toggleOrder||!1===i.toggleIndeterminate)return i.falseValue}else{if(!0!==k.value)return"ft"!==i.toggleOrder?i.trueValue:i.falseValue;if("ft"===i.toggleOrder||!1===i.toggleIndeterminate)return i.trueValue}return i.indeterminateValue}function O(e){13!==e.keyCode&&32!==e.keyCode||(0,d.Gu)(e)}function P(e){13!==e.keyCode&&32!==e.keyCode||N(e)}const M=t(S,x);return Object.assign(p,{toggle:N}),()=>{const t=M();!0!==i.disable&&R(t,"unshift",` q-${e}__native absolute q-ma-none q-pa-none`);const o=[(0,n.h)("div",{class:T.value,style:y.value,"aria-hidden":"true"},t)];null!==v.value&&o.push(v.value);const s=void 0!==i.label?(0,u.Hp)(h.default,[i.label]):(0,u.zm)(h.default);return void 0!==s&&o.push((0,n.h)("div",{class:`q-${e}__label q-anchor--skip`},s)),(0,n.h)("div",{ref:_,class:L.value,...D.value,onClick:N,onKeydown:O,onKeyup:P},o)}}},66760:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});i(10239);var n=i(61758),o=i(50492),s=i(39626),r=i(16372),a=i(61906),l=i(29467),c=i(22500),d=i(65139);const u={xs:8,sm:10,md:14,lg:20,xl:24},h=(0,l.a0)({name:"QChip",props:{...r.C,...a.x_,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:["update:modelValue","update:selected","remove","click"],setup(e,{slots:t,emit:i}){const{proxy:{$q:l}}=(0,n.nI)(),h=(0,r.A)(e,l),g=(0,a.Ay)(e,u),p=(0,n.EW)((()=>!0===e.selected||void 0!==e.icon)),f=(0,n.EW)((()=>!0===e.selected?e.iconSelected||l.iconSet.chip.selected:e.icon)),m=(0,n.EW)((()=>e.iconRemove||l.iconSet.chip.remove)),_=(0,n.EW)((()=>!1===e.disable&&(!0===e.clickable||null!==e.selected))),v=(0,n.EW)((()=>{const t=!0===e.outline&&e.color||e.textColor;return"q-chip row inline no-wrap items-center"+(!1===e.outline&&void 0!==e.color?` bg-${e.color}`:"")+(t?` text-${t} q-chip--colored`:"")+(!0===e.disable?" disabled":"")+(!0===e.dense?" q-chip--dense":"")+(!0===e.outline?" q-chip--outline":"")+(!0===e.selected?" q-chip--selected":"")+(!0===_.value?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(!0===e.square?" q-chip--square":"")+(!0===h.value?" q-chip--dark q-dark":"")})),b=(0,n.EW)((()=>{const t=!0===e.disable?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},i={...t,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||l.lang.label.remove};return{chip:t,remove:i}}));function y(e){13===e.keyCode&&w(e)}function w(t){e.disable||(i("update:selected",!e.selected),i("click",t))}function C(t){void 0!==t.keyCode&&13!==t.keyCode||((0,c.Gu)(t),!1===e.disable&&(i("update:modelValue",!1),i("remove")))}function S(){const i=[];!0===_.value&&i.push((0,n.h)("div",{class:"q-focus-helper"})),!0===p.value&&i.push((0,n.h)(o.A,{class:"q-chip__icon q-chip__icon--left",name:f.value}));const s=void 0!==e.label?[(0,n.h)("div",{class:"ellipsis"},[e.label])]:void 0;return i.push((0,n.h)("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},(0,d.bG)(t.default,s))),e.iconRight&&i.push((0,n.h)(o.A,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),!0===e.removable&&i.push((0,n.h)(o.A,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:m.value,...b.value.remove,onClick:C,onKeyup:C})),i}return()=>{if(!1===e.modelValue)return;const t={class:v.value,style:g.value};return!0===_.value&&Object.assign(t,b.value.chip,{onClick:w,onKeyup:y}),(0,d.Kf)("div",t,S(),"ripple",!1!==e.ripple&&!0!==e.disable,(()=>[[s.A,e.ripple]]))}}})},34222:(e,t,i)=>{"use strict";i.d(t,{A:()=>g});i(10239);var n=i(61758),o=i(61906);const s={...o.x_,min:{type:Number,default:0},max:{type:Number,default:100},color:String,centerColor:String,trackColor:String,fontSize:String,rounded:Boolean,thickness:{type:Number,default:.2,validator:e=>e>=0&&e<=1},angle:{type:Number,default:0},showValue:Boolean,reverse:Boolean,instantFeedback:Boolean};var r=i(29467),a=i(65139),l=i(82732);const c=50,d=2*c,u=d*Math.PI,h=Math.round(1e3*u)/1e3,g=(0,r.a0)({name:"QCircularProgress",props:{...s,value:{type:Number,default:0},animationSpeed:{type:[String,Number],default:600},indeterminate:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),s=(0,o.Ay)(e),r=(0,n.EW)((()=>{const t=(!0===i.lang.rtl?-1:1)*e.angle;return{transform:e.reverse!==(!0===i.lang.rtl)?`scale3d(-1, 1, 1) rotate3d(0, 0, 1, ${-90-t}deg)`:`rotate3d(0, 0, 1, ${t-90}deg)`}})),g=(0,n.EW)((()=>!0!==e.instantFeedback&&!0!==e.indeterminate?{transition:`stroke-dashoffset ${e.animationSpeed}ms ease 0s, stroke ${e.animationSpeed}ms ease`}:"")),p=(0,n.EW)((()=>d/(1-e.thickness/2))),f=(0,n.EW)((()=>`${p.value/2} ${p.value/2} ${p.value} ${p.value}`)),m=(0,n.EW)((()=>(0,l.Tq)(e.value,e.min,e.max))),_=(0,n.EW)((()=>e.max-e.min)),v=(0,n.EW)((()=>e.thickness/2*p.value)),b=(0,n.EW)((()=>{const t=(e.max-m.value)/_.value,i=!0===e.rounded&&m.value{const i=[];void 0!==e.centerColor&&"transparent"!==e.centerColor&&i.push((0,n.h)("circle",{class:`q-circular-progress__center text-${e.centerColor}`,fill:"currentColor",r:c-v.value/2,cx:p.value,cy:p.value})),void 0!==e.trackColor&&"transparent"!==e.trackColor&&i.push(y({cls:"track",thickness:v.value,offset:0,color:e.trackColor})),i.push(y({cls:"circle",thickness:v.value,offset:b.value,color:e.color,rounded:!0===e.rounded?"round":void 0}));const o=[(0,n.h)("svg",{class:"q-circular-progress__svg",style:r.value,viewBox:f.value,"aria-hidden":"true"},i)];return!0===e.showValue&&o.push((0,n.h)("div",{class:"q-circular-progress__text absolute-full row flex-center content-center",style:{fontSize:e.fontSize}},void 0!==t.default?t.default():[(0,n.h)("div",m.value)])),(0,n.h)("div",{class:`q-circular-progress q-circular-progress--${!0===e.indeterminate?"in":""}determinate`,style:s.value,role:"progressbar","aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":!0===e.indeterminate?void 0:m.value},(0,a.bG)(t.internal,o))}}})},82156:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(61758),o=i(38734),s=i(29104),r=i(60414),a=i(24667),l=i(46019),c=i(52916),d=i(40454),u=i(52120),h=i(34276),g=i(29467),p=i(77556),f=i(65139),m=i(78773),_=i(88173),v=i(98983);let b=0;const y={standard:"fixed-full flex-center",top:"fixed-top justify-center",bottom:"fixed-bottom justify-center",right:"fixed-right items-center",left:"fixed-left items-center"},w={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},C=(0,g.a0)({name:"QDialog",inheritAttrs:!1,props:{...c.RI,...d.d,transitionShow:String,transitionHide:String,persistent:Boolean,autoClose:Boolean,allowFocusOutside:Boolean,noEscDismiss:Boolean,noBackdropDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,noShake:Boolean,seamless:Boolean,maximized:Boolean,fullWidth:Boolean,fullHeight:Boolean,square:Boolean,backdropFilter:String,position:{type:String,default:"standard",validator:e=>["standard","top","bottom","left","right"].includes(e)}},emits:[...c.Jl,"shake","click","escapeKey"],setup(e,{slots:t,emit:i,attrs:g}){const C=(0,n.nI)(),S=(0,o.KR)(null),k=(0,o.KR)(!1),x=(0,o.KR)(!1);let E,L,T=null,I=null;const R=(0,n.EW)((()=>!0!==e.persistent&&!0!==e.noRouteDismiss&&!0!==e.seamless)),{preventBodyScroll:D}=(0,h.A)(),{registerTimeout:N}=(0,a.A)(),{registerTick:A,removeTick:O}=(0,l.A)(),{transitionProps:P,transitionStyle:M}=(0,d.A)(e,(()=>w[e.position][0]),(()=>w[e.position][1])),F=(0,n.EW)((()=>M.value+(void 0!==e.backdropFilter?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:""))),{showPortal:B,hidePortal:W,portalIsAccessible:H,renderPortal:V}=(0,u.A)(C,S,se,"dialog"),{hide:j}=(0,c.Ay)({showing:k,hideOnRouteChange:R,handleShow:Q,handleHide:Y,processOnMount:!0}),{addToHistory:z,removeFromHistory:U}=(0,r.A)(k,j,R),$=(0,n.EW)((()=>"q-dialog__inner flex no-pointer-events q-dialog__inner--"+(!0===e.maximized?"maximized":"minimized")+` q-dialog__inner--${e.position} ${y[e.position]}`+(!0===x.value?" q-dialog__inner--animating":"")+(!0===e.fullWidth?" q-dialog__inner--fullwidth":"")+(!0===e.fullHeight?" q-dialog__inner--fullheight":"")+(!0===e.square?" q-dialog__inner--square":""))),q=(0,n.EW)((()=>!0===k.value&&!0!==e.seamless)),K=(0,n.EW)((()=>!0===e.autoClose?{onClick:ie}:{})),G=(0,n.EW)((()=>["q-dialog fullscreen no-pointer-events q-dialog--"+(!0===q.value?"modal":"seamless"),g.class]));function Q(t){z(),I=!1===e.noRefocus&&null!==document.activeElement?document.activeElement:null,te(e.maximized),B(),x.value=!0,!0!==e.noFocus?(null!==document.activeElement&&document.activeElement.blur(),A(Z)):O(),N((()=>{if(!0===C.proxy.$q.platform.is.ios){if(!0!==e.seamless&&document.activeElement){const{top:e,bottom:t}=document.activeElement.getBoundingClientRect(),{innerHeight:i}=window,n=void 0!==window.visualViewport?window.visualViewport.height:i;e>0&&t>n/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-n,t>=i?1/0:Math.ceil(document.scrollingElement.scrollTop+t-n/2))),document.activeElement.scrollIntoView()}L=!0,S.value.click(),L=!1}B(!0),x.value=!1,i("show",t)}),e.transitionDuration)}function Y(t){O(),U(),ee(!0),x.value=!0,W(),null!==I&&(((t&&0===t.type.indexOf("key")?I.closest('[tabindex]:not([tabindex^="-"])'):void 0)||I).focus(),I=null),N((()=>{W(!0),x.value=!1,i("hide",t)}),e.transitionDuration)}function Z(e){(0,v.Gy)((()=>{let t=S.value;if(null!==t){if(void 0!==e){const i=t.querySelector(e);if(null!==i)return void i.focus({preventScroll:!0})}!0!==t.contains(document.activeElement)&&(t=t.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||t.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||t.querySelector("[autofocus], [data-autofocus]")||t,t.focus({preventScroll:!0}))}}))}function X(e){e&&"function"===typeof e.focus?e.focus({preventScroll:!0}):Z(),i("shake");const t=S.value;null!==t&&(t.classList.remove("q-animate--scale"),t.classList.add("q-animate--scale"),null!==T&&clearTimeout(T),T=setTimeout((()=>{T=null,null!==S.value&&(t.classList.remove("q-animate--scale"),Z())}),170))}function J(){!0!==e.seamless&&(!0===e.persistent||!0===e.noEscDismiss?!0!==e.maximized&&!0!==e.noShake&&X():(i("escapeKey"),j()))}function ee(t){null!==T&&(clearTimeout(T),T=null),!0!==t&&!0!==k.value||(te(!1),!0!==e.seamless&&(D(!1),(0,_.v)(oe),(0,m.V)(J))),!0!==t&&(I=null)}function te(e){!0===e?!0!==E&&(b<1&&document.body.classList.add("q-body--dialog"),b++,E=!0):!0===E&&(b<2&&document.body.classList.remove("q-body--dialog"),b--,E=!1)}function ie(e){!0!==L&&(j(e),i("click",e))}function ne(t){!0!==e.persistent&&!0!==e.noBackdropDismiss?j(t):!0!==e.noShake&&X()}function oe(t){!0!==e.allowFocusOutside&&!0===H.value&&!0!==(0,p.$J)(S.value,t.target)&&Z('[tabindex]:not([tabindex="-1"])')}function se(){return(0,n.h)("div",{role:"dialog","aria-modal":!0===q.value?"true":"false",...g,class:G.value},[(0,n.h)(s.eB,{name:"q-transition--fade",appear:!0},(()=>!0===q.value?(0,n.h)("div",{class:"q-dialog__backdrop fixed-full",style:F.value,"aria-hidden":"true",tabindex:-1,onClick:ne}):null)),(0,n.h)(s.eB,P.value,(()=>!0===k.value?(0,n.h)("div",{ref:S,class:$.value,style:M.value,tabindex:-1,...K.value},(0,f.zm)(t.default)):null))])}return(0,n.wB)((()=>e.maximized),(e=>{!0===k.value&&te(e)})),(0,n.wB)(q,(e=>{D(e),!0===e?((0,_.g)(oe),(0,m.I)(J)):((0,_.v)(oe),(0,m.V)(J))})),Object.assign(C.proxy,{focus:Z,shake:X,__updateRefocusTarget(e){I=e||null}}),(0,n.xo)(ee),V}})},76056:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});i(10239);var n=i(61758),o=i(38734),s=i(60414),r=i(52916),a=i(34276),l=i(24667),c=i(16372),d=i(89390),u=i(29467),h=i(82732),g=i(65139),p=i(27973);const f=150,m=(0,u.a0)({name:"QDrawer",inheritAttrs:!1,props:{...r.RI,...c.C,side:{type:String,default:"left",validator:e=>["left","right"].includes(e)},width:{type:Number,default:300},mini:Boolean,miniToOverlay:Boolean,miniWidth:{type:Number,default:57},noMiniAnimation:Boolean,breakpoint:{type:Number,default:1023},showIfAbove:Boolean,behavior:{type:String,validator:e=>["default","desktop","mobile"].includes(e),default:"default"},bordered:Boolean,elevated:Boolean,overlay:Boolean,persistent:Boolean,noSwipeOpen:Boolean,noSwipeClose:Boolean,noSwipeBackdrop:Boolean},emits:[...r.Jl,"onLayout","miniState"],setup(e,{slots:t,emit:i,attrs:u}){const m=(0,n.nI)(),{proxy:{$q:_}}=m,v=(0,c.A)(e,_),{preventBodyScroll:b}=(0,a.A)(),{registerTimeout:y,removeTimeout:w}=(0,l.A)(),C=(0,n.WQ)(p.ON,p.U_);if(C===p.U_)return console.error("QDrawer needs to be child of QLayout"),p.U_;let S,k,x=null;const E=(0,o.KR)("mobile"===e.behavior||"desktop"!==e.behavior&&C.totalWidth.value<=e.breakpoint),L=(0,n.EW)((()=>!0===e.mini&&!0!==E.value)),T=(0,n.EW)((()=>!0===L.value?e.miniWidth:e.width)),I=(0,o.KR)(!0===e.showIfAbove&&!1===E.value||!0===e.modelValue),R=(0,n.EW)((()=>!0!==e.persistent&&(!0===E.value||!0===G.value)));function D(e,t){if(P(),!1!==e&&C.animate(),ae(0),!0===E.value){const e=C.instances[U.value];void 0!==e&&!0===e.belowBreakpoint&&e.hide(!1),le(1),!0!==C.isContainer.value&&b(!0)}else le(0),!1!==e&&ce(!1);y((()=>{!1!==e&&ce(!0),!0!==t&&i("show",e)}),f)}function N(e,t){M(),!1!==e&&C.animate(),le(0),ae(W.value*T.value),ge(),!0!==t?y((()=>{i("hide",e)}),f):w()}const{show:A,hide:O}=(0,r.Ay)({showing:I,hideOnRouteChange:R,handleShow:D,handleHide:N}),{addToHistory:P,removeFromHistory:M}=(0,s.A)(I,O,R),F={belowBreakpoint:E,hide:O},B=(0,n.EW)((()=>"right"===e.side)),W=(0,n.EW)((()=>(!0===_.lang.rtl?-1:1)*(!0===B.value?1:-1))),H=(0,o.KR)(0),V=(0,o.KR)(!1),j=(0,o.KR)(!1),z=(0,o.KR)(T.value*W.value),U=(0,n.EW)((()=>!0===B.value?"left":"right")),$=(0,n.EW)((()=>!0===I.value&&!1===E.value&&!1===e.overlay?!0===e.miniToOverlay?e.miniWidth:T.value:0)),q=(0,n.EW)((()=>!0===e.overlay||!0===e.miniToOverlay||-1!==C.view.value.indexOf(B.value?"R":"L")||!0===_.platform.is.ios&&!0===C.isContainer.value)),K=(0,n.EW)((()=>!1===e.overlay&&!0===I.value&&!1===E.value)),G=(0,n.EW)((()=>!0===e.overlay&&!0===I.value&&!1===E.value)),Q=(0,n.EW)((()=>"fullscreen q-drawer__backdrop"+(!1===I.value&&!1===V.value?" hidden":""))),Y=(0,n.EW)((()=>({backgroundColor:`rgba(0,0,0,${.4*H.value})`}))),Z=(0,n.EW)((()=>!0===B.value?"r"===C.rows.value.top[2]:"l"===C.rows.value.top[0])),X=(0,n.EW)((()=>!0===B.value?"r"===C.rows.value.bottom[2]:"l"===C.rows.value.bottom[0])),J=(0,n.EW)((()=>{const e={};return!0===C.header.space&&!1===Z.value&&(!0===q.value?e.top=`${C.header.offset}px`:!0===C.header.space&&(e.top=`${C.header.size}px`)),!0===C.footer.space&&!1===X.value&&(!0===q.value?e.bottom=`${C.footer.offset}px`:!0===C.footer.space&&(e.bottom=`${C.footer.size}px`)),e})),ee=(0,n.EW)((()=>{const e={width:`${T.value}px`,transform:`translateX(${z.value}px)`};return!0===E.value?e:Object.assign(e,J.value)})),te=(0,n.EW)((()=>"q-drawer__content fit "+(!0!==C.isContainer.value?"scroll":"overflow-auto"))),ie=(0,n.EW)((()=>`q-drawer q-drawer--${e.side}`+(!0===j.value?" q-drawer--mini-animate":"")+(!0===e.bordered?" q-drawer--bordered":"")+(!0===v.value?" q-drawer--dark q-dark":"")+(!0===V.value?" no-transition":!0===I.value?"":" q-layout--prevent-focus")+(!0===E.value?" fixed q-drawer--on-top q-drawer--mobile q-drawer--top-padding":" q-drawer--"+(!0===L.value?"mini":"standard")+(!0===q.value||!0!==K.value?" fixed":"")+(!0===e.overlay||!0===e.miniToOverlay?" q-drawer--on-top":"")+(!0===Z.value?" q-drawer--top-padding":"")))),ne=(0,n.EW)((()=>{const t=!0===_.lang.rtl?e.side:U.value;return[[d.A,ue,void 0,{[t]:!0,mouse:!0}]]})),oe=(0,n.EW)((()=>{const t=!0===_.lang.rtl?U.value:e.side;return[[d.A,he,void 0,{[t]:!0,mouse:!0}]]})),se=(0,n.EW)((()=>{const t=!0===_.lang.rtl?U.value:e.side;return[[d.A,he,void 0,{[t]:!0,mouse:!0,mouseAllDir:!0}]]}));function re(){fe(E,"mobile"===e.behavior||"desktop"!==e.behavior&&C.totalWidth.value<=e.breakpoint)}function ae(e){void 0===e?(0,n.dY)((()=>{e=!0===I.value?0:T.value,ae(W.value*e)})):(!0!==C.isContainer.value||!0!==B.value||!0!==E.value&&Math.abs(e)!==T.value||(e+=W.value*C.scrollbarWidth.value),z.value=e)}function le(e){H.value=e}function ce(e){const t=!0===e?"remove":!0!==C.isContainer.value?"add":"";""!==t&&document.body.classList[t]("q-body--drawer-toggle")}function de(){null!==x&&clearTimeout(x),m.proxy&&m.proxy.$el&&m.proxy.$el.classList.add("q-drawer--mini-animate"),j.value=!0,x=setTimeout((()=>{x=null,j.value=!1,m&&m.proxy&&m.proxy.$el&&m.proxy.$el.classList.remove("q-drawer--mini-animate")}),150)}function ue(e){if(!1!==I.value)return;const t=T.value,i=(0,h.Tq)(e.distance.x,0,t);if(!0===e.isFinal){const e=i>=Math.min(75,t);return!0===e?A():(C.animate(),le(0),ae(W.value*t)),void(V.value=!1)}ae((!0===_.lang.rtl?!0!==B.value:B.value)?Math.max(t-i,0):Math.min(0,i-t)),le((0,h.Tq)(i/t,0,1)),!0===e.isFirst&&(V.value=!0)}function he(t){if(!0!==I.value)return;const i=T.value,n=t.direction===e.side,o=(!0===_.lang.rtl?!0!==n:n)?(0,h.Tq)(t.distance.x,0,i):0;if(!0===t.isFinal){const e=Math.abs(o){!0===t?(S=I.value,!0===I.value&&O(!1)):!1===e.overlay&&"mobile"!==e.behavior&&!1!==S&&(!0===I.value?(ae(0),le(0),ge()):A(!1))})),(0,n.wB)((()=>e.side),((e,t)=>{C.instances[t]===F&&(C.instances[t]=void 0,C[t].space=!1,C[t].offset=0),C.instances[e]=F,C[e].size=T.value,C[e].space=K.value,C[e].offset=$.value})),(0,n.wB)(C.totalWidth,(()=>{!0!==C.isContainer.value&&!0===document.qScrollPrevented||re()})),(0,n.wB)((()=>e.behavior+e.breakpoint),re),(0,n.wB)(C.isContainer,(e=>{!0===I.value&&b(!0!==e),!0===e&&re()})),(0,n.wB)(C.scrollbarWidth,(()=>{ae(!0===I.value?0:void 0)})),(0,n.wB)($,(e=>{pe("offset",e)})),(0,n.wB)(K,(e=>{i("onLayout",e),pe("space",e)})),(0,n.wB)(B,(()=>{ae()})),(0,n.wB)(T,(t=>{ae(),me(e.miniToOverlay,t)})),(0,n.wB)((()=>e.miniToOverlay),(e=>{me(e,T.value)})),(0,n.wB)((()=>_.lang.rtl),(()=>{ae()})),(0,n.wB)((()=>e.mini),(()=>{e.noMiniAnimation||!0===e.modelValue&&(de(),C.animate())})),(0,n.wB)(L,(e=>{i("miniState",e)})),C.instances[e.side]=F,me(e.miniToOverlay,T.value),pe("space",K.value),pe("offset",$.value),!0===e.showIfAbove&&!0!==e.modelValue&&!0===I.value&&void 0!==e["onUpdate:modelValue"]&&i("update:modelValue",!0),(0,n.sV)((()=>{i("onLayout",K.value),i("miniState",L.value),S=!0===e.showIfAbove;const t=()=>{const e=!0===I.value?D:N;e(!1,!0)};0===C.totalWidth.value?k=(0,n.wB)(C.totalWidth,(()=>{k(),k=void 0,!1===I.value&&!0===e.showIfAbove&&!1===E.value?A(!1):t()})):(0,n.dY)(t)})),(0,n.xo)((()=>{void 0!==k&&k(),null!==x&&(clearTimeout(x),x=null),!0===I.value&&ge(),C.instances[e.side]===F&&(C.instances[e.side]=void 0,pe("size",0),pe("offset",0),pe("space",!1))})),()=>{const i=[];!0===E.value&&(!1===e.noSwipeOpen&&i.push((0,n.bo)((0,n.h)("div",{key:"open",class:`q-drawer__opener fixed-${e.side}`,"aria-hidden":"true"}),ne.value)),i.push((0,g.Kf)("div",{ref:"backdrop",class:Q.value,style:Y.value,"aria-hidden":"true",onClick:O},void 0,"backdrop",!0!==e.noSwipeBackdrop&&!0===I.value,(()=>se.value))));const o=!0===L.value&&void 0!==t.mini,s=[(0,n.h)("div",{...u,key:""+o,class:[te.value,u.class]},!0===o?t.mini():(0,g.zm)(t.default))];return!0===e.elevated&&!0===I.value&&s.push((0,n.h)("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),i.push((0,g.Kf)("aside",{ref:"content",class:ie.value,style:ee.value},s,"contentclose",!0!==e.noSwipeClose&&!0===E.value,(()=>oe.value))),(0,n.h)("div",{class:"q-drawer-container"},i)}}})},9459:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});i(42958),i(10239);var n=i(38734),o=i(61758),s=i(29104),r=i(90124),a=i(25173),l=i(13796),c=i(50492),d=i(29467);const u=(0,d.a0)({name:"QSlideTransition",props:{appear:Boolean,duration:{type:Number,default:300}},emits:["show","hide"],setup(e,{slots:t,emit:i}){let n,r,a,l,c=!1,d=null,u=null;function h(){n&&n(),n=null,c=!1,null!==d&&(clearTimeout(d),d=null),null!==u&&(clearTimeout(u),u=null),void 0!==r&&r.removeEventListener("transitionend",a),a=null}function g(t,i,o){void 0!==i&&(t.style.height=`${i}px`),t.style.transition=`height ${e.duration}ms cubic-bezier(.25, .8, .50, 1)`,c=!0,n=o}function p(e,t){e.style.overflowY=null,e.style.height=null,e.style.transition=null,h(),t!==l&&i(t)}function f(t,i){let n=0;r=t,!0===c?(h(),n=t.offsetHeight===t.scrollHeight?0:void 0):(l="hide",t.style.overflowY="hidden"),g(t,n,i),d=setTimeout((()=>{d=null,t.style.height=`${t.scrollHeight}px`,a=e=>{u=null,Object(e)===e&&e.target!==t||p(t,"show")},t.addEventListener("transitionend",a),u=setTimeout(a,1.1*e.duration)}),100)}function m(t,i){let n;r=t,!0===c?h():(l="show",t.style.overflowY="hidden",n=t.scrollHeight),g(t,n,i),d=setTimeout((()=>{d=null,t.style.height=0,a=e=>{u=null,Object(e)===e&&e.target!==t||p(t,"hide")},t.addEventListener("transitionend",a),u=setTimeout(a,1.1*e.duration)}),100)}return(0,o.xo)((()=>{!0===c&&h()})),()=>(0,o.h)(s.eB,{css:!1,appear:e.appear,onEnter:f,onLeave:m},t.default)}});var h=i(10386),g=i(16372),p=i(74915),f=i(47502),m=i(52916),_=i(22500),v=i(65139),b=i(85192);const y=(0,n.Gc)({}),w=Object.keys(f.Ji),C=(0,d.a0)({name:"QExpansionItem",props:{...f.Ji,...m.RI,...g.C,icon:String,label:String,labelLines:[Number,String],caption:String,captionLines:[Number,String],dense:Boolean,toggleAriaLabel:String,expandIcon:String,expandedIcon:String,expandIconClass:[Array,String,Object],duration:{},headerInsetLevel:Number,contentInsetLevel:Number,expandSeparator:Boolean,defaultOpened:Boolean,hideExpandIcon:Boolean,expandIconToggle:Boolean,switchToggleSide:Boolean,denseToggle:Boolean,group:String,popup:Boolean,headerStyle:[Array,String,Object],headerClass:[Array,String,Object]},emits:[...m.Jl,"click","afterShow","afterHide"],setup(e,{slots:t,emit:i}){const{proxy:{$q:d}}=(0,o.nI)(),f=(0,g.A)(e,d),C=(0,n.KR)(null!==e.modelValue?e.modelValue:e.defaultOpened),S=(0,n.KR)(null),k=(0,p.A)(),{show:x,hide:E,toggle:L}=(0,m.Ay)({showing:C});let T,I;const R=(0,o.EW)((()=>"q-expansion-item q-item-type q-expansion-item--"+(!0===C.value?"expanded":"collapsed")+" q-expansion-item--"+(!0===e.popup?"popup":"standard"))),D=(0,o.EW)((()=>{if(void 0===e.contentInsetLevel)return null;const t=!0===d.lang.rtl?"Right":"Left";return{["padding"+t]:56*e.contentInsetLevel+"px"}})),N=(0,o.EW)((()=>!0!==e.disable&&(void 0!==e.href||void 0!==e.to&&null!==e.to&&""!==e.to))),A=(0,o.EW)((()=>{const t={};return w.forEach((i=>{t[i]=e[i]})),t})),O=(0,o.EW)((()=>!0===N.value||!0!==e.expandIconToggle)),P=(0,o.EW)((()=>void 0!==e.expandedIcon&&!0===C.value?e.expandedIcon:e.expandIcon||d.iconSet.expansionItem[!0===e.denseToggle?"denseIcon":"icon"])),M=(0,o.EW)((()=>!0!==e.disable&&(!0===N.value||!0===e.expandIconToggle))),F=(0,o.EW)((()=>({expanded:!0===C.value,detailsId:k.value,toggle:L,show:x,hide:E}))),B=(0,o.EW)((()=>{const t=void 0!==e.toggleAriaLabel?e.toggleAriaLabel:d.lang.label[!0===C.value?"collapse":"expand"](e.label);return{role:"button","aria-expanded":!0===C.value?"true":"false","aria-controls":k.value,"aria-label":t}}));function W(e){!0!==N.value&&L(e),i("click",e)}function H(e){13===e.keyCode&&V(e,!0)}function V(e,t){!0!==t&&null!==S.value&&S.value.focus(),L(e),(0,_.Gu)(e)}function j(){i("afterShow")}function z(){i("afterHide")}function U(){void 0===T&&(T=(0,b.A)()),!0===C.value&&(y[e.group]=T);const t=(0,o.wB)(C,(t=>{!0===t?y[e.group]=T:y[e.group]===T&&delete y[e.group]})),i=(0,o.wB)((()=>y[e.group]),((e,t)=>{t===T&&void 0!==e&&e!==T&&E()}));I=()=>{t(),i(),y[e.group]===T&&delete y[e.group],I=void 0}}function $(){const t={class:["q-focusable relative-position cursor-pointer"+(!0===e.denseToggle&&!0===e.switchToggleSide?" items-end":""),e.expandIconClass],side:!0!==e.switchToggleSide,avatar:e.switchToggleSide},i=[(0,o.h)(c.A,{class:"q-expansion-item__toggle-icon"+(void 0===e.expandedIcon&&!0===C.value?" q-expansion-item__toggle-icon--rotated":""),name:P.value})];return!0===M.value&&(Object.assign(t,{tabindex:0,...B.value,onClick:V,onKeyup:H}),i.unshift((0,o.h)("div",{ref:S,class:"q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded",tabindex:-1}))),(0,o.h)(a.A,t,(()=>i))}function q(){let i;return void 0!==t.header?i=[].concat(t.header(F.value)):(i=[(0,o.h)(a.A,(()=>[(0,o.h)(l.A,{lines:e.labelLines},(()=>e.label||"")),e.caption?(0,o.h)(l.A,{lines:e.captionLines,caption:!0},(()=>e.caption)):null]))],e.icon&&i[!0===e.switchToggleSide?"push":"unshift"]((0,o.h)(a.A,{side:!0===e.switchToggleSide,avatar:!0!==e.switchToggleSide},(()=>(0,o.h)(c.A,{name:e.icon}))))),!0!==e.disable&&!0!==e.hideExpandIcon&&i[!0===e.switchToggleSide?"unshift":"push"]($()),i}function K(){const t={ref:"item",style:e.headerStyle,class:e.headerClass,dark:f.value,disable:e.disable,dense:e.dense,insetLevel:e.headerInsetLevel};return!0===O.value&&(t.clickable=!0,t.onClick=W,Object.assign(t,!0===N.value?A.value:B.value)),(0,o.h)(r.A,t,q)}function G(){return(0,o.bo)((0,o.h)("div",{key:"e-content",class:"q-expansion-item__content relative-position",style:D.value,id:k.value},(0,v.zm)(t.default)),[[s.aG,C.value]])}function Q(){const t=[K(),(0,o.h)(u,{duration:e.duration,onShow:j,onHide:z},G)];return!0===e.expandSeparator&&t.push((0,o.h)(h.A,{class:"q-expansion-item__border q-expansion-item__border--top absolute-top",dark:f.value}),(0,o.h)(h.A,{class:"q-expansion-item__border q-expansion-item__border--bottom absolute-bottom",dark:f.value})),t}return(0,o.wB)((()=>e.group),(e=>{void 0!==I&&I(),void 0!==e&&U()})),void 0!==e.group&&U(),(0,o.xo)((()=>{void 0!==I&&I()})),()=>(0,o.h)("div",{class:R.value},[(0,o.h)("div",{class:"q-expansion-item__container relative-position"},Q())])}})},49200:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});i(10239);var n=i(61758),o=i(38734),s=i(29467),r=i(22500),a=i(98983),l=i(65139),c=i(27973),d=i(15157);const u=(0,s.a0)({name:"QForm",props:{autofocus:Boolean,noErrorFocus:Boolean,noResetFocus:Boolean,greedy:Boolean,onSubmit:Function},emits:["reset","validationSuccess","validationError"],setup(e,{slots:t,emit:i}){const s=(0,n.nI)(),u=(0,o.KR)(null);let h=0;const g=[];function p(t){const n="boolean"===typeof t?t:!0!==e.noErrorFocus,o=++h,s=(e,t)=>{i("validation"+(!0===e?"Success":"Error"),t)},r=e=>{const t=e.validate();return"function"===typeof t.then?t.then((t=>({valid:t,comp:e})),(t=>({valid:!1,comp:e,err:t}))):Promise.resolve({valid:t,comp:e})},a=!0===e.greedy?Promise.all(g.map(r)).then((e=>e.filter((e=>!0!==e.valid)))):g.reduce(((e,t)=>e.then((()=>r(t).then((e=>{if(!1===e.valid)return Promise.reject(e)}))))),Promise.resolve()).catch((e=>[e]));return a.then((e=>{if(void 0===e||0===e.length)return o===h&&s(!0),!0;if(o===h){const{comp:t,err:i}=e[0];if(void 0!==i&&console.error(i),s(!1,t),!0===n){const t=e.find((({comp:e})=>"function"===typeof e.focus&&!1===(0,d.rU)(e.$)));void 0!==t&&t.comp.focus()}}return!1}))}function f(){h++,g.forEach((e=>{"function"===typeof e.resetValidation&&e.resetValidation()}))}function m(t){void 0!==t&&(0,r.Gu)(t);const n=h+1;p().then((o=>{n===h&&!0===o&&(void 0!==e.onSubmit?i("submit",t):void 0!==t&&void 0!==t.target&&"function"===typeof t.target.submit&&t.target.submit())}))}function _(t){void 0!==t&&(0,r.Gu)(t),i("reset"),(0,n.dY)((()=>{f(),!0===e.autofocus&&!0!==e.noResetFocus&&v()}))}function v(){(0,a.Gy)((()=>{if(null===u.value)return;const e=u.value.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||u.value.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||u.value.querySelector("[autofocus], [data-autofocus]")||Array.prototype.find.call(u.value.querySelectorAll("[tabindex]"),(e=>-1!==e.tabIndex));null!==e&&void 0!==e&&e.focus({preventScroll:!0})}))}(0,n.Gt)(c.q3,{bindComponent(e){g.push(e)},unbindComponent(e){const t=g.indexOf(e);-1!==t&&g.splice(t,1)}});let b=!1;return(0,n.Y4)((()=>{b=!0})),(0,n.n)((()=>{!0===b&&!0===e.autofocus&&v()})),(0,n.sV)((()=>{!0===e.autofocus&&v()})),Object.assign(s.proxy,{validate:p,resetValidation:f,submit:m,reset:_,focus:v,getValidationComponents:()=>g}),()=>(0,n.h)("form",{class:"q-form",ref:u,onSubmit:m,onReset:_},(0,l.zm)(t.default))}})},8416:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});i(10239);var n=i(61758),o=i(38734),s=i(1096),r=i(29467),a=i(65139),l=i(27973);const c=(0,r.a0)({name:"QHeader",props:{modelValue:{type:Boolean,default:!0},reveal:Boolean,revealOffset:{type:Number,default:250},bordered:Boolean,elevated:Boolean,heightHint:{type:[String,Number],default:50}},emits:["reveal","focusin"],setup(e,{slots:t,emit:i}){const{proxy:{$q:r}}=(0,n.nI)(),c=(0,n.WQ)(l.ON,l.U_);if(c===l.U_)return console.error("QHeader needs to be child of QLayout"),l.U_;const d=(0,o.KR)(parseInt(e.heightHint,10)),u=(0,o.KR)(!0),h=(0,n.EW)((()=>!0===e.reveal||-1!==c.view.value.indexOf("H")||r.platform.is.ios&&!0===c.isContainer.value)),g=(0,n.EW)((()=>{if(!0!==e.modelValue)return 0;if(!0===h.value)return!0===u.value?d.value:0;const t=d.value-c.scroll.value.position;return t>0?t:0})),p=(0,n.EW)((()=>!0!==e.modelValue||!0===h.value&&!0!==u.value)),f=(0,n.EW)((()=>!0===e.modelValue&&!0===p.value&&!0===e.reveal)),m=(0,n.EW)((()=>"q-header q-layout__section--marginal "+(!0===h.value?"fixed":"absolute")+"-top"+(!0===e.bordered?" q-header--bordered":"")+(!0===p.value?" q-header--hidden":"")+(!0!==e.modelValue?" q-layout--prevent-focus":""))),_=(0,n.EW)((()=>{const e=c.rows.value.top,t={};return"l"===e[0]&&!0===c.left.space&&(t[!0===r.lang.rtl?"right":"left"]=`${c.left.size}px`),"r"===e[2]&&!0===c.right.space&&(t[!0===r.lang.rtl?"left":"right"]=`${c.right.size}px`),t}));function v(e,t){c.update("header",e,t)}function b(e,t){e.value!==t&&(e.value=t)}function y({height:e}){b(d,e),v("size",e)}function w(e){!0===f.value&&b(u,!0),i("focusin",e)}(0,n.wB)((()=>e.modelValue),(e=>{v("space",e),b(u,!0),c.animate()})),(0,n.wB)(g,(e=>{v("offset",e)})),(0,n.wB)((()=>e.reveal),(t=>{!1===t&&b(u,e.modelValue)})),(0,n.wB)(u,(e=>{c.animate(),i("reveal",e)})),(0,n.wB)(c.scroll,(t=>{!0===e.reveal&&b(u,"up"===t.direction||t.position<=e.revealOffset||t.position-t.inflectionPoint<100)}));const C={};return c.instances.header=C,!0===e.modelValue&&v("size",d.value),v("space",e.modelValue),v("offset",g.value),(0,n.xo)((()=>{c.instances.header===C&&(c.instances.header=void 0,v("size",0),v("offset",0),v("space",!1))})),()=>{const i=(0,a.Ij)(t.default,[]);return!0===e.elevated&&i.push((0,n.h)("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),i.push((0,n.h)(s.A,{debounce:0,onResize:y})),(0,n.h)("header",{class:m.value,style:_.value,onFocusin:w},i)}}})},50492:(e,t,i)=>{"use strict";i.d(t,{A:()=>w});var n=i(61758),o=i(61906),s=i(29467),r=i(65139);const a="0 0 24 24",l=e=>e,c=e=>`ionicons ${e}`,d={"mdi-":e=>`mdi ${e}`,"icon-":l,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":c,"ion-ios":c,"ion-logo":c,"iconfont ":l,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},u={o_:"-outlined",r_:"-round",s_:"-sharp"},h={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},g=new RegExp("^("+Object.keys(d).join("|")+")"),p=new RegExp("^("+Object.keys(u).join("|")+")"),f=new RegExp("^("+Object.keys(h).join("|")+")"),m=/^[Mm]\s?[-+]?\.?\d/,_=/^img:/,v=/^svguse:/,b=/^ion-/,y=/^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,w=(0,s.a0)({name:"QIcon",props:{...o.x_,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),s=(0,o.Ay)(e),l=(0,n.EW)((()=>"q-icon"+(!0===e.left?" on-left":"")+(!0===e.right?" on-right":"")+(void 0!==e.color?` text-${e.color}`:""))),c=(0,n.EW)((()=>{let t,o=e.name;if("none"===o||!o)return{none:!0};if(null!==i.iconMapFn){const e=i.iconMapFn(o);if(void 0!==e){if(void 0===e.icon)return{cls:e.cls,content:void 0!==e.content?e.content:" "};if(o=e.icon,"none"===o||!o)return{none:!0}}}if(!0===m.test(o)){const[e,t=a]=o.split("|");return{svg:!0,viewBox:t,nodes:e.split("&&").map((e=>{const[t,i,o]=e.split("@@");return(0,n.h)("path",{style:i,d:t,transform:o})}))}}if(!0===_.test(o))return{img:!0,src:o.substring(4)};if(!0===v.test(o)){const[e,t=a]=o.split("|");return{svguse:!0,src:e.substring(7),viewBox:t}}let s=" ";const r=o.match(g);if(null!==r)t=d[r[1]](o);else if(!0===y.test(o))t=o;else if(!0===b.test(o))t=`ionicons ion-${!0===i.platform.is.ios?"ios":"md"}${o.substring(3)}`;else if(!0===f.test(o)){t="notranslate material-symbols";const e=o.match(f);null!==e&&(o=o.substring(6),t+=h[e[1]]),s=o}else{t="notranslate material-icons";const e=o.match(p);null!==e&&(o=o.substring(2),t+=u[e[1]]),s=o}return{cls:t,content:s}}));return()=>{const i={class:l.value,style:s.value,"aria-hidden":"true",role:"presentation"};return!0===c.value.none?(0,n.h)(e.tag,i,(0,r.zm)(t.default)):!0===c.value.img?(0,n.h)(e.tag,i,(0,r.Hp)(t.default,[(0,n.h)("img",{src:c.value.src})])):!0===c.value.svg?(0,n.h)(e.tag,i,(0,r.Hp)(t.default,[(0,n.h)("svg",{viewBox:c.value.viewBox||"0 0 24 24"},c.value.nodes)])):!0===c.value.svguse?(0,n.h)(e.tag,i,(0,r.Hp)(t.default,[(0,n.h)("svg",{viewBox:c.value.viewBox},[(0,n.h)("use",{"xlink:href":c.value.src})])])):(void 0!==c.value.cls&&(i.class+=" "+c.value.cls),(0,n.h)(e.tag,i,(0,r.Hp)(t.default,[c.value.content])))}}})},15046:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});i(10239);var n=i(38734),o=i(61758),s=i(29104),r=i(30564),a=i(41597);const l={ratio:[String,Number]};function c(e,t){return(0,o.EW)((()=>{const i=Number(e.ratio||(void 0!==t?t.value:void 0));return!0!==isNaN(i)&&i>0?{paddingBottom:100/i+"%"}:null}))}var d=i(29467),u=i(65139),h=i(15157),g=i(24667);const p=1.7778,f=(0,d.a0)({name:"QImg",props:{...l,src:String,srcset:String,sizes:String,alt:String,crossorigin:String,decoding:String,referrerpolicy:String,draggable:Boolean,loading:{type:String,default:"lazy"},loadingShowDelay:{type:[Number,String],default:0},fetchpriority:{type:String,default:"auto"},width:String,height:String,initialRatio:{type:[Number,String],default:p},placeholderSrc:String,errorSrc:String,fit:{type:String,default:"cover"},position:{type:String,default:"50% 50%"},imgClass:String,imgStyle:Object,noSpinner:Boolean,noNativeMenu:Boolean,noTransition:Boolean,spinnerColor:String,spinnerSize:String},emits:["load","error"],setup(e,{slots:t,emit:i}){const l=(0,n.KR)(e.initialRatio),d=c(e,l),p=(0,o.nI)(),{registerTimeout:f,removeTimeout:m}=(0,g.A)(),{registerTimeout:_,removeTimeout:v}=(0,g.A)(),b=(0,o.EW)((()=>void 0!==e.placeholderSrc?{src:e.placeholderSrc}:null)),y=(0,o.EW)((()=>void 0!==e.errorSrc?{src:e.errorSrc,__qerror:!0}:null)),w=[(0,n.KR)(null),(0,n.KR)(b.value)],C=(0,n.KR)(0),S=(0,n.KR)(!1),k=(0,n.KR)(!1),x=(0,o.EW)((()=>`q-img q-img--${!0===e.noNativeMenu?"no-":""}menu`)),E=(0,o.EW)((()=>({width:e.width,height:e.height}))),L=(0,o.EW)((()=>"q-img__image "+(void 0!==e.imgClass?e.imgClass+" ":"")+`q-img__image--with${!0===e.noTransition?"out":""}-transition q-img__image--`)),T=(0,o.EW)((()=>({...e.imgStyle,objectFit:e.fit,objectPosition:e.position})));function I(){v(),0!==e.loadingShowDelay?_((()=>{S.value=!0}),e.loadingShowDelay):S.value=!0}function R(){v(),S.value=!1}function D({target:e}){!1===(0,h.rU)(p)&&(m(),l.value=0===e.naturalHeight?.5:e.naturalWidth/e.naturalHeight,N(e,1))}function N(e,t){1e3!==t&&!0!==(0,h.rU)(p)&&(!0===e.complete?A(e):f((()=>{N(e,t+1)}),50))}function A(e){!0!==(0,h.rU)(p)&&(C.value=1^C.value,w[C.value].value=null,R(),"true"!==e.getAttribute("__qerror")&&(k.value=!1),i("load",e.currentSrc||e.src))}function O(e){m(),R(),k.value=!0,w[C.value].value=y.value,w[1^C.value].value=b.value,i("error",e)}function P(t){const i=w[t].value,n={key:"img_"+t,class:L.value,style:T.value,alt:e.alt,crossorigin:e.crossorigin,decoding:e.decoding,referrerpolicy:e.referrerpolicy,height:e.height,width:e.width,loading:e.loading,fetchpriority:e.fetchpriority,"aria-hidden":"true",draggable:e.draggable,...i};return C.value===t?Object.assign(n,{class:n.class+"current",onLoad:D,onError:O}):n.class+="loaded",(0,o.h)("div",{class:"q-img__container absolute-full",key:"img"+t},(0,o.h)("img",n))}function M(){return!1===S.value?(0,o.h)("div",{key:"content",class:"q-img__content absolute-full q-anchor--skip"},(0,u.zm)(t[!0===k.value?"error":"default"])):(0,o.h)("div",{key:"loading",class:"q-img__loading absolute-full flex flex-center"},void 0!==t.loading?t.loading():!0===e.noSpinner?void 0:[(0,o.h)(r.A,{color:e.spinnerColor,size:e.spinnerSize})])}{function F(){(0,o.wB)((()=>e.src||e.srcset||e.sizes?{src:e.src,srcset:e.srcset,sizes:e.sizes}:null),(e=>{m(),k.value=!1,null===e?(R(),w[1^C.value].value=b.value):I(),w[C.value].value=e}),{immediate:!0})}!0===a.ot.value?(0,o.sV)(F):F()}return()=>{const t=[];return null!==d.value&&t.push((0,o.h)("div",{key:"filler",style:d.value})),null!==w[0].value&&t.push(P(0)),null!==w[1].value&&t.push(P(1)),t.push((0,o.h)(s.eB,{name:"q-transition--fade"},M)),(0,o.h)("div",{key:"main",class:x.value,style:E.value,role:"img","aria-label":e.alt},t)}}})},39270:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(61758),o=i(38734),s=i(7617),r=(i(10239),i(2906));const a={date:"####/##/##",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"},l={"#":{pattern:"[\\d]",negate:"[^\\d]"},S:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]"},N:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]"},A:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleUpperCase()},a:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleLowerCase()},X:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleUpperCase()},x:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleLowerCase()}},c=Object.keys(l);c.forEach((e=>{l[e].regex=new RegExp(l[e].pattern)}));const d=new RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+c.join("")+"])|(.)","g"),u=/[.*+?^${}()|[\]\\]/g,h=String.fromCharCode(1),g={mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean};function p(e,t,i,s){let c,g,p,f,m,_;const v=(0,o.KR)(null),b=(0,o.KR)(w());function y(){return!0===e.autogrow||["textarea","text","search","url","tel","password"].includes(e.type)}function w(){if(S(),!0===v.value){const t=I(D(e.modelValue));return!1!==e.fillMask?N(t):t}return e.modelValue}function C(e){if(e0;n--)t+=h;i=i.slice(0,n)+t+i.slice(n)}return i}function S(){if(v.value=void 0!==e.mask&&0!==e.mask.length&&y(),!1===v.value)return f=void 0,c="",void(g="");const t=void 0===a[e.mask]?e.mask:a[e.mask],i="string"===typeof e.fillMask&&0!==e.fillMask.length?e.fillMask.slice(0,1):"_",n=i.replace(u,"\\$&"),o=[],s=[],r=[];let m=!0===e.reverseFillMask,_="",b="";t.replace(d,((e,t,i,n,a)=>{if(void 0!==n){const e=l[n];r.push(e),b=e.negate,!0===m&&(s.push("(?:"+b+"+)?("+e.pattern+"+)?(?:"+b+"+)?("+e.pattern+"+)?"),m=!1),s.push("(?:"+b+"+)?("+e.pattern+")?")}else if(void 0!==i)_="\\"+("\\"===i?"":i),r.push(i),o.push("([^"+_+"]+)?"+_+"?");else{const e=void 0!==t?t:a;_="\\"===e?"\\\\\\\\":e.replace(u,"\\\\$&"),r.push(e),o.push("([^"+_+"]+)?"+_+"?")}}));const w=new RegExp("^"+o.join("")+"("+(""===_?".":"[^"+_+"]")+"+)?"+(""===_?"":"["+_+"]*")+"$"),C=s.length-1,S=s.map(((t,i)=>0===i&&!0===e.reverseFillMask?new RegExp("^"+n+"*"+t):i===C?new RegExp("^"+t+"("+(""===b?".":b)+"+)?"+(!0===e.reverseFillMask?"$":n+"*")):new RegExp("^"+t)));p=r,f=t=>{const i=w.exec(!0===e.reverseFillMask?t:t.slice(0,r.length+1));null!==i&&(t=i.slice(1).join(""));const n=[],o=S.length;for(let e=0,s=t;e"string"===typeof e?e:h)).join(""),g=c.split(h).join(i)}function k(t,o,r){const a=s.value,l=a.selectionEnd,d=a.value.length-l,u=D(t);!0===o&&S();const p=I(u),f=!1!==e.fillMask?N(p):p,_=b.value!==f;a.value!==f&&(a.value=f),!0===_&&(b.value=f),document.activeElement===a&&(0,n.dY)((()=>{if(f!==g)if("insertFromPaste"!==r||!0===e.reverseFillMask)if(-1===["deleteContentBackward","deleteContentForward"].indexOf(r))if(!0===e.reverseFillMask)if(!0===_){const e=Math.max(0,f.length-(f===g?0:Math.min(p.length,d+1)));1===e&&1===l?a.setSelectionRange(e,e,"forward"):E.rightReverse(a,e)}else{const e=f.length-d;a.setSelectionRange(e,e,"backward")}else if(!0===_){const e=Math.max(0,c.indexOf(h),Math.min(p.length,l)-1);E.right(a,e)}else{const e=l-1;E.right(a,e)}else{const t=!0===e.reverseFillMask?0===l?f.length>p.length?1:0:Math.max(0,f.length-(f===g?0:Math.min(p.length,d)+1))+1:l;a.setSelectionRange(t,t,"forward")}else{const e=a.selectionEnd;let t=l-1;for(let i=m;i<=t&&ie.type+e.autogrow),S),(0,n.wB)((()=>e.mask),(i=>{if(void 0!==i)k(b.value,!0);else{const i=D(b.value);S(),e.modelValue!==i&&t("update:modelValue",i)}})),(0,n.wB)((()=>e.fillMask+e.reverseFillMask),(()=>{!0===v.value&&k(b.value,!0)})),(0,n.wB)((()=>e.unmaskedValue),(()=>{!0===v.value&&k(b.value)}));const E={left(e,t){const i=-1===c.slice(t-1).indexOf(h);let n=Math.max(0,t-1);for(;n>=0;n--)if(c[n]===h){t=n,!0===i&&t++;break}if(n<0&&void 0!==c[t]&&c[t]!==h)return E.right(e,0);t>=0&&e.setSelectionRange(t,t,"backward")},right(e,t){const i=e.value.length;let n=Math.min(i,t+1);for(;n<=i;n++){if(c[n]===h){t=n;break}c[n-1]===h&&(t=n)}if(n>i&&void 0!==c[t-1]&&c[t-1]!==h)return E.left(e,i);e.setSelectionRange(t,t,"forward")},leftReverse(e,t){const i=C(e.value.length);let n=Math.max(0,t-1);for(;n>=0;n--){if(i[n-1]===h){t=n;break}if(i[n]===h&&(t=n,0===n))break}if(n<0&&void 0!==i[t]&&i[t]!==h)return E.rightReverse(e,0);t>=0&&e.setSelectionRange(t,t,"backward")},rightReverse(e,t){const i=e.value.length,n=C(i),o=-1===n.slice(0,t+1).indexOf(h);let s=Math.min(i,t+1);for(;s<=i;s++)if(n[s-1]===h){t=s,t>0&&!0===o&&t--;break}if(s>i&&void 0!==n[t-1]&&n[t-1]!==h)return E.leftReverse(e,i);e.setSelectionRange(t,t,"forward")}};function L(e){t("click",e),_=void 0}function T(i){if(t("keydown",i),!0===(0,r.JL)(i)||!0===i.altKey)return;const n=s.value,o=n.selectionStart,a=n.selectionEnd;if(i.shiftKey||(_=void 0),37===i.keyCode||39===i.keyCode){i.shiftKey&&void 0===_&&(_="forward"===n.selectionDirection?o:a);const t=E[(39===i.keyCode?"right":"left")+(!0===e.reverseFillMask?"Reverse":"")];if(i.preventDefault(),t(n,_===o?a:o),i.shiftKey){const e=n.selectionStart;n.setSelectionRange(Math.min(_,e),Math.max(_,e),"forward")}}else 8===i.keyCode&&!0!==e.reverseFillMask&&o===a?(E.left(n,o),n.setSelectionRange(n.selectionStart,a,"backward")):46===i.keyCode&&!0===e.reverseFillMask&&o===a&&(E.rightReverse(n,a),n.setSelectionRange(o,n.selectionEnd,"forward"))}function I(t){if(void 0===t||null===t||""===t)return"";if(!0===e.reverseFillMask)return R(t);const i=p;let n=0,o="";for(let e=0;e=0&&-1!==n;s--){const r=t[s];let a=e[n];if("string"===typeof r)o=r+o,a===r&&n--;else{if(void 0===a||!r.regex.test(a))return o;do{o=(void 0!==r.transform?r.transform(a):a)+o,n--,a=e[n]}while(i===s&&void 0!==a&&r.regex.test(a))}}return o}function D(e){return"string"!==typeof e||void 0===f?"number"===typeof e?f(""+e):e:f(e)}function N(t){return g.length-t.length<=0?t:!0===e.reverseFillMask&&0!==t.length?g.slice(0,-t.length)+t:t+g.slice(t.length)}return{innerValue:b,hasMask:v,moveCursorForPaste:x,updateMaskValue:k,onMaskedKeydown:T,onMaskedClick:L}}var f=i(52510);function m(e,t){function i(){const t=e.modelValue;try{const e="DataTransfer"in window?new DataTransfer:"ClipboardEvent"in window?new ClipboardEvent("").clipboardData:void 0;return Object(t)===t&&("length"in t?Array.from(t):[t]).forEach((t=>{e.items.add(t)})),{files:e.files}}catch(i){return{files:void 0}}}return!0===t?(0,n.EW)((()=>{if("file"===e.type)return i()})):(0,n.EW)(i)}var _=i(32342),v=i(29467),b=i(22500),y=i(98983),w=i(82453);const C=(0,v.a0)({name:"QInput",inheritAttrs:!1,props:{...s.OJ,...g,...f.Sc,modelValue:[String,Number,FileList],shadowText:String,type:{type:String,default:"text"},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},emits:[...s.mU,"paste","change","keydown","click","animationend"],setup(e,{emit:t,attrs:i}){const{proxy:r}=(0,n.nI)(),{$q:a}=r,l={};let c,d,u,h=NaN,g=null;const v=(0,o.KR)(null),C=(0,f.M4)(e),{innerValue:S,hasMask:k,moveCursorForPaste:x,updateMaskValue:E,onMaskedKeydown:L,onMaskedClick:T}=p(e,t,j,v),I=m(e,!0),R=(0,n.EW)((()=>(0,s.o9)(S.value))),D=(0,_.A)(H),N=(0,s.$7)({changeEvent:!0}),A=(0,n.EW)((()=>"textarea"===e.type||!0===e.autogrow)),O=(0,n.EW)((()=>!0===A.value||["text","search","url","tel","password"].includes(e.type))),P=(0,n.EW)((()=>{const t={...N.splitAttrs.listeners.value,onInput:H,onPaste:W,onChange:U,onBlur:$,onFocus:b.ds};return t.onCompositionstart=t.onCompositionupdate=t.onCompositionend=D,!0===k.value&&(t.onKeydown=L,t.onClick=T),!0===e.autogrow&&(t.onAnimationend=V),t})),M=(0,n.EW)((()=>{const t={tabindex:0,"data-autofocus":!0===e.autofocus||void 0,rows:"textarea"===e.type?6:void 0,"aria-label":e.label,name:C.value,...N.splitAttrs.attributes.value,id:N.targetUid.value,maxlength:e.maxlength,disabled:!0===e.disable,readonly:!0===e.readonly};return!1===A.value&&(t.type=e.type),!0===e.autogrow&&(t.rows=1),t}));function F(){(0,y.Gy)((()=>{const e=document.activeElement;null===v.value||v.value===e||null!==e&&e.id===N.targetUid.value||v.value.focus({preventScroll:!0})}))}function B(){null!==v.value&&v.value.select()}function W(i){if(!0===k.value&&!0!==e.reverseFillMask){const e=i.target;x(e,e.selectionStart,e.selectionEnd)}t("paste",i)}function H(i){if(!i||!i.target)return;if("file"===e.type)return void t("update:modelValue",i.target.files);const o=i.target.value;if(!0!==i.target.qComposing){if(!0===k.value)E(o,!1,i.inputType);else if(j(o),!0===O.value&&i.target===document.activeElement){const{selectionStart:e,selectionEnd:t}=i.target;void 0!==e&&void 0!==t&&(0,n.dY)((()=>{i.target===document.activeElement&&0===o.indexOf(i.target.value)&&i.target.setSelectionRange(e,t)}))}!0===e.autogrow&&z()}else l.value=o}function V(e){t("animationend",e),z()}function j(i,o){u=()=>{g=null,"number"!==e.type&&!0===l.hasOwnProperty("value")&&delete l.value,e.modelValue!==i&&h!==i&&(h=i,!0===o&&(d=!0),t("update:modelValue",i),(0,n.dY)((()=>{h===i&&(h=NaN)}))),u=void 0},"number"===e.type&&(c=!0,l.value=i),void 0!==e.debounce?(null!==g&&clearTimeout(g),l.value=i,g=setTimeout(u,e.debounce)):u()}function z(){requestAnimationFrame((()=>{const e=v.value;if(null!==e){const t=e.parentNode.style,{scrollTop:i}=e,{overflowY:n,maxHeight:o}=!0===a.platform.is.firefox?{}:window.getComputedStyle(e),s=void 0!==n&&"scroll"!==n;!0===s&&(e.style.overflowY="hidden"),t.marginBottom=e.scrollHeight-1+"px",e.style.height="1px",e.style.height=e.scrollHeight+"px",!0===s&&(e.style.overflowY=parseInt(o,10){null!==v.value&&(v.value.value=void 0!==S.value?S.value:"")}))}function q(){return!0===l.hasOwnProperty("value")?l.value:void 0!==S.value?S.value:""}(0,n.wB)((()=>e.type),(()=>{v.value&&(v.value.value=e.modelValue)})),(0,n.wB)((()=>e.modelValue),(t=>{if(!0===k.value){if(!0===d&&(d=!1,String(t)===h))return;E(t)}else S.value!==t&&(S.value=t,"number"===e.type&&!0===l.hasOwnProperty("value")&&(!0===c?c=!1:delete l.value));!0===e.autogrow&&(0,n.dY)(z)})),(0,n.wB)((()=>e.autogrow),(e=>{!0===e?(0,n.dY)(z):null!==v.value&&i.rows>0&&(v.value.style.height="auto")})),(0,n.wB)((()=>e.dense),(()=>{!0===e.autogrow&&(0,n.dY)(z)})),(0,n.xo)((()=>{$()})),(0,n.sV)((()=>{!0===e.autogrow&&z()})),Object.assign(N,{innerValue:S,fieldClass:(0,n.EW)((()=>"q-"+(!0===A.value?"textarea":"input")+(!0===e.autogrow?" q-textarea--autogrow":""))),hasShadow:(0,n.EW)((()=>"file"!==e.type&&"string"===typeof e.shadowText&&0!==e.shadowText.length)),inputRef:v,emitValue:j,hasValue:R,floatingLabel:(0,n.EW)((()=>!0===R.value&&("number"!==e.type||!1===isNaN(S.value))||(0,s.o9)(e.displayValue))),getControl:()=>(0,n.h)(!0===A.value?"textarea":"input",{ref:v,class:["q-field__native q-placeholder",e.inputClass],style:e.inputStyle,...M.value,...P.value,..."file"!==e.type?{value:q()}:I.value}),getShadowControl:()=>(0,n.h)("div",{class:"q-field__native q-field__shadow absolute-bottom no-pointer-events"+(!0===A.value?"":" text-no-wrap")},[(0,n.h)("span",{class:"invisible"},q()),(0,n.h)("span",e.shadowText)])});const K=(0,s.Ay)(N);return Object.assign(r,{focus:F,select:B,getNativeElement:()=>v.value}),(0,w.$)(r,"nativeEl",(()=>v.value)),K}})},90124:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});i(42958);var n=i(61758),o=i(38734),s=i(16372),r=i(47502),a=i(29467),l=i(65139),c=i(22500),d=i(2906);const u=(0,a.a0)({name:"QItem",props:{...s.C,...r.Ji,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:t,emit:i}){const{proxy:{$q:a}}=(0,n.nI)(),u=(0,s.A)(e,a),{hasLink:h,linkAttrs:g,linkClass:p,linkTag:f,navigateOnClick:m}=(0,r.Ay)(),_=(0,o.KR)(null),v=(0,o.KR)(null),b=(0,n.EW)((()=>!0===e.clickable||!0===h.value||"label"===e.tag)),y=(0,n.EW)((()=>!0!==e.disable&&!0===b.value)),w=(0,n.EW)((()=>"q-item q-item-type row no-wrap"+(!0===e.dense?" q-item--dense":"")+(!0===u.value?" q-item--dark":"")+(!0===h.value&&null===e.active?p.value:!0===e.active?" q-item--active"+(void 0!==e.activeClass?` ${e.activeClass}`:""):"")+(!0===e.disable?" disabled":"")+(!0===y.value?" q-item--clickable q-link cursor-pointer "+(!0===e.manualFocus?"q-manual-focusable":"q-focusable q-hoverable")+(!0===e.focused?" q-manual-focusable--focused":""):""))),C=(0,n.EW)((()=>{if(void 0===e.insetLevel)return null;const t=!0===a.lang.rtl?"Right":"Left";return{["padding"+t]:16+56*e.insetLevel+"px"}}));function S(e){!0===y.value&&(null!==v.value&&(!0!==e.qKeyEvent&&document.activeElement===_.value?v.value.focus():document.activeElement===v.value&&_.value.focus()),m(e))}function k(e){if(!0===y.value&&!0===(0,d.Dv)(e,[13,32])){(0,c.Gu)(e),e.qKeyEvent=!0;const t=new MouseEvent("click",e);t.qKeyEvent=!0,_.value.dispatchEvent(t)}i("keyup",e)}function x(){const e=(0,l.Ij)(t.default,[]);return!0===y.value&&e.unshift((0,n.h)("div",{class:"q-focus-helper",tabindex:-1,ref:v})),e}return()=>{const t={ref:_,class:w.value,style:C.value,role:"listitem",onClick:S,onKeyup:k};return!0===y.value?(t.tabindex=e.tabindex||"0",Object.assign(t,g.value)):!0===b.value&&(t["aria-disabled"]="true"),(0,n.h)(f.value,t,x())}}})},13796:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:t}){const i=(0,n.EW)((()=>parseInt(e.lines,10))),o=(0,n.EW)((()=>"q-item__label"+(!0===e.overline?" q-item__label--overline text-overline":"")+(!0===e.caption?" q-item__label--caption text-caption":"")+(!0===e.header?" q-item__label--header":"")+(1===i.value?" ellipsis":""))),r=(0,n.EW)((()=>void 0!==e.lines&&i.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":i.value}:null));return()=>(0,n.h)("div",{style:r.value,class:o.value},(0,s.zm)(t.default))}})},25173:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-item__section column q-item__section--"+(!0===e.avatar||!0===e.side||!0===e.thumbnail?"side":"main")+(!0===e.top?" q-item__section--top justify-start":" justify-center")+(!0===e.avatar?" q-item__section--avatar":"")+(!0===e.thumbnail?" q-item__section--thumbnail":"")+(!0===e.noWrap?" q-item__section--nowrap":"")));return()=>(0,n.h)("div",{class:i.value},(0,s.zm)(t.default))}})},53999:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(29467),s=i(16372),r=i(65139);const a=["ul","ol"],l=(0,o.a0)({name:"QList",props:{...s.C,bordered:Boolean,dense:Boolean,separator:Boolean,padding:Boolean,tag:{type:String,default:"div"}},setup(e,{slots:t}){const i=(0,n.nI)(),o=(0,s.A)(e,i.proxy.$q),l=(0,n.EW)((()=>a.includes(e.tag)?null:"list")),c=(0,n.EW)((()=>"q-list"+(!0===e.bordered?" q-list--bordered":"")+(!0===e.dense?" q-list--dense":"")+(!0===e.separator?" q-list--separator":"")+(!0===o.value?" q-list--dark":"")+(!0===e.padding?" q-list--padding":"")));return()=>(0,n.h)(e.tag,{class:c.value,role:l.value},(0,r.zm)(t.default))}})},62008:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(61758),o=i(38734),s=i(41597),r=i(93163),a=i(1096),l=i(29467),c=i(38336),d=i(65139),u=i(27973);const h=(0,l.a0)({name:"QLayout",props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:e=>/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(e.toLowerCase())},onScroll:Function,onScrollHeight:Function,onResize:Function},setup(e,{slots:t,emit:i}){const{proxy:{$q:l}}=(0,n.nI)(),h=(0,o.KR)(null),g=(0,o.KR)(l.screen.height),p=(0,o.KR)(!0===e.container?0:l.screen.width),f=(0,o.KR)({position:0,direction:"down",inflectionPoint:0}),m=(0,o.KR)(0),_=(0,o.KR)(!0===s.ot.value?0:(0,c.XJ)()),v=(0,n.EW)((()=>"q-layout q-layout--"+(!0===e.container?"containerized":"standard"))),b=(0,n.EW)((()=>!1===e.container?{minHeight:l.screen.height+"px"}:null)),y=(0,n.EW)((()=>0!==_.value?{[!0===l.lang.rtl?"left":"right"]:`${_.value}px`}:null)),w=(0,n.EW)((()=>0!==_.value?{[!0===l.lang.rtl?"right":"left"]:0,[!0===l.lang.rtl?"left":"right"]:`-${_.value}px`,width:`calc(100% + ${_.value}px)`}:null));function C(t){if(!0===e.container||!0!==document.qScrollPrevented){const n={position:t.position.top,direction:t.direction,directionChanged:t.directionChanged,inflectionPoint:t.inflectionPoint.top,delta:t.delta.top};f.value=n,void 0!==e.onScroll&&i("scroll",n)}}function S(t){const{height:n,width:o}=t;let s=!1;g.value!==n&&(s=!0,g.value=n,void 0!==e.onScrollHeight&&i("scrollHeight",n),x()),p.value!==o&&(s=!0,p.value=o),!0===s&&void 0!==e.onResize&&i("resize",t)}function k({height:e}){m.value!==e&&(m.value=e,x())}function x(){if(!0===e.container){const e=g.value>m.value?(0,c.XJ)():0;_.value!==e&&(_.value=e)}}let E=null;const L={instances:{},view:(0,n.EW)((()=>e.view)),isContainer:(0,n.EW)((()=>e.container)),rootRef:h,height:g,containerHeight:m,scrollbarWidth:_,totalWidth:(0,n.EW)((()=>p.value+_.value)),rows:(0,n.EW)((()=>{const t=e.view.toLowerCase().split(" ");return{top:t[0].split(""),middle:t[1].split(""),bottom:t[2].split("")}})),header:(0,o.Kh)({size:0,offset:0,space:!1}),right:(0,o.Kh)({size:300,offset:0,space:!1}),footer:(0,o.Kh)({size:0,offset:0,space:!1}),left:(0,o.Kh)({size:300,offset:0,space:!1}),scroll:f,animate(){null!==E?clearTimeout(E):document.body.classList.add("q-body--layout-animate"),E=setTimeout((()=>{E=null,document.body.classList.remove("q-body--layout-animate")}),155)},update(e,t,i){L[e][t]=i}};if((0,n.Gt)(u.ON,L),(0,c.XJ)()>0){let T=null;const I=document.body;function R(){T=null,I.classList.remove("hide-scrollbar")}function D(){if(null===T){if(I.scrollHeight>l.screen.height)return;I.classList.add("hide-scrollbar")}else clearTimeout(T);T=setTimeout(R,300)}function N(e){null!==T&&"remove"===e&&(clearTimeout(T),R()),window[`${e}EventListener`]("resize",D)}(0,n.wB)((()=>!0!==e.container?"add":"remove"),N),!0!==e.container&&N("add"),(0,n.hi)((()=>{N("remove")}))}return()=>{const i=(0,d.Hp)(t.default,[(0,n.h)(r.A,{onScroll:C}),(0,n.h)(a.A,{onResize:S})]),o=(0,n.h)("div",{class:v.value,style:b.value,ref:!0===e.container?void 0:h,tabindex:-1},i);return!0===e.container?(0,n.h)("div",{class:"q-layout-container overflow-hidden",ref:h},[(0,n.h)(a.A,{onResize:k}),(0,n.h)("div",{class:"absolute-full",style:y.value},[(0,n.h)("div",{class:"scroll",style:w.value},[o])])]):o}}})},35859:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});i(10239);var n=i(61758),o=i(16372),s=i(61906),r=i(29467),a=i(65139);const l={xs:2,sm:4,md:6,lg:10,xl:14};function c(e,t,i){return{transform:!0===t?`translateX(${!0===i.lang.rtl?"-":""}100%) scale3d(${-e},1,1)`:`scale3d(${e},1,1)`}}const d=(0,r.a0)({name:"QLinearProgress",props:{...o.C,...s.x_,value:{type:Number,default:0},buffer:Number,color:String,trackColor:String,reverse:Boolean,stripe:Boolean,indeterminate:Boolean,query:Boolean,rounded:Boolean,animationSpeed:{type:[String,Number],default:2100},instantFeedback:Boolean},setup(e,{slots:t}){const{proxy:i}=(0,n.nI)(),r=(0,o.A)(e,i.$q),d=(0,s.Ay)(e,l),u=(0,n.EW)((()=>!0===e.indeterminate||!0===e.query)),h=(0,n.EW)((()=>e.reverse!==e.query)),g=(0,n.EW)((()=>({...null!==d.value?d.value:{},"--q-linear-progress-speed":`${e.animationSpeed}ms`}))),p=(0,n.EW)((()=>"q-linear-progress"+(void 0!==e.color?` text-${e.color}`:"")+(!0===e.reverse||!0===e.query?" q-linear-progress--reverse":"")+(!0===e.rounded?" rounded-borders":""))),f=(0,n.EW)((()=>c(void 0!==e.buffer?e.buffer:1,h.value,i.$q))),m=(0,n.EW)((()=>`with${!0===e.instantFeedback?"out":""}-transition`)),_=(0,n.EW)((()=>`q-linear-progress__track absolute-full q-linear-progress__track--${m.value} q-linear-progress__track--`+(!0===r.value?"dark":"light")+(void 0!==e.trackColor?` bg-${e.trackColor}`:""))),v=(0,n.EW)((()=>c(!0===u.value?1:e.value,h.value,i.$q))),b=(0,n.EW)((()=>`q-linear-progress__model absolute-full q-linear-progress__model--${m.value} q-linear-progress__model--${!0===u.value?"in":""}determinate`)),y=(0,n.EW)((()=>({width:100*e.value+"%"}))),w=(0,n.EW)((()=>"q-linear-progress__stripe absolute-"+(!0===e.reverse?"right":"left")+` q-linear-progress__stripe--${m.value}`));return()=>{const i=[(0,n.h)("div",{class:_.value,style:f.value}),(0,n.h)("div",{class:b.value,style:v.value})];return!0===e.stripe&&!1===u.value&&i.push((0,n.h)("div",{class:w.value,style:y.value})),(0,n.h)("div",{class:p.value,style:g.value,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":!0===e.indeterminate?void 0:e.value},(0,a.Hp)(t.default,i))}}})},55998:(e,t,i)=>{"use strict";i.d(t,{A:()=>q});var n=i(61758),o=i(38734),s=i(29104),r=i(72941),a=i(22500),l=i(2906);const c={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},d={...c,contextMenu:Boolean};function u({showing:e,avoidEmit:t,configureAnchorEl:i}){const{props:s,proxy:c,emit:d}=(0,n.nI)(),u=(0,o.KR)(null);let h=null;function g(e){return null!==u.value&&(void 0===e||void 0===e.touches||e.touches.length<=1)}const p={};function f(){(0,a.Fh)(p,"anchor")}function m(e){u.value=e;while(u.value.classList.contains("q-anchor--skip"))u.value=u.value.parentNode;i()}function _(){if(!1===s.target||""===s.target||null===c.$el.parentNode)u.value=null;else if(!0===s.target)m(c.$el.parentNode);else{let t=s.target;if("string"===typeof s.target)try{t=document.querySelector(s.target)}catch(e){t=void 0}void 0!==t&&null!==t?(u.value=t.$el||t,i()):(u.value=null,console.error(`Anchor: target "${s.target}" not found`))}}return void 0===i&&(Object.assign(p,{hide(e){c.hide(e)},toggle(e){c.toggle(e),e.qAnchorHandled=!0},toggleKey(e){!0===(0,l.Dv)(e,13)&&p.toggle(e)},contextClick(e){c.hide(e),(0,a.F4)(e),(0,n.dY)((()=>{c.show(e),e.qAnchorHandled=!0}))},prevent:a.F4,mobileTouch(e){if(p.mobileCleanup(e),!0!==g(e))return;c.hide(e),u.value.classList.add("non-selectable");const t=e.target;(0,a.Z4)(p,"anchor",[[t,"touchmove","mobileCleanup","passive"],[t,"touchend","mobileCleanup","passive"],[t,"touchcancel","mobileCleanup","passive"],[u.value,"contextmenu","prevent","notPassive"]]),h=setTimeout((()=>{h=null,c.show(e),e.qAnchorHandled=!0}),300)},mobileCleanup(t){u.value.classList.remove("non-selectable"),null!==h&&(clearTimeout(h),h=null),!0===e.value&&void 0!==t&&(0,r.w)()}}),i=function(e=s.contextMenu){if(!0===s.noParentEvent||null===u.value)return;let t;t=!0===e?!0===c.$q.platform.is.mobile?[[u.value,"touchstart","mobileTouch","passive"]]:[[u.value,"mousedown","hide","passive"],[u.value,"contextmenu","contextClick","notPassive"]]:[[u.value,"click","toggle","passive"],[u.value,"keyup","toggleKey","passive"]],(0,a.Z4)(p,"anchor",t)}),(0,n.wB)((()=>s.contextMenu),(e=>{null!==u.value&&(f(),i(e))})),(0,n.wB)((()=>s.target),(()=>{null!==u.value&&f(),_()})),(0,n.wB)((()=>s.noParentEvent),(e=>{null!==u.value&&(!0===e?f():i())})),(0,n.sV)((()=>{_(),!0!==t&&!0===s.modelValue&&null===u.value&&d("update:modelValue",!1)})),(0,n.xo)((()=>{null!==h&&clearTimeout(h),f()})),{anchorEl:u,canShow:g,anchorEvents:p}}function h(e,t){const i=(0,o.KR)(null);let s;function r(e,t){const i=(void 0!==t?"add":"remove")+"EventListener",n=void 0!==t?t:s;e!==window&&e[i]("scroll",n,a.mG.passive),window[i]("scroll",n,a.mG.passive),s=t}function l(){null!==i.value&&(r(i.value),i.value=null)}const c=(0,n.wB)((()=>e.noParentEvent),(()=>{null!==i.value&&(l(),t())}));return(0,n.xo)(c),{localScrollTarget:i,unconfigureScrollTarget:l,changeScrollEvent:r}}var g=i(52916),p=i(16372),f=i(52120),m=i(40454),_=i(46019),v=i(24667),b=i(29467),y=i(35563),w=i(38336),C=i(65139),S=i(78773),k=i(88173),x=i(77556);i(10239);let E=null;const{notPassiveCapture:L}=a.mG,T=[];function I(e){null!==E&&(clearTimeout(E),E=null);const t=e.target;if(void 0===t||8===t.nodeType||!0===t.classList.contains("no-pointer-events"))return;let i=y.jx.length-1;while(i>=0){const e=y.jx[i].$;if("QTooltip"!==e.type.name){if("QDialog"!==e.type.name)break;if(!0!==e.props.seamless)return;i--}else i--}for(let n=T.length-1;n>=0;n--){const i=T[n];if(null!==i.anchorEl.value&&!1!==i.anchorEl.value.contains(t)||t!==document.body&&(null===i.innerRef.value||!1!==i.innerRef.value.contains(t)))return;e.qClickOutside=!0,i.onClickOutside(e)}}function R(e){T.push(e),1===T.length&&(document.addEventListener("mousedown",I,L),document.addEventListener("touchstart",I,L))}function D(e){const t=T.findIndex((t=>t===e));-1!==t&&(T.splice(t,1),0===T.length&&(null!==E&&(clearTimeout(E),E=null),document.removeEventListener("mousedown",I,L),document.removeEventListener("touchstart",I,L)))}var N=i(98983),A=i(41597);let O,P;function M(e){const t=e.split(" ");return 2===t.length&&(!0!==["top","center","bottom"].includes(t[0])?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):!0===["left","middle","right","start","end"].includes(t[1])||(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1))}function F(e){return!e||2===e.length&&("number"===typeof e[0]&&"number"===typeof e[1])}const B={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};function W(e,t){const i=e.split(" ");return{vertical:i[0],horizontal:B[`${i[1]}#${!0===t?"rtl":"ltr"}`]}}function H(e,t){let{top:i,left:n,right:o,bottom:s,width:r,height:a}=e.getBoundingClientRect();return void 0!==t&&(i-=t[1],n-=t[0],s+=t[1],o+=t[0],r+=t[0],a+=t[1]),{top:i,bottom:s,height:a,left:n,right:o,width:r,middle:n+(o-n)/2,center:i+(s-i)/2}}function V(e,t,i){let{top:n,left:o}=e.getBoundingClientRect();return n+=t.top,o+=t.left,void 0!==i&&(n+=i[1],o+=i[0]),{top:n,bottom:n+1,height:1,left:o,right:o+1,width:1,middle:o,center:n}}function j(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function z(e,t,i,n){return{top:e[i.vertical]-t[n.vertical],left:e[i.horizontal]-t[n.horizontal]}}function U(e,t=0){if(null===e.targetEl||null===e.anchorEl||t>5)return;if(0===e.targetEl.offsetHeight||0===e.targetEl.offsetWidth)return void setTimeout((()=>{U(e,t+1)}),10);const{targetEl:i,offset:n,anchorEl:o,anchorOrigin:s,selfOrigin:r,absoluteOffset:a,fit:l,cover:c,maxHeight:d,maxWidth:u}=e;if(!0===A.Sn.is.ios&&void 0!==window.visualViewport){const e=document.body.style,{offsetLeft:t,offsetTop:i}=window.visualViewport;t!==O&&(e.setProperty("--q-pe-left",t+"px"),O=t),i!==P&&(e.setProperty("--q-pe-top",i+"px"),P=i)}const{scrollLeft:h,scrollTop:g}=i,p=void 0===a?H(o,!0===c?[0,0]:n):V(o,a,n);Object.assign(i.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:u,maxHeight:d,visibility:"visible"});const{offsetWidth:f,offsetHeight:m}=i,{elWidth:_,elHeight:v}=!0===l||!0===c?{elWidth:Math.max(p.width,f),elHeight:!0===c?Math.max(p.height,m):m}:{elWidth:f,elHeight:m};let b={maxWidth:u,maxHeight:d};!0!==l&&!0!==c||(b.minWidth=p.width+"px",!0===c&&(b.minHeight=p.height+"px")),Object.assign(i.style,b);const y=j(_,v);let w=z(p,y,s,r);if(void 0===a||void 0===n)$(w,p,y,s,r);else{const{top:e,left:t}=w;$(w,p,y,s,r);let i=!1;if(w.top!==e){i=!0;const e=2*n[1];p.center=p.top-=e,p.bottom-=e+2}if(w.left!==t){i=!0;const e=2*n[0];p.middle=p.left-=e,p.right-=e+2}!0===i&&(w=z(p,y,s,r),$(w,p,y,s,r))}b={top:w.top+"px",left:w.left+"px"},void 0!==w.maxHeight&&(b.maxHeight=w.maxHeight+"px",p.height>w.maxHeight&&(b.minHeight=b.maxHeight)),void 0!==w.maxWidth&&(b.maxWidth=w.maxWidth+"px",p.width>w.maxWidth&&(b.minWidth=b.maxWidth)),Object.assign(i.style,b),i.scrollTop!==g&&(i.scrollTop=g),i.scrollLeft!==h&&(i.scrollLeft=h)}function $(e,t,i,n,o){const s=i.bottom,r=i.right,a=(0,w.XJ)(),l=window.innerHeight-a,c=document.body.clientWidth;if(e.top<0||e.top+s>l)if("center"===o.vertical)e.top=t[n.vertical]>l/2?Math.max(0,l-s):0,e.maxHeight=Math.min(s,l);else if(t[n.vertical]>l/2){const i=Math.min(l,"center"===n.vertical?t.center:n.vertical===o.vertical?t.bottom:t.top);e.maxHeight=Math.min(s,i),e.top=Math.max(0,i-s)}else e.top=Math.max(0,"center"===n.vertical?t.center:n.vertical===o.vertical?t.top:t.bottom),e.maxHeight=Math.min(s,l-e.top);if(e.left<0||e.left+r>c)if(e.maxWidth=Math.min(r,c),"middle"===o.horizontal)e.left=t[n.horizontal]>c/2?Math.max(0,c-r):0;else if(t[n.horizontal]>c/2){const i=Math.min(c,"middle"===n.horizontal?t.middle:n.horizontal===o.horizontal?t.right:t.left);e.maxWidth=Math.min(r,i),e.left=Math.max(0,i-e.maxWidth)}else e.left=Math.max(0,"middle"===n.horizontal?t.middle:n.horizontal===o.horizontal?t.left:t.right),e.maxWidth=Math.min(r,c-e.left)}["left","middle","right"].forEach((e=>{B[`${e}#ltr`]=e,B[`${e}#rtl`]=e}));const q=(0,b.a0)({name:"QMenu",inheritAttrs:!1,props:{...d,...g.RI,...p.C,...m.d,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:M},self:{type:String,validator:M},offset:{type:Array,validator:F},scrollTarget:w.cP,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...g.Jl,"click","escapeKey"],setup(e,{slots:t,emit:i,attrs:r}){let l,c,d,b=null;const E=(0,n.nI)(),{proxy:L}=E,{$q:T}=L,I=(0,o.KR)(null),A=(0,o.KR)(!1),O=(0,n.EW)((()=>!0!==e.persistent&&!0!==e.noRouteDismiss)),P=(0,p.A)(e,T),{registerTick:M,removeTick:F}=(0,_.A)(),{registerTimeout:B}=(0,v.A)(),{transitionProps:H,transitionStyle:V}=(0,m.A)(e),{localScrollTarget:j,changeScrollEvent:z,unconfigureScrollTarget:$}=h(e,le),{anchorEl:q,canShow:K}=u({showing:A}),{hide:G}=(0,g.Ay)({showing:A,canShow:K,handleShow:se,handleHide:re,hideOnRouteChange:O,processOnMount:!0}),{showPortal:Q,hidePortal:Y,renderPortal:Z}=(0,f.A)(E,I,ge,"menu"),X={anchorEl:q,innerRef:I,onClickOutside(t){if(!0!==e.persistent&&!0===A.value)return G(t),("touchstart"===t.type||t.target.classList.contains("q-dialog__backdrop"))&&(0,a.Gu)(t),!0}},J=(0,n.EW)((()=>W(e.anchor||(!0===e.cover?"center middle":"bottom start"),T.lang.rtl))),ee=(0,n.EW)((()=>!0===e.cover?J.value:W(e.self||"top start",T.lang.rtl))),te=(0,n.EW)((()=>(!0===e.square?" q-menu--square":"")+(!0===P.value?" q-menu--dark q-dark":""))),ie=(0,n.EW)((()=>!0===e.autoClose?{onClick:ce}:{})),ne=(0,n.EW)((()=>!0===A.value&&!0!==e.persistent));function oe(){(0,N.Gy)((()=>{let e=I.value;e&&!0!==e.contains(document.activeElement)&&(e=e.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||e.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||e.querySelector("[autofocus], [data-autofocus]")||e,e.focus({preventScroll:!0}))}))}function se(t){if(b=!1===e.noRefocus?document.activeElement:null,(0,k.g)(de),Q(),le(),l=void 0,void 0!==t&&(e.touchPosition||e.contextMenu)){const e=(0,a.G1)(t);if(void 0!==e.left){const{top:t,left:i}=q.value.getBoundingClientRect();l={left:e.left-i,top:e.top-t}}}void 0===c&&(c=(0,n.wB)((()=>T.screen.width+"|"+T.screen.height+"|"+e.self+"|"+e.anchor+"|"+T.lang.rtl),he)),!0!==e.noFocus&&document.activeElement.blur(),M((()=>{he(),!0!==e.noFocus&&oe()})),B((()=>{!0===T.platform.is.ios&&(d=e.autoClose,I.value.click()),he(),Q(!0),i("show",t)}),e.transitionDuration)}function re(t){F(),Y(),ae(!0),null===b||void 0!==t&&!0===t.qClickOutside||(((t&&0===t.type.indexOf("key")?b.closest('[tabindex]:not([tabindex^="-"])'):void 0)||b).focus(),b=null),B((()=>{Y(!0),i("hide",t)}),e.transitionDuration)}function ae(e){l=void 0,void 0!==c&&(c(),c=void 0),!0!==e&&!0!==A.value||((0,k.v)(de),$(),D(X),(0,S.V)(ue)),!0!==e&&(b=null)}function le(){null===q.value&&void 0===e.scrollTarget||(j.value=(0,w.hD)(q.value,e.scrollTarget),z(j.value,he))}function ce(e){!0!==d?((0,y.bc)(L,e),i("click",e)):d=!1}function de(t){!0===ne.value&&!0!==e.noFocus&&!0!==(0,x.$J)(I.value,t.target)&&oe()}function ue(e){i("escapeKey"),G(e)}function he(){U({targetEl:I.value,offset:e.offset,anchorEl:q.value,anchorOrigin:J.value,selfOrigin:ee.value,absoluteOffset:l,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function ge(){return(0,n.h)(s.eB,H.value,(()=>!0===A.value?(0,n.h)("div",{role:"menu",...r,ref:I,tabindex:-1,class:["q-menu q-position-engine scroll"+te.value,r.class],style:[r.style,V.value],...ie.value},(0,C.zm)(t.default)):null))}return(0,n.wB)(ne,(e=>{!0===e?((0,S.I)(ue),R(X)):((0,S.V)(ue),D(X))})),(0,n.xo)(ae),Object.assign(L,{focus:oe,updatePosition:he}),Z}})},26267:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(61758),o=(i(10239),i(38734)),s=i(50492),r=i(16372),a=i(61906),l=i(8014),c=i(52510),d=i(29467),u=i(10447),h=i(22500),g=i(65139);const p=()=>(0,n.h)("svg",{key:"svg",class:"q-radio__bg absolute non-selectable",viewBox:"0 0 24 24"},[(0,n.h)("path",{d:"M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12"}),(0,n.h)("path",{class:"q-radio__check",d:"M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6"})]),f=(0,d.a0)({name:"QRadio",props:{...r.C,...a.x_,...c.Sc,modelValue:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,checkedIcon:String,uncheckedIcon:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},emits:["update:modelValue"],setup(e,{slots:t,emit:i}){const{proxy:d}=(0,n.nI)(),f=(0,r.A)(e,d.$q),m=(0,a.Ay)(e,u.A),_=(0,o.KR)(null),{refocusTargetEl:v,refocusTarget:b}=(0,l.A)(e,_),y=(0,n.EW)((()=>(0,o.ux)(e.modelValue)===(0,o.ux)(e.val))),w=(0,n.EW)((()=>"q-radio cursor-pointer no-outline row inline no-wrap items-center"+(!0===e.disable?" disabled":"")+(!0===f.value?" q-radio--dark":"")+(!0===e.dense?" q-radio--dense":"")+(!0===e.leftLabel?" reverse":""))),C=(0,n.EW)((()=>{const t=void 0===e.color||!0!==e.keepColor&&!0!==y.value?"":` text-${e.color}`;return`q-radio__inner relative-position q-radio__inner--${!0===y.value?"truthy":"falsy"}${t}`})),S=(0,n.EW)((()=>(!0===y.value?e.checkedIcon:e.uncheckedIcon)||null)),k=(0,n.EW)((()=>!0===e.disable?-1:e.tabindex||0)),x=(0,n.EW)((()=>{const t={type:"radio"};return void 0!==e.name&&Object.assign(t,{".checked":!0===y.value,"^checked":!0===y.value?"checked":void 0,name:e.name,value:e.val}),t})),E=(0,c.vq)(x);function L(t){void 0!==t&&((0,h.Gu)(t),b(t)),!0!==e.disable&&!0!==y.value&&i("update:modelValue",e.val,t)}function T(e){13!==e.keyCode&&32!==e.keyCode||(0,h.Gu)(e)}function I(e){13!==e.keyCode&&32!==e.keyCode||L(e)}Object.assign(d,{set:L});const R=p();return()=>{const i=null!==S.value?[(0,n.h)("div",{key:"icon",class:"q-radio__icon-container absolute-full flex flex-center no-wrap"},[(0,n.h)(s.A,{class:"q-radio__icon",name:S.value})])]:[R];!0!==e.disable&&E(i,"unshift"," q-radio__native q-ma-none q-pa-none");const o=[(0,n.h)("div",{class:C.value,style:m.value,"aria-hidden":"true"},i)];null!==v.value&&o.push(v.value);const r=void 0!==e.label?(0,g.Hp)(t.default,[e.label]):(0,g.zm)(t.default);return void 0!==r&&o.push((0,n.h)("div",{class:"q-radio__label q-anchor--skip"},r)),(0,n.h)("div",{ref:_,class:w.value,tabindex:k.value,role:"radio","aria-label":e.label,"aria-checked":!0===y.value?"true":"false","aria-disabled":!0===e.disable?"true":void 0,onClick:L,onKeydown:T,onKeyup:I},o)}}});var m=i(80460),_=i(66908),v=i(1054);const b={radio:f,checkbox:m.A,toggle:_.A},y=Object.keys(b);function w(e,t){if("function"===typeof e)return e;const i=void 0!==e?e:t;return e=>e[i]}const C=(0,d.a0)({name:"QOptionGroup",props:{...r.C,modelValue:{required:!0},options:{type:Array,validator:e=>e.every(v.Gv),default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],name:String,type:{type:String,default:"radio",validator:e=>y.includes(e)},color:String,keepColor:Boolean,dense:Boolean,size:String,leftLabel:Boolean,inline:Boolean,disable:Boolean},emits:["update:modelValue"],setup(e,{emit:t,slots:i}){const{proxy:{$q:o}}=(0,n.nI)(),s=Array.isArray(e.modelValue);"radio"===e.type?!0===s&&console.error("q-option-group: model should not be array"):!1===s&&console.error("q-option-group: model should be array in your case");const a=(0,r.A)(e,o),l=(0,n.EW)((()=>b[e.type])),c=(0,n.EW)((()=>w(e.optionValue,"value"))),d=(0,n.EW)((()=>w(e.optionLabel,"label"))),u=(0,n.EW)((()=>w(e.optionDisable,"disable"))),h=(0,n.EW)((()=>e.options.map((t=>({val:c.value(t),name:void 0===t.name?e.name:t.name,disable:e.disable||u.value(t),leftLabel:void 0===t.leftLabel?e.leftLabel:t.leftLabel,color:void 0===t.color?e.color:t.color,checkedIcon:t.checkedIcon,uncheckedIcon:t.uncheckedIcon,dark:void 0===t.dark?a.value:t.dark,size:void 0===t.size?e.size:t.size,dense:e.dense,keepColor:void 0===t.keepColor?e.keepColor:t.keepColor}))))),g=(0,n.EW)((()=>"q-option-group q-gutter-x-sm"+(!0===e.inline?" q-option-group--inline":""))),p=(0,n.EW)((()=>{const t={role:"group"};return"radio"===e.type&&(t.role="radiogroup",!0===e.disable&&(t["aria-disabled"]="true")),t}));function f(e){t("update:modelValue",e)}return()=>(0,n.h)("div",{class:g.value,...p.value},e.options.map(((t,o)=>{const s=void 0!==i["label-"+o]?()=>i["label-"+o](t):void 0!==i.label?()=>i.label(t):void 0;return(0,n.h)("div",[(0,n.h)(l.value,{label:void 0===s?d.value(t):null,modelValue:e.modelValue,"onUpdate:modelValue":f,...h.value[o]},s)])})))}})},77716:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(29467),s=i(65139),r=i(27973);const a=(0,o.a0)({name:"QPage",props:{padding:Boolean,styleFn:Function},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),o=(0,n.WQ)(r.ON,r.U_);if(o===r.U_)return console.error("QPage needs to be a deep child of QLayout"),r.U_;const a=(0,n.WQ)(r.YR,r.U_);if(a===r.U_)return console.error("QPage needs to be child of QPageContainer"),r.U_;const l=(0,n.EW)((()=>{const t=(!0===o.header.space?o.header.size:0)+(!0===o.footer.space?o.footer.size:0);if("function"===typeof e.styleFn){const n=!0===o.isContainer.value?o.containerHeight.value:i.screen.height;return e.styleFn(t,n)}return{minHeight:!0===o.isContainer.value?o.containerHeight.value-t+"px":0===i.screen.height?0!==t?`calc(100vh - ${t}px)`:"100vh":i.screen.height-t+"px"}})),c=(0,n.EW)((()=>"q-page"+(!0===e.padding?" q-layout-padding":"")));return()=>(0,n.h)("main",{class:c.value,style:l.value},(0,s.zm)(t.default))}})},45205:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(29467),s=i(65139),r=i(27973);const a=(0,o.a0)({name:"QPageContainer",setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),o=(0,n.WQ)(r.ON,r.U_);if(o===r.U_)return console.error("QPageContainer needs to be child of QLayout"),r.U_;(0,n.Gt)(r.YR,!0);const a=(0,n.EW)((()=>{const e={};return!0===o.header.space&&(e.paddingTop=`${o.header.size}px`),!0===o.right.space&&(e["padding"+(!0===i.lang.rtl?"Left":"Right")]=`${o.right.size}px`),!0===o.footer.space&&(e.paddingBottom=`${o.footer.size}px`),!0===o.left.space&&(e["padding"+(!0===i.lang.rtl?"Right":"Left")]=`${o.left.size}px`),e}));return()=>(0,n.h)("div",{class:"q-page-container",style:a.value},(0,s.zm)(t.default))}})},1096:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(61758),o=i(38734),s=i(41597);function r(){const e=(0,o.KR)(!s.ot.value);return!1===e.value&&(0,n.sV)((()=>{e.value=!0})),{isHydrated:e}}var a=i(29467),l=i(22500);const c="undefined"!==typeof ResizeObserver,d=!0===c?{}:{style:"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;",url:"about:blank"},u=(0,a.a0)({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(e,{emit:t}){let i,o=null,s={width:-1,height:-1};function a(t){!0===t||0===e.debounce||"0"===e.debounce?u():null===o&&(o=setTimeout(u,e.debounce))}function u(){if(null!==o&&(clearTimeout(o),o=null),i){const{offsetWidth:e,offsetHeight:n}=i;e===s.width&&n===s.height||(s={width:e,height:n},t("resize",s))}}const{proxy:h}=(0,n.nI)();if(h.trigger=a,!0===c){let g;const p=e=>{i=h.$el.parentNode,i?(g=new ResizeObserver(a),g.observe(i),u()):!0!==e&&(0,n.dY)((()=>{p(!0)}))};return(0,n.sV)((()=>{p()})),(0,n.xo)((()=>{null!==o&&clearTimeout(o),void 0!==g&&(void 0!==g.disconnect?g.disconnect():i&&g.unobserve(i))})),l.lQ}{const{isHydrated:f}=r();let m;function _(){null!==o&&(clearTimeout(o),o=null),void 0!==m&&(void 0!==m.removeEventListener&&m.removeEventListener("resize",a,l.mG.passive),m=void 0)}function v(){_(),i&&i.contentDocument&&(m=i.contentDocument.defaultView,m.addEventListener("resize",a,l.mG.passive),u())}return(0,n.sV)((()=>{(0,n.dY)((()=>{i=h.$el,i&&v()}))})),(0,n.xo)(_),()=>{if(!0===f.value)return(0,n.h)("object",{class:"q--avoid-card-border",style:d.style,tabindex:-1,type:"text/html",data:d.url,"aria-hidden":"true",onLoad:v})}}}})},48958:(e,t,i)=>{"use strict";i.d(t,{A:()=>b});var n=i(38734),o=i(61758),s=i(16372),r=i(29467);const a=(0,r.a0)({props:["store","barStyle","verticalBarStyle","horizontalBarStyle"],setup(e){return()=>[(0,o.h)("div",{class:e.store.scroll.vertical.barClass.value,style:[e.barStyle,e.verticalBarStyle],"aria-hidden":"true",onMousedown:e.store.onVerticalMousedown}),(0,o.h)("div",{class:e.store.scroll.horizontal.barClass.value,style:[e.barStyle,e.horizontalBarStyle],"aria-hidden":"true",onMousedown:e.store.onHorizontalMousedown}),(0,o.bo)((0,o.h)("div",{ref:e.store.scroll.vertical.ref,class:e.store.scroll.vertical.thumbClass.value,style:e.store.scroll.vertical.style.value,"aria-hidden":"true"}),e.store.thumbVertDir),(0,o.bo)((0,o.h)("div",{ref:e.store.scroll.horizontal.ref,class:e.store.scroll.horizontal.thumbClass.value,style:e.store.scroll.horizontal.style.value,"aria-hidden":"true"}),e.store.thumbHorizDir)]}});var l=i(1096),c=i(93163),d=i(89390),u=i(82732),h=i(38336),g=i(65139),p=i(53500);const f=["vertical","horizontal"],m={vertical:{offset:"offsetY",scroll:"scrollTop",dir:"down",dist:"y"},horizontal:{offset:"offsetX",scroll:"scrollLeft",dir:"right",dist:"x"}},_={prevent:!0,mouse:!0,mouseAllDir:!0},v=e=>e>=250?50:Math.ceil(e/5),b=(0,r.a0)({name:"QScrollArea",props:{...s.C,thumbStyle:Object,verticalThumbStyle:Object,horizontalThumbStyle:Object,barStyle:[Array,String,Object],verticalBarStyle:[Array,String,Object],horizontalBarStyle:[Array,String,Object],verticalOffset:{type:Array,default:[0,0]},horizontalOffset:{type:Array,default:[0,0]},contentStyle:[Array,String,Object],contentActiveStyle:[Array,String,Object],delay:{type:[String,Number],default:1e3},visible:{type:Boolean,default:null},tabindex:[String,Number],onScroll:Function},setup(e,{slots:t,emit:i}){const r=(0,n.KR)(!1),b=(0,n.KR)(!1),y=(0,n.KR)(!1),w={vertical:(0,n.KR)(0),horizontal:(0,n.KR)(0)},C={vertical:{ref:(0,n.KR)(null),position:(0,n.KR)(0),size:(0,n.KR)(0)},horizontal:{ref:(0,n.KR)(null),position:(0,n.KR)(0),size:(0,n.KR)(0)}},{proxy:S}=(0,o.nI)(),k=(0,s.A)(e,S.$q);let x,E=null;const L=(0,n.KR)(null),T=(0,o.EW)((()=>"q-scrollarea"+(!0===k.value?" q-scrollarea--dark":"")));Object.assign(w,{verticalInner:(0,o.EW)((()=>w.vertical.value-e.verticalOffset[0]-e.verticalOffset[1])),horizontalInner:(0,o.EW)((()=>w.horizontal.value-e.horizontalOffset[0]-e.horizontalOffset[1]))}),C.vertical.percentage=(0,o.EW)((()=>{const e=C.vertical.size.value-w.vertical.value;if(e<=0)return 0;const t=(0,u.Tq)(C.vertical.position.value/e,0,1);return Math.round(1e4*t)/1e4})),C.vertical.thumbHidden=(0,o.EW)((()=>!0!==(null===e.visible?y.value:e.visible)&&!1===r.value&&!1===b.value||C.vertical.size.value<=w.vertical.value+1)),C.vertical.thumbStart=(0,o.EW)((()=>e.verticalOffset[0]+C.vertical.percentage.value*(w.verticalInner.value-C.vertical.thumbSize.value))),C.vertical.thumbSize=(0,o.EW)((()=>Math.round((0,u.Tq)(w.verticalInner.value*w.verticalInner.value/C.vertical.size.value,v(w.verticalInner.value),w.verticalInner.value)))),C.vertical.style=(0,o.EW)((()=>({...e.thumbStyle,...e.verticalThumbStyle,top:`${C.vertical.thumbStart.value}px`,height:`${C.vertical.thumbSize.value}px`,right:`${e.horizontalOffset[1]}px`}))),C.vertical.thumbClass=(0,o.EW)((()=>"q-scrollarea__thumb q-scrollarea__thumb--v absolute-right"+(!0===C.vertical.thumbHidden.value?" q-scrollarea__thumb--invisible":""))),C.vertical.barClass=(0,o.EW)((()=>"q-scrollarea__bar q-scrollarea__bar--v absolute-right"+(!0===C.vertical.thumbHidden.value?" q-scrollarea__bar--invisible":""))),C.horizontal.percentage=(0,o.EW)((()=>{const e=C.horizontal.size.value-w.horizontal.value;if(e<=0)return 0;const t=(0,u.Tq)(Math.abs(C.horizontal.position.value)/e,0,1);return Math.round(1e4*t)/1e4})),C.horizontal.thumbHidden=(0,o.EW)((()=>!0!==(null===e.visible?y.value:e.visible)&&!1===r.value&&!1===b.value||C.horizontal.size.value<=w.horizontal.value+1)),C.horizontal.thumbStart=(0,o.EW)((()=>e.horizontalOffset[0]+C.horizontal.percentage.value*(w.horizontalInner.value-C.horizontal.thumbSize.value))),C.horizontal.thumbSize=(0,o.EW)((()=>Math.round((0,u.Tq)(w.horizontalInner.value*w.horizontalInner.value/C.horizontal.size.value,v(w.horizontalInner.value),w.horizontalInner.value)))),C.horizontal.style=(0,o.EW)((()=>({...e.thumbStyle,...e.horizontalThumbStyle,[!0===S.$q.lang.rtl?"right":"left"]:`${C.horizontal.thumbStart.value}px`,width:`${C.horizontal.thumbSize.value}px`,bottom:`${e.verticalOffset[1]}px`}))),C.horizontal.thumbClass=(0,o.EW)((()=>"q-scrollarea__thumb q-scrollarea__thumb--h absolute-bottom"+(!0===C.horizontal.thumbHidden.value?" q-scrollarea__thumb--invisible":""))),C.horizontal.barClass=(0,o.EW)((()=>"q-scrollarea__bar q-scrollarea__bar--h absolute-bottom"+(!0===C.horizontal.thumbHidden.value?" q-scrollarea__bar--invisible":"")));const I=(0,o.EW)((()=>!0===C.vertical.thumbHidden.value&&!0===C.horizontal.thumbHidden.value?e.contentStyle:e.contentActiveStyle));function R(){const e={};return f.forEach((t=>{const i=C[t];Object.assign(e,{[t+"Position"]:i.position.value,[t+"Percentage"]:i.percentage.value,[t+"Size"]:i.size.value,[t+"ContainerSize"]:w[t].value,[t+"ContainerInnerSize"]:w[t+"Inner"].value})})),e}const D=(0,p.A)((()=>{const e=R();e.ref=S,i("scroll",e)}),0);function N(e,t,i){if(!1===f.includes(e))return void console.error("[QScrollArea]: wrong first param of setScrollPosition (vertical/horizontal)");const n="vertical"===e?h.RZ:h.rr;n(L.value,t,i)}function A({height:e,width:t}){let i=!1;w.vertical.value!==e&&(w.vertical.value=e,i=!0),w.horizontal.value!==t&&(w.horizontal.value=t,i=!0),!0===i&&B()}function O({position:e}){let t=!1;C.vertical.position.value!==e.top&&(C.vertical.position.value=e.top,t=!0),C.horizontal.position.value!==e.left&&(C.horizontal.position.value=e.left,t=!0),!0===t&&B()}function P({height:e,width:t}){C.horizontal.size.value!==t&&(C.horizontal.size.value=t,B()),C.vertical.size.value!==e&&(C.vertical.size.value=e,B())}function M(e,t){const i=C[t];if(!0===e.isFirst){if(!0===i.thumbHidden.value)return;x=i.position.value,b.value=!0}else if(!0!==b.value)return;!0===e.isFinal&&(b.value=!1);const n=m[t],o=(i.size.value-w[t].value)/(w[t+"Inner"].value-i.thumbSize.value),s=e.distance[n.dist],r=x+(e.direction===n.dir?1:-1)*s*o;W(r,t)}function F(t,i){const n=C[i];if(!0!==n.thumbHidden.value){const o="vertical"===i?e.verticalOffset[0]:e.horizontalOffset[0],s=t[m[i].offset]-o,r=n.thumbStart.value-o;if(sr+n.thumbSize.value){const e=s-n.thumbSize.value/2,t=(0,u.Tq)(e/(w[i+"Inner"].value-n.thumbSize.value),0,1);W(t*Math.max(0,n.size.value-w[i].value),i)}null!==n.ref.value&&n.ref.value.dispatchEvent(new MouseEvent(t.type,t))}}function B(){r.value=!0,null!==E&&clearTimeout(E),E=setTimeout((()=>{E=null,r.value=!1}),e.delay),void 0!==e.onScroll&&D()}function W(e,t){L.value[m[t].scroll]=e}let H=null;function V(){null!==H&&clearTimeout(H),H=setTimeout((()=>{H=null,y.value=!0}),S.$q.platform.is.ios?50:0)}function j(){null!==H&&(clearTimeout(H),H=null),y.value=!1}let z=null;(0,o.wB)((()=>S.$q.lang.rtl),(e=>{null!==L.value&&(0,h.rr)(L.value,Math.abs(C.horizontal.position.value)*(!0===e?-1:1))})),(0,o.Y4)((()=>{z={top:C.vertical.position.value,left:C.horizontal.position.value}})),(0,o.n)((()=>{if(null===z)return;const e=L.value;null!==e&&((0,h.rr)(e,z.left),(0,h.RZ)(e,z.top))})),(0,o.xo)(D.cancel),Object.assign(S,{getScrollTarget:()=>L.value,getScroll:R,getScrollPosition:()=>({top:C.vertical.position.value,left:C.horizontal.position.value}),getScrollPercentage:()=>({top:C.vertical.percentage.value,left:C.horizontal.percentage.value}),setScrollPosition:N,setScrollPercentage(e,t,i){N(e,t*(C[e].size.value-w[e].value)*("horizontal"===e&&!0===S.$q.lang.rtl?-1:1),i)}});const U={scroll:C,thumbVertDir:[[d.A,e=>{M(e,"vertical")},void 0,{vertical:!0,..._}]],thumbHorizDir:[[d.A,e=>{M(e,"horizontal")},void 0,{horizontal:!0,..._}]],onVerticalMousedown(e){F(e,"vertical")},onHorizontalMousedown(e){F(e,"horizontal")}};return()=>(0,o.h)("div",{class:T.value,onMouseenter:V,onMouseleave:j},[(0,o.h)("div",{ref:L,class:"q-scrollarea__container scroll relative-position fit hide-scrollbar",tabindex:void 0!==e.tabindex?e.tabindex:void 0},[(0,o.h)("div",{class:"q-scrollarea__content absolute",style:I.value},(0,g.Hp)(t.default,[(0,o.h)(l.A,{debounce:0,onResize:P})])),(0,o.h)(c.A,{axis:"both",onScroll:O})]),(0,o.h)(l.A,{debounce:0,onResize:A}),(0,o.h)(a,{store:U,barStyle:e.barStyle,verticalBarStyle:e.verticalBarStyle,horizontalBarStyle:e.horizontalBarStyle})])}})},93163:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(61758),o=i(29467),s=i(38336),r=i(22500);const{passive:a}=r.mG,l=["both","horizontal","vertical"],c=(0,o.a0)({name:"QScrollObserver",props:{axis:{type:String,validator:e=>l.includes(e),default:"vertical"},debounce:[String,Number],scrollTarget:s.cP},emits:["scroll"],setup(e,{emit:t}){const i={position:{top:0,left:0},direction:"down",directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}};let o,l,c=null;function d(){null!==c&&c();const n=Math.max(0,(0,s.fQ)(o)),r=(0,s.lS)(o),a={top:n-i.position.top,left:r-i.position.left};if("vertical"===e.axis&&0===a.top||"horizontal"===e.axis&&0===a.left)return;const l=Math.abs(a.top)>=Math.abs(a.left)?a.top<0?"up":"down":a.left<0?"left":"right";i.position={top:n,left:r},i.directionChanged=i.direction!==l,i.delta=a,!0===i.directionChanged&&(i.direction=l,i.inflectionPoint=i.position),t("scroll",{...i})}function u(){o=(0,s.hD)(l,e.scrollTarget),o.addEventListener("scroll",g,a),g(!0)}function h(){void 0!==o&&(o.removeEventListener("scroll",g,a),o=void 0)}function g(t){if(!0===t||0===e.debounce||"0"===e.debounce)d();else if(null===c){const[t,i]=e.debounce?[setTimeout(d,e.debounce),clearTimeout]:[requestAnimationFrame(d),cancelAnimationFrame];c=()=>{i(t),c=null}}}(0,n.wB)((()=>e.scrollTarget),(()=>{h(),u()}));const{proxy:p}=(0,n.nI)();return(0,n.wB)((()=>p.$q.lang.rtl),d),(0,n.sV)((()=>{l=p.$el.parentNode,u()})),(0,n.xo)((()=>{null!==c&&c(),h()})),Object.assign(p,{trigger:g,getPosition:()=>i}),r.lQ}})},75848:(e,t,i)=>{"use strict";i.d(t,{A:()=>L});i(10239);var n=i(61758),o=i(38734),s=i(7617),r=i(29467);const a=(0,r.a0)({name:"QField",inheritAttrs:!1,props:{...s.OJ,tag:{type:String,default:"label"}},emits:s.mU,setup(){return(0,s.Ay)((0,s.$7)({tagProp:!0}))}});var l=i(50492),c=i(66760),d=i(90124),u=i(25173),h=i(13796),g=i(55998),p=i(82156),f=i(31503),m=i(52510),_=i(32342),v=i(1054),b=i(22500),y=i(82732),w=i(2906),C=i(65139);const S=e=>["add","add-unique","toggle"].includes(e),k=".*+?^${}()|[]\\",x=Object.keys(s.OJ);function E(e,t){if("function"===typeof e)return e;const i=void 0!==e?e:t;return e=>null!==e&&"object"===typeof e&&i in e?e[i]:e}const L=(0,r.a0)({name:"QSelect",inheritAttrs:!1,props:{...f.AV,...m.Sc,...s.OJ,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],popupNoRouteDismiss:Boolean,useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:S},mapOptions:Boolean,emitValue:Boolean,disableTabSelection:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:{},transitionHide:{},transitionDuration:{},behavior:{type:String,validator:e=>["default","menu","dialog"].includes(e),default:"default"},virtualScrollItemSize:f.AV.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...s.mU,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:t,emit:i}){const{proxy:r}=(0,n.nI)(),{$q:L}=r,T=(0,o.KR)(!1),I=(0,o.KR)(!1),R=(0,o.KR)(-1),D=(0,o.KR)(""),N=(0,o.KR)(!1),A=(0,o.KR)(!1);let O,P,M,F,B,W,H,V=null,j=null,z=null;const U=(0,o.KR)(null),$=(0,o.KR)(null),q=(0,o.KR)(null),K=(0,o.KR)(null),G=(0,o.KR)(null),Q=(0,m.M4)(e),Y=(0,_.A)(Ye),Z=(0,n.EW)((()=>e.options.length)),X=(0,n.EW)((()=>void 0===e.virtualScrollItemSize?!0===e.optionsDense?24:48:e.virtualScrollItemSize)),{virtualScrollSliceRange:J,virtualScrollSliceSizeComputed:ee,localResetVirtualScroll:te,padVirtualScroll:ie,onVirtualScrollEvt:ne,scrollTo:oe,setVirtualScrollSize:se}=(0,f.Iq)({virtualScrollLength:Z,getVirtualScrollTarget:qe,getVirtualScrollEl:$e,virtualScrollItemSizeComputed:X}),re=(0,s.$7)(),ae=(0,n.EW)((()=>{const t=!0===e.mapOptions&&!0!==e.multiple,i=void 0===e.modelValue||null===e.modelValue&&!0!==t?[]:!0===e.multiple&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue];if(!0===e.mapOptions){const n=!0===e.mapOptions&&void 0!==O?O:[],o=i.map((e=>Be(e,n)));return null===e.modelValue&&!0===t?o.filter((e=>null!==e)):o}return i})),le=(0,n.EW)((()=>{const t={};return x.forEach((i=>{const n=e[i];void 0!==n&&(t[i]=n)})),t})),ce=(0,n.EW)((()=>null===e.optionsDark?re.isDark.value:e.optionsDark)),de=(0,n.EW)((()=>(0,s.o9)(ae.value))),ue=(0,n.EW)((()=>{let t="q-field__input q-placeholder col";return!0===e.hideSelected||0===ae.value.length?[t,e.inputClass]:(t+=" q-field__input--padding",void 0===e.inputClass?t:[t,e.inputClass])})),he=(0,n.EW)((()=>(!0===e.virtualScrollHorizontal?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:""))),ge=(0,n.EW)((()=>0===Z.value)),pe=(0,n.EW)((()=>ae.value.map((e=>Le.value(e))).join(", "))),fe=(0,n.EW)((()=>void 0!==e.displayValue?e.displayValue:pe.value)),me=(0,n.EW)((()=>!0===e.optionsHtml?()=>!0:e=>void 0!==e&&null!==e&&!0===e.html)),_e=(0,n.EW)((()=>!0===e.displayValueHtml||void 0===e.displayValue&&(!0===e.optionsHtml||ae.value.some(me.value)))),ve=(0,n.EW)((()=>!0===re.focused.value?e.tabindex:-1)),be=(0,n.EW)((()=>{const t={tabindex:e.tabindex,role:"combobox","aria-label":e.label,"aria-readonly":!0===e.readonly?"true":"false","aria-autocomplete":!0===e.useInput?"list":"none","aria-expanded":!0===T.value?"true":"false","aria-controls":`${re.targetUid.value}_lb`};return R.value>=0&&(t["aria-activedescendant"]=`${re.targetUid.value}_${R.value}`),t})),ye=(0,n.EW)((()=>({id:`${re.targetUid.value}_lb`,role:"listbox","aria-multiselectable":!0===e.multiple?"true":"false"}))),we=(0,n.EW)((()=>ae.value.map(((e,t)=>({index:t,opt:e,html:me.value(e),selected:!0,removeAtIndex:Ae,toggleOption:Pe,tabindex:ve.value}))))),Ce=(0,n.EW)((()=>{if(0===Z.value)return[];const{from:t,to:i}=J.value;return e.options.slice(t,i).map(((i,n)=>{const o=!0===Te.value(i),s=!0===We(i),r=t+n,a={clickable:!0,active:s,activeClass:xe.value,manualFocus:!0,focused:!1,disable:o,tabindex:-1,dense:e.optionsDense,dark:ce.value,role:"option","aria-selected":!0===s?"true":"false",id:`${re.targetUid.value}_${r}`,onClick:()=>{Pe(i)}};return!0!==o&&(R.value===r&&(a.focused=!0),!0===L.platform.is.desktop&&(a.onMousemove=()=>{!0===T.value&&Me(r)})),{index:r,opt:i,html:me.value(i),label:Le.value(i),selected:a.active,focused:a.focused,toggleOption:Pe,setOptionIndex:Me,itemProps:a}}))})),Se=(0,n.EW)((()=>void 0!==e.dropdownIcon?e.dropdownIcon:L.iconSet.arrow.dropdown)),ke=(0,n.EW)((()=>!1===e.optionsCover&&!0!==e.outlined&&!0!==e.standout&&!0!==e.borderless&&!0!==e.rounded)),xe=(0,n.EW)((()=>void 0!==e.optionsSelectedClass?e.optionsSelectedClass:void 0!==e.color?`text-${e.color}`:"")),Ee=(0,n.EW)((()=>E(e.optionValue,"value"))),Le=(0,n.EW)((()=>E(e.optionLabel,"label"))),Te=(0,n.EW)((()=>E(e.optionDisable,"disable"))),Ie=(0,n.EW)((()=>ae.value.map(Ee.value))),Re=(0,n.EW)((()=>{const e={onInput:Ye,onChange:Y,onKeydown:Ue,onKeyup:je,onKeypress:ze,onFocus:He,onClick(e){!0===P&&(0,b.ds)(e)}};return e.onCompositionstart=e.onCompositionupdate=e.onCompositionend=Y,e}));function De(t){return!0===e.emitValue?Ee.value(t):t}function Ne(t){if(-1!==t&&t=e.maxValues)return;const s=e.modelValue.slice();i("add",{index:s.length,value:o}),s.push(o),i("update:modelValue",s)}function Pe(t,n){if(!0!==re.editable.value||void 0===t||!0===Te.value(t))return;const o=Ee.value(t);if(!0!==e.multiple)return!0!==n&&(Xe(!0===e.fillInput?Le.value(t):"",!0,!0),ut()),null!==$.value&&$.value.focus(),void(0!==ae.value.length&&!0===(0,v.Hv)(Ee.value(ae.value[0]),o)||i("update:modelValue",!0===e.emitValue?o:t));if((!0!==P||!0===N.value)&&re.focus(),He(),0===ae.value.length){const n=!0===e.emitValue?o:t;return i("add",{index:0,value:n}),void i("update:modelValue",!0===e.multiple?[n]:n)}const s=e.modelValue.slice(),r=Ie.value.findIndex((e=>(0,v.Hv)(e,o)));if(-1!==r)i("remove",{index:r,value:s.splice(r,1)[0]});else{if(void 0!==e.maxValues&&s.length>=e.maxValues)return;const n=!0===e.emitValue?o:t;i("add",{index:s.length,value:n}),s.push(n)}i("update:modelValue",s)}function Me(e){if(!0!==L.platform.is.desktop)return;const t=-1!==e&&e=0?Le.value(e.options[n]):F,!0))}}function Be(t,i){const n=e=>(0,v.Hv)(Ee.value(e),t);return e.options.find(n)||i.find(n)||t}function We(e){const t=Ee.value(e);return void 0!==Ie.value.find((e=>(0,v.Hv)(e,t)))}function He(t){!0===e.useInput&&null!==$.value&&(void 0===t||$.value===t.target&&t.target.value===pe.value)&&$.value.select()}function Ve(e){!0===(0,w.Dv)(e,27)&&!0===T.value&&((0,b.ds)(e),ut(),ht()),i("keyup",e)}function je(t){const{value:i}=t.target;if(void 0===t.keyCode)if(t.target.value="",null!==V&&(clearTimeout(V),V=null),null!==j&&(clearTimeout(j),j=null),ht(),"string"===typeof i&&0!==i.length){const t=i.toLocaleLowerCase(),n=i=>{const n=e.options.find((e=>i.value(e).toLocaleLowerCase()===t));return void 0!==n&&(-1===ae.value.indexOf(n)?Pe(n):ut(),!0)},o=e=>{!0!==n(Ee)&&!0!==n(Le)&&!0!==e&&Je(i,!0,(()=>o(!0)))};o()}else re.clearValue(t);else Ve(t)}function ze(e){i("keypress",e)}function Ue(t){if(i("keydown",t),!0===(0,w.JL)(t))return;const o=0!==D.value.length&&(void 0!==e.newValueMode||void 0!==e.onNewValue),s=!0!==t.shiftKey&&!0!==e.disableTabSelection&&!0!==e.multiple&&(-1!==R.value||!0===o);if(27===t.keyCode)return void(0,b.F4)(t);if(9===t.keyCode&&!1===s)return void ct();if(void 0===t.target||t.target.id!==re.targetUid.value||!0!==re.editable.value)return;if(40===t.keyCode&&!0!==re.innerLoading.value&&!1===T.value)return(0,b.Gu)(t),void dt();if(8===t.keyCode&&(!0===e.useChips||!0===e.clearable)&&!0!==e.hideSelected&&0===D.value.length)return void(!0===e.multiple&&!0===Array.isArray(e.modelValue)?Ne(e.modelValue.length-1):!0!==e.multiple&&null!==e.modelValue&&i("update:modelValue",null));35!==t.keyCode&&36!==t.keyCode||"string"===typeof D.value&&0!==D.value.length||((0,b.Gu)(t),R.value=-1,Fe(36===t.keyCode?1:-1,e.multiple)),33!==t.keyCode&&34!==t.keyCode||void 0===ee.value||((0,b.Gu)(t),R.value=Math.max(-1,Math.min(Z.value,R.value+(33===t.keyCode?-1:1)*ee.value.view)),Fe(33===t.keyCode?1:-1,e.multiple)),38!==t.keyCode&&40!==t.keyCode||((0,b.Gu)(t),Fe(38===t.keyCode?-1:1,e.multiple));const r=Z.value;if((void 0===W||H0&&!0!==e.useInput&&void 0!==t.key&&1===t.key.length&&!1===t.altKey&&!1===t.ctrlKey&&!1===t.metaKey&&(32!==t.keyCode||0!==W.length)){!0!==T.value&&dt(t);const i=t.key.toLocaleLowerCase(),o=1===W.length&&W[0]===i;H=Date.now()+1500,!1===o&&((0,b.Gu)(t),W+=i);const s=new RegExp("^"+W.split("").map((e=>-1!==k.indexOf(e)?"\\"+e:e)).join(".*"),"i");let a=R.value;if(!0===o||a<0||!0!==s.test(Le.value(e.options[a])))do{a=(0,y.eo)(a+1,-1,r-1)}while(a!==R.value&&(!0===Te.value(e.options[a])||!0!==s.test(Le.value(e.options[a]))));R.value!==a&&(0,n.dY)((()=>{Me(a),oe(a),a>=0&&!0===e.useInput&&!0===e.fillInput&&Ze(Le.value(e.options[a]),!0)}))}else if(13===t.keyCode||32===t.keyCode&&!0!==e.useInput&&""===W||9===t.keyCode&&!1!==s)if(9!==t.keyCode&&(0,b.Gu)(t),-1!==R.value&&R.value{if(i){if(!0!==S(i))return}else i=e.newValueMode;if(Xe("",!0!==e.multiple,!0),void 0===t||null===t)return;const n="toggle"===i?Pe:Oe;n(t,"add-unique"===i),!0!==e.multiple&&(null!==$.value&&$.value.focus(),ut())};if(void 0!==e.onNewValue?i("newValue",D.value,t):t(D.value),!0!==e.multiple)return}!0===T.value?ct():!0!==re.innerLoading.value&&dt()}}function $e(){return!0===P?G.value:null!==q.value&&null!==q.value.contentEl?q.value.contentEl:void 0}function qe(){return $e()}function Ke(){return!0===e.hideSelected?[]:void 0!==t["selected-item"]?we.value.map((e=>t["selected-item"](e))).slice():void 0!==t.selected?[].concat(t.selected()):!0===e.useChips?we.value.map(((t,i)=>(0,n.h)(c.A,{key:"option-"+i,removable:!0===re.editable.value&&!0!==Te.value(t.opt),dense:!0,textColor:e.color,tabindex:ve.value,onRemove(){t.removeAtIndex(i)}},(()=>(0,n.h)("span",{class:"ellipsis",[!0===t.html?"innerHTML":"textContent"]:Le.value(t.opt)}))))):[(0,n.h)("span",{[!0===_e.value?"innerHTML":"textContent"]:fe.value})]}function Ge(){if(!0===ge.value)return void 0!==t["no-option"]?t["no-option"]({inputValue:D.value}):void 0;const e=void 0!==t.option?t.option:e=>(0,n.h)(d.A,{key:e.index,...e.itemProps},(()=>(0,n.h)(u.A,(()=>(0,n.h)(h.A,(()=>(0,n.h)("span",{[!0===e.html?"innerHTML":"textContent"]:e.label})))))));let i=ie("div",Ce.value.map(e));return void 0!==t["before-options"]&&(i=t["before-options"]().concat(i)),(0,C.Hp)(t["after-options"],i)}function Qe(t,i){const o=!0===i?{...be.value,...re.splitAttrs.attributes.value}:void 0,s={ref:!0===i?$:void 0,key:"i_t",class:ue.value,style:e.inputStyle,value:void 0!==D.value?D.value:"",type:"search",...o,id:!0===i?re.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":!0===t||!0===e.autofocus||void 0,disabled:!0===e.disable,readonly:!0===e.readonly,...Re.value};return!0!==t&&!0===P&&(!0===Array.isArray(s.class)?s.class=[...s.class,"no-pointer-events"]:s.class+=" no-pointer-events"),(0,n.h)("input",s)}function Ye(t){null!==V&&(clearTimeout(V),V=null),null!==j&&(clearTimeout(j),j=null),t&&t.target&&!0===t.target.qComposing||(Ze(t.target.value||""),M=!0,F=D.value,!0===re.focused.value||!0===P&&!0!==N.value||re.focus(),void 0!==e.onFilter&&(V=setTimeout((()=>{V=null,Je(D.value)}),e.inputDebounce)))}function Ze(t,n){D.value!==t&&(D.value=t,!0===n||0===e.inputDebounce||"0"===e.inputDebounce?i("inputValue",t):j=setTimeout((()=>{j=null,i("inputValue",t)}),e.inputDebounce))}function Xe(t,i,n){M=!0!==n,!0===e.useInput&&(Ze(t,!0),!0!==i&&!0===n||(F=t),!0!==i&&Je(t))}function Je(t,o,s){if(void 0===e.onFilter||!0!==o&&!0!==re.focused.value)return;!0===re.innerLoading.value?i("filterAbort"):(re.innerLoading.value=!0,A.value=!0),""!==t&&!0!==e.multiple&&0!==ae.value.length&&!0!==M&&t===Le.value(ae.value[0])&&(t="");const a=setTimeout((()=>{!0===T.value&&(T.value=!1)}),10);null!==z&&clearTimeout(z),z=a,i("filter",t,((e,t)=>{!0!==o&&!0!==re.focused.value||z!==a||(clearTimeout(z),"function"===typeof e&&e(),A.value=!1,(0,n.dY)((()=>{re.innerLoading.value=!1,!0===re.editable.value&&(!0===o?!0===T.value&&ut():!0===T.value?gt(!0):T.value=!0),"function"===typeof t&&(0,n.dY)((()=>{t(r)})),"function"===typeof s&&(0,n.dY)((()=>{s(r)}))})))}),(()=>{!0===re.focused.value&&z===a&&(clearTimeout(z),re.innerLoading.value=!1,A.value=!1),!0===T.value&&(T.value=!1)}))}function et(){return(0,n.h)(g.A,{ref:q,class:he.value,style:e.popupContentStyle,modelValue:T.value,fit:!0!==e.menuShrink,cover:!0===e.optionsCover&&!0!==ge.value&&!0!==e.useInput,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:ce.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:e.popupNoRouteDismiss,square:ke.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...ye.value,onScrollPassive:ne,onBeforeShow:mt,onBeforeHide:tt,onShow:it},Ge)}function tt(e){_t(e),ct()}function it(){se()}function nt(e){(0,b.ds)(e),null!==$.value&&$.value.focus(),N.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function ot(e){(0,b.ds)(e),(0,n.dY)((()=>{N.value=!1}))}function st(){const i=[(0,n.h)(a,{class:`col-auto ${re.fieldClass.value}`,...le.value,for:re.targetUid.value,dark:ce.value,square:!0,loading:A.value,itemAligned:!1,filled:!0,stackLabel:0!==D.value.length,...re.splitAttrs.listeners.value,onFocus:nt,onBlur:ot},{...t,rawControl:()=>re.getControl(!0),before:void 0,after:void 0})];return!0===T.value&&i.push((0,n.h)("div",{ref:G,class:he.value+" scroll",style:e.popupContentStyle,...ye.value,onClick:b.F4,onScrollPassive:ne},Ge())),(0,n.h)(p.A,{ref:K,modelValue:I.value,position:!0===e.useInput?"top":void 0,transitionShow:B,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,noRouteDismiss:e.popupNoRouteDismiss,onBeforeShow:mt,onBeforeHide:rt,onHide:at,onShow:lt},(()=>(0,n.h)("div",{class:"q-select__dialog"+(!0===ce.value?" q-select__dialog--dark q-dark":"")+(!0===N.value?" q-select__dialog--focused":"")},i)))}function rt(e){_t(e),null!==K.value&&K.value.__updateRefocusTarget(re.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),re.focused.value=!1}function at(e){ut(),!1===re.focused.value&&i("blur",e),ht()}function lt(){const e=document.activeElement;null!==e&&e.id===re.targetUid.value||null===$.value||$.value===e||$.value.focus(),se()}function ct(){!0!==I.value&&(R.value=-1,!0===T.value&&(T.value=!1),!1===re.focused.value&&(null!==z&&(clearTimeout(z),z=null),!0===re.innerLoading.value&&(i("filterAbort"),re.innerLoading.value=!1,A.value=!1)))}function dt(i){!0===re.editable.value&&(!0===P?(re.onControlFocusin(i),I.value=!0,(0,n.dY)((()=>{re.focus()}))):re.focus(),void 0!==e.onFilter?Je(D.value):!0===ge.value&&void 0===t["no-option"]||(T.value=!0))}function ut(){I.value=!1,ct()}function ht(){!0===e.useInput&&Xe(!0!==e.multiple&&!0===e.fillInput&&0!==ae.value.length&&Le.value(ae.value[0])||"",!0,!0)}function gt(t){let i=-1;if(!0===t){if(0!==ae.value.length){const t=Ee.value(ae.value[0]);i=e.options.findIndex((e=>(0,v.Hv)(Ee.value(e),t)))}te(i)}Me(i)}function pt(e,t){!0===T.value&&!1===re.innerLoading.value&&(te(-1,!0),(0,n.dY)((()=>{!0===T.value&&!1===re.innerLoading.value&&(e>t?te():gt(!0))})))}function ft(){!1===I.value&&null!==q.value&&q.value.updatePosition()}function mt(e){void 0!==e&&(0,b.ds)(e),i("popupShow",e),re.hasPopupOpen=!0,re.onControlFocusin(e)}function _t(e){void 0!==e&&(0,b.ds)(e),i("popupHide",e),re.hasPopupOpen=!1,re.onControlFocusout(e)}function vt(){P=(!0===L.platform.is.mobile||"dialog"===e.behavior)&&("menu"!==e.behavior&&(!0!==e.useInput||(void 0!==t["no-option"]||void 0!==e.onFilter||!1===ge.value))),B=!0===L.platform.is.ios&&!0===P&&!0===e.useInput?"fade":e.transitionShow}return(0,n.wB)(ae,(t=>{O=t,!0===e.useInput&&!0===e.fillInput&&!0!==e.multiple&&!0!==re.innerLoading.value&&(!0!==I.value&&!0!==T.value||!0!==de.value)&&(!0!==M&&ht(),!0!==I.value&&!0!==T.value||Je(""))}),{immediate:!0}),(0,n.wB)((()=>e.fillInput),ht),(0,n.wB)(T,gt),(0,n.wB)(Z,pt),(0,n.Ic)(vt),(0,n.$u)(ft),vt(),(0,n.xo)((()=>{null!==V&&clearTimeout(V),null!==j&&clearTimeout(j)})),Object.assign(r,{showPopup:dt,hidePopup:ut,removeAtIndex:Ne,add:Oe,toggleOption:Pe,getOptionIndex:()=>R.value,setOptionIndex:Me,moveOptionSelection:Fe,filter:Je,updateMenuPosition:ft,updateInputValue:Xe,isOptionSelected:We,getEmittingOptionValue:De,isOptionDisabled:(...e)=>!0===Te.value.apply(null,e),getOptionValue:(...e)=>Ee.value.apply(null,e),getOptionLabel:(...e)=>Le.value.apply(null,e)}),Object.assign(re,{innerValue:ae,fieldClass:(0,n.EW)((()=>`q-select q-field--auto-height q-select--with${!0!==e.useInput?"out":""}-input q-select--with${!0!==e.useChips?"out":""}-chips q-select--`+(!0===e.multiple?"multiple":"single"))),inputRef:U,targetRef:$,hasValue:de,showPopup:dt,floatingLabel:(0,n.EW)((()=>!0!==e.hideSelected&&!0===de.value||"number"===typeof D.value||0!==D.value.length||(0,s.o9)(e.displayValue))),getControlChild:()=>{if(!1!==re.editable.value&&(!0===I.value||!0!==ge.value||void 0!==t["no-option"]))return!0===P?st():et();!0===re.hasPopupOpen&&(re.hasPopupOpen=!1)},controlEvents:{onFocusin(e){re.onControlFocusin(e)},onFocusout(e){re.onControlFocusout(e,(()=>{ht(),ct()}))},onClick(e){if((0,b.F4)(e),!0!==P&&!0===T.value)return ct(),void(null!==$.value&&$.value.focus());dt(e)}},getControl:t=>{const i=Ke(),o=!0===t||!0!==I.value||!0!==P;if(!0===e.useInput)i.push(Qe(t,o));else if(!0===re.editable.value){const s=!0===o?be.value:void 0;i.push((0,n.h)("input",{ref:!0===o?$:void 0,key:"d_t",class:"q-select__focus-target",id:!0===o?re.targetUid.value:void 0,value:fe.value,readonly:!0,"data-autofocus":!0===t||!0===e.autofocus||void 0,...s,onKeydown:Ue,onKeyup:Ve,onKeypress:ze})),!0===o&&"string"===typeof e.autocomplete&&0!==e.autocomplete.length&&i.push((0,n.h)("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:je}))}if(void 0!==Q.value&&!0!==e.disable&&0!==Ie.value.length){const t=Ie.value.map((e=>(0,n.h)("option",{value:e,selected:!0})));i.push((0,n.h)("select",{class:"hidden",name:Q.value,multiple:e.multiple},t))}const s=!0===e.useInput||!0!==o?void 0:re.splitAttrs.attributes.value;return(0,n.h)("div",{class:"q-field__native row items-center",...s,...re.splitAttrs.listeners.value},i)},getInnerAppend:()=>!0!==e.loading&&!0!==A.value&&!0!==e.hideDropdownIcon?[(0,n.h)(l.A,{class:"q-select__dropdown-icon"+(!0===T.value?" rotate-180":""),name:Se.value})]:null}),(0,s.Ay)(re)}})},10386:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(16372),s=i(29467);const r={true:"inset",item:"item-inset","item-thumbnail":"item-thumbnail-inset"},a={xs:2,sm:4,md:8,lg:16,xl:24},l=(0,s.a0)({name:"QSeparator",props:{...o.C,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(e){const t=(0,n.nI)(),i=(0,o.A)(e,t.proxy.$q),s=(0,n.EW)((()=>!0===e.vertical?"vertical":"horizontal")),l=(0,n.EW)((()=>` q-separator--${s.value}`)),c=(0,n.EW)((()=>!1!==e.inset?`${l.value}-${r[e.inset]}`:"")),d=(0,n.EW)((()=>`q-separator${l.value}${c.value}`+(void 0!==e.color?` bg-${e.color}`:"")+(!0===i.value?" q-separator--dark":""))),u=(0,n.EW)((()=>{const t={};if(void 0!==e.size&&(t[!0===e.vertical?"width":"height"]=e.size),!1!==e.spaced){const i=!0===e.spaced?`${a.md}px`:e.spaced in a?`${a[e.spaced]}px`:e.spaced,n=!0===e.vertical?["Left","Right"]:["Top","Bottom"];t[`margin${n[0]}`]=t[`margin${n[1]}`]=i}return t}));return()=>(0,n.h)("hr",{class:d.value,style:u.value,"aria-orientation":s.value})}})},93676:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(61758),o=i(29467);const s=(0,o.a0)({name:"QSpace",setup(){const e=(0,n.h)("div",{class:"q-space"});return()=>e}})},30564:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(61906);const s={size:{type:[String,Number],default:"1em"},color:String};function r(e){return{cSize:(0,n.EW)((()=>e.size in o.v0?`${o.v0[e.size]}px`:e.size)),classes:(0,n.EW)((()=>"q-spinner"+(e.color?` text-${e.color}`:"")))}}var a=i(29467);const l=(0,a.a0)({name:"QSpinner",props:{...s,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:i}=r(e);return()=>(0,n.h)("svg",{class:i.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[(0,n.h)("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}})},71746:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(31852),s=i(29467),r=i(65139);const a=(0,s.a0)({name:"QTabPanel",props:o.hb,setup(e,{slots:t}){return()=>(0,n.h)("div",{class:"q-tab-panel",role:"tabpanel"},(0,r.zm)(t.default))}})},39041:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(16372),s=i(31852),r=i(29467),a=i(65139);const l=(0,r.a0)({name:"QTabPanels",props:{...s.Qn,...o.C},emits:s.g,setup(e,{slots:t}){const i=(0,n.nI)(),r=(0,o.A)(e,i.proxy.$q),{updatePanelsList:l,getPanelContent:c,panelDirectives:d}=(0,s.Ay)(),u=(0,n.EW)((()=>"q-tab-panels q-panel-parent"+(!0===r.value?" q-tab-panels--dark q-dark":"")));return()=>(l(t),(0,a.Kf)("div",{class:u.value},c(),"pan",e.swipeable,(()=>d.value)))}})},39942:(e,t,i)=>{"use strict";i.d(t,{A:()=>ee});i(42958),i(10239);var n=i(61758),o=i(38734),s=i(50492),r=i(29467),a=i(65139);const l=(0,r.a0)({name:"QTh",props:{props:Object,autoWidth:Boolean},emits:["click"],setup(e,{slots:t,emit:i}){const o=(0,n.nI)(),{proxy:{$q:r}}=o,l=e=>{i("click",e)};return()=>{if(void 0===e.props)return(0,n.h)("th",{class:!0===e.autoWidth?"q-table--col-auto-width":"",onClick:l},(0,a.zm)(t.default));let i,c;const d=o.vnode.key;if(d){if(i=e.props.colsMap[d],void 0===i)return}else i=e.props.col;if(!0===i.sortable){const e="right"===i.align?"unshift":"push";c=(0,a.Ij)(t.default,[]),c[e]((0,n.h)(s.A,{class:i.__iconClass,name:r.iconSet.table.arrowUp}))}else c=(0,a.zm)(t.default);const u={class:i.__thClass+(!0===e.autoWidth?" q-table--col-auto-width":""),style:i.headerStyle,onClick:t=>{!0===i.sortable&&e.props.sort(i),l(t)}};return(0,n.h)("th",u,c)}}});var c=i(10386),d=i(53999),u=i(16372);const h=["horizontal","vertical","cell","none"],g=(0,r.a0)({name:"QMarkupTable",props:{...u.C,dense:Boolean,flat:Boolean,bordered:Boolean,square:Boolean,wrapCells:Boolean,separator:{type:String,default:"horizontal",validator:e=>h.includes(e)}},setup(e,{slots:t}){const i=(0,n.nI)(),o=(0,u.A)(e,i.proxy.$q),s=(0,n.EW)((()=>`q-markup-table q-table__container q-table__card q-table--${e.separator}-separator`+(!0===o.value?" q-table--dark q-table__card--dark q-dark":"")+(!0===e.dense?" q-table--dense":"")+(!0===e.flat?" q-table--flat":"")+(!0===e.bordered?" q-table--bordered":"")+(!0===e.square?" q-table--square":"")+(!1===e.wrapCells?" q-table--no-wrap":"")));return()=>(0,n.h)("div",{class:s.value},[(0,n.h)("table",{class:"q-table"},(0,a.zm)(t.default))])}});function p(e,t){return(0,n.h)("div",e,[(0,n.h)("table",{class:"q-table"},t)])}var f=i(31503),m=i(38336),_=i(22500);const v={list:d.A,table:g},b=["list","table","__qtable"],y=(0,r.a0)({name:"QVirtualScroll",props:{...f.AV,type:{type:String,default:"list",validator:e=>b.includes(e)},items:{type:Array,default:()=>[]},itemsFn:Function,itemsSize:Number,scrollTarget:m.cP},setup(e,{slots:t,attrs:i}){let s;const r=(0,o.KR)(null),l=(0,n.EW)((()=>e.itemsSize>=0&&void 0!==e.itemsFn?parseInt(e.itemsSize,10):Array.isArray(e.items)?e.items.length:0)),{virtualScrollSliceRange:c,localResetVirtualScroll:d,padVirtualScroll:u,onVirtualScrollEvt:h}=(0,f.Iq)({virtualScrollLength:l,getVirtualScrollTarget:C,getVirtualScrollEl:w}),g=(0,n.EW)((()=>{if(0===l.value)return[];const t=(e,t)=>({index:c.value.from+t,item:e});return void 0===e.itemsFn?e.items.slice(c.value.from,c.value.to).map(t):e.itemsFn(c.value.from,c.value.to-c.value.from).map(t)})),b=(0,n.EW)((()=>"q-virtual-scroll q-virtual-scroll"+(!0===e.virtualScrollHorizontal?"--horizontal":"--vertical")+(void 0!==e.scrollTarget?"":" scroll"))),y=(0,n.EW)((()=>void 0!==e.scrollTarget?{}:{tabindex:0}));function w(){return r.value.$el||r.value}function C(){return s}function S(){s=(0,m.hD)(w(),e.scrollTarget),s.addEventListener("scroll",h,_.mG.passive)}function k(){void 0!==s&&(s.removeEventListener("scroll",h,_.mG.passive),s=void 0)}function x(){let i=u("list"===e.type?"div":"tbody",g.value.map(t.default));return void 0!==t.before&&(i=t.before().concat(i)),(0,a.Hp)(t.after,i)}return(0,n.wB)(l,(()=>{d()})),(0,n.wB)((()=>e.scrollTarget),(()=>{k(),S()})),(0,n.KC)((()=>{d()})),(0,n.sV)((()=>{S()})),(0,n.n)((()=>{S()})),(0,n.Y4)((()=>{k()})),(0,n.xo)((()=>{k()})),()=>{if(void 0!==t.default)return"__qtable"===e.type?p({ref:r,class:"q-table__middle "+b.value},x()):(0,n.h)(v[e.type],{...i,ref:r,class:[i.class,b.value],...y.value},x);console.error("QVirtualScroll: default scoped slot is required for rendering")}}});var w=i(75848),C=i(35859),S=i(80460),k=i(1693),x=i(34848),E=i(15157);let L=0;const T={fullscreen:Boolean,noRouteFullscreenExit:Boolean},I=["update:fullscreen","fullscreen"];function R(){const e=(0,n.nI)(),{props:t,emit:i,proxy:s}=e;let r,a,l;const c=(0,o.KR)(!1);function d(){!0===c.value?h():u()}function u(){!0!==c.value&&(c.value=!0,l=s.$el.parentNode,l.replaceChild(a,s.$el),document.body.appendChild(s.$el),L++,1===L&&document.body.classList.add("q-body--fullscreen-mixin"),r={handler:h},x.A.add(r))}function h(){!0===c.value&&(void 0!==r&&(x.A.remove(r),r=void 0),l.replaceChild(s.$el,a),c.value=!1,L=Math.max(0,L-1),0===L&&(document.body.classList.remove("q-body--fullscreen-mixin"),void 0!==s.$el.scrollIntoView&&setTimeout((()=>{s.$el.scrollIntoView()}))))}return!0===(0,E.$b)(e)&&(0,n.wB)((()=>s.$route.fullPath),(()=>{!0!==t.noRouteFullscreenExit&&h()})),(0,n.wB)((()=>t.fullscreen),(e=>{c.value!==e&&d()})),(0,n.wB)(c,(e=>{i("update:fullscreen",e),i("fullscreen",e)})),(0,n.KC)((()=>{a=document.createElement("span")})),(0,n.sV)((()=>{!0===t.fullscreen&&u()})),(0,n.xo)(h),Object.assign(s,{toggleFullscreen:d,setFullscreen:u,exitFullscreen:h}),{inFullscreen:c,toggleFullscreen:d}}function D(e,t){return new Date(e)-new Date(t)}var N=i(1054);const A={sortMethod:Function,binaryStateSort:Boolean,columnSortOrder:{type:String,validator:e=>"ad"===e||"da"===e,default:"ad"}};function O(e,t,i,o){const s=(0,n.EW)((()=>{const{sortBy:e}=t.value;return e&&i.value.find((t=>t.name===e))||null})),r=(0,n.EW)((()=>void 0!==e.sortMethod?e.sortMethod:(e,t,n)=>{const o=i.value.find((e=>e.name===t));if(void 0===o||void 0===o.field)return e;const s=!0===n?-1:1,r="function"===typeof o.field?e=>o.field(e):e=>e[o.field];return e.sort(((e,t)=>{let i=r(e),n=r(t);return void 0!==o.rawSort?o.rawSort(i,n,e,t)*s:null===i||void 0===i?-1*s:null===n||void 0===n?1*s:void 0!==o.sort?o.sort(i,n,e,t)*s:!0===(0,N.Et)(i)&&!0===(0,N.Et)(n)?(i-n)*s:!0===(0,N.$P)(i)&&!0===(0,N.$P)(n)?D(i,n)*s:"boolean"===typeof i&&"boolean"===typeof n?(i-n)*s:([i,n]=[i,n].map((e=>(e+"").toLocaleString().toLowerCase())),ie.name===n));void 0!==e&&e.sortOrder&&(s=e.sortOrder)}let{sortBy:r,descending:a}=t.value;r!==n?(r=n,a="da"===s):!0===e.binaryStateSort?a=!a:!0===a?"ad"===s?r=null:a=!1:"ad"===s?a=!0:r=null,o({sortBy:r,descending:a,page:1})}return{columnToSort:s,computedSortMethod:r,sort:a}}const P={filter:[String,Object],filterMethod:Function};function M(e,t){const i=(0,n.EW)((()=>void 0!==e.filterMethod?e.filterMethod:(e,t,i,n)=>{const o=t?t.toLowerCase():"";return e.filter((e=>i.some((t=>{const i=n(t,e)+"",s="undefined"===i||"null"===i?"":i.toLowerCase();return-1!==s.indexOf(o)}))))}));return(0,n.wB)((()=>e.filter),(()=>{(0,n.dY)((()=>{t({page:1},!0)}))}),{deep:!0}),{computedFilterMethod:i}}function F(e,t){for(const i in t)if(t[i]!==e[i])return!1;return!0}function B(e){return e.page<1&&(e.page=1),void 0!==e.rowsPerPage&&e.rowsPerPage<1&&(e.rowsPerPage=0),e}const W={pagination:Object,rowsPerPageOptions:{type:Array,default:()=>[5,7,10,15,20,25,50,0]},"onUpdate:pagination":[Function,Array]};function H(e,t){const{props:i,emit:s}=e,r=(0,o.KR)(Object.assign({sortBy:null,descending:!1,page:1,rowsPerPage:0!==i.rowsPerPageOptions.length?i.rowsPerPageOptions[0]:5},i.pagination)),a=(0,n.EW)((()=>{const e=void 0!==i["onUpdate:pagination"]?{...r.value,...i.pagination}:r.value;return B(e)})),l=(0,n.EW)((()=>void 0!==a.value.rowsNumber));function c(e){d({pagination:e,filter:i.filter})}function d(e={}){(0,n.dY)((()=>{s("request",{pagination:e.pagination||a.value,filter:e.filter||i.filter,getCellValue:t})}))}function u(e,t){const n=B({...a.value,...e});!0!==F(a.value,n)?!0!==l.value?void 0!==i.pagination&&void 0!==i["onUpdate:pagination"]?s("update:pagination",n):r.value=n:c(n):!0===l.value&&!0===t&&c(n)}return{innerPagination:r,computedPagination:a,isServerSide:l,requestServerInteraction:d,setPagination:u}}function V(e,t,i,o,s,r){const{props:a,emit:l,proxy:{$q:c}}=e,d=(0,n.EW)((()=>!0===o.value?i.value.rowsNumber||0:r.value)),u=(0,n.EW)((()=>{const{page:e,rowsPerPage:t}=i.value;return(e-1)*t})),h=(0,n.EW)((()=>{const{page:e,rowsPerPage:t}=i.value;return e*t})),g=(0,n.EW)((()=>1===i.value.page)),p=(0,n.EW)((()=>0===i.value.rowsPerPage?1:Math.max(1,Math.ceil(d.value/i.value.rowsPerPage)))),f=(0,n.EW)((()=>0===h.value||i.value.page>=p.value)),m=(0,n.EW)((()=>{const e=a.rowsPerPageOptions.includes(t.value.rowsPerPage)?a.rowsPerPageOptions:[t.value.rowsPerPage].concat(a.rowsPerPageOptions);return e.map((e=>({label:0===e?c.lang.table.allRows:""+e,value:e})))}));function _(){s({page:1})}function v(){const{page:e}=i.value;e>1&&s({page:e-1})}function b(){const{page:e,rowsPerPage:t}=i.value;h.value>0&&e*t{if(e===t)return;const n=i.value.page;e&&!n?s({page:1}):e["single","multiple","none"].includes(e)},selected:{type:Array,default:()=>[]}},z=["update:selected","selection"];function U(e,t,i,o){const s=(0,n.EW)((()=>{const t={};return e.selected.map(o.value).forEach((e=>{t[e]=!0})),t})),r=(0,n.EW)((()=>"none"!==e.selection)),a=(0,n.EW)((()=>"single"===e.selection)),l=(0,n.EW)((()=>"multiple"===e.selection)),c=(0,n.EW)((()=>0!==i.value.length&&i.value.every((e=>!0===s.value[o.value(e)])))),d=(0,n.EW)((()=>!0!==c.value&&i.value.some((e=>!0===s.value[o.value(e)])))),u=(0,n.EW)((()=>e.selected.length));function h(e){return!0===s.value[e]}function g(){t("update:selected",[])}function p(i,n,s,r){t("selection",{rows:n,added:s,keys:i,evt:r});const l=!0===a.value?!0===s?n:[]:!0===s?e.selected.concat(n):e.selected.filter((e=>!1===i.includes(o.value(e))));t("update:selected",l)}return{hasSelectionMode:r,singleSelection:a,multipleSelection:l,allRowsSelected:c,someRowsSelected:d,rowsSelectedNumber:u,isRowSelected:h,clearSelection:g,updateSelection:p}}function $(e){return Array.isArray(e)?e.slice():[]}const q={expanded:Array},K=["update:expanded"];function G(e,t){const i=(0,o.KR)($(e.expanded));function s(e){return i.value.includes(e)}function r(n){void 0!==e.expanded?t("update:expanded",n):i.value=n}function a(e,t){const n=i.value.slice(),o=n.indexOf(e);!0===t?-1===o&&(n.push(e),r(n)):-1!==o&&(n.splice(o,1),r(n))}return(0,n.wB)((()=>e.expanded),(e=>{i.value=$(e)})),{isRowExpanded:s,setExpanded:r,updateExpanded:a}}const Q={visibleColumns:Array};function Y(e,t,i){const o=(0,n.EW)((()=>{if(void 0!==e.columns)return e.columns;const t=e.rows[0];return void 0!==t?Object.keys(t).map((e=>({name:e,label:e.toUpperCase(),field:e,align:(0,N.Et)(t[e])?"right":"left",sortable:!0}))):[]})),s=(0,n.EW)((()=>{const{sortBy:i,descending:n}=t.value,s=void 0!==e.visibleColumns?o.value.filter((t=>!0===t.required||!0===e.visibleColumns.includes(t.name))):o.value;return s.map((e=>{const t=e.align||"right",o=`text-${t}`;return{...e,align:t,__iconClass:`q-table__sort-icon q-table__sort-icon--${t}`,__thClass:o+(void 0!==e.headerClasses?" "+e.headerClasses:"")+(!0===e.sortable?" sortable":"")+(e.name===i?" sorted "+(!0===n?"sort-desc":""):""),__tdStyle:void 0!==e.style?"function"!==typeof e.style?()=>e.style:e.style:()=>null,__tdClass:void 0!==e.classes?"function"!==typeof e.classes?()=>o+" "+e.classes:t=>o+" "+e.classes(t):()=>o}}))})),r=(0,n.EW)((()=>{const e={};return s.value.forEach((t=>{e[t.name]=t})),e})),a=(0,n.EW)((()=>void 0!==e.tableColspan?e.tableColspan:s.value.length+(!0===i.value?1:0)));return{colList:o,computedCols:s,computedColsMap:r,computedColspan:a}}var Z=i(82453);const X="q-table__bottom row items-center",J={};f.kP.forEach((e=>{J[e]={}}));const ee=(0,r.a0)({name:"QTable",props:{rows:{type:Array,required:!0},rowKey:{type:[String,Function],default:"id"},columns:Array,loading:Boolean,iconFirstPage:String,iconPrevPage:String,iconNextPage:String,iconLastPage:String,title:String,hideHeader:Boolean,grid:Boolean,gridHeader:Boolean,dense:Boolean,flat:Boolean,bordered:Boolean,square:Boolean,separator:{type:String,default:"horizontal",validator:e=>["horizontal","vertical","cell","none"].includes(e)},wrapCells:Boolean,virtualScroll:Boolean,virtualScrollTarget:{},...J,noDataLabel:String,noResultsLabel:String,loadingLabel:String,selectedRowsLabel:Function,rowsPerPageLabel:String,paginationLabel:Function,color:{type:String,default:"grey-8"},titleClass:[String,Array,Object],tableStyle:[String,Array,Object],tableClass:[String,Array,Object],tableHeaderStyle:[String,Array,Object],tableHeaderClass:[String,Array,Object],cardContainerClass:[String,Array,Object],cardContainerStyle:[String,Array,Object],cardStyle:[String,Array,Object],cardClass:[String,Array,Object],hideBottom:Boolean,hideSelectedBanner:Boolean,hideNoData:Boolean,hidePagination:Boolean,onRowClick:Function,onRowDblclick:Function,onRowContextmenu:Function,...u.C,...T,...Q,...P,...W,...q,...j,...A},emits:["request","virtualScroll",...I,...K,...z],setup(e,{slots:t,emit:i}){const r=(0,n.nI)(),{proxy:{$q:a}}=r,d=(0,u.A)(e,a),{inFullscreen:h,toggleFullscreen:g}=R(),m=(0,n.EW)((()=>"function"===typeof e.rowKey?e.rowKey:t=>t[e.rowKey])),_=(0,o.KR)(null),v=(0,o.KR)(null),b=(0,n.EW)((()=>!0!==e.grid&&!0===e.virtualScroll)),x=(0,n.EW)((()=>" q-table__card"+(!0===d.value?" q-table__card--dark q-dark":"")+(!0===e.square?" q-table--square":"")+(!0===e.flat?" q-table--flat":"")+(!0===e.bordered?" q-table--bordered":""))),E=(0,n.EW)((()=>`q-table__container q-table--${e.separator}-separator column no-wrap`+(!0===e.grid?" q-table--grid":x.value)+(!0===d.value?" q-table--dark":"")+(!0===e.dense?" q-table--dense":"")+(!1===e.wrapCells?" q-table--no-wrap":"")+(!0===h.value?" fullscreen scroll":""))),L=(0,n.EW)((()=>E.value+(!0===e.loading?" q-table--loading":"")));(0,n.wB)((()=>e.tableStyle+e.tableClass+e.tableHeaderStyle+e.tableHeaderClass+E.value),(()=>{!0===b.value&&null!==v.value&&v.value.reset()}));const{innerPagination:T,computedPagination:I,isServerSide:D,requestServerInteraction:N,setPagination:A}=H(r,Me),{computedFilterMethod:P}=M(e,A),{isRowExpanded:F,setExpanded:B,updateExpanded:W}=G(e,i),j=(0,n.EW)((()=>{let t=e.rows;if(!0===D.value||0===t.length)return t;const{sortBy:i,descending:n}=I.value;return e.filter&&(t=P.value(t,e.filter,re.value,Me)),null!==ce.value&&(t=de.value(e.rows===t?t.slice():t,i,n)),t})),z=(0,n.EW)((()=>j.value.length)),$=(0,n.EW)((()=>{let t=j.value;if(!0===D.value)return t;const{rowsPerPage:i}=I.value;return 0!==i&&(0===he.value&&e.rows!==t?t.length>ge.value&&(t=t.slice(0,ge.value)):t=t.slice(he.value,ge.value)),t})),{hasSelectionMode:q,singleSelection:K,multipleSelection:Q,allRowsSelected:J,someRowsSelected:ee,rowsSelectedNumber:te,isRowSelected:ie,clearSelection:ne,updateSelection:oe}=U(e,i,$,m),{colList:se,computedCols:re,computedColsMap:ae,computedColspan:le}=Y(e,I,q),{columnToSort:ce,computedSortMethod:de,sort:ue}=O(e,I,se,A),{firstRowIndex:he,lastRowIndex:ge,isFirstPage:pe,isLastPage:fe,pagesNumber:me,computedRowsPerPageOptions:_e,computedRowsNumber:ve,firstPage:be,prevPage:ye,nextPage:we,lastPage:Ce}=V(r,T,I,D,A,z),Se=(0,n.EW)((()=>0===$.value.length)),ke=(0,n.EW)((()=>{const t={};return f.kP.forEach((i=>{t[i]=e[i]})),void 0===t.virtualScrollItemSize&&(t.virtualScrollItemSize=!0===e.dense?28:48),t}));function xe(){!0===b.value&&v.value.reset()}function Ee(){if(!0===e.grid)return Qe();const i=!0!==e.hideHeader?He:null;if(!0===b.value){const o=t["top-row"],s=t["bottom-row"],r={default:e=>Re(e.item,t.body,e.index)};if(void 0!==o){const e=(0,n.h)("tbody",o({cols:re.value}));r.before=null===i?()=>e:()=>[i()].concat(e)}else null!==i&&(r.before=i);return void 0!==s&&(r.after=()=>(0,n.h)("tbody",s({cols:re.value}))),(0,n.h)(y,{ref:v,class:e.tableClass,style:e.tableStyle,...ke.value,scrollTarget:e.virtualScrollTarget,items:$.value,type:"__qtable",tableColspan:le.value,onVirtualScroll:Te},r)}const o=[De()];return null!==i&&o.unshift(i()),p({class:["q-table__middle scroll",e.tableClass],style:e.tableStyle},o)}function Le(t,n){if(null!==v.value)return void v.value.scrollTo(t,n);t=parseInt(t,10);const o=_.value.querySelector(`tbody tr:nth-of-type(${t+1})`);if(null!==o){const n=_.value.querySelector(".q-table__middle.scroll"),s=o.offsetTop-e.virtualScrollStickySizeStart,r=s{const i=t[`body-cell-${e.name}`],s=void 0!==i?i:c;return void 0!==s?s(Ae({key:a,row:o,pageIndex:r,col:e})):(0,n.h)("td",{class:e.__tdClass(o),style:e.__tdStyle(o)},Me(e,o))}));if(!0===q.value){const i=t["body-selection"],s=void 0!==i?i(Oe({key:a,row:o,pageIndex:r})):[(0,n.h)(S.A,{modelValue:l,color:e.color,dark:d.value,dense:e.dense,"onUpdate:modelValue":(e,t)=>{oe([a],[o],e,t)}})];u.unshift((0,n.h)("td",{class:"q-table--col-auto-width"},s))}const h={key:a,class:{selected:l}};return void 0!==e.onRowClick&&(h.class["cursor-pointer"]=!0,h.onClick=e=>{i("rowClick",e,o,r)}),void 0!==e.onRowDblclick&&(h.class["cursor-pointer"]=!0,h.onDblclick=e=>{i("rowDblclick",e,o,r)}),void 0!==e.onRowContextmenu&&(h.class["cursor-pointer"]=!0,h.onContextmenu=e=>{i("rowContextmenu",e,o,r)}),(0,n.h)("tr",h,u)}function De(){const e=t.body,i=t["top-row"],o=t["bottom-row"];let s=$.value.map(((t,i)=>Re(t,e,i)));return void 0!==i&&(s=i({cols:re.value}).concat(s)),void 0!==o&&(s=s.concat(o({cols:re.value}))),(0,n.h)("tbody",s)}function Ne(e){return Pe(e),e.cols=e.cols.map((t=>(0,Z.$)({...t},"value",(()=>Me(t,e.row))))),e}function Ae(e){return Pe(e),(0,Z.$)(e,"value",(()=>Me(e.col,e.row))),e}function Oe(e){return Pe(e),e}function Pe(t){Object.assign(t,{cols:re.value,colsMap:ae.value,sort:ue,rowIndex:he.value+t.pageIndex,color:e.color,dark:d.value,dense:e.dense}),!0===q.value&&(0,Z.$)(t,"selected",(()=>ie(t.key)),((e,i)=>{oe([t.key],[t.row],e,i)})),(0,Z.$)(t,"expand",(()=>F(t.key)),(e=>{W(t.key,e)}))}function Me(e,t){const i="function"===typeof e.field?e.field(t):t[e.field];return void 0!==e.format?e.format(i,t):i}const Fe=(0,n.EW)((()=>({pagination:I.value,pagesNumber:me.value,isFirstPage:pe.value,isLastPage:fe.value,firstPage:be,prevPage:ye,nextPage:we,lastPage:Ce,inFullscreen:h.value,toggleFullscreen:g})));function Be(){const i=t.top,o=t["top-left"],s=t["top-right"],r=t["top-selection"],a=!0===q.value&&void 0!==r&&te.value>0,l="q-table__top relative-position row items-center";if(void 0!==i)return(0,n.h)("div",{class:l},[i(Fe.value)]);let c;return!0===a?c=r(Fe.value).slice():(c=[],void 0!==o?c.push((0,n.h)("div",{class:"q-table__control"},[o(Fe.value)])):e.title&&c.push((0,n.h)("div",{class:"q-table__control"},[(0,n.h)("div",{class:["q-table__title",e.titleClass]},e.title)]))),void 0!==s&&(c.push((0,n.h)("div",{class:"q-table__separator col"})),c.push((0,n.h)("div",{class:"q-table__control"},[s(Fe.value)]))),0!==c.length?(0,n.h)("div",{class:l},c):void 0}const We=(0,n.EW)((()=>!0===ee.value?null:J.value));function He(){const i=Ve();return!0===e.loading&&void 0===t.loading&&i.push((0,n.h)("tr",{class:"q-table__progress"},[(0,n.h)("th",{class:"relative-position",colspan:le.value},Ie())])),(0,n.h)("thead",i)}function Ve(){const i=t.header,o=t["header-cell"];if(void 0!==i)return i(je({header:!0})).slice();const s=re.value.map((e=>{const i=t[`header-cell-${e.name}`],s=void 0!==i?i:o,r=je({col:e});return void 0!==s?s(r):(0,n.h)(l,{key:e.name,props:r},(()=>e.label))}));if(!0===K.value&&!0!==e.grid)s.unshift((0,n.h)("th",{class:"q-table--col-auto-width"}," "));else if(!0===Q.value){const i=t["header-selection"],o=void 0!==i?i(je({})):[(0,n.h)(S.A,{color:e.color,modelValue:We.value,dark:d.value,dense:e.dense,"onUpdate:modelValue":ze})];s.unshift((0,n.h)("th",{class:"q-table--col-auto-width"},o))}return[(0,n.h)("tr",{class:e.tableHeaderClass,style:e.tableHeaderStyle},s)]}function je(t){return Object.assign(t,{cols:re.value,sort:ue,colsMap:ae.value,color:e.color,dark:d.value,dense:e.dense}),!0===Q.value&&(0,Z.$)(t,"selected",(()=>We.value),ze),t}function ze(e){!0===ee.value&&(e=!1),oe($.value.map(m.value),$.value,e)}const Ue=(0,n.EW)((()=>{const t=[e.iconFirstPage||a.iconSet.table.firstPage,e.iconPrevPage||a.iconSet.table.prevPage,e.iconNextPage||a.iconSet.table.nextPage,e.iconLastPage||a.iconSet.table.lastPage];return!0===a.lang.rtl?t.reverse():t}));function $e(){if(!0===e.hideBottom)return;if(!0===Se.value){if(!0===e.hideNoData)return;const i=!0===e.loading?e.loadingLabel||a.lang.table.loading:e.filter?e.noResultsLabel||a.lang.table.noResults:e.noDataLabel||a.lang.table.noData,o=t["no-data"],r=void 0!==o?[o({message:i,icon:a.iconSet.table.warning,filter:e.filter})]:[(0,n.h)(s.A,{class:"q-table__bottom-nodata-icon",name:a.iconSet.table.warning}),i];return(0,n.h)("div",{class:X+" q-table__bottom--nodata"},r)}const i=t.bottom;if(void 0!==i)return(0,n.h)("div",{class:X},[i(Fe.value)]);const o=!0!==e.hideSelectedBanner&&!0===q.value&&te.value>0?[(0,n.h)("div",{class:"q-table__control"},[(0,n.h)("div",[(e.selectedRowsLabel||a.lang.table.selectedRecords)(te.value)])])]:[];return!0!==e.hidePagination?(0,n.h)("div",{class:X+" justify-end"},Ke(o)):0!==o.length?(0,n.h)("div",{class:X},o):void 0}function qe(e){A({page:1,rowsPerPage:e.value})}function Ke(i){let o;const{rowsPerPage:s}=I.value,r=e.paginationLabel||a.lang.table.pagination,l=t.pagination,c=e.rowsPerPageOptions.length>1;if(i.push((0,n.h)("div",{class:"q-table__separator col"})),!0===c&&i.push((0,n.h)("div",{class:"q-table__control"},[(0,n.h)("span",{class:"q-table__bottom-item"},[e.rowsPerPageLabel||a.lang.table.recordsPerPage]),(0,n.h)(w.A,{class:"q-table__select inline q-table__bottom-item",color:e.color,modelValue:s,options:_e.value,displayValue:0===s?a.lang.table.allRows:s,dark:d.value,borderless:!0,dense:!0,optionsDense:!0,optionsCover:!0,"onUpdate:modelValue":qe})])),void 0!==l)o=l(Fe.value);else if(o=[(0,n.h)("span",0!==s?{class:"q-table__bottom-item"}:{},[s?r(he.value+1,Math.min(ge.value,ve.value),ve.value):r(1,z.value,ve.value)])],0!==s&&me.value>1){const t={color:e.color,round:!0,dense:!0,flat:!0};!0===e.dense&&(t.size="sm"),me.value>2&&o.push((0,n.h)(k.A,{key:"pgFirst",...t,icon:Ue.value[0],disable:pe.value,onClick:be})),o.push((0,n.h)(k.A,{key:"pgPrev",...t,icon:Ue.value[1],disable:pe.value,onClick:ye}),(0,n.h)(k.A,{key:"pgNext",...t,icon:Ue.value[2],disable:fe.value,onClick:we})),me.value>2&&o.push((0,n.h)(k.A,{key:"pgLast",...t,icon:Ue.value[3],disable:fe.value,onClick:Ce}))}return i.push((0,n.h)("div",{class:"q-table__control"},o)),i}function Ge(){const i=!0===e.gridHeader?[(0,n.h)("table",{class:"q-table"},[He(n.h)])]:!0===e.loading&&void 0===t.loading?Ie(n.h):void 0;return(0,n.h)("div",{class:"q-table__middle"},i)}function Qe(){const o=void 0!==t.item?t.item:o=>{const s=o.cols.map((e=>(0,n.h)("div",{class:"q-table__grid-item-row"},[(0,n.h)("div",{class:"q-table__grid-item-title"},[e.label]),(0,n.h)("div",{class:"q-table__grid-item-value"},[e.value])])));if(!0===q.value){const i=t["body-selection"],r=void 0!==i?i(o):[(0,n.h)(S.A,{modelValue:o.selected,color:e.color,dark:d.value,dense:e.dense,"onUpdate:modelValue":(e,t)=>{oe([o.key],[o.row],e,t)}})];s.unshift((0,n.h)("div",{class:"q-table__grid-item-row"},r),(0,n.h)(c.A,{dark:d.value}))}const r={class:["q-table__grid-item-card"+x.value,e.cardClass],style:e.cardStyle};return void 0===e.onRowClick&&void 0===e.onRowDblclick||(r.class[0]+=" cursor-pointer",void 0!==e.onRowClick&&(r.onClick=e=>{i("RowClick",e,o.row,o.pageIndex)}),void 0!==e.onRowDblclick&&(r.onDblclick=e=>{i("RowDblclick",e,o.row,o.pageIndex)})),(0,n.h)("div",{class:"q-table__grid-item col-xs-12 col-sm-6 col-md-4 col-lg-3"+(!0===o.selected?" q-table__grid-item--selected":"")},[(0,n.h)("div",r,s)])};return(0,n.h)("div",{class:["q-table__grid-content row",e.cardContainerClass],style:e.cardContainerStyle},$.value.map(((e,t)=>o(Ne({key:m.value(e),row:e,pageIndex:t})))))}return Object.assign(r.proxy,{requestServerInteraction:N,setPagination:A,firstPage:be,prevPage:ye,nextPage:we,lastPage:Ce,isRowSelected:ie,clearSelection:ne,isRowExpanded:F,setExpanded:B,sort:ue,resetVirtualScroll:xe,scrollTo:Le,getCellValue:Me}),(0,Z.M)(r.proxy,{filteredSortedRows:()=>j.value,computedRows:()=>$.value,computedRowsNumber:()=>ve.value}),()=>{const i=[Be()],o={ref:_,class:L.value};return!0===e.grid?i.push(Ge()):Object.assign(o,{class:[o.class,e.cardClass],style:e.cardStyle}),i.push(Ee(),$e()),!0===e.loading&&void 0!==t.loading&&i.push(t.loading()),(0,n.h)("div",o,i)}}})},45262:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QTd",props:{props:Object,autoWidth:Boolean,noHover:Boolean},setup(e,{slots:t}){const i=(0,n.nI)(),o=(0,n.EW)((()=>"q-td"+(!0===e.autoWidth?" q-table--col-auto-width":"")+(!0===e.noHover?" q-td--no-hover":"")+" "));return()=>{if(void 0===e.props)return(0,n.h)("td",{class:o.value},(0,s.zm)(t.default));const r=i.vnode.key,a=(void 0!==e.props.colsMap?e.props.colsMap[r]:null)||e.props.col;if(void 0===a)return;const{row:l}=e.props;return(0,n.h)("td",{class:o.value+a.__tdClass(l),style:a.__tdStyle(l)},(0,s.zm)(t.default))}}})},44488:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QTr",props:{props:Object,noHover:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-tr"+(void 0===e.props||!0===e.props.header?"":" "+e.props.__trClass)+(!0===e.noHover?" q-tr--no-hover":"")));return()=>(0,n.h)("tr",{class:i.value},(0,s.zm)(t.default))}})},10327:(e,t,i)=>{"use strict";i.d(t,{A:()=>v});i(10239);var n=i(61758),o=i(38734),s=i(50492),r=i(39626),a=i(65139),l=i(2906),c=i(27973),d=i(22500),u=i(85192),h=i(1054);let g=0;const p=["click","keydown"],f={icon:String,label:[Number,String],alert:[Boolean,String],alertIcon:String,name:{type:[Number,String],default:()=>"t_"+g++},noCaps:Boolean,tabindex:[String,Number],disable:Boolean,contentClass:String,ripple:{type:[Boolean,Object],default:!0}};function m(e,t,i,g){const p=(0,n.WQ)(c.Uv,c.U_);if(p===c.U_)return console.error("QTab/QRouteTab component needs to be child of QTabs"),c.U_;const{proxy:f}=(0,n.nI)(),m=(0,o.KR)(null),_=(0,o.KR)(null),v=(0,o.KR)(null),b=(0,n.EW)((()=>!0!==e.disable&&!1!==e.ripple&&Object.assign({keyCodes:[13,32],early:!0},!0===e.ripple?{}:e.ripple))),y=(0,n.EW)((()=>p.currentModel.value===e.name)),w=(0,n.EW)((()=>"q-tab relative-position self-stretch flex flex-center text-center"+(!0===y.value?" q-tab--active"+(p.tabProps.value.activeClass?" "+p.tabProps.value.activeClass:"")+(p.tabProps.value.activeColor?` text-${p.tabProps.value.activeColor}`:"")+(p.tabProps.value.activeBgColor?` bg-${p.tabProps.value.activeBgColor}`:""):" q-tab--inactive")+(e.icon&&e.label&&!1===p.tabProps.value.inlineLabel?" q-tab--full":"")+(!0===e.noCaps||!0===p.tabProps.value.noCaps?" q-tab--no-caps":"")+(!0===e.disable?" disabled":" q-focusable q-hoverable cursor-pointer")+(void 0!==g?g.linkClass.value:""))),C=(0,n.EW)((()=>"q-tab__content self-stretch flex-center relative-position q-anchor--skip non-selectable "+(!0===p.tabProps.value.inlineLabel?"row no-wrap q-tab__content--inline":"column")+(void 0!==e.contentClass?` ${e.contentClass}`:""))),S=(0,n.EW)((()=>!0===e.disable||!0===p.hasFocus.value||!1===y.value&&!0===p.hasActiveTab.value?-1:e.tabindex||0));function k(t,n){if(!0!==n&&null!==m.value&&m.value.focus(),!0!==e.disable){if(void 0===g)return p.updateModel({name:e.name}),void i("click",t);if(!0===g.hasRouterLink.value){const n=(i={})=>{let n;const o=void 0===i.to||!0===(0,h.Hv)(i.to,e.to)?p.avoidRouteWatcher=(0,u.A)():null;return g.navigateToRouterLink(t,{...i,returnRouterError:!0}).catch((e=>{n=e})).then((t=>{if(o===p.avoidRouteWatcher&&(p.avoidRouteWatcher=!1,void 0===n&&(void 0===t||void 0!==t.message&&!0===t.message.startsWith("Avoided redundant navigation"))&&p.updateModel({name:e.name})),!0===i.returnRouterError)return void 0!==n?Promise.reject(n):t}))};return i("click",t,n),void(!0!==t.defaultPrevented&&n())}i("click",t)}else void 0!==g&&!0===g.hasRouterLink.value&&(0,d.Gu)(t)}function x(e){(0,l.Dv)(e,[13,32])?k(e,!0):!0!==(0,l.JL)(e)&&e.keyCode>=35&&e.keyCode<=40&&!0!==e.altKey&&!0!==e.metaKey&&!0===p.onKbdNavigate(e.keyCode,f.$el)&&(0,d.Gu)(e),i("keydown",e)}function E(){const i=p.tabProps.value.narrowIndicator,o=[],r=(0,n.h)("div",{ref:v,class:["q-tab__indicator",p.tabProps.value.indicatorClass]});void 0!==e.icon&&o.push((0,n.h)(s.A,{class:"q-tab__icon",name:e.icon})),void 0!==e.label&&o.push((0,n.h)("div",{class:"q-tab__label"},e.label)),!1!==e.alert&&o.push(void 0!==e.alertIcon?(0,n.h)(s.A,{class:"q-tab__alert-icon",color:!0!==e.alert?e.alert:void 0,name:e.alertIcon}):(0,n.h)("div",{class:"q-tab__alert"+(!0!==e.alert?` text-${e.alert}`:"")})),!0===i&&o.push(r);const l=[(0,n.h)("div",{class:"q-focus-helper",tabindex:-1,ref:m}),(0,n.h)("div",{class:C.value},(0,a.Hp)(t.default,o))];return!1===i&&l.push(r),l}const L={name:(0,n.EW)((()=>e.name)),rootRef:_,tabIndicatorRef:v,routeData:g};function T(t,i){const o={ref:_,class:w.value,tabindex:S.value,role:"tab","aria-selected":!0===y.value?"true":"false","aria-disabled":!0===e.disable?"true":void 0,onClick:k,onKeydown:x,...i};return(0,n.bo)((0,n.h)(t,o,E()),[[r.A,b.value]])}return(0,n.xo)((()=>{p.unregisterTab(L)})),(0,n.sV)((()=>{p.registerTab(L)})),{renderTab:T,$tabs:p}}var _=i(29467);const v=(0,_.a0)({name:"QTab",props:f,emits:p,setup(e,{slots:t,emit:i}){const{renderTab:n}=m(e,t,i);return()=>n("div")}})},42980:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});i(10239);var n=i(61758),o=i(38734),s=i(50492),r=i(1096),a=i(46019),l=i(24667),c=i(29467),d=i(65139),u=i(27973),h=i(14897);function g(e,t,i){const n=!0===i?["left","right"]:["top","bottom"];return`absolute-${!0===t?n[0]:n[1]}${e?` text-${e}`:""}`}const p=["left","center","right","justify"],f=(0,c.a0)({name:"QTabs",props:{modelValue:[Number,String],align:{type:String,default:"center",validator:e=>p.includes(e)},breakpoint:{type:[String,Number],default:600},vertical:Boolean,shrink:Boolean,stretch:Boolean,activeClass:String,activeColor:String,activeBgColor:String,indicatorColor:String,leftIcon:String,rightIcon:String,outsideArrows:Boolean,mobileArrows:Boolean,switchIndicator:Boolean,narrowIndicator:Boolean,inlineLabel:Boolean,noCaps:Boolean,dense:Boolean,contentClass:String,"onUpdate:modelValue":[Function,Array]},setup(e,{slots:t,emit:i}){const{proxy:c}=(0,n.nI)(),{$q:p}=c,{registerTick:f}=(0,a.A)(),{registerTick:m}=(0,a.A)(),{registerTick:_}=(0,a.A)(),{registerTimeout:v,removeTimeout:b}=(0,l.A)(),{registerTimeout:y,removeTimeout:w}=(0,l.A)(),C=(0,o.KR)(null),S=(0,o.KR)(null),k=(0,o.KR)(e.modelValue),x=(0,o.KR)(!1),E=(0,o.KR)(!0),L=(0,o.KR)(!1),T=(0,o.KR)(!1),I=[],R=(0,o.KR)(0),D=(0,o.KR)(!1);let N,A=null,O=null;const P=(0,n.EW)((()=>({activeClass:e.activeClass,activeColor:e.activeColor,activeBgColor:e.activeBgColor,indicatorClass:g(e.indicatorColor,e.switchIndicator,e.vertical),narrowIndicator:e.narrowIndicator,inlineLabel:e.inlineLabel,noCaps:e.noCaps}))),M=(0,n.EW)((()=>{const e=R.value,t=k.value;for(let i=0;i{const t=!0===x.value?"left":!0===T.value?"justify":e.align;return`q-tabs__content--align-${t}`})),B=(0,n.EW)((()=>`q-tabs row no-wrap items-center q-tabs--${!0===x.value?"":"not-"}scrollable q-tabs--`+(!0===e.vertical?"vertical":"horizontal")+" q-tabs__arrows--"+(!0===e.outsideArrows?"outside":"inside")+` q-tabs--mobile-with${!0===e.mobileArrows?"":"out"}-arrows`+(!0===e.dense?" q-tabs--dense":"")+(!0===e.shrink?" col-shrink":"")+(!0===e.stretch?" self-stretch":""))),W=(0,n.EW)((()=>"q-tabs__content scroll--mobile row no-wrap items-center self-stretch hide-scrollbar relative-position "+F.value+(void 0!==e.contentClass?` ${e.contentClass}`:""))),H=(0,n.EW)((()=>!0===e.vertical?{container:"height",content:"offsetHeight",scroll:"scrollHeight"}:{container:"width",content:"offsetWidth",scroll:"scrollWidth"})),V=(0,n.EW)((()=>!0!==e.vertical&&!0===p.lang.rtl)),j=(0,n.EW)((()=>!1===h.E&&!0===V.value));function z({name:t,setCurrent:n,skipEmit:o}){k.value!==t&&(!0!==o&&void 0!==e["onUpdate:modelValue"]&&i("update:modelValue",t),!0!==n&&void 0!==e["onUpdate:modelValue"]||(q(k.value,t),k.value=t))}function U(){f((()=>{$({width:C.value.offsetWidth,height:C.value.offsetHeight})}))}function $(t){if(void 0===H.value||null===S.value)return;const i=t[H.value.container],n=Math.min(S.value[H.value.scroll],Array.prototype.reduce.call(S.value.children,((e,t)=>e+(t[H.value.content]||0)),0)),o=i>0&&n>i;x.value=o,!0===o&&m(G),T.value=ie.name.value===t)):null,o=void 0!==i&&null!==i&&""!==i?I.find((e=>e.name.value===i)):null;if(!0===ge)ge=!1;else if(n&&o){const t=n.tabIndicatorRef.value,i=o.tabIndicatorRef.value;null!==A&&(clearTimeout(A),A=null),t.style.transition="none",t.style.transform="none",i.style.transition="none",i.style.transform="none";const s=t.getBoundingClientRect(),r=i.getBoundingClientRect();i.style.transform=!0===e.vertical?`translate3d(0,${s.top-r.top}px,0) scale3d(1,${r.height?s.height/r.height:1},1)`:`translate3d(${s.left-r.left}px,0,0) scale3d(${r.width?s.width/r.width:1},1,1)`,_((()=>{A=setTimeout((()=>{A=null,i.style.transition="transform .25s cubic-bezier(.4, 0, .2, 1)",i.style.transform="none"}),70)}))}o&&!0===x.value&&K(o.rootRef.value)}function K(t){const{left:i,width:n,top:o,height:s}=S.value.getBoundingClientRect(),r=t.getBoundingClientRect();let a=!0===e.vertical?r.top-o:r.left-i;if(a<0)return S.value[!0===e.vertical?"scrollTop":"scrollLeft"]+=Math.floor(a),void G();a+=!0===e.vertical?r.height-s:r.width-n,a>0&&(S.value[!0===e.vertical?"scrollTop":"scrollLeft"]+=Math.ceil(a),G())}function G(){const t=S.value;if(null===t)return;const i=t.getBoundingClientRect(),n=!0===e.vertical?t.scrollTop:Math.abs(t.scrollLeft);!0===V.value?(E.value=Math.ceil(n+i.width)0):(E.value=n>0,L.value=!0===e.vertical?Math.ceil(n+i.height){!0===te(e)&&X()}),5)}function Y(){Q(!0===j.value?Number.MAX_SAFE_INTEGER:0)}function Z(){Q(!0===j.value?0:Number.MAX_SAFE_INTEGER)}function X(){null!==O&&(clearInterval(O),O=null)}function J(t,i){const n=Array.prototype.filter.call(S.value.children,(e=>e===i||e.matches&&!0===e.matches(".q-tab.q-focusable"))),o=n.length;if(0===o)return;if(36===t)return K(n[0]),n[0].focus(),!0;if(35===t)return K(n[o-1]),n[o-1].focus(),!0;const s=t===(!0===e.vertical?38:37),r=t===(!0===e.vertical?40:39),a=!0===s?-1:!0===r?1:void 0;if(void 0!==a){const e=!0===V.value?-1:1,t=n.indexOf(i)+a*e;return t>=0&&te.modelValue),(e=>{z({name:e,setCurrent:!0,skipEmit:!0})})),(0,n.wB)((()=>e.outsideArrows),U);const ee=(0,n.EW)((()=>!0===j.value?{get:e=>Math.abs(e.scrollLeft),set:(e,t)=>{e.scrollLeft=-t}}:!0===e.vertical?{get:e=>e.scrollTop,set:(e,t)=>{e.scrollTop=t}}:{get:e=>e.scrollLeft,set:(e,t)=>{e.scrollLeft=t}}));function te(e){const t=S.value,{get:i,set:n}=ee.value;let o=!1,s=i(t);const r=e=e)&&(o=!0,s=e),n(t,s),G(),o}function ie(e,t){for(const i in e)if(e[i]!==t[i])return!1;return!0}function ne(){let e=null,t={matchedLen:0,queryDiff:9999,hrefLen:0};const i=I.filter((e=>void 0!==e.routeData&&!0===e.routeData.hasRouterLink.value)),{hash:n,query:o}=c.$route,s=Object.keys(o).length;for(const r of i){const i=!0===r.routeData.exact.value;if(!0!==r.routeData[!0===i?"linkIsExactActive":"linkIsActive"].value)continue;const{hash:a,query:l,matched:c,href:d}=r.routeData.resolvedLink.value,u=Object.keys(l).length;if(!0===i){if(a!==n)continue;if(u!==s||!1===ie(o,l))continue;e=r.name.value;break}if(""!==a&&a!==n)continue;if(0!==u&&!1===ie(l,o))continue;const h={matchedLen:c.length,queryDiff:s-u,hrefLen:d.length-a.length};if(h.matchedLen>t.matchedLen)e=r.name.value,t=h;else if(h.matchedLen===t.matchedLen){if(h.queryDifft.hrefLen&&(e=r.name.value,t=h)}}null!==e||!0!==I.some((e=>void 0===e.routeData&&e.name.value===k.value))?z({name:e,setCurrent:!0}):ge=!1}function oe(e){if(b(),!0!==D.value&&null!==C.value&&e.target&&"function"===typeof e.target.closest){const t=e.target.closest(".q-tab");t&&!0===C.value.contains(t)&&(D.value=!0,!0===x.value&&K(t))}}function se(){v((()=>{D.value=!1}),30)}function re(){!1===de.avoidRouteWatcher?y(ne):w()}function ae(){if(void 0===N){const e=(0,n.wB)((()=>c.$route.fullPath),re);N=()=>{e(),N=void 0}}}function le(e){I.push(e),R.value++,U(),void 0===e.routeData||void 0===c.$route?y((()=>{if(!0===x.value){const e=k.value,t=void 0!==e&&null!==e&&""!==e?I.find((t=>t.name.value===e)):null;t&&K(t.rootRef.value)}})):(ae(),!0===e.routeData.hasRouterLink.value&&re())}function ce(e){I.splice(I.indexOf(e),1),R.value--,U(),void 0!==N&&void 0!==e.routeData&&(!0===I.every((e=>void 0===e.routeData))&&N(),re())}const de={currentModel:k,tabProps:P,hasFocus:D,hasActiveTab:M,registerTab:le,unregisterTab:ce,verifyRouteModel:re,updateModel:z,onKbdNavigate:J,avoidRouteWatcher:!1};function ue(){null!==A&&clearTimeout(A),X(),void 0!==N&&N()}let he,ge;return(0,n.Gt)(u.Uv,de),(0,n.xo)(ue),(0,n.Y4)((()=>{he=void 0!==N,ue()})),(0,n.n)((()=>{!0===he&&(ae(),ge=!0,re()),U()})),()=>(0,n.h)("div",{ref:C,class:B.value,role:"tablist",onFocusin:oe,onFocusout:se},[(0,n.h)(r.A,{onResize:$}),(0,n.h)("div",{ref:S,class:W.value,onScroll:G},(0,d.zm)(t.default)),(0,n.h)(s.A,{class:"q-tabs__arrow q-tabs__arrow--left absolute q-tab__icon"+(!0===E.value?"":" q-tabs__arrow--faded"),name:e.leftIcon||p.iconSet.tabs[!0===e.vertical?"up":"left"],onMousedownPassive:Y,onTouchstartPassive:Y,onMouseupPassive:X,onMouseleavePassive:X,onTouchendPassive:X}),(0,n.h)(s.A,{class:"q-tabs__arrow q-tabs__arrow--right absolute q-tab__icon"+(!0===L.value?"":" q-tabs__arrow--faded"),name:e.rightIcon||p.iconSet.tabs[!0===e.vertical?"down":"right"],onMousedownPassive:Z,onTouchstartPassive:Z,onMouseupPassive:X,onMouseleavePassive:X,onTouchendPassive:X})])}})},66908:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(50492),s=i(80003),r=i(29467);const a=(0,r.a0)({name:"QToggle",props:{...s.jh,icon:String,iconColor:String},emits:s.LA,setup(e){function t(t,i){const s=(0,n.EW)((()=>(!0===t.value?e.checkedIcon:!0===i.value?e.indeterminateIcon:e.uncheckedIcon)||e.icon)),r=(0,n.EW)((()=>!0===t.value?e.iconColor:null));return()=>[(0,n.h)("div",{class:"q-toggle__track"}),(0,n.h)("div",{class:"q-toggle__thumb absolute flex flex-center no-wrap"},void 0!==s.value?[(0,n.h)(o.A,{name:s.value,color:r.value})]:void 0)]}return(0,s.Ay)("toggle",t)}})},36914:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QToolbar",props:{inset:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-toolbar row no-wrap items-center"+(!0===e.inset?" q-toolbar--inset":"")));return()=>(0,n.h)("div",{class:i.value,role:"toolbar"},(0,s.zm)(t.default))}})},39150:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QToolbarTitle",props:{shrink:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-toolbar__title ellipsis"+(!0===e.shrink?" col-shrink":"")));return()=>(0,n.h)("div",{class:i.value},(0,s.zm)(t.default))}})},31503:(e,t,i)=>{"use strict";i.d(t,{AV:()=>v,Iq:()=>b,kP:()=>_});i(10239);var n=i(61758),o=i(38734),s=i(53500),r=i(22500),a=i(14897);const l=1e3,c=["start","center","end","start-force","center-force","end-force"],d=Array.prototype.filter,u=void 0===window.getComputedStyle(document.body).overflowAnchor?r.lQ:function(e,t){null!==e&&(void 0!==e._qOverflowAnimationFrame&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame((()=>{if(null===e)return;e._qOverflowAnimationFrame=void 0;const i=e.children||[];d.call(i,(e=>e.dataset&&void 0!==e.dataset.qVsAnchor)).forEach((e=>{delete e.dataset.qVsAnchor}));const n=i[t];n&&n.dataset&&(n.dataset.qVsAnchor="")})))};function h(e,t){return e+t}function g(e,t,i,n,o,s,r,l){const c=e===window?document.scrollingElement||document.documentElement:e,d=!0===o?"offsetWidth":"offsetHeight",u={scrollStart:0,scrollViewSize:-r-l,scrollMaxSize:0,offsetStart:-r,offsetEnd:-l};if(!0===o?(e===window?(u.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,u.scrollViewSize+=document.documentElement.clientWidth):(u.scrollStart=c.scrollLeft,u.scrollViewSize+=c.clientWidth),u.scrollMaxSize=c.scrollWidth,!0===s&&(u.scrollStart=(!0===a.E?u.scrollMaxSize-u.scrollViewSize:0)-u.scrollStart)):(e===window?(u.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,u.scrollViewSize+=document.documentElement.clientHeight):(u.scrollStart=c.scrollTop,u.scrollViewSize+=c.clientHeight),u.scrollMaxSize=c.scrollHeight),null!==i)for(let a=i.previousElementSibling;null!==a;a=a.previousElementSibling)!1===a.classList.contains("q-virtual-scroll--skip")&&(u.offsetStart+=a[d]);if(null!==n)for(let a=n.nextElementSibling;null!==a;a=a.nextElementSibling)!1===a.classList.contains("q-virtual-scroll--skip")&&(u.offsetEnd+=a[d]);if(t!==e){const i=c.getBoundingClientRect(),n=t.getBoundingClientRect();!0===o?(u.offsetStart+=n.left-i.left,u.offsetEnd-=n.width):(u.offsetStart+=n.top-i.top,u.offsetEnd-=n.height),e!==window&&(u.offsetStart+=u.scrollStart),u.offsetEnd+=u.scrollMaxSize-u.offsetStart}return u}function p(e,t,i,n){"end"===t&&(t=(e===window?document.body:e)[!0===i?"scrollWidth":"scrollHeight"]),e===window?!0===i?(!0===n&&(t=(!0===a.E?document.body.scrollWidth-document.documentElement.clientWidth:0)-t),window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):!0===i?(!0===n&&(t=(!0===a.E?e.scrollWidth-e.offsetWidth:0)-t),e.scrollLeft=t):e.scrollTop=t}function f(e,t,i,n){if(i>=n)return 0;const o=t.length,s=Math.floor(i/l),r=Math.floor((n-1)/l)+1;let a=e.slice(s,r).reduce(h,0);return i%l!==0&&(a-=t.slice(s*l,i).reduce(h,0)),n%l!==0&&n!==o&&(a-=t.slice(n,r*l).reduce(h,0)),a}const m={virtualScrollSliceSize:{type:[Number,String],default:10},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]},_=Object.keys(m),v={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...m};function b({virtualScrollLength:e,getVirtualScrollTarget:t,getVirtualScrollEl:i,virtualScrollItemSizeComputed:r}){const a=(0,n.nI)(),{props:m,emit:_,proxy:v}=a,{$q:b}=v;let y,w,C,S,k=[];const x=(0,o.KR)(0),E=(0,o.KR)(0),L=(0,o.KR)({}),T=(0,o.KR)(null),I=(0,o.KR)(null),R=(0,o.KR)(null),D=(0,o.KR)({from:0,to:0}),N=(0,n.EW)((()=>void 0!==m.tableColspan?m.tableColspan:100));void 0===r&&(r=(0,n.EW)((()=>m.virtualScrollItemSize)));const A=(0,n.EW)((()=>r.value+";"+m.virtualScrollHorizontal)),O=(0,n.EW)((()=>A.value+";"+m.virtualScrollSliceRatioBefore+";"+m.virtualScrollSliceRatioAfter));function P(){j(w,!0)}function M(e){j(void 0===e?w:e)}function F(n,o){const s=t();if(void 0===s||null===s||8===s.nodeType)return;const r=g(s,i(),T.value,I.value,m.virtualScrollHorizontal,b.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd);C!==r.scrollViewSize&&z(r.scrollViewSize),W(s,r,Math.min(e.value-1,Math.max(0,parseInt(n,10)||0)),0,-1!==c.indexOf(o)?o:-1!==w&&n>w?"end":"start")}function B(){const n=t();if(void 0===n||null===n||8===n.nodeType)return;const o=g(n,i(),T.value,I.value,m.virtualScrollHorizontal,b.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd),s=e.value-1,r=o.scrollMaxSize-o.offsetStart-o.offsetEnd-E.value;if(y===o.scrollStart)return;if(o.scrollMaxSize<=0)return void W(n,o,0,0);C!==o.scrollViewSize&&z(o.scrollViewSize),H(D.value.from);const a=Math.floor(o.scrollMaxSize-Math.max(o.scrollViewSize,o.offsetEnd)-Math.min(S[s],o.scrollViewSize/2));if(a>0&&Math.ceil(o.scrollStart)>=a)return void W(n,o,s,o.scrollMaxSize-o.offsetEnd-k.reduce(h,0));let c=0,d=o.scrollStart-o.offsetStart,u=d;if(d<=r&&d+o.scrollViewSize>=x.value)d-=x.value,c=D.value.from,u=d;else for(let e=0;d>=k[e]&&c0&&c-o.scrollViewSize?(c++,u=d):u=S[c]+d;W(n,o,c,u)}function W(t,i,n,o,s){const r="string"===typeof s&&-1!==s.indexOf("-force"),a=!0===r?s.replace("-force",""):s,l=void 0!==a?a:"start";let c=Math.max(0,n-L.value[l]),d=c+L.value.total;d>e.value&&(d=e.value,c=Math.max(0,d-L.value.total)),y=i.scrollStart;const g=c!==D.value.from||d!==D.value.to;if(!1===g&&void 0===a)return void $(n);const{activeElement:_}=document,v=R.value;!0===g&&null!==v&&v!==_&&!0===v.contains(_)&&(v.addEventListener("focusout",V),setTimeout((()=>{null!==v&&v.removeEventListener("focusout",V)}))),u(v,n-c);const w=void 0!==a?S.slice(c,n).reduce(h,0):0;if(!0===g){const t=d>=D.value.from&&c<=D.value.to?D.value.to:d;D.value={from:c,to:t},x.value=f(k,S,0,c),E.value=f(k,S,d,e.value),requestAnimationFrame((()=>{D.value.to!==d&&y===i.scrollStart&&(D.value={from:D.value.from,to:d},E.value=f(k,S,d,e.value))}))}requestAnimationFrame((()=>{if(y!==i.scrollStart)return;!0===g&&H(c);const e=S.slice(c,n).reduce(h,0),s=e+i.offsetStart+x.value,l=s+S[n];let d=s+o;if(void 0!==a){const t=e-w,o=i.scrollStart+t;d=!0!==r&&oe.classList&&!1===e.classList.contains("q-virtual-scroll--skip"))),n=i.length,o=!0===m.virtualScrollHorizontal?e=>e.getBoundingClientRect().width:e=>e.offsetHeight;let s,r,a=e;for(let e=0;e=s;n--)S[n]=o;const a=Math.floor((e.value-1)/l);k=[];for(let n=0;n<=a;n++){let t=0;const i=Math.min((n+1)*l,e.value);for(let e=n*l;e=0?(H(D.value.from),(0,n.dY)((()=>{F(t)}))):q()}function z(e){if(void 0===e&&"undefined"!==typeof window){const n=t();void 0!==n&&null!==n&&8!==n.nodeType&&(e=g(n,i(),T.value,I.value,m.virtualScrollHorizontal,b.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd).scrollViewSize)}C=e;const n=parseFloat(m.virtualScrollSliceRatioBefore)||0,o=parseFloat(m.virtualScrollSliceRatioAfter)||0,s=1+n+o,a=void 0===e||e<=0?1:Math.ceil(e/r.value),l=Math.max(1,a,Math.ceil((m.virtualScrollSliceSize>0?m.virtualScrollSliceSize:10)/s));L.value={total:Math.ceil(l*s),start:Math.ceil(l*n),center:Math.ceil(l*(.5+n)),end:Math.ceil(l*(1+n)),view:a}}function U(e,t){const i=!0===m.virtualScrollHorizontal?"width":"height",o={["--q-virtual-scroll-item-"+i]:r.value+"px"};return["tbody"===e?(0,n.h)(e,{class:"q-virtual-scroll__padding",key:"before",ref:T},[(0,n.h)("tr",[(0,n.h)("td",{style:{[i]:`${x.value}px`,...o},colspan:N.value})])]):(0,n.h)(e,{class:"q-virtual-scroll__padding",key:"before",ref:T,style:{[i]:`${x.value}px`,...o}}),(0,n.h)(e,{class:"q-virtual-scroll__content",key:"content",ref:R,tabindex:-1},t.flat()),"tbody"===e?(0,n.h)(e,{class:"q-virtual-scroll__padding",key:"after",ref:I},[(0,n.h)("tr",[(0,n.h)("td",{style:{[i]:`${E.value}px`,...o},colspan:N.value})])]):(0,n.h)(e,{class:"q-virtual-scroll__padding",key:"after",ref:I,style:{[i]:`${E.value}px`,...o}})]}function $(e){w!==e&&(void 0!==m.onVirtualScroll&&_("virtualScroll",{index:e,from:D.value.from,to:D.value.to-1,direction:e{z()})),(0,n.wB)(A,P),z();const q=(0,s.A)(B,!0===b.platform.is.ios?120:35);(0,n.KC)((()=>{z()}));let K=!1;return(0,n.Y4)((()=>{K=!0})),(0,n.n)((()=>{if(!0!==K)return;const e=t();void 0!==y&&void 0!==e&&null!==e&&8!==e.nodeType?p(e,y,m.virtualScrollHorizontal,b.lang.rtl):F(w)})),(0,n.xo)((()=>{q.cancel()})),Object.assign(v,{scrollTo:F,reset:P,refresh:M}),{virtualScrollSliceRange:D,virtualScrollSliceSizeComputed:L,setVirtualScrollSize:z,onVirtualScrollEvt:q,localResetVirtualScroll:j,padVirtualScroll:U,scrollTo:F,reset:P,refresh:M}}},20018:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>a,fR:()=>r});var n=i(61758);const o={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},s=Object.keys(o),r={align:{type:String,validator:e=>s.includes(e)}};function a(e){return(0,n.EW)((()=>{const t=void 0===e.align?!0===e.vertical?"stretch":"left":e.align;return`${!0===e.vertical?"items":"justify"}-${o[t]}`}))}},16372:(e,t,i)=>{"use strict";i.d(t,{A:()=>s,C:()=>o});var n=i(61758);const o={dark:{type:Boolean,default:null}};function s(e,t){return(0,n.EW)((()=>null===e.dark?t.dark.isActive:e.dark))}},7617:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>A,o9:()=>T,mU:()=>D,OJ:()=>R,$7:()=>N});i(10239);var n=i(61758),o=i(38734),s=i(29104),r=i(50492),a=i(30564),l=i(74915);const c=/^on[A-Z]/;function d(){const{attrs:e,vnode:t}=(0,n.nI)(),i={listeners:(0,o.KR)({}),attributes:(0,o.KR)({})};function s(){const n={},o={};for(const t in e)"class"!==t&&"style"!==t&&!1===c.test(t)&&(n[t]=e[t]);for(const e in t.props)!0===c.test(e)&&(o[e]=t.props[e]);i.attributes.value=n,i.listeners.value=o}return(0,n.Ic)(s),s(),i}var u=i(16372),h=i(27973);function g({validate:e,resetValidation:t,requiresQForm:i}){const o=(0,n.WQ)(h.q3,!1);if(!1!==o){const{props:i,proxy:s}=(0,n.nI)();Object.assign(s,{validate:e,resetValidation:t}),(0,n.wB)((()=>i.disable),(e=>{!0===e?("function"===typeof t&&t(),o.unbindComponent(s)):o.bindComponent(s)})),(0,n.sV)((()=>{!0!==i.disable&&o.bindComponent(s)})),(0,n.xo)((()=>{!0!==i.disable&&o.unbindComponent(s)}))}else!0===i&&console.error("Parent QForm not found on useFormChild()!")}const p=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,f=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,m=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,_=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,v=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,b={date:e=>/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),time:e=>/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),fulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),timeOrFulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),email:e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),hexColor:e=>p.test(e),hexaColor:e=>f.test(e),hexOrHexaColor:e=>m.test(e),rgbColor:e=>_.test(e),rgbaColor:e=>v.test(e),rgbOrRgbaColor:e=>_.test(e)||v.test(e),hexOrRgbColor:e=>p.test(e)||_.test(e),hexaOrRgbaColor:e=>f.test(e)||v.test(e),anyColor:e=>m.test(e)||_.test(e)||v.test(e)};var y=i(53500),w=i(82453);const C=[!0,!1,"ondemand"],S={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>C.includes(e)}};function k(e,t){const{props:i,proxy:s}=(0,n.nI)(),r=(0,o.KR)(!1),a=(0,o.KR)(null),l=(0,o.KR)(!1);g({validate:v,resetValidation:_});let c,d=0;const u=(0,n.EW)((()=>void 0!==i.rules&&null!==i.rules&&0!==i.rules.length)),h=(0,n.EW)((()=>!0!==i.disable&&!0===u.value&&!1===t.value)),p=(0,n.EW)((()=>!0===i.error||!0===r.value)),f=(0,n.EW)((()=>"string"===typeof i.errorMessage&&0!==i.errorMessage.length?i.errorMessage:a.value));function m(){"ondemand"!==i.lazyRules&&!0===h.value&&!0===l.value&&C()}function _(){d++,t.value=!1,l.value=!1,r.value=!1,a.value=null,C.cancel()}function v(e=i.modelValue){if(!0===i.disable||!1===u.value)return!0;const n=++d,o=!0!==t.value?()=>{l.value=!0}:()=>{},s=(e,i)=>{!0===e&&o(),r.value=e,a.value=i||null,t.value=!1},c=[];for(let t=0;t{if(void 0===e||!1===Array.isArray(e)||0===e.length)return n===d&&s(!1),!0;const t=e.find((e=>!1===e||"string"===typeof e));return n===d&&s(void 0!==t,t),void 0===t}),(e=>(n===d&&(console.error(e),s(!0)),!1))))}(0,n.wB)((()=>i.modelValue),(()=>{l.value=!0,!0===h.value&&!1===i.lazyRules&&C()})),(0,n.wB)((()=>i.reactiveRules),(e=>{!0===e?void 0===c&&(c=(0,n.wB)((()=>i.rules),m,{immediate:!0,deep:!0})):void 0!==c&&(c(),c=void 0)}),{immediate:!0}),(0,n.wB)((()=>i.lazyRules),m),(0,n.wB)(e,(e=>{!0===e?l.value=!0:!0===h.value&&"ondemand"!==i.lazyRules&&C()}));const C=(0,y.A)(v,0);return(0,n.xo)((()=>{void 0!==c&&c(),C.cancel()})),Object.assign(s,{resetValidation:_,validate:v}),(0,w.$)(s,"hasError",(()=>p.value)),{isDirtyModel:l,hasRules:u,hasError:p,errorMessage:f,validate:v,resetValidation:_}}var x=i(65139),E=i(22500),L=i(98983);function T(e){return void 0!==e&&null!==e&&0!==(""+e).length}const I={...u.C,...S,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String},R={...I,maxlength:[Number,String]},D=["update:modelValue","clear","focus","blur"];function N({requiredForAttr:e=!0,tagProp:t,changeEvent:i=!1}={}){const{props:s,proxy:r}=(0,n.nI)(),a=(0,u.A)(s,r.$q),c=(0,l.A)({required:e,getValue:()=>s.for});return{requiredForAttr:e,changeEvent:i,tag:!0===t?(0,n.EW)((()=>s.tag)):{value:"label"},isDark:a,editable:(0,n.EW)((()=>!0!==s.disable&&!0!==s.readonly)),innerLoading:(0,o.KR)(!1),focused:(0,o.KR)(!1),hasPopupOpen:!1,splitAttrs:d(),targetUid:c,rootRef:(0,o.KR)(null),targetRef:(0,o.KR)(null),controlRef:(0,o.KR)(null)}}function A(e){const{props:t,emit:i,slots:o,attrs:l,proxy:c}=(0,n.nI)(),{$q:d}=c;let u=null;void 0===e.hasValue&&(e.hasValue=(0,n.EW)((()=>T(t.modelValue)))),void 0===e.emitValue&&(e.emitValue=e=>{i("update:modelValue",e)}),void 0===e.controlEvents&&(e.controlEvents={onFocusin:O,onFocusout:P}),Object.assign(e,{clearValue:M,onControlFocusin:O,onControlFocusout:P,focus:N}),void 0===e.computedCounter&&(e.computedCounter=(0,n.EW)((()=>{if(!1!==t.counter){const e="string"===typeof t.modelValue||"number"===typeof t.modelValue?(""+t.modelValue).length:!0===Array.isArray(t.modelValue)?t.modelValue.length:0,i=void 0!==t.maxlength?t.maxlength:t.maxValues;return e+(void 0!==i?" / "+i:"")}})));const{isDirtyModel:h,hasRules:g,hasError:p,errorMessage:f,resetValidation:m}=k(e.focused,e.innerLoading),_=void 0!==e.floatingLabel?(0,n.EW)((()=>!0===t.stackLabel||!0===e.focused.value||!0===e.floatingLabel.value)):(0,n.EW)((()=>!0===t.stackLabel||!0===e.focused.value||!0===e.hasValue.value)),v=(0,n.EW)((()=>!0===t.bottomSlots||void 0!==t.hint||!0===g.value||!0===t.counter||null!==t.error)),b=(0,n.EW)((()=>!0===t.filled?"filled":!0===t.outlined?"outlined":!0===t.borderless?"borderless":t.standout?"standout":"standard")),y=(0,n.EW)((()=>`q-field row no-wrap items-start q-field--${b.value}`+(void 0!==e.fieldClass?` ${e.fieldClass.value}`:"")+(!0===t.rounded?" q-field--rounded":"")+(!0===t.square?" q-field--square":"")+(!0===_.value?" q-field--float":"")+(!0===C.value?" q-field--labeled":"")+(!0===t.dense?" q-field--dense":"")+(!0===t.itemAligned?" q-field--item-aligned q-item-type":"")+(!0===e.isDark.value?" q-field--dark":"")+(void 0===e.getControl?" q-field--auto-height":"")+(!0===e.focused.value?" q-field--focused":"")+(!0===p.value?" q-field--error":"")+(!0===p.value||!0===e.focused.value?" q-field--highlighted":"")+(!0!==t.hideBottomSpace&&!0===v.value?" q-field--with-bottom":"")+(!0===t.disable?" q-field--disabled":!0===t.readonly?" q-field--readonly":""))),w=(0,n.EW)((()=>"q-field__control relative-position row no-wrap"+(void 0!==t.bgColor?` bg-${t.bgColor}`:"")+(!0===p.value?" text-negative":"string"===typeof t.standout&&0!==t.standout.length&&!0===e.focused.value?` ${t.standout}`:void 0!==t.color?` text-${t.color}`:""))),C=(0,n.EW)((()=>!0===t.labelSlot||void 0!==t.label)),S=(0,n.EW)((()=>"q-field__label no-pointer-events absolute ellipsis"+(void 0!==t.labelColor&&!0!==p.value?` text-${t.labelColor}`:""))),I=(0,n.EW)((()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:_.value,modelValue:t.modelValue,emitValue:e.emitValue}))),R=(0,n.EW)((()=>{const i={};return e.targetUid.value&&(i.for=e.targetUid.value),!0===t.disable&&(i["aria-disabled"]="true"),i}));function D(){const t=document.activeElement;let i=void 0!==e.targetRef&&e.targetRef.value;!i||null!==t&&t.id===e.targetUid.value||(!0===i.hasAttribute("tabindex")||(i=i.querySelector("[tabindex]")),i&&i!==t&&i.focus({preventScroll:!0}))}function N(){(0,L.Gy)(D)}function A(){(0,L.vQ)(D);const t=document.activeElement;null!==t&&e.rootRef.value.contains(t)&&t.blur()}function O(t){null!==u&&(clearTimeout(u),u=null),!0===e.editable.value&&!1===e.focused.value&&(e.focused.value=!0,i("focus",t))}function P(t,n){null!==u&&clearTimeout(u),u=setTimeout((()=>{u=null,(!0!==document.hasFocus()||!0!==e.hasPopupOpen&&void 0!==e.controlRef&&null!==e.controlRef.value&&!1===e.controlRef.value.contains(document.activeElement))&&(!0===e.focused.value&&(e.focused.value=!1,i("blur",t)),void 0!==n&&n())}))}function M(o){if((0,E.Gu)(o),!0!==d.platform.is.mobile){const t=void 0!==e.targetRef&&e.targetRef.value||e.rootRef.value;t.focus()}else!0===e.rootRef.value.contains(document.activeElement)&&document.activeElement.blur();"file"===t.type&&(e.inputRef.value.value=null),i("update:modelValue",null),!0===e.changeEvent&&i("change",null),i("clear",t.modelValue),(0,n.dY)((()=>{const e=h.value;m(),h.value=e}))}function F(e){[13,32].includes(e.keyCode)&&M(e)}function B(){const i=[];return void 0!==o.prepend&&i.push((0,n.h)("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:E.F4},o.prepend())),i.push((0,n.h)("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},W())),!0===p.value&&!1===t.noErrorIcon&&i.push(V("error",[(0,n.h)(r.A,{name:d.iconSet.field.error,color:"negative"})])),!0===t.loading||!0===e.innerLoading.value?i.push(V("inner-loading-append",void 0!==o.loading?o.loading():[(0,n.h)(a.A,{color:t.color})])):!0===t.clearable&&!0===e.hasValue.value&&!0===e.editable.value&&i.push(V("inner-clearable-append",[(0,n.h)(r.A,{class:"q-field__focusable-action",name:t.clearIcon||d.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":d.lang.label.clear,onKeyup:F,onClick:M})])),void 0!==o.append&&i.push((0,n.h)("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:E.F4},o.append())),void 0!==e.getInnerAppend&&i.push(V("inner-append",e.getInnerAppend())),void 0!==e.getControlChild&&i.push(e.getControlChild()),i}function W(){const i=[];return void 0!==t.prefix&&null!==t.prefix&&i.push((0,n.h)("div",{class:"q-field__prefix no-pointer-events row items-center"},t.prefix)),void 0!==e.getShadowControl&&!0===e.hasShadow.value&&i.push(e.getShadowControl()),void 0!==e.getControl?i.push(e.getControl()):void 0!==o.rawControl?i.push(o.rawControl()):void 0!==o.control&&i.push((0,n.h)("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":!0===t.autofocus||void 0},o.control(I.value))),!0===C.value&&i.push((0,n.h)("div",{class:S.value},(0,x.zm)(o.label,t.label))),void 0!==t.suffix&&null!==t.suffix&&i.push((0,n.h)("div",{class:"q-field__suffix no-pointer-events row items-center"},t.suffix)),i.concat((0,x.zm)(o.default))}function H(){let i,r;!0===p.value?null!==f.value?(i=[(0,n.h)("div",{role:"alert"},f.value)],r=`q--slot-error-${f.value}`):(i=(0,x.zm)(o.error),r="q--slot-error"):!0===t.hideHint&&!0!==e.focused.value||(void 0!==t.hint?(i=[(0,n.h)("div",t.hint)],r=`q--slot-hint-${t.hint}`):(i=(0,x.zm)(o.hint),r="q--slot-hint"));const a=!0===t.counter||void 0!==o.counter;if(!0===t.hideBottomSpace&&!1===a&&void 0===i)return;const l=(0,n.h)("div",{key:r,class:"q-field__messages col"},i);return(0,n.h)("div",{class:"q-field__bottom row items-start q-field__bottom--"+(!0!==t.hideBottomSpace?"animated":"stale"),onClick:E.F4},[!0===t.hideBottomSpace?l:(0,n.h)(s.eB,{name:"q-transition--field-message"},(()=>l)),!0===a?(0,n.h)("div",{class:"q-field__counter"},void 0!==o.counter?o.counter():e.computedCounter.value):null])}function V(e,t){return null===t?null:(0,n.h)("div",{key:e,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},t)}let j=!1;return(0,n.Y4)((()=>{j=!0})),(0,n.n)((()=>{!0===j&&!0===t.autofocus&&c.focus()})),!0===t.autofocus&&(0,n.sV)((()=>{c.focus()})),(0,n.xo)((()=>{null!==u&&clearTimeout(u)})),Object.assign(c,{focus:N,blur:A}),function(){const i=void 0===e.getControl&&void 0===o.control?{...e.splitAttrs.attributes.value,"data-autofocus":!0===t.autofocus||void 0,...R.value}:R.value;return(0,n.h)(e.tag.value,{ref:e.rootRef,class:[y.value,l.class],style:l.style,...i},[void 0!==o.before?(0,n.h)("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:E.F4},o.before()):null,(0,n.h)("div",{class:"q-field__inner relative-position col self-stretch"},[(0,n.h)("div",{ref:e.controlRef,class:w.value,tabindex:-1,...e.controlEvents},B()),!0===v.value?H():null]),void 0!==o.after?(0,n.h)("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:E.F4},o.after()):null])}}},60414:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(61758),o=i(34848);function s(e,t,i){let s;function r(){void 0!==s&&(o.A.remove(s),s=void 0)}return(0,n.xo)((()=>{!0===e.value&&r()})),{removeFromHistory:r,addToHistory(){s={condition:()=>!0===i.value,handler:t},o.A.add(s)}}}},32342:(e,t,i)=>{"use strict";function n(e){return function(t){if("compositionend"===t.type||"change"===t.type){if(!0!==t.target.qComposing)return;t.target.qComposing=!1,e(t)}else"compositionstart"===t.type&&(t.target.qComposing=!0)}}i.d(t,{A:()=>n})},52916:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>a,Jl:()=>r,RI:()=>s});var n=i(61758),o=i(15157);const s={modelValue:{type:Boolean,default:null},"onUpdate:modelValue":[Function,Array]},r=["beforeShow","show","beforeHide","hide"];function a({showing:e,canShow:t,hideOnRouteChange:i,handleShow:s,handleHide:r,processOnMount:a}){const l=(0,n.nI)(),{props:c,emit:d,proxy:u}=l;let h;function g(t){!0===e.value?m(t):p(t)}function p(e){if(!0===c.disable||void 0!==e&&!0===e.qAnchorHandled||void 0!==t&&!0!==t(e))return;const i=void 0!==c["onUpdate:modelValue"];!0===i&&(d("update:modelValue",!0),h=e,(0,n.dY)((()=>{h===e&&(h=void 0)}))),null!==c.modelValue&&!1!==i||f(e)}function f(t){!0!==e.value&&(e.value=!0,d("beforeShow",t),void 0!==s?s(t):d("show",t))}function m(e){if(!0===c.disable)return;const t=void 0!==c["onUpdate:modelValue"];!0===t&&(d("update:modelValue",!1),h=e,(0,n.dY)((()=>{h===e&&(h=void 0)}))),null!==c.modelValue&&!1!==t||_(e)}function _(t){!1!==e.value&&(e.value=!1,d("beforeHide",t),void 0!==r?r(t):d("hide",t))}function v(t){if(!0===c.disable&&!0===t)void 0!==c["onUpdate:modelValue"]&&d("update:modelValue",!1);else if(!0===t!==e.value){const e=!0===t?f:_;e(h)}}(0,n.wB)((()=>c.modelValue),v),void 0!==i&&!0===(0,o.$b)(l)&&(0,n.wB)((()=>u.$route.fullPath),(()=>{!0===i.value&&!0===e.value&&m()})),!0===a&&(0,n.sV)((()=>{v(c.modelValue)}));const b={show:p,hide:m,toggle:g};return Object.assign(u,b),b}},31852:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>w,hb:()=>_,g:()=>y,Qn:()=>b});var n=i(61758),o=i(38734),s=i(29104),r=i(41597),a=i(29467),l=i(97677),c=i(22500),d=i(72941);function u(e){const t=[.06,6,50];return"string"===typeof e&&e.length&&e.split(":").forEach(((e,i)=>{const n=parseFloat(e);n&&(t[i]=n)})),t}const h=(0,a.Yg)({name:"touch-swipe",beforeMount(e,{value:t,arg:i,modifiers:n}){if(!0!==n.mouse&&!0!==r.Sn.has.touch)return;const o=!0===n.mouseCapture?"Capture":"",s={handler:t,sensitivity:u(i),direction:(0,l.U)(n),noop:c.lQ,mouseStart(e){(0,l.W)(e,s)&&(0,c.w7)(e)&&((0,c.Z4)(s,"temp",[[document,"mousemove","move",`notPassive${o}`],[document,"mouseup","end","notPassiveCapture"]]),s.start(e,!0))},touchStart(e){if((0,l.W)(e,s)){const t=e.target;(0,c.Z4)(s,"temp",[[t,"touchmove","move","notPassiveCapture"],[t,"touchcancel","end","notPassiveCapture"],[t,"touchend","end","notPassiveCapture"]]),s.start(e)}},start(t,i){!0===r.Sn.is.firefox&&(0,c.M5)(e,!0);const n=(0,c.G1)(t);s.event={x:n.left,y:n.top,time:Date.now(),mouse:!0===i,dir:!1}},move(e){if(void 0===s.event)return;if(!1!==s.event.dir)return void(0,c.Gu)(e);const t=Date.now()-s.event.time;if(0===t)return;const i=(0,c.G1)(e),n=i.left-s.event.x,o=Math.abs(n),r=i.top-s.event.y,a=Math.abs(r);if(!0!==s.event.mouse){if(os.sensitivity[0]&&(s.event.dir=r<0?"up":"down"),!0===s.direction.horizontal&&o>a&&a<100&&l>s.sensitivity[0]&&(s.event.dir=n<0?"left":"right"),!0===s.direction.up&&os.sensitivity[0]&&(s.event.dir="up"),!0===s.direction.down&&o0&&o<100&&u>s.sensitivity[0]&&(s.event.dir="down"),!0===s.direction.left&&o>a&&n<0&&a<100&&l>s.sensitivity[0]&&(s.event.dir="left"),!0===s.direction.right&&o>a&&n>0&&a<100&&l>s.sensitivity[0]&&(s.event.dir="right"),!1!==s.event.dir?((0,c.Gu)(e),!0===s.event.mouse&&(document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),(0,d.w)(),s.styleCleanup=e=>{s.styleCleanup=void 0,document.body.classList.remove("non-selectable");const t=()=>{document.body.classList.remove("no-pointer-events--children")};!0===e?setTimeout(t,50):t()}),s.handler({evt:e,touch:!0!==s.event.mouse,mouse:s.event.mouse,direction:s.event.dir,duration:t,distance:{x:o,y:a}})):s.end(e)},end(t){void 0!==s.event&&((0,c.Fh)(s,"temp"),!0===r.Sn.is.firefox&&(0,c.M5)(e,!1),void 0!==s.styleCleanup&&s.styleCleanup(!0),void 0!==t&&!1!==s.event.dir&&(0,c.Gu)(t),s.event=void 0)}};if(e.__qtouchswipe=s,!0===n.mouse){const t=!0===n.mouseCapture||!0===n.mousecapture?"Capture":"";(0,c.Z4)(s,"main",[[e,"mousedown","mouseStart",`passive${t}`]])}!0===r.Sn.has.touch&&(0,c.Z4)(s,"main",[[e,"touchstart","touchStart","passive"+(!0===n.capture?"Capture":"")],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const i=e.__qtouchswipe;void 0!==i&&(t.oldValue!==t.value&&("function"!==typeof t.value&&i.end(),i.handler=t.value),i.direction=(0,l.U)(t.modifiers))},beforeUnmount(e){const t=e.__qtouchswipe;void 0!==t&&((0,c.Fh)(t,"main"),(0,c.Fh)(t,"temp"),!0===r.Sn.is.firefox&&(0,c.M5)(e,!1),void 0!==t.styleCleanup&&t.styleCleanup(),delete e.__qtouchswipe)}});function g(){let e=Object.create(null);return{getCache:(t,i)=>void 0===e[t]?e[t]="function"===typeof i?i():i:e[t],setCache(t,i){e[t]=i},hasCache(t){return Object.hasOwnProperty.call(e,t)},clearCache(t){void 0!==t?delete e[t]:e=Object.create(null)}}}var p=i(24667),f=i(65139),m=i(15157);const _={name:{required:!0},disable:Boolean},v={setup(e,{slots:t}){return()=>(0,n.h)("div",{class:"q-panel scroll",role:"tabpanel"},(0,f.zm)(t.default))}},b={modelValue:{required:!0},animated:Boolean,infinite:Boolean,swipeable:Boolean,vertical:Boolean,transitionPrev:String,transitionNext:String,transitionDuration:{type:[String,Number],default:300},keepAlive:Boolean,keepAliveInclude:[String,Array,RegExp],keepAliveExclude:[String,Array,RegExp],keepAliveMax:Number},y=["update:modelValue","beforeTransition","transition"];function w(){const{props:e,emit:t,proxy:i}=(0,n.nI)(),{getCache:r}=g(),{registerTimeout:a}=(0,p.A)();let l,c;const d=(0,o.KR)(null),u=(0,o.KR)(null);function _(t){const n=!0===e.vertical?"up":"left";A((!0===i.$q.lang.rtl?-1:1)*(t.direction===n?1:-1))}const b=(0,n.EW)((()=>[[h,_,void 0,{horizontal:!0!==e.vertical,vertical:e.vertical,mouse:!0}]])),y=(0,n.EW)((()=>e.transitionPrev||"slide-"+(!0===e.vertical?"down":"right"))),w=(0,n.EW)((()=>e.transitionNext||"slide-"+(!0===e.vertical?"up":"left"))),C=(0,n.EW)((()=>`--q-transition-duration: ${e.transitionDuration}ms`)),S=(0,n.EW)((()=>"string"===typeof e.modelValue||"number"===typeof e.modelValue?e.modelValue:String(e.modelValue))),k=(0,n.EW)((()=>({include:e.keepAliveInclude,exclude:e.keepAliveExclude,max:e.keepAliveMax}))),x=(0,n.EW)((()=>void 0!==e.keepAliveInclude||void 0!==e.keepAliveExclude));function E(){A(1)}function L(){A(-1)}function T(e){t("update:modelValue",e)}function I(e){return void 0!==e&&null!==e&&""!==e}function R(e){return l.findIndex((t=>t.props.name===e&&""!==t.props.disable&&!0!==t.props.disable))}function D(){return l.filter((e=>""!==e.props.disable&&!0!==e.props.disable))}function N(t){const i=0!==t&&!0===e.animated&&-1!==d.value?"q-transition--"+(-1===t?y.value:w.value):null;u.value!==i&&(u.value=i)}function A(i,n=d.value){let o=n+i;while(-1!==o&&o{c=!1}));o+=i}!0===e.infinite&&0!==l.length&&-1!==n&&n!==l.length&&A(i,-1===i?l.length:-1)}function O(){const t=R(e.modelValue);return d.value!==t&&(d.value=t),!0}function P(){const t=!0===I(e.modelValue)&&O()&&l[d.value];return!0===e.keepAlive?[(0,n.h)(n.PR,k.value,[(0,n.h)(!0===x.value?r(S.value,(()=>({...v,name:S.value}))):v,{key:S.value,style:C.value},(()=>t))])]:[(0,n.h)("div",{class:"q-panel scroll",style:C.value,key:S.value,role:"tabpanel"},[t])]}function M(){if(0!==l.length)return!0===e.animated?[(0,n.h)(s.eB,{name:u.value},P)]:P()}function F(e){return l=(0,m.Hl)((0,f.zm)(e.default,[])).filter((e=>null!==e.props&&void 0===e.props.slot&&!0===I(e.props.name))),l.length}function B(){return l}return(0,n.wB)((()=>e.modelValue),((i,n)=>{const o=!0===I(i)?R(i):-1;!0!==c&&N(-1===o?0:o{t("transition",i,n)}),e.transitionDuration))})),Object.assign(i,{next:E,previous:L,goTo:T}),{panelIndex:d,panelDirectives:b,updatePanelsList:F,updatePanelIndex:O,getPanelContent:M,getEnabledPanels:D,getPanels:B,isValidPanelName:I,keepAliveProps:k,needsUniqueKeepAliveWrapper:x,goToPanelByOffset:A,goToPanel:T,nextPanel:E,previousPanel:L}}},52120:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});i(10239);var n=i(38734),o=i(61758),s=i(29467),r=(i(22500),i(98983)),a=i(68536),l=i(35563),c=i(82453);const d=(0,s.a0)({name:"QPortal",setup(e,{slots:t}){return()=>t.default()}});function u(e){e=e.parent;while(void 0!==e&&null!==e){if("QGlobalDialog"===e.type.name)return!0;if("QDialog"===e.type.name||"QMenu"===e.type.name)return!1;e=e.parent}return!1}function h(e,t,i,s){const h=(0,n.KR)(!1),g=(0,n.KR)(!1);let p=null;const f={},m="dialog"===s&&u(e);function _(t){if(!0===t)return(0,r.gv)(f),void(g.value=!0);g.value=!1,!1===h.value&&(!1===m&&null===p&&(p=(0,a.US)(!1,s)),h.value=!0,l.jx.push(e.proxy),(0,r.FD)(f))}function v(t){if(g.value=!1,!0!==t)return;(0,r.gv)(f),h.value=!1;const i=l.jx.indexOf(e.proxy);-1!==i&&l.jx.splice(i,1),null!==p&&((0,a._J)(p),p=null)}return(0,o.hi)((()=>{v(!0)})),e.proxy.__qPortal=!0,(0,c.$)(e.proxy,"contentEl",(()=>t.value)),{showPortal:_,hidePortal:v,portalIsActive:h,portalIsAccessible:g,renderPortal:()=>!0===m?i():!0===h.value?[(0,o.h)(o.Im,{to:p},(0,o.h)(d,i))]:void 0}}},34276:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(87941);function o(){let e;return{preventBodyScroll(t){t===e||void 0===e&&!0!==t||(e=t,(0,n.A)(t))}}}},8014:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(38734),o=i(61758);function s(e,t){const i=(0,n.KR)(null),s=(0,o.EW)((()=>!0===e.disable?null:(0,o.h)("span",{ref:i,class:"no-outline",tabindex:-1})));function r(e){const n=t.value;void 0!==e&&0===e.type.indexOf("key")?null!==n&&document.activeElement!==n&&!0===n.contains(document.activeElement)&&n.focus():null!==i.value&&(void 0===e||null!==n&&!0===n.contains(e.target))&&i.value.focus()}return{refocusTargetEl:s,refocusTarget:r}}},47502:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>g,Ji:()=>h,ni:()=>u});var n=i(61758),o=i(15157);function s(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function r(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function a(e,t){for(const i in t){const n=t[i],o=e[i];if("string"===typeof n){if(n!==o)return!1}else if(!1===Array.isArray(o)||o.length!==n.length||n.some(((e,t)=>e!==o[t])))return!1}return!0}function l(e,t){return!0===Array.isArray(t)?e.length===t.length&&e.every(((e,i)=>e===t[i])):1===e.length&&e[0]===t}function c(e,t){return!0===Array.isArray(e)?l(e,t):!0===Array.isArray(t)?l(t,e):e===t}function d(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!1===c(e[i],t[i]))return!1;return!0}const u={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean},h={...u,exact:Boolean,activeClass:{type:String,default:"q-router-link--active"},exactActiveClass:{type:String,default:"q-router-link--exact-active"}};function g({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const i=(0,n.nI)(),{props:l,proxy:c,emit:u}=i,h=(0,o.$b)(i),g=(0,n.EW)((()=>!0!==l.disable&&void 0!==l.href)),p=!0===t?(0,n.EW)((()=>!0===h&&!0!==l.disable&&!0!==g.value&&void 0!==l.to&&null!==l.to&&""!==l.to)):(0,n.EW)((()=>!0===h&&!0!==g.value&&void 0!==l.to&&null!==l.to&&""!==l.to)),f=(0,n.EW)((()=>!0===p.value?k(l.to):null)),m=(0,n.EW)((()=>null!==f.value)),_=(0,n.EW)((()=>!0===g.value||!0===m.value)),v=(0,n.EW)((()=>"a"===l.type||!0===_.value?"a":l.tag||e||"div")),b=(0,n.EW)((()=>!0===g.value?{href:l.href,target:l.target}:!0===m.value?{href:f.value.href,target:l.target}:{})),y=(0,n.EW)((()=>{if(!1===m.value)return-1;const{matched:e}=f.value,{length:t}=e,i=e[t-1];if(void 0===i)return-1;const n=c.$route.matched;if(0===n.length)return-1;const o=n.findIndex(r.bind(null,i));if(-1!==o)return o;const a=s(e[t-2]);return t>1&&s(i)===a&&n[n.length-1].path!==a?n.findIndex(r.bind(null,e[t-2])):o})),w=(0,n.EW)((()=>!0===m.value&&-1!==y.value&&a(c.$route.params,f.value.params))),C=(0,n.EW)((()=>!0===w.value&&y.value===c.$route.matched.length-1&&d(c.$route.params,f.value.params))),S=(0,n.EW)((()=>!0===m.value?!0===C.value?` ${l.exactActiveClass} ${l.activeClass}`:!0===l.exact?"":!0===w.value?` ${l.activeClass}`:"":""));function k(e){try{return c.$router.resolve(e)}catch(t){}return null}function x(e,{returnRouterError:t,to:i=l.to,replace:n=l.replace}={}){if(!0===l.disable)return e.preventDefault(),Promise.resolve(!1);if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||void 0!==e.button&&0!==e.button||"_blank"===l.target)return Promise.resolve(!1);e.preventDefault();const o=c.$router[!0===n?"replace":"push"](i);return!0===t?o:o.then((()=>{})).catch((()=>{}))}function E(e){if(!0===m.value){const t=t=>x(e,t);u("click",e,t),!0!==e.defaultPrevented&&t()}else u("click",e)}return{hasRouterLink:m,hasHrefLink:g,hasLink:_,linkTag:v,resolvedLink:f,linkIsActive:w,linkIsExactActive:C,linkClass:S,linkAttrs:b,getLink:k,navigateToRouterLink:x,navigateOnClick:E}}},61906:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>r,v0:()=>o,x_:()=>s});var n=i(61758);const o={xs:18,sm:24,md:32,lg:38,xl:46},s={size:String};function r(e,t=o){return(0,n.EW)((()=>void 0!==e.size?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null))}},40454:(e,t,i)=>{"use strict";i.d(t,{A:()=>s,d:()=>o});var n=i(61758);const o={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function s(e,t=()=>{},i=()=>{}){return{transitionProps:(0,n.EW)((()=>{const n=`q-transition--${e.transitionShow||t()}`,o=`q-transition--${e.transitionHide||i()}`;return{appear:!0,enterFromClass:`${n}-enter-from`,enterActiveClass:`${n}-enter-active`,enterToClass:`${n}-enter-to`,leaveFromClass:`${o}-leave-from`,leaveActiveClass:`${o}-leave-active`,leaveToClass:`${o}-leave-to`}})),transitionStyle:(0,n.EW)((()=>`--q-transition-duration: ${e.transitionDuration}ms`))}}},52510:(e,t,i)=>{"use strict";i.d(t,{M4:()=>r,Sc:()=>o,vq:()=>s});var n=i(61758);const o={name:String};function s(e={}){return(t,i,o)=>{t[i]((0,n.h)("input",{class:"hidden"+(o||""),...e.value}))}}function r(e){return(0,n.EW)((()=>e.name||e.for))}},74915:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(38734),o=i(61758),s=i(85192),r=i(41597);function a(e){return void 0===e||null===e?null:e}function l(e,t){return void 0===e||null===e?!0===t?`f_${(0,s.A)()}`:null:e}function c({getValue:e,required:t=!0}={}){if(!0===r.ot.value){const i=void 0!==e?(0,n.KR)(a(e())):(0,n.KR)(null);return!0===t&&null===i.value&&(0,o.sV)((()=>{i.value=`f_${(0,s.A)()}`})),void 0!==e&&(0,o.wB)(e,(e=>{i.value=l(e,t)})),i}return void 0!==e?(0,o.EW)((()=>l(e(),t))):(0,n.KR)(`f_${(0,s.A)()}`)}},46019:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(61758),o=i(15157);function s(){let e;const t=(0,n.nI)();function i(){e=void 0}return(0,n.Y4)(i),(0,n.xo)(i),{removeTick:i,registerTick(i){e=i,(0,n.dY)((()=>{e===i&&(!1===(0,o.rU)(t)&&e(),e=void 0)}))}}}},24667:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(61758),o=i(15157);function s(){let e=null;const t=(0,n.nI)();function i(){null!==e&&(clearTimeout(e),e=null)}return(0,n.Y4)(i),(0,n.xo)(i),{removeTimeout:i,registerTimeout(n,s){i(e),!1===(0,o.rU)(t)&&(e=setTimeout((()=>{e=null,n()}),s))}}}},88672:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(29467),o=i(35563),s=i(2906);function r(e){if(!1===e)return 0;if(!0===e||void 0===e)return 1;const t=parseInt(e,10);return isNaN(t)?0:t}const a=(0,n.Yg)({name:"close-popup",beforeMount(e,{value:t}){const i={depth:r(t),handler(t){0!==i.depth&&setTimeout((()=>{const n=(0,o.Rv)(e);void 0!==n&&(0,o.k0)(n,t,i.depth)}))},handlerKey(e){!0===(0,s.Dv)(e,13)&&i.handler(e)}};e.__qclosepopup=i,e.addEventListener("click",i.handler),e.addEventListener("keyup",i.handlerKey)},updated(e,{value:t,oldValue:i}){t!==i&&(e.__qclosepopup.depth=r(t))},beforeUnmount(e){const t=e.__qclosepopup;e.removeEventListener("click",t.handler),e.removeEventListener("keyup",t.handlerKey),delete e.__qclosepopup}})},39626:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});i(10239);var n=i(29467),o=i(77556),s=i(22500),r=i(2906);function a(e,t=250){let i,n=!1;return function(){return!1===n&&(n=!0,setTimeout((()=>{n=!1}),t),i=e.apply(this,arguments)),i}}function l(e,t,i,n){!0===i.modifiers.stop&&(0,s.ds)(e);const r=i.modifiers.color;let a=i.modifiers.center;a=!0===a||!0===n;const l=document.createElement("span"),c=document.createElement("span"),d=(0,s.G1)(e),{left:u,top:h,width:g,height:p}=t.getBoundingClientRect(),f=Math.sqrt(g*g+p*p),m=f/2,_=(g-f)/2+"px",v=a?_:d.left-u-m+"px",b=(p-f)/2+"px",y=a?b:d.top-h-m+"px";c.className="q-ripple__inner",(0,o.AH)(c,{height:`${f}px`,width:`${f}px`,transform:`translate3d(${v},${y},0) scale3d(.2,.2,1)`,opacity:0}),l.className="q-ripple"+(r?" text-"+r:""),l.setAttribute("dir","ltr"),l.appendChild(c),t.appendChild(l);const w=()=>{l.remove(),clearTimeout(C)};i.abort.push(w);let C=setTimeout((()=>{c.classList.add("q-ripple__inner--enter"),c.style.transform=`translate3d(${_},${b},0) scale3d(1,1,1)`,c.style.opacity=.2,C=setTimeout((()=>{c.classList.remove("q-ripple__inner--enter"),c.classList.add("q-ripple__inner--leave"),c.style.opacity=0,C=setTimeout((()=>{l.remove(),i.abort.splice(i.abort.indexOf(w),1)}),275)}),250)}),50)}function c(e,{modifiers:t,value:i,arg:n}){const o=Object.assign({},e.cfg.ripple,t,i);e.modifiers={early:!0===o.early,stop:!0===o.stop,center:!0===o.center,color:o.color||n,keyCodes:[].concat(o.keyCodes||13)}}const d=(0,n.Yg)({name:"ripple",beforeMount(e,t){const i=t.instance.$.appContext.config.globalProperties.$q.config||{};if(!1===i.ripple)return;const n={cfg:i,enabled:!1!==t.value,modifiers:{},abort:[],start(t){!0===n.enabled&&!0!==t.qSkipRipple&&t.type===(!0===n.modifiers.early?"pointerdown":"click")&&l(t,e,n,!0===t.qKeyEvent)},keystart:a((t=>{!0===n.enabled&&!0!==t.qSkipRipple&&!0===(0,r.Dv)(t,n.modifiers.keyCodes)&&t.type==="key"+(!0===n.modifiers.early?"down":"up")&&l(t,e,n,!0)}),300)};c(n,t),e.__qripple=n,(0,s.Z4)(n,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const i=e.__qripple;void 0!==i&&(i.enabled=!1!==t.value,!0===i.enabled&&Object(t.value)===t.value&&c(i,t))}},beforeUnmount(e){const t=e.__qripple;void 0!==t&&(t.abort.forEach((e=>{e()})),(0,s.Fh)(t,"main"),delete e._qripple)}})},89390:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var n=i(41597),o=i(29467),s=i(97677),r=i(22500),a=i(72941);function l(e,t,i){const n=(0,r.G1)(e);let o,s=n.left-t.event.x,a=n.top-t.event.y,l=Math.abs(s),c=Math.abs(a);const d=t.direction;!0===d.horizontal&&!0!==d.vertical?o=s<0?"left":"right":!0!==d.horizontal&&!0===d.vertical?o=a<0?"up":"down":!0===d.up&&a<0?(o="up",l>c&&(!0===d.left&&s<0?o="left":!0===d.right&&s>0&&(o="right"))):!0===d.down&&a>0?(o="down",l>c&&(!0===d.left&&s<0?o="left":!0===d.right&&s>0&&(o="right"))):!0===d.left&&s<0?(o="left",l0&&(o="down"))):!0===d.right&&s>0&&(o="right",l0&&(o="down")));let u=!1;if(void 0===o&&!1===i){if(!0===t.event.isFirst||void 0===t.event.lastDir)return{};o=t.event.lastDir,u=!0,"left"===o||"right"===o?(n.left-=s,l=0,s=0):(n.top-=a,c=0,a=0)}return{synthetic:u,payload:{evt:e,touch:!0!==t.event.mouse,mouse:!0===t.event.mouse,position:n,direction:o,isFirst:t.event.isFirst,isFinal:!0===i,duration:Date.now()-t.event.time,distance:{x:l,y:c},offset:{x:s,y:a},delta:{x:n.left-t.event.lastX,y:n.top-t.event.lastY}}}}let c=0;const d=(0,o.Yg)({name:"touch-pan",beforeMount(e,{value:t,modifiers:i}){if(!0!==i.mouse&&!0!==n.Sn.has.touch)return;function o(e,t){!0===i.mouse&&!0===t?(0,r.Gu)(e):(!0===i.stop&&(0,r.ds)(e),!0===i.prevent&&(0,r.F4)(e))}const d={uid:"qvtp_"+c++,handler:t,modifiers:i,direction:(0,s.U)(i),noop:r.lQ,mouseStart(e){(0,s.W)(e,d)&&(0,r.w7)(e)&&((0,r.Z4)(d,"temp",[[document,"mousemove","move","notPassiveCapture"],[document,"mouseup","end","passiveCapture"]]),d.start(e,!0))},touchStart(e){if((0,s.W)(e,d)){const t=e.target;(0,r.Z4)(d,"temp",[[t,"touchmove","move","notPassiveCapture"],[t,"touchcancel","end","passiveCapture"],[t,"touchend","end","passiveCapture"]]),d.start(e)}},start(t,o){if(!0===n.Sn.is.firefox&&(0,r.M5)(e,!0),d.lastEvt=t,!0===o||!0===i.stop){if(!0!==d.direction.all&&(!0!==o||!0!==d.modifiers.mouseAllDir&&!0!==d.modifiers.mousealldir)){const e=-1!==t.type.indexOf("mouse")?new MouseEvent(t.type,t):new TouchEvent(t.type,t);!0===t.defaultPrevented&&(0,r.F4)(e),!0===t.cancelBubble&&(0,r.ds)(e),Object.assign(e,{qKeyEvent:t.qKeyEvent,qClickOutside:t.qClickOutside,qAnchorHandled:t.qAnchorHandled,qClonedBy:void 0===t.qClonedBy?[d.uid]:t.qClonedBy.concat(d.uid)}),d.initialEvent={target:t.target,event:e}}(0,r.ds)(t)}const{left:s,top:a}=(0,r.G1)(t);d.event={x:s,y:a,time:Date.now(),mouse:!0===o,detected:!1,isFirst:!0,isFinal:!1,lastX:s,lastY:a}},move(e){if(void 0===d.event)return;const t=(0,r.G1)(e),n=t.left-d.event.x,s=t.top-d.event.y;if(0===n&&0===s)return;d.lastEvt=e;const c=!0===d.event.mouse,u=()=>{let t;o(e,c),!0!==i.preserveCursor&&!0!==i.preservecursor&&(t=document.documentElement.style.cursor||"",document.documentElement.style.cursor="grabbing"),!0===c&&document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),(0,a.w)(),d.styleCleanup=e=>{if(d.styleCleanup=void 0,void 0!==t&&(document.documentElement.style.cursor=t),document.body.classList.remove("non-selectable"),!0===c){const t=()=>{document.body.classList.remove("no-pointer-events--children")};void 0!==e?setTimeout((()=>{t(),e()}),50):t()}else void 0!==e&&e()}};if(!0===d.event.detected){!0!==d.event.isFirst&&o(e,d.event.mouse);const{payload:t,synthetic:i}=l(e,d,!1);return void(void 0!==t&&(!1===d.handler(t)?d.end(e):(void 0===d.styleCleanup&&!0===d.event.isFirst&&u(),d.event.lastX=t.position.left,d.event.lastY=t.position.top,d.event.lastDir=!0===i?void 0:t.direction,d.event.isFirst=!1)))}if(!0===d.direction.all||!0===c&&(!0===d.modifiers.mouseAllDir||!0===d.modifiers.mousealldir))return u(),d.event.detected=!0,void d.move(e);const h=Math.abs(n),g=Math.abs(s);h!==g&&(!0===d.direction.horizontal&&h>g||!0===d.direction.vertical&&h0||!0===d.direction.left&&h>g&&n<0||!0===d.direction.right&&h>g&&n>0?(d.event.detected=!0,d.move(e)):d.end(e,!0))},end(t,i){if(void 0!==d.event){if((0,r.Fh)(d,"temp"),!0===n.Sn.is.firefox&&(0,r.M5)(e,!1),!0===i)void 0!==d.styleCleanup&&d.styleCleanup(),!0!==d.event.detected&&void 0!==d.initialEvent&&d.initialEvent.target.dispatchEvent(d.initialEvent.event);else if(!0===d.event.detected){!0===d.event.isFirst&&d.handler(l(void 0===t?d.lastEvt:t,d).payload);const{payload:e}=l(void 0===t?d.lastEvt:t,d,!0),i=()=>{d.handler(e)};void 0!==d.styleCleanup?d.styleCleanup(i):i()}d.event=void 0,d.initialEvent=void 0,d.lastEvt=void 0}}};if(e.__qtouchpan=d,!0===i.mouse){const t=!0===i.mouseCapture||!0===i.mousecapture?"Capture":"";(0,r.Z4)(d,"main",[[e,"mousedown","mouseStart",`passive${t}`]])}!0===n.Sn.has.touch&&(0,r.Z4)(d,"main",[[e,"touchstart","touchStart","passive"+(!0===i.capture?"Capture":"")],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const i=e.__qtouchpan;void 0!==i&&(t.oldValue!==t.value&&("function"!==typeof value&&i.end(),i.handler=t.value),i.direction=(0,s.U)(t.modifiers))},beforeUnmount(e){const t=e.__qtouchpan;void 0!==t&&(void 0!==t.event&&t.end(),(0,r.Fh)(t,"main"),(0,r.Fh)(t,"temp"),!0===n.Sn.is.firefox&&(0,r.M5)(e,!1),void 0!==t.styleCleanup&&t.styleCleanup(),delete e.__qtouchpan)}})},57991:(e,t,i)=>{"use strict";i.d(t,{i:()=>E,A:()=>I});var n=i(29104),o=i(41597),s=(i(10239),i(29467)),r=i(22500),a=i(53500);const l=["sm","md","lg","xl"],{passive:c}=r.mG,d=(0,s.Xj)({width:0,height:0,name:"xs",sizes:{sm:600,md:1024,lg:1440,xl:1920},lt:{sm:!0,md:!0,lg:!0,xl:!0},gt:{xs:!1,sm:!1,md:!1,lg:!1},xs:!0,sm:!1,md:!1,lg:!1,xl:!1},{setSizes:r.lQ,setDebounce:r.lQ,install({$q:e,onSSRHydrated:t}){if(e.screen=this,!0===this.__installed)return void(void 0!==e.config.screen&&(!1===e.config.screen.bodyClasses?document.body.classList.remove(`screen--${this.name}`):this.__update(!0)));const{visualViewport:i}=window,n=i||window,s=document.scrollingElement||document.documentElement,r=void 0===i||!0===o.Sn.is.mobile?()=>[Math.max(window.innerWidth,s.clientWidth),Math.max(window.innerHeight,s.clientHeight)]:()=>[i.width*i.scale+window.innerWidth-s.clientWidth,i.height*i.scale+window.innerHeight-s.clientHeight],d=void 0!==e.config.screen&&!0===e.config.screen.bodyClasses;this.__update=e=>{const[t,i]=r();if(i!==this.height&&(this.height=i),t!==this.width)this.width=t;else if(!0!==e)return;let n=this.sizes;this.gt.xs=t>=n.sm,this.gt.sm=t>=n.md,this.gt.md=t>=n.lg,this.gt.lg=t>=n.xl,this.lt.sm=t{l.forEach((t=>{void 0!==e[t]&&(h[t]=e[t])}))},this.setDebounce=e=>{g=e};const p=()=>{const e=getComputedStyle(document.body);e.getPropertyValue("--q-size-sm")&&l.forEach((t=>{this.sizes[t]=parseInt(e.getPropertyValue(`--q-size-${t}`),10)})),this.setSizes=e=>{l.forEach((t=>{e[t]&&(this.sizes[t]=e[t])})),this.__update(!0)},this.setDebounce=e=>{void 0!==u&&n.removeEventListener("resize",u,c),u=e>0?(0,a.A)(this.__update,e):this.__update,n.addEventListener("resize",u,c)},this.setDebounce(g),0!==Object.keys(h).length?(this.setSizes(h),h=void 0):this.__update(),!0===d&&"xs"===this.name&&document.body.classList.add("screen--xs")};!0===o.ot.value?t.push(p):p()}});var u=i(50411);function h(e,t,i=document.body){if("string"!==typeof e)throw new TypeError("Expected a string as propName");if("string"!==typeof t)throw new TypeError("Expected a string as value");if(!(i instanceof Element))throw new TypeError("Expected a DOM element");i.style.setProperty(`--q-${e}`,t)}var g=i(2906);function p(e){return!0===e.ios?"ios":!0===e.android?"android":void 0}function f({is:e,has:t,within:i},n){const o=[!0===e.desktop?"desktop":"mobile",(!1===t.touch?"no-":"")+"touch"];if(!0===e.mobile){const t=p(e);void 0!==t&&o.push("platform-"+t)}if(!0===e.nativeMobile){const t=e.nativeMobileWrapper;o.push(t),o.push("native-mobile"),!0!==e.ios||void 0!==n[t]&&!1===n[t].iosStatusBarPadding||o.push("q-ios-padding")}else!0===e.electron?o.push("electron"):!0===e.bex&&o.push("bex");return!0===i.iframe&&o.push("within-iframe"),o}function m(){const{is:e}=o.Sn,t=document.body.className,i=new Set(t.replace(/ {2}/g," ").split(" "));if(!0!==e.nativeMobile&&!0!==e.electron&&!0!==e.bex)if(!0===e.desktop)i.delete("mobile"),i.delete("platform-ios"),i.delete("platform-android"),i.add("desktop");else if(!0===e.mobile){i.delete("desktop"),i.add("mobile"),i.delete("platform-ios"),i.delete("platform-android");const t=p(e);void 0!==t&&i.add(`platform-${t}`)}!0===o.Sn.has.touch&&(i.delete("no-touch"),i.add("touch")),!0===o.Sn.within.iframe&&i.add("within-iframe");const n=Array.from(i).join(" ");t!==n&&(document.body.className=n)}function _(e){for(const t in e)h(t,e[t])}const v={install(e){if(!0!==this.__installed){if(!0===o.ot.value)m();else{const{$q:t}=e;void 0!==t.config.brand&&_(t.config.brand);const i=f(o.Sn,t.config);document.body.classList.add.apply(document.body.classList,i)}!0===o.Sn.is.ios&&document.body.addEventListener("touchstart",r.lQ),window.addEventListener("keydown",g.V7,!0)}}};var b=i(34848),y=i(4360),w=i(93493),C=i(27973),S=i(28253),k=i(1054);const x=[o.Ay,v,u.A,d,b.A,y.A,w.A];function E(e,t){const i=(0,n.Ef)(e);i.config.globalProperties=t.config.globalProperties;const{reload:o,...s}=t._context;return Object.assign(i._context,s),i}function L(e,t){t.forEach((t=>{t.install(e),t.__installed=!0}))}function T(e,t,i){e.config.globalProperties.$q=i.$q,e.provide(C.XA,i.$q),L(i,x),void 0!==t.components&&Object.values(t.components).forEach((t=>{!0===(0,k.Gv)(t)&&void 0!==t.name&&e.component(t.name,t)})),void 0!==t.directives&&Object.values(t.directives).forEach((t=>{!0===(0,k.Gv)(t)&&void 0!==t.name&&e.directive(t.name,t)})),void 0!==t.plugins&&L(i,Object.values(t.plugins).filter((e=>"function"===typeof e.install&&!1===x.includes(e)))),!0===o.ot.value&&(i.$q.onSSRHydrated=()=>{i.onSSRHydrated.forEach((e=>{e()})),i.$q.onSSRHydrated=()=>{}})}const I=function(e,t={}){const i={version:"2.17.0"};!1===S.Or?(void 0!==t.config&&Object.assign(S.cr,t.config),i.config={...S.cr},(0,S.xX)()):i.config=t.config||{},T(e,t,{parentApp:e,$q:i,lang:t.lang,iconSet:t.iconSet,onSSRHydrated:[]})}},50411:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(29467);const o=(0,n.Xj)({isActive:!1,mode:!1},{__media:void 0,set(e){o.mode=e,"auto"===e?(void 0===o.__media&&(o.__media=window.matchMedia("(prefers-color-scheme: dark)"),o.__updateMedia=()=>{o.set("auto")},o.__media.addListener(o.__updateMedia)),e=o.__media.matches):void 0!==o.__media&&(o.__media.removeListener(o.__updateMedia),o.__media=void 0),o.isActive=!0===e,document.body.classList.remove("body--"+(!0===e?"light":"dark")),document.body.classList.add("body--"+(!0===e?"dark":"light"))},toggle(){o.set(!1===o.isActive)},install({$q:e,ssrContext:t}){const{dark:i}=e.config;e.dark=this,!0!==this.__installed&&this.set(void 0!==i&&i)}}),s=o},69610:(e,t,i)=>{"use strict";i.d(t,{A:()=>S});i(10239);var n=i(61758),o=i(38734),s=i(82156),r=i(1693),a=i(23316),l=i(44189),c=i(62669),d=i(10386),u=i(39270),h=i(26267),g=i(30564),p=i(29467),f=i(16372),m=i(2906),_=i(1054);const v=(0,p.a0)({name:"DialogPluginComponent",props:{...f.C,title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:"ok",validator:e=>["ok","cancel","none"].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},emits:["ok","hide"],setup(e,{emit:t}){const{proxy:i}=(0,n.nI)(),{$q:p}=i,v=(0,f.A)(e,p),b=(0,o.KR)(null),y=(0,o.KR)(void 0!==e.prompt?e.prompt.model:void 0!==e.options?e.options.model:void 0),w=(0,n.EW)((()=>"q-dialog-plugin"+(!0===v.value?" q-dialog-plugin--dark q-dark":"")+(!1!==e.progress?" q-dialog-plugin--progress":""))),C=(0,n.EW)((()=>e.color||(!0===v.value?"amber":"primary"))),S=(0,n.EW)((()=>!1===e.progress?null:!0===(0,_.Gv)(e.progress)?{component:e.progress.spinner||g.A,props:{color:e.progress.color||C.value}}:{component:g.A,props:{color:C.value}})),k=(0,n.EW)((()=>void 0!==e.prompt||void 0!==e.options)),x=(0,n.EW)((()=>{if(!0!==k.value)return{};const{model:t,isValid:i,items:n,...o}=void 0!==e.prompt?e.prompt:e.options;return o})),E=(0,n.EW)((()=>!0===(0,_.Gv)(e.ok)||!0===e.ok?p.lang.label.ok:e.ok)),L=(0,n.EW)((()=>!0===(0,_.Gv)(e.cancel)||!0===e.cancel?p.lang.label.cancel:e.cancel)),T=(0,n.EW)((()=>void 0!==e.prompt?void 0!==e.prompt.isValid&&!0!==e.prompt.isValid(y.value):void 0!==e.options&&(void 0!==e.options.isValid&&!0!==e.options.isValid(y.value)))),I=(0,n.EW)((()=>({color:C.value,label:E.value,ripple:!1,disable:T.value,...!0===(0,_.Gv)(e.ok)?e.ok:{flat:!0},"data-autofocus":"ok"===e.focus&&!0!==k.value||void 0,onClick:A}))),R=(0,n.EW)((()=>({color:C.value,label:L.value,ripple:!1,...!0===(0,_.Gv)(e.cancel)?e.cancel:{flat:!0},"data-autofocus":"cancel"===e.focus&&!0!==k.value||void 0,onClick:O})));function D(){b.value.show()}function N(){b.value.hide()}function A(){t("ok",(0,o.ux)(y.value)),N()}function O(){N()}function P(){t("hide")}function M(e){y.value=e}function F(t){!0!==T.value&&"textarea"!==e.prompt.type&&!0===(0,m.Dv)(t,13)&&A()}function B(t,i){return!0===e.html?(0,n.h)(l.A,{class:t,innerHTML:i}):(0,n.h)(l.A,{class:t},(()=>i))}function W(){return[(0,n.h)(u.A,{color:C.value,dense:!0,autofocus:!0,dark:v.value,...x.value,modelValue:y.value,"onUpdate:modelValue":M,onKeyup:F})]}function H(){return[(0,n.h)(h.A,{color:C.value,options:e.options.items,dark:v.value,...x.value,modelValue:y.value,"onUpdate:modelValue":M})]}function V(){const t=[];return e.cancel&&t.push((0,n.h)(r.A,R.value)),e.ok&&t.push((0,n.h)(r.A,I.value)),(0,n.h)(c.A,{class:!0===e.stackButtons?"items-end":"",vertical:e.stackButtons,align:"right"},(()=>t))}function j(){const t=[];return e.title&&t.push(B("q-dialog__title",e.title)),!1!==e.progress&&t.push((0,n.h)(l.A,{class:"q-dialog__progress"},(()=>(0,n.h)(S.value.component,S.value.props)))),e.message&&t.push(B("q-dialog__message",e.message)),void 0!==e.prompt?t.push((0,n.h)(l.A,{class:"scroll q-dialog-plugin__form"},W)):void 0!==e.options&&t.push((0,n.h)(d.A,{dark:v.value}),(0,n.h)(l.A,{class:"scroll q-dialog-plugin__form"},H),(0,n.h)(d.A,{dark:v.value})),(e.ok||e.cancel)&&t.push(V()),t}function z(){return[(0,n.h)(a.A,{class:[w.value,e.cardClass],style:e.cardStyle,dark:v.value},j)]}return(0,n.wB)((()=>e.prompt&&e.prompt.model),M),(0,n.wB)((()=>e.options&&e.options.model),M),Object.assign(i,{show:D,hide:N}),()=>(0,n.h)(s.A,{ref:b,onHide:P},z)}});var b=i(57991),y=i(68536);function w(e,t){for(const i in t)"spinner"!==i&&Object(t[i])===t[i]?(e[i]=Object(e[i])!==e[i]?{}:{...e[i]},w(e[i],t[i])):e[i]=t[i]}function C(e,t,i){return s=>{let r,a;const l=!0===t&&void 0!==s.component;if(!0===l){const{component:e,componentProps:t}=s;r="string"===typeof e?i.component(e):e,a=t||{}}else{const{class:t,style:i,...n}=s;r=e,a=n,void 0!==t&&(n.cardClass=t),void 0!==i&&(n.cardStyle=i)}let c,d=!1;const u=(0,o.KR)(null),h=(0,y.US)(!1,"dialog"),g=e=>{if(null!==u.value&&void 0!==u.value[e])return void u.value[e]();const t=c.$.subTree;if(t&&t.component){if(t.component.proxy&&t.component.proxy[e])return void t.component.proxy[e]();if(t.component.subTree&&t.component.subTree.component&&t.component.subTree.component.proxy&&t.component.subTree.component.proxy[e])return void t.component.subTree.component.proxy[e]()}console.error("[Quasar] Incorrectly defined Dialog component")},p=[],f=[],m={onOk(e){return p.push(e),m},onCancel(e){return f.push(e),m},onDismiss(e){return p.push(e),f.push(e),m},hide(){return g("hide"),m},update(e){if(null!==c){if(!0===l)Object.assign(a,e);else{const{class:t,style:i,...n}=e;void 0!==t&&(n.cardClass=t),void 0!==i&&(n.cardStyle=i),w(a,n)}c.$forceUpdate()}return m}},_=e=>{d=!0,p.forEach((t=>{t(e)}))},v=()=>{C.unmount(h),(0,y._J)(h),C=null,c=null,!0!==d&&f.forEach((e=>{e()}))};let C=(0,b.i)({name:"QGlobalDialog",setup:()=>()=>(0,n.h)(r,{...a,ref:u,onOk:_,onHide:v,onVnodeMounted(...e){"function"===typeof a.onVnodeMounted&&a.onVnodeMounted(...e),(0,n.dY)((()=>g("show")))}})},i);return c=C.mount(h),m}}const S={install({$q:e,parentApp:t}){e.dialog=this.create=C(v,!0,t)}}},93493:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(29467),o=i(82453);const s={name:"material-icons",type:{positive:"check_circle",negative:"warning",info:"info",warning:"priority_high"},arrow:{up:"arrow_upward",right:"arrow_forward",down:"arrow_downward",left:"arrow_back",dropdown:"arrow_drop_down"},chevron:{left:"chevron_left",right:"chevron_right"},colorPicker:{spectrum:"gradient",tune:"tune",palette:"style"},pullToRefresh:{icon:"refresh"},carousel:{left:"chevron_left",right:"chevron_right",up:"keyboard_arrow_up",down:"keyboard_arrow_down",navigationIcon:"lens"},chip:{remove:"cancel",selected:"check"},datetime:{arrowLeft:"chevron_left",arrowRight:"chevron_right",now:"access_time",today:"today"},editor:{bold:"format_bold",italic:"format_italic",strikethrough:"strikethrough_s",underline:"format_underlined",unorderedList:"format_list_bulleted",orderedList:"format_list_numbered",subscript:"vertical_align_bottom",superscript:"vertical_align_top",hyperlink:"link",toggleFullscreen:"fullscreen",quote:"format_quote",left:"format_align_left",center:"format_align_center",right:"format_align_right",justify:"format_align_justify",print:"print",outdent:"format_indent_decrease",indent:"format_indent_increase",removeFormat:"format_clear",formatting:"text_format",fontSize:"format_size",align:"format_align_left",hr:"remove",undo:"undo",redo:"redo",heading:"format_size",code:"code",size:"format_size",font:"font_download",viewSource:"code"},expansionItem:{icon:"keyboard_arrow_down",denseIcon:"arrow_drop_down"},fab:{icon:"add",activeIcon:"close"},field:{clear:"cancel",error:"error"},pagination:{first:"first_page",prev:"keyboard_arrow_left",next:"keyboard_arrow_right",last:"last_page"},rating:{icon:"grade"},stepper:{done:"check",active:"edit",error:"warning"},tabs:{left:"chevron_left",right:"chevron_right",up:"keyboard_arrow_up",down:"keyboard_arrow_down"},table:{arrowUp:"arrow_upward",warning:"warning",firstPage:"first_page",prevPage:"chevron_left",nextPage:"chevron_right",lastPage:"last_page"},tree:{icon:"play_arrow"},uploader:{done:"done",clear:"clear",add:"add_box",upload:"cloud_upload",removeQueue:"clear_all",removeUploaded:"done_all"}},r=(0,n.Xj)({iconMapFn:null,__qIconSet:{}},{set(e,t){const i={...e};i.set=r.set,Object.assign(r.__qIconSet,i)},install({$q:e,iconSet:t,ssrContext:i}){void 0!==e.config.iconMapFn&&(this.iconMapFn=e.config.iconMapFn),e.iconSet=this.__qIconSet,(0,o.$)(e,"iconMapFn",(()=>this.iconMapFn),(e=>{this.iconMapFn=e})),!0===this.__installed?void 0!==t&&this.set(t):(this.props=new Proxy(this.__qIconSet,{get(){return Reflect.get(...arguments)},ownKeys(e){return Reflect.ownKeys(e).filter((e=>"set"!==e))}}),this.set(t||s))}}),a=r},4360:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(29467);const o={isoName:"en-US",nativeName:"English (US)",label:{clear:"Clear",ok:"OK",cancel:"Cancel",close:"Close",set:"Set",select:"Select",reset:"Reset",remove:"Remove",update:"Update",create:"Create",search:"Search",filter:"Filter",refresh:"Refresh",expand:e=>e?`Expand "${e}"`:"Expand",collapse:e=>e?`Collapse "${e}"`:"Collapse"},date:{days:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),daysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),firstDayOfWeek:0,format24h:!1,pluralDay:"days"},table:{noData:"No data available",noResults:"No matching records found",loading:"Loading...",selectedRecords:e=>1===e?"1 record selected.":(0===e?"No":e)+" records selected.",recordsPerPage:"Records per page:",allRows:"All",pagination:(e,t,i)=>e+"-"+t+" of "+i,columns:"Columns"},editor:{url:"URL",bold:"Bold",italic:"Italic",strikethrough:"Strikethrough",underline:"Underline",unorderedList:"Unordered List",orderedList:"Ordered List",subscript:"Subscript",superscript:"Superscript",hyperlink:"Hyperlink",toggleFullscreen:"Toggle Fullscreen",quote:"Quote",left:"Left align",center:"Center align",right:"Right align",justify:"Justify align",print:"Print",outdent:"Decrease indentation",indent:"Increase indentation",removeFormat:"Remove formatting",formatting:"Formatting",fontSize:"Font Size",align:"Align",hr:"Insert Horizontal Rule",undo:"Undo",redo:"Redo",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",paragraph:"Paragraph",code:"Code",size1:"Very small",size2:"A bit small",size3:"Normal",size4:"Medium-large",size5:"Big",size6:"Very big",size7:"Maximum",defaultFont:"Default Font",viewSource:"View Source"},tree:{noNodes:"No nodes available",noResults:"No matching nodes found"}};function s(){const e=!0===Array.isArray(navigator.languages)&&0!==navigator.languages.length?navigator.languages[0]:navigator.language;if("string"===typeof e)return e.split(/[-_]/).map(((e,t)=>0===t?e.toLowerCase():t>1||e.length<4?e.toUpperCase():e[0].toUpperCase()+e.slice(1).toLowerCase())).join("-")}const r=(0,n.Xj)({__qLang:{}},{getLocale:s,set(e=o,t){const i={...e,rtl:!0===e.rtl,getLocale:s};if(i.set=r.set,void 0===r.__langConfig||!0!==r.__langConfig.noHtmlAttrs){const e=document.documentElement;e.setAttribute("dir",!0===i.rtl?"rtl":"ltr"),e.setAttribute("lang",i.isoName)}Object.assign(r.__qLang,i)},install({$q:e,lang:t,ssrContext:i}){e.lang=r.__qLang,r.__langConfig=e.config.lang,!0===this.__installed?void 0!==t&&this.set(t):(this.props=new Proxy(this.__qLang,{get(){return Reflect.get(...arguments)},ownKeys(e){return Reflect.ownKeys(e).filter((e=>"set"!==e&&"getLocale"!==e))}}),this.set(t||o))}}),a=r},36153:(e,t,i)=>{"use strict";i.d(t,{A:()=>w});i(10239);var n=i(61758),o=i(29104),s=i(30564),r=i(57991),a=i(29467),l=i(68536),c=i(87941),d=i(1054);let u,h,g=0,p=null,f={},m={};const _={group:"__default_quasar_group__",delay:0,message:!1,html:!1,spinnerSize:80,spinnerColor:"",messageColor:"",backgroundColor:"",boxClass:"",spinner:s.A,customClass:""},v={..._};function b(e){if(e&&void 0!==e.group&&void 0!==m[e.group])return Object.assign(m[e.group],e);const t=!0===(0,d.Gv)(e)&&!0===e.ignoreDefaults?{..._,...e}:{...v,...e};return m[t.group]=t,t}const y=(0,a.Xj)({isActive:!1},{show(e){f=b(e);const{group:t}=f;return y.isActive=!0,void 0!==u?(f.uid=g,h.$forceUpdate()):(f.uid=++g,null!==p&&clearTimeout(p),p=setTimeout((()=>{p=null;const e=(0,l.US)("q-loading");u=(0,r.i)({name:"QLoading",setup(){function t(){!0!==y.isActive&&void 0!==u&&((0,c.A)(!1),u.unmount(e),(0,l._J)(e),u=void 0,h=void 0)}function i(){if(!0!==y.isActive)return null;const e=[(0,n.h)(f.spinner,{class:"q-loading__spinner",color:f.spinnerColor,size:f.spinnerSize})];return f.message&&e.push((0,n.h)("div",{class:"q-loading__message"+(f.messageColor?` text-${f.messageColor}`:""),[!0===f.html?"innerHTML":"textContent"]:f.message})),(0,n.h)("div",{class:"q-loading fullscreen flex flex-center z-max "+f.customClass.trim(),key:f.uid},[(0,n.h)("div",{class:"q-loading__backdrop"+(f.backgroundColor?` bg-${f.backgroundColor}`:"")}),(0,n.h)("div",{class:"q-loading__box column items-center "+f.boxClass},e)])}return(0,n.sV)((()=>{(0,c.A)(!0)})),()=>(0,n.h)(o.eB,{name:"q-transition--fade",appear:!0,onAfterLeave:t},i)}},y.__parentApp),h=u.mount(e)}),f.delay)),e=>{void 0!==e&&Object(e)===e?y.show({...e,group:t}):y.hide(t)}},hide(e){if(!0===y.isActive){if(void 0===e)m={};else{if(void 0===m[e])return;{delete m[e];const t=Object.keys(m);if(0!==t.length){const e=t[t.length-1];return void y.show({group:e})}}}null!==p&&(clearTimeout(p),p=null),y.isActive=!1}},setDefaults(e){!0===(0,d.Gv)(e)&&Object.assign(v,e)},install({$q:e,parentApp:t}){e.loading=this,y.__parentApp=t,void 0!==e.config.loading&&this.setDefaults(e.config.loading)}}),w=y},20989:(e,t,i)=>{"use strict";i.d(t,{A:()=>R});i(10239);var n=i(38734),o=i(61758),s=i(29104),r=i(3952),a=i(50492),l=i(1693),c=i(30564),d=i(57991),u=i(29467),h=(i(22500),i(68536)),g=i(1054);let p=0;const f={},m={},_={},v={},b=/^\s*$/,y=[],w=[void 0,null,!0,!1,""],C=["top-left","top-right","bottom-left","bottom-right","top","bottom","left","right","center"],S=["top-left","top-right","bottom-left","bottom-right"],k={positive:{icon:e=>e.iconSet.type.positive,color:"positive"},negative:{icon:e=>e.iconSet.type.negative,color:"negative"},warning:{icon:e=>e.iconSet.type.warning,color:"warning",textColor:"dark"},info:{icon:e=>e.iconSet.type.info,color:"info"},ongoing:{group:!1,timeout:0,spinner:!0,color:"grey-8"}};function x(e,t,i){if(!e)return T("parameter required");let o;const s={textColor:"white"};if(!0!==e.ignoreDefaults&&Object.assign(s,f),!1===(0,g.Gv)(e)&&(s.type&&Object.assign(s,k[s.type]),e={message:e}),Object.assign(s,k[e.type||s.type],e),"function"===typeof s.icon&&(s.icon=s.icon(t)),s.spinner?(!0===s.spinner&&(s.spinner=c.A),s.spinner=(0,n.IG)(s.spinner)):s.spinner=!1,s.meta={hasMedia:Boolean(!1!==s.spinner||s.icon||s.avatar),hasText:L(s.message)||L(s.caption)},s.position){if(!1===C.includes(s.position))return T("wrong position",e)}else s.position="bottom";if(!0===w.includes(s.timeout))s.timeout=5e3;else{const t=Number(s.timeout);if(isNaN(t)||t<0)return T("wrong timeout",e);s.timeout=Number.isFinite(t)?t:0}0===s.timeout?s.progress=!1:!0===s.progress&&(s.meta.progressClass="q-notification__progress"+(s.progressClass?` ${s.progressClass}`:""),s.meta.progressStyle={animationDuration:`${s.timeout+1e3}ms`});const r=(!0===Array.isArray(e.actions)?e.actions:[]).concat(!0!==e.ignoreDefaults&&!0===Array.isArray(f.actions)?f.actions:[]).concat(void 0!==k[e.type]&&!0===Array.isArray(k[e.type].actions)?k[e.type].actions:[]),{closeBtn:a}=s;if(a&&r.push({label:"string"===typeof a?a:t.lang.label.close}),s.actions=r.map((({handler:e,noDismiss:t,...i})=>({flat:!0,...i,onClick:"function"===typeof e?()=>{e(),!0!==t&&l()}:()=>{l()}}))),void 0===s.multiLine&&(s.multiLine=s.actions.length>1),Object.assign(s.meta,{class:"q-notification row items-stretch q-notification--"+(!0===s.multiLine?"multi-line":"standard")+(void 0!==s.color?` bg-${s.color}`:"")+(void 0!==s.textColor?` text-${s.textColor}`:"")+(void 0!==s.classes?` ${s.classes}`:""),wrapperClass:"q-notification__wrapper col relative-position border-radius-inherit "+(!0===s.multiLine?"column no-wrap justify-center":"row items-center"),contentClass:"q-notification__content row items-center"+(!0===s.multiLine?"":" col"),leftClass:!0===s.meta.hasText?"additional":"single",attrs:{role:"alert",...s.attrs}}),!1===s.group?(s.group=void 0,s.meta.group=void 0):(void 0!==s.group&&!0!==s.group||(s.group=[s.message,s.caption,s.multiline].concat(s.actions.map((e=>`${e.label}*${e.icon}`))).join("|")),s.meta.group=s.group+"|"+s.position),0===s.actions.length?s.actions=void 0:s.meta.actionsClass="q-notification__actions row items-center "+(!0===s.multiLine?"justify-end":"col-auto")+(!0===s.meta.hasMedia?" q-notification__actions--with-media":""),void 0!==i){i.notif.meta.timer&&(clearTimeout(i.notif.meta.timer),i.notif.meta.timer=void 0),s.meta.uid=i.notif.meta.uid;const e=_[s.position].value.indexOf(i.notif);_[s.position].value[e]=s}else{const t=m[s.meta.group];if(void 0===t){if(s.meta.uid=p++,s.meta.badge=1,-1!==["left","right","center"].indexOf(s.position))_[s.position].value.splice(Math.floor(_[s.position].value.length/2),0,s);else{const e=-1!==s.position.indexOf("top")?"unshift":"push";_[s.position].value[e](s)}void 0!==s.group&&(m[s.meta.group]=s)}else{if(t.meta.timer&&(clearTimeout(t.meta.timer),t.meta.timer=void 0),void 0!==s.badgePosition){if(!1===S.includes(s.badgePosition))return T("wrong badgePosition",e)}else s.badgePosition="top-"+(-1!==s.position.indexOf("left")?"right":"left");s.meta.uid=t.meta.uid,s.meta.badge=t.meta.badge+1,s.meta.badgeClass=`q-notification__badge q-notification__badge--${s.badgePosition}`+(void 0!==s.badgeColor?` bg-${s.badgeColor}`:"")+(void 0!==s.badgeTextColor?` text-${s.badgeTextColor}`:"")+(s.badgeClass?` ${s.badgeClass}`:"");const i=_[s.position].value.indexOf(t);_[s.position].value[i]=m[s.meta.group]=s}}const l=()=>{E(s),o=void 0};return s.timeout>0&&(s.meta.timer=setTimeout((()=>{s.meta.timer=void 0,l()}),s.timeout+1e3)),void 0!==s.group?t=>{void 0!==t?T("trying to update a grouped one which is forbidden",e):l()}:(o={dismiss:l,config:e,notif:s},void 0===i?e=>{if(void 0!==o)if(void 0===e)o.dismiss();else{const i=Object.assign({},o.config,e,{group:!1,position:s.position});x(i,t,o)}}:void Object.assign(i,o))}function E(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);const t=_[e.position].value.indexOf(e);if(-1!==t){void 0!==e.group&&delete m[e.meta.group];const i=y[""+e.meta.uid];if(i){const{width:e,height:t}=getComputedStyle(i);i.style.left=`${i.offsetLeft}px`,i.style.width=e,i.style.height=t}_[e.position].value.splice(t,1),"function"===typeof e.onDismiss&&e.onDismiss()}}function L(e){return void 0!==e&&null!==e&&!0!==b.test(e)}function T(e,t){return console.error(`Notify: ${e}`,t),!1}function I(){return(0,u.a0)({name:"QNotifications",devtools:{hide:!0},setup(){return()=>(0,o.h)("div",{class:"q-notifications"},C.map((e=>(0,o.h)(s.F,{key:e,class:v[e],tag:"div",name:`q-notification--${e}`},(()=>_[e].value.map((e=>{const t=e.meta,i=[];if(!0===t.hasMedia&&(!1!==e.spinner?i.push((0,o.h)(e.spinner,{class:"q-notification__spinner q-notification__spinner--"+t.leftClass,color:e.spinnerColor,size:e.spinnerSize})):e.icon?i.push((0,o.h)(a.A,{class:"q-notification__icon q-notification__icon--"+t.leftClass,name:e.icon,color:e.iconColor,size:e.iconSize,role:"img"})):e.avatar&&i.push((0,o.h)(r.A,{class:"q-notification__avatar q-notification__avatar--"+t.leftClass},(()=>(0,o.h)("img",{src:e.avatar,"aria-hidden":"true"}))))),!0===t.hasText){let t;const n={class:"q-notification__message col"};if(!0===e.html)n.innerHTML=e.caption?`
    ${e.message}
    ${e.caption}
    `:e.message;else{const i=[e.message];t=e.caption?[(0,o.h)("div",i),(0,o.h)("div",{class:"q-notification__caption"},[e.caption])]:i}i.push((0,o.h)("div",n,t))}const n=[(0,o.h)("div",{class:t.contentClass},i)];return!0===e.progress&&n.push((0,o.h)("div",{key:`${t.uid}|p|${t.badge}`,class:t.progressClass,style:t.progressStyle})),void 0!==e.actions&&n.push((0,o.h)("div",{class:t.actionsClass},e.actions.map((e=>(0,o.h)(l.A,e))))),t.badge>1&&n.push((0,o.h)("div",{key:`${t.uid}|${t.badge}`,class:e.meta.badgeClass,style:e.badgeStyle},[t.badge])),(0,o.h)("div",{ref:e=>{y[""+t.uid]=e},key:t.uid,class:t.class,...t.attrs},[(0,o.h)("div",{class:t.wrapperClass},n)])})))))))}})}const R={setDefaults(e){!0===(0,g.Gv)(e)&&Object.assign(f,e)},registerType(e,t){!0===(0,g.Gv)(t)&&(k[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=t=>x(t,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,void 0!==e.config.notify&&this.setDefaults(e.config.notify),!0!==this.__installed){C.forEach((e=>{_[e]=(0,n.KR)([]);const t=!0===["left","center","right"].includes(e)?"center":-1!==e.indexOf("top")?"top":"bottom",i=-1!==e.indexOf("left")?"start":-1!==e.indexOf("right")?"end":"center",o=["left","right"].includes(e)?`items-${"left"===e?"start":"end"} justify-center`:"center"===e?"flex-center":`items-${i}`;v[e]=`q-notifications__list q-notifications__list--${t} fixed column no-wrap ${o}`}));const e=(0,h.US)("q-notify");(0,d.i)(I(),t).mount(e)}}}},41597:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>f,Sn:()=>g,ot:()=>s});i(10239);var n=i(38734),o=i(82453);const s=(0,n.KR)(!1);let r;function a(e,t){const i=/(edg|edge|edga|edgios)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(vivaldi)[\/]([\w.]+)/.exec(e)||/(chrome|crios)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(firefox|fxios)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(e)||[];return{browser:i[5]||i[3]||i[1]||"",version:i[4]||i[2]||"0",platform:t[0]||""}}function l(e){return/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[]}const c="ontouchstart"in window||window.navigator.maxTouchPoints>0;function d(e){const t=e.toLowerCase(),i=l(t),n=a(t,i),o={mobile:!1,desktop:!1,cordova:!1,capacitor:!1,nativeMobile:!1,electron:!1,bex:!1,linux:!1,mac:!1,win:!1,cros:!1,chrome:!1,firefox:!1,opera:!1,safari:!1,vivaldi:!1,edge:!1,edgeChromium:!1,ie:!1,webkit:!1,android:!1,ios:!1,ipad:!1,iphone:!1,ipod:!1,kindle:!1,winphone:!1,blackberry:!1,playbook:!1,silk:!1};n.browser&&(o[n.browser]=!0,o.version=n.version,o.versionNumber=parseInt(n.version,10)),n.platform&&(o[n.platform]=!0);const d=o.android||o.ios||o.bb||o.blackberry||o.ipad||o.iphone||o.ipod||o.kindle||o.playbook||o.silk||o["windows phone"];if(!0===d||-1!==t.indexOf("mobile")?o.mobile=!0:o.desktop=!0,o["windows phone"]&&(o.winphone=!0,delete o["windows phone"]),o.edga||o.edgios||o.edg?(o.edge=!0,n.browser="edge"):o.crios?(o.chrome=!0,n.browser="chrome"):o.fxios&&(o.firefox=!0,n.browser="firefox"),(o.ipod||o.ipad||o.iphone)&&(o.ios=!0),o.vivaldi&&(n.browser="vivaldi",o.vivaldi=!0),(o.chrome||o.opr||o.safari||o.vivaldi||!0===o.mobile&&!0!==o.ios&&!0!==d)&&(o.webkit=!0),o.opr&&(n.browser="opera",o.opera=!0),o.safari&&(o.blackberry||o.bb?(n.browser="blackberry",o.blackberry=!0):o.playbook?(n.browser="playbook",o.playbook=!0):o.android?(n.browser="android",o.android=!0):o.kindle?(n.browser="kindle",o.kindle=!0):o.silk&&(n.browser="silk",o.silk=!0)),o.name=n.browser,o.platform=n.platform,-1!==t.indexOf("electron"))o.electron=!0;else if(-1!==document.location.href.indexOf("-extension://"))o.bex=!0;else{if(void 0!==window.Capacitor?(o.capacitor=!0,o.nativeMobile=!0,o.nativeMobileWrapper="capacitor"):void 0===window._cordovaNative&&void 0===window.cordova||(o.cordova=!0,o.nativeMobile=!0,o.nativeMobileWrapper="cordova"),!0===s.value&&(r={is:{...o}}),!0===c&&!0===o.mac&&(!0===o.desktop&&!0===o.safari||!0===o.nativeMobile&&!0!==o.android&&!0!==o.ios&&!0!==o.ipad)){delete o.mac,delete o.desktop;const e=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(o,{mobile:!0,ios:!0,platform:e,[e]:!0})}!0!==o.mobile&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete o.desktop,o.mobile=!0)}return o}const u=navigator.userAgent||navigator.vendor||window.opera,h={has:{touch:!1,webStorage:!1},within:{iframe:!1}},g={userAgent:u,is:d(u),has:{touch:c},within:{iframe:window.self!==window.top}},p={install(e){const{$q:t}=e;!0===s.value?(e.onSSRHydrated.push((()=>{Object.assign(t.platform,g),s.value=!1})),t.platform=(0,n.Kh)(this)):t.platform=this}};{let e;(0,o.$)(g.has,"webStorage",(()=>{if(void 0!==e)return e;try{if(window.localStorage)return e=!0,!0}catch(t){}return e=!1,!1})),Object.assign(p,g),!0===s.value&&(Object.assign(p,r,h),r=null)}const f=p},34848:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});i(10239);var n=i(41597),o=i(22500);const s=()=>!0;function r(e){return"string"===typeof e&&""!==e&&"/"!==e&&"#/"!==e}function a(e){return!0===e.startsWith("#")&&(e=e.substring(1)),!1===e.startsWith("/")&&(e="/"+e),!0===e.endsWith("/")&&(e=e.substring(0,e.length-1)),"#"+e}function l(e){if(!1===e.backButtonExit)return()=>!1;if("*"===e.backButtonExit)return s;const t=["#/"];return!0===Array.isArray(e.backButtonExit)&&t.push(...e.backButtonExit.filter(r).map(a)),()=>t.includes(window.location.hash)}const c={__history:[],add:o.lQ,remove:o.lQ,install({$q:e}){if(!0===this.__installed)return;const{cordova:t,capacitor:i}=n.Sn.is;if(!0!==t&&!0!==i)return;const o=e.config[!0===t?"cordova":"capacitor"];if(void 0!==o&&!1===o.backButton)return;if(!0===i&&(void 0===window.Capacitor||void 0===window.Capacitor.Plugins.App))return;this.add=e=>{void 0===e.condition&&(e.condition=s),this.__history.push(e)},this.remove=e=>{const t=this.__history.indexOf(e);t>=0&&this.__history.splice(t,1)};const r=l(Object.assign({backButtonExit:!0},o)),a=()=>{if(this.__history.length){const e=this.__history[this.__history.length-1];!0===e.condition()&&(this.__history.pop(),e.handler())}else!0===r()?navigator.app.exitApp():window.history.back()};!0===t?document.addEventListener("deviceready",(()=>{document.addEventListener("backbutton",a,!1)})):window.Capacitor.Plugins.App.addListener("backButton",a)}}},71271:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(41597),o=(i(10239),i(22500)),s=i(1054);function r(e){return!0===(0,s.$P)(e)?"__q_date|"+e.getTime():!0===(0,s.oh)(e)?"__q_expr|"+e.source:"number"===typeof e?"__q_numb|"+e:"boolean"===typeof e?"__q_bool|"+(e?"1":"0"):"string"===typeof e?"__q_strn|"+e:"function"===typeof e?"__q_strn|"+e.toString():e===Object(e)?"__q_objt|"+JSON.stringify(e):e}function a(e){const t=e.length;if(t<9)return e;const i=e.substring(0,8),n=e.substring(9);switch(i){case"__q_date":const t=Number(n);return new Date(!0===Number.isNaN(t)?n:t);case"__q_expr":return new RegExp(n);case"__q_numb":return Number(n);case"__q_bool":return Boolean("1"===n);case"__q_strn":return""+n;case"__q_objt":return JSON.parse(n);default:return e}}function l(){const e=()=>null;return{has:()=>!1,hasItem:()=>!1,getLength:()=>0,getItem:e,getIndex:e,getKey:e,getAll:()=>{},getAllKeys:()=>[],set:o.lQ,setItem:o.lQ,remove:o.lQ,removeItem:o.lQ,clear:o.lQ,isEmpty:()=>!0}}function c(e){const t=window[e+"Storage"],i=e=>{const i=t.getItem(e);return i?a(i):null},n=e=>null!==t.getItem(e),o=(e,i)=>{t.setItem(e,r(i))},s=e=>{t.removeItem(e)};return{has:n,hasItem:n,getLength:()=>t.length,getItem:i,getIndex:e=>ee{let e;const n={},o=t.length;for(let s=0;s{const e=[],i=t.length;for(let n=0;n{t.clear()},isEmpty:()=>0===t.length}}const d=!1===n.Sn.has.webStorage?l():c("local"),u={install({$q:e}){e.localStorage=d}};Object.assign(u,d);const h=u},53500:(e,t,i)=>{"use strict";function n(e,t=250,i){let n=null;function o(){const o=arguments,s=()=>{n=null,!0!==i&&e.apply(this,o)};null!==n?clearTimeout(n):!0===i&&e.apply(this,o),n=setTimeout(s,t)}return o.cancel=()=>{null!==n&&clearTimeout(n)},o}i.d(t,{A:()=>n})},77556:(e,t,i)=>{"use strict";i.d(t,{$J:()=>r,AH:()=>o,V6:()=>s});var n=i(38734);function o(e,t){const i=e.style;for(const n in t)i[n]=t[n]}function s(e){if(void 0===e||null===e)return;if("string"===typeof e)try{return document.querySelector(e)||void 0}catch(i){return}const t=(0,n.R1)(e);return t?t.$el||t:void 0}function r(e,t){if(void 0===e||null===e||!0===e.contains(t))return!0;for(let i=e.nextElementSibling;null!==i;i=i.nextElementSibling)if(i.contains(t))return!0;return!1}},22500:(e,t,i)=>{"use strict";i.d(t,{F4:()=>c,Fh:()=>g,G1:()=>r,Gu:()=>d,M5:()=>u,Z4:()=>h,ds:()=>l,en:()=>a,lQ:()=>o,mG:()=>n,w7:()=>s});i(10239);const n={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(n,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch(p){}function o(){}function s(e){return 0===e.button}function r(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function a(e){if(e.path)return e.path;if(e.composedPath)return e.composedPath();const t=[];let i=e.target;while(i){if(t.push(i),"HTML"===i.tagName)return t.push(document),t.push(window),t;i=i.parentElement}}function l(e){e.stopPropagation()}function c(e){!1!==e.cancelable&&e.preventDefault()}function d(e){!1!==e.cancelable&&e.preventDefault(),e.stopPropagation()}function u(e,t){if(void 0===e||!0===t&&!0===e.__dragPrevented)return;const i=!0===t?e=>{e.__dragPrevented=!0,e.addEventListener("dragstart",c,n.notPassiveCapture)}:e=>{delete e.__dragPrevented,e.removeEventListener("dragstart",c,n.notPassiveCapture)};e.querySelectorAll("a, img").forEach(i)}function h(e,t,i){const o=`__q_${t}_evt`;e[o]=void 0!==e[o]?e[o].concat(i):i,i.forEach((t=>{t[0].addEventListener(t[1],e[t[2]],n[t[3]])}))}function g(e,t){const i=`__q_${t}_evt`;void 0!==e[i]&&(e[i].forEach((t=>{t[0].removeEventListener(t[1],e[t[2]],n[t[3]])})),e[i]=void 0)}},82732:(e,t,i)=>{"use strict";i.d(t,{Tq:()=>n,eo:()=>o});function n(e,t,i){return i<=t?t:Math.min(i,Math.max(t,e))}function o(e,t,i){if(i<=t)return t;const n=i-t+1;let o=t+(e-t)%n;return o{"use strict";i.d(t,{$P:()=>s,Et:()=>a,Gv:()=>o,Hv:()=>n,oh:()=>r});i(24906);function n(e,t){if(e===t)return!0;if(null!==e&&null!==t&&"object"===typeof e&&"object"===typeof t){if(e.constructor!==t.constructor)return!1;let i,o;if(e.constructor===Array){if(i=e.length,i!==t.length)return!1;for(o=i;0!==o--;)if(!0!==n(e[o],t[o]))return!1;return!0}if(e.constructor===Map){if(e.size!==t.size)return!1;let i=e.entries();o=i.next();while(!0!==o.done){if(!0!==t.has(o.value[0]))return!1;o=i.next()}i=e.entries(),o=i.next();while(!0!==o.done){if(!0!==n(o.value[1],t.get(o.value[0])))return!1;o=i.next()}return!0}if(e.constructor===Set){if(e.size!==t.size)return!1;const i=e.entries();o=i.next();while(!0!==o.done){if(!0!==t.has(o.value[0]))return!1;o=i.next()}return!0}if(null!=e.buffer&&e.buffer.constructor===ArrayBuffer){if(i=e.length,i!==t.length)return!1;for(o=i;0!==o--;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const s=Object.keys(e).filter((t=>void 0!==e[t]));if(i=s.length,i!==Object.keys(t).filter((e=>void 0!==t[e])).length)return!1;for(o=i;0!==o--;){const i=s[o];if(!0!==n(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function o(e){return null!==e&&"object"===typeof e&&!0!==Array.isArray(e)}function s(e){return"[object Date]"===Object.prototype.toString.call(e)}function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function a(e){return"number"===typeof e&&isFinite(e)}},28253:(e,t,i)=>{"use strict";i.d(t,{Or:()=>o,cr:()=>n,xX:()=>s});const n={};let o=!1;function s(){o=!0}},68536:(e,t,i)=>{"use strict";i.d(t,{US:()=>l,_J:()=>c});i(10239);var n=i(28253);const o=[],s=[];let r=1,a=document.body;function l(e,t){const i=document.createElement("div");if(i.id=void 0!==t?`q-portal--${t}--${r++}`:e,void 0!==n.cr.globalNodes){const e=n.cr.globalNodes.class;void 0!==e&&(i.className=e)}return a.appendChild(i),o.push(i),s.push(t),i}function c(e){const t=o.indexOf(e);o.splice(t,1),s.splice(t,1),e.remove()}},29467:(e,t,i)=>{"use strict";i.d(t,{Xj:()=>l,Yg:()=>a,a0:()=>r});var n=i(38734),o=i(61758),s=i(82453);function r(e){return(0,n.IG)((0,o.pM)(e))}function a(e){return(0,n.IG)(e)}const l=(e,t)=>{const i=(0,n.Kh)(e);for(const n in e)(0,s.$)(t,n,(()=>i[n]),(e=>{i[n]=e}));return t}},98983:(e,t,i)=>{"use strict";i.d(t,{FD:()=>r,Gy:()=>l,gv:()=>a,vQ:()=>c});i(10239);let n=[],o=[];function s(e){o=o.filter((t=>t!==e))}function r(e){s(e),o.push(e)}function a(e){s(e),0===o.length&&0!==n.length&&(n[n.length-1](),n=[])}function l(e){0===o.length?e():n.push(e)}function c(e){n=n.filter((t=>t!==e))}},88173:(e,t,i)=>{"use strict";i.d(t,{g:()=>r,v:()=>a});i(10239);var n=i(41597);const o=[];function s(e){o[o.length-1](e)}function r(e){!0===n.Sn.is.desktop&&(o.push(e),1===o.length&&document.body.addEventListener("focusin",s))}function a(e){const t=o.indexOf(e);-1!==t&&(o.splice(t,1),0===o.length&&document.body.removeEventListener("focusin",s))}},82453:(e,t,i)=>{"use strict";function n(e,t,i,n){return Object.defineProperty(e,t,{get:i,set:n,enumerable:!0}),e}function o(e,t){for(const i in t)n(e,i,t[i]);return e}i.d(t,{$:()=>n,M:()=>o})},78773:(e,t,i)=>{"use strict";i.d(t,{I:()=>u,V:()=>h});i(10239);var n=i(41597),o=i(2906);const s=[];let r;function a(e){r=27===e.keyCode}function l(){!0===r&&(r=!1)}function c(e){!0===r&&(r=!1,!0===(0,o.Dv)(e,27)&&s[s.length-1](e))}function d(e){window[e]("keydown",a),window[e]("blur",l),window[e]("keyup",c),r=!1}function u(e){!0===n.Sn.is.desktop&&(s.push(e),1===s.length&&d("addEventListener"))}function h(e){const t=s.indexOf(e);-1!==t&&(s.splice(t,1),0===s.length&&d("removeEventListener"))}},2906:(e,t,i)=>{"use strict";i.d(t,{Dv:()=>r,JL:()=>s,V7:()=>o});let n=!1;function o(e){n=!0===e.isComposing}function s(e){return!0===n||e!==Object(e)||!0===e.isComposing||!0===e.qKeyEvent}function r(e,t){return!0!==s(e)&&[].concat(t).includes(e.keyCode)}},10447:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={xs:30,sm:35,md:40,lg:50,xl:60}},35563:(e,t,i)=>{"use strict";i.d(t,{Rv:()=>s,bc:()=>r,jx:()=>o,k0:()=>a});var n=i(15157);const o=[];function s(e){return o.find((t=>null!==t.contentEl&&t.contentEl.contains(e)))}function r(e,t){do{if("QMenu"===e.$options.name){if(e.hide(t),!0===e.$props.separateClosePopup)return(0,n.V_)(e)}else if(!0===e.__qPortal){const i=(0,n.V_)(e);return void 0!==i&&"QPopupProxy"===i.$options.name?(e.hide(t),i):e}e=(0,n.V_)(e)}while(void 0!==e&&null!==e)}function a(e,t,i){while(0!==i&&void 0!==e&&null!==e){if(!0===e.__qPortal){if(i--,"QMenu"===e.$options.name){e=r(e,t);continue}e.hide(t)}e=(0,n.V_)(e)}}},65139:(e,t,i)=>{"use strict";i.d(t,{Hp:()=>r,Ij:()=>s,Kf:()=>l,bG:()=>a,zm:()=>o});var n=i(61758);function o(e,t){return void 0!==e&&e()||t}function s(e,t){if(void 0!==e){const t=e();if(void 0!==t&&null!==t)return t.slice()}return t}function r(e,t){return void 0!==e?t.concat(e()):t}function a(e,t){return void 0===e?t:void 0!==t?t.concat(e()):e()}function l(e,t,i,o,s,r){t.key=o+s;const a=(0,n.h)(e,t,i);return!0===s?(0,n.bo)(a,r()):a}},14897:(e,t,i)=>{"use strict";i.d(t,{E:()=>n});let n=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const t=document.createElement("div");Object.assign(t.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(t),e.scrollLeft=-1e3,n=e.scrollLeft>=0,e.remove()}},72941:(e,t,i)=>{"use strict";i.d(t,{w:()=>o});var n=i(41597);function o(){if(void 0!==window.getSelection){const e=window.getSelection();void 0!==e.empty?e.empty():void 0!==e.removeAllRanges&&(e.removeAllRanges(),!0!==n.Ay.is.mobile&&e.addRange(document.createRange()))}else void 0!==document.selection&&document.selection.empty()}},27973:(e,t,i)=>{"use strict";i.d(t,{ON:()=>o,U_:()=>l,Uv:()=>a,XA:()=>n,YR:()=>s,q3:()=>r});const n="_q_",o="_q_l_",s="_q_pc_",r="_q_fo_",a="_q_tabs_";function l(){}},97677:(e,t,i)=>{"use strict";i.d(t,{U:()=>s,W:()=>a});const n={left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0},o=Object.keys(n);function s(e){const t={};for(const i of o)!0===e[i]&&(t[i]=!0);return 0===Object.keys(t).length?n:(!0===t.horizontal?t.left=t.right=!0:!0===t.left&&!0===t.right&&(t.horizontal=!0),!0===t.vertical?t.up=t.down=!0:!0===t.up&&!0===t.down&&(t.vertical=!0),!0===t.horizontal&&!0===t.vertical&&(t.all=!0),t)}n.all=!0;const r=["INPUT","TEXTAREA"];function a(e,t){return void 0===t.event&&void 0!==e.target&&!0!==e.target.draggable&&"function"===typeof t.handler&&!1===r.includes(e.target.nodeName.toUpperCase())&&(void 0===e.qClonedBy||-1===e.qClonedBy.indexOf(t.uid))}},15157:(e,t,i)=>{"use strict";function n(e){if(Object(e.$parent)===e.$parent)return e.$parent;let{parent:t}=e.$;while(Object(t)===t){if(Object(t.proxy)===t.proxy)return t.proxy;t=t.parent}}function o(e,t){"symbol"===typeof t.type?!0===Array.isArray(t.children)&&t.children.forEach((t=>{o(e,t)})):e.add(t)}function s(e){const t=new Set;return e.forEach((e=>{o(t,e)})),Array.from(t)}function r(e){return void 0!==e.appContext.config.globalProperties.$router}function a(e){return!0===e.isUnmounted||!0===e.isDeactivated}i.d(t,{$b:()=>r,Hl:()=>s,V_:()=>n,rU:()=>a})},87941:(e,t,i)=>{"use strict";i.d(t,{A:()=>y});var n=i(38336),o=i(22500),s=i(41597);let r,a,l,c,d,u,h=0,g=!1,p=null;function f(e){m(e)&&(0,o.Gu)(e)}function m(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const t=(0,o.en)(e),i=e.shiftKey&&!e.deltaX,s=!i&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),r=i||s?e.deltaY:e.deltaX;for(let o=0;o0&&e.scrollTop+e.clientHeight===e.scrollHeight:r<0&&0===e.scrollLeft||r>0&&e.scrollLeft+e.clientWidth===e.scrollWidth}return!0}function _(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function v(e){!0!==g&&(g=!0,requestAnimationFrame((()=>{g=!1;const{height:t}=e.target,{clientHeight:i,scrollTop:n}=document.scrollingElement;void 0!==l&&t===window.innerHeight||(l=i-t,document.scrollingElement.scrollTop=n),n>l&&(document.scrollingElement.scrollTop-=Math.ceil((n-l)/8))})))}function b(e){const t=document.body,i=void 0!==window.visualViewport;if("add"===e){const{overflowY:e,overflowX:l}=window.getComputedStyle(t);r=(0,n.lS)(window),a=(0,n.fQ)(window),c=t.style.left,d=t.style.top,u=window.location.href,t.style.left=`-${r}px`,t.style.top=`-${a}px`,"hidden"!==l&&("scroll"===l||t.scrollWidth>window.innerWidth)&&t.classList.add("q-body--force-scrollbar-x"),"hidden"!==e&&("scroll"===e||t.scrollHeight>window.innerHeight)&&t.classList.add("q-body--force-scrollbar-y"),t.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,!0===s.Sn.is.ios&&(!0===i?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",v,o.mG.passiveCapture),window.visualViewport.addEventListener("scroll",v,o.mG.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",_,o.mG.passiveCapture))}!0===s.Sn.is.desktop&&!0===s.Sn.is.mac&&window[`${e}EventListener`]("wheel",f,o.mG.notPassive),"remove"===e&&(!0===s.Sn.is.ios&&(!0===i?(window.visualViewport.removeEventListener("resize",v,o.mG.passiveCapture),window.visualViewport.removeEventListener("scroll",v,o.mG.passiveCapture)):window.removeEventListener("scroll",_,o.mG.passiveCapture)),t.classList.remove("q-body--prevent-scroll"),t.classList.remove("q-body--force-scrollbar-x"),t.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,t.style.left=c,t.style.top=d,window.location.href===u&&window.scrollTo(r,a),l=void 0)}function y(e){let t="add";if(!0===e){if(h++,null!==p)return clearTimeout(p),void(p=null);if(h>1)return}else{if(0===h)return;if(h--,h>0)return;if(t="remove",!0===s.Sn.is.ios&&!0===s.Sn.is.nativeMobile)return null!==p&&clearTimeout(p),void(p=setTimeout((()=>{b(t),p=null}),100))}b(t)}},38336:(e,t,i)=>{"use strict";i.d(t,{D_:()=>_,RZ:()=>g,XJ:()=>m,cP:()=>o,fQ:()=>a,hD:()=>r,lS:()=>l,rr:()=>p});var n=i(77556);const o=[Element,String],s=[null,document,document.body,document.scrollingElement,document.documentElement];function r(e,t){let i=(0,n.V6)(t);if(void 0===i){if(void 0===e||null===e)return window;i=e.closest(".scroll,.scroll-y,.overflow-auto")}return s.includes(i)?window:i}function a(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function l(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function c(e,t,i=0){const n=void 0===arguments[3]?performance.now():arguments[3],o=a(e);i<=0?o!==t&&u(e,t):requestAnimationFrame((s=>{const r=s-n,a=o+(t-o)/Math.max(r,i)*r;u(e,a),a!==t&&c(e,t,i-r,s)}))}function d(e,t,i=0){const n=void 0===arguments[3]?performance.now():arguments[3],o=l(e);i<=0?o!==t&&h(e,t):requestAnimationFrame((s=>{const r=s-n,a=o+(t-o)/Math.max(r,i)*r;h(e,a),a!==t&&d(e,t,i-r,s)}))}function u(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function h(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function g(e,t,i){i?c(e,t,i):u(e,t)}function p(e,t,i){i?d(e,t,i):h(e,t)}let f;function m(){if(void 0!==f)return f;const e=document.createElement("p"),t=document.createElement("div");(0,n.AH)(e,{width:"100%",height:"200px"}),(0,n.AH)(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);const i=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return i===o&&(o=t.clientWidth),t.remove(),f=i-o,f}function _(e,t=!0){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&(t?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"])))}},85192:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});i(52321),i(42452),i(13765),i(55516),i(48635),i(9048),i(10239);let n,o=0;const s=new Array(256);for(let c=0;c<256;c++)s[c]=(c+256).toString(16).substring(1);const r=(()=>{const e="undefined"!==typeof crypto?crypto:"undefined"!==typeof window?window.crypto||window.msCrypto:void 0;if(void 0!==e){if(void 0!==e.randomBytes)return e.randomBytes;if(void 0!==e.getRandomValues)return t=>{const i=new Uint8Array(t);return e.getRandomValues(i),i}}return e=>{const t=[];for(let i=e;i>0;i--)t.push(Math.floor(256*Math.random()));return t}})(),a=4096;function l(){(void 0===n||o+16>a)&&(o=0,n=r(a));const e=Array.prototype.slice.call(n,o,o+=16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,s[e[0]]+s[e[1]]+s[e[2]]+s[e[3]]+"-"+s[e[4]]+s[e[5]]+"-"+s[e[6]]+s[e[7]]+"-"+s[e[8]]+s[e[9]]+"-"+s[e[10]]+s[e[11]]+s[e[12]]+s[e[13]]+s[e[14]]+s[e[15]]}},36501:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(57991),o=i(4360),s=i(93493);const r={name:"Quasar",version:"2.17.0",install:n.A,lang:o.A,iconSet:s.A}},1573:(e,t,i)=>{"use strict";function n(e){return e}function o(e){return e}function s(e){return e}i.d(t,{M_:()=>s,wE:()=>o,zj:()=>n})},88941:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});var n=i(21998),o=i(75650),s=i(49385);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:o.l;return(0,s.t)(e,h()),function(i){var n,o,s=i||{},r=s.queryHook,a=void 0===r?g:r;return{$$type:"ais.searchBox",init:function(t){var i=t.instantSearchInstance;e(l(l({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(l(l({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.setQueryParameter("query",void 0)},getRenderState:function(e,t){return l(l({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,s=e.instantSearchInstance,r=e.state;return n||(n=function(e){a(e,(function(e){return t.setQuery(e).search()}))},o=function(){t.setQuery("").search()}),{query:r.query||"",refine:n,clear:o,widgetParams:i,isSearchStalled:"stalled"===s.status}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.query||"";return""===n||e&&e.query===n?e:l(l({},e),{},{query:n})},getWidgetSearchParameters:function(e,t){var i=t.uiState;return e.setQueryParameter("query",i.query||"")}}}};const f=p},49385:(e,t,i)=>{"use strict";function n(e){return Object.prototype.toString.call(e).slice(8,-1)}function o(e,t){if(void 0===e||"function"!==typeof e)throw new Error("The render function is not valid (received type ".concat(n(e),").\n\n").concat(t))}i.d(t,{t:()=>o})},21998:(e,t,i)=>{"use strict";function n(e){var t=e.name,i=e.connector,n=void 0!==i&&i;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",n?"#connector":""].join("")}function o(){for(var e=arguments.length,t=new Array(e),i=0;in,V:()=>o})},75650:(e,t,i)=>{"use strict";function n(){}i.d(t,{l:()=>n})},78685:(e,t,i)=>{"use strict";i.d(t,{Ak:()=>o});const n="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let o=(e=21)=>{let t="",i=crypto.getRandomValues(new Uint8Array(e));while(e--)t+=n[63&i[e]];return t}},92561:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});const n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],o=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],s=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],r=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],a=(e,t,i)=>{let n=e;return"string"===typeof t||Array.isArray(t)?n=e.toLocaleString(t,i):!0!==t&&void 0===i||(n=e.toLocaleString(void 0,i)),n};function l(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const i=t.bits?t.binary?r:s:t.binary?o:n,l=t.space?" ":"";if(t.signed&&0===e)return` 0${l}${i[0]}`;const c=e<0,d=c?"-":t.signed?"+":"";let u;if(c&&(e=-e),void 0!==t.minimumFractionDigits&&(u={minimumFractionDigits:t.minimumFractionDigits}),void 0!==t.maximumFractionDigits&&(u={maximumFractionDigits:t.maximumFractionDigits,...u}),e<1){const n=a(e,t.locale,u);return d+n+l+i[0]}const h=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),i.length-1);e/=(t.binary?1024:1e3)**h,u||(e=e.toPrecision(3));const g=a(Number(e),t.locale,u),p=i[h];return d+g+l+p}},39775:(e,t,i)=>{"use strict";i.d(t,{yb:()=>m,Ay:()=>bf});var n={};function o(e,t,i){if(!e)throw new Error("You need to provide `widgetName` in your data");var n=["ais-"+e];return t&&n.push("-"+t),i&&n.push("--"+i),n.join("")}i.r(n),i.d(n,{AisAutocomplete:()=>xe,AisBreadcrumb:()=>Je,AisClearRefinements:()=>Gt,AisConfigure:()=>ri,AisCurrentRefinements:()=>Pn,AisDynamicWidgets:()=>mf,AisExperimentalConfigureRelatedItems:()=>cn,AisExperimentalDynamicWidgets:()=>_f,AisHierarchicalMenu:()=>ko,AisHighlight:()=>Bo,AisHits:()=>ds,AisHitsPerPage:()=>Is,AisIndex:()=>lr,AisInfiniteHits:()=>Oc,AisInstantSearch:()=>Jl,AisInstantSearchSsr:()=>ec,AisMenu:()=>sd,AisMenuSelect:()=>cd,AisNumericMenu:()=>Md,AisPagination:()=>mu,AisPanel:()=>bu,AisPoweredBy:()=>xu,AisQueryRuleContext:()=>$u,AisQueryRuleCustomData:()=>Gu,AisRangeInput:()=>mh,AisRatingMenu:()=>Kh,AisRefinementList:()=>xg,AisRelevantSort:()=>ff,AisSearchBox:()=>Pg,AisSnippet:()=>Bg,AisSortBy:()=>Zg,AisStateResults:()=>Dg,AisStats:()=>cp,AisToggleRefinement:()=>Dp,AisVoiceSearch:()=>of});var s=function(e){var t=e.name;return{props:{classNames:{type:Object,default:void 0}},methods:{suit:function(e,i){var n=o(t,e,i),s=this.classNames&&this.classNames[n];return s?[n,s].join(" "):n}}}};function r(e){for(var t=arguments,i=1;i0;)i[n]=arguments[n+2];var o=i.length>0?i:void 0;if("object"==typeof t&&(t.attrs||t.props||t.scopedSlots||t.on)){var s=Object.keys(t.on||{}),r=Object.assign({},t,t.attrs,t.props,s.reduce((function(e,i){return e["on"+i[0].toUpperCase()+i.slice(1)]=t.on[i],e}),{}));return delete r.attrs,delete r.props,delete r.scopedSlots,s.forEach((function(e){return delete r.on[e]})),r.on&&0===Object.keys(r.on).length&&delete r.on,(0,l.h)(e,r,t.scopedSlots?Object.assign({default:function(){return o}},t.scopedSlots):o)}return(0,l.h)(e,t,o)}return function(){return e.call(this,t)}}function h(e){var t=e.$slots||e.slots;return"function"==typeof t.default?t.default():t.default}function g(e,t){return(e.$slots||e.slots||{})[t]}var p=new Set;function f(e){p.has(e)||(p.add(e),console.warn(e))}var m=function(e,t){var i;void 0===e&&(e={});var n=e.connector;return void 0===t&&(t={}),(i={inject:{instantSearchInstance:{from:"$_ais_instantSearchInstance",default:function(){var e=this.$options._componentTag;throw new TypeError('It looks like you forgot to wrap your Algolia search component "<'+e+'>" inside of an "" component.')}},getParentIndex:{from:"$_ais_getParentIndex",default:function(){var e=this;return function(){return e.instantSearchInstance.mainIndex}}}},data:function(){return{state:null}},created:function(){if("function"==typeof n){if(this.factory=n(this.updateState,(function(){})),this.widget=r(this.factory(this.widgetParams),t),this.getParentIndex().addWidgets([this.widget]),this.instantSearchInstance._initialResults&&!this.instantSearchInstance.started){if("function"!=typeof this.instantSearchInstance.__forceRender)throw new Error("You are using server side rendering with instead of .");this.instantSearchInstance.__forceRender(this.widget,this.getParentIndex())}}else!0!==n&&f("You are using the InstantSearch widget mixin, but didn't provide a connector.\nWhile this is technically possible, and will give you access to the Helper,\nit's not the recommended way of making custom components.\n\nIf you want to disable this message, pass { connector: true } to the mixin.\n\nRead more on using connectors: https://alg.li/vue-custom")}}).beforeUnmount=function(){this.widget&&this.getParentIndex().removeWidgets([this.widget])},i.watch={widgetParams:{handler:function(e){this.state=null,this.getParentIndex().removeWidgets([this.widget]),this.widget=r(this.factory(e),t),this.getParentIndex().addWidgets([this.widget])},deep:!0}},i.methods={updateState:function(e,t){void 0===e&&(e={}),t||(this.state=e)}},i},_=i(21998),v=i(75650),b=i(49385),y={"&":"&","<":"<",">":">",'"':""","'":"'"},w=/[&<>"']/g,C=RegExp(w.source);function S(e){return e&&C.test(e)?e.replace(w,(function(e){return y[e]})):e}var k={"&":"&","<":"<",">":">",""":'"',"'":"'"},x=/&(amp|quot|lt|gt|#39);/g,E=RegExp(x.source);function L(e){return e&&E.test(e)?e.replace(x,(function(e){return k[e]})):e}function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function I(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function R(e){return"object"===T(e)&&null!==e}function D(e){if(!R(e)||"[object Object]"!==I(e))return!1;if(null===Object.getPrototypeOf(e))return!0;var t=e;while(null!==Object.getPrototypeOf(t))t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function A(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t",highlightPostTag:""};function j(e){return S(e).replace(new RegExp(H.highlightPreTag,"g"),V.highlightPreTag).replace(new RegExp(H.highlightPostTag,"g"),V.highlightPostTag)}function z(e){return D(e)&&"string"!==typeof e.value?Object.keys(e).reduce((function(t,i){return M(M({},t),{},F({},i,z(e[i])))}),{}):Array.isArray(e)?e.map(z):M(M({},e),{},{value:j(e.value)})}function U(e){return void 0===e.__escaped&&(e=e.map((function(e){var t=O({},(A(e),e));return t._highlightResult&&(t._highlightResult=z(t._highlightResult)),t._snippetResult&&(t._snippetResult=z(t._snippetResult)),t})),e.__escaped=!0),e}function $(e){return e.map((function(e){return M(M({},e),{},{highlighted:j(e.highlighted)})}))}function q(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function K(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function G(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:20,i=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,fe()),function(i){var n=i||{},o=n.escapeHTML,s=void 0===o||o,r={};return{$$type:"ais.autocomplete",init:function(t){var i=t.instantSearchInstance;e(ue(ue({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance,n=this.getWidgetRenderState(t);n.indices.forEach((function(e){var t=e.sendEvent,i=e.hits;t("view:internal",i)})),e(ue(ue({},n),{},{instantSearchInstance:i}),!1)},getRenderState:function(e,t){return ue(ue({},e),{},{autocomplete:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=this,n=e.helper,o=e.state,a=e.scopedResults,l=e.instantSearchInstance;r.refine||(r.refine=function(e){n.setQuery(e).search()});var c=a.map((function(e){e.results.hits=s?U(e.results.hits):e.results.hits;var i=ae({instantSearchInstance:l,getIndex:function(){return e.results.index},widgetType:t.$$type});return{indexId:e.indexId,indexName:e.results.index,hits:e.results.hits,results:e.results,sendEvent:i}}));return{currentRefinement:o.query||"",indices:c,refine:r.refine,widgetParams:i}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.query||"";return""===n||e&&e.query===n?e:ue(ue({},e),{},{query:n})},getWidgetSearchParameters:function(e,t){var i=t.uiState,n={query:i.query||""};return s?e.setQueryParameters(ue(ue({},n),H)):e.setQueryParameters(n)},dispose:function(e){var i=e.state;t();var n=i.setQueryParameter("query",void 0);return s?n.setQueryParameters(Object.keys(H).reduce((function(e,t){return ue(ue({},e),{},he({},t,void 0))}),{})):n}}}};const _e=me,ve={name:"AisAutocomplete",mixins:[m({connector:_e},{$$widgetType:"ais.autocomplete"}),s({name:"Autocomplete"})],props:{escapeHTML:{type:Boolean,required:!1,default:!0}},computed:{widgetParams:function(){return{escapeHTML:this.escapeHTML}}}};var be=i(58790),ye=(0,l.Lk)("p",null," This widget doesn't render anything without a filled in default slot. ",-1),we=(0,l.Lk)("p",null,"query, function to refine and results are provided.",-1),Ce=(0,l.Lk)("pre",null,"refine: Function",-1),Se=(0,l.Lk)("summary",null,[(0,l.Lk)("code",null,"indices"),(0,l.eW)(":")],-1);function ke(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{refine:e.state.refine,currentRefinement:e.state.currentRefinement,indices:e.state.indices},(function(){return[ye,we,Ce,(0,l.Lk)("pre",null,'currentRefinement: "'+(0,be.v_)(e.state.currentRefinement)+'"',1),(0,l.Lk)("details",null,[Se,(0,l.Lk)("pre",null,(0,be.v_)(e.state.indices),1)])]}))],2)):(0,l.Q3)("",!0)}ve.render=ke;const xe=ve;function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Le(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Te(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;(0,b.t)(e,Be());var i={};return function(n){var o=n||{},s=o.attributes,r=o.separator,a=void 0===r?" > ":r,l=o.rootPath,c=void 0===l?null:l,d=o.transformItems,u=void 0===d?function(e){return e}:d;if(!s||!Array.isArray(s)||0===s.length)throw new Error(Be("The `attributes` option expects an array of strings."));var h=Ne(s,1),g=h[0];function p(e,t){if(!t){var i=e.getHierarchicalFacetBreadcrumb(g);return 0===i.length?e:e.resetPage().toggleFacetRefinement(g,i[0])}return e.resetPage().toggleFacetRefinement(g,t)}return{$$type:"ais.breadcrumb",init:function(t){e(Te(Te({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(Te(Te({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},dispose:function(){t()},getRenderState:function(e,t){return Te(Te({},e),{},{breadcrumb:Te(Te({},e.breadcrumb),{},Ie({},g,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,o=e.helper,s=e.createURL,r=e.results,a=e.state;function l(){if(!r||0===a.hierarchicalFacets.length)return[];var e=Ne(a.hierarchicalFacets,1),t=e[0].name,i=r.getFacetValues(t,{}),n=i&&!Array.isArray(i)&&i.data?i.data:[],o=u(Ve(He(n)),{results:r});return o}var c=l();return i.createURL||(i.createURL=function(e){return s((function(i){return t.getWidgetUiState(i,{searchParameters:p(o.state,e),helper:o})}))}),i.refine||(i.refine=function(e){o.setState(p(o.state,e)).search()}),{canRefine:c.length>0,createURL:i.createURL,items:c,refine:i.refine,widgetParams:n}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getHierarchicalFacetBreadcrumb(g);return je(Te(Te({},e),{},{hierarchicalMenu:Te(Te({},e.hierarchicalMenu),{},Ie({},g,n))}),g)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.hierarchicalMenu&&i.hierarchicalMenu[g];if(e.isConjunctiveFacet(g)||e.isDisjunctiveFacet(g))return e;if(e.isHierarchicalFacet(g))e.getHierarchicalFacetByName(g);var o=e.removeHierarchicalFacet(g).addHierarchicalFacet({name:g,attributes:s,separator:a,rootPath:c});return n?o.addHierarchicalFacetRefinement(g,n.join(a)):o.setQueryParameters({hierarchicalFacetsRefinements:Te(Te({},o.hierarchicalFacetsRefinements),{},Ie({},g,[]))})}}}};function He(e){return e.reduce((function(e,t){return t.isRefined&&(e.push({label:t.name,value:t.escapedValue}),Array.isArray(t.data)&&(e=e.concat(He(t.data)))),e}),[])}function Ve(e){return e.map((function(t,i){return{label:t.label,value:i+1===e.length?null:e[i+1].value}}))}function je(e,t){return e.hierarchicalMenu?(e.hierarchicalMenu[t]&&e.hierarchicalMenu[t].length||delete e.hierarchicalMenu[t],0===Object.keys(e.hierarchicalMenu).length&&delete e.hierarchicalMenu,e):e}const ze=We;function Ue(e){return{all:e=e||new Map,on:function(t,i){var n=e.get(t);n&&n.push(i)||e.set(t,[i])},off:function(t,i){var n=e.get(t);n&&n.splice(n.indexOf(i)>>>0,1)},emit:function(t,i){(e.get(t)||[]).slice().map((function(e){e(i)})),(e.get("*")||[]).slice().map((function(e){e(t,i)}))}}}var $e=function(){var e;return(e={props:{emitter:{type:Object,required:!1,default:function(){return Ue()}}},provide:function(){var e;return(e={}).instantSearchPanelEmitter=this.emitter,e},data:function(){return{canRefine:!0}},created:function(){var e=this;this.emitter.on("PANEL_CHANGE_EVENT",(function(t){e.updateCanRefine(t)}))}}).beforeUnmount=function(){this.emitter.all.clear()},e.methods={updateCanRefine:function(e){this.canRefine=e}},e},qe=function(e){void 0===e&&(e={});var t=e.mapStateToCanRefine;return void 0===t&&(t=function(e){return Boolean(e.canRefine)}),{inject:{emitter:{from:"instantSearchPanelEmitter",default:function(){return{emit:function(){}}}}},data:function(){return{state:null,hasAlreadyEmitted:!1}},watch:{state:{immediate:!0,handler:function(e,i){if(e){var n=t(i||{}),o=t(e);this.hasAlreadyEmitted&&n===o||(this.emitter.emit("PANEL_CHANGE_EVENT",o),this.hasAlreadyEmitted=!0)}}}}}};const Ke={name:"AisBreadcrumb",mixins:[m({connector:ze},{$$widgetType:"ais.breadcrumb"}),qe(),s({name:"Breadcrumb"})],props:{attributes:{type:Array,required:!0},separator:{type:String,default:void 0},rootPath:{type:String,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attributes:this.attributes,separator:this.separator,rootPath:this.rootPath,transformItems:this.transformItems}}},methods:{isLastItem:function(e){return this.state.items.length-1===e}}};var Ge=i(29104),Qe=["href"],Ye=["href"],Ze=["href","onClick"];function Xe(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,refine:e.state.refine,createURL:e.state.createURL},(function(){return[(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[(0,l.Lk)("li",{class:(0,be.C4)([e.suit("item"),!e.state.items.length&&e.suit("item","selected")])},[Boolean(e.state.items.length)?((0,l.uX)(),(0,l.CE)("a",{key:0,href:e.state.createURL(),class:(0,be.C4)(e.suit("link")),onClick:t[0]||(t[0]=(0,Ge.D$)((function(t){return e.state.refine()}),["exact","left","prevent"]))},[(0,l.RG)(e.$slots,"rootLabel",{},(function(){return[(0,l.eW)("Home")]}))],10,Qe)):((0,l.uX)(),(0,l.CE)("a",{key:1,href:e.state.createURL(null),class:(0,be.C4)(e.suit("link")),onClick:t[1]||(t[1]=(0,Ge.D$)((function(t){return e.state.refine(null)}),["exact","left","prevent"]))},[(0,l.RG)(e.$slots,"rootLabel",{},(function(){return[(0,l.eW)("Home")]}))],10,Ye))],2),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t,i){return(0,l.uX)(),(0,l.CE)("li",{key:t.label,class:(0,be.C4)([e.suit("item"),s.isLastItem(i)&&e.suit("item","selected")])},[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("separator")),"aria-hidden":"true"},[(0,l.RG)(e.$slots,"separator",{},(function(){return[(0,l.eW)(">")]}))],2),s.isLastItem(i)?((0,l.uX)(),(0,l.CE)(l.FK,{key:1},[(0,l.eW)((0,be.v_)(t.label),1)],64)):((0,l.uX)(),(0,l.CE)("a",{key:0,href:e.state.createURL(t.value),class:(0,be.C4)(e.suit("link")),onClick:(0,Ge.D$)((function(i){return e.state.refine(t.value)}),["exact","left","prevent"])},(0,be.v_)(t.label),11,Ze))],2)})),128))],2)]}))],2)):(0,l.Q3)("",!0)}Ke.render=Xe;const Je=Ke;function et(e){var t=e.helper,i=e.attributesToClear,n=void 0===i?[]:i,o=t.state.setPage(0);return o=n.reduce((function(e,t){return o.isNumericRefined(t)?e.removeNumericRefinement(t):o.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):o.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):o.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e}),o),-1!==n.indexOf("query")&&(o=o.setQuery("")),o}function tt(e,t){if(!Array.isArray(e))return-1;for(var i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function ut(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}var ht=function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var i=dt(t,ot);return e.setQueryParameters(i)},gt=function(e,t){return t.facets.reduce((function(e,t){return e.addFacet(t)}),e)},pt=function(e,t){return t.disjunctiveFacets.reduce((function(e,t){return e.addDisjunctiveFacet(t)}),e)},ft=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce((function(e,t){var i=tt(e,(function(e){return e.name===t.name}));if(-1===i)return e.concat(t);var n=e.slice();return n.splice(i,1,t),n}),e.hierarchicalFacets)})},mt=function(e,t){return t.tagRefinements.reduce((function(e,t){return e.addTagRefinement(t)}),e)},_t=function(e,t){return e.setQueryParameters({facetsRefinements:rt(rt({},e.facetsRefinements),t.facetsRefinements)})},vt=function(e,t){return e.setQueryParameters({facetsExcludes:rt(rt({},e.facetsExcludes),t.facetsExcludes)})},bt=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:rt(rt({},e.disjunctiveFacetsRefinements),t.disjunctiveFacetsRefinements)})},yt=function(e,t){return e.setQueryParameters({numericRefinements:rt(rt({},e.numericRefinements),t.numericRefinements)})},wt=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:rt(rt({},e.hierarchicalFacetsRefinements),t.hierarchicalFacetsRefinements)})},Ct=function(e,t){var i=it([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return i.length>0?e.setQueryParameters({ruleContexts:i}):e},St=function(){for(var e=arguments.length,t=new Array(e),i=0;i4&&void 0!==arguments[4]?arguments[4]:[],r={type:t,attribute:i,name:n,escapedValue:xt(n)},a=Et(s,(function(e){return e.name===i}));if("hierarchical"===t){for(var l=e.getHierarchicalFacetByName(i),c=n.split(l.separator),d=function(e){return function(t){return e[t]}},u=function(e){a=a&&a.data&&Et(Object.keys(a.data).map(d(a.data)),(function(t){return t.name===c[e]}))},h=0;void 0!==a&&h2&&void 0!==arguments[2]&&arguments[2],n=[],o=t.facetsRefinements,s=void 0===o?{}:o,r=t.facetsExcludes,a=void 0===r?{}:r,l=t.disjunctiveFacetsRefinements,c=void 0===l?{}:l,d=t.hierarchicalFacetsRefinements,u=void 0===d?{}:d,h=t.numericRefinements,g=void 0===h?{}:h,p=t.tagRefinements,f=void 0===p?[]:p;return Object.keys(s).forEach((function(i){var o=s[i];o.forEach((function(o){n.push(Lt(t,"facet",i,o,e.facets))}))})),Object.keys(a).forEach((function(e){var t=a[e];t.forEach((function(t){n.push({type:"exclude",attribute:e,name:t,exclude:!0})}))})),Object.keys(c).forEach((function(i){var o=c[i];o.forEach((function(o){n.push(Lt(t,"disjunctive",i,kt(o),e.disjunctiveFacets))}))})),Object.keys(u).forEach((function(i){var o=u[i];o.forEach((function(o){n.push(Lt(t,"hierarchical",i,o,e.hierarchicalFacets))}))})),Object.keys(g).forEach((function(e){var t=g[e];Object.keys(t).forEach((function(i){var o=i,s=t[o],r=Array.isArray(s)?s:[s];r.forEach((function(t){n.push({type:"numeric",attribute:e,name:"".concat(t),numericValue:t,operator:o})}))}))})),f.forEach((function(e){n.push({type:"tag",attribute:"_tags",name:e})})),i&&t.query&&t.query.trim()&&n.push({attribute:"query",type:"query",name:t.query,query:t.query}),n}function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Rt(e){return Ot(e)||At(e)||Nt(e)||Dt()}function Dt(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Nt(e,t){if(e){if("string"===typeof e)return Pt(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Pt(e,t):void 0}}function At(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ot(e){if(Array.isArray(e))return Pt(e)}function Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Vt()),function(i){var n=i||{},o=n.includedAttributes,s=void 0===o?[]:o,r=n.excludedAttributes,a=void 0===r?["query"]:r,l=n.transformItems,c=void 0===l?function(e){return e}:l;if(i&&i.includedAttributes&&i.excludedAttributes)throw new Error(Vt("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var d={refine:v.l,createURL:function(){return""},attributesToClear:[]},u=function(){return d.refine()},h=function(){return d.createURL()};return{$$type:"ais.clearRefinements",init:function(t){var i=t.instantSearchInstance;e(Ft(Ft({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(Ft(Ft({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(){t()},getRenderState:function(e,t){return Ft(Ft({},e),{},{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,n=e.scopedResults,o=e.results;d.attributesToClear=n.reduce((function(e,t){return e.concat(zt({scopedResult:t,includedAttributes:s,excludedAttributes:a,transformItems:c,results:o}))}),[]),d.refine=function(){d.attributesToClear.forEach((function(e){var t=e.helper,i=e.items;t.setState(et({helper:t,attributesToClear:i})).search()}))},d.createURL=function(){return t(St.apply(void 0,Rt(d.attributesToClear.map((function(e){var t=e.helper,i=e.items;return et({helper:t,attributesToClear:i})})))))};var r=d.attributesToClear.some((function(e){return e.items.length>0}));return{canRefine:r,hasRefinements:r,refine:u,createURL:h,widgetParams:i}}}}};function zt(e){var t=e.scopedResult,i=e.includedAttributes,n=e.excludedAttributes,o=e.transformItems,s=e.results,r=-1!==i.indexOf("query")||-1===n.indexOf("query");return{helper:t.helper,items:o(it(Tt(t.results,t.helper.state,r).map((function(e){return e.attribute})).filter((function(e){return 0===i.length||-1!==i.indexOf(e)})).filter((function(e){return"query"===e&&r||-1===n.indexOf(e)}))),{results:s})}}const Ut=jt,$t={name:"AisClearRefinements",mixins:[m({connector:Ut},{$$widgetType:"ais.clearRefinements"}),qe(),s({name:"ClearRefinements"})],props:{excludedAttributes:{type:Array,default:void 0},includedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}},canRefine:function(){return this.state.hasRefinements}}};var qt=["disabled"];function Kt(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{canRefine:s.canRefine,refine:e.state.refine,createURL:e.state.createURL},(function(){return[(0,l.Lk)("button",{type:"reset",class:(0,be.C4)([e.suit("button"),!s.canRefine&&e.suit("button","disabled")]),disabled:!s.canRefine,onClick:t[0]||(t[0]=(0,Ge.D$)((function(){for(var t,i=[],n=arguments.length;n--;)i[n]=arguments[n];return e.state.refine&&(t=e.state).refine.apply(t,i)}),["prevent"]))},[(0,l.RG)(e.$slots,"resetLabel",{},(function(){return[(0,l.eW)(" Clear refinements ")]}))],10,qt)]}))],2)):(0,l.Q3)("",!0)}$t.render=Kt;const Gt=$t;var Qt=i(1450);function Yt(e){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yt(e)}function Zt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Xt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:v.l,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return function(i){if(!i||!D(i.searchParameters))throw new Error(ii("The `searchParameters` option expects an object."));var n={};function o(e){return function(t){var n=ni(e.state,i),o=St(n,new Qt.SearchParameters(t));i.searchParameters=t,e.setState(o).search()}}return{$$type:"ais.configure",init:function(t){var i=t.instantSearchInstance;e(Xt(Xt({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(Xt(Xt({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var n=e.state;return t(),ni(n,i)},getRenderState:function(e,t){var i,n=this.getWidgetRenderState(t);return Xt(Xt({},e),{},{configure:Xt(Xt({},n),{},{widgetParams:Xt(Xt({},n.widgetParams),{},{searchParameters:St(new Qt.SearchParameters(null===(i=e.configure)||void 0===i?void 0:i.widgetParams.searchParameters),new Qt.SearchParameters(n.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var t=e.helper;return n.refine||(n.refine=o(t)),{refine:n.refine,widgetParams:i}},getWidgetSearchParameters:function(e,t){var n=t.uiState;return St(e,new Qt.SearchParameters(Xt(Xt({},n.configure),i.searchParameters)))},getWidgetUiState:function(e){return Xt(Xt({},e),{},{configure:Xt(Xt({},e.configure),i.searchParameters)})}}}};const si=oi,ri={inheritAttrs:!1,name:"AisConfigure",mixins:[s({name:"Configure"}),m({connector:si},{$$widgetType:"ais.configure"})],computed:{widgetParams:function(){return{searchParameters:Object.assign({},this.$attrs)}}},render:u((function(e){var t=this.$slots.default;return this.state&&t?e("div",{class:this.suit()},[t({refine:this.state.refine,searchParameters:this.state.widgetParams.searchParameters})]):null}))};var ai=function(e,t){return e};function li(){var e=-1,t=-1,i=void 0;return function(n){var o=++e;return Promise.resolve(n).then((function(e){return i&&o1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Di()),function(i){var n=i||{},o=n.queryLanguages,s=n.attributesForPrediction,r=n.nbHits,a=void 0===r?1:r,l=n.renderDebounceTime,c=void 0===l?100:l,d=n.searchDebounceTime,u=void 0===d?100:d,h=n.escapeHTML,g=void 0===h||h,p=n.extraParameters,f=void 0===p?{}:p;if(!o||0===o.length)throw new Error(Di("The `queryLanguages` expects an array of strings."));var m,_=li(),v=[],b=!1,y=ci(e,c);return{$$type:"ais.answers",init:function(t){var i=t.state,n=t.instantSearchInstance;if("function"!==typeof n.client.initIndex)throw new Error(Di("`algoliasearch` <5 required."));var o=n.client.initIndex(i.index);if(!Ri(o))throw new Error(Di("`algoliasearch` >= 4.8.0 required."));m=ci(o.findAnswers,u),e(Ei(Ei({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var i=this,n=t.state.query;if(!n)return v=[],b=!1,void e(Ei(Ei({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1);v=[],b=!0,e(Ei(Ei({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1),_(m(n,o,Ei(Ei({},f),{},{nbHits:a,attributesForPrediction:s}))).then((function(e){if(e){g&&e.hits.length>0&&(e.hits=U(e.hits));var n=mi(e.hits,0,a),o=Si(n,e.queryID);v=o,b=!1,y(Ei(Ei({},i.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)}}))},getRenderState:function(e,t){return Ei(Ei({},e),{},{answers:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{hits:v,isLoading:b,widgetParams:i}},dispose:function(e){var i=e.state;return t(),i},getWidgetSearchParameters:function(e){return e}}}};const Ai=Ni;function Oi(e,t){var i=Array.isArray(t)?t:t.split(".");return i.reduce((function(e,t){return e&&e[t]}),e)}function Pi(e){return Pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pi(e)}function Mi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Fi(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i")}var Qi=function(e,t){return function(i){var n=i||{},o=n.hit,s=n.matchingPatterns,r=n.transformSearchParameters,a=void 0===r?function(e){return e}:r;if(!o)throw new Error(Ki("The `hit` option is required."));if(!s)throw new Error(Ki("The `matchingPatterns` option is required."));var l=Object.keys(s).reduce((function(e,t){var i=s[t],n=Oi(o,t),r=i.score;return Array.isArray(n)?[].concat(Vi(e),[n.map((function(e){return Gi({attributeName:t,attributeValue:e,attributeScore:r})}))]):"string"===typeof n?[].concat(Vi(e),[Gi({attributeName:t,attributeValue:n,attributeScore:r})]):e}),[]),c=Fi({},a(new Qt.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(o.objectID)],optionalFilters:l}))),d=si(e,t);return Fi(Fi({},d({searchParameters:c})),{},{$$type:"ais.configureRelatedItems"})}};const Yi=Qi;function Zi(e,t){var i,n=null===(i=e.getWidgetRenderState)||void 0===i?void 0:i.call(e,t),o=null;if(n&&n.widgetParams){var s=n.widgetParams;s.attribute?o=s.attribute:Array.isArray(s.attributes)&&(o=s.attributes[0])}if("string"!==typeof o)throw new Error("Could not find the attribute of the widget:\n\n".concat(JSON.stringify(e),"\n\nPlease check whether the widget's getWidgetRenderState returns widgetParams.attribute correctly."));return o}function Xi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ji(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,sn()),function(i){var n=i.widgets,o=i.maxValuesPerFacet,s=void 0===o?20:o,r=i.facets,a=void 0===r?["*"]:r,l=i.transformItems,c=void 0===l?function(e){return e}:l,d=i.fallbackWidget;if(!(n&&Array.isArray(n)&&n.every((function(e){return"object"===on(e)}))))throw new Error(sn("The `widgets` option expects an array of widgets."));if(!Array.isArray(a))throw new Error(sn("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(a))));var u=new Map;return{$$type:"ais.dynamicWidgets",init:function(t){n.forEach((function(e){var i=Zi(e,t);u.set(i,{widget:e,isMounted:!1})})),e(Ji(Ji({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var i=t.parent,n=this.getWidgetRenderState(t),o=[],s=[];d&&n.attributesToRender.forEach((function(e){if(!u.has(e)){var t=d({attribute:e});u.set(e,{widget:t,isMounted:!1})}})),u.forEach((function(e,t){var i=e.widget,r=e.isMounted,a=n.attributesToRender.indexOf(t)>-1;!r&&a?(s.push(i),u.set(t,{widget:i,isMounted:!0})):r&&!a&&(o.push(i),u.set(t,{widget:i,isMounted:!1}))})),i.addWidgets(s),setTimeout((function(){return i.removeWidgets(o)}),0),e(Ji(Ji({},n),{},{instantSearchInstance:t.instantSearchInstance}),!1)},dispose:function(e){var i=e.parent,n=[];u.forEach((function(e){var t=e.widget,i=e.isMounted;i&&n.push(t)})),i.removeWidgets(n),t()},getWidgetSearchParameters:function(e){return a.reduce((function(e,t){return e.addFacet(t)}),e.setQueryParameters({maxValuesPerFacet:Math.max(s||0,e.maxValuesPerFacet||0)}))},getRenderState:function(e,t){return Ji(Ji({},e),{},{dynamicWidgets:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,n,o,s,r=e.results;e.state;if(!r)return{attributesToRender:[],widgetParams:i};var a=c(null!==(t=null===(n=r.renderingContent)||void 0===n||null===(o=n.facetOrdering)||void 0===o||null===(s=o.facets)||void 0===s?void 0:s.order)&&void 0!==t?t:[],{results:r});if(!Array.isArray(a))throw new Error(sn("The `transformItems` option expects a function that returns an Array."));return{attributesToRender:a,widgetParams:i}}}}};const an=rn;ai(Ai,"answers is no longer supported");var ln=ai(Yi,"EXPERIMENTAL_connectConfigureRelatedItems is deprecated and will be removed in a next minor version of InstantSearch. Please use connectRelatedItems instead.");ai(an,"use connectDynamicWidgets");const cn={inheritAttrs:!1,name:"AisExperimentalConfigureRelatedItems",mixins:[m({connector:ln},{$$widgetType:"ais.configureRelatedItems"})],props:{hit:{type:Object,required:!0},matchingPatterns:{type:Object,required:!0},transformSearchParameters:{type:Function,required:!1}},computed:{widgetParams:function(){return{hit:this.hit,matchingPatterns:this.matchingPatterns,transformSearchParameters:this.transformSearchParameters}}},render:function(){return null}};function dn(e){return dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(e)}function un(e){return fn(e)||pn(e)||gn(e)||hn()}function hn(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gn(e,t){if(e){if("string"===typeof e)return mn(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?mn(e,t):void 0}}function pn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function fn(e){if(Array.isArray(e))return mn(e)}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Cn()),function(i){if((i||{}).includedAttributes&&(i||{}).excludedAttributes)throw new Error(Cn("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var n=i||{},o=n.includedAttributes,s=n.excludedAttributes,r=void 0===s?["query"]:s,a=n.transformItems,l=void 0===a?function(e){return e}:a;return{$$type:"ais.currentRefinements",init:function(t){var i=t.instantSearchInstance;e(vn(vn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(vn(vn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(){t()},getRenderState:function(e,t){return vn(vn({},e),{},{currentRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.scopedResults,s=e.createURL,a=e.helper;function c(){return t?n.reduce((function(e,i){return e.concat(l(kn({results:i.results,helper:i.helper,indexId:i.indexId,includedAttributes:o,excludedAttributes:r}),{results:t}))}),[]):l(kn({results:{},helper:a,indexId:a.state.index,includedAttributes:o,excludedAttributes:r}),{results:t})}var d=c();return{items:d,canRefine:d.length>0,refine:function(e){return En(a,e)},createURL:function(e){return s(xn(a.state,e))},widgetParams:i}}}}};function kn(e){var t=e.results,i=e.helper,n=e.indexId,o=e.includedAttributes,s=e.excludedAttributes,r=-1!==(o||[]).indexOf("query")||-1===(s||[]).indexOf("query"),a=o?function(e){return-1!==o.indexOf(e.attribute)}:function(e){return-1===s.indexOf(e.attribute)},l=Tt(t,i.state,r).map(Tn).filter(a);return l.reduce((function(e,t){return[].concat(un(e.filter((function(e){return e.attribute!==t.attribute}))),[{indexName:i.state.index,indexId:n,attribute:t.attribute,label:t.attribute,refinements:l.filter((function(e){return e.attribute===t.attribute})).sort((function(e,t){return"numeric"===e.type?e.value-t.value:0})),refine:function(e){return En(i,e)}}])}),[])}function xn(e,t){switch(e=e.resetPage(),t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function En(e,t){e.setState(xn(e.state,t)).search()}function Ln(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}function Tn(e){var t=In(e),i=e.operator?"".concat(Ln(e.operator)," ").concat(e.name):e.name,n={attribute:e.attribute,type:e.type,value:t,label:i};return void 0!==e.operator&&(n.operator=e.operator),void 0!==e.count&&(n.count=e.count),void 0!==e.exhaustive&&(n.exhaustive=e.exhaustive),n}function In(e){return"numeric"===e.type?Number(e.name):"escapedValue"in e?e.escapedValue:e.name}const Rn=Sn,Dn={name:"AisCurrentRefinements",mixins:[s({name:"CurrentRefinements"}),m({connector:Rn},{$$widgetType:"ais.currentRefinements"}),qe()],props:{includedAttributes:{type:Array,default:void 0},excludedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{noRefinement:function(){return this.state&&0===this.state.items.length},widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}}},methods:{createItemKey:function(e){var t=e.attribute,i=e.value;return[t,e.type,i,e.operator].join(":")},capitalize:function(e){return e?e.toString().charAt(0).toLocaleUpperCase()+e.toString().slice(1):""}}};var Nn={key:0},An=["onClick"];function On(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),s.noRefinement&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{refine:e.state.refine,items:e.state.items,createURL:e.state.createURL},(function(){return[(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t){return(0,l.uX)(),(0,l.CE)("li",{key:t.attribute,class:(0,be.C4)(e.suit("item"))},[(0,l.RG)(e.$slots,"item",{refine:t.refine,item:t,createURL:e.state.createURL},(function(){return[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("label"))},(0,be.v_)(s.capitalize(t.label))+": ",3),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(t.refinements,(function(i){return(0,l.uX)(),(0,l.CE)("span",{key:s.createItemKey(i),class:(0,be.C4)(e.suit("category"))},[(0,l.RG)(e.$slots,"refinement",{refine:t.refine,refinement:i,createURL:e.state.createURL},(function(){return[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("categoryLabel"))},["query"===i.attribute?((0,l.uX)(),(0,l.CE)("q",Nn,(0,be.v_)(i.label),1)):((0,l.uX)(),(0,l.CE)(l.FK,{key:1},[(0,l.eW)((0,be.v_)(i.label),1)],64))],2),(0,l.Lk)("button",{class:(0,be.C4)(e.suit("delete")),type:"button",onClick:(0,Ge.D$)((function(e){return t.refine(i)}),["left","exact"])}," ✕ ",10,An)]}))],2)})),128))]}))],2)})),128))],2)]}))],2)):(0,l.Q3)("",!0)}Dn.render=On;const Pn=Dn;function Mn(e,t,i){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,i):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,i):e.state.isDisjunctiveFacetRefined(t,i)}function Fn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Bn(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i=2&&s.length<=4&&(Mn(i,m,a)||t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:o,eventType:p,eventModifier:f,payload:Bn({eventName:c,index:i.getIndex(),filters:["".concat(m,":").concat(a)]},u),attribute:m}))};return s}function Yn(e){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yn(e)}var Zn=["name","escapedValue","data","path"];function Xn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Jn(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function oo(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}function so(e,t){return uo(e)||co(e,t)||ao(e,t)||ro()}function ro(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ao(e,t){if(e){if("string"===typeof e)return lo(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?lo(e,t):void 0}}function lo(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,ho()),function(i){var n=i||{},o=n.attributes,s=n.separator,r=void 0===s?" > ":s,a=n.rootPath,l=void 0===a?null:a,c=n.showParentLevel,d=void 0===c||c,u=n.limit,h=void 0===u?10:u,g=n.showMore,p=void 0!==g&&g,f=n.showMoreLimit,m=void 0===f?20:f,_=n.sortBy,v=void 0===_?go:_,b=n.transformItems,y=void 0===b?function(e){return e}:b;if(!o||!Array.isArray(o)||0===o.length)throw new Error(ho("The `attributes` option expects an array of strings."));if(!0===p&&m<=h)throw new Error(ho("The `showMoreLimit` option must be greater than `limit`."));var w,C,S=so(o,1),k=S[0],x=function(){};function E(){x()}var L=!1;function T(e,t){return function(){L=!L,t.render(e)}}function I(){return L?m:h}function R(e){return e.slice(0,I()).map((function(e){var t=e.name,i=e.escapedValue,n=e.data,o=(e.path,no(e,Zn)),s=Jn(Jn({},o),{},{value:i,label:t,data:null});return Array.isArray(n)&&(s.data=R(n)),s}))}return{$$type:"ais.hierarchicalMenu",init:function(t){var i=t.instantSearchInstance;e(Jn(Jn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;x=T(t,this),e(Jn(Jn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.removeHierarchicalFacet(k).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return Jn(Jn({},e),{},{hierarchicalMenu:Jn(Jn({},e.hierarchicalMenu),{},eo({},k,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,s=e.state,a=e.createURL,l=e.instantSearchInstance,c=e.helper,d=[],u=!1,h=function(e){return a((function(i){return t.getWidgetUiState(i,{searchParameters:s.resetPage().toggleFacetRefinement(k,e),helper:c})}))};if(w||(w=Qn({instantSearchInstance:l,helper:c,attribute:function(e){var t=e.split(r).length-1;return o[t]},widgetType:this.$$type})),C||(C=function(e){w("click:internal",e),c.toggleFacetRefinement(k,e).search()}),n){var g=n.getFacetValues(k,{sortBy:v,facetOrdering:v===go}),f=g&&!Array.isArray(g)&&g.data?g.data:[],m=(s.maxValuesPerFacet||0)>I()?f.length<=I():f.length0,createURL:h,sendEvent:w,widgetParams:i,isShowingMore:L,toggleShowMore:E,canToggleShowMore:u}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getHierarchicalFacetBreadcrumb(k);return fo(Jn(Jn({},e),{},{hierarchicalMenu:Jn(Jn({},e.hierarchicalMenu),{},eo({},k,n))}),k)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.hierarchicalMenu&&i.hierarchicalMenu[k];if(e.isConjunctiveFacet(k)||e.isDisjunctiveFacet(k))return e;if(e.isHierarchicalFacet(k))e.getHierarchicalFacetByName(k);var s=e.removeHierarchicalFacet(k).addHierarchicalFacet({name:k,attributes:o,separator:r,rootPath:l,showParentLevel:d}),a=s.maxValuesPerFacet||0,c=Math.max(a,p?m:h),u=s.setQueryParameter("maxValuesPerFacet",c);return n?u.addHierarchicalFacetRefinement(k,n.join(r)):u.setQueryParameters({hierarchicalFacetsRefinements:Jn(Jn({},u.hierarchicalFacetsRefinements),{},eo({},k,[]))})}}}};function fo(e,t){return e.hierarchicalMenu?(e.hierarchicalMenu[t]&&0!==e.hierarchicalMenu[t].length||delete e.hierarchicalMenu[t],0===Object.keys(e.hierarchicalMenu).length&&delete e.hierarchicalMenu,e):e}const mo=po,_o={name:"HierarchicalMenuList",props:{items:{type:Array,required:!0},level:{type:Number,required:!0},refine:{type:Function,required:!0},createURL:{type:Function,required:!0},suit:{type:Function,required:!0}}};var vo=["href","onClick"];function bo(e,t,i,n,o,s){var r=(0,l.g2)("hierarchical-menu-list",!0);return i.items.length>0?((0,l.uX)(),(0,l.CE)("ul",{key:0,class:(0,be.C4)([i.suit("list"),i.level>0&&i.suit("list","child"),i.suit("list","lvl"+i.level)])},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(i.items,(function(e){return(0,l.uX)(),(0,l.CE)("li",{key:e.value,class:(0,be.C4)([i.suit("item"),e.isRefined&&i.suit("item","selected"),e.data&&e.data.length>0&&i.suit("item","parent")])},[(0,l.Lk)("a",{href:i.createURL(e.value),class:(0,be.C4)([i.suit("link"),e.isRefined&&i.suit("link","selected")]),onClick:(0,Ge.D$)((function(t){return i.refine(e.value)}),["exact","left","prevent"])},[(0,l.Lk)("span",{class:(0,be.C4)(i.suit("label"))},(0,be.v_)(e.label),3),(0,l.Lk)("span",{class:(0,be.C4)(i.suit("count"))},(0,be.v_)(e.count),3)],10,vo),e.data?((0,l.uX)(),(0,l.Wv)(r,{key:0,items:e.data,level:i.level+1,refine:i.refine,createURL:i.createURL,suit:i.suit},null,8,["items","level","refine","createURL","suit"])):(0,l.Q3)("",!0)],2)})),128))],2)):(0,l.Q3)("",!0)}_o.render=bo;const yo=_o,wo={name:"AisHierarchicalMenu",mixins:[s({name:"HierarchicalMenu"}),m({connector:mo},{$$widgetType:"ais.hierarchicalMenu"}),qe()],components:{HierarchicalMenuList:yo},props:{attributes:{type:Array,required:!0},limit:{type:Number,default:void 0},showMoreLimit:{type:Number,default:void 0},showMore:{type:Boolean,default:!1},sortBy:{type:[Array,Function],default:void 0},separator:{type:String,default:void 0},rootPath:{type:String,default:void 0},showParentLevel:{type:Boolean,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attributes:this.attributes,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,separator:this.separator,rootPath:this.rootPath,showParentLevel:this.showParentLevel,sortBy:this.sortBy,transformItems:this.transformItems}}}};var Co=["disabled"];function So(e,t,i,n,o,s){var r=(0,l.g2)("hierarchical-menu-list");return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,refine:e.state.refine,createURL:e.state.createURL,toggleShowMore:e.state.toggleShowMore,sendEvent:e.state.sendEvent},(function(){return[(0,l.bF)(r,{items:e.state.items,level:0,refine:e.state.refine,createURL:e.state.createURL,suit:e.suit},null,8,["items","refine","createURL","suit"]),i.showMore?((0,l.uX)(),(0,l.CE)("button",{key:0,class:(0,be.C4)([e.suit("showMore"),!e.state.canToggleShowMore&&e.suit("showMore","disabled")]),disabled:!e.state.canToggleShowMore,onClick:t[0]||(t[0]=(0,Ge.D$)((function(){for(var t,i=[],n=arguments.length;n--;)i[n]=arguments[n];return e.state.toggleShowMore&&(t=e.state).toggleShowMore.apply(t,i)}),["prevent"]))},[(0,l.RG)(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},(function(){return[(0,l.eW)((0,be.v_)(e.state.isShowingMore?"Show less":"Show more"),1)]}))],10,Co)):(0,l.Q3)("",!0)]}))],2)):(0,l.Q3)("",!0)}wo.render=So;const ko=wo;function xo(){return xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[i]=e[i]);return o}function Lo(e,t){if(null==e)return{};var i,n,o=Eo(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function To(){for(var e=arguments.length,t=new Array(e),i=0;i","post-tag":""},null,8,["hit","attribute","highlighted-tag-name","suit"])}Mo.render=Fo;const Bo=Mo;function Wo(e){return Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wo(e)}function Ho(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Vo(e){for(var t=1;t1)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var i=t[0];if("string"!==typeof i)throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return i},Ko=function(e){return e.map((function(e){return e.__position}))},Go=function(e){var t=e.method,i=e.results,n=e.hits,o=e.objectIDs,s=i.index,r=$o(n,o),a=qo(r);switch(t){case"clickedObjectIDsAfterSearch":var l=Ko(r);return{index:s,queryID:a,objectIDs:o,positions:l};case"convertedObjectIDsAfterSearch":return{index:s,queryID:a,objectIDs:o};default:throw new Error('Unsupported method passed to insights: "'.concat(t,'".'))}},Qo=function(e,t,i){return function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,ns()),function(i){var n,o,s=i||{},r=s.escapeHTML,a=void 0===r||r,l=s.transformItems,c=void 0===l?function(e){return e}:l;return{$$type:"ais.hits",init:function(t){e(Jo(Jo({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var i=this.getWidgetRenderState(t);e(Jo(Jo({},i),{},{instantSearchInstance:t.instantSearchInstance}),!1),i.sendEvent("view:internal",i.items)},getRenderState:function(e,t){return Jo(Jo({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,s,r,l=e.results,d=e.helper,u=e.instantSearchInstance;if(n||(n=ae({instantSearchInstance:u,getIndex:function(){return d.getIndex()},widgetType:this.$$type})),o||(o=le({getIndex:function(){return d.getIndex()},widgetType:this.$$type,instantSearchInstance:u})),!l)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:n,bindEvent:o,widgetParams:i};a&&l.hits.length>0&&(l.hits=U(l.hits));var h=mi(l.hits,l.page,l.hitsPerPage),g=Si(h,l.queryID),p=c(g,{results:l}),f=null===(t=l.renderingContent)||void 0===t||null===(s=t.widgets)||void 0===s||null===(r=s.banners)||void 0===r?void 0:r[0];return{hits:p,items:p,results:l,banner:f,sendEvent:n,bindEvent:o,widgetParams:i}},dispose:function(e){var i=e.state;return t(),a?i.setQueryParameters(Object.keys(H).reduce((function(e,t){return Jo(Jo({},e),{},es({},t,void 0))}),{})):i},getWidgetSearchParameters:function(e,t){return a?e.setQueryParameters(H):e}}}};var ss=Yo(os);const rs=ss;var as=["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"];function ls(e){var t=e.createElement;return function(e){var i=e.classNames,n=e.banner;return n.image.urls[0].url?t("aside",{className:To("ais-Hits-banner",i.bannerRoot)},n.link?t("a",{className:To("ais-Hits-banner-link",i.bannerLink),href:n.link.url,target:n.link.target},t("img",{className:To("ais-Hits-banner-image",i.bannerImage),src:n.image.urls[0].url,alt:n.image.title})):t("img",{className:To("ais-Hits-banner-image",i.bannerImage),src:n.image.urls[0].url,alt:n.image.title})):null}}function cs(e){var t=e.createElement,i=e.Fragment,n=ls({createElement:t,Fragment:i});return function(e){var i=e.classNames,o=void 0===i?{}:i,s=e.hits,r=e.itemComponent,a=e.sendEvent,l=e.emptyComponent,c=e.banner,d=e.bannerComponent,u=Lo(e,as);return t("div",xo({},u,{className:To("ais-Hits",o.root,0===s.length&&To("ais-Hits--empty",o.emptyRoot),u.className)}),c&&(d?t(d,{className:To("ais-Hits-banner",o.bannerRoot),banner:c}):t(n,{classNames:o,banner:c})),0===s.length&&l?t(l,null):t("ol",{className:To("ais-Hits-list",o.list)},s.map((function(e,i){return t(r,{key:e.objectID,hit:e,index:i,className:To("ais-Hits-item",o.item),onClick:function(){a("click:internal",e,"Hit Clicked")},onAuxClick:function(){a("click:internal",e,"Hit Clicked")}})}))))}}const ds={name:"AisHits",mixins:[m({connector:rs},{$$widgetType:"ais.hits"}),s({name:"Hits"})],props:{showBanner:{type:Boolean,default:!0},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{showBanner:this.showBanner,escapeHTML:this.escapeHTML,transformItems:this.transformItems}}},render:u((function(e){var t=this;if(!this.state)return null;var i=g(this,"default"),n=g(this,"item"),o=g(this,"banner");return n||o||!i?e(cs({createElement:e}),{hits:this.state.items,itemComponent:function(i){var o=i.hit,s=i.index,r=i.onClick,a=i.onAuxClick,l=(i.key,function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(i[n]=e[n]);return i}(i,["hit","index","onClick","onAuxClick","key"]));return e("li",{key:o.objectID,attrs:l,on:{click:r,auxclick:a}},[n&&n({item:o,index:s,insights:t.state.insights,sendEvent:t.state.sendEvent})||"objectID: "+o.objectID+", index: "+s])},banner:this.showBanner?this.state.banner:void 0,bannerComponent:o,sendEvent:this.state.sendEvent,classNames:this.classNames&&{root:this.classNames["ais-Hits"],list:this.classNames["ais-Hits-list"],item:this.classNames["ais-Hits-item"],bannerRoot:this.classNames["ais-Hits-banner"],bannerImage:this.classNames["ais-Hits-banner-image"],bannerLink:this.classNames["ais-Hits-banner-link"]}}):e("div",{attrs:{class:this.suit()}},[i({banner:this.state.banner,items:this.state.items,insights:this.state.insights,sendEvent:this.state.sendEvent})])}))};function us(e){return us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},us(e)}function hs(e){return ms(e)||fs(e)||ps(e)||gs()}function gs(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ps(e,t){if(e){if("string"===typeof e)return _s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_s(e,t):void 0}}function fs(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ms(e){if(Array.isArray(e))return _s(e)}function _s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Ss()),function(i){var n=i||{},o=n.items,s=n.transformItems,r=void 0===s?function(e){return e}:s;if(!Array.isArray(o))throw new Error(Ss("The `items` option expects an array of objects."));var a=o,l=a.filter((function(e){return!0===e.default}));if(0===l.length)throw new Error(Ss("A default value must be specified in `items`."));if(l.length>1)throw new Error(Ss("More than one default value is specified in `items`."));var c=l[0],d=function(e){var t=e.hitsPerPage;return a.map((function(e){return bs(bs({},e),{},{isRefined:Number(e.value)===Number(t)})}))},u={getRefine:function(e){return function(t){return t||0===t?e.setQueryParameter("hitsPerPage",t).search():e.setQueryParameter("hitsPerPage",void 0).search()}},createURLFactory:function(e){var t=e.state,i=e.createURL,n=e.getWidgetUiState,o=e.helper;return function(e){return i((function(i){return n(i,{searchParameters:t.resetPage().setQueryParameter("hitsPerPage",e||0===e?e:void 0),helper:o})}))}}};return{$$type:"ais.hitsPerPage",init:function(t){var i=t.state,n=t.instantSearchInstance,o=a.some((function(e){return Number(i.hitsPerPage)===Number(e.value)}));o||(a=[{value:"",label:""}].concat(hs(a))),e(bs(bs({},this.getWidgetRenderState(t)),{},{instantSearchInstance:n}),!0)},render:function(t){var i=t.instantSearchInstance;e(bs(bs({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(e,t){return bs(bs({},e),{},{hitsPerPage:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.state,n=e.results,o=e.createURL,s=e.helper,a=!!n&&n.nbHits>0;return{items:r(d(t),{results:n}),refine:u.getRefine(s),createURL:u.createURLFactory({state:t,createURL:o,getWidgetUiState:this.getWidgetUiState,helper:s}),hasNoResults:!a,canRefine:a,widgetParams:i}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.hitsPerPage;return void 0===n||n===c.value?e:bs(bs({},e),{},{hitsPerPage:n})},getWidgetSearchParameters:function(e,t){var i=t.uiState;return e.setQueryParameters({hitsPerPage:i.hitsPerPage||c.value})}}}};const xs=ks,Es={name:"AisHitsPerPage",mixins:[s({name:"HitsPerPage"}),m({connector:xs},{$$widgetType:"ais.hitsPerPage"}),qe()],props:{items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{items:this.items,transformItems:this.transformItems}}}};var Ls=["value","selected"];function Ts(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{items:e.state.items,refine:e.state.refine,hasNoResults:e.state.hasNoResults,canRefine:e.state.canRefine,createURL:e.state.createURL},(function(){return[(0,l.Lk)("select",{class:(0,be.C4)(e.suit("select")),onChange:t[0]||(t[0]=function(t){return e.state.refine(Number(t.currentTarget.value))})},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t){return(0,l.uX)(),(0,l.CE)("option",{key:t.value,class:(0,be.C4)(e.suit("option")),value:t.value,selected:t.isRefined},(0,be.v_)(t.label),11,Ls)})),128))],34)]}))],2)):(0,l.Q3)("",!0)}Es.render=Ts;const Is=Es;function Rs(e){return"ais.index"===e.$$type}function Ds(e,t,i){var n=t.getHelper();return{uiState:i,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function Ns(e,t,i){var n=t.getResultsForWidget(i),o=t.getHelper();return{helper:o,parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n&&"_state"in n?n._state:o.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function As(e){var t=e.getParent(),i=[e.getHelper().state];while(null!==t)i=[t.getHelper().state].concat(i),t=t.getParent();return i}var Os=0;function Ps(e){"recommend"===e.dependsOn&&(e.$$id=Os++)}function Ms(e){return Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ms(e)}var Fs=["initialSearchParameters"],Bs=["initialRecommendParameters"];function Ws(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Hs(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function Zs(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}var Xs=(0,_.V)({name:"index-widget"});function Js(e,t){var i=t.state,n=t.recommendState,o=t.isPageReset,s=t._uiState;i!==e.state&&(e.state=i,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:o,_uiState:s})),n!==e.recommendState&&(e.recommendState=n)}function er(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce((function(e,i){return Rs(i)?e:i.getWidgetUiState||i.getWidgetState?i.getWidgetUiState?i.getWidgetUiState(e,t):i.getWidgetState(e,t):e}),i)}function tr(e,t){var i=t.initialSearchParameters,n=Ys(t,Fs);return e.reduce((function(e,t){return!t.getWidgetSearchParameters||Rs(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):t.getWidgetSearchParameters(e,n)}),i)}function ir(e,t){var i=t.initialRecommendParameters,n=Ys(t,Bs);return e.reduce((function(e,t){return!Rs(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):e}),i)}function nr(e){var t=e.filter(Rs);0!==t.length&&t.forEach((function(e){var t=e.getHelper();Js(t,{state:t.state.resetPage(),recommendState:t.recommendState,isPageReset:!0}),nr(e.getWidgets())}))}function or(e){var t=e.filter(Rs);return t.reduce((function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(Us(or(t.getWidgets()))))}),[])}var sr=function(e){if(void 0===e||void 0===e.indexName)throw new Error(Xs("The `indexName` option is required."));var t=e.indexName,i=e.indexId,n=void 0===i?t:i,o=[],s={},r=null,a=null,l=null,c=null,d=null,u=!1,h=!1;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return t},getIndexId:function(){return n},getHelper:function(){return l},getResults:function(){var e;return null!==(e=c)&&void 0!==e&&e.lastResults?(c.lastResults._state=l.state,c.lastResults):null},getResultsForWidget:function(e){var t;return"recommend"!==e.dependsOn||Rs(e)||void 0===e.$$id?this.getResults():null!==(t=l)&&void 0!==t&&t.lastRecommendResults?l.lastRecommendResults[e.$$id]:null},getPreviousState:function(){return d},getScopedResults:function(){var e,i=this.getParent();return e=i?i.getWidgets():0===t.length?this.getWidgets():[this],or(e)},getParent:function(){return a},createURL:function(e){return"function"===typeof e?r._createURL(Vs({},n,e(s))):r._createURL(Vs({},n,er(o,{searchParameters:e,helper:l})))},getWidgets:function(){return o},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Xs("The `addWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!==typeof e.init&&"function"!==typeof e.render})))throw new Error(Xs("The widget definition expects a `render` and/or an `init` method."));return e.forEach((function(e){Rs(e)||(r&&"recommend"===e.dependsOn?r._hasRecommendWidget=!0:r?r._hasSearchWidget=!0:"recommend"===e.dependsOn?u=!0:h=!0,Ps(e))})),o=o.concat(e),r&&Boolean(e.length)&&(Js(l,{state:tr(o,{uiState:s,initialSearchParameters:l.state}),recommendState:ir(o,{uiState:s,initialRecommendParameters:l.recommendState}),_uiState:s}),e.forEach((function(e){if(e.getRenderState){var i=e.getRenderState(r.renderState[t.getIndexId()]||{},Ds(r,t,r._initialUiState));ar({renderState:i,instantSearchInstance:r,parent:t})}})),e.forEach((function(e){e.init&&e.init(Ds(r,t,r._initialUiState))})),r.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Xs("The `removeWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!==typeof e.dispose})))throw new Error(Xs("The widget definition expects a `dispose` method."));if(o=o.filter((function(t){return-1===e.indexOf(t)})),o.forEach((function(e){Rs(e)||(r&&"recommend"===e.dependsOn?r._hasRecommendWidget=!0:r?r._hasSearchWidget=!0:"recommend"===e.dependsOn?u=!0:h=!0)})),r&&Boolean(e.length)){var i=e.reduce((function(e,i){var n=i.dispose({helper:l,state:e.cleanedSearchState,recommendState:e.cleanedRecommendState,parent:t});return n instanceof Qt.RecommendParameters?e.cleanedRecommendState=n:n&&(e.cleanedSearchState=n),e}),{cleanedSearchState:l.state,cleanedRecommendState:l.recommendState}),n=i.cleanedSearchState,a=i.cleanedRecommendState,c=r.future.preserveSharedStateOnUnmount?tr(o,{uiState:s,initialSearchParameters:new Qt.SearchParameters({index:this.getIndexName()})}):tr(o,{uiState:er(o,{searchParameters:n,helper:l}),initialSearchParameters:n});s=er(o,{searchParameters:c,helper:l}),l.setState(c),l.recommendState=a,o.length&&r.scheduleSearch()}return this},init:function(e){var i,g=this,p=e.instantSearchInstance,f=e.parent,m=e.uiState;if(null===l){r=p,a=f,s=m[n]||{};var _=p.mainHelper,v=tr(o,{uiState:s,initialSearchParameters:new Qt.SearchParameters({index:t})}),b=ir(o,{uiState:s,initialRecommendParameters:new Qt.RecommendParameters});l=Qt({},v.index,v),l.recommendState=b,l.search=function(){return p.onStateChange?(p.onStateChange({uiState:p.mainIndex.getWidgetUiState({}),setUiState:function(e){return p.setUiState(e,!1)}}),_):_.search()},l.searchWithoutTriggeringOnStateChange=function(){return _.search()},l.searchForFacetValues=function(e,t,i,n){var o=l.state.setQueryParameters(n);return _.searchForFacetValues(e,t,i,o)},c=_.derive((function(){return St.apply(void 0,[_.state].concat(Us(As(g))))}),(function(){return g.getHelper().recommendState}));var y=null===(i=p._initialResults)||void 0===i?void 0:i[this.getIndexId()];if(null!==y&&void 0!==y&&y.results){var w=new Qt.SearchResults(new Qt.SearchParameters(y.state),y.results);c.lastResults=w,l.lastResults=w}if(null!==y&&void 0!==y&&y.recommendResults){var C=new Qt.RecommendResults(new Qt.RecommendParameters({params:y.recommendResults.params}),y.recommendResults.results);c.lastRecommendResults=C,l.lastRecommendResults=C}l.on("change",(function(e){var t=e.isPageReset;t&&nr(o)})),c.on("search",(function(){p.scheduleStalledRender()})),c.on("result",(function(e){var t=e.results;p.scheduleRender(),l.lastResults=t,d=null===t||void 0===t?void 0:t._state})),c.on("recommend:result",(function(e){var t=e.recommend;p.scheduleRender(),l.lastRecommendResults=t.results})),o.forEach((function(e){if(e.getRenderState){var t=e.getRenderState(p.renderState[g.getIndexId()]||{},Ds(p,g,m));ar({renderState:t,instantSearchInstance:p,parent:g})}})),o.forEach((function(e){e.init&&e.init(Ds(p,g,m))})),l.on("change",(function(e){var t=e.state,i=e._uiState;s=er(o,{searchParameters:t,helper:l},i||{}),p.onStateChange||p.onInternalStateChange()})),y&&p.scheduleRender(),u&&(p._hasRecommendWidget=!0),h&&(p._hasSearchWidget=!0)}},render:function(e){var t,i=this,n=e.instantSearchInstance;"error"===n.status&&!n.mainHelper.hasPendingRequests()&&d&&l.setState(d);var s=this.getResults()||null!==(t=c)&&void 0!==t&&t.lastRecommendResults?o:o.filter(Rs);s=s.filter((function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:n})})),s.forEach((function(e){if(e.getRenderState){var t=e.getRenderState(n.renderState[i.getIndexId()]||{},Ns(n,i,e));ar({renderState:t,instantSearchInstance:n,parent:i})}})),s.forEach((function(e){e.render&&e.render(Ns(n,i,e))}))},dispose:function(){var e,t,i=this;o.forEach((function(e){e.dispose&&l&&e.dispose({helper:l,state:l.state,recommendState:l.recommendState,parent:i})})),r=null,a=null,null===(e=l)||void 0===e||e.removeAllListeners(),l=null,null===(t=c)||void 0===t||t.detach(),c=null},getWidgetUiState:function(e){return o.filter(Rs).reduce((function(e,t){return t.getWidgetUiState(e)}),Hs(Hs({},e),{},Vs({},n,Hs(Hs({},e[n]),s))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var i=t.uiState;return tr(o,{uiState:i,initialSearchParameters:e})},refreshUiState:function(){s=er(o,{searchParameters:this.getHelper().state,helper:this.getHelper()},s)},setIndexUiState:function(e){var t="function"===typeof e?e(s):e;r.setUiState((function(e){return Hs(Hs({},e),{},Vs({},n,t))}))}}};const rr=sr;function ar(e){var t=e.renderState,i=e.instantSearchInstance,n=e.parent,o=n?n.getIndexId():i.mainIndex.getIndexId();i.renderState=Hs(Hs({},i.renderState),{},Vs({},o,Hs(Hs({},i.renderState[o]),t)))}const lr={name:"AisIndex",mixins:[s({name:"Index"}),m({connector:function(){return rr}},{$$widgetType:"ais.index"})],provide:function(){var e=this;return{$_ais_getParentIndex:function(){return e.widget}}},props:{indexName:{type:String,required:!0},indexId:{type:String,required:!1}},render:u((function(e){return e("div",{},h(this))})),computed:{widgetParams:function(){return{indexName:this.indexName,indexId:this.indexId}}}};var cr="ais",dr=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.descendantName,n=t.modifierName,o=i?"-".concat(i):"",s=n?"--".concat(n):"";return"".concat(cr,"-").concat(e).concat(o).concat(s)}},ur=dr("Highlight");function hr(e){var t=e.attribute,i=e.highlightedTagName,n=void 0===i?"mark":i,o=e.hit,s=e.cssClasses,r=void 0===s?{}:s,a=Oi(o._highlightResult,t),l=a||{},c=l.value,d=void 0===c?"":c,u=ur({descendantName:"highlighted"})+(r.highlighted?" ".concat(r.highlighted):"");return d.replace(new RegExp(V.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(V.highlightPostTag,"g"),""))}function gr(e){var t=V.highlightPreTag,i=V.highlightPostTag;return e.map((function(e){return e.isHighlighted?t+e.value+i:e.value})).join("")}var pr=new RegExp(/\w/i);function fr(e,t){var i,n,o=e[t],s=(null===(i=e[t+1])||void 0===i?void 0:i.isHighlighted)||!0,r=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return pr.test(L(o.value))||r!==s?o.isHighlighted:r}function mr(e){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(e)}function _r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function vr(e){for(var t=1;t')).replace(new RegExp(V.highlightPostTag,"g"),""))}var xr=dr("Snippet");function Er(e){var t=e.attribute,i=e.highlightedTagName,n=void 0===i?"mark":i,o=e.hit,s=e.cssClasses,r=void 0===s?{}:s,a=Oi(o._snippetResult,t),l=a||{},c=l.value,d=void 0===c?"":c,u=xr({descendantName:"highlighted"})+(r.highlighted?" ".concat(r.highlighted):"");return d.replace(new RegExp(V.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(V.highlightPostTag,"g"),""))}var Lr=dr("ReverseSnippet");function Tr(e){var t=e.attribute,i=e.highlightedTagName,n=void 0===i?"mark":i,o=e.hit,s=e.cssClasses,r=void 0===s?{}:s,a=Oi(o._snippetResult,t),l=a||{},c=l.value,d=void 0===c?"":c,u=Lr({descendantName:"highlighted"})+(r.highlighted?" ".concat(r.highlighted):""),h=gr(Cr(No(d)));return h.replace(new RegExp(V.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(V.highlightPostTag,"g"),""))}function Ir(e){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ir(e)}function Rr(e){var t,i=e.method,n=e.payload;if("object"!==Ir(n))throw new Error("The insights helper expects the payload to be an object.");try{t=q(n)}catch(o){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(i,'" data-insights-payload="').concat(t,'"')}function Dr(e,t){return Rr({method:e,payload:t})}function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}var Ar="_ALGOLIA";function Or(e){if("object"===("undefined"===typeof document?"undefined":Nr(document))&&"string"===typeof document.cookie)for(var t="".concat(e,"="),i=document.cookie.split(";"),n=0;n1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}},i=t.fallback;return"undefined"===typeof window?i():e({window})}function Br(e){return e!==Object(e)}function Wr(e,t){if(e===t)return!0;if(Br(e)||Br(t)||"function"===typeof e||"function"===typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i=0,n=Object.keys(e);i=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function jr(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}function zr(e){var t=e||{},i=(t.page,Vr(t,Hr));return i}var Ur="ais.infiniteHits";function $r(){return{read:function(e){var t=e.state,i=Fr((function(e){var t=e.window;return t.sessionStorage}));if(!i)return null;try{var n=JSON.parse(i.getItem(Ur));return n&&Wr(n.state,zr(t))?n.hits:null}catch(o){if(o instanceof SyntaxError)try{i.removeItem(Ur)}catch(s){}return null}},write:function(e){var t=e.state,i=e.hits,n=Fr((function(e){var t=e.window;return t.sessionStorage}));if(n)try{n.setItem(Ur,JSON.stringify({state:zr(t),hits:i}))}catch(o){}}}}var qr=i(83480);function Kr(e){if(e.transporter){var t=e.transporter,i=t.headers||t.baseHeaders,n=t.queryParameters||t.baseQueryParameters,o="x-algolia-application-id",s="x-algolia-api-key",r=i[o]||n[o],a=i[s]||n[s];return[r,a]}return[e.applicationID,e.apiKey]}function Gr(e){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gr(e)}function Qr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Yr(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,i=e.insightsInitParams,n=e.onEvent,o=e.$$internal,s=void 0!==o&&o,r=e.$$automatic,a=void 0!==r&&r,l=t;t||null===t||Fr((function(e){var t=e.window,i=t.AlgoliaAnalyticsObject||"aa";"string"===typeof i&&(l=t[i]),l||(t.AlgoliaAnalyticsObject=i,t[i]||(t[i]=function(){t[i].queue||(t[i].queue=[]);for(var e=arguments.length,n=new Array(e),o=0;o1&&void 0!==arguments[1]&&arguments[1],n=pa(e);if(n){var o=l.state.userToken;i?s():setTimeout(s,0)}function s(){l.overrideStateWithoutTriggeringChangeEvent(Yr(Yr({},l.state),{},{userToken:n})),o&&o!==e&&t.scheduleSearch()}},i=Pr();function o(t,i,n){e(t,!0),i&&c("setUserToken",i),n&&c("setAuthenticatedUserToken",n)}i&&e(i,!0);var d=_||m,u=f||p;d?o(d,m,_):u&&o(u,p,f),c("onUserTokenChange",e,{immediate:!0}),c("onAuthenticatedUserTokenChange",(function(t){t||c("getUserToken",null,(function(t,i){e(i)})),e(t)}),{immediate:!0});var v=c;ga(c)&&(v=function(e,t){var i={headers:{"X-Algolia-Application-Id":h,"X-Algolia-API-Key":g}};return c(e,t,i)}),t.sendEventToInsights=function(e){n?n(e,v):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],a&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),v(e.insightsMethod,e.payload))}},unsubscribe:function(){c("onUserTokenChange",void 0),c("onAuthenticatedUserTokenChange",void 0),t.sendEventToInsights=v.l,l&&r&&(l.overrideStateWithoutTriggeringChangeEvent(Yr(Yr({},l.state),r)),t.scheduleSearch())}}}}function ga(e){var t=(e.version||"").split(".").map(Number),i=ea(t,2),n=i[0],o=i[1],s=n>=3,r=2===n&&o>=6,a=1===n&&o>=10;return s||r||a}function pa(e){if(e)return"number"===typeof e?e.toString():e}function fa(e,t,i){var n=Ds(t,t.mainIndex,t._initialUiState);e.forEach((function(e){var o={};if(e.getWidgetRenderState){var s=e.getWidgetRenderState(n);s&&s.widgetParams&&(o=s.widgetParams)}var r=Object.keys(o).filter((function(e){return void 0!==o[e]}));i.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:r}),"ais.index"===e.$$type&&fa(e.getWidgets(),t,i)}))}function ma(){return Fr((function(e){var t,i,n=e.window;return(null===(t=n.navigator)||void 0===t||null===(i=t.userAgent)||void 0===i?void 0:i.indexOf("Algolia Crawler"))>-1}),{fallback:function(){return!1}})}function _a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.$$internal,i=void 0!==t&&t;return function(e){var t=e.instantSearchInstance,n={widgets:[]},o=document.createElement("meta"),s=document.querySelector("head");return o.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:i,onStateChange:function(){},subscribe:function(){setTimeout((function(){var e=t.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,fa(t.mainIndex.getWidgets(),t,n),t.middleware.forEach((function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})})),o.content=JSON.stringify(n),s.appendChild(o)}),0)},started:function(){},unsubscribe:function(){o.remove()}}}}var va=i(96734);function ba(e){return ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ba(e)}function ya(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wa(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,i=void 0===t?function(e){var t=e.qsModule,i=e.routeState,n=e.location,o=n.protocol,s=n.hostname,r=n.port,a=void 0===r?"":r,l=n.pathname,c=n.hash,d=t.stringify(i),u=""===a?"":":".concat(a);return d?"".concat(o,"//").concat(s).concat(u).concat(l,"?").concat(d).concat(c):"".concat(o,"//").concat(s).concat(u).concat(l).concat(c)}:t,n=e.parseURL,o=void 0===n?function(e){var t=e.qsModule,i=e.location;return t.parse(i.search.slice(1),{arrayLimit:99})}:n,s=e.writeDelay,r=void 0===s?400:s,a=e.windowTitle,l=e.getLocation,c=void 0===l?function(){return Fr((function(e){var t=e.window;return t.location}),{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:l,d=e.start,u=e.dispose,h=e.push,g=e.cleanUrlOnDispose;return new La({createURL:i,parseURL:o,writeDelay:r,windowTitle:a,getLocation:c,start:d,dispose:u,push:h,cleanUrlOnDispose:g})}function Ia(e){return Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ia(e)}var Ra=["configure"];function Da(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Na(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function Fa(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}function Ba(e){e.configure;var t=Ma(e,Ra);return t}function Wa(){return{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce((function(t,i){return Na(Na({},t),{},Aa({},i,Ba(e[i])))}),{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,i){return Na(Na({},t),{},Aa({},i,Ba(e[i])))}),{})}}}function Ha(e){return Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ha(e)}function Va(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ja(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,i=void 0===t?Ta():t,n=e.stateMapping,o=void 0===n?Wa():n,s=e.$$internal,r=void 0!==s&&s;return function(e){var t=e.instantSearchInstance;function n(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),s=Object.keys(e).reduce((function(t,i){return ja(ja({},t),{},za({},i,e[i]))}),n),r=o.stateToRoute(s);return i.createURL(r)}t._createURL=n;var s=void 0,a=t._initialUiState;return{$$type:"ais.router({router:".concat(i.$$type||"__unknown__",", stateMapping:").concat(o.$$type||"__unknown__","})"),$$internal:r,onStateChange:function(e){var t=e.uiState,n=o.stateToRoute(t);void 0!==s&&Wr(s,n)||(i.write(n),s=n)},subscribe:function(){t._initialUiState=ja(ja({},a),o.routeToState(i.read())),i.onUpdate((function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(o.routeToState(e))}))},started:function(){var e;null===(e=i.start)||void 0===e||e.call(i)},unsubscribe:function(){i.dispose()}}}};function Ka(e,t){return e.toLocaleString(t)}function Ga(e){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ga(e)}function Qa(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ya(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1?i-1:0),s=1;s1?t-1:0),n=1;n0&&void 0!==arguments[0])||arguments[0];null!==(e=n.mainHelper)&&void 0!==e&&e.hasPendingRequests()||(clearTimeout(n._searchStalledTimer),n._searchStalledTimer=null,t&&(n.status="idle",n.error=void 0)),n.mainIndex.render({instantSearchInstance:Fl(n)}),n.emit("render")}))),Hl(Fl(n),"onInternalStateChange",il((function(){var e=n.mainIndex.getWidgetUiState({});n.middleware.forEach((function(t){var i=t.instance;i.onStateChange({uiState:e})}))}))),n.setMaxListeners(100);var o=e.indexName,s=void 0===o?"":o,r=e.numberLocale,a=e.initialUiState,l=void 0===a?{}:a,c=e.routing,d=void 0===c?null:c,u=e.insights,h=void 0===u?void 0:u,g=e.searchFunction,p=e.stalledSearchDelay,f=void 0===p?200:p,m=e.searchClient,_=void 0===m?null:m,b=e.insightsClient,y=void 0===b?null:b,w=e.onStateChange,C=void 0===w?null:w,S=e.future,k=void 0===S?Il(Il({},$l),e.future||{}):S;if(null===_)throw new Error(zl("The `searchClient` option is required."));if("function"!==typeof _.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"===typeof _.addAlgoliaAgent&&_.addAlgoliaAgent("instantsearch.js (".concat(El,")")),y&&"function"!==typeof y)throw new Error(zl("The `insightsClient` option should be a function."));if(n.client=_,n.future=k,n.insightsClient=y,n.indexName=s,n.helper=null,n.mainHelper=null,n.mainIndex=rr({indexName:s}),n.onStateChange=C,n.started=!1,n.templatesConfig={helpers:el({numberLocale:r}),compileOptions:{}},n._stalledSearchDelay=f,n._searchStalledTimer=null,n._createURL=Ul,n._initialUiState=l,n._initialResults=null,n._insights=h,g&&(n._searchFunction=g),n.sendEventToInsights=v.l,d){var x="boolean"===typeof d?{}:d;x.$$internal=!0,n.use(qa(x))}if(h){var E="boolean"===typeof h?{}:h;E.$$internal=!0,n.use(ha(E))}return ma()&&n.use(_a({$$internal:!0})),n}return Nl(i,[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach((function(e){var t=e.instance;t.started()})),"undefined"===typeof this._insights&&t.derivedHelpers[0].once("result",(function(){var t=e.mainIndex.getScopedResults().some((function(e){var t=e.results;return null===t||void 0===t?void 0:t._automaticInsights}));t&&e.use(ha({$$internal:!0,$$automatic:!0}))}))}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null===(e=this.mainHelper)||void 0===e||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach((function(e){var t=e.instance;t.unsubscribe()}))}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout((function(){e.status="stalled",e.scheduleRender()}),this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(zl("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"===typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&i?this.onStateChange({uiState:n,setUiState:function(e){xl("function"===typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(xl(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(zl("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(zl("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),i}(qr);const Kl=ql;var Gl=function(e){return new Kl(e)};Gl.version=El,Gl.createInfiniteHitsSessionStorageCache=ai($r,"import { createInfiniteHitsSessionStorageCache } from 'instantsearch.js/es/lib/infiniteHitsCache'"),Gl.highlight=ai(hr,"import { highlight } from 'instantsearch.js/es/helpers'"),Gl.reverseHighlight=ai(kr,"import { reverseHighlight } from 'instantsearch.js/es/helpers'"),Gl.snippet=ai(Er,"import { snippet } from 'instantsearch.js/es/helpers'"),Gl.reverseSnippet=ai(Tr,"import { reverseSnippet } from 'instantsearch.js/es/helpers'"),Gl.insights=Dr,Gl.getInsightsAnonymousUserToken=Mr,Object.defineProperty(Gl,"widgets",{get:function(){throw new ReferenceError("\"instantsearch.widgets\" are not available from the ES build.\n\nTo import the widgets:\n\nimport { searchBox } from 'instantsearch.js/es/widgets'")}}),Object.defineProperty(Gl,"connectors",{get:function(){throw new ReferenceError("\"instantsearch.connectors\" are not available from the ES build.\n\nTo import the connectors:\n\nimport { connectSearchBox } from 'instantsearch.js/es/connectors'")}}),Object.defineProperty(Gl,"templates",{get:function(){throw new ReferenceError("\"instantsearch.templates\" are not available from the ES build.\n\nTo import the templates:\n\nimport { carousel } from 'instantsearch.js/es/templates'")}});const Ql=Gl;var Yl="4.19.5",Zl=function(e){var t;return r(((t={mixins:[s({name:"InstantSearch"})],provide:function(){return{$_ais_instantSearchInstance:this.instantSearchInstance}},watch:{searchClient:function(e){f(!1),this.instantSearchInstance.helper.setClient(e).search()},indexName:function(e){this.instantSearchInstance.helper.setIndex(e||"").search()},stalledSearchDelay:function(e){this.instantSearchInstance._stalledSearchDelay=e},routing:function(){throw new Error("routing configuration can not be changed dynamically at this point.\n\nPlease open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props")},onStateChange:function(){throw new Error("onStateChange configuration can not be changed dynamically at this point.\n\nPlease open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props")},searchFunction:function(e){this.instantSearchInstance._searchFunction=e},middlewares:{immediate:!0,handler:function(e,t){var i=this;(t||[]).filter((function(t){return-1===(e||[]).indexOf(t)})).forEach((function(e){i.instantSearchInstance.unuse(e)})),(e||[]).filter((function(e){return-1===(t||[]).indexOf(e)})).forEach((function(e){i.instantSearchInstance.use(e)}))}},future:function(e){this.instantSearchInstance.future=Object.assign($l,e)}},created:function(){var e=this.instantSearchInstance.client;"function"==typeof e.addAlgoliaAgent&&(e.addAlgoliaAgent("Vue ("+l.rE+")"),e.addAlgoliaAgent("Vue InstantSearch ("+Yl+")"))},mounted:function(){var e=this;this.$nextTick((function(){e.instantSearchInstance.started||e.instantSearchInstance.start()}))}}).beforeUnmount=function(){this.instantSearchInstance.started&&this.instantSearchInstance.dispose(),this.instantSearchInstance.__initialSearchResults=void 0},t),e)},Xl="Vue InstantSearch: You used the prop api-key or app-id.\nThese have been replaced by search-client.\n\nSee more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client";const Jl=Zl({name:"AisInstantSearch",props:{searchClient:{type:Object,required:!0},insightsClient:{type:Function,default:void 0},indexName:{type:String,required:!0},routing:{default:void 0,validator:function(e){return!("boolean"==typeof e||!e.router&&!e.stateMapping)||(f("The `routing` option expects an object with `router` and/or `stateMapping`.\n\nSee https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-routing"),!1)}},insights:{default:void 0,validator:function(e){return void 0===e||"boolean"==typeof e||"object"==typeof e}},stalledSearchDelay:{type:Number,default:void 0},searchFunction:{type:Function,default:void 0},onStateChange:{type:Function,default:void 0},initialUiState:{type:Object,default:void 0},apiKey:{type:String,default:void 0,validator:function(e){return e&&f(Xl),!1}},appId:{type:String,default:void 0,validator:function(e){return e&&f(Xl),!1}},middlewares:{type:Array,default:null},future:{type:Object,default:void 0}},data:function(){return{instantSearchInstance:Ql({searchClient:this.searchClient,insightsClient:this.insightsClient,insights:this.insights,indexName:this.indexName,routing:this.routing,stalledSearchDelay:this.stalledSearchDelay,searchFunction:this.searchFunction,onStateChange:this.onStateChange,initialUiState:this.initialUiState,future:this.future})}},render:u((function(e){var t;return e("div",{class:(t={},t[this.suit()]=!0,t[this.suit("","ssr")]=!1,t)},h(this))}))}),ec=Zl({name:"AisInstantSearchSsr",inject:{$_ais_ssrInstantSearchInstance:{default:function(){throw new Error("`createServerRootMixin` is required when using SSR.")}}},data:function(){return{instantSearchInstance:this.$_ais_ssrInstantSearchInstance}},render:u((function(e){var t;return e("div",{class:(t={},t[this.suit()]=!0,t[this.suit("","ssr")]=!0,t)},h(this))}))});function tc(e,t){t(e),e.getWidgets().forEach((function(e){Rs(e)&&tc(e,t)}))}function ic(e){return ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ic(e)}var nc=["page"],oc=["clickAnalytics","userToken"];function sc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function rc(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function _c(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}var vc=(0,_.V)({name:"infinite-hits",connector:!0});function bc(e){var t=e||{},i=(t.page,mc(t,nc));return i}function yc(e){var t=e||{},i=(t.clickAnalytics,t.userToken,mc(t,oc));return i}function wc(){var e=null,t=null;return{read:function(i){var n=i.state;return Wr(t,bc(n))?e:null},write:function(i){var n=i.state,o=i.hits;t=bc(n),e=o}}}function Cc(e){return Object.keys(e).map(Number).sort((function(e,t){return e-t})).reduce((function(t,i){return t.concat(e[i])}),[])}const Sc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,vc()),function(i){var n,o,s,r,a=i||{},l=a.escapeHTML,c=void 0===l||l,d=a.transformItems,u=void 0===d?function(e){return e}:d,h=a.cache,g=void 0===h?wc():h,p=function(e,t){var i=e.page,n=void 0===i?0:i,o=Object.keys(t).map(Number);return 0===o.length?n:Math.min.apply(Math,[n].concat(dc(o)))},f=function(e,t){var i=e.page,n=void 0===i?0:i,o=Object.keys(t).map(Number);return 0===o.length?n:Math.max.apply(Math,[n].concat(dc(o)))},m=function(e){return function(){e.overrideStateWithoutTriggeringChangeEvent(rc(rc({},e.state),{},{page:p(e.state,g.read({state:yc(e.state)})||{})-1})).searchWithoutTriggeringOnStateChange()}},_=function(e){return function(){e.setPage(f(e.state,g.read({state:yc(e.state)})||{})+1).search()}};return{$$type:"ais.infiniteHits",init:function(t){e(rc(rc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var i=t.instantSearchInstance,n=this.getWidgetRenderState(t);e(rc(rc({},n),{},{instantSearchInstance:i}),!1),s("view:internal",n.currentPageHits)},getRenderState:function(e,t){return rc(rc({},e),{},{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,a,l,d,h=e.results,v=e.helper,b=e.parent,y=e.state,w=e.instantSearchInstance,C=[],S=b.getPreviousState()||y,k=g.read({state:yc(S)})||{},x=null===h||void 0===h||null===(t=h.renderingContent)||void 0===t||null===(a=t.widgets)||void 0===a||null===(l=a.banners)||void 0===l?void 0:l[0];if(h){var E,L,T=S.page,I=void 0===T?0:T;c&&h.hits.length>0&&(h.hits=U(h.hits));var R=mi(h.hits,h.page,h.hitsPerPage),D=Si(R,h.queryID),N=u(D,{results:h}),A=!1;tc(w.mainIndex,(function(e){!A&&e.getWidgets().some((function(e){var t=e.$$type;return"ais.dynamicWidgets"===t}))&&(A=!0)}));var O=!(null!==(E=S.disjunctiveFacets)&&void 0!==E&&E.length)&&!(S.facets||[]).filter((function(e){return"*"!==e})).length&&!(null!==(L=S.hierarchicalFacets)&&void 0!==L&&L.length);void 0!==k[I]||h.__isArtificial||"idle"!==w.status||A&&O||(k[I]=N,g.write({state:yc(S),hits:k})),C=N,d=0===p(S,k)}else n=m(v),o=_(v),s=ae({instantSearchInstance:w,getIndex:function(){return v.getIndex()},widgetType:this.$$type}),r=le({getIndex:function(){return v.getIndex()},widgetType:this.$$type,instantSearchInstance:w}),d=void 0===S.page||0===p(S,k);var P=Cc(k),M=!h||h.nbPages<=f(S,k)+1;return{hits:P,items:P,currentPageHits:C,sendEvent:s,bindEvent:r,banner:x,results:h,showPrevious:n,showMore:o,isFirstPage:d,isLastPage:M,widgetParams:i}},dispose:function(e){var i=e.state;t();var n=i.setQueryParameter("page",void 0);return c?n.setQueryParameters(Object.keys(H).reduce((function(e,t){return rc(rc({},e),{},ac({},t,void 0))}),{})):n},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.page||0;return n?rc(rc({},e),{},{page:n+1}):e},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=e;c&&(n=e.setQueryParameters(H));var o=i.page?i.page-1:0;return n.setQueryParameter("page",o)}}}};var kc=Yo(Sc);const xc=kc,Ec={name:"AisInfiniteHits",mixins:[m({connector:xc},{$$widgetType:"ais.infiniteHits"}),s({name:"InfiniteHits"})],props:{showBanner:{type:Boolean,default:!0},showPrevious:{type:Boolean,default:!1},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0},cache:{type:Object,default:void 0}},computed:{widgetParams:function(){return{showBanner:this.showBanner,showPrevious:this.showPrevious,escapeHTML:this.escapeHTML,transformItems:this.transformItems,cache:this.cache}}},methods:{refinePrevious:function(){this.state.showPrevious()},refineNext:function(){this.state.showMore()}}};var Lc=["disabled"],Tc=["href","target"],Ic=["src","alt"],Rc=["src","alt"],Dc=["onClick","onAuxclick"],Nc=["disabled"];function Ac(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[i.showPrevious?(0,l.RG)(e.$slots,"loadPrevious",{key:0,refinePrevious:s.refinePrevious,page:e.state.results.page,isFirstPage:e.state.isFirstPage},(function(){return[(0,l.Lk)("button",{class:(0,be.C4)([e.suit("loadPrevious"),e.state.isFirstPage&&e.suit("loadPrevious","disabled")]),disabled:e.state.isFirstPage,onClick:t[0]||(t[0]=function(e){return s.refinePrevious()})}," Show previous results ",10,Lc)]})):(0,l.Q3)("",!0),(0,l.RG)(e.$slots,"default",{items:e.state.items,results:e.state.results,banner:e.state.banner,isLastPage:e.state.isLastPage,refinePrevious:s.refinePrevious,refineNext:s.refineNext,refine:s.refineNext,insights:e.state.insights,sendEvent:e.state.sendEvent},(function(){return[i.showBanner&&e.state.banner&&e.state.banner.image.urls[0].url?(0,l.RG)(e.$slots,"banner",{key:0,banner:e.state.banner},(function(){return[(0,l.Lk)("aside",{class:(0,be.C4)(e.suit("banner"))},[e.state.banner.link?((0,l.uX)(),(0,l.CE)("a",{key:0,href:e.state.banner.link.url,target:e.state.banner.link.target,class:(0,be.C4)(e.suit("banner-link"))},[(0,l.Lk)("img",{src:e.state.banner.image.urls[0].url,alt:e.state.banner.image.title,class:(0,be.C4)(e.suit("banner-image"))},null,10,Ic)],10,Tc)):((0,l.uX)(),(0,l.CE)("img",{key:1,src:e.state.banner.image.urls[0].url,alt:e.state.banner.image.title,class:(0,be.C4)(e.suit("banner-image"))},null,10,Rc))],2)]})):(0,l.Q3)("",!0),(0,l.Lk)("ol",{class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t,i){return(0,l.uX)(),(0,l.CE)("li",{class:(0,be.C4)(e.suit("item")),key:t.objectID,onClick:function(i){return e.state.sendEvent("click:internal",t,"Hit Clicked")},onAuxclick:function(i){return e.state.sendEvent("click:internal",t,"Hit Clicked")}},[(0,l.RG)(e.$slots,"item",{item:t,index:i,insights:e.state.insights,sendEvent:e.state.sendEvent},(function(){return[(0,l.eW)(" objectID: "+(0,be.v_)(t.objectID)+", index: "+(0,be.v_)(i),1)]}))],42,Dc)})),128))],2),(0,l.RG)(e.$slots,"loadMore",{refineNext:s.refineNext,refine:s.refineNext,page:e.state.results.page,isLastPage:e.state.isLastPage},(function(){return[(0,l.Lk)("button",{class:(0,be.C4)([e.suit("loadMore"),e.state.isLastPage&&e.suit("loadMore","disabled")]),disabled:e.state.isLastPage,onClick:t[1]||(t[1]=function(e){return s.refineNext()})}," Show more results ",10,Nc)]}))]}))],2)):(0,l.Q3)("",!0)}Ec.render=Ac;const Oc=Ec;var Pc=["name","escapedValue","path"];function Mc(e){return Mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mc(e)}function Fc(e,t){if(null==e)return{};var i,n,o=Bc(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function Bc(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}function Wc(e,t){return Uc(e)||zc(e,t)||Vc(e,t)||Hc()}function Hc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Vc(e,t){if(e){if("string"===typeof e)return jc(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?jc(e,t):void 0}}function jc(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Yc()),function(i){var n,o,s,r=i||{},a=r.attribute,l=r.limit,c=void 0===l?10:l,d=r.showMore,u=void 0!==d&&d,h=r.showMoreLimit,g=void 0===h?20:h,p=r.sortBy,f=void 0===p?Zc:p,m=r.transformItems,_=void 0===m?function(e){return e}:m;if(!a)throw new Error(Yc("The `attribute` option is required."));if(!0===u&&g<=c)throw new Error(Yc("The `showMoreLimit` option must be greater than `limit`."));var v=!1,b=function(){};function y(e,t){return function(){v=!v,t.render(e)}}function w(){b()}function C(){return v?g:c}return{$$type:"ais.menu",init:function(t){var i=t.instantSearchInstance;e(qc(qc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(qc(qc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.removeHierarchicalFacet(a).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return qc(qc({},e),{},{menu:qc(qc({},e.menu),{},Kc({},a,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,r=e.results,l=e.createURL,c=e.instantSearchInstance,d=e.helper,h=[],g=!1;if(n||(n=Qn({instantSearchInstance:c,helper:d,attribute:a,widgetType:this.$$type})),o||(o=function(e){return l((function(i){return t.getWidgetUiState(i,{searchParameters:d.state.resetPage().toggleFacetRefinement(a,e),helper:d})}))}),s||(s=function(e){var t=d.getHierarchicalFacetBreadcrumb(a),i=Wc(t,1),o=i[0];n("click:internal",e||o),d.toggleFacetRefinement(a,e||o).search()}),e.results&&(b=y(e,this)),r){var p=r.getFacetValues(a,{sortBy:f,facetOrdering:f===Zc}),m=p&&!Array.isArray(p)&&p.data?p.data:[];g=u&&(v||m.length>C()),h=_(m.slice(0,C()).map((function(e){var t=e.name,i=e.escapedValue,n=(e.path,Fc(e,Pc));return qc(qc({},n),{},{label:t,value:i})})),{results:r})}return{items:h,createURL:o,refine:s,sendEvent:n,canRefine:h.length>0,widgetParams:i,isShowingMore:v,toggleShowMore:w,canToggleShowMore:g}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getHierarchicalFacetBreadcrumb(a),o=Wc(n,1),s=o[0];return Jc(qc(qc({},e),{},{menu:qc(qc({},e.menu),{},Kc({},a,s))}),a)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.menu&&i.menu[a];if(e.isConjunctiveFacet(a)||e.isDisjunctiveFacet(a))return e;var o=e.removeHierarchicalFacet(a).addHierarchicalFacet({name:a,attributes:[a]}),s=o.maxValuesPerFacet||0,r=Math.max(s,u?g:c),l=o.setQueryParameter("maxValuesPerFacet",r);return n?l.addHierarchicalFacetRefinement(a,n):l.setQueryParameters({hierarchicalFacetsRefinements:qc(qc({},l.hierarchicalFacetsRefinements),{},Kc({},a,[]))})}}}};function Jc(e,t){return e.menu?(void 0===e.menu[t]&&delete e.menu[t],0===Object.keys(e.menu).length&&delete e.menu,e):e}const ed=Xc,td={name:"AisMenu",mixins:[s({name:"Menu"}),m({connector:ed},{$$widgetType:"ais.menu"}),qe()],props:{attribute:{type:String,required:!0},limit:{type:Number,default:void 0},showMoreLimit:{type:Number,default:void 0},showMore:{type:Boolean,default:!1},sortBy:{type:[Array,Function],default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,transformItems:this.transformItems}},showShowMoreButton:function(){return this.state.canRefine&&this.showMore}}};var id=["href","onClick"],nd=["disabled"];function od(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,refine:e.state.refine,createURL:e.state.createURL,toggleShowMore:e.state.toggleShowMore,sendEvent:e.state.sendEvent},(function(){return[(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t){return(0,l.uX)(),(0,l.CE)("li",{key:t.value,class:(0,be.C4)([e.suit("item"),t.isRefined&&e.suit("item","selected")])},[(0,l.Lk)("a",{href:e.state.createURL(t.value),class:(0,be.C4)(e.suit("link")),onClick:(0,Ge.D$)((function(i){return e.state.refine(t.value)}),["exact","left","prevent"])},[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("label"))},(0,be.v_)(t.label),3),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("count"))},(0,be.v_)(t.count),3)],10,id)],2)})),128))],2),s.showShowMoreButton?((0,l.uX)(),(0,l.CE)("button",{key:0,class:(0,be.C4)([e.suit("showMore"),!e.state.canToggleShowMore&&e.suit("showMore","disabled")]),disabled:!e.state.canToggleShowMore,onClick:t[0]||(t[0]=(0,Ge.D$)((function(){for(var t,i=[],n=arguments.length;n--;)i[n]=arguments[n];return e.state.toggleShowMore&&(t=e.state).toggleShowMore.apply(t,i)}),["prevent"]))},[(0,l.RG)(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},(function(){return[(0,l.eW)((0,be.v_)(e.state.isShowingMore?"Show less":"Show more"),1)]}))],10,nd)):(0,l.Q3)("",!0)]}))],2)):(0,l.Q3)("",!0)}td.render=od;const sd=td,rd={name:"AisMenuSelect",mixins:[s({name:"MenuSelect"}),m({connector:ed},{$$widgetType:"ais.menuSelect"}),qe()],props:{attribute:{type:String,required:!0},limit:{type:Number,default:10},sortBy:{type:[Array,Function],default:void 0},transformItems:{type:Function,default:function(e){return e}}},computed:{widgetParams:function(){return{attribute:this.attribute,limit:this.limit,sortBy:this.sortBy,transformItems:this.transformItems}}},methods:{refine:function(e){this.state.refine(e)}}};var ad=["value","selected"];function ld(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,refine:s.refine,createURL:e.state.createURL,sendEvent:e.state.sendEvent},(function(){return[(0,l.Lk)("select",{class:(0,be.C4)(e.suit("select")),onChange:t[0]||(t[0]=function(e){return s.refine(e.currentTarget.value)})},[(0,l.Lk)("option",{class:(0,be.C4)(e.suit("option")),value:""},[(0,l.RG)(e.$slots,"defaultOption",{},(function(){return[(0,l.eW)(" See all ")]}))],2),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t){return(0,l.uX)(),(0,l.CE)("option",{key:t.value,class:(0,be.C4)(e.suit("option")),value:t.value,selected:t.isRefined},[(0,l.RG)(e.$slots,"item",{item:t},(function(){return[(0,l.eW)((0,be.v_)(t.label)+" ("+(0,be.v_)(t.count)+") ",1)]}))],10,ad)})),128))],34)]}))],2)):(0,l.Q3)("",!0)}rd.render=ld;const cd=rd;function dd(e){return"number"===typeof e&&isFinite(e)}function ud(e){return ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ud(e)}function hd(e,t){var i="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=fd(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){a=!0,s=e},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw s}}}}function gd(e,t){return vd(e)||_d(e,t)||fd(e,t)||pd()}function pd(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fd(e,t){if(e){if("string"===typeof e)return md(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?md(e,t):void 0}}function md(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,kd()),function(i){var n=i||{},o=n.attribute,s=void 0===o?"":o,r=n.items,a=void 0===r?[]:r,l=n.transformItems,c=void 0===l?function(e){return e}:l;if(""===s)throw new Error(kd("The `attribute` option is required."));if(!a||0===a.length)throw new Error(kd("The `items` option expects an array of objects."));var d=function(e){return a.map((function(t){var i=t.start,n=t.end,o=t.label;return{label:o,value:encodeURI(JSON.stringify({start:i,end:n})),isRefined:Td(e,s,{start:i,end:n,label:o})}}))},u={};return{$$type:xd,init:function(t){var i=t.instantSearchInstance;e(yd(yd({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(yd(yd({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.removeNumericRefinement(s)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getNumericRefinements(s),o=n["="]&&n["="][0];if(o||0===o)return yd(yd({},e),{},{numericMenu:yd(yd({},e.numericMenu),{},wd({},s,"".concat(n["="])))});var r=n[">="]&&n[">="][0]||"",a=n["<="]&&n["<="][0]||"";return Dd(yd(yd({},e),{},{numericMenu:yd(yd({},e.numericMenu),{},wd({},s,"".concat(r,":").concat(a)))}),s)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.numericMenu&&i.numericMenu[s],o=e.setQueryParameters({numericRefinements:yd(yd({},e.numericRefinements),{},wd({},s,{}))});if(!n)return o;var r=-1===n.indexOf(":");if(r)return o.addNumericRefinement(s,"=",Number(n));var a=n.split(":").map(parseFloat),l=gd(a,2),c=l[0],d=l[1],u=dd(c)?o.addNumericRefinement(s,">=",c):o,h=dd(d)?u.addNumericRefinement(s,"<=",d):u;return h},getRenderState:function(e,t){return yd(yd({},e),{},{numericMenu:yd(yd({},e.numericMenu),{},wd({},s,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,o=e.state,r=e.instantSearchInstance,a=e.helper,l=e.createURL;u.refine||(u.refine=function(e){var t=Id(a.state,s,e);u.sendEvent("click:internal",e),a.setState(t).search()}),u.createURL||(u.createURL=function(e){return function(i){return l((function(n){return t.getWidgetUiState(n,{searchParameters:Id(e,s,i),helper:a})}))}}),u.sendEvent||(u.sendEvent=Ed({instantSearchInstance:r}));var h,g=!n||0===n.nbHits,p=d(o),f=!0,m=hd(p);try{for(m.s();!(h=m.n()).done;){var _=h.value;if(_.isRefined&&"{}"!==decodeURI(_.value)){f=!1;break}}}catch(v){m.e(v)}finally{m.f()}return{createURL:u.createURL(o),items:c(p,{results:n}),hasNoResults:g,canRefine:!(g&&f),refine:u.refine,sendEvent:u.sendEvent,widgetParams:i}}}}};function Td(e,t,i){var n=e.getNumericRefinements(t);return void 0!==i.start&&void 0!==i.end?i.start===i.end?Rd(n,"=",i.start):Rd(n,">=",i.start)&&Rd(n,"<=",i.end):void 0!==i.start?Rd(n,">=",i.start):void 0!==i.end?Rd(n,"<=",i.end):void 0===i.start&&void 0===i.end&&Object.keys(n).every((function(e){return 0===(n[e]||[]).length}))}function Id(e,t,i){var n=e,o=JSON.parse(decodeURI(i)),s=n.getNumericRefinements(t);if(void 0===o.start&&void 0===o.end)return n.removeNumericRefinement(t);if(Td(n,t,o)||(n=n.removeNumericRefinement(t)),void 0!==o.start&&void 0!==o.end){if(o.start>o.end)throw new Error("option.start should be > to option.end");if(o.start===o.end)return n=Rd(s,"=",o.start)?n.removeNumericRefinement(t,"=",o.start):n.addNumericRefinement(t,"=",o.start),n}return void 0!==o.start&&(Rd(s,">=",o.start)&&(n=n.removeNumericRefinement(t,">=",o.start)),n=n.addNumericRefinement(t,">=",o.start)),void 0!==o.end&&(Rd(s,"<=",o.end)&&(n=n.removeNumericRefinement(t,"<=",o.end)),n=n.addNumericRefinement(t,"<=",o.end)),"number"===typeof n.page&&(n.page=0),n}function Rd(e,t,i){return void 0!==e[t]&&e[t].includes(i)}function Dd(e,t){return e.numericMenu?(":"===e.numericMenu[t]&&delete e.numericMenu[t],0===Object.keys(e.numericMenu).length&&delete e.numericMenu,e):e}const Nd=Ld,Ad={name:"AisNumericMenu",mixins:[m({connector:Nd},{$$widgetType:"ais.numericMenu"}),s({name:"NumericMenu"}),qe()],props:{attribute:{type:String,required:!0},items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,transformItems:this.transformItems,items:this.items}}}};var Od=["name","value","checked"];function Pd(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,refine:e.state.refine,createURL:e.state.createURL,sendEvent:e.state.sendEvent},(function(){return[(0,l.Lk)("ul",{class:(0,be.C4)([e.suit("list")])},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(n){return(0,l.uX)(),(0,l.CE)("li",{key:n.label,class:(0,be.C4)([e.suit("item"),n.isRefined&&e.suit("item","selected")])},[(0,l.Lk)("label",{class:(0,be.C4)(e.suit("label"))},[(0,l.Lk)("input",{type:"radio",class:(0,be.C4)(e.suit("radio")),name:i.attribute,value:n.value,checked:n.isRefined,onChange:t[0]||(t[0]=function(t){return e.state.refine(t.target.value)})},null,42,Od),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("labelText"))},(0,be.v_)(n.label),3)],2)],2)})),128))],2)]}))],2)):(0,l.Q3)("",!0)}Ad.render=Pd;const Md=Ad;function Fd(e){return Vd(e)||Hd(e)||Wd(e)||Bd()}function Bd(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Wd(e,t){if(e){if("string"===typeof e)return jd(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?jd(e,t):void 0}}function Hd(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Vd(e){if(Array.isArray(e))return jd(e)}function jd(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i=i-t?n-(i-e):t}},{key:"isLastPage",value:function(){return this.currentPage>=this.total-1}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}]),e}();const Xd=Zd;function Jd(e){return Jd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jd(e)}function eu(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function tu(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,su()),function(i){var n=i||{},o=n.totalPages,s=n.padding,r=void 0===s?3:s,a=new Xd({currentPage:0,total:0,padding:r}),l={};function c(e){var t=e.nbPages;return void 0!==o?Math.min(o,t):t}return{$$type:"ais.pagination",init:function(t){var i=t.instantSearchInstance;e(tu(tu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(tu(tu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.page||0;return n?tu(tu({},e),{},{page:n+1}):e},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.page?i.page-1:0;return e.setQueryParameter("page",n)},getWidgetRenderState:function(e){var t=e.results,n=e.helper,o=e.state,s=e.createURL;l.refine||(l.refine=function(e){n.setPage(e),n.search()}),l.createURL||(l.createURL=function(e){return s((function(t){return tu(tu({},t),{},{page:e+1})}))});var r=o.page||0,d=c(t||{nbPages:0});return a.currentPage=r,a.total=d,{createURL:l.createURL,refine:l.refine,canRefine:d>1,currentRefinement:r,nbHits:(null===t||void 0===t?void 0:t.nbHits)||0,nbPages:d,pages:t?a.pages():[],isFirstPage:a.isFirstPage(),isLastPage:a.isLastPage(),widgetParams:i}},getRenderState:function(e,t){return tu(tu({},e),{},{pagination:this.getWidgetRenderState(t)})}}}};const au=ru,lu={name:"AisPagination",mixins:[s({name:"Pagination"}),m({connector:au},{$$widgetType:"ais.pagination"}),qe()],props:{padding:{type:Number,default:void 0,validator:function(e){return e>0}},totalPages:{type:Number,default:void 0,validator:function(e){return e>0}},showFirst:{type:Boolean,default:!0},showLast:{type:Boolean,default:!0},showNext:{type:Boolean,default:!0},showPrevious:{type:Boolean,default:!0}},computed:{widgetParams:function(){return{padding:this.padding,totalPages:this.totalPages}}},emits:["page-change"],methods:{refine:function(e){var t=Math.min(Math.max(e,0),this.state.nbPages-1);this.state.refine(t),this.$emit("page-change",t)}}};var cu=["href"],du=["href"],uu=["href","aria-label","onClick"],hu=["href"],gu=["aria-label","href"],pu=["aria-label"];function fu(e,t,i,n,o,s){var r;return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)((r={},r[e.suit()]=!0,r[e.suit("","noRefinement")]=e.state.nbPages<=1,r))},[(0,l.RG)(e.$slots,"default",{refine:s.refine,createURL:e.state.createURL,currentRefinement:e.state.currentRefinement,nbHits:e.state.nbHits,nbPages:e.state.nbPages,pages:e.state.pages,isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage},(function(){var n,o,r,a;return[(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[i.showFirst?((0,l.uX)(),(0,l.CE)("li",{key:0,class:(0,be.C4)((n={},n[e.suit("item")]=!0,n[e.suit("item","disabled")]=e.state.isFirstPage,n[e.suit("item","firstPage")]=!0,n))},[(0,l.RG)(e.$slots,"first",{createURL:function(){return e.state.createURL(0)},isFirstPage:e.state.isFirstPage,refine:function(){return s.refine(0)}},(function(){return[e.state.isFirstPage?((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("link")),"aria-label":"First Page"},"‹‹",2)):((0,l.uX)(),(0,l.CE)("a",{key:0,class:(0,be.C4)(e.suit("link")),"aria-label":"First Page",href:e.state.createURL(0),onClick:t[0]||(t[0]=(0,Ge.D$)((function(e){return s.refine(0)}),["exact","left","prevent"]))},"‹‹",10,cu))]}))],2)):(0,l.Q3)("",!0),i.showPrevious?((0,l.uX)(),(0,l.CE)("li",{key:1,class:(0,be.C4)((o={},o[e.suit("item")]=!0,o[e.suit("item","disabled")]=e.state.isFirstPage,o[e.suit("item","previousPage")]=!0,o))},[(0,l.RG)(e.$slots,"previous",{createURL:function(){return e.state.createURL(e.state.currentRefinement-1)},isFirstPage:e.state.isFirstPage,refine:function(){return s.refine(e.state.currentRefinement-1)}},(function(){return[e.state.isFirstPage?((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("link")),"aria-label":"Previous Page"},"‹",2)):((0,l.uX)(),(0,l.CE)("a",{key:0,class:(0,be.C4)(e.suit("link")),"aria-label":"Previous Page",href:e.state.createURL(e.state.currentRefinement-1),onClick:t[1]||(t[1]=(0,Ge.D$)((function(t){return s.refine(e.state.currentRefinement-1)}),["exact","left","prevent"]))},"‹",10,du))]}))],2)):(0,l.Q3)("",!0),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.pages,(function(t){var i;return(0,l.uX)(),(0,l.CE)("li",{class:(0,be.C4)((i={},i[e.suit("item")]=!0,i[e.suit("item","page")]=!0,i[e.suit("item","selected")]=e.state.currentRefinement===t,i)),key:t},[(0,l.RG)(e.$slots,"item",{page:t,createURL:function(){return e.state.createURL(t)},isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage,refine:function(){return s.refine(t)}},(function(){return[(0,l.Lk)("a",{class:(0,be.C4)(e.suit("link")),href:e.state.createURL(t),"aria-label":"Page "+(t+1),onClick:(0,Ge.D$)((function(e){return s.refine(t)}),["exact","left","prevent"])},(0,be.v_)(t+1),11,uu)]}))],2)})),128)),i.showNext?((0,l.uX)(),(0,l.CE)("li",{key:2,class:(0,be.C4)((r={},r[e.suit("item")]=!0,r[e.suit("item","disabled")]=e.state.isLastPage,r[e.suit("item","nextPage")]=!0,r))},[(0,l.RG)(e.$slots,"next",{createURL:function(){return e.state.createURL(e.state.currentRefinement+1)},isLastPage:e.state.isLastPage,refine:function(){return s.refine(e.state.currentRefinement+1)}},(function(){return[e.state.isLastPage?((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("link")),"aria-label":"Next Page"},"›",2)):((0,l.uX)(),(0,l.CE)("a",{key:0,class:(0,be.C4)(e.suit("link")),"aria-label":"Next Page",href:e.state.createURL(e.state.currentRefinement+1),onClick:t[2]||(t[2]=(0,Ge.D$)((function(t){return s.refine(e.state.currentRefinement+1)}),["exact","left","prevent"]))},"›",10,hu))]}))],2)):(0,l.Q3)("",!0),i.showLast?((0,l.uX)(),(0,l.CE)("li",{key:3,class:(0,be.C4)((a={},a[e.suit("item")]=!0,a[e.suit("item","disabled")]=e.state.isLastPage,a[e.suit("item","lastPage")]=!0,a))},[(0,l.RG)(e.$slots,"last",{createURL:function(){return e.state.createURL(e.state.nbPages-1)},isLastPage:e.state.isLastPage,refine:function(){return s.refine(e.state.nbPages-1)}},(function(){return[e.state.isLastPage?((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("link")),"aria-label":"Last Page, Page "+e.state.nbPages}," ›› ",10,pu)):((0,l.uX)(),(0,l.CE)("a",{key:0,class:(0,be.C4)(e.suit("link")),"aria-label":"Last Page, Page "+e.state.nbPages,href:e.state.createURL(e.state.nbPages-1),onClick:t[3]||(t[3]=(0,Ge.D$)((function(t){return s.refine(e.state.nbPages-1)}),["exact","left","prevent"]))},"››",10,gu))]}))],2)):(0,l.Q3)("",!0)],2)]}))],2)):(0,l.Q3)("",!0)}lu.render=fu;const mu=lu,_u={name:"AisPanel",mixins:[s({name:"Panel"}),$e()],methods:{getSlot:function(e){return this.$slots[e]}}};function vu(e,t,i,n,o,s){return(0,l.uX)(),(0,l.CE)("div",{class:(0,be.C4)([e.suit(),!e.canRefine&&e.suit("","noRefinement")])},[s.getSlot("header")?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit("header"))},[(0,l.RG)(e.$slots,"header",{hasRefinements:e.canRefine})],2)):(0,l.Q3)("",!0),(0,l.Lk)("div",{class:(0,be.C4)(e.suit("body"))},[(0,l.RG)(e.$slots,"default",{hasRefinements:e.canRefine})],2),s.getSlot("footer")?((0,l.uX)(),(0,l.CE)("div",{key:1,class:(0,be.C4)(e.suit("footer"))},[(0,l.RG)(e.$slots,"footer",{hasRefinements:e.canRefine})],2)):(0,l.Q3)("",!0)],2)}_u.render=vu;const bu=_u,yu={name:"AisPoweredBy",mixins:[s({name:"PoweredBy"})],props:{theme:{default:"light",validator:function(e){return-1!==["light","dark"].indexOf(e)}}},computed:{algoliaUrl:function(){return"https://www.algolia.com/?utm_source=vue-instantsearch&utm_medium=website&utm_content="+(location?location.hostname:"")+"&utm_campaign=poweredby"}}};var wu=["href"],Cu=["fill"],Su=["fill"];function ku(e,t,i,n,o,s){return(0,l.uX)(),(0,l.CE)("div",{class:(0,be.C4)([e.suit(),e.suit("",i.theme)])},[(0,l.Lk)("a",{class:(0,be.C4)(e.suit("link")),href:s.algoliaUrl,target:"_blank",rel:"noopener","aria-label":"search by Algolia"},[((0,l.uX)(),(0,l.CE)("svg",{style:{height:"1.2em",width:"auto"},class:(0,be.C4)([e.suit("logo"),e.suit("",i.theme)]),viewBox:"0 0 572 64"},[(0,l.Lk)("path",{fill:"dark"===i.theme?"#FFF":"#36395A",d:"M16 48.3c-3.4 0-6.3-.6-8.7-1.7A12.4 12.4 0 0 1 1.9 42C.6 40 0 38 0 35.4h6.5a6.7 6.7 0 0 0 3.9 6c1.4.7 3.3 1.1 5.6 1.1 2.2 0 4-.3 5.4-1a7 7 0 0 0 3-2.4 6 6 0 0 0 1-3.4c0-1.5-.6-2.8-1.9-3.7-1.3-1-3.3-1.6-5.9-1.8l-4-.4c-3.7-.3-6.6-1.4-8.8-3.4a10 10 0 0 1-3.3-7.9c0-2.4.6-4.6 1.8-6.4a12 12 0 0 1 5-4.3c2.2-1 4.7-1.6 7.5-1.6s5.5.5 7.6 1.6a12 12 0 0 1 5 4.4c1.2 1.8 1.8 4 1.8 6.7h-6.5a6.4 6.4 0 0 0-3.5-5.9c-1-.6-2.6-1-4.4-1s-3.2.3-4.4 1c-1.1.6-2 1.4-2.6 2.4-.5 1-.8 2-.8 3.1a5 5 0 0 0 1.5 3.6c1 1 2.6 1.7 4.7 1.9l4 .3c2.8.2 5.2.8 7.2 1.8 2.1 1 3.7 2.2 4.9 3.8a9.7 9.7 0 0 1 1.7 5.8c0 2.5-.7 4.7-2 6.6a13 13 0 0 1-5.6 4.4c-2.4 1-5.2 1.6-8.4 1.6Zm35.6 0c-2.6 0-4.8-.4-6.7-1.3a13 13 0 0 1-4.7-3.5 17.1 17.1 0 0 1-3.6-10.4v-1c0-2 .3-3.8 1-5.6a13 13 0 0 1 7.3-8.3 15 15 0 0 1 6.3-1.4A13.2 13.2 0 0 1 64 24.3c1 2.2 1.6 4.6 1.6 7.2V34H39.4v-4.3h21.8l-1.8 2.2c0-2-.3-3.7-.9-5.1a7.3 7.3 0 0 0-2.7-3.4c-1.2-.7-2.7-1.1-4.6-1.1s-3.4.4-4.7 1.3a8 8 0 0 0-2.9 3.6c-.6 1.5-.9 3.3-.9 5.4 0 2 .3 3.7 1 5.3a7.9 7.9 0 0 0 2.8 3.7c1.3.8 3 1.3 5 1.3s3.8-.5 5.1-1.3c1.3-1 2.1-2 2.4-3.2h6a11.8 11.8 0 0 1-7 8.7 16 16 0 0 1-6.4 1.2ZM80 48c-2.2 0-4-.3-5.7-1a8.4 8.4 0 0 1-3.7-3.3 9.7 9.7 0 0 1-1.3-5.2c0-2 .5-3.8 1.5-5.2a9 9 0 0 1 4.3-3.1c1.8-.7 4-1 6.7-1H89v4.1h-7.5c-2 0-3.4.5-4.4 1.4-1 1-1.6 2.1-1.6 3.6s.5 2.7 1.6 3.6c1 1 2.5 1.4 4.4 1.4 1.1 0 2.2-.2 3.2-.7 1-.4 1.9-1 2.6-2 .6-1 1-2.4 1-4.2l1.7 2.1c-.2 2-.7 3.8-1.5 5.2a9 9 0 0 1-3.4 3.3 12 12 0 0 1-5.3 1Zm9.5-.7v-8.8h-1v-10c0-1.8-.5-3.2-1.4-4.1-1-1-2.4-1.4-4.2-1.4a142.9 142.9 0 0 0-10.2.4v-5.6a74.8 74.8 0 0 1 8.6-.4c3 0 5.5.4 7.5 1.2s3.4 2 4.4 3.6c1 1.7 1.4 4 1.4 6.7v18.4h-5Zm12.9 0V17.8h5v12.3h-.2c0-4.2 1-7.4 2.8-9.5a11 11 0 0 1 8.3-3.1h1v5.6h-2a9 9 0 0 0-6.3 2.2c-1.5 1.5-2.2 3.6-2.2 6.4v15.6h-6.4Zm34.4 1a15 15 0 0 1-6.6-1.3c-1.9-.9-3.4-2-4.7-3.5a15.5 15.5 0 0 1-2.7-5c-.6-1.7-1-3.6-1-5.4v-1c0-2 .4-3.8 1-5.6a15 15 0 0 1 2.8-4.9c1.3-1.5 2.8-2.6 4.6-3.5a16.4 16.4 0 0 1 13.3.2c2 1 3.5 2.3 4.8 4a12 12 0 0 1 2 6H144c-.2-1.6-1-3-2.2-4.1a7.5 7.5 0 0 0-5.2-1.7 8 8 0 0 0-4.7 1.3 8 8 0 0 0-2.8 3.6 13.8 13.8 0 0 0 0 10.3c.6 1.5 1.5 2.7 2.8 3.6s2.8 1.3 4.8 1.3c1.5 0 2.7-.2 3.8-.8a7 7 0 0 0 2.6-2c.7-1 1-2 1.2-3.2h6.2a11 11 0 0 1-2 6.2 15.1 15.1 0 0 1-11.8 5.5Zm19.7-1v-40h6.4V31h-1.3c0-3 .4-5.5 1.1-7.6a9.7 9.7 0 0 1 3.5-4.8A9.9 9.9 0 0 1 172 17h.3c3.5 0 6 1.1 7.9 3.5 1.7 2.3 2.6 5.7 2.6 10v16.8h-6.4V29.6c0-2.1-.6-3.8-1.8-5a6.4 6.4 0 0 0-4.8-1.8c-2 0-3.7.7-5 2a7.8 7.8 0 0 0-1.9 5.5v17h-6.4Zm63.8 1a12.2 12.2 0 0 1-10.9-6.2 19 19 0 0 1-1.8-7.3h1.4v12.5h-5.1v-40h6.4v19.8l-2 3.5c.2-3.1.8-5.7 1.9-7.7a11 11 0 0 1 4.4-4.5c1.8-1 3.9-1.5 6.1-1.5a13.4 13.4 0 0 1 12.8 9.1c.7 1.9 1 3.8 1 6v1c0 2.2-.3 4.1-1 6a13.6 13.6 0 0 1-13.2 9.4Zm-1.2-5.5a8.4 8.4 0 0 0 7.9-5c.7-1.5 1.1-3.3 1.1-5.3s-.4-3.8-1.1-5.3a8.7 8.7 0 0 0-3.2-3.6 9.6 9.6 0 0 0-9.2-.2 8.5 8.5 0 0 0-3.3 3.2c-.8 1.4-1.3 3-1.3 5v2.3a9 9 0 0 0 1.3 4.8 9 9 0 0 0 3.4 3c1.4.7 2.8 1 4.4 1Zm27.3 3.9-10-28.9h6.5l9.5 28.9h-6Zm-7.5 12.2v-5.7h4.9c1 0 2-.1 2.9-.4a4 4 0 0 0 2-1.4c.4-.7.9-1.6 1.2-2.7l8.6-30.9h6.2l-9.3 32.4a14 14 0 0 1-2.5 5 8.9 8.9 0 0 1-4 2.8c-1.5.6-3.4.9-5.6.9h-4.4Zm9-12.2v-5.2h6.4v5.2H248Z"},null,8,Cu),(0,l.Lk)("path",{fill:"dark"===i.theme?"#FFF":"#003DFF",d:"M534.4 9.1H528a.8.8 0 0 1-.7-.7V1.8c0-.4.2-.7.6-.8l6.5-1c.4 0 .8.2.9.6v7.8c0 .4-.4.7-.8.7zM428 35.2V.8c0-.5-.3-.8-.7-.8h-.2l-6.4 1c-.4 0-.7.4-.7.8v35c0 1.6 0 11.8 12.3 12.2.5 0 .8-.4.8-.8V43c0-.4-.3-.7-.6-.8-4.5-.5-4.5-6-4.5-7zm106.5-21.8H528c-.4 0-.7.4-.7.8v34c0 .4.3.8.7.8h6.5c.4 0 .8-.4.8-.8v-34c0-.5-.4-.8-.8-.8zm-17.7 21.8V.8c0-.5-.3-.8-.8-.8l-6.5 1c-.4 0-.7.4-.7.8v35c0 1.6 0 11.8 12.3 12.2.4 0 .8-.4.8-.8V43c0-.4-.3-.7-.7-.8-4.4-.5-4.4-6-4.4-7zm-22.2-20.6a16.5 16.5 0 0 1 8.6 9.3c.8 2.2 1.3 4.8 1.3 7.5a19.4 19.4 0 0 1-4.6 12.6 14.8 14.8 0 0 1-5.2 3.6c-2 .9-5.2 1.4-6.8 1.4a21 21 0 0 1-6.7-1.4 15.4 15.4 0 0 1-8.6-9.3 21.3 21.3 0 0 1 0-14.4 15.2 15.2 0 0 1 8.6-9.3c2-.8 4.3-1.2 6.7-1.2s4.6.4 6.7 1.2zm-6.7 27.6c2.7 0 4.7-1 6.2-3s2.2-4.3 2.2-7.8-.7-6.3-2.2-8.3-3.5-3-6.2-3-4.7 1-6.1 3c-1.5 2-2.2 4.8-2.2 8.3s.7 5.8 2.2 7.8 3.5 3 6.2 3zm-88.8-28.8c-6.2 0-11.7 3.3-14.8 8.2a18.6 18.6 0 0 0 4.8 25.2c1.8 1.2 4 1.8 6.2 1.7s.1 0 .1 0h.9c4.2-.7 8-4 9.1-8.1v7.4c0 .4.3.7.8.7h6.4a.7.7 0 0 0 .7-.7V14.2c0-.5-.3-.8-.7-.8h-13.5zm6.3 26.5a9.8 9.8 0 0 1-5.7 2h-.5a10 10 0 0 1-9.2-14c1.4-3.7 5-6.3 9-6.3h6.4v18.3zm152.3-26.5h13.5c.5 0 .8.3.8.7v33.7c0 .4-.3.7-.8.7h-6.4a.7.7 0 0 1-.8-.7v-7.4c-1.2 4-4.8 7.4-9 8h-.1a4.2 4.2 0 0 1-.5.1h-.9a10.3 10.3 0 0 1-7-2.6c-4-3.3-6.5-8.4-6.5-14.2 0-3.7 1-7.2 3-10 3-5 8.5-8.3 14.7-8.3zm.6 28.4c2.2-.1 4.2-.6 5.7-2V21.7h-6.3a9.8 9.8 0 0 0-9 6.4 10.2 10.2 0 0 0 9.1 13.9h.5zM452.8 13.4c-6.2 0-11.7 3.3-14.8 8.2a18.5 18.5 0 0 0 3.6 24.3 10.4 10.4 0 0 0 13 .6c2.2-1.5 3.8-3.7 4.5-6.1v7.8c0 2.8-.8 5-2.2 6.3-1.5 1.5-4 2.2-7.5 2.2l-6-.3c-.3 0-.7.2-.8.5l-1.6 5.5c-.1.4.1.8.5 1h.1c2.8.4 5.5.6 7 .6 6.3 0 11-1.4 14-4.1 2.7-2.5 4.2-6.3 4.5-11.4V14.2c0-.5-.4-.8-.8-.8h-13.5zm6.3 8.2v18.3a9.6 9.6 0 0 1-5.6 2h-1a10.3 10.3 0 0 1-8.8-14c1.4-3.7 5-6.3 9-6.3h6.4zM291 31.5A32 32 0 0 1 322.8 0h30.8c.6 0 1.2.5 1.2 1.2v61.5c0 1.1-1.3 1.7-2.2 1l-19.2-17a18 18 0 0 1-11 3.4 18.1 18.1 0 1 1 18.2-14.8c-.1.4-.5.7-.9.6-.1 0-.3 0-.4-.2l-3.8-3.4c-.4-.3-.6-.8-.7-1.4a12 12 0 1 0-2.4 8.3c.4-.4 1-.5 1.6-.2l14.7 13.1v-46H323a26 26 0 1 0 10 49.7c.8-.4 1.6-.2 2.3.3l3 2.7c.3.2.3.7 0 1l-.2.2a32 32 0 0 1-47.2-28.6z"},null,8,Su)],2))],10,wu)],2)}yu.render=ku;const xu=yu;function Eu(e){return Eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eu(e)}function Lu(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Tu(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i0)}))}function Hu(e){return e.replace(/[^a-z0-9-_]+/gi,"_")}function Vu(e){var t=e.helper,i=e.sharedHelperState,n=e.trackedFilters,o=Object.keys(n).reduce((function(e,o){var s=Tt(t.lastResults||{},i,!0).filter((function(e){return e.attribute===o})).map((function(e){return e.numericValue||e.name})),r=n[o],a=r(s);return[].concat(Nu(e),Nu(s.filter((function(e){return a.includes(e)})).map((function(e){return Hu("ais-".concat(o,"-").concat(e))}))))}),[]);return o}function ju(e){var t=this.helper,i=this.initialRuleContexts,n=this.trackedFilters,o=this.transformRuleContexts,s=e.state,r=s.ruleContexts||[],a=Vu({helper:t,sharedHelperState:s,trackedFilters:n}),l=[].concat(Nu(i),Nu(a)),c=o(l).slice(0,10);Wr(r,c)||t.overrideStateWithoutTriggeringChangeEvent(Tu(Tu({},s),{},{ruleContexts:c}))}var zu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Bu()),function(i){var n=i||{},o=n.trackedFilters,s=void 0===o?{}:o,r=n.transformRuleContexts,a=void 0===r?function(e){return e}:r,l=n.transformItems,c=void 0===l?function(e){return e}:l;Object.keys(s).forEach((function(e){if("function"!==typeof s[e])throw new Error(Bu("'The \"".concat(e,'" filter value in the `trackedFilters` option expects a function.')))}));var d,u=Object.keys(s).length>0,h=[];return{$$type:"ais.queryRules",init:function(t){var n=t.helper,o=t.state,r=t.instantSearchInstance;h=o.ruleContexts||[],d=ju.bind({helper:n,initialRuleContexts:h,trackedFilters:s,transformRuleContexts:a}),u&&((Wu(o)||Boolean(i.transformRuleContexts))&&d({state:o}),n.on("change",d)),e(Tu(Tu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var i=t.instantSearchInstance;e(Tu(Tu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},getWidgetRenderState:function(e){var t=e.results,n=t||{},o=n.userData,s=void 0===o?[]:o,r=c(s,{results:t});return{items:r,widgetParams:i}},getRenderState:function(e,t){return Tu(Tu({},e),{},{queryRules:this.getWidgetRenderState(t)})},dispose:function(e){var i=e.helper,n=e.state;return t(),u?(i.removeListener("change",d),n.setQueryParameter("ruleContexts",h)):n}}}};const Uu=zu,$u={name:"AisQueryRuleContext",mixins:[s({name:"QueryRuleContext"}),m({connector:Uu},{$$widgetType:"ais.queryRuleContext"})],props:{trackedFilters:{type:Object,required:!0},transformRuleContexts:{type:Function,required:!1,default:void 0}},computed:{widgetParams:function(){return{trackedFilters:this.trackedFilters,transformRuleContexts:this.transformRuleContexts}}},render:function(){return null}},qu={name:"AisQueryRuleCustomData",mixins:[s({name:"QueryRuleCustomData"}),m({connector:Uu},{$$widgetType:"ais.queryRuleCustomData"})],props:{transformItems:{type:Function,required:!1,default:void 0}},computed:{widgetParams:function(){return{transformItems:this.transformItems}}}};function Ku(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{items:e.state.items},(function(){return[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t,i){return(0,l.uX)(),(0,l.CE)("div",{key:i},[(0,l.RG)(e.$slots,"item",{item:t},(function(){return[(0,l.Lk)("pre",null,(0,be.v_)(t),1)]}))])})),128))]}))],2)):(0,l.Q3)("",!0)}qu.render=Ku;const Gu=qu;function Qu(e){return Qu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qu(e)}function Yu(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Zu(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,ah()),function(i){var n=i||{},o=n.attribute,s=void 0===o?"":o,r=n.min,a=n.max,l=n.precision,c=void 0===l?0:l;if(!s)throw new Error(ah("The `attribute` option is required."));if(dd(r)&&dd(a)&&r>a)throw new Error(ah("The `max` option can't be lower than `min`."));var d=function(e){return Number(Number(e).toFixed(c))},u={from:function(e){return e.toLocaleString()},to:function(e){return d(e).toLocaleString()}},h=function(e,t,i,n){var o,l,d=e.state,u=t.min,h=t.max,g=d.getNumericRefinement(s,">=")||[],p=th(g,1),f=p[0],m=d.getNumericRefinement(s,"<=")||[],_=th(m,1),v=_[0],b=void 0===i||""===i,y=void 0===n||""===n,w=ch({min:b?void 0:parseFloat(i),max:y?void 0:parseFloat(n),precision:c}),C=w.min,S=w.max;o=dd(r)||u!==C?dd(r)&&b?r:C:void 0,l=dd(a)||h!==S?dd(a)&&y?a:S:void 0;var k=void 0===o,x=dd(u)&&u<=o,E=k||dd(o)&&(!dd(u)||x),L=void 0===l,T=dd(l)&&h>=l,I=L||dd(l)&&(!dd(h)||T),R=f!==o,D=v!==l;return(R||D)&&E&&I?(d=d.removeNumericRefinement(s),dd(o)&&(d=d.addNumericRefinement(s,">=",o)),dd(l)&&(d=d.addNumericRefinement(s,"<=",l)),d.resetPage()):null},g=function(e){return function(){1!==arguments.length||e.sendEventToInsights(arguments.length<=0?void 0:arguments[0])}};function p(e){var t,i;return t=dd(r)?r:dd(e.min)?e.min:0,i=dd(a)?a:dd(e.max)?e.max:0,ch({min:t,max:i,precision:c})}function f(e){var t=e.getNumericRefinement(s,">=")||[],i=th(t,1),n=i[0],o=e.getNumericRefinement(s,"<=")||[],r=th(o,1),a=r[0],l=dd(n)?n:-1/0,c=dd(a)?a:1/0;return[l,c]}function m(e,t){return function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[void 0,void 0],n=th(i,2),o=n[0],s=n[1],r=h(e,t,o,s);r&&e.setState(r).search()}}return{$$type:lh,init:function(t){e(Zu(Zu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(Zu(Zu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return Zu(Zu({},e),{},{range:Zu(Zu({},e.range),{},Xu({},s,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=e.results,o=e.helper,r=e.instantSearchInstance,a=n&&n.disjunctiveFacets||[],l=Et(a,(function(e){return e.name===s})),d=l&&l.stats||{min:void 0,max:void 0},h=p(d),_=f(o);return t=m(o,n?h:{min:void 0,max:void 0}),{refine:t,canRefine:h.min!==h.max,format:u,range:h,sendEvent:g(r),widgetParams:Zu(Zu({},i),{},{precision:c}),start:_}},dispose:function(e){var i=e.state;return t(),i.removeDisjunctiveFacet(s).removeNumericRefinement(s)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getNumericRefinements(s),o=n[">="],r=void 0===o?[]:o,a=n["<="],l=void 0===a?[]:a;return 0===r.length&&0===l.length?e:Zu(Zu({},e),{},{range:Zu(Zu({},e.range),{},Xu({},s,"".concat(r,":").concat(l)))})},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=e.addDisjunctiveFacet(s).setQueryParameters({numericRefinements:Zu(Zu({},e.numericRefinements),{},Xu({},s,{}))});dd(r)&&(n=n.addNumericRefinement(s,">=",r)),dd(a)&&(n=n.addNumericRefinement(s,"<=",a));var o=i.range&&i.range[s];if(!o||-1===o.indexOf(":"))return n;var l=o.split(":").map(parseFloat),c=th(l,2),d=c[0],u=c[1];return dd(d)&&(!dd(r)||r="),n=n.addNumericRefinement(s,">=",d)),dd(u)&&(!dd(a)||ue.length)&&(t=e.length);for(var i=0,n=new Array(t);i=").concat(a)]},attribute:o})}}else t.sendEventToInsights(s[0])}},Fh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Ah()),function(i){var n,o=i||{},s=o.attribute,r=o.max,a=void 0===r?5:r;if(!s)throw new Error(Ah("The `attribute` option is required."));var l=function(e){var t,i=e.getNumericRefinements(s);if(null!==(t=i[">="])&&void 0!==t&&t.length)return i[">="][0]},c=function(e){var t=0;return e.forEach((function(e){var i=e.name.split("."),n=Lh(i,2),o=n[1],s=void 0===o?"":o;t=Math.max(t,s.length)})),t};function d(e,t){var i=l(e)===Number(t),n=e.resetPage().removeNumericRefinement(s);return i?n:n.addNumericRefinement(s,"<=",a).addNumericRefinement(s,">=",Number(t))}var u=function(e,t){n("click:internal",t),e.setState(d(e.state,t)).search()},h={toggleRefinementFactory:function(e){return u.bind(null,e)},createURLFactory:function(e){var t=e.state,i=e.createURL,n=e.getWidgetUiState,o=e.helper;return function(e){return i((function(i){return n(i,{searchParameters:d(t,e),helper:o})}))}}};return{$$type:Oh,init:function(t){var i=t.instantSearchInstance;e(Sh(Sh({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(Sh(Sh({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},getRenderState:function(e,t){return Sh(Sh({},e),{},{ratingMenu:Sh(Sh({},e.ratingMenu),{},kh({},s,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.helper,o=e.results,r=e.state,d=e.instantSearchInstance,u=e.createURL,g=[];n||(n=Mh({instantSearchInstance:d,helper:t,getRefinedStar:function(){return l(t.state)},attribute:s}));var p=!1,f=0,m=null===o||void 0===o?void 0:o.getFacetValues(s,{});if(o&&m){m.length;for(var _=c(m),v=(Math.pow(10,_),l(r)),b=function(e){var t=v===e;p=p||t;var i=m.filter((function(t){return Number(t.name)>=e&&Number(t.name)<=a})).map((function(e){return e.count})).reduce((function(e,t){return e+t}),0);if(f+=i,v&&!t&&0===i)return"continue";var n=vh(new Array(Math.floor(a/Ph))).map((function(t,i){return i*Ph0,refine:h.toggleRefinementFactory(t),sendEvent:n,createURL:h.createURLFactory({state:r,createURL:u,helper:t,getWidgetUiState:this.getWidgetUiState}),widgetParams:i}},dispose:function(e){var i=e.state;return t(),i.removeNumericRefinement(s)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=l(i);return Bh(Sh(Sh({},e),{},{ratingMenu:Sh(Sh({},e.ratingMenu),{},kh({},s,"number"===typeof n?n:void 0))}),s)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.ratingMenu&&i.ratingMenu[s],o=e.addDisjunctiveFacet(s).removeNumericRefinement(s).removeDisjunctiveFacetRefinement(s);return n?o.addNumericRefinement(s,"<=",a).addNumericRefinement(s,">=",n):o.setQueryParameters({numericRefinements:Sh(Sh({},o.numericRefinements),{},kh({},s,{}))})}}}};function Bh(e,t){return e.ratingMenu?("number"!==typeof e.ratingMenu[t]&&delete e.ratingMenu[t],0===Object.keys(e.ratingMenu).length&&delete e.ratingMenu,e):e}const Wh=Fh,Hh={name:"AisRatingMenu",mixins:[s({name:"RatingMenu"}),m({connector:Wh},{$$widgetType:"ais.ratingMenu"}),qe()],props:{attribute:{type:String,required:!0},max:{type:Number,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,max:this.max}}}};var Vh={style:{display:"none"}},jh=[(0,l.Lk)("symbol",{id:"ais-RatingMenu-starSymbol",viewBox:"0 0 24 24"},[(0,l.Lk)("path",{d:"M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"})],-1),(0,l.Lk)("symbol",{id:"ais-RatingMenu-starEmptySymbol",viewBox:"0 0 24 24"},[(0,l.Lk)("path",{d:"M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"})],-1)],zh=["href","aria-label","onClick"],Uh=[(0,l.Lk)("use",{"xlink:href":"#ais-RatingMenu-starSymbol"},null,-1)],$h=[(0,l.Lk)("use",{"xlink:href":"#ais-RatingMenu-starEmptySymbol"},null,-1)];function qh(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{items:e.state.items,refine:e.state.refine,createURL:e.state.createURL,sendEvent:e.state.sendEvent,canRefine:e.state.canRefine},(function(){return[((0,l.uX)(),(0,l.CE)("svg",Vh,jh)),(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t,i){return(0,l.uX)(),(0,l.CE)("li",{key:i,class:(0,be.C4)([e.suit("item"),t.isRefined&&e.suit("item","selected")])},[(0,l.Lk)("div",null,[(0,l.Lk)("a",{href:e.state.createURL(t.value),"aria-label":t.value+" & up",class:(0,be.C4)(e.suit("link")),onClick:(0,Ge.D$)((function(i){return e.state.refine(t.value)}),["exact","left","prevent"])},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(t.stars,(function(t,i){return(0,l.uX)(),(0,l.CE)(l.FK,null,[t?((0,l.uX)(),(0,l.CE)("svg",{"aria-hidden":"true",width:"24",height:"24",class:(0,be.C4)([e.suit("starIcon"),e.suit("starIcon--full")]),key:i+"-full"},Uh,2)):((0,l.uX)(),(0,l.CE)("svg",{class:(0,be.C4)([e.suit("starIcon"),e.suit("starIcon--empty")]),"aria-hidden":"true",width:"24",height:"24",key:i+"-empty"},$h,2))],64)})),256)),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("label")),"aria-hidden":"true"},[(0,l.RG)(e.$slots,"andUp",{},(function(){return[(0,l.eW)("& Up")]}))],2),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("count"))},(0,be.v_)(t.count),3)],10,zh)])],2)})),128))],2)]}))],2)):(0,l.Q3)("",!0)}Hh.render=qh;const Kh=Hh;function Gh(e){return Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gh(e)}var Qh=["name","escapedValue"],Yh=["escapedValue","value"];function Zh(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Xh(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function ng(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}var og=(0,_.V)({name:"refinement-list",connector:!0}),sg=["isRefined","count:desc","name:asc"],rg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,og()),function(i){var n=i||{},o=n.attribute,s=n.operator,r=void 0===s?"or":s,a=n.limit,l=void 0===a?10:a,c=n.showMore,d=void 0!==c&&c,u=n.showMoreLimit,h=void 0===u?20:u,g=n.sortBy,p=void 0===g?sg:g,f=n.escapeFacetValues,m=void 0===f||f,_=n.transformItems,v=void 0===_?function(e){return e}:_;if(!o)throw new Error(og("The `attribute` option is required."));if(!/^(and|or)$/.test(r))throw new Error(og('The `operator` must one of: `"and"`, `"or"` (got "'.concat(r,'").')));if(!0===d&&h<=l)throw new Error(og("`showMoreLimit` should be greater than `limit`."));var b,y,w,C=function(e){var t=e.name,i=e.escapedValue,n=ig(e,Qh);return Xh(Xh({},n),{},{value:i,label:t,highlighted:t})},S=[],k=!0,x=!1,E=function(){};function L(){E()}function T(e,t){return function(){x=!x,t.render(e)}}function I(){return x?h:l}var R=function(){return function(){}},D=function(t,i){return function(n){return function(s){var r=n.instantSearchInstance,a=n.results;if(""===s&&S)e(Xh(Xh({},i.getWidgetRenderState(Xh(Xh({},n),{},{results:b}))),{},{instantSearchInstance:r}),!1);else{var l={highlightPreTag:m?H.highlightPreTag:V.highlightPreTag,highlightPostTag:m?H.highlightPostTag:V.highlightPostTag};t.searchForFacetValues(o,s,Math.min(I(),100),l).then((function(t){var o=m?$(t.facetHits):t.facetHits,s=v(o.map((function(e){var t=e.escapedValue,i=e.value,n=ig(e,Yh);return Xh(Xh({},n),{},{value:t,label:i})})),{results:a});e(Xh(Xh({},i.getWidgetRenderState(Xh(Xh({},n),{},{results:b}))),{},{items:s,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:r}),!1)}))}}}};return{$$type:"ais.refinementList",init:function(t){e(Xh(Xh({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(Xh(Xh({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return Xh(Xh({},e),{},{refinementList:Xh(Xh({},e.refinementList),{},Jh({},o,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,s=e.state,r=e.createURL,a=e.instantSearchInstance,c=e.helper,u=[],h=[];if(w&&y&&R||(w=Qn({instantSearchInstance:a,helper:c,attribute:o,widgetType:this.$$type}),y=function(e){w("click:internal",e),c.toggleFacetRefinement(o,e).search()},R=D(c,this)),n){var g=n.getFacetValues(o,{sortBy:p,facetOrdering:p===sg});h=g&&Array.isArray(g)?g:[],u=v(h.slice(0,I()).map(C),{results:n});var f=s.maxValuesPerFacet,m=I();k=f>m?h.length<=m:h.lengthl,A=d&&!k,O=N||A;return{createURL:function(e){return r((function(i){return t.getWidgetUiState(i,{searchParameters:s.resetPage().toggleFacetRefinement(o,e),helper:c})}))},items:u,refine:y,searchForItems:_,isFromSearch:!1,canRefine:u.length>0,widgetParams:i,isShowingMore:x,canToggleShowMore:O,toggleShowMore:L,sendEvent:w,hasExhaustiveItems:k}},dispose:function(e){var i=e.state;t();var n=i.setQueryParameter("maxValuesPerFacet",void 0);return"and"===r?n.removeFacet(o):n.removeDisjunctiveFacet(o)},getWidgetUiState:function(e,t){var i=t.searchParameters,n="or"===r?i.getDisjunctiveRefinements(o):i.getConjunctiveRefinements(o);return ag(Xh(Xh({},e),{},{refinementList:Xh(Xh({},e.refinementList),{},Jh({},o,n))}),o)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n="or"===r;if(e.isHierarchicalFacet(o))return e;if(n&&e.isConjunctiveFacet(o)||!n&&e.isDisjunctiveFacet(o))return e;var s=i.refinementList&&i.refinementList[o],a=n?e.addDisjunctiveFacet(o).removeDisjunctiveFacetRefinement(o):e.addFacet(o).removeFacetRefinement(o),c=a.maxValuesPerFacet||0,u=Math.max(c,d?h:l),g=a.setQueryParameter("maxValuesPerFacet",u);if(!s){var p=n?"disjunctiveFacetsRefinements":"facetsRefinements";return g.setQueryParameters(Jh({},p,Xh(Xh({},g[p]),{},Jh({},o,[]))))}return s.reduce((function(e,t){return n?e.addDisjunctiveFacetRefinement(o,t):e.addFacetRefinement(o,t)}),g)}}}};function ag(e,t){return e.refinementList?(e.refinementList[t]&&0!==e.refinementList[t].length||delete e.refinementList[t],0===Object.keys(e.refinementList).length&&delete e.refinementList,e):e}const lg=rg,cg={name:"SearchInput",mixins:[s({name:"SearchBox"})],props:{placeholder:{type:String,default:"Search here…"},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!1},shouldShowLoadingIndicator:{type:Boolean,default:!1},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Search"},resetTitle:{type:String,default:"Clear"},value:{type:String,required:!1,default:void 0},modelValue:{type:String,required:!1,default:void 0}},emits:["input","update:modelValue","blur","focus","reset"],data:function(){return{query:""}},methods:{isFocused:function(){return document.activeElement===this.$refs.input},onInput:function(e){this.ignoreCompositionEvents&&e.isComposing||(this.$emit("input",e.target.value),this.$emit("update:modelValue",e.target.value))},onFormSubmit:function(){this.$refs.input.blur()},onFormReset:function(){this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("reset")}}};var dg=["placeholder","autofocus","value"],ug=["title","hidden"],hg=[(0,l.Lk)("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"},null,-1)],gg=["title","hidden"],pg=[(0,l.Lk)("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"},null,-1)],fg=["hidden"],mg=["aria-hidden"],_g=[(0,l.Fv)('',1)];function vg(e,t,i,n,o,s){return(0,l.uX)(),(0,l.CE)("form",{action:"",role:"search",novalidate:"",class:(0,be.C4)(e.suit("form")),onSubmit:t[4]||(t[4]=(0,Ge.D$)((function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s.onFormSubmit&&s.onFormSubmit.apply(s,e)}),["prevent"])),onReset:t[5]||(t[5]=(0,Ge.D$)((function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s.onFormReset&&s.onFormReset.apply(s,e)}),["prevent"]))},[(0,l.Lk)("input",{type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",maxlength:"512","aria-label":"Search",placeholder:i.placeholder,autofocus:i.autofocus,class:(0,be.C4)(e.suit("input")),value:i.value||i.modelValue,onFocus:t[0]||(t[0]=function(t){return e.$emit("focus",t)}),onBlur:t[1]||(t[1]=function(t){return e.$emit("blur",t)}),onInput:t[2]||(t[2]=function(e){return s.onInput(e)}),onCompositionend:t[3]||(t[3]=function(e){return s.onInput(e)}),ref:"input"},null,42,dg),(0,l.Lk)("button",{type:"submit",title:i.submitTitle,class:(0,be.C4)(e.suit("submit")),hidden:i.showLoadingIndicator&&i.shouldShowLoadingIndicator},[(0,l.RG)(e.$slots,"submit-icon",{},(function(){return[((0,l.uX)(),(0,l.CE)("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 40 40",class:(0,be.C4)(e.suit("submitIcon"))},hg,2))]}))],10,ug),(0,l.Lk)("button",{type:"reset",title:i.resetTitle,class:(0,be.C4)(e.suit("reset")),hidden:!i.value&&!i.modelValue||i.showLoadingIndicator&&i.shouldShowLoadingIndicator},[(0,l.RG)(e.$slots,"reset-icon",{},(function(){return[((0,l.uX)(),(0,l.CE)("svg",{"aria-hidden":"true",height:"10",viewBox:"0 0 20 20",class:(0,be.C4)(e.suit("resetIcon")),width:"10"},pg,2))]}))],10,gg),i.showLoadingIndicator?((0,l.uX)(),(0,l.CE)("span",{key:0,hidden:!i.shouldShowLoadingIndicator,class:(0,be.C4)(e.suit("loadingIndicator"))},[(0,l.RG)(e.$slots,"loading-indicator",{},(function(){return[((0,l.uX)(),(0,l.CE)("svg",{"aria-hidden":!i.shouldShowLoadingIndicator,"aria-label":"Results are loading",width:"16",height:"16",stroke:"#444",viewBox:"0 0 38 38",class:(0,be.C4)(e.suit("loadingIcon"))},_g,10,mg))]}))],10,fg)):(0,l.Q3)("",!0)],34)}cg.render=vg;const bg=cg;var yg=function(){};const wg={name:"AisRefinementList",components:{SearchInput:bg,AisHighlight:Bo},mixins:[s({name:"RefinementList"}),m({connector:lg},{$$widgetType:"ais.refinementList"}),qe()],props:{attribute:{type:String,required:!0},searchable:{type:Boolean,default:void 0},searchablePlaceholder:{type:String,required:!1,default:"Search here…"},operator:{default:"or",validator:function(e){return"and"===e||"or"===e},required:!1},limit:{type:Number,required:!1,default:void 0},showMoreLimit:{type:Number,required:!1,default:void 0},showMore:{type:Boolean,required:!1,default:!1},sortBy:{type:[Array,Function],required:!1,default:void 0},transformItems:{type:Function,required:!1,default:void 0}},data:function(){return{searchForFacetValuesQuery:""}},computed:{searchForFacetValues:{get:function(){return this.searchForFacetValuesQuery},set:function(e){this.state.searchForItems(e),this.searchForFacetValuesQuery=e}},toggleShowMore:function(){return this.state.toggleShowMore||yg},items:function(){return this.state.items.map((function(e){return Object.assign({},e,{_highlightResult:{item:{value:e.highlighted}}})}))},widgetParams:function(){return{attribute:this.attribute,operator:this.operator,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,escapeFacetValues:!0,transformItems:this.transformItems}}},methods:{refine:function(e){this.state.refine(e),this.searchForFacetValuesQuery=""}}};var Cg=["value","checked","onChange"],Sg=["disabled"];function kg(e,t,i,n,o,s){var r=(0,l.g2)("search-input"),a=(0,l.g2)("ais-highlight");return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),0===s.items.length&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:s.items,refine:s.refine,searchForItems:e.state.searchForItems,searchForItemsQuery:o.searchForFacetValuesQuery,toggleShowMore:s.toggleShowMore,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,createURL:e.state.createURL,isFromSearch:e.state.isFromSearch,canRefine:e.state.canRefine,sendEvent:e.state.sendEvent},(function(){var n;return[i.searchable?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit("searchBox"))},[(0,l.bF)(r,{modelValue:s.searchForFacetValues,"onUpdate:modelValue":t[0]||(t[0]=function(e){return s.searchForFacetValues=e}),"show-loading-indicator":!0,placeholder:i.searchablePlaceholder,"class-names":e.classNames},null,8,["modelValue","placeholder","class-names"])],2)):(0,l.Q3)("",!0),e.state.isFromSearch&&0===s.items.length?(0,l.RG)(e.$slots,"noResults",{key:1,query:s.searchForFacetValues},(function(){return[(0,l.Lk)("div",{class:(0,be.C4)(e.suit("noResults"))},"No results.",2)]})):(0,l.Q3)("",!0),s.items.length>0?((0,l.uX)(),(0,l.CE)("ul",{key:2,class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(s.items,(function(t){return(0,l.uX)(),(0,l.CE)("li",{class:(0,be.C4)([e.suit("item"),t.isRefined&&e.suit("item","selected")]),key:t.value},[(0,l.RG)(e.$slots,"item",{item:t,refine:s.refine,createURL:e.state.createURL},(function(){return[(0,l.Lk)("label",{class:(0,be.C4)(e.suit("label"))},[(0,l.Lk)("input",{class:(0,be.C4)(e.suit("checkbox")),type:"checkbox",value:t.value,checked:t.isRefined,onChange:function(e){return s.refine(t.value)}},null,42,Cg),i.searchable?((0,l.uX)(),(0,l.CE)("span",{key:0,class:(0,be.C4)(e.suit("labelText"))},[(0,l.bF)(a,{attribute:"item",hit:t},null,8,["hit"])],2)):((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("labelText"))},(0,be.v_)(t.label),3)),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("count"))},(0,be.v_)(t.count),3)],2)]}))],2)})),128))],2)):(0,l.Q3)("",!0),i.showMore?((0,l.uX)(),(0,l.CE)("button",{key:3,class:(0,be.C4)([e.suit("showMore"),(n={},n[e.suit("showMore","disabled")]=!e.state.canToggleShowMore,n)]),onClick:t[1]||(t[1]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s.toggleShowMore&&s.toggleShowMore.apply(s,e)}),disabled:!e.state.canToggleShowMore},[(0,l.RG)(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},(function(){return[(0,l.eW)(" Show "+(0,be.v_)(e.state.isShowingMore?"less":"more"),1)]}))],10,Sg)):(0,l.Q3)("",!0)]}))],2)):(0,l.Q3)("",!0)}wg.render=kg;const xg=wg;var Eg;const Lg=((Eg={name:"AisStateResults",mixins:[m({connector:!0}),s({name:"StateResults"})],props:{catchError:{type:Boolean,default:!1}},data:function(){var e=this;return{renderFn:function(){var t=e.instantSearchInstance,i=t.status,n=t.error,o=e.getParentIndex().getResults(),s=e.getParentIndex().getHelper(),r=s?s.state:null;e.state={results:o,state:r,status:i,error:n}}}},created:function(){this.instantSearchInstance.addListener("render",this.renderFn),this.renderFn()}}).beforeUnmount=function(){this.widget&&(this.instantSearchInstance.removeListener("render",this.renderFn),this.errorFn&&this.instantSearchInstance.removeListener("error",this.errorFn))},Eg.watch={catchError:{immediate:!0,handler:function(e){e?(this.errorFn=function(){},this.instantSearchInstance.addListener("error",this.errorFn)):this.errorFn&&(this.instantSearchInstance.removeListener("error",this.errorFn),this.errorFn=void 0)}}},Eg.computed={stateResults:function(){var e=this.state,t=e.results,i=e.state,n=e.status,o=e.error;return r({},t,{results:t,state:i,status:n,error:o})}},Eg);var Tg=(0,l.Lk)("p",null," Use this component to have a different layout based on a certain state. ",-1),Ig=(0,l.Lk)("p",null,"Fill in the slot, and get access to the following things:",-1);function Rg(e,t,i,n,o,s){return e.state&&e.state.state&&e.state.results?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",(0,be._B)((0,l.Ng)(s.stateResults)),(function(){return[Tg,Ig,(0,l.Lk)("pre",null,"results: "+(0,be.v_)(Object.keys(e.state.results)),1),(0,l.Lk)("pre",null,"state: "+(0,be.v_)(Object.keys(e.state.state)),1),(0,l.Lk)("pre",null,"status: "+(0,be.v_)(e.state.status),1),(0,l.Lk)("pre",null,"error: "+(0,be.v_)(e.state.error),1)]}))],2)):(0,l.Q3)("",!0)}Lg.render=Rg;const Dg=Lg;var Ng=i(88941);const Ag={name:"AisSearchBox",mixins:[m({connector:Ng.A},{$$widgetType:"ais.searchBox"}),s({name:"SearchBox"})],components:{SearchInput:bg},props:{placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!0},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Submit the search query"},resetTitle:{type:String,default:"Clear the search query"},value:{type:String,default:void 0},modelValue:{type:String,default:void 0},queryHook:{type:Function,default:void 0}},data:function(){return{localValue:"",isVue2:c,isVue3:d}},computed:{widgetParams:function(){return{queryHook:this.queryHook}},isControlled:function(){return void 0!==this.value||void 0!==this.modelValue},model:function(){return this.value||this.modelValue},currentRefinement:{get:function(){this.isControlled&&this.model!==this.localValue&&(this.localValue=this.model,this.$emit("input",this.model),this.$emit("update:modelValue",this.model),this.state.refine(this.model));var e=this.$refs.searchInput;return e&&e.isFocused()?this.localValue:this.model||this.state.query||""},set:function(e){this.localValue=e,this.state.refine(e),this.isControlled&&(this.$emit("input",e),this.$emit("update:modelValue",e))}}}};function Og(e,t,i,n,o,s){var r=(0,l.g2)("search-input");return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{currentRefinement:s.currentRefinement,isSearchStalled:e.state.isSearchStalled,refine:e.state.refine},(function(){return[(0,l.bF)(r,{onFocus:t[0]||(t[0]=function(t){return e.$emit("focus",t)}),onBlur:t[1]||(t[1]=function(t){return e.$emit("blur",t)}),onReset:t[2]||(t[2]=function(t){return e.$emit("reset")}),placeholder:i.placeholder,autofocus:i.autofocus,"show-loading-indicator":i.showLoadingIndicator,"should-show-loading-indicator":e.state.isSearchStalled,"ignore-composition-events":i.ignoreCompositionEvents,"submit-title":i.submitTitle,"reset-title":i.resetTitle,"class-names":e.classNames,modelValue:s.currentRefinement,"onUpdate:modelValue":t[3]||(t[3]=function(e){return s.currentRefinement=e}),ref:"searchInput"},(0,l.eX)({default:(0,l.k6)((function(){return[o.isVue2?(0,l.RG)(e.$slots,"loading-indicator",{key:0,slot:"loading-indicator"}):(0,l.Q3)("",!0),o.isVue2?(0,l.RG)(e.$slots,"submit-icon",{key:1,slot:"submit-icon"}):(0,l.Q3)("",!0),o.isVue2?(0,l.RG)(e.$slots,"reset-icon",{key:2,slot:"reset-icon"}):(0,l.Q3)("",!0)]})),_:2},[o.isVue3?{name:"loading-indicator",fn:(0,l.k6)((function(){return[(0,l.RG)(e.$slots,"loading-indicator")]})),key:"0"}:void 0,o.isVue3?{name:"submit-icon",fn:(0,l.k6)((function(){return[(0,l.RG)(e.$slots,"submit-icon")]})),key:"1"}:void 0,o.isVue3?{name:"reset-icon",fn:(0,l.k6)((function(){return[(0,l.RG)(e.$slots,"reset-icon")]})),key:"2"}:void 0]),1032,["placeholder","autofocus","show-loading-indicator","should-show-loading-indicator","ignore-composition-events","submit-title","reset-title","class-names","modelValue"])]}))],2)):(0,l.Q3)("",!0)}Ag.render=Og;const Pg=Ag,Mg={name:"AisSnippet",mixins:[s({name:"Snippet"})],components:{AisHighlighter:Po},props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"}}};function Fg(e,t,i,n,o,s){var r=(0,l.g2)("ais-highlighter");return(0,l.uX)(),(0,l.Wv)(r,{hit:i.hit,attribute:i.attribute,"highlighted-tag-name":i.highlightedTagName,suit:e.suit,"highlight-property":"_snippetResult","pre-tag":"","post-tag":""},null,8,["hit","attribute","highlighted-tag-name","suit"])}Mg.render=Fg;const Bg=Mg;function Wg(e){return Wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wg(e)}function Hg(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Vg(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;(0,b.t)(e,$g());var i={};return function(n){var o=n||{},s=o.items,r=o.transformItems,a=void 0===r?function(e){return e}:r;if(!Array.isArray(s))throw new Error($g("The `items` option expects an array of objects."));return{$$type:"ais.sortBy",init:function(t){var i=t.instantSearchInstance,n=this.getWidgetRenderState(t),o=n.currentRefinement;Et(s,(function(e){return e.value===o}));e(Vg(Vg({},n),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(Vg(Vg({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var n=e.state;return t(),i.initialIndex?n.setIndex(i.initialIndex):n},getRenderState:function(e,t){return Vg(Vg({},e),{},{sortBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,o=e.helper,r=e.state,l=e.parent;!i.initialIndex&&l&&(i.initialIndex=l.getIndexName()),i.setIndex||(i.setIndex=function(e){o.setIndex(e).search()});var c=!t||0===t.nbHits;return{currentRefinement:r.index,options:a(s,{results:t}),refine:i.setIndex,hasNoResults:c,canRefine:!c&&s.length>0,widgetParams:n}},getWidgetUiState:function(e,t){var n=t.searchParameters,o=n.index;return Vg(Vg({},e),{},{sortBy:o!==i.initialIndex?o:void 0})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return e.setQueryParameter("index",n.sortBy||i.initialIndex||e.index)}}}};const Kg=qg,Gg={name:"AisSortBy",mixins:[s({name:"SortBy"}),m({connector:Kg},{$$widgetType:"ais.sortBy"}),qe()],props:{items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{items:this.items,transformItems:this.transformItems}}}};var Qg=["value","selected"];function Yg(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{items:e.state.options,hasNoResults:e.state.hasNoResults,refine:e.state.refine,currentRefinement:e.state.currentRefinement,canRefine:e.state.canRefine},(function(){return[(0,l.Lk)("select",{class:(0,be.C4)(e.suit("select")),onChange:t[0]||(t[0]=function(t){return e.state.refine(t.currentTarget.value)}),"aria-label":"Sort results by"},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.options,(function(t){return(0,l.uX)(),(0,l.CE)("option",{key:t.value,class:(0,be.C4)(e.suit("option")),value:t.value,selected:t.value===e.state.currentRefinement},(0,be.v_)(t.label),11,Qg)})),128))],34)]}))],2)):(0,l.Q3)("",!0)}Gg.render=Yg;const Zg=Gg;function Xg(e){return Xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xg(e)}function Jg(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ep(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,op()),function(i){return{$$type:"ais.stats",init:function(t){var i=t.instantSearchInstance;e(ep(ep({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(ep(ep({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(){t()},getRenderState:function(e,t){return ep(ep({},e),{},{stats:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.state;return t?{hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbSortedHits:t.nbSortedHits,areHitsSorted:"undefined"!==typeof t.appliedRelevancyStrictness&&t.appliedRelevancyStrictness>0&&t.nbSortedHits!==t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,widgetParams:i}:{hitsPerPage:n.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:n.page||0,processingTimeMS:-1,query:n.query||"",widgetParams:i}}}}};const rp=sp,ap={name:"AisStats",mixins:[m({connector:rp},{$$widgetType:"ais.stats"}),s({name:"Stats"})],computed:{sortedResultsSentence:function(){var e=this.state,t=e.nbHits,i=e.nbSortedHits,n="sorted out of "+t.toLocaleString();return 0===i?"No relevant results "+n:1===i?"1 relevant result "+n:i>1?(i||0).toLocaleString()+" relevant results "+n:""},resultsSentence:function(){var e=this.state.nbHits;return 0===e?"No results":1===e?"1 result":e>1?e.toLocaleString()+" results":""},widgetParams:function(){return{}}}};function lp(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",(0,l.v6)(e.state,{results:e.state.instantSearchInstance.helper.lastResults}),(function(){return[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("text"))},[e.state.areHitsSorted?((0,l.uX)(),(0,l.CE)(l.FK,{key:0},[(0,l.eW)((0,be.v_)(s.sortedResultsSentence),1)],64)):((0,l.uX)(),(0,l.CE)(l.FK,{key:1},[(0,l.eW)((0,be.v_)(s.resultsSentence),1)],64)),(0,l.eW)(" found in "+(0,be.v_)(e.state.processingTimeMS.toLocaleString())+"ms",1)],2)]}))],2)):(0,l.Q3)("",!0)}ap.render=lp;const cp=ap;function dp(e){return Array.isArray(e)?e:[e]}function up(e){return up="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},up(e)}function hp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function gp(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Sp()),function(i){var n=i||{},o=n.attribute,s=n.on,r=void 0===s||s,a=n.off;if(!o)throw new Error(Sp("The `attribute` option is required."));var l,c=void 0!==a,d=dp(r).map(xt),u=c?dp(a).map(xt):void 0,h=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isRefined:!1},i=t.isRefined;i?(d.forEach((function(t){return e.removeDisjunctiveFacetRefinement(o,t)})),c&&u.forEach((function(t){return e.addDisjunctiveFacetRefinement(o,t)}))):(l("click:internal",i),c&&u.forEach((function(t){return e.removeDisjunctiveFacetRefinement(o,t)})),d.forEach((function(t){return e.addDisjunctiveFacetRefinement(o,t)}))),e.search()}},g={createURLFactory:function(e,t){var i=t.state,n=t.createURL,s=t.getWidgetUiState,r=t.helper;return function(){i=i.resetPage();var t=e?d:u;t&&t.forEach((function(e){i=i.removeDisjunctiveFacetRefinement(o,e)}));var a=e?u:d;return a&&a.forEach((function(e){i=i.addDisjunctiveFacetRefinement(o,e)})),n((function(e){return s(e,{searchParameters:i,helper:r})}))}}};return{$$type:kp,init:function(t){var i=t.instantSearchInstance;e(gp(gp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(gp(gp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.removeDisjunctiveFacet(o)},getRenderState:function(e,t){return gp(gp({},e),{},{toggleRefinement:gp(gp({},e.toggleRefinement),{},pp({},o,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.state,n=e.helper,s=e.results,r=e.createURL,a=e.instantSearchInstance,p=d.every((function(e){return t.isDisjunctiveFacetRefined(o,e)})),f={isRefined:p,count:0},m={isRefined:c&&!p,count:0};if(s){var _=dp(u||!1),v=s.getFacetValues(o,{})||[],b=d.map((function(e){return Et(v,(function(t){var i=t.escapedValue;return i===xt(String(e))}))})).filter((function(e){return void 0!==e})),y=c?_.map((function(e){return Et(v,(function(t){var i=t.escapedValue;return i===xt(String(e))}))})).filter((function(e){return void 0!==e})):[];f={isRefined:!!b.length&&b.every((function(e){return e.isRefined})),count:b.reduce((function(e,t){return e+t.count}),0)||null},m={isRefined:!!y.length&&y.every((function(e){return e.isRefined})),count:y.reduce((function(e,t){return e+t.count}),0)||v.reduce((function(e,t){var i=t.count;return e+i}),0)}}l||(l=xp({instantSearchInstance:a,attribute:o,on:d,helper:n}));var w=p?m:f;return{value:{name:o,isRefined:p,count:s?w.count:null,onFacetValue:f,offFacetValue:m},createURL:g.createURLFactory(p,{state:t,createURL:r,helper:n,getWidgetUiState:this.getWidgetUiState}),sendEvent:l,canRefine:Boolean(s?w.count:null),refine:h(n),widgetParams:i}},getWidgetUiState:function(e,t){var i,n=t.searchParameters,s=d&&d.every((function(e){return n.isDisjunctiveFacetRefined(o,e)}));return s?gp(gp({},e),{},{toggle:gp(gp({},e.toggle),{},pp({},o,s))}):(null===(i=e.toggle)||void 0===i||delete i[o],e)},getWidgetSearchParameters:function(e,t){var i=t.uiState;if(e.isHierarchicalFacet(o)||e.isConjunctiveFacet(o))return e;var n=e.addDisjunctiveFacet(o).removeDisjunctiveFacetRefinement(o),s=Boolean(i.toggle&&i.toggle[o]);return s?(d&&d.forEach((function(e){n=n.addDisjunctiveFacetRefinement(o,e)})),n):c?(u&&u.forEach((function(e){n=n.addDisjunctiveFacetRefinement(o,e)})),n):n.setQueryParameters({disjunctiveFacetsRefinements:gp(gp({},e.disjunctiveFacetsRefinements),{},pp({},o,[]))})}}}};const Lp=Ep,Tp={name:"AisToggleRefinement",mixins:[s({name:"ToggleRefinement"}),m({connector:Lp},{$$widgetType:"ais.toggleRefinement"}),qe()],props:{attribute:{type:String,required:!0},on:{type:[String,Number,Boolean,Array],required:!1,default:!0},off:{type:[String,Number,Boolean,Array],required:!1,default:void 0},label:{type:String,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,on:this.on,off:this.off}}}};var Ip=["name","value","checked"];function Rp(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{value:e.state.value,canRefine:e.state.canRefine,refine:e.state.refine,createURL:e.state.createURL,sendEvent:e.state.sendEvent},(function(){return[(0,l.Lk)("label",{class:(0,be.C4)(e.suit("label"))},[(0,l.Lk)("input",{class:(0,be.C4)(e.suit("checkbox")),type:"checkbox",name:e.state.value.name,value:i.on,checked:e.state.value.isRefined,onChange:t[0]||(t[0]=function(t){return e.state.refine(e.state.value)})},null,42,Ip),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("labelText"))},(0,be.v_)(i.label||e.state.value.name),3),null!==e.state.value.count?((0,l.uX)(),(0,l.CE)("span",{key:0,class:(0,be.C4)(e.suit("count"))},(0,be.v_)(e.state.value.count.toLocaleString()),3)):(0,l.Q3)("",!0)],2)]}))],2)):(0,l.Q3)("",!0)}Tp.render=Rp;const Dp=Tp;function Np(e){return Np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Np(e)}function Ap(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Op(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};l=Op(Op({},l),e),s()},h=function(){return l},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";u(a(e))},p=function(){u({status:"waiting"})},f=function(e){u({status:"error",errorCode:e.error})},m=function(e){u({status:"recognizing",transcript:e.results[0]&&e.results[0][0]&&e.results[0][0].transcript||"",isSpeechFinal:e.results[0]&&e.results[0].isFinal}),i&&l.transcript&&o(l.transcript)},_=function(){l.errorCode||!l.transcript||i||o(l.transcript),"error"!==l.status&&u({status:"finished"})},v=function(){t=new r,t&&(g("askingPermission"),t.interimResults=!0,n&&(t.lang=n),t.addEventListener("start",p),t.addEventListener("error",f),t.addEventListener("result",m),t.addEventListener("end",_),t.start())},b=function(){t&&(t.stop(),t.removeEventListener("start",p),t.removeEventListener("error",f),t.removeEventListener("result",m),t.removeEventListener("end",_),t=void 0)},y=function(){b(),g("finished")};return{getState:h,isBrowserSupported:c,isListening:d,startListening:v,stopListening:y,dispose:b}};const Wp=Bp;function Hp(e){return Hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hp(e)}function Vp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function jp(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,qp()),function(i){var n=i.searchAsYouSpeak,o=void 0!==n&&n,s=i.language,r=i.additionalQueryParameters,a=i.createVoiceSearchHelper,l=void 0===a?Wp:a;return{$$type:"ais.voiceSearch",init:function(t){var i=t.instantSearchInstance;e(jp(jp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(jp(jp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},getRenderState:function(e,t){return jp(jp({},e),{},{voiceSearch:this.getWidgetRenderState(t)})},getWidgetRenderState:function(t){var n=this,a=t.helper,c=t.instantSearchInstance;this._refine||(this._refine=function(e){if(e!==a.state.query){var t=s?[s.split("-")[0]]:void 0;a.setQueryParameter("queryLanguages",t),"function"===typeof r&&a.setState(a.state.setQueryParameters(jp({ignorePlurals:!0,removeStopWords:!0,optionalWords:e},r({query:e})))),a.setQuery(e).search()}}),this._voiceSearchHelper||(this._voiceSearchHelper=l({searchAsYouSpeak:o,language:s,onQueryChange:function(e){return n._refine(e)},onStateChange:function(){e(jp(jp({},n.getWidgetRenderState(t)),{},{instantSearchInstance:c}),!1)}}));var d=this._voiceSearchHelper,u=d.isBrowserSupported,h=d.isListening,g=d.startListening,p=d.stopListening,f=d.getState;return{isBrowserSupported:u(),isListening:h(),toggleListening:function(){u()&&(h()?p():g())},voiceListeningState:f(),widgetParams:i}},dispose:function(e){var i=e.state;this._voiceSearchHelper.dispose(),t();var n=i;if("function"===typeof r){var o=r({query:""}),s=o?Object.keys(o).reduce((function(e,t){return e[t]=void 0,e}),{}):{};n=i.setQueryParameters(jp({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},s))}return n.setQueryParameter("query",void 0)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.query||"";return n?jp(jp({},e),{},{query:n}):e},getWidgetSearchParameters:function(e,t){var i=t.uiState;return e.setQueryParameter("query",i.query||"")}}}};const Gp=Kp,Qp={name:"AisVoiceSearch",mixins:[m({connector:Gp},{$$widgetType:"ais.voiceSearch"}),s({name:"VoiceSearch"})],props:{searchAsYouSpeak:{type:Boolean,required:!1,default:void 0},language:{type:String,default:void 0},additionalQueryParameters:{type:Object,default:void 0},buttonTitle:{type:String,required:!1,default:"Search by voice"},disabledButtonTitle:{type:String,required:!1,default:"Search by voice (not supported on this browser)"}},data:function(){return{buttonSvgAttrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}}},computed:{widgetParams:function(){return{searchAsYouSpeak:this.searchAsYouSpeak,language:this.language,additionalQueryParameters:this.additionalQueryParameters}},errorNotAllowed:function(){return"error"===this.state.voiceListeningState.status&&"not-allowed"===this.state.voiceListeningState.errorCode},rootSlotProps:function(){return{isBrowserSupported:this.state.isBrowserSupported,isListening:this.state.isListening,toggleListening:this.state.toggleListening,voiceListeningState:this.state.voiceListeningState}},innerSlotProps:function(){return{status:this.state.voiceListeningState.status,errorCode:this.state.voiceListeningState.errorCode,isListening:this.state.isListening,transcript:this.state.voiceListeningState.transcript,isSpeechFinal:this.state.voiceListeningState.isSpeechFinal,isBrowserSupported:this.state.isBrowserSupported}}},methods:{handleClick:function(e){e.currentTarget.blur(),this.state.toggleListening()}}};var Yp=["title","disabled"],Zp=[(0,l.Fv)('',5)],Xp=["fill"],Jp=(0,l.Lk)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),ef=(0,l.Lk)("line",{x1:"12",y1:"19",x2:"12",y2:"23"},null,-1),tf=(0,l.Lk)("line",{x1:"8",y1:"23",x2:"16",y2:"23"},null,-1);function nf(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",(0,be._B)((0,l.Ng)(s.rootSlotProps)),(function(){return[(0,l.Lk)("button",{type:"button",class:(0,be.C4)(e.suit("button")),title:e.state.isBrowserSupported?i.buttonTitle:i.disabledButtonTitle,disabled:!e.state.isBrowserSupported,onClick:t[0]||(t[0]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s.handleClick&&s.handleClick.apply(s,e)})},[(0,l.RG)(e.$slots,"buttonText",(0,be._B)((0,l.Ng)(s.innerSlotProps)),(function(){return[s.errorNotAllowed?((0,l.uX)(),(0,l.CE)("svg",(0,be._B)((0,l.v6)({key:0},o.buttonSvgAttrs)),Zp,16)):((0,l.uX)(),(0,l.CE)("svg",(0,be._B)((0,l.v6)({key:1},o.buttonSvgAttrs)),[(0,l.Lk)("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",fill:e.state.isListening?"currentColor":"none"},null,8,Xp),Jp,ef,tf],16))]}))],10,Yp),(0,l.Lk)("div",{class:(0,be.C4)(e.suit("status"))},[(0,l.RG)(e.$slots,"status",(0,be._B)((0,l.Ng)(s.innerSlotProps)),(function(){return[(0,l.Lk)("p",null,(0,be.v_)(e.state.voiceListeningState.transcript),1)]}))],2)]}))],2)):(0,l.Q3)("",!0)}Qp.render=nf;const of=Qp;function sf(e){return sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sf(e)}function rf(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function af(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:v.l,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return function(i){var n={};return{$$type:"ais.relevantSort",init:function(t){var i=t.instantSearchInstance;e(af(af({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(af(af({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(e,t){return af(af({},e),{},{relevantSort:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,o=e.helper;n.refine||(n.refine=function(e){o.setQueryParameter("relevancyStrictness",e).search()});var s=t||{},r=s.appliedRelevancyStrictness,a=void 0!==r;return{isRelevantSorted:"undefined"!==typeof r&&r>0,isVirtualReplica:a,canRefine:a,refine:n.refine,widgetParams:i}},getWidgetSearchParameters:function(e,t){var i,n=t.uiState;return e.setQueryParameter("relevancyStrictness",null!==(i=n.relevantSort)&&void 0!==i?i:e.relevancyStrictness)},getWidgetUiState:function(e,t){var i=t.searchParameters;return af(af({},e),{},{relevantSort:i.relevancyStrictness||e.relevantSort})}}}};const hf=uf,gf={name:"AisRelevantSort",mixins:[s({name:"RelevantSort"}),m({connector:hf},{$$widgetType:"ais.relevantSort"})],methods:{refine:function(){this.state.isRelevantSorted?this.state.refine(0):this.state.refine(void 0)}}};function pf(e,t,i,n,o,s){return e.state&&e.state.isVirtualReplica?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{isRelevantSorted:e.state.isRelevantSorted,refine:e.state.refine},(function(){return[(0,l.Lk)("div",{class:(0,be.C4)(e.suit("text"))},[(0,l.RG)(e.$slots,"text",{isRelevantSorted:e.state.isRelevantSorted})],2),(0,l.Lk)("button",{type:"button",class:(0,be.C4)(e.suit("button")),onClick:t[0]||(t[0]=function(e){return s.refine()})},[(0,l.RG)(e.$slots,"button",{isRelevantSorted:e.state.isRelevantSorted},(function(){return[(0,l.eW)((0,be.v_)(e.state.isRelevantSorted?"See all results":"See relevant results"),1)]}))],2)]}))],2)):(0,l.Q3)("",!0)}gf.render=pf;const ff=gf,mf={name:"AisDynamicWidgets",mixins:[m({connector:an},{$$widgetType:"ais.dynamicWidgets"}),s({name:"DynamicWidgets"})],props:{transformItems:{type:Function,default:void 0},facets:{type:Array,default:void 0},maxValuesPerFacet:{type:Number,default:void 0}},render:u((function(e){var t=this,i=new Map;if((h(this)||[]).forEach((function(n){var o=function e(t){var i,n=t.props;if(n){if(n.attribute)return n.attribute;if(Array.isArray(n.attributes))return n.attributes[0]}if(i=t.children&&t.children.default&&t.children.default(),Array.isArray(i))return i.reduce((function(t,i){return t||e(i)}),void 0)}(n);o&&i.set(o,e("div",{key:o,class:[t.suit("widget")]},[n]))})),!this.state){var n=[];return i.forEach((function(e){return n.push(e)})),e("div",r({class:[this.suit()]},{attrs:{hidden:!0}}),n)}return e("div",{class:[this.suit()]},this.state.attributesToRender.map((function(e){return i.get(e)})))})),computed:{widgetParams:function(){return{transformItems:this.transformItems,facets:this.facets,maxValuesPerFacet:this.maxValuesPerFacet,widgets:[]}}}},_f=Object.assign({},mf,{name:"AisExperimentalDynamicWidgets",mounted:function(){f("Use AisDynamicWidgets instead of AisExperimentalDynamicWidgets.")}});var vf={install:function(e){Object.keys(n).forEach((function(t){e.component(n[t].name,n[t])}))}};const bf=vf}}]); \ No newline at end of file +const s="undefined"!==typeof document;function r(e){return"object"===typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}function a(e){return e.__esModule||"Module"===e[Symbol.toStringTag]||e.default&&r(e.default)}const l=Object.assign;function c(e,t){const i={};for(const n in t){const o=t[n];i[n]=u(o)?o.map(e):e(o)}return i}const d=()=>{},u=Array.isArray;const h=/#/g,g=/&/g,p=/\//g,f=/=/g,m=/\?/g,_=/\+/g,v=/%5B/g,b=/%5D/g,y=/%5E/g,w=/%60/g,C=/%7B/g,S=/%7C/g,k=/%7D/g,x=/%20/g;function E(e){return encodeURI(""+e).replace(S,"|").replace(v,"[").replace(b,"]")}function L(e){return E(e).replace(C,"{").replace(k,"}").replace(y,"^")}function T(e){return E(e).replace(_,"%2B").replace(x,"+").replace(h,"%23").replace(g,"%26").replace(w,"`").replace(C,"{").replace(k,"}").replace(y,"^")}function I(e){return T(e).replace(f,"%3D")}function D(e){return E(e).replace(h,"%23").replace(m,"%3F")}function R(e){return null==e?"":D(e).replace(p,"%2F")}function N(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}const A=/\/$/,O=e=>e.replace(A,"");function P(e,t,i="/"){let n,o={},s="",r="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(n=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),o=e(s)),a>-1&&(n=n||t.slice(0,a),r=t.slice(a,t.length)),n=z(null!=n?n:t,i),{fullPath:n+(s&&"?")+s+r,path:n,query:o,hash:N(r)}}function M(e,t){const i=t.query?e(t.query):"";return t.path+(i&&"?")+i+(t.hash||"")}function F(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function B(e,t,i){const n=t.matched.length-1,o=i.matched.length-1;return n>-1&&n===o&&W(t.matched[n],i.matched[o])&&H(t.params,i.params)&&e(t.query)===e(i.query)&&t.hash===i.hash}function W(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function H(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!V(e[i],t[i]))return!1;return!0}function V(e,t){return u(e)?j(e,t):u(t)?j(t,e):e===t}function j(e,t){return u(t)?e.length===t.length&&e.every(((e,i)=>e===t[i])):1===e.length&&e[0]===t}function z(e,t){if(e.startsWith("/"))return e;if(!e)return t;const i=t.split("/"),n=e.split("/"),o=n[n.length-1];".."!==o&&"."!==o||n.push("");let s,r,a=i.length-1;for(s=0;s1&&a--}return i.slice(0,a).join("/")+"/"+n.slice(s).join("/")}const U={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var $,q;(function(e){e["pop"]="pop",e["push"]="push"})($||($={})),function(e){e["back"]="back",e["forward"]="forward",e["unknown"]=""}(q||(q={}));function K(e){if(!e)if(s){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),O(e)}const G=/^[^#]+#/;function Q(e,t){return e.replace(G,"#")+t}function Y(e,t){const i=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-i.left-(t.left||0),top:n.top-i.top-(t.top||0)}}const Z=()=>({left:window.scrollX,top:window.scrollY});function X(e){let t;if("el"in e){const i=e.el,n="string"===typeof i&&i.startsWith("#");0;const o="string"===typeof i?n?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!o)return;t=Y(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}function J(e,t){const i=history.state?history.state.position-t:-1;return i+e}const ee=new Map;function te(e,t){ee.set(e,t)}function ie(e){const t=ee.get(e);return ee.delete(e),t}let ne=()=>location.protocol+"//"+location.host;function oe(e,t){const{pathname:i,search:n,hash:o}=t,s=e.indexOf("#");if(s>-1){let t=o.includes(e.slice(s))?e.slice(s).length:1,i=o.slice(t);return"/"!==i[0]&&(i="/"+i),F(i,"")}const r=F(i,e);return r+n+o}function se(e,t,i,n){let o=[],s=[],r=null;const a=({state:s})=>{const a=oe(e,location),l=i.value,c=t.value;let d=0;if(s){if(i.value=a,t.value=s,r&&r===l)return void(r=null);d=c?s.position-c.position:0}else n(a);o.forEach((e=>{e(i.value,l,{delta:d,type:$.pop,direction:d?d>0?q.forward:q.back:q.unknown})}))};function c(){r=i.value}function d(e){o.push(e);const t=()=>{const t=o.indexOf(e);t>-1&&o.splice(t,1)};return s.push(t),t}function u(){const{history:e}=window;e.state&&e.replaceState(l({},e.state,{scroll:Z()}),"")}function h(){for(const e of s)e();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:c,listen:d,destroy:h}}function re(e,t,i,n=!1,o=!1){return{back:e,current:t,forward:i,replaced:n,position:window.history.length,scroll:o?Z():null}}function ae(e){const{history:t,location:i}=window,n={value:oe(e,i)},o={value:t.state};function s(n,s,r){const a=e.indexOf("#"),l=a>-1?(i.host&&document.querySelector("base")?e:e.slice(a))+n:ne()+e+n;try{t[r?"replaceState":"pushState"](s,"",l),o.value=s}catch(e){console.error(e),i[r?"replace":"assign"](l)}}function r(e,i){const r=l({},t.state,re(o.value.back,e,o.value.forward,!0),i,{position:o.value.position});s(e,r,!0),n.value=e}function a(e,i){const r=l({},o.value,t.state,{forward:e,scroll:Z()});s(r.current,r,!0);const a=l({},re(n.value,e,null),{position:r.position+1},i);s(e,a,!1),n.value=e}return o.value||s(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:n,state:o,push:a,replace:r}}function le(e){e=K(e);const t=ae(e),i=se(e,t.state,t.location,t.replace);function n(e,t=!0){t||i.pauseListeners(),history.go(e)}const o=l({location:"",base:e,go:n,createHref:Q.bind(null,e)},t,i);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function ce(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),le(e)}function de(e){return"string"===typeof e||e&&"object"===typeof e}function ue(e){return"string"===typeof e||"symbol"===typeof e}const he=Symbol("");var ge;(function(e){e[e["aborted"]=4]="aborted",e[e["cancelled"]=8]="cancelled",e[e["duplicated"]=16]="duplicated"})(ge||(ge={}));function pe(e,t){return l(new Error,{type:e,[he]:!0},t)}function fe(e,t){return e instanceof Error&&he in e&&(null==t||!!(e.type&t))}const me="[^/]+?",_e={sensitive:!1,strict:!1,start:!0,end:!0},ve=/[.+*?^${}()[\]/\\]/g;function be(e,t){const i=l({},_e,t),n=[];let o=i.start?"^":"";const s=[];for(const t of e){const e=t.length?[]:[90];i.strict&&!t.length&&(o+="/");for(let n=0;nt.length?1===t.length&&80===t[0]?1:-1:0}function we(e,t){let i=0;const n=e.score,o=t.score;while(i0&&t[t.length-1]<0}const Se={type:0,value:""},ke=/[a-zA-Z0-9_]/;function xe(e){if(!e)return[[]];if("/"===e)return[[Se]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(e){throw new Error(`ERR (${i})/"${c}": ${e}`)}let i=0,n=i;const o=[];let s;function r(){s&&o.push(s),s=[]}let a,l=0,c="",d="";function u(){c&&(0===i?s.push({type:0,value:c}):1===i||2===i||3===i?(s.length>1&&("*"===a||"+"===a)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:d,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):t("Invalid state to consume buffer"),c="")}function h(){c+=a}while(l{r(p)}:d}function r(e){if(ue(e)){const t=n.get(e);t&&(n.delete(e),i.splice(i.indexOf(t),1),t.children.forEach(r),t.alias.forEach(r))}else{const t=i.indexOf(e);t>-1&&(i.splice(t,1),e.record.name&&n.delete(e.record.name),e.children.forEach(r),e.alias.forEach(r))}}function a(){return i}function c(e){const t=Oe(e,i);i.splice(t,0,e),e.record.name&&!Re(e)&&n.set(e.record.name,e)}function u(e,t){let o,s,r,a={};if("name"in e&&e.name){if(o=n.get(e.name),!o)throw pe(1,{location:e});0,r=o.record.name,a=l(Te(t.params,o.keys.filter((e=>!e.optional)).concat(o.parent?o.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&Te(e.params,o.keys.map((e=>e.name)))),s=o.stringify(a)}else if(null!=e.path)s=e.path,o=i.find((e=>e.re.test(s))),o&&(a=o.parse(s),r=o.record.name);else{if(o=t.name?n.get(t.name):i.find((e=>e.re.test(t.path))),!o)throw pe(1,{location:e,currentLocation:t});r=o.record.name,a=l({},t.params,e.params),s=o.stringify(a)}const c=[];let d=o;while(d)c.unshift(d.record),d=d.parent;return{name:r,path:s,params:a,matched:c,meta:Ne(c)}}function h(){i.length=0,n.clear()}return t=Ae({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>s(e))),{addRoute:s,resolve:u,removeRoute:r,clearRoutes:h,getRoutes:a,getRecordMatcher:o}}function Te(e,t){const i={};for(const n of t)n in e&&(i[n]=e[n]);return i}function Ie(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:De(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function De(e){const t={},i=e.props||!1;if("component"in e)t.default=i;else for(const n in e.components)t[n]="object"===typeof i?i[n]:i;return t}function Re(e){while(e){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ne(e){return e.reduce(((e,t)=>l(e,t.meta)),{})}function Ae(e,t){const i={};for(const n in e)i[n]=n in t?t[n]:e[n];return i}function Oe(e,t){let i=0,n=t.length;while(i!==n){const o=i+n>>1,s=we(e,t[o]);s<0?n=o:i=o+1}const o=Pe(e);return o&&(n=t.lastIndexOf(o,n-1)),n}function Pe(e){let t=e;while(t=t.parent)if(Me(t)&&0===we(e,t))return t}function Me({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Fe(e){const t={};if(""===e||"?"===e)return t;const i="?"===e[0],n=(i?e.slice(1):e).split("&");for(let e=0;ee&&T(e))):[n&&T(n)];o.forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+i,null!=e&&(t+="="+e))}))}return t}function We(e){const t={};for(const i in e){const n=e[i];void 0!==n&&(t[i]=u(n)?n.map((e=>null==e?null:""+e)):null==n?n:""+n)}return t}const He=Symbol(""),Ve=Symbol(""),je=Symbol(""),ze=Symbol(""),Ue=Symbol("");function $e(){let e=[];function t(t){return e.push(t),()=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)}}function i(){e=[]}return{add:t,list:()=>e.slice(),reset:i}}function qe(e,t,i,n,o,s=e=>e()){const r=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise(((a,l)=>{const c=e=>{!1===e?l(pe(4,{from:i,to:t})):e instanceof Error?l(e):de(e)?l(pe(2,{from:t,to:e})):(r&&n.enterCallbacks[o]===r&&"function"===typeof e&&r.push(e),a())},d=s((()=>e.call(n&&n.instances[o],t,i,c)));let u=Promise.resolve(d);e.length<3&&(u=u.then(c)),u.catch((e=>l(e)))}))}function Ke(e,t,i,n,o=e=>e()){const s=[];for(const l of e){0;for(const e in l.components){let c=l.components[e];if("beforeRouteEnter"===t||l.instances[e])if(r(c)){const r=c.__vccOpts||c,a=r[t];a&&s.push(qe(a,i,n,l,e,o))}else{let r=c();0,s.push((()=>r.then((s=>{if(!s)throw new Error(`Couldn't resolve component "${e}" at "${l.path}"`);const r=a(s)?s.default:s;l.mods[e]=s,l.components[e]=r;const c=r.__vccOpts||r,d=c[t];return d&&qe(d,i,n,l,e,o)()}))))}}}return s}function Ge(e){const t=(0,n.WQ)(je),i=(0,n.WQ)(ze);const s=(0,n.EW)((()=>{const i=(0,o.R1)(e.to);return t.resolve(i)})),r=(0,n.EW)((()=>{const{matched:e}=s.value,{length:t}=e,n=e[t-1],o=i.matched;if(!n||!o.length)return-1;const r=o.findIndex(W.bind(null,n));if(r>-1)return r;const a=Je(e[t-2]);return t>1&&Je(n)===a&&o[o.length-1].path!==a?o.findIndex(W.bind(null,e[t-2])):r})),a=(0,n.EW)((()=>r.value>-1&&Xe(i.params,s.value.params))),l=(0,n.EW)((()=>r.value>-1&&r.value===i.matched.length-1&&H(i.params,s.value.params)));function c(i={}){return Ze(i)?t[(0,o.R1)(e.replace)?"replace":"push"]((0,o.R1)(e.to)).catch(d):Promise.resolve()}return{route:s,href:(0,n.EW)((()=>s.value.href)),isActive:a,isExactActive:l,navigate:c}}const Qe=(0,n.pM)({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ge,setup(e,{slots:t}){const i=(0,o.Kh)(Ge(e)),{options:s}=(0,n.WQ)(je),r=(0,n.EW)((()=>({[et(e.activeClass,s.linkActiveClass,"router-link-active")]:i.isActive,[et(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive})));return()=>{const o=t.default&&t.default(i);return e.custom?o:(0,n.h)("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:r.value},o)}}}),Ye=Qe;function Ze(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(void 0===e.button||0===e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Xe(e,t){for(const i in t){const n=t[i],o=e[i];if("string"===typeof n){if(n!==o)return!1}else if(!u(o)||o.length!==n.length||n.some(((e,t)=>e!==o[t])))return!1}return!0}function Je(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const et=(e,t,i)=>null!=e?e:null!=t?t:i,tt=(0,n.pM)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){const s=(0,n.WQ)(Ue),r=(0,n.EW)((()=>e.route||s.value)),a=(0,n.WQ)(Ve,0),c=(0,n.EW)((()=>{let e=(0,o.R1)(a);const{matched:t}=r.value;let i;while((i=t[e])&&!i.components)e++;return e})),d=(0,n.EW)((()=>r.value.matched[c.value]));(0,n.Gt)(Ve,(0,n.EW)((()=>c.value+1))),(0,n.Gt)(He,d),(0,n.Gt)(Ue,r);const u=(0,o.KR)();return(0,n.wB)((()=>[u.value,d.value,e.name]),(([e,t,i],[n,o,s])=>{t&&(t.instances[i]=e,o&&o!==t&&e&&e===n&&(t.leaveGuards.size||(t.leaveGuards=o.leaveGuards),t.updateGuards.size||(t.updateGuards=o.updateGuards))),!e||!t||o&&W(t,o)&&n||(t.enterCallbacks[i]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=r.value,s=e.name,a=d.value,c=a&&a.components[s];if(!c)return it(i.default,{Component:c,route:o});const h=a.props[s],g=h?!0===h?o.params:"function"===typeof h?h(o):h:null,p=e=>{e.component.isUnmounted&&(a.instances[s]=null)},f=(0,n.h)(c,l({},g,t,{onVnodeUnmounted:p,ref:u}));return it(i.default,{Component:f,route:o})||f}}});function it(e,t){if(!e)return null;const i=e(t);return 1===i.length?i[0]:i}const nt=tt;function ot(e){const t=Le(e.routes,e),i=e.parseQuery||Fe,r=e.stringifyQuery||Be,a=e.history;const h=$e(),g=$e(),p=$e(),f=(0,o.IJ)(U);let m=U;s&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const _=c.bind(null,(e=>""+e)),v=c.bind(null,R),b=c.bind(null,N);function y(e,i){let n,o;return ue(e)?(n=t.getRecordMatcher(e),o=i):o=e,t.addRoute(o,n)}function w(e){const i=t.getRecordMatcher(e);i&&t.removeRoute(i)}function C(){return t.getRoutes().map((e=>e.record))}function S(e){return!!t.getRecordMatcher(e)}function k(e,n){if(n=l({},n||f.value),"string"===typeof e){const o=P(i,e,n.path),s=t.resolve({path:o.path},n),r=a.createHref(o.fullPath);return l(o,s,{params:b(s.params),hash:N(o.hash),redirectedFrom:void 0,href:r})}let o;if(null!=e.path)o=l({},e,{path:P(i,e.path,n.path).path});else{const t=l({},e.params);for(const e in t)null==t[e]&&delete t[e];o=l({},e,{params:v(t)}),n.params=v(n.params)}const s=t.resolve(o,n),c=e.hash||"";s.params=_(b(s.params));const d=M(r,l({},e,{hash:L(c),path:s.path})),u=a.createHref(d);return l({fullPath:d,hash:c,query:r===Be?We(e.query):e.query||{}},s,{redirectedFrom:void 0,href:u})}function x(e){return"string"===typeof e?P(i,e,f.value.path):l({},e)}function E(e,t){if(m!==e)return pe(8,{from:t,to:e})}function T(e){return A(e)}function I(e){return T(l(x(e),{replace:!0}))}function D(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:i}=t;let n="function"===typeof i?i(e):i;return"string"===typeof n&&(n=n.includes("?")||n.includes("#")?n=x(n):{path:n},n.params={}),l({query:e.query,hash:e.hash,params:null!=n.path?{}:e.params},n)}}function A(e,t){const i=m=k(e),n=f.value,o=e.state,s=e.force,a=!0===e.replace,c=D(i);if(c)return A(l(x(c),{state:"object"===typeof c?l({},o,c.state):o,force:s,replace:a}),t||i);const d=i;let u;return d.redirectedFrom=t,!s&&B(r,n,i)&&(u=pe(16,{to:d,from:n}),ne(n,n,!0,!1)),(u?Promise.resolve(u):W(d,n)).catch((e=>fe(e)?fe(e,2)?e:ee(e):Q(e,d,n))).then((e=>{if(e){if(fe(e,2))return A(l({replace:a},x(e.to),{state:"object"===typeof e.to?l({},o,e.to.state):o,force:s}),t||d)}else e=V(d,n,!0,a,o);return H(d,n,e),e}))}function O(e,t){const i=E(e,t);return i?Promise.reject(i):Promise.resolve()}function F(e){const t=re.values().next().value;return t&&"function"===typeof t.runWithContext?t.runWithContext(e):e()}function W(e,t){let i;const[n,o,s]=st(e,t);i=Ke(n.reverse(),"beforeRouteLeave",e,t);for(const o of n)o.leaveGuards.forEach((n=>{i.push(qe(n,e,t))}));const r=O.bind(null,e,t);return i.push(r),le(i).then((()=>{i=[];for(const n of h.list())i.push(qe(n,e,t));return i.push(r),le(i)})).then((()=>{i=Ke(o,"beforeRouteUpdate",e,t);for(const n of o)n.updateGuards.forEach((n=>{i.push(qe(n,e,t))}));return i.push(r),le(i)})).then((()=>{i=[];for(const n of s)if(n.beforeEnter)if(u(n.beforeEnter))for(const o of n.beforeEnter)i.push(qe(o,e,t));else i.push(qe(n.beforeEnter,e,t));return i.push(r),le(i)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),i=Ke(s,"beforeRouteEnter",e,t,F),i.push(r),le(i)))).then((()=>{i=[];for(const n of g.list())i.push(qe(n,e,t));return i.push(r),le(i)})).catch((e=>fe(e,8)?e:Promise.reject(e)))}function H(e,t,i){p.list().forEach((n=>F((()=>n(e,t,i)))))}function V(e,t,i,n,o){const r=E(e,t);if(r)return r;const c=t===U,d=s?history.state:{};i&&(n||c?a.replace(e.fullPath,l({scroll:c&&d&&d.scroll},o)):a.push(e.fullPath,o)),f.value=e,ne(e,t,i,c),ee()}let j;function z(){j||(j=a.listen(((e,t,i)=>{if(!ae.listening)return;const n=k(e),o=D(n);if(o)return void A(l(o,{replace:!0}),n).catch(d);m=n;const r=f.value;s&&te(J(r.fullPath,i.delta),Z()),W(n,r).catch((e=>fe(e,12)?e:fe(e,2)?(A(e.to,n).then((e=>{fe(e,20)&&!i.delta&&i.type===$.pop&&a.go(-1,!1)})).catch(d),Promise.reject()):(i.delta&&a.go(-i.delta,!1),Q(e,n,r)))).then((e=>{e=e||V(n,r,!1),e&&(i.delta&&!fe(e,8)?a.go(-i.delta,!1):i.type===$.pop&&fe(e,20)&&a.go(-1,!1)),H(n,r,e)})).catch(d)})))}let q,K=$e(),G=$e();function Q(e,t,i){ee(e);const n=G.list();return n.length?n.forEach((n=>n(e,t,i))):console.error(e),Promise.reject(e)}function Y(){return q&&f.value!==U?Promise.resolve():new Promise(((e,t)=>{K.add([e,t])}))}function ee(e){return q||(q=!e,z(),K.list().forEach((([t,i])=>e?i(e):t())),K.reset()),e}function ne(t,i,o,r){const{scrollBehavior:a}=e;if(!s||!a)return Promise.resolve();const l=!o&&ie(J(t.fullPath,0))||(r||!o)&&history.state&&history.state.scroll||null;return(0,n.dY)().then((()=>a(t,i,l))).then((e=>e&&X(e))).catch((e=>Q(e,t,i)))}const oe=e=>a.go(e);let se;const re=new Set,ae={currentRoute:f,listening:!0,addRoute:y,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:S,getRoutes:C,resolve:k,options:e,push:T,replace:I,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:h.add,beforeResolve:g.add,afterEach:p.add,onError:G.add,isReady:Y,install(e){const t=this;e.component("RouterLink",Ye),e.component("RouterView",nt),e.config.globalProperties.$router=t,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,o.R1)(f)}),s&&!se&&f.value===U&&(se=!0,T(a.location).catch((e=>{0})));const i={};for(const e in U)Object.defineProperty(i,e,{get:()=>f.value[e],enumerable:!0});e.provide(je,t),e.provide(ze,(0,o.Gc)(i)),e.provide(Ue,f);const n=e.unmount;re.add(e),e.unmount=function(){re.delete(e),re.size<1&&(m=U,j&&j(),j=null,f.value=U,se=!1,q=!1),n()}}};function le(e){return e.reduce(((e,t)=>e.then((()=>F(t)))),Promise.resolve())}return ae}function st(e,t){const i=[],n=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let r=0;rW(e,s)))?n.push(s):i.push(s));const a=e.matched[r];a&&(t.matched.find((e=>W(e,a)))||o.push(a))}return[i,n,o]}},55008:e=>{function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i{function t(e){if(Array.isArray(e))return e}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},15760:(e,t,i)=>{var n=i(55008);function o(e){if(Array.isArray(e))return n(e)}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},45254:e=>{function t(e,t,i,n,o,s,r){try{var a=e[s](r),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function i(e){return function(){var i=this,n=arguments;return new Promise((function(o,s){var r=e.apply(i,n);function a(e){t(r,o,s,a,l,"next",e)}function l(e){t(r,o,s,a,l,"throw",e)}a(void 0)}))}}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},94660:e=>{function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},49818:(e,t,i)=>{var n=i(52025);function o(e,t){for(var i=0;i{var n=i(52025);function o(e,t,i){return(t=n(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},37927:e=>{function t(e){return e&&e.__esModule?e:{default:e}}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},43306:e=>{function t(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},70767:(e,t,i)=>{function n(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=i["return"]&&(r=i["return"](),Object(r)!==r))return}finally{if(c)throw o}}return a}}i(10239),e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},1265:e=>{function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},35492:e=>{function t(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},7454:(e,t,i)=>{i(10239);var n=i(63053)["default"];function o(){"use strict"; +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=o=function(){return i},e.exports.__esModule=!0,e.exports["default"]=e.exports;var t,i={},s=Object.prototype,r=s.hasOwnProperty,a=Object.defineProperty||function(e,t,i){e[t]=i.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",d=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(t){h=function(e,t,i){return e[t]=i}}function g(e,t,i,n){var o=t&&t.prototype instanceof y?t:y,s=Object.create(o.prototype),r=new A(n||[]);return a(s,"_invoke",{value:I(e,i,r)}),s}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}i.wrap=g;var f="suspendedStart",m="suspendedYield",_="executing",v="completed",b={};function y(){}function w(){}function C(){}var S={};h(S,c,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(O([])));x&&x!==s&&r.call(x,c)&&(S=x);var E=C.prototype=y.prototype=Object.create(S);function L(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function i(o,s,a,l){var c=p(e[o],e,s);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==n(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):t.resolve(u).then((function(e){d.value=e,a(d)}),(function(e){return i("throw",e,a,l)}))}l(c.arg)}var o;a(this,"_invoke",{value:function(e,n){function s(){return new t((function(t,o){i(e,n,t,o)}))}return o=o?o.then(s,s):s()}})}function I(e,i,n){var o=f;return function(s,r){if(o===_)throw Error("Generator is already running");if(o===v){if("throw"===s)throw r;return{value:t,done:!0}}for(n.method=s,n.arg=r;;){var a=n.delegate;if(a){var l=D(a,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=_;var c=p(e,i,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function D(e,i){var n=i.method,o=e.iterator[n];if(o===t)return i.delegate=null,"throw"===n&&e.iterator["return"]&&(i.method="return",i.arg=t,D(e,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var s=p(o,e.iterator,i.arg);if("throw"===s.type)return i.method="throw",i.arg=s.arg,i.delegate=null,b;var r=s.arg;return r?r.done?(i[e.resultName]=r.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,b):r:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,b)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function O(e){if(e||""===e){var i=e[c];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function i(){for(;++o=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var l=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),N(i),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var o=n.arg;N(i)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:O(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),b}},i}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},99550:(e,t,i)=>{var n=i(9796),o=i(70767),s=i(82813),r=i(1265);function a(e,t){return n(e)||o(e,t)||s(e,t)||r()}e.exports=a,e.exports.__esModule=!0,e.exports["default"]=e.exports},8445:(e,t,i)=>{var n=i(15760),o=i(43306),s=i(82813),r=i(35492);function a(e){return n(e)||o(e)||s(e)||r()}e.exports=a,e.exports.__esModule=!0,e.exports["default"]=e.exports},23132:(e,t,i)=>{var n=i(63053)["default"];function o(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},52025:(e,t,i)=>{var n=i(63053)["default"],o=i(23132);function s(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""}e.exports=s,e.exports.__esModule=!0,e.exports["default"]=e.exports},63053:e=>{function t(i){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports["default"]=e.exports,t(i)}e.exports=t,e.exports.__esModule=!0,e.exports["default"]=e.exports},82813:(e,t,i)=>{var n=i(55008);function o(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}e.exports=o,e.exports.__esModule=!0,e.exports["default"]=e.exports},85917:(e,t,i)=>{var n=i(7454)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},84401:(e,t,i)=>{"use strict";var n=i(76428),o=i(43798),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(o(e)+" is not a function")}},90633:(e,t,i)=>{"use strict";var n=i(83496),o=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s("Can't set "+o(e)+" as a prototype")}},25050:(e,t,i)=>{"use strict";var n=i(42399),o=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(o(e)+" is not an object")}},35884:e=>{"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},74551:(e,t,i)=>{"use strict";var n,o,s,r=i(35884),a=i(99389),l=i(5389),c=i(76428),d=i(42399),u=i(97586),h=i(41374),g=i(43798),p=i(92792),f=i(17189),m=i(37685),_=i(34914),v=i(34314),b=i(29182),y=i(30522),w=i(15841),C=i(54510),S=C.enforce,k=C.get,x=l.Int8Array,E=x&&x.prototype,L=l.Uint8ClampedArray,T=L&&L.prototype,I=x&&v(x),D=E&&v(E),R=Object.prototype,N=l.TypeError,A=y("toStringTag"),O=w("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",M=r&&!!b&&"Opera"!==h(l.opera),F=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},W={BigInt64Array:8,BigUint64Array:8},H=function(e){if(!d(e))return!1;var t=h(e);return"DataView"===t||u(B,t)||u(W,t)},V=function(e){var t=v(e);if(d(t)){var i=k(t);return i&&u(i,P)?i[P]:V(t)}},j=function(e){if(!d(e))return!1;var t=h(e);return u(B,t)||u(W,t)},z=function(e){if(j(e))return e;throw new N("Target is not a typed array")},U=function(e){if(c(e)&&(!b||_(I,e)))return e;throw new N(g(e)+" is not a typed array constructor")},$=function(e,t,i,n){if(a){if(i)for(var o in B){var s=l[o];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(i){try{s.prototype[e]=t}catch(e){}}}D[e]&&!i||f(D,e,i?t:M&&E[e]||t,n)}},q=function(e,t,i){var n,o;if(a){if(b){if(i)for(n in B)if(o=l[n],o&&u(o,e))try{delete o[e]}catch(e){}if(I[e]&&!i)return;try{return f(I,e,i?t:M&&I[e]||t)}catch(e){}}for(n in B)o=l[n],!o||o[e]&&!i||f(o,e,t)}};for(n in B)o=l[n],s=o&&o.prototype,s?S(s)[P]=o:M=!1;for(n in W)o=l[n],s=o&&o.prototype,s&&(S(s)[P]=o);if((!M||!c(I)||I===Function.prototype)&&(I=function(){throw new N("Incorrect invocation")},M))for(n in B)l[n]&&b(l[n],I);if((!M||!D||D===R)&&(D=I.prototype,M))for(n in B)l[n]&&b(l[n].prototype,D);if(M&&v(T)!==D&&b(T,D),a&&!u(D,A))for(n in F=!0,m(D,A,{configurable:!0,get:function(){return d(this)?this[O]:void 0}}),B)l[n]&&p(l[n],O,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:M,TYPED_ARRAY_TAG:F&&O,aTypedArray:z,aTypedArrayConstructor:U,exportTypedArrayMethod:$,exportTypedArrayStaticMethod:q,getTypedArrayConstructor:V,isView:H,isTypedArray:j,TypedArray:I,TypedArrayPrototype:D}},62711:(e,t,i)=>{"use strict";var n=i(30925);e.exports=function(e,t,i){var o=0,s=arguments.length>2?i:n(t),r=new e(s);while(s>o)r[o]=t[o++];return r}},99986:(e,t,i)=>{"use strict";var n=i(44716),o=i(21971),s=i(30925),r=function(e){return function(t,i,r){var a=n(t),l=s(a);if(0===l)return!e&&-1;var c,d=o(r,l);if(e&&i!==i){while(l>d)if(c=a[d++],c!==c)return!0}else for(;l>d;d++)if((e||d in a)&&a[d]===i)return e||d||0;return!e&&-1}};e.exports={includes:r(!0),indexOf:r(!1)}},5062:(e,t,i)=>{"use strict";var n=i(63133),o=i(46160),s=i(25644),r=i(30925),a=function(e){var t=1===e;return function(i,a,l){var c,d,u=s(i),h=o(u),g=r(h),p=n(a,l);while(g-- >0)if(c=h[g],d=p(c,g,u),d)switch(e){case 0:return c;case 1:return g}return t?-1:void 0}};e.exports={findLast:a(0),findLastIndex:a(1)}},80848:(e,t,i)=>{"use strict";var n=i(99389),o=i(11391),s=TypeError,r=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(o(e)&&!r(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},47001:(e,t,i)=>{"use strict";var n=i(30925);e.exports=function(e,t){for(var i=n(e),o=new t(i),s=0;s{"use strict";var n=i(30925),o=i(76552),s=RangeError;e.exports=function(e,t,i,r){var a=n(e),l=o(i),c=l<0?a+l:l;if(c>=a||c<0)throw new s("Incorrect index");for(var d=new t(a),u=0;u{"use strict";var n=i(76785),o=n({}.toString),s=n("".slice);e.exports=function(e){return s(o(e),8,-1)}},41374:(e,t,i)=>{"use strict";var n=i(40785),o=i(76428),s=i(7713),r=i(30522),a=r("toStringTag"),l=Object,c="Arguments"===s(function(){return arguments}()),d=function(e,t){try{return e[t]}catch(e){}};e.exports=n?s:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=d(t=l(e),a))?i:c?s(t):"Object"===(n=s(t))&&o(t.callee)?"Arguments":n}},82849:(e,t,i)=>{"use strict";var n=i(97586),o=i(58992),s=i(22552),r=i(57618);e.exports=function(e,t,i){for(var a=o(t),l=r.f,c=s.f,d=0;d{"use strict";var n=i(90770);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},92792:(e,t,i)=>{"use strict";var n=i(99389),o=i(57618),s=i(54419);e.exports=n?function(e,t,i){return o.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},54419:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},37685:(e,t,i)=>{"use strict";var n=i(41058),o=i(57618);e.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),o.f(e,t,i)}},17189:(e,t,i)=>{"use strict";var n=i(76428),o=i(57618),s=i(41058),r=i(95022);e.exports=function(e,t,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(n(i)&&s(i,c,a),a.global)l?e[t]=i:r(t,i);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=i:o.f(e,t,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},95022:(e,t,i)=>{"use strict";var n=i(5389),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},86553:(e,t,i)=>{"use strict";var n=i(43798),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw new o("Cannot delete property "+n(t)+" of "+n(e))}},99389:(e,t,i)=>{"use strict";var n=i(90770);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},87814:(e,t,i)=>{"use strict";var n=i(5389),o=i(42399),s=n.document,r=o(s)&&o(s.createElement);e.exports=function(e){return r?s.createElement(e):{}}},40914:e=>{"use strict";var t=TypeError,i=9007199254740991;e.exports=function(e){if(e>i)throw t("Maximum allowed index exceeded");return e}},55226:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},74828:(e,t,i)=>{"use strict";var n=i(5389),o=n.navigator,s=o&&o.userAgent;e.exports=s?String(s):""},53792:(e,t,i)=>{"use strict";var n,o,s=i(5389),r=i(74828),a=s.process,l=s.Deno,c=a&&a.versions||l&&l.version,d=c&&c.v8;d&&(n=d.split("."),o=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&r&&(n=r.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=r.match(/Chrome\/(\d+)/),n&&(o=+n[1]))),e.exports=o},57485:(e,t,i)=>{"use strict";var n=i(5389),o=i(22552).f,s=i(92792),r=i(17189),a=i(95022),l=i(82849),c=i(81513);e.exports=function(e,t){var i,d,u,h,g,p,f=e.target,m=e.global,_=e.stat;if(d=m?n:_?n[f]||a(f,{}):n[f]&&n[f].prototype,d)for(u in t){if(g=t[u],e.dontCallGetSet?(p=o(d,u),h=p&&p.value):h=d[u],i=c(m?u:f+(_?".":"#")+u,e.forced),!i&&void 0!==h){if(typeof g==typeof h)continue;l(g,h)}(e.sham||h&&h.sham)&&s(g,"sham",!0),r(d,u,g,e)}}},90770:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},63133:(e,t,i)=>{"use strict";var n=i(53547),o=i(84401),s=i(99391),r=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:s?r(e,t):function(){return e.apply(t,arguments)}}},99391:(e,t,i)=>{"use strict";var n=i(90770);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},27624:(e,t,i)=>{"use strict";var n=i(99391),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},91391:(e,t,i)=>{"use strict";var n=i(99389),o=i(97586),s=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,a=o(s,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&r(s,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},86129:(e,t,i)=>{"use strict";var n=i(76785),o=i(84401);e.exports=function(e,t,i){try{return n(o(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(e){}}},53547:(e,t,i)=>{"use strict";var n=i(7713),o=i(76785);e.exports=function(e){if("Function"===n(e))return o(e)}},76785:(e,t,i)=>{"use strict";var n=i(99391),o=Function.prototype,s=o.call,r=n&&o.bind.bind(s,s);e.exports=n?r:function(e){return function(){return s.apply(e,arguments)}}},97060:(e,t,i)=>{"use strict";var n=i(5389),o=i(76428),s=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(n[e]):n[e]&&n[e][t]}},8209:(e,t,i)=>{"use strict";var n=i(84401),o=i(23614);e.exports=function(e,t){var i=e[t];return o(i)?void 0:n(i)}},5389:function(e,t,i){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},97586:(e,t,i)=>{"use strict";var n=i(76785),o=i(25644),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(o(e),t)}},90020:e=>{"use strict";e.exports={}},21030:(e,t,i)=>{"use strict";var n=i(99389),o=i(90770),s=i(87814);e.exports=!n&&!o((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},46160:(e,t,i)=>{"use strict";var n=i(76785),o=i(90770),s=i(7713),r=Object,a=n("".split);e.exports=o((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===s(e)?a(e,""):r(e)}:r},63013:(e,t,i)=>{"use strict";var n=i(76785),o=i(76428),s=i(68294),r=n(Function.toString);o(s.inspectSource)||(s.inspectSource=function(e){return r(e)}),e.exports=s.inspectSource},54510:(e,t,i)=>{"use strict";var n,o,s,r=i(18393),a=i(5389),l=i(42399),c=i(92792),d=i(97586),u=i(68294),h=i(92200),g=i(90020),p="Object already initialized",f=a.TypeError,m=a.WeakMap,_=function(e){return s(e)?o(e):n(e,{})},v=function(e){return function(t){var i;if(!l(t)||(i=o(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return i}};if(r||u.state){var b=u.state||(u.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,n=function(e,t){if(b.has(e))throw new f(p);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var y=h("state");g[y]=!0,n=function(e,t){if(d(e,y))throw new f(p);return t.facade=e,c(e,y,t),t},o=function(e){return d(e,y)?e[y]:{}},s=function(e){return d(e,y)}}e.exports={set:n,get:o,has:s,enforce:_,getterFor:v}},11391:(e,t,i)=>{"use strict";var n=i(7713);e.exports=Array.isArray||function(e){return"Array"===n(e)}},13208:(e,t,i)=>{"use strict";var n=i(41374);e.exports=function(e){var t=n(e);return"BigInt64Array"===t||"BigUint64Array"===t}},76428:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},81513:(e,t,i)=>{"use strict";var n=i(90770),o=i(76428),s=/#|\.prototype\./,r=function(e,t){var i=l[a(e)];return i===d||i!==c&&(o(t)?n(t):!!t)},a=r.normalize=function(e){return String(e).replace(s,".").toLowerCase()},l=r.data={},c=r.NATIVE="N",d=r.POLYFILL="P";e.exports=r},23614:e=>{"use strict";e.exports=function(e){return null===e||void 0===e}},42399:(e,t,i)=>{"use strict";var n=i(76428);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},83496:(e,t,i)=>{"use strict";var n=i(42399);e.exports=function(e){return n(e)||null===e}},25046:e=>{"use strict";e.exports=!1},59920:(e,t,i)=>{"use strict";var n=i(97060),o=i(76428),s=i(34914),r=i(29361),a=Object;e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&s(t.prototype,a(e))}},30925:(e,t,i)=>{"use strict";var n=i(12395);e.exports=function(e){return n(e.length)}},41058:(e,t,i)=>{"use strict";var n=i(76785),o=i(90770),s=i(76428),r=i(97586),a=i(99389),l=i(91391).CONFIGURABLE,c=i(63013),d=i(54510),u=d.enforce,h=d.get,g=String,p=Object.defineProperty,f=n("".slice),m=n("".replace),_=n([].join),v=a&&!o((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),y=e.exports=function(e,t,i){"Symbol("===f(g(t),0,7)&&(t="["+m(g(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!r(e,"name")||l&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),v&&i&&r(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&r(i,"constructor")&&i.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=u(e);return r(n,"source")||(n.source=_(b,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return s(this)&&h(this).source||c(this)}),"toString")},37998:e=>{"use strict";var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?i:t)(n)}},57618:(e,t,i)=>{"use strict";var n=i(99389),o=i(21030),s=i(86067),r=i(25050),a=i(15656),l=TypeError,c=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",h="configurable",g="writable";t.f=n?s?function(e,t,i){if(r(e),t=a(t),r(i),"function"===typeof e&&"prototype"===t&&"value"in i&&g in i&&!i[g]){var n=d(e,t);n&&n[g]&&(e[t]=i.value,i={configurable:h in i?i[h]:n[h],enumerable:u in i?i[u]:n[u],writable:!1})}return c(e,t,i)}:c:function(e,t,i){if(r(e),t=a(t),r(i),o)try{return c(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},22552:(e,t,i)=>{"use strict";var n=i(99389),o=i(27624),s=i(21680),r=i(54419),a=i(44716),l=i(15656),c=i(97586),d=i(21030),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=a(e),t=l(t),d)try{return u(e,t)}catch(e){}if(c(e,t))return r(!o(s.f,e,t),e[t])}},30365:(e,t,i)=>{"use strict";var n=i(85587),o=i(55226),s=o.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,s)}},89964:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},34314:(e,t,i)=>{"use strict";var n=i(97586),o=i(76428),s=i(25644),r=i(92200),a=i(86392),l=r("IE_PROTO"),c=Object,d=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=s(e);if(n(t,l))return t[l];var i=t.constructor;return o(i)&&t instanceof i?i.prototype:t instanceof c?d:null}},34914:(e,t,i)=>{"use strict";var n=i(76785);e.exports=n({}.isPrototypeOf)},85587:(e,t,i)=>{"use strict";var n=i(76785),o=i(97586),s=i(44716),r=i(99986).indexOf,a=i(90020),l=n([].push);e.exports=function(e,t){var i,n=s(e),c=0,d=[];for(i in n)!o(a,i)&&o(n,i)&&l(d,i);while(t.length>c)o(n,i=t[c++])&&(~r(d,i)||l(d,i));return d}},21680:(e,t)=>{"use strict";var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!i.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:i},29182:(e,t,i)=>{"use strict";var n=i(86129),o=i(42399),s=i(34997),r=i(90633);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=n(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return s(i),r(n),o(i)?(t?e(i,n):i.__proto__=n,i):i}}():void 0)},73615:(e,t,i)=>{"use strict";var n=i(27624),o=i(76428),s=i(42399),r=TypeError;e.exports=function(e,t){var i,a;if("string"===t&&o(i=e.toString)&&!s(a=n(i,e)))return a;if(o(i=e.valueOf)&&!s(a=n(i,e)))return a;if("string"!==t&&o(i=e.toString)&&!s(a=n(i,e)))return a;throw new r("Can't convert object to primitive value")}},58992:(e,t,i)=>{"use strict";var n=i(97060),o=i(76785),s=i(30365),r=i(89964),a=i(25050),l=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=s.f(a(e)),i=r.f;return i?l(t,i(e)):t}},22740:(e,t,i)=>{"use strict";var n=i(25050);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},34997:(e,t,i)=>{"use strict";var n=i(23614),o=TypeError;e.exports=function(e){if(n(e))throw new o("Can't call method on "+e);return e}},92200:(e,t,i)=>{"use strict";var n=i(55066),o=i(15841),s=n("keys");e.exports=function(e){return s[e]||(s[e]=o(e))}},68294:(e,t,i)=>{"use strict";var n=i(25046),o=i(5389),s=i(95022),r="__core-js_shared__",a=e.exports=o[r]||s(r,{});(a.versions||(a.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},55066:(e,t,i)=>{"use strict";var n=i(68294);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},39120:(e,t,i)=>{"use strict";var n=i(53792),o=i(90770),s=i(5389),r=s.String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},21971:(e,t,i)=>{"use strict";var n=i(76552),o=Math.max,s=Math.min;e.exports=function(e,t){var i=n(e);return i<0?o(i+t,0):s(i,t)}},4149:(e,t,i)=>{"use strict";var n=i(61266),o=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw new o("Can't convert number to bigint");return BigInt(t)}},44716:(e,t,i)=>{"use strict";var n=i(46160),o=i(34997);e.exports=function(e){return n(o(e))}},76552:(e,t,i)=>{"use strict";var n=i(37998);e.exports=function(e){var t=+e;return t!==t||0===t?0:n(t)}},12395:(e,t,i)=>{"use strict";var n=i(76552),o=Math.min;e.exports=function(e){var t=n(e);return t>0?o(t,9007199254740991):0}},25644:(e,t,i)=>{"use strict";var n=i(34997),o=Object;e.exports=function(e){return o(n(e))}},61266:(e,t,i)=>{"use strict";var n=i(27624),o=i(42399),s=i(59920),r=i(8209),a=i(73615),l=i(30522),c=TypeError,d=l("toPrimitive");e.exports=function(e,t){if(!o(e)||s(e))return e;var i,l=r(e,d);if(l){if(void 0===t&&(t="default"),i=n(l,e,t),!o(i)||s(i))return i;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},15656:(e,t,i)=>{"use strict";var n=i(61266),o=i(59920);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},40785:(e,t,i)=>{"use strict";var n=i(30522),o=n("toStringTag"),s={};s[o]="z",e.exports="[object z]"===String(s)},43798:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},15841:(e,t,i)=>{"use strict";var n=i(76785),o=0,s=Math.random(),r=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++o+s,36)}},29361:(e,t,i)=>{"use strict";var n=i(39120);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},86067:(e,t,i)=>{"use strict";var n=i(99389),o=i(90770);e.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},18393:(e,t,i)=>{"use strict";var n=i(5389),o=i(76428),s=n.WeakMap;e.exports=o(s)&&/native code/.test(String(s))},30522:(e,t,i)=>{"use strict";var n=i(5389),o=i(55066),s=i(97586),r=i(15841),a=i(39120),l=i(29361),c=n.Symbol,d=o("wks"),u=l?c["for"]||c:c&&c.withoutSetter||r;e.exports=function(e){return s(d,e)||(d[e]=a&&s(c,e)?c[e]:u("Symbol."+e)),d[e]}},10239:(e,t,i)=>{"use strict";var n=i(57485),o=i(25644),s=i(30925),r=i(80848),a=i(40914),l=i(90770),c=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),d=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},u=c||!d();n({target:"Array",proto:!0,arity:1,forced:u},{push:function(e){var t=o(this),i=s(t),n=arguments.length;a(i+n);for(var l=0;l{"use strict";var n=i(57485),o=i(25644),s=i(30925),r=i(80848),a=i(86553),l=i(40914),c=1!==[].unshift(0),d=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}},u=c||!d();n({target:"Array",proto:!0,arity:1,forced:u},{unshift:function(e){var t=o(this),i=s(t),n=arguments.length;if(n){l(i+n);var c=i;while(c--){var d=c+n;c in t?t[d]=t[c]:a(t,d)}for(var u=0;u{"use strict";var n=i(5389),o=i(99389),s=i(37685),r=i(22740),a=i(90770),l=n.RegExp,c=l.prototype,d=o&&a((function(){var e=!0;try{l(".","d")}catch(t){e=!1}var t={},i="",n=e?"dgimsy":"gimsy",o=function(e,n){Object.defineProperty(t,e,{get:function(){return i+=n,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var r in e&&(s.hasIndices="d"),s)o(r,s[r]);var a=Object.getOwnPropertyDescriptor(c,"flags").get.call(t);return a!==n||i!==n}));d&&s(c,"flags",{configurable:!0,get:r})},52321:(e,t,i)=>{"use strict";var n=i(74551),o=i(30925),s=i(76552),r=n.aTypedArray,a=n.exportTypedArrayMethod;a("at",(function(e){var t=r(this),i=o(t),n=s(e),a=n>=0?n:i+n;return a<0||a>=i?void 0:t[a]}))},13765:(e,t,i)=>{"use strict";var n=i(74551),o=i(5062).findLastIndex,s=n.aTypedArray,r=n.exportTypedArrayMethod;r("findLastIndex",(function(e){return o(s(this),e,arguments.length>1?arguments[1]:void 0)}))},42452:(e,t,i)=>{"use strict";var n=i(74551),o=i(5062).findLast,s=n.aTypedArray,r=n.exportTypedArrayMethod;r("findLast",(function(e){return o(s(this),e,arguments.length>1?arguments[1]:void 0)}))},55516:(e,t,i)=>{"use strict";var n=i(47001),o=i(74551),s=o.aTypedArray,r=o.exportTypedArrayMethod,a=o.getTypedArrayConstructor;r("toReversed",(function(){return n(s(this),a(this))}))},48635:(e,t,i)=>{"use strict";var n=i(74551),o=i(76785),s=i(84401),r=i(62711),a=n.aTypedArray,l=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,d=o(n.TypedArrayPrototype.sort);c("toSorted",(function(e){void 0!==e&&s(e);var t=a(this),i=r(l(t),t);return d(i,e)}))},9048:(e,t,i)=>{"use strict";var n=i(95091),o=i(74551),s=i(13208),r=i(76552),a=i(4149),l=o.aTypedArray,c=o.getTypedArrayConstructor,d=o.exportTypedArrayMethod,u=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();d("with",{with:function(e,t){var i=l(this),o=r(e),d=s(i)?a(t):+t;return n(i,c(i),o,d)}}["with"],!u)},82957:(e,t,i)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,r=(e=>t=>{const i=o.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),a=e=>(e=e.toLowerCase(),t=>r(t)===e),l=e=>t=>typeof t===e,{isArray:c}=Array,d=l("undefined");function u(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h=a("ArrayBuffer");function g(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t}const p=l("string"),f=l("function"),m=l("number"),_=e=>null!==e&&"object"===typeof e,v=e=>!0===e||!1===e,b=e=>{if("object"!==r(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},y=a("Date"),w=a("File"),C=a("Blob"),S=a("FileList"),k=e=>_(e)&&f(e.pipe),x=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=r(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},E=a("URLSearchParams"),L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function T(e,t,{allOwnKeys:i=!1}={}){if(null===e||"undefined"===typeof e)return;let n,o;if("object"!==typeof e&&(e=[e]),c(e))for(n=0,o=e.length;n0)if(n=i[o],t===n.toLowerCase())return n;return null}const D=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:i.g)(),R=e=>!d(e)&&e!==D;function N(){const{caseless:e}=R(this)&&this||{},t={},i=(i,n)=>{const o=e&&I(t,n)||n;b(t[o])&&b(i)?t[o]=N(t[o],i):b(i)?t[o]=N({},i):c(i)?t[o]=i.slice():t[o]=i};for(let e=0,t=arguments.length;e(T(t,((t,o)=>{i&&f(t)?e[o]=n(t,i):e[o]=t}),{allOwnKeys:o}),e),O=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),P=(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},M=(e,t,i,n)=>{let o,r,a;const l={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),r=o.length;while(r-- >0)a=o[r],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&s(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},F=(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},B=e=>{if(!e)return null;if(c(e))return e;let t=e.length;if(!m(t))return null;const i=new Array(t);while(t-- >0)i[t]=e[t];return i},W=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&s(Uint8Array)),H=(e,t)=>{const i=e&&e[Symbol.iterator],n=i.call(e);let o;while((o=n.next())&&!o.done){const i=o.value;t.call(e,i[0],i[1])}},V=(e,t)=>{let i;const n=[];while(null!==(i=e.exec(t)))n.push(i);return n},j=a("HTMLFormElement"),z=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),U=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),$=a("RegExp"),q=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};T(i,((i,o)=>{let s;!1!==(s=t(i,o,e))&&(n[o]=s||i)})),Object.defineProperties(e,n)},K=e=>{q(e,((t,i)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];f(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},G=(e,t)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return c(e)?n(e):n(String(e).split(t)),i},Q=()=>{},Y=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Z="abcdefghijklmnopqrstuvwxyz",X="0123456789",J={DIGIT:X,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+X},ee=(e=16,t=J.ALPHA_DIGIT)=>{let i="";const{length:n}=t;while(e--)i+=t[Math.random()*n|0];return i};function te(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const ie=e=>{const t=new Array(10),i=(e,n)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=c(e)?[]:{};return T(e,((e,t)=>{const s=i(e,n+1);!d(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return i(e,0)},ne=a("AsyncFunction"),oe=e=>e&&(_(e)||f(e))&&f(e.then)&&f(e.catch);var se={isArray:c,isArrayBuffer:h,isBuffer:u,isFormData:x,isArrayBufferView:g,isString:p,isNumber:m,isBoolean:v,isObject:_,isPlainObject:b,isUndefined:d,isDate:y,isFile:w,isBlob:C,isRegExp:$,isFunction:f,isStream:k,isURLSearchParams:E,isTypedArray:W,isFileList:S,forEach:T,merge:N,extend:A,trim:L,stripBOM:O,inherits:P,toFlatObject:M,kindOf:r,kindOfTest:a,endsWith:F,toArray:B,forEachEntry:H,matchAll:V,isHTMLForm:j,hasOwnProperty:U,hasOwnProp:U,reduceDescriptors:q,freezeMethods:K,toObjectSet:G,toCamelCase:z,noop:Q,toFiniteNumber:Y,findKey:I,global:D,isContextDefined:R,ALPHABET:J,generateString:ee,isSpecCompliantForm:te,toJSONObject:ie,isAsyncFn:ne,isThenable:oe};function re(e,t,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o)}se.inherits(re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ae=re.prototype,le={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{le[e]={value:e}})),Object.defineProperties(re,le),Object.defineProperty(ae,"isAxiosError",{value:!0}),re.from=(e,t,i,n,o,s)=>{const r=Object.create(ae);return se.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),re.call(r,e.message,t,i,n,o),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};var ce=null;function de(e){return se.isPlainObject(e)||se.isArray(e)}function ue(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function he(e,t,i){return e?e.concat(t).map((function(e,t){return e=ue(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}function ge(e){return se.isArray(e)&&!e.some(de)}const pe=se.toFlatObject(se,{},null,(function(e){return/^is[A-Z]/.test(e)}));function fe(e,t,i){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,i=se.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!se.isUndefined(t[e])}));const n=i.metaTokens,o=i.visitor||d,s=i.dots,r=i.indexes,a=i.Blob||"undefined"!==typeof Blob&&Blob,l=a&&se.isSpecCompliantForm(t);if(!se.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(se.isDate(e))return e.toISOString();if(!l&&se.isBlob(e))throw new re("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(e)||se.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,i,o){let a=e;if(e&&!o&&"object"===typeof e)if(se.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(se.isArray(e)&&ge(e)||(se.isFileList(e)||se.endsWith(i,"[]"))&&(a=se.toArray(e)))return i=ue(i),a.forEach((function(e,n){!se.isUndefined(e)&&null!==e&&t.append(!0===r?he([i],n,s):null===r?i:i+"[]",c(e))})),!1;return!!de(e)||(t.append(he(o,i,s),c(e)),!1)}const u=[],h=Object.assign(pe,{defaultVisitor:d,convertValue:c,isVisitable:de});function g(e,i){if(!se.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+i.join("."));u.push(e),se.forEach(e,(function(e,n){const s=!(se.isUndefined(e)||null===e)&&o.call(t,e,se.isString(n)?n.trim():n,i,h);!0===s&&g(e,i?i.concat(n):[n])})),u.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return g(e),t}function me(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function _e(e,t){this._pairs=[],e&&fe(e,this,t)}const ve=_e.prototype;function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ye(e,t,i){if(!t)return e;const n=i&&i.encode||be,o=i&&i.serialize;let s;if(s=o?o(t,i):se.isURLSearchParams(t)?t.toString():new _e(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}ve.append=function(e,t){this._pairs.push([e,t])},ve.toString=function(e){const t=e?function(t){return e.call(this,t,me)}:me;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class we{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){se.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Ce=we,Se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ke="undefined"!==typeof URLSearchParams?URLSearchParams:_e,xe="undefined"!==typeof FormData?FormData:null,Ee="undefined"!==typeof Blob?Blob:null,Le={isBrowser:!0,classes:{URLSearchParams:ke,FormData:xe,Blob:Ee},protocols:["http","https","file","blob","url","data"]};const Te="undefined"!==typeof window&&"undefined"!==typeof document,Ie=(e=>Te&&["ReactNative","NativeScript","NS"].indexOf(e)<0)("undefined"!==typeof navigator&&navigator.product),De=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)();var Re=Object.freeze({__proto__:null,hasBrowserEnv:Te,hasStandardBrowserWebWorkerEnv:De,hasStandardBrowserEnv:Ie}),Ne={...Re,...Le};function Ae(e,t){return fe(e,new Ne.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,n){return Ne.isNode&&se.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function Oe(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function Pe(e){const t={},i=Object.keys(e);let n;const o=i.length;let s;for(n=0;n=e.length;if(s=!s&&se.isArray(n)?n.length:s,a)return se.hasOwnProp(n,s)?n[s]=[n[s],i]:n[s]=i,!r;n[s]&&se.isObject(n[s])||(n[s]=[]);const l=t(e,i,n[s],o);return l&&se.isArray(n[s])&&(n[s]=Pe(n[s])),!r}if(se.isFormData(e)&&se.isFunction(e.entries)){const i={};return se.forEachEntry(e,((e,n)=>{t(Oe(e),n,i,0)})),i}return null}function Fe(e,t,i){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}const Be={transitional:Se,adapter:["xhr","http"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,o=se.isObject(e);o&&se.isHTMLForm(e)&&(e=new FormData(e));const s=se.isFormData(e);if(s)return n?JSON.stringify(Me(e)):e;if(se.isArrayBuffer(e)||se.isBuffer(e)||se.isStream(e)||se.isFile(e)||se.isBlob(e))return e;if(se.isArrayBufferView(e))return e.buffer;if(se.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ae(e,this.formSerializer).toString();if((r=se.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return fe(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),Fe(e)):e}],transformResponse:[function(e){const t=this.transitional||Be.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&se.isString(e)&&(i&&!this.responseType||n)){const i=t&&t.silentJSONParsing,o=!i&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw re.from(e,re.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],(e=>{Be.headers[e]={}}));var We=Be;const He=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ve=e=>{const t={};let i,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),i=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!i||t[i]&&He[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)})),t};const je=Symbol("internals");function ze(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return!1===e||null==e?e:se.isArray(e)?e.map(Ue):String(e)}function $e(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=i.exec(e))t[n[1]]=n[2];return t}const qe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ke(e,t,i,n,o){return se.isFunction(n)?n.call(this,t,i):(o&&(t=i),se.isString(t)?se.isString(n)?-1!==t.indexOf(n):se.isRegExp(n)?n.test(t):void 0:void 0)}function Ge(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}function Qe(e,t){const i=se.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+i,{value:function(e,i,o){return this[n].call(this,t,e,i,o)},configurable:!0})}))}class Ye{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function o(e,t,i){const o=ze(t);if(!o)throw new Error("header name must be a non-empty string");const s=se.findKey(n,o);(!s||void 0===n[s]||!0===i||void 0===i&&!1!==n[s])&&(n[s||t]=Ue(e))}const s=(e,t)=>se.forEach(e,((e,i)=>o(e,i,t)));return se.isPlainObject(e)||e instanceof this.constructor?s(e,t):se.isString(e)&&(e=e.trim())&&!qe(e)?s(Ve(e),t):null!=e&&o(t,e,i),this}get(e,t){if(e=ze(e),e){const i=se.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return $e(e);if(se.isFunction(t))return t.call(this,e,i);if(se.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ze(e),e){const i=se.findKey(this,e);return!(!i||void 0===this[i]||t&&!Ke(this,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function o(e){if(e=ze(e),e){const o=se.findKey(i,e);!o||t&&!Ke(i,i[o],o,t)||(delete i[o],n=!0)}}return se.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;while(i--){const o=t[i];e&&!Ke(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,i={};return se.forEach(this,((n,o)=>{const s=se.findKey(i,o);if(s)return t[s]=Ue(n),void delete t[o];const r=e?Ge(o):String(o).trim();r!==o&&delete t[o],t[r]=Ue(n),i[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return se.forEach(this,((i,n)=>{null!=i&&!1!==i&&(t[n]=e&&se.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=this[je]=this[je]={accessors:{}},i=t.accessors,n=this.prototype;function o(e){const t=ze(e);i[t]||(Qe(n,e),i[t]=!0)}return se.isArray(e)?e.forEach(o):o(e),this}}Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(Ye.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),se.freezeMethods(Ye);var Ze=Ye;function Xe(e,t){const i=this||We,n=t||i,o=Ze.from(n.headers);let s=n.data;return se.forEach(e,(function(e){s=e.call(i,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function Je(e){return!(!e||!e.__CANCEL__)}function et(e,t,i){re.call(this,null==e?"canceled":e,re.ERR_CANCELED,t,i),this.name="CanceledError"}function tt(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new re("Request failed with status code "+i.status,[re.ERR_BAD_REQUEST,re.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}se.inherits(et,re,{__CANCEL__:!0});var it=Ne.hasStandardBrowserEnv?{write(e,t,i,n,o,s){const r=[e+"="+encodeURIComponent(t)];se.isNumber(i)&&r.push("expires="+new Date(i).toGMTString()),se.isString(n)&&r.push("path="+n),se.isString(o)&&r.push("domain="+o),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ot(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function st(e,t){return e&&!nt(t)?ot(e,t):t}var rt=Ne.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function n(i){let n=i;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(e){const t=se.isString(e)?n(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return function(){return!0}}();function at(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lt(e,t){e=e||10;const i=new Array(e),n=new Array(e);let o,s=0,r=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[r];o||(o=l),i[s]=a,n[s]=l;let d=r,u=0;while(d!==s)u+=i[d++],d%=e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-o{const s=o.loaded,r=o.lengthComputable?o.total:void 0,a=s-i,l=n(a),c=s<=r;i=s;const d={loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&c?(r-s)/l:void 0,event:o};d[t?"download":"upload"]=!0,e(d)}}const dt="undefined"!==typeof XMLHttpRequest;var ut=dt&&function(e){return new Promise((function(t,i){let n=e.data;const o=Ze.from(e.headers).normalize();let s,r,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(se.isFormData(n))if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(r=o.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",i=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+i))}const u=st(e.baseURL,e.url);function h(){if(!d)return;const n=Ze.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),o=a&&"text"!==a&&"json"!==a?d.response:d.responseText,s={data:o,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};tt((function(e){t(e),c()}),(function(e){i(e),c()}),s),d=null}if(d.open(e.method.toUpperCase(),ye(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(i(new re("Request aborted",re.ECONNABORTED,e,d)),d=null)},d.onerror=function(){i(new re("Network Error",re.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Se;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(new re(t,n.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,d)),d=null},Ne.hasStandardBrowserEnv&&(l&&se.isFunction(l)&&(l=l(e)),l||!1!==l&&rt(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&it.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in d&&se.forEach(o.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),se.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&"json"!==a&&(d.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",ct(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",ct(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{d&&(i(!t||t.type?new et(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const g=at(u);g&&-1===Ne.protocols.indexOf(g)?i(new re("Unsupported protocol "+g+":",re.ERR_BAD_REQUEST,e)):d.send(n||null)}))};const ht={http:ce,xhr:ut};se.forEach(ht,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const gt=e=>`- ${e}`,pt=e=>se.isFunction(e)||null===e||!1===e;var ft={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let i,n;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let i=t?e.length>1?"since :\n"+e.map(gt).join("\n"):" "+gt(e[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:ht};function mt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new et(null,e)}function _t(e){mt(e),e.headers=Ze.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=ft.getAdapter(e.adapter||We.adapter);return t(e).then((function(t){return mt(e),t.data=Xe.call(e,e.transformResponse,t),t.headers=Ze.from(t.headers),t}),(function(t){return Je(t)||(mt(e),t&&t.response&&(t.response.data=Xe.call(e,e.transformResponse,t.response),t.response.headers=Ze.from(t.response.headers))),Promise.reject(t)}))}const vt=e=>e instanceof Ze?{...e}:e;function bt(e,t){t=t||{};const i={};function n(e,t,i){return se.isPlainObject(e)&&se.isPlainObject(t)?se.merge.call({caseless:i},e,t):se.isPlainObject(t)?se.merge({},t):se.isArray(t)?t.slice():t}function o(e,t,i){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e,i):n(e,t,i)}function s(e,t){if(!se.isUndefined(t))return n(void 0,t)}function r(e,t){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,o,s){return s in t?n(i,o):s in e?n(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>o(vt(e),vt(t),!0)};return se.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,r=s(e[n],t[n],n);se.isUndefined(r)&&s!==a||(i[n]=r)})),i}const yt="1.6.8",wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const Ct={};function St(e,t,i){if("object"!==typeof e)throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;while(o-- >0){const s=n[o],r=t[s];if(r){const t=e[s],i=void 0===t||r(t,s,e);if(!0!==i)throw new re("option "+s+" must be "+i,re.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new re("Unknown option "+s,re.ERR_BAD_OPTION)}}wt.transitional=function(e,t,i){function n(e,t){return"[Axios v"+yt+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,o,s)=>{if(!1===e)throw new re(n(o," has been removed"+(t?" in "+t:"")),re.ERR_DEPRECATED);return t&&!Ct[o]&&(Ct[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,o,s)}};var kt={assertOptions:St,validators:wt};const xt=kt.validators;class Et{constructor(e){this.defaults=e,this.interceptors={request:new Ce,response:new Ce}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const i=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?i&&!String(e.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+i):e.stack=i}throw e}}_request(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=bt(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:o}=t;void 0!==i&&kt.assertOptions(i,{silentJSONParsing:xt.transitional(xt.boolean),forcedJSONParsing:xt.transitional(xt.boolean),clarifyTimeoutError:xt.transitional(xt.boolean)},!1),null!=n&&(se.isFunction(n)?t.paramsSerializer={serialize:n}:kt.assertOptions(n,{encode:xt.function,serialize:xt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&se.merge(o.common,o[t.method]);o&&se.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ze.concat(s,o);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[_t.bind(this),void 0];e.unshift.apply(e,r),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);while(u{if(!i._listeners)return;let t=i._listeners.length;while(t-- >0)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{i.subscribe(e),t=e})).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e((function(e,n,o){i.reason||(i.reason=new et(e,n,o),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Tt((function(t){e=t}));return{token:t,cancel:e}}}var It=Tt;function Dt(e){return function(t){return e.apply(null,t)}}function Rt(e){return se.isObject(e)&&!0===e.isAxiosError}const Nt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Nt).forEach((([e,t])=>{Nt[t]=e}));var At=Nt;function Ot(e){const t=new Lt(e),i=n(Lt.prototype.request,t);return se.extend(i,Lt.prototype,t,{allOwnKeys:!0}),se.extend(i,t,null,{allOwnKeys:!0}),i.create=function(t){return Ot(bt(e,t))},i}const Pt=Ot(We);Pt.Axios=Lt,Pt.CanceledError=et,Pt.CancelToken=It,Pt.isCancel=Je,Pt.VERSION=yt,Pt.toFormData=fe,Pt.AxiosError=re,Pt.Cancel=Pt.CanceledError,Pt.all=function(e){return Promise.all(e)},Pt.spread=Dt,Pt.isAxiosError=Rt,Pt.mergeConfig=bt,Pt.AxiosHeaders=Ze,Pt.formToJSON=e=>Me(se.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=ft.getAdapter,Pt.HttpStatusCode=At,Pt.default=Pt,e.exports=Pt},27735:(e,t,i)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,r=(e=>t=>{const i=o.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),a=e=>(e=e.toLowerCase(),t=>r(t)===e),l=e=>t=>typeof t===e,{isArray:c}=Array,d=l("undefined");function u(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h=a("ArrayBuffer");function g(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t}const p=l("string"),f=l("function"),m=l("number"),_=e=>null!==e&&"object"===typeof e,v=e=>!0===e||!1===e,b=e=>{if("object"!==r(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},y=a("Date"),w=a("File"),C=a("Blob"),S=a("FileList"),k=e=>_(e)&&f(e.pipe),x=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=r(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},E=a("URLSearchParams"),L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function T(e,t,{allOwnKeys:i=!1}={}){if(null===e||"undefined"===typeof e)return;let n,o;if("object"!==typeof e&&(e=[e]),c(e))for(n=0,o=e.length;n0)if(n=i[o],t===n.toLowerCase())return n;return null}const D=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:i.g)(),R=e=>!d(e)&&e!==D;function N(){const{caseless:e}=R(this)&&this||{},t={},i=(i,n)=>{const o=e&&I(t,n)||n;b(t[o])&&b(i)?t[o]=N(t[o],i):b(i)?t[o]=N({},i):c(i)?t[o]=i.slice():t[o]=i};for(let e=0,t=arguments.length;e(T(t,((t,o)=>{i&&f(t)?e[o]=n(t,i):e[o]=t}),{allOwnKeys:o}),e),O=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),P=(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},M=(e,t,i,n)=>{let o,r,a;const l={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),r=o.length;while(r-- >0)a=o[r],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&s(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},F=(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},B=e=>{if(!e)return null;if(c(e))return e;let t=e.length;if(!m(t))return null;const i=new Array(t);while(t-- >0)i[t]=e[t];return i},W=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&s(Uint8Array)),H=(e,t)=>{const i=e&&e[Symbol.iterator],n=i.call(e);let o;while((o=n.next())&&!o.done){const i=o.value;t.call(e,i[0],i[1])}},V=(e,t)=>{let i;const n=[];while(null!==(i=e.exec(t)))n.push(i);return n},j=a("HTMLFormElement"),z=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),U=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),$=a("RegExp"),q=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};T(i,((i,o)=>{let s;!1!==(s=t(i,o,e))&&(n[o]=s||i)})),Object.defineProperties(e,n)},K=e=>{q(e,((t,i)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];f(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},G=(e,t)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return c(e)?n(e):n(String(e).split(t)),i},Q=()=>{},Y=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Z="abcdefghijklmnopqrstuvwxyz",X="0123456789",J={DIGIT:X,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+X},ee=(e=16,t=J.ALPHA_DIGIT)=>{let i="";const{length:n}=t;while(e--)i+=t[Math.random()*n|0];return i};function te(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const ie=e=>{const t=new Array(10),i=(e,n)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=c(e)?[]:{};return T(e,((e,t)=>{const s=i(e,n+1);!d(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return i(e,0)},ne=a("AsyncFunction"),oe=e=>e&&(_(e)||f(e))&&f(e.then)&&f(e.catch);var se={isArray:c,isArrayBuffer:h,isBuffer:u,isFormData:x,isArrayBufferView:g,isString:p,isNumber:m,isBoolean:v,isObject:_,isPlainObject:b,isUndefined:d,isDate:y,isFile:w,isBlob:C,isRegExp:$,isFunction:f,isStream:k,isURLSearchParams:E,isTypedArray:W,isFileList:S,forEach:T,merge:N,extend:A,trim:L,stripBOM:O,inherits:P,toFlatObject:M,kindOf:r,kindOfTest:a,endsWith:F,toArray:B,forEachEntry:H,matchAll:V,isHTMLForm:j,hasOwnProperty:U,hasOwnProp:U,reduceDescriptors:q,freezeMethods:K,toObjectSet:G,toCamelCase:z,noop:Q,toFiniteNumber:Y,findKey:I,global:D,isContextDefined:R,ALPHABET:J,generateString:ee,isSpecCompliantForm:te,toJSONObject:ie,isAsyncFn:ne,isThenable:oe};function re(e,t,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o)}se.inherits(re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ae=re.prototype,le={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{le[e]={value:e}})),Object.defineProperties(re,le),Object.defineProperty(ae,"isAxiosError",{value:!0}),re.from=(e,t,i,n,o,s)=>{const r=Object.create(ae);return se.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),re.call(r,e.message,t,i,n,o),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};var ce=null;function de(e){return se.isPlainObject(e)||se.isArray(e)}function ue(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function he(e,t,i){return e?e.concat(t).map((function(e,t){return e=ue(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}function ge(e){return se.isArray(e)&&!e.some(de)}const pe=se.toFlatObject(se,{},null,(function(e){return/^is[A-Z]/.test(e)}));function fe(e,t,i){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,i=se.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!se.isUndefined(t[e])}));const n=i.metaTokens,o=i.visitor||d,s=i.dots,r=i.indexes,a=i.Blob||"undefined"!==typeof Blob&&Blob,l=a&&se.isSpecCompliantForm(t);if(!se.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(se.isDate(e))return e.toISOString();if(!l&&se.isBlob(e))throw new re("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(e)||se.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,i,o){let a=e;if(e&&!o&&"object"===typeof e)if(se.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(se.isArray(e)&&ge(e)||(se.isFileList(e)||se.endsWith(i,"[]"))&&(a=se.toArray(e)))return i=ue(i),a.forEach((function(e,n){!se.isUndefined(e)&&null!==e&&t.append(!0===r?he([i],n,s):null===r?i:i+"[]",c(e))})),!1;return!!de(e)||(t.append(he(o,i,s),c(e)),!1)}const u=[],h=Object.assign(pe,{defaultVisitor:d,convertValue:c,isVisitable:de});function g(e,i){if(!se.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+i.join("."));u.push(e),se.forEach(e,(function(e,n){const s=!(se.isUndefined(e)||null===e)&&o.call(t,e,se.isString(n)?n.trim():n,i,h);!0===s&&g(e,i?i.concat(n):[n])})),u.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return g(e),t}function me(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function _e(e,t){this._pairs=[],e&&fe(e,this,t)}const ve=_e.prototype;function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ye(e,t,i){if(!t)return e;const n=i&&i.encode||be,o=i&&i.serialize;let s;if(s=o?o(t,i):se.isURLSearchParams(t)?t.toString():new _e(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}ve.append=function(e,t){this._pairs.push([e,t])},ve.toString=function(e){const t=e?function(t){return e.call(this,t,me)}:me;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class we{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){se.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Ce=we,Se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ke="undefined"!==typeof URLSearchParams?URLSearchParams:_e,xe="undefined"!==typeof FormData?FormData:null,Ee="undefined"!==typeof Blob?Blob:null,Le={isBrowser:!0,classes:{URLSearchParams:ke,FormData:xe,Blob:Ee},protocols:["http","https","file","blob","url","data"]};const Te="undefined"!==typeof window&&"undefined"!==typeof document,Ie=(e=>Te&&["ReactNative","NativeScript","NS"].indexOf(e)<0)("undefined"!==typeof navigator&&navigator.product),De=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)();var Re=Object.freeze({__proto__:null,hasBrowserEnv:Te,hasStandardBrowserWebWorkerEnv:De,hasStandardBrowserEnv:Ie}),Ne={...Re,...Le};function Ae(e,t){return fe(e,new Ne.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,n){return Ne.isNode&&se.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function Oe(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function Pe(e){const t={},i=Object.keys(e);let n;const o=i.length;let s;for(n=0;n=e.length;if(s=!s&&se.isArray(n)?n.length:s,a)return se.hasOwnProp(n,s)?n[s]=[n[s],i]:n[s]=i,!r;n[s]&&se.isObject(n[s])||(n[s]=[]);const l=t(e,i,n[s],o);return l&&se.isArray(n[s])&&(n[s]=Pe(n[s])),!r}if(se.isFormData(e)&&se.isFunction(e.entries)){const i={};return se.forEachEntry(e,((e,n)=>{t(Oe(e),n,i,0)})),i}return null}function Fe(e,t,i){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}const Be={transitional:Se,adapter:["xhr","http"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,o=se.isObject(e);o&&se.isHTMLForm(e)&&(e=new FormData(e));const s=se.isFormData(e);if(s)return n?JSON.stringify(Me(e)):e;if(se.isArrayBuffer(e)||se.isBuffer(e)||se.isStream(e)||se.isFile(e)||se.isBlob(e))return e;if(se.isArrayBufferView(e))return e.buffer;if(se.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ae(e,this.formSerializer).toString();if((r=se.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return fe(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),Fe(e)):e}],transformResponse:[function(e){const t=this.transitional||Be.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&se.isString(e)&&(i&&!this.responseType||n)){const i=t&&t.silentJSONParsing,o=!i&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw re.from(e,re.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],(e=>{Be.headers[e]={}}));var We=Be;const He=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ve=e=>{const t={};let i,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),i=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!i||t[i]&&He[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)})),t};const je=Symbol("internals");function ze(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return!1===e||null==e?e:se.isArray(e)?e.map(Ue):String(e)}function $e(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=i.exec(e))t[n[1]]=n[2];return t}const qe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ke(e,t,i,n,o){return se.isFunction(n)?n.call(this,t,i):(o&&(t=i),se.isString(t)?se.isString(n)?-1!==t.indexOf(n):se.isRegExp(n)?n.test(t):void 0:void 0)}function Ge(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}function Qe(e,t){const i=se.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+i,{value:function(e,i,o){return this[n].call(this,t,e,i,o)},configurable:!0})}))}class Ye{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function o(e,t,i){const o=ze(t);if(!o)throw new Error("header name must be a non-empty string");const s=se.findKey(n,o);(!s||void 0===n[s]||!0===i||void 0===i&&!1!==n[s])&&(n[s||t]=Ue(e))}const s=(e,t)=>se.forEach(e,((e,i)=>o(e,i,t)));return se.isPlainObject(e)||e instanceof this.constructor?s(e,t):se.isString(e)&&(e=e.trim())&&!qe(e)?s(Ve(e),t):null!=e&&o(t,e,i),this}get(e,t){if(e=ze(e),e){const i=se.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return $e(e);if(se.isFunction(t))return t.call(this,e,i);if(se.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ze(e),e){const i=se.findKey(this,e);return!(!i||void 0===this[i]||t&&!Ke(this,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function o(e){if(e=ze(e),e){const o=se.findKey(i,e);!o||t&&!Ke(i,i[o],o,t)||(delete i[o],n=!0)}}return se.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;while(i--){const o=t[i];e&&!Ke(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,i={};return se.forEach(this,((n,o)=>{const s=se.findKey(i,o);if(s)return t[s]=Ue(n),void delete t[o];const r=e?Ge(o):String(o).trim();r!==o&&delete t[o],t[r]=Ue(n),i[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return se.forEach(this,((i,n)=>{null!=i&&!1!==i&&(t[n]=e&&se.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=this[je]=this[je]={accessors:{}},i=t.accessors,n=this.prototype;function o(e){const t=ze(e);i[t]||(Qe(n,e),i[t]=!0)}return se.isArray(e)?e.forEach(o):o(e),this}}Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(Ye.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),se.freezeMethods(Ye);var Ze=Ye;function Xe(e,t){const i=this||We,n=t||i,o=Ze.from(n.headers);let s=n.data;return se.forEach(e,(function(e){s=e.call(i,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function Je(e){return!(!e||!e.__CANCEL__)}function et(e,t,i){re.call(this,null==e?"canceled":e,re.ERR_CANCELED,t,i),this.name="CanceledError"}function tt(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new re("Request failed with status code "+i.status,[re.ERR_BAD_REQUEST,re.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}se.inherits(et,re,{__CANCEL__:!0});var it=Ne.hasStandardBrowserEnv?{write(e,t,i,n,o,s){const r=[e+"="+encodeURIComponent(t)];se.isNumber(i)&&r.push("expires="+new Date(i).toGMTString()),se.isString(n)&&r.push("path="+n),se.isString(o)&&r.push("domain="+o),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ot(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function st(e,t){return e&&!nt(t)?ot(e,t):t}var rt=Ne.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function n(i){let n=i;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(e){const t=se.isString(e)?n(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return function(){return!0}}();function at(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lt(e,t){e=e||10;const i=new Array(e),n=new Array(e);let o,s=0,r=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[r];o||(o=l),i[s]=a,n[s]=l;let d=r,u=0;while(d!==s)u+=i[d++],d%=e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-o{const s=o.loaded,r=o.lengthComputable?o.total:void 0,a=s-i,l=n(a),c=s<=r;i=s;const d={loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&c?(r-s)/l:void 0,event:o};d[t?"download":"upload"]=!0,e(d)}}const dt="undefined"!==typeof XMLHttpRequest;var ut=dt&&function(e){return new Promise((function(t,i){let n=e.data;const o=Ze.from(e.headers).normalize();let s,r,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(se.isFormData(n))if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(r=o.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",i=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+i))}const u=st(e.baseURL,e.url);function h(){if(!d)return;const n=Ze.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),o=a&&"text"!==a&&"json"!==a?d.response:d.responseText,s={data:o,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};tt((function(e){t(e),c()}),(function(e){i(e),c()}),s),d=null}if(d.open(e.method.toUpperCase(),ye(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(i(new re("Request aborted",re.ECONNABORTED,e,d)),d=null)},d.onerror=function(){i(new re("Network Error",re.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Se;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(new re(t,n.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,d)),d=null},Ne.hasStandardBrowserEnv&&(l&&se.isFunction(l)&&(l=l(e)),l||!1!==l&&rt(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&it.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in d&&se.forEach(o.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),se.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&"json"!==a&&(d.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",ct(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",ct(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{d&&(i(!t||t.type?new et(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const g=at(u);g&&-1===Ne.protocols.indexOf(g)?i(new re("Unsupported protocol "+g+":",re.ERR_BAD_REQUEST,e)):d.send(n||null)}))};const ht={http:ce,xhr:ut};se.forEach(ht,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const gt=e=>`- ${e}`,pt=e=>se.isFunction(e)||null===e||!1===e;var ft={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let i,n;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let i=t?e.length>1?"since :\n"+e.map(gt).join("\n"):" "+gt(e[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:ht};function mt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new et(null,e)}function _t(e){mt(e),e.headers=Ze.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=ft.getAdapter(e.adapter||We.adapter);return t(e).then((function(t){return mt(e),t.data=Xe.call(e,e.transformResponse,t),t.headers=Ze.from(t.headers),t}),(function(t){return Je(t)||(mt(e),t&&t.response&&(t.response.data=Xe.call(e,e.transformResponse,t.response),t.response.headers=Ze.from(t.response.headers))),Promise.reject(t)}))}const vt=e=>e instanceof Ze?{...e}:e;function bt(e,t){t=t||{};const i={};function n(e,t,i){return se.isPlainObject(e)&&se.isPlainObject(t)?se.merge.call({caseless:i},e,t):se.isPlainObject(t)?se.merge({},t):se.isArray(t)?t.slice():t}function o(e,t,i){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e,i):n(e,t,i)}function s(e,t){if(!se.isUndefined(t))return n(void 0,t)}function r(e,t){return se.isUndefined(t)?se.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,o,s){return s in t?n(i,o):s in e?n(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>o(vt(e),vt(t),!0)};return se.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,r=s(e[n],t[n],n);se.isUndefined(r)&&s!==a||(i[n]=r)})),i}const yt="1.6.8",wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const Ct={};function St(e,t,i){if("object"!==typeof e)throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;while(o-- >0){const s=n[o],r=t[s];if(r){const t=e[s],i=void 0===t||r(t,s,e);if(!0!==i)throw new re("option "+s+" must be "+i,re.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new re("Unknown option "+s,re.ERR_BAD_OPTION)}}wt.transitional=function(e,t,i){function n(e,t){return"[Axios v"+yt+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,o,s)=>{if(!1===e)throw new re(n(o," has been removed"+(t?" in "+t:"")),re.ERR_DEPRECATED);return t&&!Ct[o]&&(Ct[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,o,s)}};var kt={assertOptions:St,validators:wt};const xt=kt.validators;class Et{constructor(e){this.defaults=e,this.interceptors={request:new Ce,response:new Ce}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const i=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?i&&!String(e.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+i):e.stack=i}throw e}}_request(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=bt(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:o}=t;void 0!==i&&kt.assertOptions(i,{silentJSONParsing:xt.transitional(xt.boolean),forcedJSONParsing:xt.transitional(xt.boolean),clarifyTimeoutError:xt.transitional(xt.boolean)},!1),null!=n&&(se.isFunction(n)?t.paramsSerializer={serialize:n}:kt.assertOptions(n,{encode:xt.function,serialize:xt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&se.merge(o.common,o[t.method]);o&&se.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ze.concat(s,o);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[_t.bind(this),void 0];e.unshift.apply(e,r),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);while(u{if(!i._listeners)return;let t=i._listeners.length;while(t-- >0)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{i.subscribe(e),t=e})).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e((function(e,n,o){i.reason||(i.reason=new et(e,n,o),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Tt((function(t){e=t}));return{token:t,cancel:e}}}var It=Tt;function Dt(e){return function(t){return e.apply(null,t)}}function Rt(e){return se.isObject(e)&&!0===e.isAxiosError}const Nt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Nt).forEach((([e,t])=>{Nt[t]=e}));var At=Nt;function Ot(e){const t=new Lt(e),i=n(Lt.prototype.request,t);return se.extend(i,Lt.prototype,t,{allOwnKeys:!0}),se.extend(i,t,null,{allOwnKeys:!0}),i.create=function(t){return Ot(bt(e,t))},i}const Pt=Ot(We);Pt.Axios=Lt,Pt.CanceledError=et,Pt.CancelToken=It,Pt.isCancel=Je,Pt.VERSION=yt,Pt.toFormData=fe,Pt.AxiosError=re,Pt.Cancel=Pt.CanceledError,Pt.all=function(e){return Promise.all(e)},Pt.spread=Dt,Pt.isAxiosError=Rt,Pt.mergeConfig=bt,Pt.AxiosHeaders=Ze,Pt.formToJSON=e=>Me(se.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=ft.getAdapter,Pt.HttpStatusCode=At,Pt.default=Pt,e.exports=Pt},82303:(e,t,i)=>{"use strict";i.d(t,{A:()=>vi});var n={};function o(e,t){return function(){return e.apply(t,arguments)}}i.r(n),i.d(n,{hasBrowserEnv:()=>Be,hasStandardBrowserEnv:()=>He,hasStandardBrowserWebWorkerEnv:()=>Ve,navigator:()=>We,origin:()=>je});const{toString:s}=Object.prototype,{getPrototypeOf:r}=Object,a=(e=>t=>{const i=s.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),l=e=>(e=e.toLowerCase(),t=>a(t)===e),c=e=>t=>typeof t===e,{isArray:d}=Array,u=c("undefined");function h(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=l("ArrayBuffer");function p(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t}const f=c("string"),m=c("function"),_=c("number"),v=e=>null!==e&&"object"===typeof e,b=e=>!0===e||!1===e,y=e=>{if("object"!==a(e))return!1;const t=r(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},w=l("Date"),C=l("File"),S=l("Blob"),k=l("FileList"),x=e=>v(e)&&m(e.pipe),E=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=a(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},L=l("URLSearchParams"),[T,I,D,R]=["ReadableStream","Request","Response","Headers"].map(l),N=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function A(e,t,{allOwnKeys:i=!1}={}){if(null===e||"undefined"===typeof e)return;let n,o;if("object"!==typeof e&&(e=[e]),d(e))for(n=0,o=e.length;n0)if(n=i[o],t===n.toLowerCase())return n;return null}const P=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),M=e=>!u(e)&&e!==P;function F(){const{caseless:e}=M(this)&&this||{},t={},i=(i,n)=>{const o=e&&O(t,n)||n;y(t[o])&&y(i)?t[o]=F(t[o],i):y(i)?t[o]=F({},i):d(i)?t[o]=i.slice():t[o]=i};for(let e=0,t=arguments.length;e(A(t,((t,n)=>{i&&m(t)?e[n]=o(t,i):e[n]=t}),{allOwnKeys:n}),e),W=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),H=(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},V=(e,t,i,n)=>{let o,s,a;const l={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),s=o.length;while(s-- >0)a=o[s],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&r(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},j=(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},z=e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!_(t))return null;const i=new Array(t);while(t-- >0)i[t]=e[t];return i},U=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&r(Uint8Array)),$=(e,t)=>{const i=e&&e[Symbol.iterator],n=i.call(e);let o;while((o=n.next())&&!o.done){const i=o.value;t.call(e,i[0],i[1])}},q=(e,t)=>{let i;const n=[];while(null!==(i=e.exec(t)))n.push(i);return n},K=l("HTMLFormElement"),G=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),Q=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),Y=l("RegExp"),Z=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};A(i,((i,o)=>{let s;!1!==(s=t(i,o,e))&&(n[o]=s||i)})),Object.defineProperties(e,n)},X=e=>{Z(e,((t,i)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];m(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},J=(e,t)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return d(e)?n(e):n(String(e).split(t)),i},ee=()=>{},te=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,ie="abcdefghijklmnopqrstuvwxyz",ne="0123456789",oe={DIGIT:ne,ALPHA:ie,ALPHA_DIGIT:ie+ie.toUpperCase()+ne},se=(e=16,t=oe.ALPHA_DIGIT)=>{let i="";const{length:n}=t;while(e--)i+=t[Math.random()*n|0];return i};function re(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const ae=e=>{const t=new Array(10),i=(e,n)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=d(e)?[]:{};return A(e,((e,t)=>{const s=i(e,n+1);!u(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return i(e,0)},le=l("AsyncFunction"),ce=e=>e&&(v(e)||m(e))&&m(e.then)&&m(e.catch),de=((e,t)=>e?setImmediate:t?((e,t)=>(P.addEventListener("message",(({source:i,data:n})=>{i===P&&n===e&&t.length&&t.shift()()}),!1),i=>{t.push(i),P.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))("function"===typeof setImmediate,m(P.postMessage)),ue="undefined"!==typeof queueMicrotask?queueMicrotask.bind(P):"undefined"!==typeof process&&process.nextTick||de,he={isArray:d,isArrayBuffer:g,isBuffer:h,isFormData:E,isArrayBufferView:p,isString:f,isNumber:_,isBoolean:b,isObject:v,isPlainObject:y,isReadableStream:T,isRequest:I,isResponse:D,isHeaders:R,isUndefined:u,isDate:w,isFile:C,isBlob:S,isRegExp:Y,isFunction:m,isStream:x,isURLSearchParams:L,isTypedArray:U,isFileList:k,forEach:A,merge:F,extend:B,trim:N,stripBOM:W,inherits:H,toFlatObject:V,kindOf:a,kindOfTest:l,endsWith:j,toArray:z,forEachEntry:$,matchAll:q,isHTMLForm:K,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:Z,freezeMethods:X,toObjectSet:J,toCamelCase:G,noop:ee,toFiniteNumber:te,findKey:O,global:P,isContextDefined:M,ALPHABET:oe,generateString:se,isSpecCompliantForm:re,toJSONObject:ae,isAsyncFn:le,isThenable:ce,setImmediate:de,asap:ue};function ge(e,t,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}he.inherits(ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:he.toJSONObject(this.config),code:this.code,status:this.status}}});const pe=ge.prototype,fe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{fe[e]={value:e}})),Object.defineProperties(ge,fe),Object.defineProperty(pe,"isAxiosError",{value:!0}),ge.from=(e,t,i,n,o,s)=>{const r=Object.create(pe);return he.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ge.call(r,e.message,t,i,n,o),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const me=ge,_e=null;function ve(e){return he.isPlainObject(e)||he.isArray(e)}function be(e){return he.endsWith(e,"[]")?e.slice(0,-2):e}function ye(e,t,i){return e?e.concat(t).map((function(e,t){return e=be(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}function we(e){return he.isArray(e)&&!e.some(ve)}const Ce=he.toFlatObject(he,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Se(e,t,i){if(!he.isObject(e))throw new TypeError("target must be an object");t=t||new(_e||FormData),i=he.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!he.isUndefined(t[e])}));const n=i.metaTokens,o=i.visitor||d,s=i.dots,r=i.indexes,a=i.Blob||"undefined"!==typeof Blob&&Blob,l=a&&he.isSpecCompliantForm(t);if(!he.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(he.isDate(e))return e.toISOString();if(!l&&he.isBlob(e))throw new me("Blob is not supported. Use a Buffer instead.");return he.isArrayBuffer(e)||he.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,i,o){let a=e;if(e&&!o&&"object"===typeof e)if(he.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(he.isArray(e)&&we(e)||(he.isFileList(e)||he.endsWith(i,"[]"))&&(a=he.toArray(e)))return i=be(i),a.forEach((function(e,n){!he.isUndefined(e)&&null!==e&&t.append(!0===r?ye([i],n,s):null===r?i:i+"[]",c(e))})),!1;return!!ve(e)||(t.append(ye(o,i,s),c(e)),!1)}const u=[],h=Object.assign(Ce,{defaultVisitor:d,convertValue:c,isVisitable:ve});function g(e,i){if(!he.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+i.join("."));u.push(e),he.forEach(e,(function(e,n){const s=!(he.isUndefined(e)||null===e)&&o.call(t,e,he.isString(n)?n.trim():n,i,h);!0===s&&g(e,i?i.concat(n):[n])})),u.pop()}}if(!he.isObject(e))throw new TypeError("data must be an object");return g(e),t}const ke=Se;function xe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ee(e,t){this._pairs=[],e&&ke(e,this,t)}const Le=Ee.prototype;Le.append=function(e,t){this._pairs.push([e,t])},Le.toString=function(e){const t=e?function(t){return e.call(this,t,xe)}:xe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Te=Ee;function Ie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function De(e,t,i){if(!t)return e;const n=i&&i.encode||Ie,o=i&&i.serialize;let s;if(s=o?o(t,i):he.isURLSearchParams(t)?t.toString():new Te(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}class Re{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){he.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const Ne=Re,Ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oe="undefined"!==typeof URLSearchParams?URLSearchParams:Te,Pe="undefined"!==typeof FormData?FormData:null,Me="undefined"!==typeof Blob?Blob:null,Fe={isBrowser:!0,classes:{URLSearchParams:Oe,FormData:Pe,Blob:Me},protocols:["http","https","file","blob","url","data"]},Be="undefined"!==typeof window&&"undefined"!==typeof document,We="object"===typeof navigator&&navigator||void 0,He=Be&&(!We||["ReactNative","NativeScript","NS"].indexOf(We.product)<0),Ve=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),je=Be&&window.location.href||"http://localhost",ze={...n,...Fe};function Ue(e,t){return ke(e,new ze.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,n){return ze.isNode&&he.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function $e(e){return he.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function qe(e){const t={},i=Object.keys(e);let n;const o=i.length;let s;for(n=0;n=e.length;if(s=!s&&he.isArray(n)?n.length:s,a)return he.hasOwnProp(n,s)?n[s]=[n[s],i]:n[s]=i,!r;n[s]&&he.isObject(n[s])||(n[s]=[]);const l=t(e,i,n[s],o);return l&&he.isArray(n[s])&&(n[s]=qe(n[s])),!r}if(he.isFormData(e)&&he.isFunction(e.entries)){const i={};return he.forEachEntry(e,((e,n)=>{t($e(e),n,i,0)})),i}return null}const Ge=Ke;function Qe(e,t,i){if(he.isString(e))try{return(t||JSON.parse)(e),he.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}const Ye={transitional:Ae,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,o=he.isObject(e);o&&he.isHTMLForm(e)&&(e=new FormData(e));const s=he.isFormData(e);if(s)return n?JSON.stringify(Ge(e)):e;if(he.isArrayBuffer(e)||he.isBuffer(e)||he.isStream(e)||he.isFile(e)||he.isBlob(e)||he.isReadableStream(e))return e;if(he.isArrayBufferView(e))return e.buffer;if(he.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ue(e,this.formSerializer).toString();if((r=he.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ke(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),Qe(e)):e}],transformResponse:[function(e){const t=this.transitional||Ye.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(he.isResponse(e)||he.isReadableStream(e))return e;if(e&&he.isString(e)&&(i&&!this.responseType||n)){const i=t&&t.silentJSONParsing,o=!i&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw me.from(e,me.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ze.classes.FormData,Blob:ze.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};he.forEach(["delete","get","head","post","put","patch"],(e=>{Ye.headers[e]={}}));const Ze=Ye,Xe=he.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Je=e=>{const t={};let i,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),i=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!i||t[i]&&Xe[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)})),t},et=Symbol("internals");function tt(e){return e&&String(e).trim().toLowerCase()}function it(e){return!1===e||null==e?e:he.isArray(e)?e.map(it):String(e)}function nt(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=i.exec(e))t[n[1]]=n[2];return t}const ot=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function st(e,t,i,n,o){return he.isFunction(n)?n.call(this,t,i):(o&&(t=i),he.isString(t)?he.isString(n)?-1!==t.indexOf(n):he.isRegExp(n)?n.test(t):void 0:void 0)}function rt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}function at(e,t){const i=he.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+i,{value:function(e,i,o){return this[n].call(this,t,e,i,o)},configurable:!0})}))}class lt{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function o(e,t,i){const o=tt(t);if(!o)throw new Error("header name must be a non-empty string");const s=he.findKey(n,o);(!s||void 0===n[s]||!0===i||void 0===i&&!1!==n[s])&&(n[s||t]=it(e))}const s=(e,t)=>he.forEach(e,((e,i)=>o(e,i,t)));if(he.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(he.isString(e)&&(e=e.trim())&&!ot(e))s(Je(e),t);else if(he.isHeaders(e))for(const[t,n]of e.entries())o(n,t,i);else null!=e&&o(t,e,i);return this}get(e,t){if(e=tt(e),e){const i=he.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return nt(e);if(he.isFunction(t))return t.call(this,e,i);if(he.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=tt(e),e){const i=he.findKey(this,e);return!(!i||void 0===this[i]||t&&!st(this,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function o(e){if(e=tt(e),e){const o=he.findKey(i,e);!o||t&&!st(i,i[o],o,t)||(delete i[o],n=!0)}}return he.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;while(i--){const o=t[i];e&&!st(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,i={};return he.forEach(this,((n,o)=>{const s=he.findKey(i,o);if(s)return t[s]=it(n),void delete t[o];const r=e?rt(o):String(o).trim();r!==o&&delete t[o],t[r]=it(n),i[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return he.forEach(this,((i,n)=>{null!=i&&!1!==i&&(t[n]=e&&he.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=this[et]=this[et]={accessors:{}},i=t.accessors,n=this.prototype;function o(e){const t=tt(e);i[t]||(at(n,e),i[t]=!0)}return he.isArray(e)?e.forEach(o):o(e),this}}lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),he.reduceDescriptors(lt.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),he.freezeMethods(lt);const ct=lt;function dt(e,t){const i=this||Ze,n=t||i,o=ct.from(n.headers);let s=n.data;return he.forEach(e,(function(e){s=e.call(i,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ut(e){return!(!e||!e.__CANCEL__)}function ht(e,t,i){me.call(this,null==e?"canceled":e,me.ERR_CANCELED,t,i),this.name="CanceledError"}he.inherits(ht,me,{__CANCEL__:!0});const gt=ht;function pt(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new me("Request failed with status code "+i.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}function ft(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function mt(e,t){e=e||10;const i=new Array(e),n=new Array(e);let o,s=0,r=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[r];o||(o=l),i[s]=a,n[s]=l;let d=r,u=0;while(d!==s)u+=i[d++],d%=e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-o{o=s,i=null,n&&(clearTimeout(n),n=null),e.apply(null,t)},a=(...e)=>{const t=Date.now(),a=t-o;a>=s?r(e,t):(i=e,n||(n=setTimeout((()=>{n=null,r(i)}),s-a)))},l=()=>i&&r(i);return[a,l]}const bt=vt,yt=(e,t,i=3)=>{let n=0;const o=_t(50,250);return bt((i=>{const s=i.loaded,r=i.lengthComputable?i.total:void 0,a=s-n,l=o(a),c=s<=r;n=s;const d={loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&c?(r-s)/l:void 0,event:i,lengthComputable:null!=r,[t?"download":"upload"]:!0};e(d)}),i)},wt=(e,t)=>{const i=null!=e;return[n=>t[0]({lengthComputable:i,total:e,loaded:n}),t[1]]},Ct=e=>(...t)=>he.asap((()=>e(...t))),St=ze.hasStandardBrowserEnv?function(){const e=ze.navigator&&/(msie|trident)/i.test(ze.navigator.userAgent),t=document.createElement("a");let i;function n(i){let n=i;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(e){const t=he.isString(e)?n(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return function(){return!0}}(),kt=ze.hasStandardBrowserEnv?{write(e,t,i,n,o,s){const r=[e+"="+encodeURIComponent(t)];he.isNumber(i)&&r.push("expires="+new Date(i).toGMTString()),he.isString(n)&&r.push("path="+n),he.isString(o)&&r.push("domain="+o),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Et(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Lt(e,t){return e&&!xt(t)?Et(e,t):t}const Tt=e=>e instanceof ct?{...e}:e;function It(e,t){t=t||{};const i={};function n(e,t,i){return he.isPlainObject(e)&&he.isPlainObject(t)?he.merge.call({caseless:i},e,t):he.isPlainObject(t)?he.merge({},t):he.isArray(t)?t.slice():t}function o(e,t,i){return he.isUndefined(t)?he.isUndefined(e)?void 0:n(void 0,e,i):n(e,t,i)}function s(e,t){if(!he.isUndefined(t))return n(void 0,t)}function r(e,t){return he.isUndefined(t)?he.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,o,s){return s in t?n(i,o):s in e?n(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>o(Tt(e),Tt(t),!0)};return he.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,r=s(e[n],t[n],n);he.isUndefined(r)&&s!==a||(i[n]=r)})),i}const Dt=e=>{const t=It({},e);let i,{data:n,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:r,headers:a,auth:l}=t;if(t.headers=a=ct.from(a),t.url=De(Lt(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),he.isFormData(n))if(ze.hasStandardBrowserEnv||ze.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(i=a.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ze.hasStandardBrowserEnv&&(o&&he.isFunction(o)&&(o=o(t)),o||!1!==o&&St(t.url))){const e=s&&r&&kt.read(r);e&&a.set(s,e)}return t},Rt="undefined"!==typeof XMLHttpRequest,Nt=Rt&&function(e){return new Promise((function(t,i){const n=Dt(e);let o=n.data;const s=ct.from(n.headers).normalize();let r,a,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:g}=n;function p(){c&&c(),d&&d(),n.cancelToken&&n.cancelToken.unsubscribe(r),n.signal&&n.signal.removeEventListener("abort",r)}let f=new XMLHttpRequest;function m(){if(!f)return;const n=ct.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),o=u&&"text"!==u&&"json"!==u?f.response:f.responseText,s={data:o,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};pt((function(e){t(e),p()}),(function(e){i(e),p()}),s),f=null}f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(i(new me("Request aborted",me.ECONNABORTED,e,f)),f=null)},f.onerror=function(){i(new me("Network Error",me.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Ae;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),i(new me(t,o.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,f)),f=null},void 0===o&&s.setContentType(null),"setRequestHeader"in f&&he.forEach(s.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),he.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),u&&"json"!==u&&(f.responseType=n.responseType),g&&([l,d]=yt(g,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=yt(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(r=t=>{f&&(i(!t||t.type?new gt(null,e,f):t),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(r),n.signal&&(n.signal.aborted?r():n.signal.addEventListener("abort",r)));const _=ft(n.url);_&&-1===ze.protocols.indexOf(_)?i(new me("Unsupported protocol "+_+":",me.ERR_BAD_REQUEST,e)):f.send(o||null)}))},At=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let i,n=new AbortController;const o=function(e){if(!i){i=!0,r();const t=e instanceof Error?e:this.reason;n.abort(t instanceof me?t:new gt(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new me(`timeout ${t} of ms exceeded`,me.ETIMEDOUT))}),t);const r=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=n;return a.unsubscribe=()=>he.asap(r),a}},Ot=At,Pt=function*(e,t){let i=e.byteLength;if(!t||i{const o=Mt(e,t);let s,r=0,a=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let s=n.byteLength;if(i){let e=r+=s;i(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel(e){return a(e),o.return()}},{highWaterMark:2})},Wt="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,Ht=Wt&&"function"===typeof ReadableStream,Vt=Wt&&("function"===typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),jt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},zt=Ht&&jt((()=>{let e=!1;const t=new Request(ze.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ut=65536,$t=Ht&&jt((()=>he.isReadableStream(new Response("").body))),qt={stream:$t&&(e=>e.body)};Wt&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!qt[t]&&(qt[t]=he.isFunction(e[t])?e=>e[t]():(e,i)=>{throw new me(`Response type '${t}' is not supported`,me.ERR_NOT_SUPPORT,i)})}))})(new Response);const Kt=async e=>{if(null==e)return 0;if(he.isBlob(e))return e.size;if(he.isSpecCompliantForm(e)){const t=new Request(ze.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return he.isArrayBufferView(e)||he.isArrayBuffer(e)?e.byteLength:(he.isURLSearchParams(e)&&(e+=""),he.isString(e)?(await Vt(e)).byteLength:void 0)},Gt=async(e,t)=>{const i=he.toFiniteNumber(e.getContentLength());return null==i?Kt(t):i},Qt=Wt&&(async e=>{let{url:t,method:i,data:n,signal:o,cancelToken:s,timeout:r,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:d,withCredentials:u="same-origin",fetchOptions:h}=Dt(e);c=c?(c+"").toLowerCase():"text";let g,p=Ot([o,s&&s.toAbortSignal()],r);const f=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(l&&zt&&"get"!==i&&"head"!==i&&0!==(m=await Gt(d,n))){let e,i=new Request(t,{method:"POST",body:n,duplex:"half"});if(he.isFormData(n)&&(e=i.headers.get("content-type"))&&d.setContentType(e),i.body){const[e,t]=wt(m,yt(Ct(l)));n=Bt(i.body,Ut,e,t)}}he.isString(u)||(u=u?"include":"omit");const o="credentials"in Request.prototype;g=new Request(t,{...h,signal:p,method:i.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:o?u:void 0});let s=await fetch(g);const r=$t&&("stream"===c||"response"===c);if($t&&(a||r&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=he.toFiniteNumber(s.headers.get("content-length")),[i,n]=a&&wt(t,yt(Ct(a),!0))||[];s=new Response(Bt(s.body,Ut,i,(()=>{n&&n(),f&&f()})),e)}c=c||"text";let _=await qt[he.findKey(qt,c)||"text"](s,e);return!r&&f&&f(),await new Promise(((t,i)=>{pt(t,i,{data:_,headers:ct.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:g})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new me("Network Error",me.ERR_NETWORK,e,g),{cause:t.cause||t});throw me.from(t,t&&t.code,e,g)}}),Yt={http:_e,xhr:Nt,fetch:Qt};he.forEach(Yt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Zt=e=>`- ${e}`,Xt=e=>he.isFunction(e)||null===e||!1===e,Jt={getAdapter:e=>{e=he.isArray(e)?e:[e];const{length:t}=e;let i,n;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let i=t?e.length>1?"since :\n"+e.map(Zt).join("\n"):" "+Zt(e[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:Yt};function ei(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gt(null,e)}function ti(e){ei(e),e.headers=ct.from(e.headers),e.data=dt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=Jt.getAdapter(e.adapter||Ze.adapter);return t(e).then((function(t){return ei(e),t.data=dt.call(e,e.transformResponse,t),t.headers=ct.from(t.headers),t}),(function(t){return ut(t)||(ei(e),t&&t.response&&(t.response.data=dt.call(e,e.transformResponse,t.response),t.response.headers=ct.from(t.response.headers))),Promise.reject(t)}))}const ii="1.7.7",ni={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ni[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const oi={};function si(e,t,i){if("object"!==typeof e)throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;while(o-- >0){const s=n[o],r=t[s];if(r){const t=e[s],i=void 0===t||r(t,s,e);if(!0!==i)throw new me("option "+s+" must be "+i,me.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new me("Unknown option "+s,me.ERR_BAD_OPTION)}}ni.transitional=function(e,t,i){function n(e,t){return"[Axios v"+ii+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,o,s)=>{if(!1===e)throw new me(n(o," has been removed"+(t?" in "+t:"")),me.ERR_DEPRECATED);return t&&!oi[o]&&(oi[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,o,s)}};const ri={assertOptions:si,validators:ni},ai=ri.validators;class li{constructor(e){this.defaults=e,this.interceptors={request:new Ne,response:new Ne}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const i=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?i&&!String(e.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+i):e.stack=i}catch(e){}}throw e}}_request(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=It(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:o}=t;void 0!==i&&ri.assertOptions(i,{silentJSONParsing:ai.transitional(ai.boolean),forcedJSONParsing:ai.transitional(ai.boolean),clarifyTimeoutError:ai.transitional(ai.boolean)},!1),null!=n&&(he.isFunction(n)?t.paramsSerializer={serialize:n}:ri.assertOptions(n,{encode:ai.function,serialize:ai.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&he.merge(o.common,o[t.method]);o&&he.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ct.concat(s,o);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[ti.bind(this),void 0];e.unshift.apply(e,r),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);while(u{if(!i._listeners)return;let t=i._listeners.length;while(t-- >0)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{i.subscribe(e),t=e})).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e((function(e,n,o){i.reason||(i.reason=new gt(e,n,o),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new di((function(t){e=t}));return{token:t,cancel:e}}}const ui=di;function hi(e){return function(t){return e.apply(null,t)}}function gi(e){return he.isObject(e)&&!0===e.isAxiosError}const pi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pi).forEach((([e,t])=>{pi[t]=e}));const fi=pi;function mi(e){const t=new ci(e),i=o(ci.prototype.request,t);return he.extend(i,ci.prototype,t,{allOwnKeys:!0}),he.extend(i,t,null,{allOwnKeys:!0}),i.create=function(t){return mi(It(e,t))},i}const _i=mi(Ze);_i.Axios=ci,_i.CanceledError=gt,_i.CancelToken=ui,_i.isCancel=ut,_i.VERSION=ii,_i.toFormData=ke,_i.AxiosError=me,_i.Cancel=_i.CanceledError,_i.all=function(e){return Promise.all(e)},_i.spread=hi,_i.isAxiosError=gi,_i.mergeConfig=It,_i.AxiosHeaders=ct,_i.formToJSON=e=>Ge(he.isHTMLForm(e)?new FormData(e):e),_i.getAdapter=Jt.getAdapter,_i.HttpStatusCode=fi,_i.default=_i;const vi=_i},3952:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(50492),s=i(61906),r=i(29467),a=i(65139);const l=(0,r.a0)({name:"QAvatar",props:{...s.x_,fontSize:String,color:String,textColor:String,icon:String,square:Boolean,rounded:Boolean},setup(e,{slots:t}){const i=(0,s.Ay)(e),r=(0,n.EW)((()=>"q-avatar"+(e.color?` bg-${e.color}`:"")+(e.textColor?` text-${e.textColor} q-chip--colored`:"")+(!0===e.square?" q-avatar--square":!0===e.rounded?" rounded-borders":""))),l=(0,n.EW)((()=>e.fontSize?{fontSize:e.fontSize}:null));return()=>{const s=void 0!==e.icon?[(0,n.h)(o.A,{name:e.icon})]:void 0;return(0,n.h)("div",{class:r.value,style:i.value},[(0,n.h)("div",{class:"q-avatar__content row flex-center overflow-hidden",style:l.value},(0,a.bG)(t.default,s))])}}})},23954:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(29467),s=i(65139);const r=["top","middle","bottom"],a=(0,o.a0)({name:"QBadge",props:{color:String,textColor:String,floating:Boolean,transparent:Boolean,multiLine:Boolean,outline:Boolean,rounded:Boolean,label:[Number,String],align:{type:String,validator:e=>r.includes(e)}},setup(e,{slots:t}){const i=(0,n.EW)((()=>void 0!==e.align?{verticalAlign:e.align}:null)),o=(0,n.EW)((()=>{const t=!0===e.outline&&e.color||e.textColor;return`q-badge flex inline items-center no-wrap q-badge--${!0===e.multiLine?"multi":"single"}-line`+(!0===e.outline?" q-badge--outline":void 0!==e.color?` bg-${e.color}`:"")+(void 0!==t?` text-${t}`:"")+(!0===e.floating?" q-badge--floating":"")+(!0===e.rounded?" q-badge--rounded":"")+(!0===e.transparent?" q-badge--transparent":"")}));return()=>(0,n.h)("div",{class:o.value,style:i.value,role:"status","aria-label":e.label},(0,s.Hp)(t.default,void 0!==e.label?[e.label]:[]))}})},46868:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});i(10239);var n=i(61758),o=i(29467),s=i(16372),r=i(65139);const a=(0,o.a0)({name:"QBanner",props:{...s.C,inlineActions:Boolean,dense:Boolean,rounded:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),o=(0,s.A)(e,i),a=(0,n.EW)((()=>"q-banner row items-center"+(!0===e.dense?" q-banner--dense":"")+(!0===o.value?" q-banner--dark q-dark":"")+(!0===e.rounded?" rounded-borders":""))),l=(0,n.EW)((()=>"q-banner__actions row items-center justify-end col-"+(!0===e.inlineActions?"auto":"all")));return()=>{const i=[(0,n.h)("div",{class:"q-banner__avatar col-auto row items-center self-start"},(0,r.zm)(t.avatar)),(0,n.h)("div",{class:"q-banner__content col text-body2"},(0,r.zm)(t.default))],o=(0,r.zm)(t.action);return void 0!==o&&i.push((0,n.h)("div",{class:l.value},o)),(0,n.h)("div",{class:a.value+(!1===e.inlineActions&&void 0!==o?" q-banner--top-padding":""),role:"alert"},i)}}})},1693:(e,t,i)=>{"use strict";i.d(t,{A:()=>I});i(10239);var n=i(61758),o=i(38734),s=i(29104),r=i(50492),a=i(30564),l=i(39626),c=i(20018),d=i(61906),u=i(47502);const h={none:0,xs:4,sm:8,md:16,lg:24,xl:32},g={xs:8,sm:10,md:14,lg:20,xl:24},p=["button","submit","reset"],f=/[^\s]\/[^\s]/,m=["flat","outline","push","unelevated"];function _(e,t){return!0===e.flat?"flat":!0===e.outline?"outline":!0===e.push?"push":!0===e.unelevated?"unelevated":t}const v={...d.x_,...u.ni,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...m.reduce(((e,t)=>(e[t]=Boolean)&&e),{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...c.fR.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},b={...v,round:Boolean};function y(e){const t=(0,d.Ay)(e,g),i=(0,c.Ay)(e),{hasRouterLink:o,hasLink:s,linkTag:r,linkAttrs:a,navigateOnClick:l}=(0,u.Ay)({fallbackTag:"button"}),m=(0,n.EW)((()=>{const i=!1===e.fab&&!1===e.fabMini?t.value:{};return void 0!==e.padding?Object.assign({},i,{padding:e.padding.split(/\s+/).map((e=>e in h?h[e]+"px":e)).join(" "),minWidth:"0",minHeight:"0"}):i})),v=(0,n.EW)((()=>!0===e.rounded||!0===e.fab||!0===e.fabMini)),b=(0,n.EW)((()=>!0!==e.disable&&!0!==e.loading)),y=(0,n.EW)((()=>!0===b.value?e.tabindex||0:-1)),w=(0,n.EW)((()=>_(e,"standard"))),C=(0,n.EW)((()=>{const t={tabindex:y.value};return!0===s.value?Object.assign(t,a.value):!0===p.includes(e.type)&&(t.type=e.type),"a"===r.value?(!0===e.disable?t["aria-disabled"]="true":void 0===t.href&&(t.role="button"),!0!==o.value&&!0===f.test(e.type)&&(t.type=e.type)):!0===e.disable&&(t.disabled="",t["aria-disabled"]="true"),!0===e.loading&&void 0!==e.percentage&&Object.assign(t,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),t})),S=(0,n.EW)((()=>{let t;void 0!==e.color?t=!0===e.flat||!0===e.outline?`text-${e.textColor||e.color}`:`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(t=`text-${e.textColor}`);const i=!0===e.round?"round":"rectangle"+(!0===v.value?" q-btn--rounded":!0===e.square?" q-btn--square":"");return`q-btn--${w.value} q-btn--${i}`+(void 0!==t?" "+t:"")+(!0===b.value?" q-btn--actionable q-focusable q-hoverable":!0===e.disable?" disabled":"")+(!0===e.fab?" q-btn--fab":!0===e.fabMini?" q-btn--fab-mini":"")+(!0===e.noCaps?" q-btn--no-uppercase":"")+(!0===e.dense?" q-btn--dense":"")+(!0===e.stretch?" no-border-radius self-stretch":"")+(!0===e.glossy?" glossy":"")+(e.square?" q-btn--square":"")})),k=(0,n.EW)((()=>i.value+(!0===e.stack?" column":" row")+(!0===e.noWrap?" no-wrap text-no-wrap":"")+(!0===e.loading?" q-btn__content--hidden":"")));return{classes:S,style:m,innerClasses:k,attributes:C,hasLink:s,linkTag:r,navigateOnClick:l,isActionable:b}}var w=i(29467),C=i(65139),S=i(22500),k=i(2906);const{passiveCapture:x}=S.mG;let E=null,L=null,T=null;const I=(0,w.a0)({name:"QBtn",props:{...b,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:t,emit:i}){const{proxy:c}=(0,n.nI)(),{classes:d,style:u,innerClasses:h,attributes:g,hasLink:p,linkTag:f,navigateOnClick:m,isActionable:_}=y(e),v=(0,o.KR)(null),b=(0,o.KR)(null);let w,I=null,D=null;const R=(0,n.EW)((()=>void 0!==e.label&&null!==e.label&&""!==e.label)),N=(0,n.EW)((()=>!0!==e.disable&&!1!==e.ripple&&{keyCodes:!0===p.value?[13,32]:[13],...!0===e.ripple?{}:e.ripple})),A=(0,n.EW)((()=>({center:e.round}))),O=(0,n.EW)((()=>{const t=Math.max(0,Math.min(100,e.percentage));return t>0?{transition:"transform 0.6s",transform:`translateX(${t-100}%)`}:{}})),P=(0,n.EW)((()=>{if(!0===e.loading)return{onMousedown:z,onTouchstart:z,onClick:z,onKeydown:z,onKeyup:z};if(!0===_.value){const t={onClick:F,onKeydown:B,onMousedown:H};if(!0===c.$q.platform.has.touch){const i=void 0!==e.onTouchstart?"":"Passive";t[`onTouchstart${i}`]=W}return t}return{onClick:S.Gu}})),M=(0,n.EW)((()=>({ref:v,class:"q-btn q-btn-item non-selectable no-outline "+d.value,style:u.value,...g.value,...P.value})));function F(t){if(null!==v.value){if(void 0!==t){if(!0===t.defaultPrevented)return;const i=document.activeElement;if("submit"===e.type&&i!==document.body&&!1===v.value.contains(i)&&!1===i.contains(v.value)){v.value.focus();const e=()=>{document.removeEventListener("keydown",S.Gu,!0),document.removeEventListener("keyup",e,x),null!==v.value&&v.value.removeEventListener("blur",e,x)};document.addEventListener("keydown",S.Gu,!0),document.addEventListener("keyup",e,x),v.value.addEventListener("blur",e,x)}}m(t)}}function B(e){null!==v.value&&(i("keydown",e),!0===(0,k.Dv)(e,[13,32])&&L!==v.value&&(null!==L&&j(),!0!==e.defaultPrevented&&(v.value.focus(),L=v.value,v.value.classList.add("q-btn--active"),document.addEventListener("keyup",V,!0),v.value.addEventListener("blur",V,x)),(0,S.Gu)(e)))}function W(e){null!==v.value&&(i("touchstart",e),!0!==e.defaultPrevented&&(E!==v.value&&(null!==E&&j(),E=v.value,I=e.target,I.addEventListener("touchcancel",V,x),I.addEventListener("touchend",V,x)),w=!0,null!==D&&clearTimeout(D),D=setTimeout((()=>{D=null,w=!1}),200)))}function H(e){null!==v.value&&(e.qSkipRipple=!0===w,i("mousedown",e),!0!==e.defaultPrevented&&T!==v.value&&(null!==T&&j(),T=v.value,v.value.classList.add("q-btn--active"),document.addEventListener("mouseup",V,x)))}function V(e){if(null!==v.value&&(void 0===e||"blur"!==e.type||document.activeElement!==v.value)){if(void 0!==e&&"keyup"===e.type){if(L===v.value&&!0===(0,k.Dv)(e,[13,32])){const t=new MouseEvent("click",e);t.qKeyEvent=!0,!0===e.defaultPrevented&&(0,S.F4)(t),!0===e.cancelBubble&&(0,S.ds)(t),v.value.dispatchEvent(t),(0,S.Gu)(e),e.qKeyEvent=!0}i("keyup",e)}j()}}function j(e){const t=b.value;!0===e||E!==v.value&&T!==v.value||null===t||t===document.activeElement||(t.setAttribute("tabindex",-1),t.focus()),E===v.value&&(null!==I&&(I.removeEventListener("touchcancel",V,x),I.removeEventListener("touchend",V,x)),E=I=null),T===v.value&&(document.removeEventListener("mouseup",V,x),T=null),L===v.value&&(document.removeEventListener("keyup",V,!0),null!==v.value&&v.value.removeEventListener("blur",V,x),L=null),null!==v.value&&v.value.classList.remove("q-btn--active")}function z(e){(0,S.Gu)(e),e.qSkipRipple=!0}return(0,n.xo)((()=>{j(!0)})),Object.assign(c,{click:e=>{!0===_.value&&F(e)}}),()=>{let i=[];void 0!==e.icon&&i.push((0,n.h)(r.A,{name:e.icon,left:!0!==e.stack&&!0===R.value,role:"img"})),!0===R.value&&i.push((0,n.h)("span",{class:"block"},[e.label])),i=(0,C.Hp)(t.default,i),void 0!==e.iconRight&&!1===e.round&&i.push((0,n.h)(r.A,{name:e.iconRight,right:!0!==e.stack&&!0===R.value,role:"img"}));const o=[(0,n.h)("span",{class:"q-focus-helper",ref:b})];return!0===e.loading&&void 0!==e.percentage&&o.push((0,n.h)("span",{class:"q-btn__progress absolute-full overflow-hidden"+(!0===e.darkPercentage?" q-btn__progress--dark":"")},[(0,n.h)("span",{class:"q-btn__progress-indicator fit block",style:O.value})])),o.push((0,n.h)("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+h.value},i)),null!==e.loading&&o.push((0,n.h)(s.eB,{name:"q-transition--fade"},(()=>!0===e.loading?[(0,n.h)("span",{key:"loading",class:"absolute-full flex flex-center"},void 0!==t.loading?t.loading():[(0,n.h)(a.A)])]:null))),(0,n.bo)((0,n.h)(f.value,M.value,o),[[l.A,N.value,void 0,A.value]])}}})},23316:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(16372),s=i(29467),r=i(65139);const a=(0,s.a0)({name:"QCard",props:{...o.C,tag:{type:String,default:"div"},square:Boolean,flat:Boolean,bordered:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),s=(0,o.A)(e,i),a=(0,n.EW)((()=>"q-card"+(!0===s.value?" q-card--dark q-dark":"")+(!0===e.bordered?" q-card--bordered":"")+(!0===e.square?" q-card--square no-border-radius":"")+(!0===e.flat?" q-card--flat no-shadow":"")));return()=>(0,n.h)(e.tag,{class:a.value},(0,r.zm)(t.default))}})},62669:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(20018),s=i(29467),r=i(65139);const a=(0,s.a0)({name:"QCardActions",props:{...o.fR,vertical:Boolean},setup(e,{slots:t}){const i=(0,o.Ay)(e),s=(0,n.EW)((()=>`q-card__actions ${i.value} q-card__actions--`+(!0===e.vertical?"vert column":"horiz row")));return()=>(0,n.h)("div",{class:s.value},(0,r.zm)(t.default))}})},44189:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QCardSection",props:{tag:{type:String,default:"div"},horizontal:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-card__section q-card__section--"+(!0===e.horizontal?"horiz row no-wrap":"vert")));return()=>(0,n.h)(e.tag,{class:i.value},(0,s.zm)(t.default))}})},80460:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(50492),s=i(29467),r=i(80003);const a=()=>(0,n.h)("div",{key:"svg",class:"q-checkbox__bg absolute"},[(0,n.h)("svg",{class:"q-checkbox__svg fit absolute-full",viewBox:"0 0 24 24"},[(0,n.h)("path",{class:"q-checkbox__truthy",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}),(0,n.h)("path",{class:"q-checkbox__indet",d:"M4,14H20V10H4"})])]),l=(0,s.a0)({name:"QCheckbox",props:r.jh,emits:r.LA,setup(e){const t=a();function i(i,s){const r=(0,n.EW)((()=>(!0===i.value?e.checkedIcon:!0===s.value?e.indeterminateIcon:e.uncheckedIcon)||null));return()=>null!==r.value?[(0,n.h)("div",{key:"icon",class:"q-checkbox__icon-container absolute-full flex flex-center no-wrap"},[(0,n.h)(o.A,{class:"q-checkbox__icon",name:r.value})])]:[t]}return(0,r.Ay)("checkbox",i)}})},80003:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>p,LA:()=>g,jh:()=>h});i(10239);var n=i(61758),o=i(38734),s=i(16372),r=i(61906),a=i(8014),l=i(52510),c=i(10447),d=i(22500),u=i(65139);const h={...s.C,...r.x_,...l.Sc,modelValue:{required:!0,default:null},val:{},trueValue:{default:!0},falseValue:{default:!1},indeterminateValue:{default:null},checkedIcon:String,uncheckedIcon:String,indeterminateIcon:String,toggleOrder:{type:String,validator:e=>"tf"===e||"ft"===e},toggleIndeterminate:Boolean,label:String,leftLabel:Boolean,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},g=["update:modelValue"];function p(e,t){const{props:i,slots:h,emit:g,proxy:p}=(0,n.nI)(),{$q:f}=p,m=(0,s.A)(i,f),_=(0,o.KR)(null),{refocusTargetEl:v,refocusTarget:b}=(0,a.A)(i,_),y=(0,r.Ay)(i,c.A),w=(0,n.EW)((()=>void 0!==i.val&&Array.isArray(i.modelValue))),C=(0,n.EW)((()=>{const e=(0,o.ux)(i.val);return!0===w.value?i.modelValue.findIndex((t=>(0,o.ux)(t)===e)):-1})),S=(0,n.EW)((()=>!0===w.value?-1!==C.value:(0,o.ux)(i.modelValue)===(0,o.ux)(i.trueValue))),k=(0,n.EW)((()=>!0===w.value?-1===C.value:(0,o.ux)(i.modelValue)===(0,o.ux)(i.falseValue))),x=(0,n.EW)((()=>!1===S.value&&!1===k.value)),E=(0,n.EW)((()=>!0===i.disable?-1:i.tabindex||0)),L=(0,n.EW)((()=>`q-${e} cursor-pointer no-outline row inline no-wrap items-center`+(!0===i.disable?" disabled":"")+(!0===m.value?` q-${e}--dark`:"")+(!0===i.dense?` q-${e}--dense`:"")+(!0===i.leftLabel?" reverse":""))),T=(0,n.EW)((()=>{const t=!0===S.value?"truthy":!0===k.value?"falsy":"indet",n=void 0===i.color||!0!==i.keepColor&&("toggle"===e?!0!==S.value:!0===k.value)?"":` text-${i.color}`;return`q-${e}__inner relative-position non-selectable q-${e}__inner--${t}${n}`})),I=(0,n.EW)((()=>{const e={type:"checkbox"};return void 0!==i.name&&Object.assign(e,{".checked":S.value,"^checked":!0===S.value?"checked":void 0,name:i.name,value:!0===w.value?i.val:i.trueValue}),e})),D=(0,l.vq)(I),R=(0,n.EW)((()=>{const t={tabindex:E.value,role:"toggle"===e?"switch":"checkbox","aria-label":i.label,"aria-checked":!0===x.value?"mixed":!0===S.value?"true":"false"};return!0===i.disable&&(t["aria-disabled"]="true"),t}));function N(e){void 0!==e&&((0,d.Gu)(e),b(e)),!0!==i.disable&&g("update:modelValue",A(),e)}function A(){if(!0===w.value){if(!0===S.value){const e=i.modelValue.slice();return e.splice(C.value,1),e}return i.modelValue.concat([i.val])}if(!0===S.value){if("ft"!==i.toggleOrder||!1===i.toggleIndeterminate)return i.falseValue}else{if(!0!==k.value)return"ft"!==i.toggleOrder?i.trueValue:i.falseValue;if("ft"===i.toggleOrder||!1===i.toggleIndeterminate)return i.trueValue}return i.indeterminateValue}function O(e){13!==e.keyCode&&32!==e.keyCode||(0,d.Gu)(e)}function P(e){13!==e.keyCode&&32!==e.keyCode||N(e)}const M=t(S,x);return Object.assign(p,{toggle:N}),()=>{const t=M();!0!==i.disable&&D(t,"unshift",` q-${e}__native absolute q-ma-none q-pa-none`);const o=[(0,n.h)("div",{class:T.value,style:y.value,"aria-hidden":"true"},t)];null!==v.value&&o.push(v.value);const s=void 0!==i.label?(0,u.Hp)(h.default,[i.label]):(0,u.zm)(h.default);return void 0!==s&&o.push((0,n.h)("div",{class:`q-${e}__label q-anchor--skip`},s)),(0,n.h)("div",{ref:_,class:L.value,...R.value,onClick:N,onKeydown:O,onKeyup:P},o)}}},66760:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});i(10239);var n=i(61758),o=i(50492),s=i(39626),r=i(16372),a=i(61906),l=i(29467),c=i(22500),d=i(65139);const u={xs:8,sm:10,md:14,lg:20,xl:24},h=(0,l.a0)({name:"QChip",props:{...r.C,...a.x_,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:["update:modelValue","update:selected","remove","click"],setup(e,{slots:t,emit:i}){const{proxy:{$q:l}}=(0,n.nI)(),h=(0,r.A)(e,l),g=(0,a.Ay)(e,u),p=(0,n.EW)((()=>!0===e.selected||void 0!==e.icon)),f=(0,n.EW)((()=>!0===e.selected?e.iconSelected||l.iconSet.chip.selected:e.icon)),m=(0,n.EW)((()=>e.iconRemove||l.iconSet.chip.remove)),_=(0,n.EW)((()=>!1===e.disable&&(!0===e.clickable||null!==e.selected))),v=(0,n.EW)((()=>{const t=!0===e.outline&&e.color||e.textColor;return"q-chip row inline no-wrap items-center"+(!1===e.outline&&void 0!==e.color?` bg-${e.color}`:"")+(t?` text-${t} q-chip--colored`:"")+(!0===e.disable?" disabled":"")+(!0===e.dense?" q-chip--dense":"")+(!0===e.outline?" q-chip--outline":"")+(!0===e.selected?" q-chip--selected":"")+(!0===_.value?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(!0===e.square?" q-chip--square":"")+(!0===h.value?" q-chip--dark q-dark":"")})),b=(0,n.EW)((()=>{const t=!0===e.disable?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},i={...t,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||l.lang.label.remove};return{chip:t,remove:i}}));function y(e){13===e.keyCode&&w(e)}function w(t){e.disable||(i("update:selected",!e.selected),i("click",t))}function C(t){void 0!==t.keyCode&&13!==t.keyCode||((0,c.Gu)(t),!1===e.disable&&(i("update:modelValue",!1),i("remove")))}function S(){const i=[];!0===_.value&&i.push((0,n.h)("div",{class:"q-focus-helper"})),!0===p.value&&i.push((0,n.h)(o.A,{class:"q-chip__icon q-chip__icon--left",name:f.value}));const s=void 0!==e.label?[(0,n.h)("div",{class:"ellipsis"},[e.label])]:void 0;return i.push((0,n.h)("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},(0,d.bG)(t.default,s))),e.iconRight&&i.push((0,n.h)(o.A,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),!0===e.removable&&i.push((0,n.h)(o.A,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:m.value,...b.value.remove,onClick:C,onKeyup:C})),i}return()=>{if(!1===e.modelValue)return;const t={class:v.value,style:g.value};return!0===_.value&&Object.assign(t,b.value.chip,{onClick:w,onKeyup:y}),(0,d.Kf)("div",t,S(),"ripple",!1!==e.ripple&&!0!==e.disable,(()=>[[s.A,e.ripple]]))}}})},34222:(e,t,i)=>{"use strict";i.d(t,{A:()=>g});i(10239);var n=i(61758),o=i(61906);const s={...o.x_,min:{type:Number,default:0},max:{type:Number,default:100},color:String,centerColor:String,trackColor:String,fontSize:String,rounded:Boolean,thickness:{type:Number,default:.2,validator:e=>e>=0&&e<=1},angle:{type:Number,default:0},showValue:Boolean,reverse:Boolean,instantFeedback:Boolean};var r=i(29467),a=i(65139),l=i(82732);const c=50,d=2*c,u=d*Math.PI,h=Math.round(1e3*u)/1e3,g=(0,r.a0)({name:"QCircularProgress",props:{...s,value:{type:Number,default:0},animationSpeed:{type:[String,Number],default:600},indeterminate:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),s=(0,o.Ay)(e),r=(0,n.EW)((()=>{const t=(!0===i.lang.rtl?-1:1)*e.angle;return{transform:e.reverse!==(!0===i.lang.rtl)?`scale3d(-1, 1, 1) rotate3d(0, 0, 1, ${-90-t}deg)`:`rotate3d(0, 0, 1, ${t-90}deg)`}})),g=(0,n.EW)((()=>!0!==e.instantFeedback&&!0!==e.indeterminate?{transition:`stroke-dashoffset ${e.animationSpeed}ms ease 0s, stroke ${e.animationSpeed}ms ease`}:"")),p=(0,n.EW)((()=>d/(1-e.thickness/2))),f=(0,n.EW)((()=>`${p.value/2} ${p.value/2} ${p.value} ${p.value}`)),m=(0,n.EW)((()=>(0,l.Tq)(e.value,e.min,e.max))),_=(0,n.EW)((()=>e.max-e.min)),v=(0,n.EW)((()=>e.thickness/2*p.value)),b=(0,n.EW)((()=>{const t=(e.max-m.value)/_.value,i=!0===e.rounded&&m.value{const i=[];void 0!==e.centerColor&&"transparent"!==e.centerColor&&i.push((0,n.h)("circle",{class:`q-circular-progress__center text-${e.centerColor}`,fill:"currentColor",r:c-v.value/2,cx:p.value,cy:p.value})),void 0!==e.trackColor&&"transparent"!==e.trackColor&&i.push(y({cls:"track",thickness:v.value,offset:0,color:e.trackColor})),i.push(y({cls:"circle",thickness:v.value,offset:b.value,color:e.color,rounded:!0===e.rounded?"round":void 0}));const o=[(0,n.h)("svg",{class:"q-circular-progress__svg",style:r.value,viewBox:f.value,"aria-hidden":"true"},i)];return!0===e.showValue&&o.push((0,n.h)("div",{class:"q-circular-progress__text absolute-full row flex-center content-center",style:{fontSize:e.fontSize}},void 0!==t.default?t.default():[(0,n.h)("div",m.value)])),(0,n.h)("div",{class:`q-circular-progress q-circular-progress--${!0===e.indeterminate?"in":""}determinate`,style:s.value,role:"progressbar","aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":!0===e.indeterminate?void 0:m.value},(0,a.bG)(t.internal,o))}}})},82156:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(61758),o=i(38734),s=i(29104),r=i(60414),a=i(24667),l=i(46019),c=i(52916),d=i(40454),u=i(52120),h=i(34276),g=i(29467),p=i(77556),f=i(65139),m=i(78773),_=i(88173),v=i(98983);let b=0;const y={standard:"fixed-full flex-center",top:"fixed-top justify-center",bottom:"fixed-bottom justify-center",right:"fixed-right items-center",left:"fixed-left items-center"},w={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},C=(0,g.a0)({name:"QDialog",inheritAttrs:!1,props:{...c.RI,...d.d,transitionShow:String,transitionHide:String,persistent:Boolean,autoClose:Boolean,allowFocusOutside:Boolean,noEscDismiss:Boolean,noBackdropDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,noShake:Boolean,seamless:Boolean,maximized:Boolean,fullWidth:Boolean,fullHeight:Boolean,square:Boolean,backdropFilter:String,position:{type:String,default:"standard",validator:e=>["standard","top","bottom","left","right"].includes(e)}},emits:[...c.Jl,"shake","click","escapeKey"],setup(e,{slots:t,emit:i,attrs:g}){const C=(0,n.nI)(),S=(0,o.KR)(null),k=(0,o.KR)(!1),x=(0,o.KR)(!1);let E,L,T=null,I=null;const D=(0,n.EW)((()=>!0!==e.persistent&&!0!==e.noRouteDismiss&&!0!==e.seamless)),{preventBodyScroll:R}=(0,h.A)(),{registerTimeout:N}=(0,a.A)(),{registerTick:A,removeTick:O}=(0,l.A)(),{transitionProps:P,transitionStyle:M}=(0,d.A)(e,(()=>w[e.position][0]),(()=>w[e.position][1])),F=(0,n.EW)((()=>M.value+(void 0!==e.backdropFilter?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:""))),{showPortal:B,hidePortal:W,portalIsAccessible:H,renderPortal:V}=(0,u.A)(C,S,se,"dialog"),{hide:j}=(0,c.Ay)({showing:k,hideOnRouteChange:D,handleShow:Q,handleHide:Y,processOnMount:!0}),{addToHistory:z,removeFromHistory:U}=(0,r.A)(k,j,D),$=(0,n.EW)((()=>"q-dialog__inner flex no-pointer-events q-dialog__inner--"+(!0===e.maximized?"maximized":"minimized")+` q-dialog__inner--${e.position} ${y[e.position]}`+(!0===x.value?" q-dialog__inner--animating":"")+(!0===e.fullWidth?" q-dialog__inner--fullwidth":"")+(!0===e.fullHeight?" q-dialog__inner--fullheight":"")+(!0===e.square?" q-dialog__inner--square":""))),q=(0,n.EW)((()=>!0===k.value&&!0!==e.seamless)),K=(0,n.EW)((()=>!0===e.autoClose?{onClick:ie}:{})),G=(0,n.EW)((()=>["q-dialog fullscreen no-pointer-events q-dialog--"+(!0===q.value?"modal":"seamless"),g.class]));function Q(t){z(),I=!1===e.noRefocus&&null!==document.activeElement?document.activeElement:null,te(e.maximized),B(),x.value=!0,!0!==e.noFocus?(null!==document.activeElement&&document.activeElement.blur(),A(Z)):O(),N((()=>{if(!0===C.proxy.$q.platform.is.ios){if(!0!==e.seamless&&document.activeElement){const{top:e,bottom:t}=document.activeElement.getBoundingClientRect(),{innerHeight:i}=window,n=void 0!==window.visualViewport?window.visualViewport.height:i;e>0&&t>n/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-n,t>=i?1/0:Math.ceil(document.scrollingElement.scrollTop+t-n/2))),document.activeElement.scrollIntoView()}L=!0,S.value.click(),L=!1}B(!0),x.value=!1,i("show",t)}),e.transitionDuration)}function Y(t){O(),U(),ee(!0),x.value=!0,W(),null!==I&&(((t&&0===t.type.indexOf("key")?I.closest('[tabindex]:not([tabindex^="-"])'):void 0)||I).focus(),I=null),N((()=>{W(!0),x.value=!1,i("hide",t)}),e.transitionDuration)}function Z(e){(0,v.Gy)((()=>{let t=S.value;if(null!==t){if(void 0!==e){const i=t.querySelector(e);if(null!==i)return void i.focus({preventScroll:!0})}!0!==t.contains(document.activeElement)&&(t=t.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||t.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||t.querySelector("[autofocus], [data-autofocus]")||t,t.focus({preventScroll:!0}))}}))}function X(e){e&&"function"===typeof e.focus?e.focus({preventScroll:!0}):Z(),i("shake");const t=S.value;null!==t&&(t.classList.remove("q-animate--scale"),t.classList.add("q-animate--scale"),null!==T&&clearTimeout(T),T=setTimeout((()=>{T=null,null!==S.value&&(t.classList.remove("q-animate--scale"),Z())}),170))}function J(){!0!==e.seamless&&(!0===e.persistent||!0===e.noEscDismiss?!0!==e.maximized&&!0!==e.noShake&&X():(i("escapeKey"),j()))}function ee(t){null!==T&&(clearTimeout(T),T=null),!0!==t&&!0!==k.value||(te(!1),!0!==e.seamless&&(R(!1),(0,_.v)(oe),(0,m.V)(J))),!0!==t&&(I=null)}function te(e){!0===e?!0!==E&&(b<1&&document.body.classList.add("q-body--dialog"),b++,E=!0):!0===E&&(b<2&&document.body.classList.remove("q-body--dialog"),b--,E=!1)}function ie(e){!0!==L&&(j(e),i("click",e))}function ne(t){!0!==e.persistent&&!0!==e.noBackdropDismiss?j(t):!0!==e.noShake&&X()}function oe(t){!0!==e.allowFocusOutside&&!0===H.value&&!0!==(0,p.$J)(S.value,t.target)&&Z('[tabindex]:not([tabindex="-1"])')}function se(){return(0,n.h)("div",{role:"dialog","aria-modal":!0===q.value?"true":"false",...g,class:G.value},[(0,n.h)(s.eB,{name:"q-transition--fade",appear:!0},(()=>!0===q.value?(0,n.h)("div",{class:"q-dialog__backdrop fixed-full",style:F.value,"aria-hidden":"true",tabindex:-1,onClick:ne}):null)),(0,n.h)(s.eB,P.value,(()=>!0===k.value?(0,n.h)("div",{ref:S,class:$.value,style:M.value,tabindex:-1,...K.value},(0,f.zm)(t.default)):null))])}return(0,n.wB)((()=>e.maximized),(e=>{!0===k.value&&te(e)})),(0,n.wB)(q,(e=>{R(e),!0===e?((0,_.g)(oe),(0,m.I)(J)):((0,_.v)(oe),(0,m.V)(J))})),Object.assign(C.proxy,{focus:Z,shake:X,__updateRefocusTarget(e){I=e||null}}),(0,n.xo)(ee),V}})},76056:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});i(10239);var n=i(61758),o=i(38734),s=i(60414),r=i(52916),a=i(34276),l=i(24667),c=i(16372),d=i(89390),u=i(29467),h=i(82732),g=i(65139),p=i(27973);const f=150,m=(0,u.a0)({name:"QDrawer",inheritAttrs:!1,props:{...r.RI,...c.C,side:{type:String,default:"left",validator:e=>["left","right"].includes(e)},width:{type:Number,default:300},mini:Boolean,miniToOverlay:Boolean,miniWidth:{type:Number,default:57},noMiniAnimation:Boolean,breakpoint:{type:Number,default:1023},showIfAbove:Boolean,behavior:{type:String,validator:e=>["default","desktop","mobile"].includes(e),default:"default"},bordered:Boolean,elevated:Boolean,overlay:Boolean,persistent:Boolean,noSwipeOpen:Boolean,noSwipeClose:Boolean,noSwipeBackdrop:Boolean},emits:[...r.Jl,"onLayout","miniState"],setup(e,{slots:t,emit:i,attrs:u}){const m=(0,n.nI)(),{proxy:{$q:_}}=m,v=(0,c.A)(e,_),{preventBodyScroll:b}=(0,a.A)(),{registerTimeout:y,removeTimeout:w}=(0,l.A)(),C=(0,n.WQ)(p.ON,p.U_);if(C===p.U_)return console.error("QDrawer needs to be child of QLayout"),p.U_;let S,k,x=null;const E=(0,o.KR)("mobile"===e.behavior||"desktop"!==e.behavior&&C.totalWidth.value<=e.breakpoint),L=(0,n.EW)((()=>!0===e.mini&&!0!==E.value)),T=(0,n.EW)((()=>!0===L.value?e.miniWidth:e.width)),I=(0,o.KR)(!0===e.showIfAbove&&!1===E.value||!0===e.modelValue),D=(0,n.EW)((()=>!0!==e.persistent&&(!0===E.value||!0===G.value)));function R(e,t){if(P(),!1!==e&&C.animate(),ae(0),!0===E.value){const e=C.instances[U.value];void 0!==e&&!0===e.belowBreakpoint&&e.hide(!1),le(1),!0!==C.isContainer.value&&b(!0)}else le(0),!1!==e&&ce(!1);y((()=>{!1!==e&&ce(!0),!0!==t&&i("show",e)}),f)}function N(e,t){M(),!1!==e&&C.animate(),le(0),ae(W.value*T.value),ge(),!0!==t?y((()=>{i("hide",e)}),f):w()}const{show:A,hide:O}=(0,r.Ay)({showing:I,hideOnRouteChange:D,handleShow:R,handleHide:N}),{addToHistory:P,removeFromHistory:M}=(0,s.A)(I,O,D),F={belowBreakpoint:E,hide:O},B=(0,n.EW)((()=>"right"===e.side)),W=(0,n.EW)((()=>(!0===_.lang.rtl?-1:1)*(!0===B.value?1:-1))),H=(0,o.KR)(0),V=(0,o.KR)(!1),j=(0,o.KR)(!1),z=(0,o.KR)(T.value*W.value),U=(0,n.EW)((()=>!0===B.value?"left":"right")),$=(0,n.EW)((()=>!0===I.value&&!1===E.value&&!1===e.overlay?!0===e.miniToOverlay?e.miniWidth:T.value:0)),q=(0,n.EW)((()=>!0===e.overlay||!0===e.miniToOverlay||-1!==C.view.value.indexOf(B.value?"R":"L")||!0===_.platform.is.ios&&!0===C.isContainer.value)),K=(0,n.EW)((()=>!1===e.overlay&&!0===I.value&&!1===E.value)),G=(0,n.EW)((()=>!0===e.overlay&&!0===I.value&&!1===E.value)),Q=(0,n.EW)((()=>"fullscreen q-drawer__backdrop"+(!1===I.value&&!1===V.value?" hidden":""))),Y=(0,n.EW)((()=>({backgroundColor:`rgba(0,0,0,${.4*H.value})`}))),Z=(0,n.EW)((()=>!0===B.value?"r"===C.rows.value.top[2]:"l"===C.rows.value.top[0])),X=(0,n.EW)((()=>!0===B.value?"r"===C.rows.value.bottom[2]:"l"===C.rows.value.bottom[0])),J=(0,n.EW)((()=>{const e={};return!0===C.header.space&&!1===Z.value&&(!0===q.value?e.top=`${C.header.offset}px`:!0===C.header.space&&(e.top=`${C.header.size}px`)),!0===C.footer.space&&!1===X.value&&(!0===q.value?e.bottom=`${C.footer.offset}px`:!0===C.footer.space&&(e.bottom=`${C.footer.size}px`)),e})),ee=(0,n.EW)((()=>{const e={width:`${T.value}px`,transform:`translateX(${z.value}px)`};return!0===E.value?e:Object.assign(e,J.value)})),te=(0,n.EW)((()=>"q-drawer__content fit "+(!0!==C.isContainer.value?"scroll":"overflow-auto"))),ie=(0,n.EW)((()=>`q-drawer q-drawer--${e.side}`+(!0===j.value?" q-drawer--mini-animate":"")+(!0===e.bordered?" q-drawer--bordered":"")+(!0===v.value?" q-drawer--dark q-dark":"")+(!0===V.value?" no-transition":!0===I.value?"":" q-layout--prevent-focus")+(!0===E.value?" fixed q-drawer--on-top q-drawer--mobile q-drawer--top-padding":" q-drawer--"+(!0===L.value?"mini":"standard")+(!0===q.value||!0!==K.value?" fixed":"")+(!0===e.overlay||!0===e.miniToOverlay?" q-drawer--on-top":"")+(!0===Z.value?" q-drawer--top-padding":"")))),ne=(0,n.EW)((()=>{const t=!0===_.lang.rtl?e.side:U.value;return[[d.A,ue,void 0,{[t]:!0,mouse:!0}]]})),oe=(0,n.EW)((()=>{const t=!0===_.lang.rtl?U.value:e.side;return[[d.A,he,void 0,{[t]:!0,mouse:!0}]]})),se=(0,n.EW)((()=>{const t=!0===_.lang.rtl?U.value:e.side;return[[d.A,he,void 0,{[t]:!0,mouse:!0,mouseAllDir:!0}]]}));function re(){fe(E,"mobile"===e.behavior||"desktop"!==e.behavior&&C.totalWidth.value<=e.breakpoint)}function ae(e){void 0===e?(0,n.dY)((()=>{e=!0===I.value?0:T.value,ae(W.value*e)})):(!0!==C.isContainer.value||!0!==B.value||!0!==E.value&&Math.abs(e)!==T.value||(e+=W.value*C.scrollbarWidth.value),z.value=e)}function le(e){H.value=e}function ce(e){const t=!0===e?"remove":!0!==C.isContainer.value?"add":"";""!==t&&document.body.classList[t]("q-body--drawer-toggle")}function de(){null!==x&&clearTimeout(x),m.proxy&&m.proxy.$el&&m.proxy.$el.classList.add("q-drawer--mini-animate"),j.value=!0,x=setTimeout((()=>{x=null,j.value=!1,m&&m.proxy&&m.proxy.$el&&m.proxy.$el.classList.remove("q-drawer--mini-animate")}),150)}function ue(e){if(!1!==I.value)return;const t=T.value,i=(0,h.Tq)(e.distance.x,0,t);if(!0===e.isFinal){const e=i>=Math.min(75,t);return!0===e?A():(C.animate(),le(0),ae(W.value*t)),void(V.value=!1)}ae((!0===_.lang.rtl?!0!==B.value:B.value)?Math.max(t-i,0):Math.min(0,i-t)),le((0,h.Tq)(i/t,0,1)),!0===e.isFirst&&(V.value=!0)}function he(t){if(!0!==I.value)return;const i=T.value,n=t.direction===e.side,o=(!0===_.lang.rtl?!0!==n:n)?(0,h.Tq)(t.distance.x,0,i):0;if(!0===t.isFinal){const e=Math.abs(o){!0===t?(S=I.value,!0===I.value&&O(!1)):!1===e.overlay&&"mobile"!==e.behavior&&!1!==S&&(!0===I.value?(ae(0),le(0),ge()):A(!1))})),(0,n.wB)((()=>e.side),((e,t)=>{C.instances[t]===F&&(C.instances[t]=void 0,C[t].space=!1,C[t].offset=0),C.instances[e]=F,C[e].size=T.value,C[e].space=K.value,C[e].offset=$.value})),(0,n.wB)(C.totalWidth,(()=>{!0!==C.isContainer.value&&!0===document.qScrollPrevented||re()})),(0,n.wB)((()=>e.behavior+e.breakpoint),re),(0,n.wB)(C.isContainer,(e=>{!0===I.value&&b(!0!==e),!0===e&&re()})),(0,n.wB)(C.scrollbarWidth,(()=>{ae(!0===I.value?0:void 0)})),(0,n.wB)($,(e=>{pe("offset",e)})),(0,n.wB)(K,(e=>{i("onLayout",e),pe("space",e)})),(0,n.wB)(B,(()=>{ae()})),(0,n.wB)(T,(t=>{ae(),me(e.miniToOverlay,t)})),(0,n.wB)((()=>e.miniToOverlay),(e=>{me(e,T.value)})),(0,n.wB)((()=>_.lang.rtl),(()=>{ae()})),(0,n.wB)((()=>e.mini),(()=>{e.noMiniAnimation||!0===e.modelValue&&(de(),C.animate())})),(0,n.wB)(L,(e=>{i("miniState",e)})),C.instances[e.side]=F,me(e.miniToOverlay,T.value),pe("space",K.value),pe("offset",$.value),!0===e.showIfAbove&&!0!==e.modelValue&&!0===I.value&&void 0!==e["onUpdate:modelValue"]&&i("update:modelValue",!0),(0,n.sV)((()=>{i("onLayout",K.value),i("miniState",L.value),S=!0===e.showIfAbove;const t=()=>{const e=!0===I.value?R:N;e(!1,!0)};0===C.totalWidth.value?k=(0,n.wB)(C.totalWidth,(()=>{k(),k=void 0,!1===I.value&&!0===e.showIfAbove&&!1===E.value?A(!1):t()})):(0,n.dY)(t)})),(0,n.xo)((()=>{void 0!==k&&k(),null!==x&&(clearTimeout(x),x=null),!0===I.value&&ge(),C.instances[e.side]===F&&(C.instances[e.side]=void 0,pe("size",0),pe("offset",0),pe("space",!1))})),()=>{const i=[];!0===E.value&&(!1===e.noSwipeOpen&&i.push((0,n.bo)((0,n.h)("div",{key:"open",class:`q-drawer__opener fixed-${e.side}`,"aria-hidden":"true"}),ne.value)),i.push((0,g.Kf)("div",{ref:"backdrop",class:Q.value,style:Y.value,"aria-hidden":"true",onClick:O},void 0,"backdrop",!0!==e.noSwipeBackdrop&&!0===I.value,(()=>se.value))));const o=!0===L.value&&void 0!==t.mini,s=[(0,n.h)("div",{...u,key:""+o,class:[te.value,u.class]},!0===o?t.mini():(0,g.zm)(t.default))];return!0===e.elevated&&!0===I.value&&s.push((0,n.h)("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),i.push((0,g.Kf)("aside",{ref:"content",class:ie.value,style:ee.value},s,"contentclose",!0!==e.noSwipeClose&&!0===E.value,(()=>oe.value))),(0,n.h)("div",{class:"q-drawer-container"},i)}}})},9459:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});i(42958),i(10239);var n=i(38734),o=i(61758),s=i(29104),r=i(90124),a=i(25173),l=i(13796),c=i(50492),d=i(29467);const u=(0,d.a0)({name:"QSlideTransition",props:{appear:Boolean,duration:{type:Number,default:300}},emits:["show","hide"],setup(e,{slots:t,emit:i}){let n,r,a,l,c=!1,d=null,u=null;function h(){n&&n(),n=null,c=!1,null!==d&&(clearTimeout(d),d=null),null!==u&&(clearTimeout(u),u=null),void 0!==r&&r.removeEventListener("transitionend",a),a=null}function g(t,i,o){void 0!==i&&(t.style.height=`${i}px`),t.style.transition=`height ${e.duration}ms cubic-bezier(.25, .8, .50, 1)`,c=!0,n=o}function p(e,t){e.style.overflowY=null,e.style.height=null,e.style.transition=null,h(),t!==l&&i(t)}function f(t,i){let n=0;r=t,!0===c?(h(),n=t.offsetHeight===t.scrollHeight?0:void 0):(l="hide",t.style.overflowY="hidden"),g(t,n,i),d=setTimeout((()=>{d=null,t.style.height=`${t.scrollHeight}px`,a=e=>{u=null,Object(e)===e&&e.target!==t||p(t,"show")},t.addEventListener("transitionend",a),u=setTimeout(a,1.1*e.duration)}),100)}function m(t,i){let n;r=t,!0===c?h():(l="show",t.style.overflowY="hidden",n=t.scrollHeight),g(t,n,i),d=setTimeout((()=>{d=null,t.style.height=0,a=e=>{u=null,Object(e)===e&&e.target!==t||p(t,"hide")},t.addEventListener("transitionend",a),u=setTimeout(a,1.1*e.duration)}),100)}return(0,o.xo)((()=>{!0===c&&h()})),()=>(0,o.h)(s.eB,{css:!1,appear:e.appear,onEnter:f,onLeave:m},t.default)}});var h=i(10386),g=i(16372),p=i(74915),f=i(47502),m=i(52916),_=i(22500),v=i(65139),b=i(85192);const y=(0,n.Gc)({}),w=Object.keys(f.Ji),C=(0,d.a0)({name:"QExpansionItem",props:{...f.Ji,...m.RI,...g.C,icon:String,label:String,labelLines:[Number,String],caption:String,captionLines:[Number,String],dense:Boolean,toggleAriaLabel:String,expandIcon:String,expandedIcon:String,expandIconClass:[Array,String,Object],duration:{},headerInsetLevel:Number,contentInsetLevel:Number,expandSeparator:Boolean,defaultOpened:Boolean,hideExpandIcon:Boolean,expandIconToggle:Boolean,switchToggleSide:Boolean,denseToggle:Boolean,group:String,popup:Boolean,headerStyle:[Array,String,Object],headerClass:[Array,String,Object]},emits:[...m.Jl,"click","afterShow","afterHide"],setup(e,{slots:t,emit:i}){const{proxy:{$q:d}}=(0,o.nI)(),f=(0,g.A)(e,d),C=(0,n.KR)(null!==e.modelValue?e.modelValue:e.defaultOpened),S=(0,n.KR)(null),k=(0,p.A)(),{show:x,hide:E,toggle:L}=(0,m.Ay)({showing:C});let T,I;const D=(0,o.EW)((()=>"q-expansion-item q-item-type q-expansion-item--"+(!0===C.value?"expanded":"collapsed")+" q-expansion-item--"+(!0===e.popup?"popup":"standard"))),R=(0,o.EW)((()=>{if(void 0===e.contentInsetLevel)return null;const t=!0===d.lang.rtl?"Right":"Left";return{["padding"+t]:56*e.contentInsetLevel+"px"}})),N=(0,o.EW)((()=>!0!==e.disable&&(void 0!==e.href||void 0!==e.to&&null!==e.to&&""!==e.to))),A=(0,o.EW)((()=>{const t={};return w.forEach((i=>{t[i]=e[i]})),t})),O=(0,o.EW)((()=>!0===N.value||!0!==e.expandIconToggle)),P=(0,o.EW)((()=>void 0!==e.expandedIcon&&!0===C.value?e.expandedIcon:e.expandIcon||d.iconSet.expansionItem[!0===e.denseToggle?"denseIcon":"icon"])),M=(0,o.EW)((()=>!0!==e.disable&&(!0===N.value||!0===e.expandIconToggle))),F=(0,o.EW)((()=>({expanded:!0===C.value,detailsId:k.value,toggle:L,show:x,hide:E}))),B=(0,o.EW)((()=>{const t=void 0!==e.toggleAriaLabel?e.toggleAriaLabel:d.lang.label[!0===C.value?"collapse":"expand"](e.label);return{role:"button","aria-expanded":!0===C.value?"true":"false","aria-controls":k.value,"aria-label":t}}));function W(e){!0!==N.value&&L(e),i("click",e)}function H(e){13===e.keyCode&&V(e,!0)}function V(e,t){!0!==t&&null!==S.value&&S.value.focus(),L(e),(0,_.Gu)(e)}function j(){i("afterShow")}function z(){i("afterHide")}function U(){void 0===T&&(T=(0,b.A)()),!0===C.value&&(y[e.group]=T);const t=(0,o.wB)(C,(t=>{!0===t?y[e.group]=T:y[e.group]===T&&delete y[e.group]})),i=(0,o.wB)((()=>y[e.group]),((e,t)=>{t===T&&void 0!==e&&e!==T&&E()}));I=()=>{t(),i(),y[e.group]===T&&delete y[e.group],I=void 0}}function $(){const t={class:["q-focusable relative-position cursor-pointer"+(!0===e.denseToggle&&!0===e.switchToggleSide?" items-end":""),e.expandIconClass],side:!0!==e.switchToggleSide,avatar:e.switchToggleSide},i=[(0,o.h)(c.A,{class:"q-expansion-item__toggle-icon"+(void 0===e.expandedIcon&&!0===C.value?" q-expansion-item__toggle-icon--rotated":""),name:P.value})];return!0===M.value&&(Object.assign(t,{tabindex:0,...B.value,onClick:V,onKeyup:H}),i.unshift((0,o.h)("div",{ref:S,class:"q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded",tabindex:-1}))),(0,o.h)(a.A,t,(()=>i))}function q(){let i;return void 0!==t.header?i=[].concat(t.header(F.value)):(i=[(0,o.h)(a.A,(()=>[(0,o.h)(l.A,{lines:e.labelLines},(()=>e.label||"")),e.caption?(0,o.h)(l.A,{lines:e.captionLines,caption:!0},(()=>e.caption)):null]))],e.icon&&i[!0===e.switchToggleSide?"push":"unshift"]((0,o.h)(a.A,{side:!0===e.switchToggleSide,avatar:!0!==e.switchToggleSide},(()=>(0,o.h)(c.A,{name:e.icon}))))),!0!==e.disable&&!0!==e.hideExpandIcon&&i[!0===e.switchToggleSide?"unshift":"push"]($()),i}function K(){const t={ref:"item",style:e.headerStyle,class:e.headerClass,dark:f.value,disable:e.disable,dense:e.dense,insetLevel:e.headerInsetLevel};return!0===O.value&&(t.clickable=!0,t.onClick=W,Object.assign(t,!0===N.value?A.value:B.value)),(0,o.h)(r.A,t,q)}function G(){return(0,o.bo)((0,o.h)("div",{key:"e-content",class:"q-expansion-item__content relative-position",style:R.value,id:k.value},(0,v.zm)(t.default)),[[s.aG,C.value]])}function Q(){const t=[K(),(0,o.h)(u,{duration:e.duration,onShow:j,onHide:z},G)];return!0===e.expandSeparator&&t.push((0,o.h)(h.A,{class:"q-expansion-item__border q-expansion-item__border--top absolute-top",dark:f.value}),(0,o.h)(h.A,{class:"q-expansion-item__border q-expansion-item__border--bottom absolute-bottom",dark:f.value})),t}return(0,o.wB)((()=>e.group),(e=>{void 0!==I&&I(),void 0!==e&&U()})),void 0!==e.group&&U(),(0,o.xo)((()=>{void 0!==I&&I()})),()=>(0,o.h)("div",{class:D.value},[(0,o.h)("div",{class:"q-expansion-item__container relative-position"},Q())])}})},49200:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});i(10239);var n=i(61758),o=i(38734),s=i(29467),r=i(22500),a=i(98983),l=i(65139),c=i(27973),d=i(15157);const u=(0,s.a0)({name:"QForm",props:{autofocus:Boolean,noErrorFocus:Boolean,noResetFocus:Boolean,greedy:Boolean,onSubmit:Function},emits:["reset","validationSuccess","validationError"],setup(e,{slots:t,emit:i}){const s=(0,n.nI)(),u=(0,o.KR)(null);let h=0;const g=[];function p(t){const n="boolean"===typeof t?t:!0!==e.noErrorFocus,o=++h,s=(e,t)=>{i("validation"+(!0===e?"Success":"Error"),t)},r=e=>{const t=e.validate();return"function"===typeof t.then?t.then((t=>({valid:t,comp:e})),(t=>({valid:!1,comp:e,err:t}))):Promise.resolve({valid:t,comp:e})},a=!0===e.greedy?Promise.all(g.map(r)).then((e=>e.filter((e=>!0!==e.valid)))):g.reduce(((e,t)=>e.then((()=>r(t).then((e=>{if(!1===e.valid)return Promise.reject(e)}))))),Promise.resolve()).catch((e=>[e]));return a.then((e=>{if(void 0===e||0===e.length)return o===h&&s(!0),!0;if(o===h){const{comp:t,err:i}=e[0];if(void 0!==i&&console.error(i),s(!1,t),!0===n){const t=e.find((({comp:e})=>"function"===typeof e.focus&&!1===(0,d.rU)(e.$)));void 0!==t&&t.comp.focus()}}return!1}))}function f(){h++,g.forEach((e=>{"function"===typeof e.resetValidation&&e.resetValidation()}))}function m(t){void 0!==t&&(0,r.Gu)(t);const n=h+1;p().then((o=>{n===h&&!0===o&&(void 0!==e.onSubmit?i("submit",t):void 0!==t&&void 0!==t.target&&"function"===typeof t.target.submit&&t.target.submit())}))}function _(t){void 0!==t&&(0,r.Gu)(t),i("reset"),(0,n.dY)((()=>{f(),!0===e.autofocus&&!0!==e.noResetFocus&&v()}))}function v(){(0,a.Gy)((()=>{if(null===u.value)return;const e=u.value.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||u.value.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||u.value.querySelector("[autofocus], [data-autofocus]")||Array.prototype.find.call(u.value.querySelectorAll("[tabindex]"),(e=>-1!==e.tabIndex));null!==e&&void 0!==e&&e.focus({preventScroll:!0})}))}(0,n.Gt)(c.q3,{bindComponent(e){g.push(e)},unbindComponent(e){const t=g.indexOf(e);-1!==t&&g.splice(t,1)}});let b=!1;return(0,n.Y4)((()=>{b=!0})),(0,n.n)((()=>{!0===b&&!0===e.autofocus&&v()})),(0,n.sV)((()=>{!0===e.autofocus&&v()})),Object.assign(s.proxy,{validate:p,resetValidation:f,submit:m,reset:_,focus:v,getValidationComponents:()=>g}),()=>(0,n.h)("form",{class:"q-form",ref:u,onSubmit:m,onReset:_},(0,l.zm)(t.default))}})},8416:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});i(10239);var n=i(61758),o=i(38734),s=i(1096),r=i(29467),a=i(65139),l=i(27973);const c=(0,r.a0)({name:"QHeader",props:{modelValue:{type:Boolean,default:!0},reveal:Boolean,revealOffset:{type:Number,default:250},bordered:Boolean,elevated:Boolean,heightHint:{type:[String,Number],default:50}},emits:["reveal","focusin"],setup(e,{slots:t,emit:i}){const{proxy:{$q:r}}=(0,n.nI)(),c=(0,n.WQ)(l.ON,l.U_);if(c===l.U_)return console.error("QHeader needs to be child of QLayout"),l.U_;const d=(0,o.KR)(parseInt(e.heightHint,10)),u=(0,o.KR)(!0),h=(0,n.EW)((()=>!0===e.reveal||-1!==c.view.value.indexOf("H")||r.platform.is.ios&&!0===c.isContainer.value)),g=(0,n.EW)((()=>{if(!0!==e.modelValue)return 0;if(!0===h.value)return!0===u.value?d.value:0;const t=d.value-c.scroll.value.position;return t>0?t:0})),p=(0,n.EW)((()=>!0!==e.modelValue||!0===h.value&&!0!==u.value)),f=(0,n.EW)((()=>!0===e.modelValue&&!0===p.value&&!0===e.reveal)),m=(0,n.EW)((()=>"q-header q-layout__section--marginal "+(!0===h.value?"fixed":"absolute")+"-top"+(!0===e.bordered?" q-header--bordered":"")+(!0===p.value?" q-header--hidden":"")+(!0!==e.modelValue?" q-layout--prevent-focus":""))),_=(0,n.EW)((()=>{const e=c.rows.value.top,t={};return"l"===e[0]&&!0===c.left.space&&(t[!0===r.lang.rtl?"right":"left"]=`${c.left.size}px`),"r"===e[2]&&!0===c.right.space&&(t[!0===r.lang.rtl?"left":"right"]=`${c.right.size}px`),t}));function v(e,t){c.update("header",e,t)}function b(e,t){e.value!==t&&(e.value=t)}function y({height:e}){b(d,e),v("size",e)}function w(e){!0===f.value&&b(u,!0),i("focusin",e)}(0,n.wB)((()=>e.modelValue),(e=>{v("space",e),b(u,!0),c.animate()})),(0,n.wB)(g,(e=>{v("offset",e)})),(0,n.wB)((()=>e.reveal),(t=>{!1===t&&b(u,e.modelValue)})),(0,n.wB)(u,(e=>{c.animate(),i("reveal",e)})),(0,n.wB)(c.scroll,(t=>{!0===e.reveal&&b(u,"up"===t.direction||t.position<=e.revealOffset||t.position-t.inflectionPoint<100)}));const C={};return c.instances.header=C,!0===e.modelValue&&v("size",d.value),v("space",e.modelValue),v("offset",g.value),(0,n.xo)((()=>{c.instances.header===C&&(c.instances.header=void 0,v("size",0),v("offset",0),v("space",!1))})),()=>{const i=(0,a.Ij)(t.default,[]);return!0===e.elevated&&i.push((0,n.h)("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),i.push((0,n.h)(s.A,{debounce:0,onResize:y})),(0,n.h)("header",{class:m.value,style:_.value,onFocusin:w},i)}}})},50492:(e,t,i)=>{"use strict";i.d(t,{A:()=>w});var n=i(61758),o=i(61906),s=i(29467),r=i(65139);const a="0 0 24 24",l=e=>e,c=e=>`ionicons ${e}`,d={"mdi-":e=>`mdi ${e}`,"icon-":l,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":c,"ion-ios":c,"ion-logo":c,"iconfont ":l,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},u={o_:"-outlined",r_:"-round",s_:"-sharp"},h={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},g=new RegExp("^("+Object.keys(d).join("|")+")"),p=new RegExp("^("+Object.keys(u).join("|")+")"),f=new RegExp("^("+Object.keys(h).join("|")+")"),m=/^[Mm]\s?[-+]?\.?\d/,_=/^img:/,v=/^svguse:/,b=/^ion-/,y=/^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,w=(0,s.a0)({name:"QIcon",props:{...o.x_,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),s=(0,o.Ay)(e),l=(0,n.EW)((()=>"q-icon"+(!0===e.left?" on-left":"")+(!0===e.right?" on-right":"")+(void 0!==e.color?` text-${e.color}`:""))),c=(0,n.EW)((()=>{let t,o=e.name;if("none"===o||!o)return{none:!0};if(null!==i.iconMapFn){const e=i.iconMapFn(o);if(void 0!==e){if(void 0===e.icon)return{cls:e.cls,content:void 0!==e.content?e.content:" "};if(o=e.icon,"none"===o||!o)return{none:!0}}}if(!0===m.test(o)){const[e,t=a]=o.split("|");return{svg:!0,viewBox:t,nodes:e.split("&&").map((e=>{const[t,i,o]=e.split("@@");return(0,n.h)("path",{style:i,d:t,transform:o})}))}}if(!0===_.test(o))return{img:!0,src:o.substring(4)};if(!0===v.test(o)){const[e,t=a]=o.split("|");return{svguse:!0,src:e.substring(7),viewBox:t}}let s=" ";const r=o.match(g);if(null!==r)t=d[r[1]](o);else if(!0===y.test(o))t=o;else if(!0===b.test(o))t=`ionicons ion-${!0===i.platform.is.ios?"ios":"md"}${o.substring(3)}`;else if(!0===f.test(o)){t="notranslate material-symbols";const e=o.match(f);null!==e&&(o=o.substring(6),t+=h[e[1]]),s=o}else{t="notranslate material-icons";const e=o.match(p);null!==e&&(o=o.substring(2),t+=u[e[1]]),s=o}return{cls:t,content:s}}));return()=>{const i={class:l.value,style:s.value,"aria-hidden":"true",role:"presentation"};return!0===c.value.none?(0,n.h)(e.tag,i,(0,r.zm)(t.default)):!0===c.value.img?(0,n.h)(e.tag,i,(0,r.Hp)(t.default,[(0,n.h)("img",{src:c.value.src})])):!0===c.value.svg?(0,n.h)(e.tag,i,(0,r.Hp)(t.default,[(0,n.h)("svg",{viewBox:c.value.viewBox||"0 0 24 24"},c.value.nodes)])):!0===c.value.svguse?(0,n.h)(e.tag,i,(0,r.Hp)(t.default,[(0,n.h)("svg",{viewBox:c.value.viewBox},[(0,n.h)("use",{"xlink:href":c.value.src})])])):(void 0!==c.value.cls&&(i.class+=" "+c.value.cls),(0,n.h)(e.tag,i,(0,r.Hp)(t.default,[c.value.content])))}}})},15046:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});i(10239);var n=i(38734),o=i(61758),s=i(29104),r=i(30564),a=i(41597);const l={ratio:[String,Number]};function c(e,t){return(0,o.EW)((()=>{const i=Number(e.ratio||(void 0!==t?t.value:void 0));return!0!==isNaN(i)&&i>0?{paddingBottom:100/i+"%"}:null}))}var d=i(29467),u=i(65139),h=i(15157),g=i(24667);const p=1.7778,f=(0,d.a0)({name:"QImg",props:{...l,src:String,srcset:String,sizes:String,alt:String,crossorigin:String,decoding:String,referrerpolicy:String,draggable:Boolean,loading:{type:String,default:"lazy"},loadingShowDelay:{type:[Number,String],default:0},fetchpriority:{type:String,default:"auto"},width:String,height:String,initialRatio:{type:[Number,String],default:p},placeholderSrc:String,errorSrc:String,fit:{type:String,default:"cover"},position:{type:String,default:"50% 50%"},imgClass:String,imgStyle:Object,noSpinner:Boolean,noNativeMenu:Boolean,noTransition:Boolean,spinnerColor:String,spinnerSize:String},emits:["load","error"],setup(e,{slots:t,emit:i}){const l=(0,n.KR)(e.initialRatio),d=c(e,l),p=(0,o.nI)(),{registerTimeout:f,removeTimeout:m}=(0,g.A)(),{registerTimeout:_,removeTimeout:v}=(0,g.A)(),b=(0,o.EW)((()=>void 0!==e.placeholderSrc?{src:e.placeholderSrc}:null)),y=(0,o.EW)((()=>void 0!==e.errorSrc?{src:e.errorSrc,__qerror:!0}:null)),w=[(0,n.KR)(null),(0,n.KR)(b.value)],C=(0,n.KR)(0),S=(0,n.KR)(!1),k=(0,n.KR)(!1),x=(0,o.EW)((()=>`q-img q-img--${!0===e.noNativeMenu?"no-":""}menu`)),E=(0,o.EW)((()=>({width:e.width,height:e.height}))),L=(0,o.EW)((()=>"q-img__image "+(void 0!==e.imgClass?e.imgClass+" ":"")+`q-img__image--with${!0===e.noTransition?"out":""}-transition q-img__image--`)),T=(0,o.EW)((()=>({...e.imgStyle,objectFit:e.fit,objectPosition:e.position})));function I(){v(),0!==e.loadingShowDelay?_((()=>{S.value=!0}),e.loadingShowDelay):S.value=!0}function D(){v(),S.value=!1}function R({target:e}){!1===(0,h.rU)(p)&&(m(),l.value=0===e.naturalHeight?.5:e.naturalWidth/e.naturalHeight,N(e,1))}function N(e,t){1e3!==t&&!0!==(0,h.rU)(p)&&(!0===e.complete?A(e):f((()=>{N(e,t+1)}),50))}function A(e){!0!==(0,h.rU)(p)&&(C.value=1^C.value,w[C.value].value=null,D(),"true"!==e.getAttribute("__qerror")&&(k.value=!1),i("load",e.currentSrc||e.src))}function O(e){m(),D(),k.value=!0,w[C.value].value=y.value,w[1^C.value].value=b.value,i("error",e)}function P(t){const i=w[t].value,n={key:"img_"+t,class:L.value,style:T.value,alt:e.alt,crossorigin:e.crossorigin,decoding:e.decoding,referrerpolicy:e.referrerpolicy,height:e.height,width:e.width,loading:e.loading,fetchpriority:e.fetchpriority,"aria-hidden":"true",draggable:e.draggable,...i};return C.value===t?Object.assign(n,{class:n.class+"current",onLoad:R,onError:O}):n.class+="loaded",(0,o.h)("div",{class:"q-img__container absolute-full",key:"img"+t},(0,o.h)("img",n))}function M(){return!1===S.value?(0,o.h)("div",{key:"content",class:"q-img__content absolute-full q-anchor--skip"},(0,u.zm)(t[!0===k.value?"error":"default"])):(0,o.h)("div",{key:"loading",class:"q-img__loading absolute-full flex flex-center"},void 0!==t.loading?t.loading():!0===e.noSpinner?void 0:[(0,o.h)(r.A,{color:e.spinnerColor,size:e.spinnerSize})])}{function F(){(0,o.wB)((()=>e.src||e.srcset||e.sizes?{src:e.src,srcset:e.srcset,sizes:e.sizes}:null),(e=>{m(),k.value=!1,null===e?(D(),w[1^C.value].value=b.value):I(),w[C.value].value=e}),{immediate:!0})}!0===a.ot.value?(0,o.sV)(F):F()}return()=>{const t=[];return null!==d.value&&t.push((0,o.h)("div",{key:"filler",style:d.value})),null!==w[0].value&&t.push(P(0)),null!==w[1].value&&t.push(P(1)),t.push((0,o.h)(s.eB,{name:"q-transition--fade"},M)),(0,o.h)("div",{key:"main",class:x.value,style:E.value,role:"img","aria-label":e.alt},t)}}})},39270:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(61758),o=i(38734),s=i(7617),r=(i(10239),i(2906));const a={date:"####/##/##",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"},l={"#":{pattern:"[\\d]",negate:"[^\\d]"},S:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]"},N:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]"},A:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleUpperCase()},a:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleLowerCase()},X:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleUpperCase()},x:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleLowerCase()}},c=Object.keys(l);c.forEach((e=>{l[e].regex=new RegExp(l[e].pattern)}));const d=new RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+c.join("")+"])|(.)","g"),u=/[.*+?^${}()|[\]\\]/g,h=String.fromCharCode(1),g={mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean};function p(e,t,i,s){let c,g,p,f,m,_;const v=(0,o.KR)(null),b=(0,o.KR)(w());function y(){return!0===e.autogrow||["textarea","text","search","url","tel","password"].includes(e.type)}function w(){if(S(),!0===v.value){const t=I(R(e.modelValue));return!1!==e.fillMask?N(t):t}return e.modelValue}function C(e){if(e0;n--)t+=h;i=i.slice(0,n)+t+i.slice(n)}return i}function S(){if(v.value=void 0!==e.mask&&0!==e.mask.length&&y(),!1===v.value)return f=void 0,c="",void(g="");const t=void 0===a[e.mask]?e.mask:a[e.mask],i="string"===typeof e.fillMask&&0!==e.fillMask.length?e.fillMask.slice(0,1):"_",n=i.replace(u,"\\$&"),o=[],s=[],r=[];let m=!0===e.reverseFillMask,_="",b="";t.replace(d,((e,t,i,n,a)=>{if(void 0!==n){const e=l[n];r.push(e),b=e.negate,!0===m&&(s.push("(?:"+b+"+)?("+e.pattern+"+)?(?:"+b+"+)?("+e.pattern+"+)?"),m=!1),s.push("(?:"+b+"+)?("+e.pattern+")?")}else if(void 0!==i)_="\\"+("\\"===i?"":i),r.push(i),o.push("([^"+_+"]+)?"+_+"?");else{const e=void 0!==t?t:a;_="\\"===e?"\\\\\\\\":e.replace(u,"\\\\$&"),r.push(e),o.push("([^"+_+"]+)?"+_+"?")}}));const w=new RegExp("^"+o.join("")+"("+(""===_?".":"[^"+_+"]")+"+)?"+(""===_?"":"["+_+"]*")+"$"),C=s.length-1,S=s.map(((t,i)=>0===i&&!0===e.reverseFillMask?new RegExp("^"+n+"*"+t):i===C?new RegExp("^"+t+"("+(""===b?".":b)+"+)?"+(!0===e.reverseFillMask?"$":n+"*")):new RegExp("^"+t)));p=r,f=t=>{const i=w.exec(!0===e.reverseFillMask?t:t.slice(0,r.length+1));null!==i&&(t=i.slice(1).join(""));const n=[],o=S.length;for(let e=0,i=t;e"string"===typeof e?e:h)).join(""),g=c.split(h).join(i)}function k(t,o,r){const a=s.value,l=a.selectionEnd,d=a.value.length-l,u=R(t);!0===o&&S();const p=I(u),f=!1!==e.fillMask?N(p):p,_=b.value!==f;a.value!==f&&(a.value=f),!0===_&&(b.value=f),document.activeElement===a&&(0,n.dY)((()=>{if(f!==g)if("insertFromPaste"!==r||!0===e.reverseFillMask)if(-1===["deleteContentBackward","deleteContentForward"].indexOf(r))if(!0===e.reverseFillMask)if(!0===_){const e=Math.max(0,f.length-(f===g?0:Math.min(p.length,d+1)));1===e&&1===l?a.setSelectionRange(e,e,"forward"):E.rightReverse(a,e)}else{const e=f.length-d;a.setSelectionRange(e,e,"backward")}else if(!0===_){const e=Math.max(0,c.indexOf(h),Math.min(p.length,l)-1);E.right(a,e)}else{const e=l-1;E.right(a,e)}else{const t=!0===e.reverseFillMask?0===l?f.length>p.length?1:0:Math.max(0,f.length-(f===g?0:Math.min(p.length,d)+1))+1:l;a.setSelectionRange(t,t,"forward")}else{const e=a.selectionEnd;let t=l-1;for(let i=m;i<=t&&ie.type+e.autogrow),S),(0,n.wB)((()=>e.mask),(i=>{if(void 0!==i)k(b.value,!0);else{const i=R(b.value);S(),e.modelValue!==i&&t("update:modelValue",i)}})),(0,n.wB)((()=>e.fillMask+e.reverseFillMask),(()=>{!0===v.value&&k(b.value,!0)})),(0,n.wB)((()=>e.unmaskedValue),(()=>{!0===v.value&&k(b.value)}));const E={left(e,t){const i=-1===c.slice(t-1).indexOf(h);let n=Math.max(0,t-1);for(;n>=0;n--)if(c[n]===h){t=n,!0===i&&t++;break}if(n<0&&void 0!==c[t]&&c[t]!==h)return E.right(e,0);t>=0&&e.setSelectionRange(t,t,"backward")},right(e,t){const i=e.value.length;let n=Math.min(i,t+1);for(;n<=i;n++){if(c[n]===h){t=n;break}c[n-1]===h&&(t=n)}if(n>i&&void 0!==c[t-1]&&c[t-1]!==h)return E.left(e,i);e.setSelectionRange(t,t,"forward")},leftReverse(e,t){const i=C(e.value.length);let n=Math.max(0,t-1);for(;n>=0;n--){if(i[n-1]===h){t=n;break}if(i[n]===h&&(t=n,0===n))break}if(n<0&&void 0!==i[t]&&i[t]!==h)return E.rightReverse(e,0);t>=0&&e.setSelectionRange(t,t,"backward")},rightReverse(e,t){const i=e.value.length,n=C(i),o=-1===n.slice(0,t+1).indexOf(h);let s=Math.min(i,t+1);for(;s<=i;s++)if(n[s-1]===h){t=s,t>0&&!0===o&&t--;break}if(s>i&&void 0!==n[t-1]&&n[t-1]!==h)return E.leftReverse(e,i);e.setSelectionRange(t,t,"forward")}};function L(e){t("click",e),_=void 0}function T(i){if(t("keydown",i),!0===(0,r.JL)(i)||!0===i.altKey)return;const n=s.value,o=n.selectionStart,a=n.selectionEnd;if(i.shiftKey||(_=void 0),37===i.keyCode||39===i.keyCode){i.shiftKey&&void 0===_&&(_="forward"===n.selectionDirection?o:a);const t=E[(39===i.keyCode?"right":"left")+(!0===e.reverseFillMask?"Reverse":"")];if(i.preventDefault(),t(n,_===o?a:o),i.shiftKey){const e=n.selectionStart;n.setSelectionRange(Math.min(_,e),Math.max(_,e),"forward")}}else 8===i.keyCode&&!0!==e.reverseFillMask&&o===a?(E.left(n,o),n.setSelectionRange(n.selectionStart,a,"backward")):46===i.keyCode&&!0===e.reverseFillMask&&o===a&&(E.rightReverse(n,a),n.setSelectionRange(o,n.selectionEnd,"forward"))}function I(t){if(void 0===t||null===t||""===t)return"";if(!0===e.reverseFillMask)return D(t);const i=p;let n=0,o="";for(let e=0;e=0&&-1!==n;s--){const r=t[s];let a=e[n];if("string"===typeof r)o=r+o,a===r&&n--;else{if(void 0===a||!r.regex.test(a))return o;do{o=(void 0!==r.transform?r.transform(a):a)+o,n--,a=e[n]}while(i===s&&void 0!==a&&r.regex.test(a))}}return o}function R(e){return"string"!==typeof e||void 0===f?"number"===typeof e?f(""+e):e:f(e)}function N(t){return g.length-t.length<=0?t:!0===e.reverseFillMask&&0!==t.length?g.slice(0,-t.length)+t:t+g.slice(t.length)}return{innerValue:b,hasMask:v,moveCursorForPaste:x,updateMaskValue:k,onMaskedKeydown:T,onMaskedClick:L}}var f=i(52510);function m(e,t){function i(){const t=e.modelValue;try{const e="DataTransfer"in window?new DataTransfer:"ClipboardEvent"in window?new ClipboardEvent("").clipboardData:void 0;return Object(t)===t&&("length"in t?Array.from(t):[t]).forEach((t=>{e.items.add(t)})),{files:e.files}}catch(e){return{files:void 0}}}return!0===t?(0,n.EW)((()=>{if("file"===e.type)return i()})):(0,n.EW)(i)}var _=i(32342),v=i(29467),b=i(22500),y=i(98983),w=i(82453);const C=(0,v.a0)({name:"QInput",inheritAttrs:!1,props:{...s.OJ,...g,...f.Sc,modelValue:[String,Number,FileList],shadowText:String,type:{type:String,default:"text"},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},emits:[...s.mU,"paste","change","keydown","click","animationend"],setup(e,{emit:t,attrs:i}){const{proxy:r}=(0,n.nI)(),{$q:a}=r,l={};let c,d,u,h=NaN,g=null;const v=(0,o.KR)(null),C=(0,f.M4)(e),{innerValue:S,hasMask:k,moveCursorForPaste:x,updateMaskValue:E,onMaskedKeydown:L,onMaskedClick:T}=p(e,t,j,v),I=m(e,!0),D=(0,n.EW)((()=>(0,s.o9)(S.value))),R=(0,_.A)(H),N=(0,s.$7)({changeEvent:!0}),A=(0,n.EW)((()=>"textarea"===e.type||!0===e.autogrow)),O=(0,n.EW)((()=>!0===A.value||["text","search","url","tel","password"].includes(e.type))),P=(0,n.EW)((()=>{const t={...N.splitAttrs.listeners.value,onInput:H,onPaste:W,onChange:U,onBlur:$,onFocus:b.ds};return t.onCompositionstart=t.onCompositionupdate=t.onCompositionend=R,!0===k.value&&(t.onKeydown=L,t.onClick=T),!0===e.autogrow&&(t.onAnimationend=V),t})),M=(0,n.EW)((()=>{const t={tabindex:0,"data-autofocus":!0===e.autofocus||void 0,rows:"textarea"===e.type?6:void 0,"aria-label":e.label,name:C.value,...N.splitAttrs.attributes.value,id:N.targetUid.value,maxlength:e.maxlength,disabled:!0===e.disable,readonly:!0===e.readonly};return!1===A.value&&(t.type=e.type),!0===e.autogrow&&(t.rows=1),t}));function F(){(0,y.Gy)((()=>{const e=document.activeElement;null===v.value||v.value===e||null!==e&&e.id===N.targetUid.value||v.value.focus({preventScroll:!0})}))}function B(){null!==v.value&&v.value.select()}function W(i){if(!0===k.value&&!0!==e.reverseFillMask){const e=i.target;x(e,e.selectionStart,e.selectionEnd)}t("paste",i)}function H(i){if(!i||!i.target)return;if("file"===e.type)return void t("update:modelValue",i.target.files);const o=i.target.value;if(!0!==i.target.qComposing){if(!0===k.value)E(o,!1,i.inputType);else if(j(o),!0===O.value&&i.target===document.activeElement){const{selectionStart:e,selectionEnd:t}=i.target;void 0!==e&&void 0!==t&&(0,n.dY)((()=>{i.target===document.activeElement&&0===o.indexOf(i.target.value)&&i.target.setSelectionRange(e,t)}))}!0===e.autogrow&&z()}else l.value=o}function V(e){t("animationend",e),z()}function j(i,o){u=()=>{g=null,"number"!==e.type&&!0===l.hasOwnProperty("value")&&delete l.value,e.modelValue!==i&&h!==i&&(h=i,!0===o&&(d=!0),t("update:modelValue",i),(0,n.dY)((()=>{h===i&&(h=NaN)}))),u=void 0},"number"===e.type&&(c=!0,l.value=i),void 0!==e.debounce?(null!==g&&clearTimeout(g),l.value=i,g=setTimeout(u,e.debounce)):u()}function z(){requestAnimationFrame((()=>{const e=v.value;if(null!==e){const t=e.parentNode.style,{scrollTop:i}=e,{overflowY:n,maxHeight:o}=!0===a.platform.is.firefox?{}:window.getComputedStyle(e),s=void 0!==n&&"scroll"!==n;!0===s&&(e.style.overflowY="hidden"),t.marginBottom=e.scrollHeight-1+"px",e.style.height="1px",e.style.height=e.scrollHeight+"px",!0===s&&(e.style.overflowY=parseInt(o,10){null!==v.value&&(v.value.value=void 0!==S.value?S.value:"")}))}function q(){return!0===l.hasOwnProperty("value")?l.value:void 0!==S.value?S.value:""}(0,n.wB)((()=>e.type),(()=>{v.value&&(v.value.value=e.modelValue)})),(0,n.wB)((()=>e.modelValue),(t=>{if(!0===k.value){if(!0===d&&(d=!1,String(t)===h))return;E(t)}else S.value!==t&&(S.value=t,"number"===e.type&&!0===l.hasOwnProperty("value")&&(!0===c?c=!1:delete l.value));!0===e.autogrow&&(0,n.dY)(z)})),(0,n.wB)((()=>e.autogrow),(e=>{!0===e?(0,n.dY)(z):null!==v.value&&i.rows>0&&(v.value.style.height="auto")})),(0,n.wB)((()=>e.dense),(()=>{!0===e.autogrow&&(0,n.dY)(z)})),(0,n.xo)((()=>{$()})),(0,n.sV)((()=>{!0===e.autogrow&&z()})),Object.assign(N,{innerValue:S,fieldClass:(0,n.EW)((()=>"q-"+(!0===A.value?"textarea":"input")+(!0===e.autogrow?" q-textarea--autogrow":""))),hasShadow:(0,n.EW)((()=>"file"!==e.type&&"string"===typeof e.shadowText&&0!==e.shadowText.length)),inputRef:v,emitValue:j,hasValue:D,floatingLabel:(0,n.EW)((()=>!0===D.value&&("number"!==e.type||!1===isNaN(S.value))||(0,s.o9)(e.displayValue))),getControl:()=>(0,n.h)(!0===A.value?"textarea":"input",{ref:v,class:["q-field__native q-placeholder",e.inputClass],style:e.inputStyle,...M.value,...P.value,..."file"!==e.type?{value:q()}:I.value}),getShadowControl:()=>(0,n.h)("div",{class:"q-field__native q-field__shadow absolute-bottom no-pointer-events"+(!0===A.value?"":" text-no-wrap")},[(0,n.h)("span",{class:"invisible"},q()),(0,n.h)("span",e.shadowText)])});const K=(0,s.Ay)(N);return Object.assign(r,{focus:F,select:B,getNativeElement:()=>v.value}),(0,w.$)(r,"nativeEl",(()=>v.value)),K}})},90124:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});i(42958);var n=i(61758),o=i(38734),s=i(16372),r=i(47502),a=i(29467),l=i(65139),c=i(22500),d=i(2906);const u=(0,a.a0)({name:"QItem",props:{...s.C,...r.Ji,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:t,emit:i}){const{proxy:{$q:a}}=(0,n.nI)(),u=(0,s.A)(e,a),{hasLink:h,linkAttrs:g,linkClass:p,linkTag:f,navigateOnClick:m}=(0,r.Ay)(),_=(0,o.KR)(null),v=(0,o.KR)(null),b=(0,n.EW)((()=>!0===e.clickable||!0===h.value||"label"===e.tag)),y=(0,n.EW)((()=>!0!==e.disable&&!0===b.value)),w=(0,n.EW)((()=>"q-item q-item-type row no-wrap"+(!0===e.dense?" q-item--dense":"")+(!0===u.value?" q-item--dark":"")+(!0===h.value&&null===e.active?p.value:!0===e.active?" q-item--active"+(void 0!==e.activeClass?` ${e.activeClass}`:""):"")+(!0===e.disable?" disabled":"")+(!0===y.value?" q-item--clickable q-link cursor-pointer "+(!0===e.manualFocus?"q-manual-focusable":"q-focusable q-hoverable")+(!0===e.focused?" q-manual-focusable--focused":""):""))),C=(0,n.EW)((()=>{if(void 0===e.insetLevel)return null;const t=!0===a.lang.rtl?"Right":"Left";return{["padding"+t]:16+56*e.insetLevel+"px"}}));function S(e){!0===y.value&&(null!==v.value&&(!0!==e.qKeyEvent&&document.activeElement===_.value?v.value.focus():document.activeElement===v.value&&_.value.focus()),m(e))}function k(e){if(!0===y.value&&!0===(0,d.Dv)(e,[13,32])){(0,c.Gu)(e),e.qKeyEvent=!0;const t=new MouseEvent("click",e);t.qKeyEvent=!0,_.value.dispatchEvent(t)}i("keyup",e)}function x(){const e=(0,l.Ij)(t.default,[]);return!0===y.value&&e.unshift((0,n.h)("div",{class:"q-focus-helper",tabindex:-1,ref:v})),e}return()=>{const t={ref:_,class:w.value,style:C.value,role:"listitem",onClick:S,onKeyup:k};return!0===y.value?(t.tabindex=e.tabindex||"0",Object.assign(t,g.value)):!0===b.value&&(t["aria-disabled"]="true"),(0,n.h)(f.value,t,x())}}})},13796:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:t}){const i=(0,n.EW)((()=>parseInt(e.lines,10))),o=(0,n.EW)((()=>"q-item__label"+(!0===e.overline?" q-item__label--overline text-overline":"")+(!0===e.caption?" q-item__label--caption text-caption":"")+(!0===e.header?" q-item__label--header":"")+(1===i.value?" ellipsis":""))),r=(0,n.EW)((()=>void 0!==e.lines&&i.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":i.value}:null));return()=>(0,n.h)("div",{style:r.value,class:o.value},(0,s.zm)(t.default))}})},25173:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-item__section column q-item__section--"+(!0===e.avatar||!0===e.side||!0===e.thumbnail?"side":"main")+(!0===e.top?" q-item__section--top justify-start":" justify-center")+(!0===e.avatar?" q-item__section--avatar":"")+(!0===e.thumbnail?" q-item__section--thumbnail":"")+(!0===e.noWrap?" q-item__section--nowrap":"")));return()=>(0,n.h)("div",{class:i.value},(0,s.zm)(t.default))}})},53999:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(29467),s=i(16372),r=i(65139);const a=["ul","ol"],l=(0,o.a0)({name:"QList",props:{...s.C,bordered:Boolean,dense:Boolean,separator:Boolean,padding:Boolean,tag:{type:String,default:"div"}},setup(e,{slots:t}){const i=(0,n.nI)(),o=(0,s.A)(e,i.proxy.$q),l=(0,n.EW)((()=>a.includes(e.tag)?null:"list")),c=(0,n.EW)((()=>"q-list"+(!0===e.bordered?" q-list--bordered":"")+(!0===e.dense?" q-list--dense":"")+(!0===e.separator?" q-list--separator":"")+(!0===o.value?" q-list--dark":"")+(!0===e.padding?" q-list--padding":"")));return()=>(0,n.h)(e.tag,{class:c.value,role:l.value},(0,r.zm)(t.default))}})},62008:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(61758),o=i(38734),s=i(41597),r=i(93163),a=i(1096),l=i(29467),c=i(38336),d=i(65139),u=i(27973);const h=(0,l.a0)({name:"QLayout",props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:e=>/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(e.toLowerCase())},onScroll:Function,onScrollHeight:Function,onResize:Function},setup(e,{slots:t,emit:i}){const{proxy:{$q:l}}=(0,n.nI)(),h=(0,o.KR)(null),g=(0,o.KR)(l.screen.height),p=(0,o.KR)(!0===e.container?0:l.screen.width),f=(0,o.KR)({position:0,direction:"down",inflectionPoint:0}),m=(0,o.KR)(0),_=(0,o.KR)(!0===s.ot.value?0:(0,c.XJ)()),v=(0,n.EW)((()=>"q-layout q-layout--"+(!0===e.container?"containerized":"standard"))),b=(0,n.EW)((()=>!1===e.container?{minHeight:l.screen.height+"px"}:null)),y=(0,n.EW)((()=>0!==_.value?{[!0===l.lang.rtl?"left":"right"]:`${_.value}px`}:null)),w=(0,n.EW)((()=>0!==_.value?{[!0===l.lang.rtl?"right":"left"]:0,[!0===l.lang.rtl?"left":"right"]:`-${_.value}px`,width:`calc(100% + ${_.value}px)`}:null));function C(t){if(!0===e.container||!0!==document.qScrollPrevented){const n={position:t.position.top,direction:t.direction,directionChanged:t.directionChanged,inflectionPoint:t.inflectionPoint.top,delta:t.delta.top};f.value=n,void 0!==e.onScroll&&i("scroll",n)}}function S(t){const{height:n,width:o}=t;let s=!1;g.value!==n&&(s=!0,g.value=n,void 0!==e.onScrollHeight&&i("scrollHeight",n),x()),p.value!==o&&(s=!0,p.value=o),!0===s&&void 0!==e.onResize&&i("resize",t)}function k({height:e}){m.value!==e&&(m.value=e,x())}function x(){if(!0===e.container){const e=g.value>m.value?(0,c.XJ)():0;_.value!==e&&(_.value=e)}}let E=null;const L={instances:{},view:(0,n.EW)((()=>e.view)),isContainer:(0,n.EW)((()=>e.container)),rootRef:h,height:g,containerHeight:m,scrollbarWidth:_,totalWidth:(0,n.EW)((()=>p.value+_.value)),rows:(0,n.EW)((()=>{const t=e.view.toLowerCase().split(" ");return{top:t[0].split(""),middle:t[1].split(""),bottom:t[2].split("")}})),header:(0,o.Kh)({size:0,offset:0,space:!1}),right:(0,o.Kh)({size:300,offset:0,space:!1}),footer:(0,o.Kh)({size:0,offset:0,space:!1}),left:(0,o.Kh)({size:300,offset:0,space:!1}),scroll:f,animate(){null!==E?clearTimeout(E):document.body.classList.add("q-body--layout-animate"),E=setTimeout((()=>{E=null,document.body.classList.remove("q-body--layout-animate")}),155)},update(e,t,i){L[e][t]=i}};if((0,n.Gt)(u.ON,L),(0,c.XJ)()>0){let T=null;const I=document.body;function D(){T=null,I.classList.remove("hide-scrollbar")}function R(){if(null===T){if(I.scrollHeight>l.screen.height)return;I.classList.add("hide-scrollbar")}else clearTimeout(T);T=setTimeout(D,300)}function N(e){null!==T&&"remove"===e&&(clearTimeout(T),D()),window[`${e}EventListener`]("resize",R)}(0,n.wB)((()=>!0!==e.container?"add":"remove"),N),!0!==e.container&&N("add"),(0,n.hi)((()=>{N("remove")}))}return()=>{const i=(0,d.Hp)(t.default,[(0,n.h)(r.A,{onScroll:C}),(0,n.h)(a.A,{onResize:S})]),o=(0,n.h)("div",{class:v.value,style:b.value,ref:!0===e.container?void 0:h,tabindex:-1},i);return!0===e.container?(0,n.h)("div",{class:"q-layout-container overflow-hidden",ref:h},[(0,n.h)(a.A,{onResize:k}),(0,n.h)("div",{class:"absolute-full",style:y.value},[(0,n.h)("div",{class:"scroll",style:w.value},[o])])]):o}}})},35859:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});i(10239);var n=i(61758),o=i(16372),s=i(61906),r=i(29467),a=i(65139);const l={xs:2,sm:4,md:6,lg:10,xl:14};function c(e,t,i){return{transform:!0===t?`translateX(${!0===i.lang.rtl?"-":""}100%) scale3d(${-e},1,1)`:`scale3d(${e},1,1)`}}const d=(0,r.a0)({name:"QLinearProgress",props:{...o.C,...s.x_,value:{type:Number,default:0},buffer:Number,color:String,trackColor:String,reverse:Boolean,stripe:Boolean,indeterminate:Boolean,query:Boolean,rounded:Boolean,animationSpeed:{type:[String,Number],default:2100},instantFeedback:Boolean},setup(e,{slots:t}){const{proxy:i}=(0,n.nI)(),r=(0,o.A)(e,i.$q),d=(0,s.Ay)(e,l),u=(0,n.EW)((()=>!0===e.indeterminate||!0===e.query)),h=(0,n.EW)((()=>e.reverse!==e.query)),g=(0,n.EW)((()=>({...null!==d.value?d.value:{},"--q-linear-progress-speed":`${e.animationSpeed}ms`}))),p=(0,n.EW)((()=>"q-linear-progress"+(void 0!==e.color?` text-${e.color}`:"")+(!0===e.reverse||!0===e.query?" q-linear-progress--reverse":"")+(!0===e.rounded?" rounded-borders":""))),f=(0,n.EW)((()=>c(void 0!==e.buffer?e.buffer:1,h.value,i.$q))),m=(0,n.EW)((()=>`with${!0===e.instantFeedback?"out":""}-transition`)),_=(0,n.EW)((()=>`q-linear-progress__track absolute-full q-linear-progress__track--${m.value} q-linear-progress__track--`+(!0===r.value?"dark":"light")+(void 0!==e.trackColor?` bg-${e.trackColor}`:""))),v=(0,n.EW)((()=>c(!0===u.value?1:e.value,h.value,i.$q))),b=(0,n.EW)((()=>`q-linear-progress__model absolute-full q-linear-progress__model--${m.value} q-linear-progress__model--${!0===u.value?"in":""}determinate`)),y=(0,n.EW)((()=>({width:100*e.value+"%"}))),w=(0,n.EW)((()=>"q-linear-progress__stripe absolute-"+(!0===e.reverse?"right":"left")+` q-linear-progress__stripe--${m.value}`));return()=>{const i=[(0,n.h)("div",{class:_.value,style:f.value}),(0,n.h)("div",{class:b.value,style:v.value})];return!0===e.stripe&&!1===u.value&&i.push((0,n.h)("div",{class:w.value,style:y.value})),(0,n.h)("div",{class:p.value,style:g.value,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":!0===e.indeterminate?void 0:e.value},(0,a.Hp)(t.default,i))}}})},55998:(e,t,i)=>{"use strict";i.d(t,{A:()=>q});var n=i(61758),o=i(38734),s=i(29104),r=i(72941),a=i(22500),l=i(2906);const c={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},d={...c,contextMenu:Boolean};function u({showing:e,avoidEmit:t,configureAnchorEl:i}){const{props:s,proxy:c,emit:d}=(0,n.nI)(),u=(0,o.KR)(null);let h=null;function g(e){return null!==u.value&&(void 0===e||void 0===e.touches||e.touches.length<=1)}const p={};function f(){(0,a.Fh)(p,"anchor")}function m(e){u.value=e;while(u.value.classList.contains("q-anchor--skip"))u.value=u.value.parentNode;i()}function _(){if(!1===s.target||""===s.target||null===c.$el.parentNode)u.value=null;else if(!0===s.target)m(c.$el.parentNode);else{let e=s.target;if("string"===typeof s.target)try{e=document.querySelector(s.target)}catch(t){e=void 0}void 0!==e&&null!==e?(u.value=e.$el||e,i()):(u.value=null,console.error(`Anchor: target "${s.target}" not found`))}}return void 0===i&&(Object.assign(p,{hide(e){c.hide(e)},toggle(e){c.toggle(e),e.qAnchorHandled=!0},toggleKey(e){!0===(0,l.Dv)(e,13)&&p.toggle(e)},contextClick(e){c.hide(e),(0,a.F4)(e),(0,n.dY)((()=>{c.show(e),e.qAnchorHandled=!0}))},prevent:a.F4,mobileTouch(e){if(p.mobileCleanup(e),!0!==g(e))return;c.hide(e),u.value.classList.add("non-selectable");const t=e.target;(0,a.Z4)(p,"anchor",[[t,"touchmove","mobileCleanup","passive"],[t,"touchend","mobileCleanup","passive"],[t,"touchcancel","mobileCleanup","passive"],[u.value,"contextmenu","prevent","notPassive"]]),h=setTimeout((()=>{h=null,c.show(e),e.qAnchorHandled=!0}),300)},mobileCleanup(t){u.value.classList.remove("non-selectable"),null!==h&&(clearTimeout(h),h=null),!0===e.value&&void 0!==t&&(0,r.w)()}}),i=function(e=s.contextMenu){if(!0===s.noParentEvent||null===u.value)return;let t;t=!0===e?!0===c.$q.platform.is.mobile?[[u.value,"touchstart","mobileTouch","passive"]]:[[u.value,"mousedown","hide","passive"],[u.value,"contextmenu","contextClick","notPassive"]]:[[u.value,"click","toggle","passive"],[u.value,"keyup","toggleKey","passive"]],(0,a.Z4)(p,"anchor",t)}),(0,n.wB)((()=>s.contextMenu),(e=>{null!==u.value&&(f(),i(e))})),(0,n.wB)((()=>s.target),(()=>{null!==u.value&&f(),_()})),(0,n.wB)((()=>s.noParentEvent),(e=>{null!==u.value&&(!0===e?f():i())})),(0,n.sV)((()=>{_(),!0!==t&&!0===s.modelValue&&null===u.value&&d("update:modelValue",!1)})),(0,n.xo)((()=>{null!==h&&clearTimeout(h),f()})),{anchorEl:u,canShow:g,anchorEvents:p}}function h(e,t){const i=(0,o.KR)(null);let s;function r(e,t){const i=(void 0!==t?"add":"remove")+"EventListener",n=void 0!==t?t:s;e!==window&&e[i]("scroll",n,a.mG.passive),window[i]("scroll",n,a.mG.passive),s=t}function l(){null!==i.value&&(r(i.value),i.value=null)}const c=(0,n.wB)((()=>e.noParentEvent),(()=>{null!==i.value&&(l(),t())}));return(0,n.xo)(c),{localScrollTarget:i,unconfigureScrollTarget:l,changeScrollEvent:r}}var g=i(52916),p=i(16372),f=i(52120),m=i(40454),_=i(46019),v=i(24667),b=i(29467),y=i(35563),w=i(38336),C=i(65139),S=i(78773),k=i(88173),x=i(77556);i(10239);let E=null;const{notPassiveCapture:L}=a.mG,T=[];function I(e){null!==E&&(clearTimeout(E),E=null);const t=e.target;if(void 0===t||8===t.nodeType||!0===t.classList.contains("no-pointer-events"))return;let i=y.jx.length-1;while(i>=0){const e=y.jx[i].$;if("QTooltip"!==e.type.name){if("QDialog"!==e.type.name)break;if(!0!==e.props.seamless)return;i--}else i--}for(let i=T.length-1;i>=0;i--){const n=T[i];if(null!==n.anchorEl.value&&!1!==n.anchorEl.value.contains(t)||t!==document.body&&(null===n.innerRef.value||!1!==n.innerRef.value.contains(t)))return;e.qClickOutside=!0,n.onClickOutside(e)}}function D(e){T.push(e),1===T.length&&(document.addEventListener("mousedown",I,L),document.addEventListener("touchstart",I,L))}function R(e){const t=T.findIndex((t=>t===e));-1!==t&&(T.splice(t,1),0===T.length&&(null!==E&&(clearTimeout(E),E=null),document.removeEventListener("mousedown",I,L),document.removeEventListener("touchstart",I,L)))}var N=i(98983),A=i(41597);let O,P;function M(e){const t=e.split(" ");return 2===t.length&&(!0!==["top","center","bottom"].includes(t[0])?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):!0===["left","middle","right","start","end"].includes(t[1])||(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1))}function F(e){return!e||2===e.length&&("number"===typeof e[0]&&"number"===typeof e[1])}const B={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};function W(e,t){const i=e.split(" ");return{vertical:i[0],horizontal:B[`${i[1]}#${!0===t?"rtl":"ltr"}`]}}function H(e,t){let{top:i,left:n,right:o,bottom:s,width:r,height:a}=e.getBoundingClientRect();return void 0!==t&&(i-=t[1],n-=t[0],s+=t[1],o+=t[0],r+=t[0],a+=t[1]),{top:i,bottom:s,height:a,left:n,right:o,width:r,middle:n+(o-n)/2,center:i+(s-i)/2}}function V(e,t,i){let{top:n,left:o}=e.getBoundingClientRect();return n+=t.top,o+=t.left,void 0!==i&&(n+=i[1],o+=i[0]),{top:n,bottom:n+1,height:1,left:o,right:o+1,width:1,middle:o,center:n}}function j(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function z(e,t,i,n){return{top:e[i.vertical]-t[n.vertical],left:e[i.horizontal]-t[n.horizontal]}}function U(e,t=0){if(null===e.targetEl||null===e.anchorEl||t>5)return;if(0===e.targetEl.offsetHeight||0===e.targetEl.offsetWidth)return void setTimeout((()=>{U(e,t+1)}),10);const{targetEl:i,offset:n,anchorEl:o,anchorOrigin:s,selfOrigin:r,absoluteOffset:a,fit:l,cover:c,maxHeight:d,maxWidth:u}=e;if(!0===A.Sn.is.ios&&void 0!==window.visualViewport){const e=document.body.style,{offsetLeft:t,offsetTop:i}=window.visualViewport;t!==O&&(e.setProperty("--q-pe-left",t+"px"),O=t),i!==P&&(e.setProperty("--q-pe-top",i+"px"),P=i)}const{scrollLeft:h,scrollTop:g}=i,p=void 0===a?H(o,!0===c?[0,0]:n):V(o,a,n);Object.assign(i.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:u,maxHeight:d,visibility:"visible"});const{offsetWidth:f,offsetHeight:m}=i,{elWidth:_,elHeight:v}=!0===l||!0===c?{elWidth:Math.max(p.width,f),elHeight:!0===c?Math.max(p.height,m):m}:{elWidth:f,elHeight:m};let b={maxWidth:u,maxHeight:d};!0!==l&&!0!==c||(b.minWidth=p.width+"px",!0===c&&(b.minHeight=p.height+"px")),Object.assign(i.style,b);const y=j(_,v);let w=z(p,y,s,r);if(void 0===a||void 0===n)$(w,p,y,s,r);else{const{top:e,left:t}=w;$(w,p,y,s,r);let i=!1;if(w.top!==e){i=!0;const e=2*n[1];p.center=p.top-=e,p.bottom-=e+2}if(w.left!==t){i=!0;const e=2*n[0];p.middle=p.left-=e,p.right-=e+2}!0===i&&(w=z(p,y,s,r),$(w,p,y,s,r))}b={top:w.top+"px",left:w.left+"px"},void 0!==w.maxHeight&&(b.maxHeight=w.maxHeight+"px",p.height>w.maxHeight&&(b.minHeight=b.maxHeight)),void 0!==w.maxWidth&&(b.maxWidth=w.maxWidth+"px",p.width>w.maxWidth&&(b.minWidth=b.maxWidth)),Object.assign(i.style,b),i.scrollTop!==g&&(i.scrollTop=g),i.scrollLeft!==h&&(i.scrollLeft=h)}function $(e,t,i,n,o){const s=i.bottom,r=i.right,a=(0,w.XJ)(),l=window.innerHeight-a,c=document.body.clientWidth;if(e.top<0||e.top+s>l)if("center"===o.vertical)e.top=t[n.vertical]>l/2?Math.max(0,l-s):0,e.maxHeight=Math.min(s,l);else if(t[n.vertical]>l/2){const i=Math.min(l,"center"===n.vertical?t.center:n.vertical===o.vertical?t.bottom:t.top);e.maxHeight=Math.min(s,i),e.top=Math.max(0,i-s)}else e.top=Math.max(0,"center"===n.vertical?t.center:n.vertical===o.vertical?t.top:t.bottom),e.maxHeight=Math.min(s,l-e.top);if(e.left<0||e.left+r>c)if(e.maxWidth=Math.min(r,c),"middle"===o.horizontal)e.left=t[n.horizontal]>c/2?Math.max(0,c-r):0;else if(t[n.horizontal]>c/2){const i=Math.min(c,"middle"===n.horizontal?t.middle:n.horizontal===o.horizontal?t.right:t.left);e.maxWidth=Math.min(r,i),e.left=Math.max(0,i-e.maxWidth)}else e.left=Math.max(0,"middle"===n.horizontal?t.middle:n.horizontal===o.horizontal?t.left:t.right),e.maxWidth=Math.min(r,c-e.left)}["left","middle","right"].forEach((e=>{B[`${e}#ltr`]=e,B[`${e}#rtl`]=e}));const q=(0,b.a0)({name:"QMenu",inheritAttrs:!1,props:{...d,...g.RI,...p.C,...m.d,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:M},self:{type:String,validator:M},offset:{type:Array,validator:F},scrollTarget:w.cP,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...g.Jl,"click","escapeKey"],setup(e,{slots:t,emit:i,attrs:r}){let l,c,d,b=null;const E=(0,n.nI)(),{proxy:L}=E,{$q:T}=L,I=(0,o.KR)(null),A=(0,o.KR)(!1),O=(0,n.EW)((()=>!0!==e.persistent&&!0!==e.noRouteDismiss)),P=(0,p.A)(e,T),{registerTick:M,removeTick:F}=(0,_.A)(),{registerTimeout:B}=(0,v.A)(),{transitionProps:H,transitionStyle:V}=(0,m.A)(e),{localScrollTarget:j,changeScrollEvent:z,unconfigureScrollTarget:$}=h(e,le),{anchorEl:q,canShow:K}=u({showing:A}),{hide:G}=(0,g.Ay)({showing:A,canShow:K,handleShow:se,handleHide:re,hideOnRouteChange:O,processOnMount:!0}),{showPortal:Q,hidePortal:Y,renderPortal:Z}=(0,f.A)(E,I,ge,"menu"),X={anchorEl:q,innerRef:I,onClickOutside(t){if(!0!==e.persistent&&!0===A.value)return G(t),("touchstart"===t.type||t.target.classList.contains("q-dialog__backdrop"))&&(0,a.Gu)(t),!0}},J=(0,n.EW)((()=>W(e.anchor||(!0===e.cover?"center middle":"bottom start"),T.lang.rtl))),ee=(0,n.EW)((()=>!0===e.cover?J.value:W(e.self||"top start",T.lang.rtl))),te=(0,n.EW)((()=>(!0===e.square?" q-menu--square":"")+(!0===P.value?" q-menu--dark q-dark":""))),ie=(0,n.EW)((()=>!0===e.autoClose?{onClick:ce}:{})),ne=(0,n.EW)((()=>!0===A.value&&!0!==e.persistent));function oe(){(0,N.Gy)((()=>{let e=I.value;e&&!0!==e.contains(document.activeElement)&&(e=e.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||e.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||e.querySelector("[autofocus], [data-autofocus]")||e,e.focus({preventScroll:!0}))}))}function se(t){if(b=!1===e.noRefocus?document.activeElement:null,(0,k.g)(de),Q(),le(),l=void 0,void 0!==t&&(e.touchPosition||e.contextMenu)){const e=(0,a.G1)(t);if(void 0!==e.left){const{top:t,left:i}=q.value.getBoundingClientRect();l={left:e.left-i,top:e.top-t}}}void 0===c&&(c=(0,n.wB)((()=>T.screen.width+"|"+T.screen.height+"|"+e.self+"|"+e.anchor+"|"+T.lang.rtl),he)),!0!==e.noFocus&&document.activeElement.blur(),M((()=>{he(),!0!==e.noFocus&&oe()})),B((()=>{!0===T.platform.is.ios&&(d=e.autoClose,I.value.click()),he(),Q(!0),i("show",t)}),e.transitionDuration)}function re(t){F(),Y(),ae(!0),null===b||void 0!==t&&!0===t.qClickOutside||(((t&&0===t.type.indexOf("key")?b.closest('[tabindex]:not([tabindex^="-"])'):void 0)||b).focus(),b=null),B((()=>{Y(!0),i("hide",t)}),e.transitionDuration)}function ae(e){l=void 0,void 0!==c&&(c(),c=void 0),!0!==e&&!0!==A.value||((0,k.v)(de),$(),R(X),(0,S.V)(ue)),!0!==e&&(b=null)}function le(){null===q.value&&void 0===e.scrollTarget||(j.value=(0,w.hD)(q.value,e.scrollTarget),z(j.value,he))}function ce(e){!0!==d?((0,y.bc)(L,e),i("click",e)):d=!1}function de(t){!0===ne.value&&!0!==e.noFocus&&!0!==(0,x.$J)(I.value,t.target)&&oe()}function ue(e){i("escapeKey"),G(e)}function he(){U({targetEl:I.value,offset:e.offset,anchorEl:q.value,anchorOrigin:J.value,selfOrigin:ee.value,absoluteOffset:l,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function ge(){return(0,n.h)(s.eB,H.value,(()=>!0===A.value?(0,n.h)("div",{role:"menu",...r,ref:I,tabindex:-1,class:["q-menu q-position-engine scroll"+te.value,r.class],style:[r.style,V.value],...ie.value},(0,C.zm)(t.default)):null))}return(0,n.wB)(ne,(e=>{!0===e?((0,S.I)(ue),D(X)):((0,S.V)(ue),R(X))})),(0,n.xo)(ae),Object.assign(L,{focus:oe,updatePosition:he}),Z}})},26267:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(61758),o=(i(10239),i(38734)),s=i(50492),r=i(16372),a=i(61906),l=i(8014),c=i(52510),d=i(29467),u=i(10447),h=i(22500),g=i(65139);const p=()=>(0,n.h)("svg",{key:"svg",class:"q-radio__bg absolute non-selectable",viewBox:"0 0 24 24"},[(0,n.h)("path",{d:"M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12"}),(0,n.h)("path",{class:"q-radio__check",d:"M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6"})]),f=(0,d.a0)({name:"QRadio",props:{...r.C,...a.x_,...c.Sc,modelValue:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,checkedIcon:String,uncheckedIcon:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},emits:["update:modelValue"],setup(e,{slots:t,emit:i}){const{proxy:d}=(0,n.nI)(),f=(0,r.A)(e,d.$q),m=(0,a.Ay)(e,u.A),_=(0,o.KR)(null),{refocusTargetEl:v,refocusTarget:b}=(0,l.A)(e,_),y=(0,n.EW)((()=>(0,o.ux)(e.modelValue)===(0,o.ux)(e.val))),w=(0,n.EW)((()=>"q-radio cursor-pointer no-outline row inline no-wrap items-center"+(!0===e.disable?" disabled":"")+(!0===f.value?" q-radio--dark":"")+(!0===e.dense?" q-radio--dense":"")+(!0===e.leftLabel?" reverse":""))),C=(0,n.EW)((()=>{const t=void 0===e.color||!0!==e.keepColor&&!0!==y.value?"":` text-${e.color}`;return`q-radio__inner relative-position q-radio__inner--${!0===y.value?"truthy":"falsy"}${t}`})),S=(0,n.EW)((()=>(!0===y.value?e.checkedIcon:e.uncheckedIcon)||null)),k=(0,n.EW)((()=>!0===e.disable?-1:e.tabindex||0)),x=(0,n.EW)((()=>{const t={type:"radio"};return void 0!==e.name&&Object.assign(t,{".checked":!0===y.value,"^checked":!0===y.value?"checked":void 0,name:e.name,value:e.val}),t})),E=(0,c.vq)(x);function L(t){void 0!==t&&((0,h.Gu)(t),b(t)),!0!==e.disable&&!0!==y.value&&i("update:modelValue",e.val,t)}function T(e){13!==e.keyCode&&32!==e.keyCode||(0,h.Gu)(e)}function I(e){13!==e.keyCode&&32!==e.keyCode||L(e)}Object.assign(d,{set:L});const D=p();return()=>{const i=null!==S.value?[(0,n.h)("div",{key:"icon",class:"q-radio__icon-container absolute-full flex flex-center no-wrap"},[(0,n.h)(s.A,{class:"q-radio__icon",name:S.value})])]:[D];!0!==e.disable&&E(i,"unshift"," q-radio__native q-ma-none q-pa-none");const o=[(0,n.h)("div",{class:C.value,style:m.value,"aria-hidden":"true"},i)];null!==v.value&&o.push(v.value);const r=void 0!==e.label?(0,g.Hp)(t.default,[e.label]):(0,g.zm)(t.default);return void 0!==r&&o.push((0,n.h)("div",{class:"q-radio__label q-anchor--skip"},r)),(0,n.h)("div",{ref:_,class:w.value,tabindex:k.value,role:"radio","aria-label":e.label,"aria-checked":!0===y.value?"true":"false","aria-disabled":!0===e.disable?"true":void 0,onClick:L,onKeydown:T,onKeyup:I},o)}}});var m=i(80460),_=i(66908),v=i(1054);const b={radio:f,checkbox:m.A,toggle:_.A},y=Object.keys(b);function w(e,t){if("function"===typeof e)return e;const i=void 0!==e?e:t;return e=>e[i]}const C=(0,d.a0)({name:"QOptionGroup",props:{...r.C,modelValue:{required:!0},options:{type:Array,validator:e=>e.every(v.Gv),default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],name:String,type:{type:String,default:"radio",validator:e=>y.includes(e)},color:String,keepColor:Boolean,dense:Boolean,size:String,leftLabel:Boolean,inline:Boolean,disable:Boolean},emits:["update:modelValue"],setup(e,{emit:t,slots:i}){const{proxy:{$q:o}}=(0,n.nI)(),s=Array.isArray(e.modelValue);"radio"===e.type?!0===s&&console.error("q-option-group: model should not be array"):!1===s&&console.error("q-option-group: model should be array in your case");const a=(0,r.A)(e,o),l=(0,n.EW)((()=>b[e.type])),c=(0,n.EW)((()=>w(e.optionValue,"value"))),d=(0,n.EW)((()=>w(e.optionLabel,"label"))),u=(0,n.EW)((()=>w(e.optionDisable,"disable"))),h=(0,n.EW)((()=>e.options.map((t=>({val:c.value(t),name:void 0===t.name?e.name:t.name,disable:e.disable||u.value(t),leftLabel:void 0===t.leftLabel?e.leftLabel:t.leftLabel,color:void 0===t.color?e.color:t.color,checkedIcon:t.checkedIcon,uncheckedIcon:t.uncheckedIcon,dark:void 0===t.dark?a.value:t.dark,size:void 0===t.size?e.size:t.size,dense:e.dense,keepColor:void 0===t.keepColor?e.keepColor:t.keepColor}))))),g=(0,n.EW)((()=>"q-option-group q-gutter-x-sm"+(!0===e.inline?" q-option-group--inline":""))),p=(0,n.EW)((()=>{const t={role:"group"};return"radio"===e.type&&(t.role="radiogroup",!0===e.disable&&(t["aria-disabled"]="true")),t}));function f(e){t("update:modelValue",e)}return()=>(0,n.h)("div",{class:g.value,...p.value},e.options.map(((t,o)=>{const s=void 0!==i["label-"+o]?()=>i["label-"+o](t):void 0!==i.label?()=>i.label(t):void 0;return(0,n.h)("div",[(0,n.h)(l.value,{label:void 0===s?d.value(t):null,modelValue:e.modelValue,"onUpdate:modelValue":f,...h.value[o]},s)])})))}})},77716:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(29467),s=i(65139),r=i(27973);const a=(0,o.a0)({name:"QPage",props:{padding:Boolean,styleFn:Function},setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),o=(0,n.WQ)(r.ON,r.U_);if(o===r.U_)return console.error("QPage needs to be a deep child of QLayout"),r.U_;const a=(0,n.WQ)(r.YR,r.U_);if(a===r.U_)return console.error("QPage needs to be child of QPageContainer"),r.U_;const l=(0,n.EW)((()=>{const t=(!0===o.header.space?o.header.size:0)+(!0===o.footer.space?o.footer.size:0);if("function"===typeof e.styleFn){const n=!0===o.isContainer.value?o.containerHeight.value:i.screen.height;return e.styleFn(t,n)}return{minHeight:!0===o.isContainer.value?o.containerHeight.value-t+"px":0===i.screen.height?0!==t?`calc(100vh - ${t}px)`:"100vh":i.screen.height-t+"px"}})),c=(0,n.EW)((()=>"q-page"+(!0===e.padding?" q-layout-padding":"")));return()=>(0,n.h)("main",{class:c.value,style:l.value},(0,s.zm)(t.default))}})},45205:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(29467),s=i(65139),r=i(27973);const a=(0,o.a0)({name:"QPageContainer",setup(e,{slots:t}){const{proxy:{$q:i}}=(0,n.nI)(),o=(0,n.WQ)(r.ON,r.U_);if(o===r.U_)return console.error("QPageContainer needs to be child of QLayout"),r.U_;(0,n.Gt)(r.YR,!0);const a=(0,n.EW)((()=>{const e={};return!0===o.header.space&&(e.paddingTop=`${o.header.size}px`),!0===o.right.space&&(e["padding"+(!0===i.lang.rtl?"Left":"Right")]=`${o.right.size}px`),!0===o.footer.space&&(e.paddingBottom=`${o.footer.size}px`),!0===o.left.space&&(e["padding"+(!0===i.lang.rtl?"Right":"Left")]=`${o.left.size}px`),e}));return()=>(0,n.h)("div",{class:"q-page-container",style:a.value},(0,s.zm)(t.default))}})},1096:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(61758),o=i(38734),s=i(41597);function r(){const e=(0,o.KR)(!s.ot.value);return!1===e.value&&(0,n.sV)((()=>{e.value=!0})),{isHydrated:e}}var a=i(29467),l=i(22500);const c="undefined"!==typeof ResizeObserver,d=!0===c?{}:{style:"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;",url:"about:blank"},u=(0,a.a0)({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(e,{emit:t}){let i,o=null,s={width:-1,height:-1};function a(t){!0===t||0===e.debounce||"0"===e.debounce?u():null===o&&(o=setTimeout(u,e.debounce))}function u(){if(null!==o&&(clearTimeout(o),o=null),i){const{offsetWidth:e,offsetHeight:n}=i;e===s.width&&n===s.height||(s={width:e,height:n},t("resize",s))}}const{proxy:h}=(0,n.nI)();if(h.trigger=a,!0===c){let g;const p=e=>{i=h.$el.parentNode,i?(g=new ResizeObserver(a),g.observe(i),u()):!0!==e&&(0,n.dY)((()=>{p(!0)}))};return(0,n.sV)((()=>{p()})),(0,n.xo)((()=>{null!==o&&clearTimeout(o),void 0!==g&&(void 0!==g.disconnect?g.disconnect():i&&g.unobserve(i))})),l.lQ}{const{isHydrated:f}=r();let m;function _(){null!==o&&(clearTimeout(o),o=null),void 0!==m&&(void 0!==m.removeEventListener&&m.removeEventListener("resize",a,l.mG.passive),m=void 0)}function v(){_(),i&&i.contentDocument&&(m=i.contentDocument.defaultView,m.addEventListener("resize",a,l.mG.passive),u())}return(0,n.sV)((()=>{(0,n.dY)((()=>{i=h.$el,i&&v()}))})),(0,n.xo)(_),()=>{if(!0===f.value)return(0,n.h)("object",{class:"q--avoid-card-border",style:d.style,tabindex:-1,type:"text/html",data:d.url,"aria-hidden":"true",onLoad:v})}}}})},48958:(e,t,i)=>{"use strict";i.d(t,{A:()=>b});var n=i(38734),o=i(61758),s=i(16372),r=i(29467);const a=(0,r.a0)({props:["store","barStyle","verticalBarStyle","horizontalBarStyle"],setup(e){return()=>[(0,o.h)("div",{class:e.store.scroll.vertical.barClass.value,style:[e.barStyle,e.verticalBarStyle],"aria-hidden":"true",onMousedown:e.store.onVerticalMousedown}),(0,o.h)("div",{class:e.store.scroll.horizontal.barClass.value,style:[e.barStyle,e.horizontalBarStyle],"aria-hidden":"true",onMousedown:e.store.onHorizontalMousedown}),(0,o.bo)((0,o.h)("div",{ref:e.store.scroll.vertical.ref,class:e.store.scroll.vertical.thumbClass.value,style:e.store.scroll.vertical.style.value,"aria-hidden":"true"}),e.store.thumbVertDir),(0,o.bo)((0,o.h)("div",{ref:e.store.scroll.horizontal.ref,class:e.store.scroll.horizontal.thumbClass.value,style:e.store.scroll.horizontal.style.value,"aria-hidden":"true"}),e.store.thumbHorizDir)]}});var l=i(1096),c=i(93163),d=i(89390),u=i(82732),h=i(38336),g=i(65139),p=i(53500);const f=["vertical","horizontal"],m={vertical:{offset:"offsetY",scroll:"scrollTop",dir:"down",dist:"y"},horizontal:{offset:"offsetX",scroll:"scrollLeft",dir:"right",dist:"x"}},_={prevent:!0,mouse:!0,mouseAllDir:!0},v=e=>e>=250?50:Math.ceil(e/5),b=(0,r.a0)({name:"QScrollArea",props:{...s.C,thumbStyle:Object,verticalThumbStyle:Object,horizontalThumbStyle:Object,barStyle:[Array,String,Object],verticalBarStyle:[Array,String,Object],horizontalBarStyle:[Array,String,Object],verticalOffset:{type:Array,default:[0,0]},horizontalOffset:{type:Array,default:[0,0]},contentStyle:[Array,String,Object],contentActiveStyle:[Array,String,Object],delay:{type:[String,Number],default:1e3},visible:{type:Boolean,default:null},tabindex:[String,Number],onScroll:Function},setup(e,{slots:t,emit:i}){const r=(0,n.KR)(!1),b=(0,n.KR)(!1),y=(0,n.KR)(!1),w={vertical:(0,n.KR)(0),horizontal:(0,n.KR)(0)},C={vertical:{ref:(0,n.KR)(null),position:(0,n.KR)(0),size:(0,n.KR)(0)},horizontal:{ref:(0,n.KR)(null),position:(0,n.KR)(0),size:(0,n.KR)(0)}},{proxy:S}=(0,o.nI)(),k=(0,s.A)(e,S.$q);let x,E=null;const L=(0,n.KR)(null),T=(0,o.EW)((()=>"q-scrollarea"+(!0===k.value?" q-scrollarea--dark":"")));Object.assign(w,{verticalInner:(0,o.EW)((()=>w.vertical.value-e.verticalOffset[0]-e.verticalOffset[1])),horizontalInner:(0,o.EW)((()=>w.horizontal.value-e.horizontalOffset[0]-e.horizontalOffset[1]))}),C.vertical.percentage=(0,o.EW)((()=>{const e=C.vertical.size.value-w.vertical.value;if(e<=0)return 0;const t=(0,u.Tq)(C.vertical.position.value/e,0,1);return Math.round(1e4*t)/1e4})),C.vertical.thumbHidden=(0,o.EW)((()=>!0!==(null===e.visible?y.value:e.visible)&&!1===r.value&&!1===b.value||C.vertical.size.value<=w.vertical.value+1)),C.vertical.thumbStart=(0,o.EW)((()=>e.verticalOffset[0]+C.vertical.percentage.value*(w.verticalInner.value-C.vertical.thumbSize.value))),C.vertical.thumbSize=(0,o.EW)((()=>Math.round((0,u.Tq)(w.verticalInner.value*w.verticalInner.value/C.vertical.size.value,v(w.verticalInner.value),w.verticalInner.value)))),C.vertical.style=(0,o.EW)((()=>({...e.thumbStyle,...e.verticalThumbStyle,top:`${C.vertical.thumbStart.value}px`,height:`${C.vertical.thumbSize.value}px`,right:`${e.horizontalOffset[1]}px`}))),C.vertical.thumbClass=(0,o.EW)((()=>"q-scrollarea__thumb q-scrollarea__thumb--v absolute-right"+(!0===C.vertical.thumbHidden.value?" q-scrollarea__thumb--invisible":""))),C.vertical.barClass=(0,o.EW)((()=>"q-scrollarea__bar q-scrollarea__bar--v absolute-right"+(!0===C.vertical.thumbHidden.value?" q-scrollarea__bar--invisible":""))),C.horizontal.percentage=(0,o.EW)((()=>{const e=C.horizontal.size.value-w.horizontal.value;if(e<=0)return 0;const t=(0,u.Tq)(Math.abs(C.horizontal.position.value)/e,0,1);return Math.round(1e4*t)/1e4})),C.horizontal.thumbHidden=(0,o.EW)((()=>!0!==(null===e.visible?y.value:e.visible)&&!1===r.value&&!1===b.value||C.horizontal.size.value<=w.horizontal.value+1)),C.horizontal.thumbStart=(0,o.EW)((()=>e.horizontalOffset[0]+C.horizontal.percentage.value*(w.horizontalInner.value-C.horizontal.thumbSize.value))),C.horizontal.thumbSize=(0,o.EW)((()=>Math.round((0,u.Tq)(w.horizontalInner.value*w.horizontalInner.value/C.horizontal.size.value,v(w.horizontalInner.value),w.horizontalInner.value)))),C.horizontal.style=(0,o.EW)((()=>({...e.thumbStyle,...e.horizontalThumbStyle,[!0===S.$q.lang.rtl?"right":"left"]:`${C.horizontal.thumbStart.value}px`,width:`${C.horizontal.thumbSize.value}px`,bottom:`${e.verticalOffset[1]}px`}))),C.horizontal.thumbClass=(0,o.EW)((()=>"q-scrollarea__thumb q-scrollarea__thumb--h absolute-bottom"+(!0===C.horizontal.thumbHidden.value?" q-scrollarea__thumb--invisible":""))),C.horizontal.barClass=(0,o.EW)((()=>"q-scrollarea__bar q-scrollarea__bar--h absolute-bottom"+(!0===C.horizontal.thumbHidden.value?" q-scrollarea__bar--invisible":"")));const I=(0,o.EW)((()=>!0===C.vertical.thumbHidden.value&&!0===C.horizontal.thumbHidden.value?e.contentStyle:e.contentActiveStyle));function D(){const e={};return f.forEach((t=>{const i=C[t];Object.assign(e,{[t+"Position"]:i.position.value,[t+"Percentage"]:i.percentage.value,[t+"Size"]:i.size.value,[t+"ContainerSize"]:w[t].value,[t+"ContainerInnerSize"]:w[t+"Inner"].value})})),e}const R=(0,p.A)((()=>{const e=D();e.ref=S,i("scroll",e)}),0);function N(e,t,i){if(!1===f.includes(e))return void console.error("[QScrollArea]: wrong first param of setScrollPosition (vertical/horizontal)");const n="vertical"===e?h.RZ:h.rr;n(L.value,t,i)}function A({height:e,width:t}){let i=!1;w.vertical.value!==e&&(w.vertical.value=e,i=!0),w.horizontal.value!==t&&(w.horizontal.value=t,i=!0),!0===i&&B()}function O({position:e}){let t=!1;C.vertical.position.value!==e.top&&(C.vertical.position.value=e.top,t=!0),C.horizontal.position.value!==e.left&&(C.horizontal.position.value=e.left,t=!0),!0===t&&B()}function P({height:e,width:t}){C.horizontal.size.value!==t&&(C.horizontal.size.value=t,B()),C.vertical.size.value!==e&&(C.vertical.size.value=e,B())}function M(e,t){const i=C[t];if(!0===e.isFirst){if(!0===i.thumbHidden.value)return;x=i.position.value,b.value=!0}else if(!0!==b.value)return;!0===e.isFinal&&(b.value=!1);const n=m[t],o=(i.size.value-w[t].value)/(w[t+"Inner"].value-i.thumbSize.value),s=e.distance[n.dist],r=x+(e.direction===n.dir?1:-1)*s*o;W(r,t)}function F(t,i){const n=C[i];if(!0!==n.thumbHidden.value){const o="vertical"===i?e.verticalOffset[0]:e.horizontalOffset[0],s=t[m[i].offset]-o,r=n.thumbStart.value-o;if(sr+n.thumbSize.value){const e=s-n.thumbSize.value/2,t=(0,u.Tq)(e/(w[i+"Inner"].value-n.thumbSize.value),0,1);W(t*Math.max(0,n.size.value-w[i].value),i)}null!==n.ref.value&&n.ref.value.dispatchEvent(new MouseEvent(t.type,t))}}function B(){r.value=!0,null!==E&&clearTimeout(E),E=setTimeout((()=>{E=null,r.value=!1}),e.delay),void 0!==e.onScroll&&R()}function W(e,t){L.value[m[t].scroll]=e}let H=null;function V(){null!==H&&clearTimeout(H),H=setTimeout((()=>{H=null,y.value=!0}),S.$q.platform.is.ios?50:0)}function j(){null!==H&&(clearTimeout(H),H=null),y.value=!1}let z=null;(0,o.wB)((()=>S.$q.lang.rtl),(e=>{null!==L.value&&(0,h.rr)(L.value,Math.abs(C.horizontal.position.value)*(!0===e?-1:1))})),(0,o.Y4)((()=>{z={top:C.vertical.position.value,left:C.horizontal.position.value}})),(0,o.n)((()=>{if(null===z)return;const e=L.value;null!==e&&((0,h.rr)(e,z.left),(0,h.RZ)(e,z.top))})),(0,o.xo)(R.cancel),Object.assign(S,{getScrollTarget:()=>L.value,getScroll:D,getScrollPosition:()=>({top:C.vertical.position.value,left:C.horizontal.position.value}),getScrollPercentage:()=>({top:C.vertical.percentage.value,left:C.horizontal.percentage.value}),setScrollPosition:N,setScrollPercentage(e,t,i){N(e,t*(C[e].size.value-w[e].value)*("horizontal"===e&&!0===S.$q.lang.rtl?-1:1),i)}});const U={scroll:C,thumbVertDir:[[d.A,e=>{M(e,"vertical")},void 0,{vertical:!0,..._}]],thumbHorizDir:[[d.A,e=>{M(e,"horizontal")},void 0,{horizontal:!0,..._}]],onVerticalMousedown(e){F(e,"vertical")},onHorizontalMousedown(e){F(e,"horizontal")}};return()=>(0,o.h)("div",{class:T.value,onMouseenter:V,onMouseleave:j},[(0,o.h)("div",{ref:L,class:"q-scrollarea__container scroll relative-position fit hide-scrollbar",tabindex:void 0!==e.tabindex?e.tabindex:void 0},[(0,o.h)("div",{class:"q-scrollarea__content absolute",style:I.value},(0,g.Hp)(t.default,[(0,o.h)(l.A,{debounce:0,onResize:P})])),(0,o.h)(c.A,{axis:"both",onScroll:O})]),(0,o.h)(l.A,{debounce:0,onResize:A}),(0,o.h)(a,{store:U,barStyle:e.barStyle,verticalBarStyle:e.verticalBarStyle,horizontalBarStyle:e.horizontalBarStyle})])}})},93163:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(61758),o=i(29467),s=i(38336),r=i(22500);const{passive:a}=r.mG,l=["both","horizontal","vertical"],c=(0,o.a0)({name:"QScrollObserver",props:{axis:{type:String,validator:e=>l.includes(e),default:"vertical"},debounce:[String,Number],scrollTarget:s.cP},emits:["scroll"],setup(e,{emit:t}){const i={position:{top:0,left:0},direction:"down",directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}};let o,l,c=null;function d(){null!==c&&c();const n=Math.max(0,(0,s.fQ)(o)),r=(0,s.lS)(o),a={top:n-i.position.top,left:r-i.position.left};if("vertical"===e.axis&&0===a.top||"horizontal"===e.axis&&0===a.left)return;const l=Math.abs(a.top)>=Math.abs(a.left)?a.top<0?"up":"down":a.left<0?"left":"right";i.position={top:n,left:r},i.directionChanged=i.direction!==l,i.delta=a,!0===i.directionChanged&&(i.direction=l,i.inflectionPoint=i.position),t("scroll",{...i})}function u(){o=(0,s.hD)(l,e.scrollTarget),o.addEventListener("scroll",g,a),g(!0)}function h(){void 0!==o&&(o.removeEventListener("scroll",g,a),o=void 0)}function g(t){if(!0===t||0===e.debounce||"0"===e.debounce)d();else if(null===c){const[t,i]=e.debounce?[setTimeout(d,e.debounce),clearTimeout]:[requestAnimationFrame(d),cancelAnimationFrame];c=()=>{i(t),c=null}}}(0,n.wB)((()=>e.scrollTarget),(()=>{h(),u()}));const{proxy:p}=(0,n.nI)();return(0,n.wB)((()=>p.$q.lang.rtl),d),(0,n.sV)((()=>{l=p.$el.parentNode,u()})),(0,n.xo)((()=>{null!==c&&c(),h()})),Object.assign(p,{trigger:g,getPosition:()=>i}),r.lQ}})},75848:(e,t,i)=>{"use strict";i.d(t,{A:()=>L});i(10239);var n=i(61758),o=i(38734),s=i(7617),r=i(29467);const a=(0,r.a0)({name:"QField",inheritAttrs:!1,props:{...s.OJ,tag:{type:String,default:"label"}},emits:s.mU,setup(){return(0,s.Ay)((0,s.$7)({tagProp:!0}))}});var l=i(50492),c=i(66760),d=i(90124),u=i(25173),h=i(13796),g=i(55998),p=i(82156),f=i(31503),m=i(52510),_=i(32342),v=i(1054),b=i(22500),y=i(82732),w=i(2906),C=i(65139);const S=e=>["add","add-unique","toggle"].includes(e),k=".*+?^${}()|[]\\",x=Object.keys(s.OJ);function E(e,t){if("function"===typeof e)return e;const i=void 0!==e?e:t;return e=>null!==e&&"object"===typeof e&&i in e?e[i]:e}const L=(0,r.a0)({name:"QSelect",inheritAttrs:!1,props:{...f.AV,...m.Sc,...s.OJ,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],popupNoRouteDismiss:Boolean,useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:S},mapOptions:Boolean,emitValue:Boolean,disableTabSelection:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:{},transitionHide:{},transitionDuration:{},behavior:{type:String,validator:e=>["default","menu","dialog"].includes(e),default:"default"},virtualScrollItemSize:f.AV.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...s.mU,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:t,emit:i}){const{proxy:r}=(0,n.nI)(),{$q:L}=r,T=(0,o.KR)(!1),I=(0,o.KR)(!1),D=(0,o.KR)(-1),R=(0,o.KR)(""),N=(0,o.KR)(!1),A=(0,o.KR)(!1);let O,P,M,F,B,W,H,V=null,j=null,z=null;const U=(0,o.KR)(null),$=(0,o.KR)(null),q=(0,o.KR)(null),K=(0,o.KR)(null),G=(0,o.KR)(null),Q=(0,m.M4)(e),Y=(0,_.A)(Ye),Z=(0,n.EW)((()=>Array.isArray(e.options)?e.options.length:0)),X=(0,n.EW)((()=>void 0===e.virtualScrollItemSize?!0===e.optionsDense?24:48:e.virtualScrollItemSize)),{virtualScrollSliceRange:J,virtualScrollSliceSizeComputed:ee,localResetVirtualScroll:te,padVirtualScroll:ie,onVirtualScrollEvt:ne,scrollTo:oe,setVirtualScrollSize:se}=(0,f.Iq)({virtualScrollLength:Z,getVirtualScrollTarget:qe,getVirtualScrollEl:$e,virtualScrollItemSizeComputed:X}),re=(0,s.$7)(),ae=(0,n.EW)((()=>{const t=!0===e.mapOptions&&!0!==e.multiple,i=void 0===e.modelValue||null===e.modelValue&&!0!==t?[]:!0===e.multiple&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue];if(!0===e.mapOptions&&!0===Array.isArray(e.options)){const n=!0===e.mapOptions&&void 0!==O?O:[],o=i.map((e=>Be(e,n)));return null===e.modelValue&&!0===t?o.filter((e=>null!==e)):o}return i})),le=(0,n.EW)((()=>{const t={};return x.forEach((i=>{const n=e[i];void 0!==n&&(t[i]=n)})),t})),ce=(0,n.EW)((()=>null===e.optionsDark?re.isDark.value:e.optionsDark)),de=(0,n.EW)((()=>(0,s.o9)(ae.value))),ue=(0,n.EW)((()=>{let t="q-field__input q-placeholder col";return!0===e.hideSelected||0===ae.value.length?[t,e.inputClass]:(t+=" q-field__input--padding",void 0===e.inputClass?t:[t,e.inputClass])})),he=(0,n.EW)((()=>(!0===e.virtualScrollHorizontal?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:""))),ge=(0,n.EW)((()=>0===Z.value)),pe=(0,n.EW)((()=>ae.value.map((e=>Le.value(e))).join(", "))),fe=(0,n.EW)((()=>void 0!==e.displayValue?e.displayValue:pe.value)),me=(0,n.EW)((()=>!0===e.optionsHtml?()=>!0:e=>void 0!==e&&null!==e&&!0===e.html)),_e=(0,n.EW)((()=>!0===e.displayValueHtml||void 0===e.displayValue&&(!0===e.optionsHtml||ae.value.some(me.value)))),ve=(0,n.EW)((()=>!0===re.focused.value?e.tabindex:-1)),be=(0,n.EW)((()=>{const t={tabindex:e.tabindex,role:"combobox","aria-label":e.label,"aria-readonly":!0===e.readonly?"true":"false","aria-autocomplete":!0===e.useInput?"list":"none","aria-expanded":!0===T.value?"true":"false","aria-controls":`${re.targetUid.value}_lb`};return D.value>=0&&(t["aria-activedescendant"]=`${re.targetUid.value}_${D.value}`),t})),ye=(0,n.EW)((()=>({id:`${re.targetUid.value}_lb`,role:"listbox","aria-multiselectable":!0===e.multiple?"true":"false"}))),we=(0,n.EW)((()=>ae.value.map(((e,t)=>({index:t,opt:e,html:me.value(e),selected:!0,removeAtIndex:Ae,toggleOption:Pe,tabindex:ve.value}))))),Ce=(0,n.EW)((()=>{if(0===Z.value)return[];const{from:t,to:i}=J.value;return e.options.slice(t,i).map(((i,n)=>{const o=!0===Te.value(i),s=!0===We(i),r=t+n,a={clickable:!0,active:s,activeClass:xe.value,manualFocus:!0,focused:!1,disable:o,tabindex:-1,dense:e.optionsDense,dark:ce.value,role:"option","aria-selected":!0===s?"true":"false",id:`${re.targetUid.value}_${r}`,onClick:()=>{Pe(i)}};return!0!==o&&(D.value===r&&(a.focused=!0),!0===L.platform.is.desktop&&(a.onMousemove=()=>{!0===T.value&&Me(r)})),{index:r,opt:i,html:me.value(i),label:Le.value(i),selected:a.active,focused:a.focused,toggleOption:Pe,setOptionIndex:Me,itemProps:a}}))})),Se=(0,n.EW)((()=>void 0!==e.dropdownIcon?e.dropdownIcon:L.iconSet.arrow.dropdown)),ke=(0,n.EW)((()=>!1===e.optionsCover&&!0!==e.outlined&&!0!==e.standout&&!0!==e.borderless&&!0!==e.rounded)),xe=(0,n.EW)((()=>void 0!==e.optionsSelectedClass?e.optionsSelectedClass:void 0!==e.color?`text-${e.color}`:"")),Ee=(0,n.EW)((()=>E(e.optionValue,"value"))),Le=(0,n.EW)((()=>E(e.optionLabel,"label"))),Te=(0,n.EW)((()=>E(e.optionDisable,"disable"))),Ie=(0,n.EW)((()=>ae.value.map(Ee.value))),De=(0,n.EW)((()=>{const e={onInput:Ye,onChange:Y,onKeydown:Ue,onKeyup:je,onKeypress:ze,onFocus:He,onClick(e){!0===P&&(0,b.ds)(e)}};return e.onCompositionstart=e.onCompositionupdate=e.onCompositionend=Y,e}));function Re(t){return!0===e.emitValue?Ee.value(t):t}function Ne(t){if(-1!==t&&t=e.maxValues)return;const s=e.modelValue.slice();i("add",{index:s.length,value:o}),s.push(o),i("update:modelValue",s)}function Pe(t,n){if(!0!==re.editable.value||void 0===t||!0===Te.value(t))return;const o=Ee.value(t);if(!0!==e.multiple)return!0!==n&&(Xe(!0===e.fillInput?Le.value(t):"",!0,!0),ut()),null!==$.value&&$.value.focus(),void(0!==ae.value.length&&!0===(0,v.Hv)(Ee.value(ae.value[0]),o)||i("update:modelValue",!0===e.emitValue?o:t));if((!0!==P||!0===N.value)&&re.focus(),He(),0===ae.value.length){const n=!0===e.emitValue?o:t;return i("add",{index:0,value:n}),void i("update:modelValue",!0===e.multiple?[n]:n)}const s=e.modelValue.slice(),r=Ie.value.findIndex((e=>(0,v.Hv)(e,o)));if(-1!==r)i("remove",{index:r,value:s.splice(r,1)[0]});else{if(void 0!==e.maxValues&&s.length>=e.maxValues)return;const n=!0===e.emitValue?o:t;i("add",{index:s.length,value:n}),s.push(n)}i("update:modelValue",s)}function Me(e){if(!0!==L.platform.is.desktop)return;const t=-1!==e&&e=0?Le.value(e.options[n]):F,!0))}}function Be(t,i){const n=e=>(0,v.Hv)(Ee.value(e),t);return e.options.find(n)||i.find(n)||t}function We(e){const t=Ee.value(e);return void 0!==Ie.value.find((e=>(0,v.Hv)(e,t)))}function He(t){!0===e.useInput&&null!==$.value&&(void 0===t||$.value===t.target&&t.target.value===pe.value)&&$.value.select()}function Ve(e){!0===(0,w.Dv)(e,27)&&!0===T.value&&((0,b.ds)(e),ut(),ht()),i("keyup",e)}function je(t){const{value:i}=t.target;if(void 0===t.keyCode)if(t.target.value="",null!==V&&(clearTimeout(V),V=null),null!==j&&(clearTimeout(j),j=null),ht(),"string"===typeof i&&0!==i.length){const t=i.toLocaleLowerCase(),n=i=>{const n=e.options.find((e=>String(i.value(e)).toLocaleLowerCase()===t));return void 0!==n&&(-1===ae.value.indexOf(n)?Pe(n):ut(),!0)},o=e=>{!0!==n(Ee)&&!0!==e&&!0!==n(Le)&&Je(i,!0,(()=>o(!0)))};o()}else re.clearValue(t);else Ve(t)}function ze(e){i("keypress",e)}function Ue(t){if(i("keydown",t),!0===(0,w.JL)(t))return;const o=0!==R.value.length&&(void 0!==e.newValueMode||void 0!==e.onNewValue),s=!0!==t.shiftKey&&!0!==e.disableTabSelection&&!0!==e.multiple&&(-1!==D.value||!0===o);if(27===t.keyCode)return void(0,b.F4)(t);if(9===t.keyCode&&!1===s)return void ct();if(void 0===t.target||t.target.id!==re.targetUid.value||!0!==re.editable.value)return;if(40===t.keyCode&&!0!==re.innerLoading.value&&!1===T.value)return(0,b.Gu)(t),void dt();if(8===t.keyCode&&(!0===e.useChips||!0===e.clearable)&&!0!==e.hideSelected&&0===R.value.length)return void(!0===e.multiple&&!0===Array.isArray(e.modelValue)?Ne(e.modelValue.length-1):!0!==e.multiple&&null!==e.modelValue&&i("update:modelValue",null));35!==t.keyCode&&36!==t.keyCode||"string"===typeof R.value&&0!==R.value.length||((0,b.Gu)(t),D.value=-1,Fe(36===t.keyCode?1:-1,e.multiple)),33!==t.keyCode&&34!==t.keyCode||void 0===ee.value||((0,b.Gu)(t),D.value=Math.max(-1,Math.min(Z.value,D.value+(33===t.keyCode?-1:1)*ee.value.view)),Fe(33===t.keyCode?1:-1,e.multiple)),38!==t.keyCode&&40!==t.keyCode||((0,b.Gu)(t),Fe(38===t.keyCode?-1:1,e.multiple));const r=Z.value;if((void 0===W||H0&&!0!==e.useInput&&void 0!==t.key&&1===t.key.length&&!1===t.altKey&&!1===t.ctrlKey&&!1===t.metaKey&&(32!==t.keyCode||0!==W.length)){!0!==T.value&&dt(t);const i=t.key.toLocaleLowerCase(),o=1===W.length&&W[0]===i;H=Date.now()+1500,!1===o&&((0,b.Gu)(t),W+=i);const s=new RegExp("^"+W.split("").map((e=>-1!==k.indexOf(e)?"\\"+e:e)).join(".*"),"i");let a=D.value;if(!0===o||a<0||!0!==s.test(Le.value(e.options[a])))do{a=(0,y.eo)(a+1,-1,r-1)}while(a!==D.value&&(!0===Te.value(e.options[a])||!0!==s.test(Le.value(e.options[a]))));D.value!==a&&(0,n.dY)((()=>{Me(a),oe(a),a>=0&&!0===e.useInput&&!0===e.fillInput&&Ze(Le.value(e.options[a]),!0)}))}else if(13===t.keyCode||32===t.keyCode&&!0!==e.useInput&&""===W||9===t.keyCode&&!1!==s)if(9!==t.keyCode&&(0,b.Gu)(t),-1!==D.value&&D.value{if(i){if(!0!==S(i))return}else i=e.newValueMode;if(Xe("",!0!==e.multiple,!0),void 0===t||null===t)return;const n="toggle"===i?Pe:Oe;n(t,"add-unique"===i),!0!==e.multiple&&(null!==$.value&&$.value.focus(),ut())};if(void 0!==e.onNewValue?i("newValue",R.value,t):t(R.value),!0!==e.multiple)return}!0===T.value?ct():!0!==re.innerLoading.value&&dt()}}function $e(){return!0===P?G.value:null!==q.value&&null!==q.value.contentEl?q.value.contentEl:void 0}function qe(){return $e()}function Ke(){return!0===e.hideSelected?[]:void 0!==t["selected-item"]?we.value.map((e=>t["selected-item"](e))).slice():void 0!==t.selected?[].concat(t.selected()):!0===e.useChips?we.value.map(((t,i)=>(0,n.h)(c.A,{key:"option-"+i,removable:!0===re.editable.value&&!0!==Te.value(t.opt),dense:!0,textColor:e.color,tabindex:ve.value,onRemove(){t.removeAtIndex(i)}},(()=>(0,n.h)("span",{class:"ellipsis",[!0===t.html?"innerHTML":"textContent"]:Le.value(t.opt)}))))):[(0,n.h)("span",{[!0===_e.value?"innerHTML":"textContent"]:fe.value})]}function Ge(){if(!0===ge.value)return void 0!==t["no-option"]?t["no-option"]({inputValue:R.value}):void 0;const e=void 0!==t.option?t.option:e=>(0,n.h)(d.A,{key:e.index,...e.itemProps},(()=>(0,n.h)(u.A,(()=>(0,n.h)(h.A,(()=>(0,n.h)("span",{[!0===e.html?"innerHTML":"textContent"]:e.label})))))));let i=ie("div",Ce.value.map(e));return void 0!==t["before-options"]&&(i=t["before-options"]().concat(i)),(0,C.Hp)(t["after-options"],i)}function Qe(t,i){const o=!0===i?{...be.value,...re.splitAttrs.attributes.value}:void 0,s={ref:!0===i?$:void 0,key:"i_t",class:ue.value,style:e.inputStyle,value:void 0!==R.value?R.value:"",type:"search",...o,id:!0===i?re.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":!0===t||!0===e.autofocus||void 0,disabled:!0===e.disable,readonly:!0===e.readonly,...De.value};return!0!==t&&!0===P&&(!0===Array.isArray(s.class)?s.class=[...s.class,"no-pointer-events"]:s.class+=" no-pointer-events"),(0,n.h)("input",s)}function Ye(t){null!==V&&(clearTimeout(V),V=null),null!==j&&(clearTimeout(j),j=null),t&&t.target&&!0===t.target.qComposing||(Ze(t.target.value||""),M=!0,F=R.value,!0===re.focused.value||!0===P&&!0!==N.value||re.focus(),void 0!==e.onFilter&&(V=setTimeout((()=>{V=null,Je(R.value)}),e.inputDebounce)))}function Ze(t,n){R.value!==t&&(R.value=t,!0===n||0===e.inputDebounce||"0"===e.inputDebounce?i("inputValue",t):j=setTimeout((()=>{j=null,i("inputValue",t)}),e.inputDebounce))}function Xe(t,i,n){M=!0!==n,!0===e.useInput&&(Ze(t,!0),!0!==i&&!0===n||(F=t),!0!==i&&Je(t))}function Je(t,o,s){if(void 0===e.onFilter||!0!==o&&!0!==re.focused.value)return;!0===re.innerLoading.value?i("filterAbort"):(re.innerLoading.value=!0,A.value=!0),""!==t&&!0!==e.multiple&&0!==ae.value.length&&!0!==M&&t===Le.value(ae.value[0])&&(t="");const a=setTimeout((()=>{!0===T.value&&(T.value=!1)}),10);null!==z&&clearTimeout(z),z=a,i("filter",t,((e,t)=>{!0!==o&&!0!==re.focused.value||z!==a||(clearTimeout(z),"function"===typeof e&&e(),A.value=!1,(0,n.dY)((()=>{re.innerLoading.value=!1,!0===re.editable.value&&(!0===o?!0===T.value&&ut():!0===T.value?gt(!0):T.value=!0),"function"===typeof t&&(0,n.dY)((()=>{t(r)})),"function"===typeof s&&(0,n.dY)((()=>{s(r)}))})))}),(()=>{!0===re.focused.value&&z===a&&(clearTimeout(z),re.innerLoading.value=!1,A.value=!1),!0===T.value&&(T.value=!1)}))}function et(){return(0,n.h)(g.A,{ref:q,class:he.value,style:e.popupContentStyle,modelValue:T.value,fit:!0!==e.menuShrink,cover:!0===e.optionsCover&&!0!==ge.value&&!0!==e.useInput,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:ce.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:e.popupNoRouteDismiss,square:ke.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...ye.value,onScrollPassive:ne,onBeforeShow:mt,onBeforeHide:tt,onShow:it},Ge)}function tt(e){_t(e),ct()}function it(){se()}function nt(e){(0,b.ds)(e),null!==$.value&&$.value.focus(),N.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function ot(e){(0,b.ds)(e),(0,n.dY)((()=>{N.value=!1}))}function st(){const i=[(0,n.h)(a,{class:`col-auto ${re.fieldClass.value}`,...le.value,for:re.targetUid.value,dark:ce.value,square:!0,loading:A.value,itemAligned:!1,filled:!0,stackLabel:0!==R.value.length,...re.splitAttrs.listeners.value,onFocus:nt,onBlur:ot},{...t,rawControl:()=>re.getControl(!0),before:void 0,after:void 0})];return!0===T.value&&i.push((0,n.h)("div",{ref:G,class:he.value+" scroll",style:e.popupContentStyle,...ye.value,onClick:b.F4,onScrollPassive:ne},Ge())),(0,n.h)(p.A,{ref:K,modelValue:I.value,position:!0===e.useInput?"top":void 0,transitionShow:B,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,noRouteDismiss:e.popupNoRouteDismiss,onBeforeShow:mt,onBeforeHide:rt,onHide:at,onShow:lt},(()=>(0,n.h)("div",{class:"q-select__dialog"+(!0===ce.value?" q-select__dialog--dark q-dark":"")+(!0===N.value?" q-select__dialog--focused":"")},i)))}function rt(e){_t(e),null!==K.value&&K.value.__updateRefocusTarget(re.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),re.focused.value=!1}function at(e){ut(),!1===re.focused.value&&i("blur",e),ht()}function lt(){const e=document.activeElement;null!==e&&e.id===re.targetUid.value||null===$.value||$.value===e||$.value.focus(),se()}function ct(){!0!==I.value&&(D.value=-1,!0===T.value&&(T.value=!1),!1===re.focused.value&&(null!==z&&(clearTimeout(z),z=null),!0===re.innerLoading.value&&(i("filterAbort"),re.innerLoading.value=!1,A.value=!1)))}function dt(i){!0===re.editable.value&&(!0===P?(re.onControlFocusin(i),I.value=!0,(0,n.dY)((()=>{re.focus()}))):re.focus(),void 0!==e.onFilter?Je(R.value):!0===ge.value&&void 0===t["no-option"]||(T.value=!0))}function ut(){I.value=!1,ct()}function ht(){!0===e.useInput&&Xe(!0!==e.multiple&&!0===e.fillInput&&0!==ae.value.length&&Le.value(ae.value[0])||"",!0,!0)}function gt(t){let i=-1;if(!0===t){if(0!==ae.value.length){const t=Ee.value(ae.value[0]);i=e.options.findIndex((e=>(0,v.Hv)(Ee.value(e),t)))}te(i)}Me(i)}function pt(e,t){!0===T.value&&!1===re.innerLoading.value&&(te(-1,!0),(0,n.dY)((()=>{!0===T.value&&!1===re.innerLoading.value&&(e>t?te():gt(!0))})))}function ft(){!1===I.value&&null!==q.value&&q.value.updatePosition()}function mt(e){void 0!==e&&(0,b.ds)(e),i("popupShow",e),re.hasPopupOpen=!0,re.onControlFocusin(e)}function _t(e){void 0!==e&&(0,b.ds)(e),i("popupHide",e),re.hasPopupOpen=!1,re.onControlFocusout(e)}function vt(){P=(!0===L.platform.is.mobile||"dialog"===e.behavior)&&("menu"!==e.behavior&&(!0!==e.useInput||(void 0!==t["no-option"]||void 0!==e.onFilter||!1===ge.value))),B=!0===L.platform.is.ios&&!0===P&&!0===e.useInput?"fade":e.transitionShow}return(0,n.wB)(ae,(t=>{O=t,!0===e.useInput&&!0===e.fillInput&&!0!==e.multiple&&!0!==re.innerLoading.value&&(!0!==I.value&&!0!==T.value||!0!==de.value)&&(!0!==M&&ht(),!0!==I.value&&!0!==T.value||Je(""))}),{immediate:!0}),(0,n.wB)((()=>e.fillInput),ht),(0,n.wB)(T,gt),(0,n.wB)(Z,pt),(0,n.Ic)(vt),(0,n.$u)(ft),vt(),(0,n.xo)((()=>{null!==V&&clearTimeout(V),null!==j&&clearTimeout(j)})),Object.assign(r,{showPopup:dt,hidePopup:ut,removeAtIndex:Ne,add:Oe,toggleOption:Pe,getOptionIndex:()=>D.value,setOptionIndex:Me,moveOptionSelection:Fe,filter:Je,updateMenuPosition:ft,updateInputValue:Xe,isOptionSelected:We,getEmittingOptionValue:Re,isOptionDisabled:(...e)=>!0===Te.value.apply(null,e),getOptionValue:(...e)=>Ee.value.apply(null,e),getOptionLabel:(...e)=>Le.value.apply(null,e)}),Object.assign(re,{innerValue:ae,fieldClass:(0,n.EW)((()=>`q-select q-field--auto-height q-select--with${!0!==e.useInput?"out":""}-input q-select--with${!0!==e.useChips?"out":""}-chips q-select--`+(!0===e.multiple?"multiple":"single"))),inputRef:U,targetRef:$,hasValue:de,showPopup:dt,floatingLabel:(0,n.EW)((()=>!0!==e.hideSelected&&!0===de.value||"number"===typeof R.value||0!==R.value.length||(0,s.o9)(e.displayValue))),getControlChild:()=>{if(!1!==re.editable.value&&(!0===I.value||!0!==ge.value||void 0!==t["no-option"]))return!0===P?st():et();!0===re.hasPopupOpen&&(re.hasPopupOpen=!1)},controlEvents:{onFocusin(e){re.onControlFocusin(e)},onFocusout(e){re.onControlFocusout(e,(()=>{ht(),ct()}))},onClick(e){if((0,b.F4)(e),!0!==P&&!0===T.value)return ct(),void(null!==$.value&&$.value.focus());dt(e)}},getControl:t=>{const i=Ke(),o=!0===t||!0!==I.value||!0!==P;if(!0===e.useInput)i.push(Qe(t,o));else if(!0===re.editable.value){const s=!0===o?be.value:void 0;i.push((0,n.h)("input",{ref:!0===o?$:void 0,key:"d_t",class:"q-select__focus-target",id:!0===o?re.targetUid.value:void 0,value:fe.value,readonly:!0,"data-autofocus":!0===t||!0===e.autofocus||void 0,...s,onKeydown:Ue,onKeyup:Ve,onKeypress:ze})),!0===o&&"string"===typeof e.autocomplete&&0!==e.autocomplete.length&&i.push((0,n.h)("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:je}))}if(void 0!==Q.value&&!0!==e.disable&&0!==Ie.value.length){const t=Ie.value.map((e=>(0,n.h)("option",{value:e,selected:!0})));i.push((0,n.h)("select",{class:"hidden",name:Q.value,multiple:e.multiple},t))}const s=!0===e.useInput||!0!==o?void 0:re.splitAttrs.attributes.value;return(0,n.h)("div",{class:"q-field__native row items-center",...s,...re.splitAttrs.listeners.value},i)},getInnerAppend:()=>!0!==e.loading&&!0!==A.value&&!0!==e.hideDropdownIcon?[(0,n.h)(l.A,{class:"q-select__dropdown-icon"+(!0===T.value?" rotate-180":""),name:Se.value})]:null}),(0,s.Ay)(re)}})},10386:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(16372),s=i(29467);const r={true:"inset",item:"item-inset","item-thumbnail":"item-thumbnail-inset"},a={xs:2,sm:4,md:8,lg:16,xl:24},l=(0,s.a0)({name:"QSeparator",props:{...o.C,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(e){const t=(0,n.nI)(),i=(0,o.A)(e,t.proxy.$q),s=(0,n.EW)((()=>!0===e.vertical?"vertical":"horizontal")),l=(0,n.EW)((()=>` q-separator--${s.value}`)),c=(0,n.EW)((()=>!1!==e.inset?`${l.value}-${r[e.inset]}`:"")),d=(0,n.EW)((()=>`q-separator${l.value}${c.value}`+(void 0!==e.color?` bg-${e.color}`:"")+(!0===i.value?" q-separator--dark":""))),u=(0,n.EW)((()=>{const t={};if(void 0!==e.size&&(t[!0===e.vertical?"width":"height"]=e.size),!1!==e.spaced){const i=!0===e.spaced?`${a.md}px`:e.spaced in a?`${a[e.spaced]}px`:e.spaced,n=!0===e.vertical?["Left","Right"]:["Top","Bottom"];t[`margin${n[0]}`]=t[`margin${n[1]}`]=i}return t}));return()=>(0,n.h)("hr",{class:d.value,style:u.value,"aria-orientation":s.value})}})},93676:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(61758),o=i(29467);const s=(0,o.a0)({name:"QSpace",setup(){const e=(0,n.h)("div",{class:"q-space"});return()=>e}})},30564:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(61906);const s={size:{type:[String,Number],default:"1em"},color:String};function r(e){return{cSize:(0,n.EW)((()=>e.size in o.v0?`${o.v0[e.size]}px`:e.size)),classes:(0,n.EW)((()=>"q-spinner"+(e.color?` text-${e.color}`:"")))}}var a=i(29467);const l=(0,a.a0)({name:"QSpinner",props:{...s,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:i}=r(e);return()=>(0,n.h)("svg",{class:i.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[(0,n.h)("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}})},71746:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(31852),s=i(29467),r=i(65139);const a=(0,s.a0)({name:"QTabPanel",props:o.hb,setup(e,{slots:t}){return()=>(0,n.h)("div",{class:"q-tab-panel",role:"tabpanel"},(0,r.zm)(t.default))}})},39041:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(61758),o=i(16372),s=i(31852),r=i(29467),a=i(65139);const l=(0,r.a0)({name:"QTabPanels",props:{...s.Qn,...o.C},emits:s.g,setup(e,{slots:t}){const i=(0,n.nI)(),r=(0,o.A)(e,i.proxy.$q),{updatePanelsList:l,getPanelContent:c,panelDirectives:d}=(0,s.Ay)(),u=(0,n.EW)((()=>"q-tab-panels q-panel-parent"+(!0===r.value?" q-tab-panels--dark q-dark":"")));return()=>(l(t),(0,a.Kf)("div",{class:u.value},c(),"pan",e.swipeable,(()=>d.value)))}})},39942:(e,t,i)=>{"use strict";i.d(t,{A:()=>ee});i(42958),i(10239);var n=i(61758),o=i(38734),s=i(50492),r=i(29467),a=i(65139);const l=(0,r.a0)({name:"QTh",props:{props:Object,autoWidth:Boolean},emits:["click"],setup(e,{slots:t,emit:i}){const o=(0,n.nI)(),{proxy:{$q:r}}=o,l=e=>{i("click",e)};return()=>{if(void 0===e.props)return(0,n.h)("th",{class:!0===e.autoWidth?"q-table--col-auto-width":"",onClick:l},(0,a.zm)(t.default));let i,c;const d=o.vnode.key;if(d){if(i=e.props.colsMap[d],void 0===i)return}else i=e.props.col;if(!0===i.sortable){const e="right"===i.align?"unshift":"push";c=(0,a.Ij)(t.default,[]),c[e]((0,n.h)(s.A,{class:i.__iconClass,name:r.iconSet.table.arrowUp}))}else c=(0,a.zm)(t.default);const u={class:i.__thClass+(!0===e.autoWidth?" q-table--col-auto-width":""),style:i.headerStyle,onClick:t=>{!0===i.sortable&&e.props.sort(i),l(t)}};return(0,n.h)("th",u,c)}}});var c=i(10386),d=i(53999),u=i(16372);const h=["horizontal","vertical","cell","none"],g=(0,r.a0)({name:"QMarkupTable",props:{...u.C,dense:Boolean,flat:Boolean,bordered:Boolean,square:Boolean,wrapCells:Boolean,separator:{type:String,default:"horizontal",validator:e=>h.includes(e)}},setup(e,{slots:t}){const i=(0,n.nI)(),o=(0,u.A)(e,i.proxy.$q),s=(0,n.EW)((()=>`q-markup-table q-table__container q-table__card q-table--${e.separator}-separator`+(!0===o.value?" q-table--dark q-table__card--dark q-dark":"")+(!0===e.dense?" q-table--dense":"")+(!0===e.flat?" q-table--flat":"")+(!0===e.bordered?" q-table--bordered":"")+(!0===e.square?" q-table--square":"")+(!1===e.wrapCells?" q-table--no-wrap":"")));return()=>(0,n.h)("div",{class:s.value},[(0,n.h)("table",{class:"q-table"},(0,a.zm)(t.default))])}});function p(e,t){return(0,n.h)("div",e,[(0,n.h)("table",{class:"q-table"},t)])}var f=i(31503),m=i(38336),_=i(22500);const v={list:d.A,table:g},b=["list","table","__qtable"],y=(0,r.a0)({name:"QVirtualScroll",props:{...f.AV,type:{type:String,default:"list",validator:e=>b.includes(e)},items:{type:Array,default:()=>[]},itemsFn:Function,itemsSize:Number,scrollTarget:m.cP},setup(e,{slots:t,attrs:i}){let s;const r=(0,o.KR)(null),l=(0,n.EW)((()=>e.itemsSize>=0&&void 0!==e.itemsFn?parseInt(e.itemsSize,10):Array.isArray(e.items)?e.items.length:0)),{virtualScrollSliceRange:c,localResetVirtualScroll:d,padVirtualScroll:u,onVirtualScrollEvt:h}=(0,f.Iq)({virtualScrollLength:l,getVirtualScrollTarget:C,getVirtualScrollEl:w}),g=(0,n.EW)((()=>{if(0===l.value)return[];const t=(e,t)=>({index:c.value.from+t,item:e});return void 0===e.itemsFn?e.items.slice(c.value.from,c.value.to).map(t):e.itemsFn(c.value.from,c.value.to-c.value.from).map(t)})),b=(0,n.EW)((()=>"q-virtual-scroll q-virtual-scroll"+(!0===e.virtualScrollHorizontal?"--horizontal":"--vertical")+(void 0!==e.scrollTarget?"":" scroll"))),y=(0,n.EW)((()=>void 0!==e.scrollTarget?{}:{tabindex:0}));function w(){return r.value.$el||r.value}function C(){return s}function S(){s=(0,m.hD)(w(),e.scrollTarget),s.addEventListener("scroll",h,_.mG.passive)}function k(){void 0!==s&&(s.removeEventListener("scroll",h,_.mG.passive),s=void 0)}function x(){let i=u("list"===e.type?"div":"tbody",g.value.map(t.default));return void 0!==t.before&&(i=t.before().concat(i)),(0,a.Hp)(t.after,i)}return(0,n.wB)(l,(()=>{d()})),(0,n.wB)((()=>e.scrollTarget),(()=>{k(),S()})),(0,n.KC)((()=>{d()})),(0,n.sV)((()=>{S()})),(0,n.n)((()=>{S()})),(0,n.Y4)((()=>{k()})),(0,n.xo)((()=>{k()})),()=>{if(void 0!==t.default)return"__qtable"===e.type?p({ref:r,class:"q-table__middle "+b.value},x()):(0,n.h)(v[e.type],{...i,ref:r,class:[i.class,b.value],...y.value},x);console.error("QVirtualScroll: default scoped slot is required for rendering")}}});var w=i(75848),C=i(35859),S=i(80460),k=i(1693),x=i(34848),E=i(15157);let L=0;const T={fullscreen:Boolean,noRouteFullscreenExit:Boolean},I=["update:fullscreen","fullscreen"];function D(){const e=(0,n.nI)(),{props:t,emit:i,proxy:s}=e;let r,a,l;const c=(0,o.KR)(!1);function d(){!0===c.value?h():u()}function u(){!0!==c.value&&(c.value=!0,l=s.$el.parentNode,l.replaceChild(a,s.$el),document.body.appendChild(s.$el),L++,1===L&&document.body.classList.add("q-body--fullscreen-mixin"),r={handler:h},x.A.add(r))}function h(){!0===c.value&&(void 0!==r&&(x.A.remove(r),r=void 0),l.replaceChild(s.$el,a),c.value=!1,L=Math.max(0,L-1),0===L&&(document.body.classList.remove("q-body--fullscreen-mixin"),void 0!==s.$el.scrollIntoView&&setTimeout((()=>{s.$el.scrollIntoView()}))))}return!0===(0,E.$b)(e)&&(0,n.wB)((()=>s.$route.fullPath),(()=>{!0!==t.noRouteFullscreenExit&&h()})),(0,n.wB)((()=>t.fullscreen),(e=>{c.value!==e&&d()})),(0,n.wB)(c,(e=>{i("update:fullscreen",e),i("fullscreen",e)})),(0,n.KC)((()=>{a=document.createElement("span")})),(0,n.sV)((()=>{!0===t.fullscreen&&u()})),(0,n.xo)(h),Object.assign(s,{toggleFullscreen:d,setFullscreen:u,exitFullscreen:h}),{inFullscreen:c,toggleFullscreen:d}}function R(e,t){return new Date(e)-new Date(t)}var N=i(1054);const A={sortMethod:Function,binaryStateSort:Boolean,columnSortOrder:{type:String,validator:e=>"ad"===e||"da"===e,default:"ad"}};function O(e,t,i,o){const s=(0,n.EW)((()=>{const{sortBy:e}=t.value;return e&&i.value.find((t=>t.name===e))||null})),r=(0,n.EW)((()=>void 0!==e.sortMethod?e.sortMethod:(e,t,n)=>{const o=i.value.find((e=>e.name===t));if(void 0===o||void 0===o.field)return e;const s=!0===n?-1:1,r="function"===typeof o.field?e=>o.field(e):e=>e[o.field];return e.sort(((e,t)=>{let i=r(e),n=r(t);return void 0!==o.rawSort?o.rawSort(i,n,e,t)*s:null===i||void 0===i?-1*s:null===n||void 0===n?1*s:void 0!==o.sort?o.sort(i,n,e,t)*s:!0===(0,N.Et)(i)&&!0===(0,N.Et)(n)?(i-n)*s:!0===(0,N.$P)(i)&&!0===(0,N.$P)(n)?R(i,n)*s:"boolean"===typeof i&&"boolean"===typeof n?(i-n)*s:([i,n]=[i,n].map((e=>(e+"").toLocaleString().toLowerCase())),ie.name===n));void 0!==e&&e.sortOrder&&(s=e.sortOrder)}let{sortBy:r,descending:a}=t.value;r!==n?(r=n,a="da"===s):!0===e.binaryStateSort?a=!a:!0===a?"ad"===s?r=null:a=!1:"ad"===s?a=!0:r=null,o({sortBy:r,descending:a,page:1})}return{columnToSort:s,computedSortMethod:r,sort:a}}const P={filter:[String,Object],filterMethod:Function};function M(e,t){const i=(0,n.EW)((()=>void 0!==e.filterMethod?e.filterMethod:(e,t,i,n)=>{const o=t?t.toLowerCase():"";return e.filter((e=>i.some((t=>{const i=n(t,e)+"",s="undefined"===i||"null"===i?"":i.toLowerCase();return-1!==s.indexOf(o)}))))}));return(0,n.wB)((()=>e.filter),(()=>{(0,n.dY)((()=>{t({page:1},!0)}))}),{deep:!0}),{computedFilterMethod:i}}function F(e,t){for(const i in t)if(t[i]!==e[i])return!1;return!0}function B(e){return e.page<1&&(e.page=1),void 0!==e.rowsPerPage&&e.rowsPerPage<1&&(e.rowsPerPage=0),e}const W={pagination:Object,rowsPerPageOptions:{type:Array,default:()=>[5,7,10,15,20,25,50,0]},"onUpdate:pagination":[Function,Array]};function H(e,t){const{props:i,emit:s}=e,r=(0,o.KR)(Object.assign({sortBy:null,descending:!1,page:1,rowsPerPage:0!==i.rowsPerPageOptions.length?i.rowsPerPageOptions[0]:5},i.pagination)),a=(0,n.EW)((()=>{const e=void 0!==i["onUpdate:pagination"]?{...r.value,...i.pagination}:r.value;return B(e)})),l=(0,n.EW)((()=>void 0!==a.value.rowsNumber));function c(e){d({pagination:e,filter:i.filter})}function d(e={}){(0,n.dY)((()=>{s("request",{pagination:e.pagination||a.value,filter:e.filter||i.filter,getCellValue:t})}))}function u(e,t){const n=B({...a.value,...e});!0!==F(a.value,n)?!0!==l.value?void 0!==i.pagination&&void 0!==i["onUpdate:pagination"]?s("update:pagination",n):r.value=n:c(n):!0===l.value&&!0===t&&c(n)}return{innerPagination:r,computedPagination:a,isServerSide:l,requestServerInteraction:d,setPagination:u}}function V(e,t,i,o,s,r){const{props:a,emit:l,proxy:{$q:c}}=e,d=(0,n.EW)((()=>!0===o.value?i.value.rowsNumber||0:r.value)),u=(0,n.EW)((()=>{const{page:e,rowsPerPage:t}=i.value;return(e-1)*t})),h=(0,n.EW)((()=>{const{page:e,rowsPerPage:t}=i.value;return e*t})),g=(0,n.EW)((()=>1===i.value.page)),p=(0,n.EW)((()=>0===i.value.rowsPerPage?1:Math.max(1,Math.ceil(d.value/i.value.rowsPerPage)))),f=(0,n.EW)((()=>0===h.value||i.value.page>=p.value)),m=(0,n.EW)((()=>{const e=a.rowsPerPageOptions.includes(t.value.rowsPerPage)?a.rowsPerPageOptions:[t.value.rowsPerPage].concat(a.rowsPerPageOptions);return e.map((e=>({label:0===e?c.lang.table.allRows:""+e,value:e})))}));function _(){s({page:1})}function v(){const{page:e}=i.value;e>1&&s({page:e-1})}function b(){const{page:e,rowsPerPage:t}=i.value;h.value>0&&e*t{if(e===t)return;const n=i.value.page;e&&!n?s({page:1}):e["single","multiple","none"].includes(e)},selected:{type:Array,default:()=>[]}},z=["update:selected","selection"];function U(e,t,i,o){const s=(0,n.EW)((()=>{const t={};return e.selected.map(o.value).forEach((e=>{t[e]=!0})),t})),r=(0,n.EW)((()=>"none"!==e.selection)),a=(0,n.EW)((()=>"single"===e.selection)),l=(0,n.EW)((()=>"multiple"===e.selection)),c=(0,n.EW)((()=>0!==i.value.length&&i.value.every((e=>!0===s.value[o.value(e)])))),d=(0,n.EW)((()=>!0!==c.value&&i.value.some((e=>!0===s.value[o.value(e)])))),u=(0,n.EW)((()=>e.selected.length));function h(e){return!0===s.value[e]}function g(){t("update:selected",[])}function p(i,n,s,r){t("selection",{rows:n,added:s,keys:i,evt:r});const l=!0===a.value?!0===s?n:[]:!0===s?e.selected.concat(n):e.selected.filter((e=>!1===i.includes(o.value(e))));t("update:selected",l)}return{hasSelectionMode:r,singleSelection:a,multipleSelection:l,allRowsSelected:c,someRowsSelected:d,rowsSelectedNumber:u,isRowSelected:h,clearSelection:g,updateSelection:p}}function $(e){return Array.isArray(e)?e.slice():[]}const q={expanded:Array},K=["update:expanded"];function G(e,t){const i=(0,o.KR)($(e.expanded));function s(e){return i.value.includes(e)}function r(n){void 0!==e.expanded?t("update:expanded",n):i.value=n}function a(e,t){const n=i.value.slice(),o=n.indexOf(e);!0===t?-1===o&&(n.push(e),r(n)):-1!==o&&(n.splice(o,1),r(n))}return(0,n.wB)((()=>e.expanded),(e=>{i.value=$(e)})),{isRowExpanded:s,setExpanded:r,updateExpanded:a}}const Q={visibleColumns:Array};function Y(e,t,i){const o=(0,n.EW)((()=>{if(void 0!==e.columns)return e.columns;const t=e.rows[0];return void 0!==t?Object.keys(t).map((e=>({name:e,label:e.toUpperCase(),field:e,align:(0,N.Et)(t[e])?"right":"left",sortable:!0}))):[]})),s=(0,n.EW)((()=>{const{sortBy:i,descending:n}=t.value,s=void 0!==e.visibleColumns?o.value.filter((t=>!0===t.required||!0===e.visibleColumns.includes(t.name))):o.value;return s.map((e=>{const t=e.align||"right",o=`text-${t}`;return{...e,align:t,__iconClass:`q-table__sort-icon q-table__sort-icon--${t}`,__thClass:o+(void 0!==e.headerClasses?" "+e.headerClasses:"")+(!0===e.sortable?" sortable":"")+(e.name===i?" sorted "+(!0===n?"sort-desc":""):""),__tdStyle:void 0!==e.style?"function"!==typeof e.style?()=>e.style:e.style:()=>null,__tdClass:void 0!==e.classes?"function"!==typeof e.classes?()=>o+" "+e.classes:t=>o+" "+e.classes(t):()=>o}}))})),r=(0,n.EW)((()=>{const e={};return s.value.forEach((t=>{e[t.name]=t})),e})),a=(0,n.EW)((()=>void 0!==e.tableColspan?e.tableColspan:s.value.length+(!0===i.value?1:0)));return{colList:o,computedCols:s,computedColsMap:r,computedColspan:a}}var Z=i(82453);const X="q-table__bottom row items-center",J={};f.kP.forEach((e=>{J[e]={}}));const ee=(0,r.a0)({name:"QTable",props:{rows:{type:Array,required:!0},rowKey:{type:[String,Function],default:"id"},columns:Array,loading:Boolean,iconFirstPage:String,iconPrevPage:String,iconNextPage:String,iconLastPage:String,title:String,hideHeader:Boolean,grid:Boolean,gridHeader:Boolean,dense:Boolean,flat:Boolean,bordered:Boolean,square:Boolean,separator:{type:String,default:"horizontal",validator:e=>["horizontal","vertical","cell","none"].includes(e)},wrapCells:Boolean,virtualScroll:Boolean,virtualScrollTarget:{},...J,noDataLabel:String,noResultsLabel:String,loadingLabel:String,selectedRowsLabel:Function,rowsPerPageLabel:String,paginationLabel:Function,color:{type:String,default:"grey-8"},titleClass:[String,Array,Object],tableStyle:[String,Array,Object],tableClass:[String,Array,Object],tableHeaderStyle:[String,Array,Object],tableHeaderClass:[String,Array,Object],cardContainerClass:[String,Array,Object],cardContainerStyle:[String,Array,Object],cardStyle:[String,Array,Object],cardClass:[String,Array,Object],hideBottom:Boolean,hideSelectedBanner:Boolean,hideNoData:Boolean,hidePagination:Boolean,onRowClick:Function,onRowDblclick:Function,onRowContextmenu:Function,...u.C,...T,...Q,...P,...W,...q,...j,...A},emits:["request","virtualScroll",...I,...K,...z],setup(e,{slots:t,emit:i}){const r=(0,n.nI)(),{proxy:{$q:a}}=r,d=(0,u.A)(e,a),{inFullscreen:h,toggleFullscreen:g}=D(),m=(0,n.EW)((()=>"function"===typeof e.rowKey?e.rowKey:t=>t[e.rowKey])),_=(0,o.KR)(null),v=(0,o.KR)(null),b=(0,n.EW)((()=>!0!==e.grid&&!0===e.virtualScroll)),x=(0,n.EW)((()=>" q-table__card"+(!0===d.value?" q-table__card--dark q-dark":"")+(!0===e.square?" q-table--square":"")+(!0===e.flat?" q-table--flat":"")+(!0===e.bordered?" q-table--bordered":""))),E=(0,n.EW)((()=>`q-table__container q-table--${e.separator}-separator column no-wrap`+(!0===e.grid?" q-table--grid":x.value)+(!0===d.value?" q-table--dark":"")+(!0===e.dense?" q-table--dense":"")+(!1===e.wrapCells?" q-table--no-wrap":"")+(!0===h.value?" fullscreen scroll":""))),L=(0,n.EW)((()=>E.value+(!0===e.loading?" q-table--loading":"")));(0,n.wB)((()=>e.tableStyle+e.tableClass+e.tableHeaderStyle+e.tableHeaderClass+E.value),(()=>{!0===b.value&&null!==v.value&&v.value.reset()}));const{innerPagination:T,computedPagination:I,isServerSide:R,requestServerInteraction:N,setPagination:A}=H(r,Me),{computedFilterMethod:P}=M(e,A),{isRowExpanded:F,setExpanded:B,updateExpanded:W}=G(e,i),j=(0,n.EW)((()=>{let t=e.rows;if(!0===R.value||0===t.length)return t;const{sortBy:i,descending:n}=I.value;return e.filter&&(t=P.value(t,e.filter,re.value,Me)),null!==ce.value&&(t=de.value(e.rows===t?t.slice():t,i,n)),t})),z=(0,n.EW)((()=>j.value.length)),$=(0,n.EW)((()=>{let t=j.value;if(!0===R.value)return t;const{rowsPerPage:i}=I.value;return 0!==i&&(0===he.value&&e.rows!==t?t.length>ge.value&&(t=t.slice(0,ge.value)):t=t.slice(he.value,ge.value)),t})),{hasSelectionMode:q,singleSelection:K,multipleSelection:Q,allRowsSelected:J,someRowsSelected:ee,rowsSelectedNumber:te,isRowSelected:ie,clearSelection:ne,updateSelection:oe}=U(e,i,$,m),{colList:se,computedCols:re,computedColsMap:ae,computedColspan:le}=Y(e,I,q),{columnToSort:ce,computedSortMethod:de,sort:ue}=O(e,I,se,A),{firstRowIndex:he,lastRowIndex:ge,isFirstPage:pe,isLastPage:fe,pagesNumber:me,computedRowsPerPageOptions:_e,computedRowsNumber:ve,firstPage:be,prevPage:ye,nextPage:we,lastPage:Ce}=V(r,T,I,R,A,z),Se=(0,n.EW)((()=>0===$.value.length)),ke=(0,n.EW)((()=>{const t={};return f.kP.forEach((i=>{t[i]=e[i]})),void 0===t.virtualScrollItemSize&&(t.virtualScrollItemSize=!0===e.dense?28:48),t}));function xe(){!0===b.value&&v.value.reset()}function Ee(){if(!0===e.grid)return Qe();const i=!0!==e.hideHeader?He:null;if(!0===b.value){const o=t["top-row"],s=t["bottom-row"],r={default:e=>De(e.item,t.body,e.index)};if(void 0!==o){const e=(0,n.h)("tbody",o({cols:re.value}));r.before=null===i?()=>e:()=>[i()].concat(e)}else null!==i&&(r.before=i);return void 0!==s&&(r.after=()=>(0,n.h)("tbody",s({cols:re.value}))),(0,n.h)(y,{ref:v,class:e.tableClass,style:e.tableStyle,...ke.value,scrollTarget:e.virtualScrollTarget,items:$.value,type:"__qtable",tableColspan:le.value,onVirtualScroll:Te},r)}const o=[Re()];return null!==i&&o.unshift(i()),p({class:["q-table__middle scroll",e.tableClass],style:e.tableStyle},o)}function Le(t,n){if(null!==v.value)return void v.value.scrollTo(t,n);t=parseInt(t,10);const o=_.value.querySelector(`tbody tr:nth-of-type(${t+1})`);if(null!==o){const n=_.value.querySelector(".q-table__middle.scroll"),s=o.offsetTop-e.virtualScrollStickySizeStart,r=s{const i=t[`body-cell-${e.name}`],s=void 0!==i?i:c;return void 0!==s?s(Ae({key:a,row:o,pageIndex:r,col:e})):(0,n.h)("td",{class:e.__tdClass(o),style:e.__tdStyle(o)},Me(e,o))}));if(!0===q.value){const i=t["body-selection"],s=void 0!==i?i(Oe({key:a,row:o,pageIndex:r})):[(0,n.h)(S.A,{modelValue:l,color:e.color,dark:d.value,dense:e.dense,"onUpdate:modelValue":(e,t)=>{oe([a],[o],e,t)}})];u.unshift((0,n.h)("td",{class:"q-table--col-auto-width"},s))}const h={key:a,class:{selected:l}};return void 0!==e.onRowClick&&(h.class["cursor-pointer"]=!0,h.onClick=e=>{i("rowClick",e,o,r)}),void 0!==e.onRowDblclick&&(h.class["cursor-pointer"]=!0,h.onDblclick=e=>{i("rowDblclick",e,o,r)}),void 0!==e.onRowContextmenu&&(h.class["cursor-pointer"]=!0,h.onContextmenu=e=>{i("rowContextmenu",e,o,r)}),(0,n.h)("tr",h,u)}function Re(){const e=t.body,i=t["top-row"],o=t["bottom-row"];let s=$.value.map(((t,i)=>De(t,e,i)));return void 0!==i&&(s=i({cols:re.value}).concat(s)),void 0!==o&&(s=s.concat(o({cols:re.value}))),(0,n.h)("tbody",s)}function Ne(e){return Pe(e),e.cols=e.cols.map((t=>(0,Z.$)({...t},"value",(()=>Me(t,e.row))))),e}function Ae(e){return Pe(e),(0,Z.$)(e,"value",(()=>Me(e.col,e.row))),e}function Oe(e){return Pe(e),e}function Pe(t){Object.assign(t,{cols:re.value,colsMap:ae.value,sort:ue,rowIndex:he.value+t.pageIndex,color:e.color,dark:d.value,dense:e.dense}),!0===q.value&&(0,Z.$)(t,"selected",(()=>ie(t.key)),((e,i)=>{oe([t.key],[t.row],e,i)})),(0,Z.$)(t,"expand",(()=>F(t.key)),(e=>{W(t.key,e)}))}function Me(e,t){const i="function"===typeof e.field?e.field(t):t[e.field];return void 0!==e.format?e.format(i,t):i}const Fe=(0,n.EW)((()=>({pagination:I.value,pagesNumber:me.value,isFirstPage:pe.value,isLastPage:fe.value,firstPage:be,prevPage:ye,nextPage:we,lastPage:Ce,inFullscreen:h.value,toggleFullscreen:g})));function Be(){const i=t.top,o=t["top-left"],s=t["top-right"],r=t["top-selection"],a=!0===q.value&&void 0!==r&&te.value>0,l="q-table__top relative-position row items-center";if(void 0!==i)return(0,n.h)("div",{class:l},[i(Fe.value)]);let c;return!0===a?c=r(Fe.value).slice():(c=[],void 0!==o?c.push((0,n.h)("div",{class:"q-table__control"},[o(Fe.value)])):e.title&&c.push((0,n.h)("div",{class:"q-table__control"},[(0,n.h)("div",{class:["q-table__title",e.titleClass]},e.title)]))),void 0!==s&&(c.push((0,n.h)("div",{class:"q-table__separator col"})),c.push((0,n.h)("div",{class:"q-table__control"},[s(Fe.value)]))),0!==c.length?(0,n.h)("div",{class:l},c):void 0}const We=(0,n.EW)((()=>!0===ee.value?null:J.value));function He(){const i=Ve();return!0===e.loading&&void 0===t.loading&&i.push((0,n.h)("tr",{class:"q-table__progress"},[(0,n.h)("th",{class:"relative-position",colspan:le.value},Ie())])),(0,n.h)("thead",i)}function Ve(){const i=t.header,o=t["header-cell"];if(void 0!==i)return i(je({header:!0})).slice();const s=re.value.map((e=>{const i=t[`header-cell-${e.name}`],s=void 0!==i?i:o,r=je({col:e});return void 0!==s?s(r):(0,n.h)(l,{key:e.name,props:r},(()=>e.label))}));if(!0===K.value&&!0!==e.grid)s.unshift((0,n.h)("th",{class:"q-table--col-auto-width"}," "));else if(!0===Q.value){const i=t["header-selection"],o=void 0!==i?i(je({})):[(0,n.h)(S.A,{color:e.color,modelValue:We.value,dark:d.value,dense:e.dense,"onUpdate:modelValue":ze})];s.unshift((0,n.h)("th",{class:"q-table--col-auto-width"},o))}return[(0,n.h)("tr",{class:e.tableHeaderClass,style:e.tableHeaderStyle},s)]}function je(t){return Object.assign(t,{cols:re.value,sort:ue,colsMap:ae.value,color:e.color,dark:d.value,dense:e.dense}),!0===Q.value&&(0,Z.$)(t,"selected",(()=>We.value),ze),t}function ze(e){!0===ee.value&&(e=!1),oe($.value.map(m.value),$.value,e)}const Ue=(0,n.EW)((()=>{const t=[e.iconFirstPage||a.iconSet.table.firstPage,e.iconPrevPage||a.iconSet.table.prevPage,e.iconNextPage||a.iconSet.table.nextPage,e.iconLastPage||a.iconSet.table.lastPage];return!0===a.lang.rtl?t.reverse():t}));function $e(){if(!0===e.hideBottom)return;if(!0===Se.value){if(!0===e.hideNoData)return;const i=!0===e.loading?e.loadingLabel||a.lang.table.loading:e.filter?e.noResultsLabel||a.lang.table.noResults:e.noDataLabel||a.lang.table.noData,o=t["no-data"],r=void 0!==o?[o({message:i,icon:a.iconSet.table.warning,filter:e.filter})]:[(0,n.h)(s.A,{class:"q-table__bottom-nodata-icon",name:a.iconSet.table.warning}),i];return(0,n.h)("div",{class:X+" q-table__bottom--nodata"},r)}const i=t.bottom;if(void 0!==i)return(0,n.h)("div",{class:X},[i(Fe.value)]);const o=!0!==e.hideSelectedBanner&&!0===q.value&&te.value>0?[(0,n.h)("div",{class:"q-table__control"},[(0,n.h)("div",[(e.selectedRowsLabel||a.lang.table.selectedRecords)(te.value)])])]:[];return!0!==e.hidePagination?(0,n.h)("div",{class:X+" justify-end"},Ke(o)):0!==o.length?(0,n.h)("div",{class:X},o):void 0}function qe(e){A({page:1,rowsPerPage:e.value})}function Ke(i){let o;const{rowsPerPage:s}=I.value,r=e.paginationLabel||a.lang.table.pagination,l=t.pagination,c=e.rowsPerPageOptions.length>1;if(i.push((0,n.h)("div",{class:"q-table__separator col"})),!0===c&&i.push((0,n.h)("div",{class:"q-table__control"},[(0,n.h)("span",{class:"q-table__bottom-item"},[e.rowsPerPageLabel||a.lang.table.recordsPerPage]),(0,n.h)(w.A,{class:"q-table__select inline q-table__bottom-item",color:e.color,modelValue:s,options:_e.value,displayValue:0===s?a.lang.table.allRows:s,dark:d.value,borderless:!0,dense:!0,optionsDense:!0,optionsCover:!0,"onUpdate:modelValue":qe})])),void 0!==l)o=l(Fe.value);else if(o=[(0,n.h)("span",0!==s?{class:"q-table__bottom-item"}:{},[s?r(he.value+1,Math.min(ge.value,ve.value),ve.value):r(1,z.value,ve.value)])],0!==s&&me.value>1){const t={color:e.color,round:!0,dense:!0,flat:!0};!0===e.dense&&(t.size="sm"),me.value>2&&o.push((0,n.h)(k.A,{key:"pgFirst",...t,icon:Ue.value[0],disable:pe.value,onClick:be})),o.push((0,n.h)(k.A,{key:"pgPrev",...t,icon:Ue.value[1],disable:pe.value,onClick:ye}),(0,n.h)(k.A,{key:"pgNext",...t,icon:Ue.value[2],disable:fe.value,onClick:we})),me.value>2&&o.push((0,n.h)(k.A,{key:"pgLast",...t,icon:Ue.value[3],disable:fe.value,onClick:Ce}))}return i.push((0,n.h)("div",{class:"q-table__control"},o)),i}function Ge(){const i=!0===e.gridHeader?[(0,n.h)("table",{class:"q-table"},[He(n.h)])]:!0===e.loading&&void 0===t.loading?Ie(n.h):void 0;return(0,n.h)("div",{class:"q-table__middle"},i)}function Qe(){const o=void 0!==t.item?t.item:o=>{const s=o.cols.map((e=>(0,n.h)("div",{class:"q-table__grid-item-row"},[(0,n.h)("div",{class:"q-table__grid-item-title"},[e.label]),(0,n.h)("div",{class:"q-table__grid-item-value"},[e.value])])));if(!0===q.value){const i=t["body-selection"],r=void 0!==i?i(o):[(0,n.h)(S.A,{modelValue:o.selected,color:e.color,dark:d.value,dense:e.dense,"onUpdate:modelValue":(e,t)=>{oe([o.key],[o.row],e,t)}})];s.unshift((0,n.h)("div",{class:"q-table__grid-item-row"},r),(0,n.h)(c.A,{dark:d.value}))}const r={class:["q-table__grid-item-card"+x.value,e.cardClass],style:e.cardStyle};return void 0===e.onRowClick&&void 0===e.onRowDblclick||(r.class[0]+=" cursor-pointer",void 0!==e.onRowClick&&(r.onClick=e=>{i("RowClick",e,o.row,o.pageIndex)}),void 0!==e.onRowDblclick&&(r.onDblclick=e=>{i("RowDblclick",e,o.row,o.pageIndex)})),(0,n.h)("div",{class:"q-table__grid-item col-xs-12 col-sm-6 col-md-4 col-lg-3"+(!0===o.selected?" q-table__grid-item--selected":"")},[(0,n.h)("div",r,s)])};return(0,n.h)("div",{class:["q-table__grid-content row",e.cardContainerClass],style:e.cardContainerStyle},$.value.map(((e,t)=>o(Ne({key:m.value(e),row:e,pageIndex:t})))))}return Object.assign(r.proxy,{requestServerInteraction:N,setPagination:A,firstPage:be,prevPage:ye,nextPage:we,lastPage:Ce,isRowSelected:ie,clearSelection:ne,isRowExpanded:F,setExpanded:B,sort:ue,resetVirtualScroll:xe,scrollTo:Le,getCellValue:Me}),(0,Z.M)(r.proxy,{filteredSortedRows:()=>j.value,computedRows:()=>$.value,computedRowsNumber:()=>ve.value}),()=>{const i=[Be()],o={ref:_,class:L.value};return!0===e.grid?i.push(Ge()):Object.assign(o,{class:[o.class,e.cardClass],style:e.cardStyle}),i.push(Ee(),$e()),!0===e.loading&&void 0!==t.loading&&i.push(t.loading()),(0,n.h)("div",o,i)}}})},45262:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QTd",props:{props:Object,autoWidth:Boolean,noHover:Boolean},setup(e,{slots:t}){const i=(0,n.nI)(),o=(0,n.EW)((()=>"q-td"+(!0===e.autoWidth?" q-table--col-auto-width":"")+(!0===e.noHover?" q-td--no-hover":"")+" "));return()=>{if(void 0===e.props)return(0,n.h)("td",{class:o.value},(0,s.zm)(t.default));const r=i.vnode.key,a=(void 0!==e.props.colsMap?e.props.colsMap[r]:null)||e.props.col;if(void 0===a)return;const{row:l}=e.props;return(0,n.h)("td",{class:o.value+a.__tdClass(l),style:a.__tdStyle(l)},(0,s.zm)(t.default))}}})},44488:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QTr",props:{props:Object,noHover:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-tr"+(void 0===e.props||!0===e.props.header?"":" "+e.props.__trClass)+(!0===e.noHover?" q-tr--no-hover":"")));return()=>(0,n.h)("tr",{class:i.value},(0,s.zm)(t.default))}})},10327:(e,t,i)=>{"use strict";i.d(t,{A:()=>v});i(10239);var n=i(61758),o=i(38734),s=i(50492),r=i(39626),a=i(65139),l=i(2906),c=i(27973),d=i(22500),u=i(85192),h=i(1054);let g=0;const p=["click","keydown"],f={icon:String,label:[Number,String],alert:[Boolean,String],alertIcon:String,name:{type:[Number,String],default:()=>"t_"+g++},noCaps:Boolean,tabindex:[String,Number],disable:Boolean,contentClass:String,ripple:{type:[Boolean,Object],default:!0}};function m(e,t,i,g){const p=(0,n.WQ)(c.Uv,c.U_);if(p===c.U_)return console.error("QTab/QRouteTab component needs to be child of QTabs"),c.U_;const{proxy:f}=(0,n.nI)(),m=(0,o.KR)(null),_=(0,o.KR)(null),v=(0,o.KR)(null),b=(0,n.EW)((()=>!0!==e.disable&&!1!==e.ripple&&Object.assign({keyCodes:[13,32],early:!0},!0===e.ripple?{}:e.ripple))),y=(0,n.EW)((()=>p.currentModel.value===e.name)),w=(0,n.EW)((()=>"q-tab relative-position self-stretch flex flex-center text-center"+(!0===y.value?" q-tab--active"+(p.tabProps.value.activeClass?" "+p.tabProps.value.activeClass:"")+(p.tabProps.value.activeColor?` text-${p.tabProps.value.activeColor}`:"")+(p.tabProps.value.activeBgColor?` bg-${p.tabProps.value.activeBgColor}`:""):" q-tab--inactive")+(e.icon&&e.label&&!1===p.tabProps.value.inlineLabel?" q-tab--full":"")+(!0===e.noCaps||!0===p.tabProps.value.noCaps?" q-tab--no-caps":"")+(!0===e.disable?" disabled":" q-focusable q-hoverable cursor-pointer")+(void 0!==g?g.linkClass.value:""))),C=(0,n.EW)((()=>"q-tab__content self-stretch flex-center relative-position q-anchor--skip non-selectable "+(!0===p.tabProps.value.inlineLabel?"row no-wrap q-tab__content--inline":"column")+(void 0!==e.contentClass?` ${e.contentClass}`:""))),S=(0,n.EW)((()=>!0===e.disable||!0===p.hasFocus.value||!1===y.value&&!0===p.hasActiveTab.value?-1:e.tabindex||0));function k(t,n){if(!0!==n&&null!==m.value&&m.value.focus(),!0!==e.disable){if(void 0===g)return p.updateModel({name:e.name}),void i("click",t);if(!0===g.hasRouterLink.value){const n=(i={})=>{let n;const o=void 0===i.to||!0===(0,h.Hv)(i.to,e.to)?p.avoidRouteWatcher=(0,u.A)():null;return g.navigateToRouterLink(t,{...i,returnRouterError:!0}).catch((e=>{n=e})).then((t=>{if(o===p.avoidRouteWatcher&&(p.avoidRouteWatcher=!1,void 0===n&&(void 0===t||void 0!==t.message&&!0===t.message.startsWith("Avoided redundant navigation"))&&p.updateModel({name:e.name})),!0===i.returnRouterError)return void 0!==n?Promise.reject(n):t}))};return i("click",t,n),void(!0!==t.defaultPrevented&&n())}i("click",t)}else void 0!==g&&!0===g.hasRouterLink.value&&(0,d.Gu)(t)}function x(e){(0,l.Dv)(e,[13,32])?k(e,!0):!0!==(0,l.JL)(e)&&e.keyCode>=35&&e.keyCode<=40&&!0!==e.altKey&&!0!==e.metaKey&&!0===p.onKbdNavigate(e.keyCode,f.$el)&&(0,d.Gu)(e),i("keydown",e)}function E(){const i=p.tabProps.value.narrowIndicator,o=[],r=(0,n.h)("div",{ref:v,class:["q-tab__indicator",p.tabProps.value.indicatorClass]});void 0!==e.icon&&o.push((0,n.h)(s.A,{class:"q-tab__icon",name:e.icon})),void 0!==e.label&&o.push((0,n.h)("div",{class:"q-tab__label"},e.label)),!1!==e.alert&&o.push(void 0!==e.alertIcon?(0,n.h)(s.A,{class:"q-tab__alert-icon",color:!0!==e.alert?e.alert:void 0,name:e.alertIcon}):(0,n.h)("div",{class:"q-tab__alert"+(!0!==e.alert?` text-${e.alert}`:"")})),!0===i&&o.push(r);const l=[(0,n.h)("div",{class:"q-focus-helper",tabindex:-1,ref:m}),(0,n.h)("div",{class:C.value},(0,a.Hp)(t.default,o))];return!1===i&&l.push(r),l}const L={name:(0,n.EW)((()=>e.name)),rootRef:_,tabIndicatorRef:v,routeData:g};function T(t,i){const o={ref:_,class:w.value,tabindex:S.value,role:"tab","aria-selected":!0===y.value?"true":"false","aria-disabled":!0===e.disable?"true":void 0,onClick:k,onKeydown:x,...i};return(0,n.bo)((0,n.h)(t,o,E()),[[r.A,b.value]])}return(0,n.xo)((()=>{p.unregisterTab(L)})),(0,n.sV)((()=>{p.registerTab(L)})),{renderTab:T,$tabs:p}}var _=i(29467);const v=(0,_.a0)({name:"QTab",props:f,emits:p,setup(e,{slots:t,emit:i}){const{renderTab:n}=m(e,t,i);return()=>n("div")}})},42980:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});i(10239);var n=i(61758),o=i(38734),s=i(50492),r=i(1096),a=i(46019),l=i(24667),c=i(29467),d=i(65139),u=i(27973),h=i(14897);function g(e,t,i){const n=!0===i?["left","right"]:["top","bottom"];return`absolute-${!0===t?n[0]:n[1]}${e?` text-${e}`:""}`}const p=["left","center","right","justify"],f=(0,c.a0)({name:"QTabs",props:{modelValue:[Number,String],align:{type:String,default:"center",validator:e=>p.includes(e)},breakpoint:{type:[String,Number],default:600},vertical:Boolean,shrink:Boolean,stretch:Boolean,activeClass:String,activeColor:String,activeBgColor:String,indicatorColor:String,leftIcon:String,rightIcon:String,outsideArrows:Boolean,mobileArrows:Boolean,switchIndicator:Boolean,narrowIndicator:Boolean,inlineLabel:Boolean,noCaps:Boolean,dense:Boolean,contentClass:String,"onUpdate:modelValue":[Function,Array]},setup(e,{slots:t,emit:i}){const{proxy:c}=(0,n.nI)(),{$q:p}=c,{registerTick:f}=(0,a.A)(),{registerTick:m}=(0,a.A)(),{registerTick:_}=(0,a.A)(),{registerTimeout:v,removeTimeout:b}=(0,l.A)(),{registerTimeout:y,removeTimeout:w}=(0,l.A)(),C=(0,o.KR)(null),S=(0,o.KR)(null),k=(0,o.KR)(e.modelValue),x=(0,o.KR)(!1),E=(0,o.KR)(!0),L=(0,o.KR)(!1),T=(0,o.KR)(!1),I=[],D=(0,o.KR)(0),R=(0,o.KR)(!1);let N,A=null,O=null;const P=(0,n.EW)((()=>({activeClass:e.activeClass,activeColor:e.activeColor,activeBgColor:e.activeBgColor,indicatorClass:g(e.indicatorColor,e.switchIndicator,e.vertical),narrowIndicator:e.narrowIndicator,inlineLabel:e.inlineLabel,noCaps:e.noCaps}))),M=(0,n.EW)((()=>{const e=D.value,t=k.value;for(let i=0;i{const t=!0===x.value?"left":!0===T.value?"justify":e.align;return`q-tabs__content--align-${t}`})),B=(0,n.EW)((()=>`q-tabs row no-wrap items-center q-tabs--${!0===x.value?"":"not-"}scrollable q-tabs--`+(!0===e.vertical?"vertical":"horizontal")+" q-tabs__arrows--"+(!0===e.outsideArrows?"outside":"inside")+` q-tabs--mobile-with${!0===e.mobileArrows?"":"out"}-arrows`+(!0===e.dense?" q-tabs--dense":"")+(!0===e.shrink?" col-shrink":"")+(!0===e.stretch?" self-stretch":""))),W=(0,n.EW)((()=>"q-tabs__content scroll--mobile row no-wrap items-center self-stretch hide-scrollbar relative-position "+F.value+(void 0!==e.contentClass?` ${e.contentClass}`:""))),H=(0,n.EW)((()=>!0===e.vertical?{container:"height",content:"offsetHeight",scroll:"scrollHeight"}:{container:"width",content:"offsetWidth",scroll:"scrollWidth"})),V=(0,n.EW)((()=>!0!==e.vertical&&!0===p.lang.rtl)),j=(0,n.EW)((()=>!1===h.E&&!0===V.value));function z({name:t,setCurrent:n,skipEmit:o}){k.value!==t&&(!0!==o&&void 0!==e["onUpdate:modelValue"]&&i("update:modelValue",t),!0!==n&&void 0!==e["onUpdate:modelValue"]||(q(k.value,t),k.value=t))}function U(){f((()=>{$({width:C.value.offsetWidth,height:C.value.offsetHeight})}))}function $(t){if(void 0===H.value||null===S.value)return;const i=t[H.value.container],n=Math.min(S.value[H.value.scroll],Array.prototype.reduce.call(S.value.children,((e,t)=>e+(t[H.value.content]||0)),0)),o=i>0&&n>i;x.value=o,!0===o&&m(G),T.value=ie.name.value===t)):null,o=void 0!==i&&null!==i&&""!==i?I.find((e=>e.name.value===i)):null;if(!0===ge)ge=!1;else if(n&&o){const t=n.tabIndicatorRef.value,i=o.tabIndicatorRef.value;null!==A&&(clearTimeout(A),A=null),t.style.transition="none",t.style.transform="none",i.style.transition="none",i.style.transform="none";const s=t.getBoundingClientRect(),r=i.getBoundingClientRect();i.style.transform=!0===e.vertical?`translate3d(0,${s.top-r.top}px,0) scale3d(1,${r.height?s.height/r.height:1},1)`:`translate3d(${s.left-r.left}px,0,0) scale3d(${r.width?s.width/r.width:1},1,1)`,_((()=>{A=setTimeout((()=>{A=null,i.style.transition="transform .25s cubic-bezier(.4, 0, .2, 1)",i.style.transform="none"}),70)}))}o&&!0===x.value&&K(o.rootRef.value)}function K(t){const{left:i,width:n,top:o,height:s}=S.value.getBoundingClientRect(),r=t.getBoundingClientRect();let a=!0===e.vertical?r.top-o:r.left-i;if(a<0)return S.value[!0===e.vertical?"scrollTop":"scrollLeft"]+=Math.floor(a),void G();a+=!0===e.vertical?r.height-s:r.width-n,a>0&&(S.value[!0===e.vertical?"scrollTop":"scrollLeft"]+=Math.ceil(a),G())}function G(){const t=S.value;if(null===t)return;const i=t.getBoundingClientRect(),n=!0===e.vertical?t.scrollTop:Math.abs(t.scrollLeft);!0===V.value?(E.value=Math.ceil(n+i.width)0):(E.value=n>0,L.value=!0===e.vertical?Math.ceil(n+i.height){!0===te(e)&&X()}),5)}function Y(){Q(!0===j.value?Number.MAX_SAFE_INTEGER:0)}function Z(){Q(!0===j.value?0:Number.MAX_SAFE_INTEGER)}function X(){null!==O&&(clearInterval(O),O=null)}function J(t,i){const n=Array.prototype.filter.call(S.value.children,(e=>e===i||e.matches&&!0===e.matches(".q-tab.q-focusable"))),o=n.length;if(0===o)return;if(36===t)return K(n[0]),n[0].focus(),!0;if(35===t)return K(n[o-1]),n[o-1].focus(),!0;const s=t===(!0===e.vertical?38:37),r=t===(!0===e.vertical?40:39),a=!0===s?-1:!0===r?1:void 0;if(void 0!==a){const e=!0===V.value?-1:1,t=n.indexOf(i)+a*e;return t>=0&&te.modelValue),(e=>{z({name:e,setCurrent:!0,skipEmit:!0})})),(0,n.wB)((()=>e.outsideArrows),U);const ee=(0,n.EW)((()=>!0===j.value?{get:e=>Math.abs(e.scrollLeft),set:(e,t)=>{e.scrollLeft=-t}}:!0===e.vertical?{get:e=>e.scrollTop,set:(e,t)=>{e.scrollTop=t}}:{get:e=>e.scrollLeft,set:(e,t)=>{e.scrollLeft=t}}));function te(e){const t=S.value,{get:i,set:n}=ee.value;let o=!1,s=i(t);const r=e=e)&&(o=!0,s=e),n(t,s),G(),o}function ie(e,t){for(const i in e)if(e[i]!==t[i])return!1;return!0}function ne(){let e=null,t={matchedLen:0,queryDiff:9999,hrefLen:0};const i=I.filter((e=>void 0!==e.routeData&&!0===e.routeData.hasRouterLink.value)),{hash:n,query:o}=c.$route,s=Object.keys(o).length;for(const r of i){const i=!0===r.routeData.exact.value;if(!0!==r.routeData[!0===i?"linkIsExactActive":"linkIsActive"].value)continue;const{hash:a,query:l,matched:c,href:d}=r.routeData.resolvedLink.value,u=Object.keys(l).length;if(!0===i){if(a!==n)continue;if(u!==s||!1===ie(o,l))continue;e=r.name.value;break}if(""!==a&&a!==n)continue;if(0!==u&&!1===ie(l,o))continue;const h={matchedLen:c.length,queryDiff:s-u,hrefLen:d.length-a.length};if(h.matchedLen>t.matchedLen)e=r.name.value,t=h;else if(h.matchedLen===t.matchedLen){if(h.queryDifft.hrefLen&&(e=r.name.value,t=h)}}null!==e||!0!==I.some((e=>void 0===e.routeData&&e.name.value===k.value))?z({name:e,setCurrent:!0}):ge=!1}function oe(e){if(b(),!0!==R.value&&null!==C.value&&e.target&&"function"===typeof e.target.closest){const t=e.target.closest(".q-tab");t&&!0===C.value.contains(t)&&(R.value=!0,!0===x.value&&K(t))}}function se(){v((()=>{R.value=!1}),30)}function re(){!1===de.avoidRouteWatcher?y(ne):w()}function ae(){if(void 0===N){const e=(0,n.wB)((()=>c.$route.fullPath),re);N=()=>{e(),N=void 0}}}function le(e){I.push(e),D.value++,U(),void 0===e.routeData||void 0===c.$route?y((()=>{if(!0===x.value){const e=k.value,t=void 0!==e&&null!==e&&""!==e?I.find((t=>t.name.value===e)):null;t&&K(t.rootRef.value)}})):(ae(),!0===e.routeData.hasRouterLink.value&&re())}function ce(e){I.splice(I.indexOf(e),1),D.value--,U(),void 0!==N&&void 0!==e.routeData&&(!0===I.every((e=>void 0===e.routeData))&&N(),re())}const de={currentModel:k,tabProps:P,hasFocus:R,hasActiveTab:M,registerTab:le,unregisterTab:ce,verifyRouteModel:re,updateModel:z,onKbdNavigate:J,avoidRouteWatcher:!1};function ue(){null!==A&&clearTimeout(A),X(),void 0!==N&&N()}let he,ge;return(0,n.Gt)(u.Uv,de),(0,n.xo)(ue),(0,n.Y4)((()=>{he=void 0!==N,ue()})),(0,n.n)((()=>{!0===he&&(ae(),ge=!0,re()),U()})),()=>(0,n.h)("div",{ref:C,class:B.value,role:"tablist",onFocusin:oe,onFocusout:se},[(0,n.h)(r.A,{onResize:$}),(0,n.h)("div",{ref:S,class:W.value,onScroll:G},(0,d.zm)(t.default)),(0,n.h)(s.A,{class:"q-tabs__arrow q-tabs__arrow--left absolute q-tab__icon"+(!0===E.value?"":" q-tabs__arrow--faded"),name:e.leftIcon||p.iconSet.tabs[!0===e.vertical?"up":"left"],onMousedownPassive:Y,onTouchstartPassive:Y,onMouseupPassive:X,onMouseleavePassive:X,onTouchendPassive:X}),(0,n.h)(s.A,{class:"q-tabs__arrow q-tabs__arrow--right absolute q-tab__icon"+(!0===L.value?"":" q-tabs__arrow--faded"),name:e.rightIcon||p.iconSet.tabs[!0===e.vertical?"down":"right"],onMousedownPassive:Z,onTouchstartPassive:Z,onMouseupPassive:X,onMouseleavePassive:X,onTouchendPassive:X})])}})},66908:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(61758),o=i(50492),s=i(80003),r=i(29467);const a=(0,r.a0)({name:"QToggle",props:{...s.jh,icon:String,iconColor:String},emits:s.LA,setup(e){function t(t,i){const s=(0,n.EW)((()=>(!0===t.value?e.checkedIcon:!0===i.value?e.indeterminateIcon:e.uncheckedIcon)||e.icon)),r=(0,n.EW)((()=>!0===t.value?e.iconColor:null));return()=>[(0,n.h)("div",{class:"q-toggle__track"}),(0,n.h)("div",{class:"q-toggle__thumb absolute flex flex-center no-wrap"},void 0!==s.value?[(0,n.h)(o.A,{name:s.value,color:r.value})]:void 0)]}return(0,s.Ay)("toggle",t)}})},36914:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QToolbar",props:{inset:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-toolbar row no-wrap items-center"+(!0===e.inset?" q-toolbar--inset":"")));return()=>(0,n.h)("div",{class:i.value,role:"toolbar"},(0,s.zm)(t.default))}})},39150:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(61758),o=i(29467),s=i(65139);const r=(0,o.a0)({name:"QToolbarTitle",props:{shrink:Boolean},setup(e,{slots:t}){const i=(0,n.EW)((()=>"q-toolbar__title ellipsis"+(!0===e.shrink?" col-shrink":"")));return()=>(0,n.h)("div",{class:i.value},(0,s.zm)(t.default))}})},31503:(e,t,i)=>{"use strict";i.d(t,{AV:()=>v,Iq:()=>b,kP:()=>_});i(10239);var n=i(61758),o=i(38734),s=i(53500),r=i(22500),a=i(14897);const l=1e3,c=["start","center","end","start-force","center-force","end-force"],d=Array.prototype.filter,u=void 0===window.getComputedStyle(document.body).overflowAnchor?r.lQ:function(e,t){null!==e&&(void 0!==e._qOverflowAnimationFrame&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame((()=>{if(null===e)return;e._qOverflowAnimationFrame=void 0;const i=e.children||[];d.call(i,(e=>e.dataset&&void 0!==e.dataset.qVsAnchor)).forEach((e=>{delete e.dataset.qVsAnchor}));const n=i[t];n&&n.dataset&&(n.dataset.qVsAnchor="")})))};function h(e,t){return e+t}function g(e,t,i,n,o,s,r,l){const c=e===window?document.scrollingElement||document.documentElement:e,d=!0===o?"offsetWidth":"offsetHeight",u={scrollStart:0,scrollViewSize:-r-l,scrollMaxSize:0,offsetStart:-r,offsetEnd:-l};if(!0===o?(e===window?(u.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,u.scrollViewSize+=document.documentElement.clientWidth):(u.scrollStart=c.scrollLeft,u.scrollViewSize+=c.clientWidth),u.scrollMaxSize=c.scrollWidth,!0===s&&(u.scrollStart=(!0===a.E?u.scrollMaxSize-u.scrollViewSize:0)-u.scrollStart)):(e===window?(u.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,u.scrollViewSize+=document.documentElement.clientHeight):(u.scrollStart=c.scrollTop,u.scrollViewSize+=c.clientHeight),u.scrollMaxSize=c.scrollHeight),null!==i)for(let e=i.previousElementSibling;null!==e;e=e.previousElementSibling)!1===e.classList.contains("q-virtual-scroll--skip")&&(u.offsetStart+=e[d]);if(null!==n)for(let e=n.nextElementSibling;null!==e;e=e.nextElementSibling)!1===e.classList.contains("q-virtual-scroll--skip")&&(u.offsetEnd+=e[d]);if(t!==e){const i=c.getBoundingClientRect(),n=t.getBoundingClientRect();!0===o?(u.offsetStart+=n.left-i.left,u.offsetEnd-=n.width):(u.offsetStart+=n.top-i.top,u.offsetEnd-=n.height),e!==window&&(u.offsetStart+=u.scrollStart),u.offsetEnd+=u.scrollMaxSize-u.offsetStart}return u}function p(e,t,i,n){"end"===t&&(t=(e===window?document.body:e)[!0===i?"scrollWidth":"scrollHeight"]),e===window?!0===i?(!0===n&&(t=(!0===a.E?document.body.scrollWidth-document.documentElement.clientWidth:0)-t),window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):!0===i?(!0===n&&(t=(!0===a.E?e.scrollWidth-e.offsetWidth:0)-t),e.scrollLeft=t):e.scrollTop=t}function f(e,t,i,n){if(i>=n)return 0;const o=t.length,s=Math.floor(i/l),r=Math.floor((n-1)/l)+1;let a=e.slice(s,r).reduce(h,0);return i%l!==0&&(a-=t.slice(s*l,i).reduce(h,0)),n%l!==0&&n!==o&&(a-=t.slice(n,r*l).reduce(h,0)),a}const m={virtualScrollSliceSize:{type:[Number,String],default:10},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]},_=Object.keys(m),v={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...m};function b({virtualScrollLength:e,getVirtualScrollTarget:t,getVirtualScrollEl:i,virtualScrollItemSizeComputed:r}){const a=(0,n.nI)(),{props:m,emit:_,proxy:v}=a,{$q:b}=v;let y,w,C,S,k=[];const x=(0,o.KR)(0),E=(0,o.KR)(0),L=(0,o.KR)({}),T=(0,o.KR)(null),I=(0,o.KR)(null),D=(0,o.KR)(null),R=(0,o.KR)({from:0,to:0}),N=(0,n.EW)((()=>void 0!==m.tableColspan?m.tableColspan:100));void 0===r&&(r=(0,n.EW)((()=>m.virtualScrollItemSize)));const A=(0,n.EW)((()=>r.value+";"+m.virtualScrollHorizontal)),O=(0,n.EW)((()=>A.value+";"+m.virtualScrollSliceRatioBefore+";"+m.virtualScrollSliceRatioAfter));function P(){j(w,!0)}function M(e){j(void 0===e?w:e)}function F(n,o){const s=t();if(void 0===s||null===s||8===s.nodeType)return;const r=g(s,i(),T.value,I.value,m.virtualScrollHorizontal,b.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd);C!==r.scrollViewSize&&z(r.scrollViewSize),W(s,r,Math.min(e.value-1,Math.max(0,parseInt(n,10)||0)),0,-1!==c.indexOf(o)?o:-1!==w&&n>w?"end":"start")}function B(){const n=t();if(void 0===n||null===n||8===n.nodeType)return;const o=g(n,i(),T.value,I.value,m.virtualScrollHorizontal,b.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd),s=e.value-1,r=o.scrollMaxSize-o.offsetStart-o.offsetEnd-E.value;if(y===o.scrollStart)return;if(o.scrollMaxSize<=0)return void W(n,o,0,0);C!==o.scrollViewSize&&z(o.scrollViewSize),H(R.value.from);const a=Math.floor(o.scrollMaxSize-Math.max(o.scrollViewSize,o.offsetEnd)-Math.min(S[s],o.scrollViewSize/2));if(a>0&&Math.ceil(o.scrollStart)>=a)return void W(n,o,s,o.scrollMaxSize-o.offsetEnd-k.reduce(h,0));let c=0,d=o.scrollStart-o.offsetStart,u=d;if(d<=r&&d+o.scrollViewSize>=x.value)d-=x.value,c=R.value.from,u=d;else for(let e=0;d>=k[e]&&c0&&c-o.scrollViewSize?(c++,u=d):u=S[c]+d;W(n,o,c,u)}function W(t,i,n,o,s){const r="string"===typeof s&&-1!==s.indexOf("-force"),a=!0===r?s.replace("-force",""):s,l=void 0!==a?a:"start";let c=Math.max(0,n-L.value[l]),d=c+L.value.total;d>e.value&&(d=e.value,c=Math.max(0,d-L.value.total)),y=i.scrollStart;const g=c!==R.value.from||d!==R.value.to;if(!1===g&&void 0===a)return void $(n);const{activeElement:_}=document,v=D.value;!0===g&&null!==v&&v!==_&&!0===v.contains(_)&&(v.addEventListener("focusout",V),setTimeout((()=>{null!==v&&v.removeEventListener("focusout",V)}))),u(v,n-c);const w=void 0!==a?S.slice(c,n).reduce(h,0):0;if(!0===g){const t=d>=R.value.from&&c<=R.value.to?R.value.to:d;R.value={from:c,to:t},x.value=f(k,S,0,c),E.value=f(k,S,d,e.value),requestAnimationFrame((()=>{R.value.to!==d&&y===i.scrollStart&&(R.value={from:R.value.from,to:d},E.value=f(k,S,d,e.value))}))}requestAnimationFrame((()=>{if(y!==i.scrollStart)return;!0===g&&H(c);const e=S.slice(c,n).reduce(h,0),s=e+i.offsetStart+x.value,l=s+S[n];let d=s+o;if(void 0!==a){const t=e-w,o=i.scrollStart+t;d=!0!==r&&oe.classList&&!1===e.classList.contains("q-virtual-scroll--skip"))),n=i.length,o=!0===m.virtualScrollHorizontal?e=>e.getBoundingClientRect().width:e=>e.offsetHeight;let s,r,a=e;for(let e=0;e=s;t--)S[t]=o;const a=Math.floor((e.value-1)/l);k=[];for(let t=0;t<=a;t++){let i=0;const n=Math.min((t+1)*l,e.value);for(let e=t*l;e=0?(H(R.value.from),(0,n.dY)((()=>{F(t)}))):q()}function z(e){if(void 0===e&&"undefined"!==typeof window){const n=t();void 0!==n&&null!==n&&8!==n.nodeType&&(e=g(n,i(),T.value,I.value,m.virtualScrollHorizontal,b.lang.rtl,m.virtualScrollStickySizeStart,m.virtualScrollStickySizeEnd).scrollViewSize)}C=e;const n=parseFloat(m.virtualScrollSliceRatioBefore)||0,o=parseFloat(m.virtualScrollSliceRatioAfter)||0,s=1+n+o,a=void 0===e||e<=0?1:Math.ceil(e/r.value),l=Math.max(1,a,Math.ceil((m.virtualScrollSliceSize>0?m.virtualScrollSliceSize:10)/s));L.value={total:Math.ceil(l*s),start:Math.ceil(l*n),center:Math.ceil(l*(.5+n)),end:Math.ceil(l*(1+n)),view:a}}function U(e,t){const i=!0===m.virtualScrollHorizontal?"width":"height",o={["--q-virtual-scroll-item-"+i]:r.value+"px"};return["tbody"===e?(0,n.h)(e,{class:"q-virtual-scroll__padding",key:"before",ref:T},[(0,n.h)("tr",[(0,n.h)("td",{style:{[i]:`${x.value}px`,...o},colspan:N.value})])]):(0,n.h)(e,{class:"q-virtual-scroll__padding",key:"before",ref:T,style:{[i]:`${x.value}px`,...o}}),(0,n.h)(e,{class:"q-virtual-scroll__content",key:"content",ref:D,tabindex:-1},t.flat()),"tbody"===e?(0,n.h)(e,{class:"q-virtual-scroll__padding",key:"after",ref:I},[(0,n.h)("tr",[(0,n.h)("td",{style:{[i]:`${E.value}px`,...o},colspan:N.value})])]):(0,n.h)(e,{class:"q-virtual-scroll__padding",key:"after",ref:I,style:{[i]:`${E.value}px`,...o}})]}function $(e){w!==e&&(void 0!==m.onVirtualScroll&&_("virtualScroll",{index:e,from:R.value.from,to:R.value.to-1,direction:e{z()})),(0,n.wB)(A,P),z();const q=(0,s.A)(B,!0===b.platform.is.ios?120:35);(0,n.KC)((()=>{z()}));let K=!1;return(0,n.Y4)((()=>{K=!0})),(0,n.n)((()=>{if(!0!==K)return;const e=t();void 0!==y&&void 0!==e&&null!==e&&8!==e.nodeType?p(e,y,m.virtualScrollHorizontal,b.lang.rtl):F(w)})),(0,n.xo)((()=>{q.cancel()})),Object.assign(v,{scrollTo:F,reset:P,refresh:M}),{virtualScrollSliceRange:R,virtualScrollSliceSizeComputed:L,setVirtualScrollSize:z,onVirtualScrollEvt:q,localResetVirtualScroll:j,padVirtualScroll:U,scrollTo:F,reset:P,refresh:M}}},20018:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>a,fR:()=>r});var n=i(61758);const o={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},s=Object.keys(o),r={align:{type:String,validator:e=>s.includes(e)}};function a(e){return(0,n.EW)((()=>{const t=void 0===e.align?!0===e.vertical?"stretch":"left":e.align;return`${!0===e.vertical?"items":"justify"}-${o[t]}`}))}},16372:(e,t,i)=>{"use strict";i.d(t,{A:()=>s,C:()=>o});var n=i(61758);const o={dark:{type:Boolean,default:null}};function s(e,t){return(0,n.EW)((()=>null===e.dark?t.dark.isActive:e.dark))}},7617:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>A,o9:()=>T,mU:()=>R,OJ:()=>D,$7:()=>N});i(10239);var n=i(61758),o=i(38734),s=i(29104),r=i(50492),a=i(30564),l=i(74915);const c=/^on[A-Z]/;function d(){const{attrs:e,vnode:t}=(0,n.nI)(),i={listeners:(0,o.KR)({}),attributes:(0,o.KR)({})};function s(){const n={},o={};for(const t in e)"class"!==t&&"style"!==t&&!1===c.test(t)&&(n[t]=e[t]);for(const e in t.props)!0===c.test(e)&&(o[e]=t.props[e]);i.attributes.value=n,i.listeners.value=o}return(0,n.Ic)(s),s(),i}var u=i(16372),h=i(27973);function g({validate:e,resetValidation:t,requiresQForm:i}){const o=(0,n.WQ)(h.q3,!1);if(!1!==o){const{props:i,proxy:s}=(0,n.nI)();Object.assign(s,{validate:e,resetValidation:t}),(0,n.wB)((()=>i.disable),(e=>{!0===e?("function"===typeof t&&t(),o.unbindComponent(s)):o.bindComponent(s)})),(0,n.sV)((()=>{!0!==i.disable&&o.bindComponent(s)})),(0,n.xo)((()=>{!0!==i.disable&&o.unbindComponent(s)}))}else!0===i&&console.error("Parent QForm not found on useFormChild()!")}const p=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,f=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,m=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,_=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,v=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,b={date:e=>/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),time:e=>/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),fulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),timeOrFulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),email:e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),hexColor:e=>p.test(e),hexaColor:e=>f.test(e),hexOrHexaColor:e=>m.test(e),rgbColor:e=>_.test(e),rgbaColor:e=>v.test(e),rgbOrRgbaColor:e=>_.test(e)||v.test(e),hexOrRgbColor:e=>p.test(e)||_.test(e),hexaOrRgbaColor:e=>f.test(e)||v.test(e),anyColor:e=>m.test(e)||_.test(e)||v.test(e)};var y=i(53500),w=i(82453);const C=[!0,!1,"ondemand"],S={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>C.includes(e)}};function k(e,t){const{props:i,proxy:s}=(0,n.nI)(),r=(0,o.KR)(!1),a=(0,o.KR)(null),l=(0,o.KR)(!1);g({validate:v,resetValidation:_});let c,d=0;const u=(0,n.EW)((()=>void 0!==i.rules&&null!==i.rules&&0!==i.rules.length)),h=(0,n.EW)((()=>!0!==i.disable&&!0===u.value&&!1===t.value)),p=(0,n.EW)((()=>!0===i.error||!0===r.value)),f=(0,n.EW)((()=>"string"===typeof i.errorMessage&&0!==i.errorMessage.length?i.errorMessage:a.value));function m(){"ondemand"!==i.lazyRules&&!0===h.value&&!0===l.value&&C()}function _(){d++,t.value=!1,l.value=!1,r.value=!1,a.value=null,C.cancel()}function v(e=i.modelValue){if(!0===i.disable||!1===u.value)return!0;const n=++d,o=!0!==t.value?()=>{l.value=!0}:()=>{},s=(e,i)=>{!0===e&&o(),r.value=e,a.value=i||null,t.value=!1},c=[];for(let t=0;t{if(void 0===e||!1===Array.isArray(e)||0===e.length)return n===d&&s(!1),!0;const t=e.find((e=>!1===e||"string"===typeof e));return n===d&&s(void 0!==t,t),void 0===t}),(e=>(n===d&&(console.error(e),s(!0)),!1))))}(0,n.wB)((()=>i.modelValue),(()=>{l.value=!0,!0===h.value&&!1===i.lazyRules&&C()})),(0,n.wB)((()=>i.reactiveRules),(e=>{!0===e?void 0===c&&(c=(0,n.wB)((()=>i.rules),m,{immediate:!0,deep:!0})):void 0!==c&&(c(),c=void 0)}),{immediate:!0}),(0,n.wB)((()=>i.lazyRules),m),(0,n.wB)(e,(e=>{!0===e?l.value=!0:!0===h.value&&"ondemand"!==i.lazyRules&&C()}));const C=(0,y.A)(v,0);return(0,n.xo)((()=>{void 0!==c&&c(),C.cancel()})),Object.assign(s,{resetValidation:_,validate:v}),(0,w.$)(s,"hasError",(()=>p.value)),{isDirtyModel:l,hasRules:u,hasError:p,errorMessage:f,validate:v,resetValidation:_}}var x=i(65139),E=i(22500),L=i(98983);function T(e){return void 0!==e&&null!==e&&0!==(""+e).length}const I={...u.C,...S,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String},D={...I,maxlength:[Number,String]},R=["update:modelValue","clear","focus","blur"];function N({requiredForAttr:e=!0,tagProp:t,changeEvent:i=!1}={}){const{props:s,proxy:r}=(0,n.nI)(),a=(0,u.A)(s,r.$q),c=(0,l.A)({required:e,getValue:()=>s.for});return{requiredForAttr:e,changeEvent:i,tag:!0===t?(0,n.EW)((()=>s.tag)):{value:"label"},isDark:a,editable:(0,n.EW)((()=>!0!==s.disable&&!0!==s.readonly)),innerLoading:(0,o.KR)(!1),focused:(0,o.KR)(!1),hasPopupOpen:!1,splitAttrs:d(),targetUid:c,rootRef:(0,o.KR)(null),targetRef:(0,o.KR)(null),controlRef:(0,o.KR)(null)}}function A(e){const{props:t,emit:i,slots:o,attrs:l,proxy:c}=(0,n.nI)(),{$q:d}=c;let u=null;void 0===e.hasValue&&(e.hasValue=(0,n.EW)((()=>T(t.modelValue)))),void 0===e.emitValue&&(e.emitValue=e=>{i("update:modelValue",e)}),void 0===e.controlEvents&&(e.controlEvents={onFocusin:O,onFocusout:P}),Object.assign(e,{clearValue:M,onControlFocusin:O,onControlFocusout:P,focus:N}),void 0===e.computedCounter&&(e.computedCounter=(0,n.EW)((()=>{if(!1!==t.counter){const e="string"===typeof t.modelValue||"number"===typeof t.modelValue?(""+t.modelValue).length:!0===Array.isArray(t.modelValue)?t.modelValue.length:0,i=void 0!==t.maxlength?t.maxlength:t.maxValues;return e+(void 0!==i?" / "+i:"")}})));const{isDirtyModel:h,hasRules:g,hasError:p,errorMessage:f,resetValidation:m}=k(e.focused,e.innerLoading),_=void 0!==e.floatingLabel?(0,n.EW)((()=>!0===t.stackLabel||!0===e.focused.value||!0===e.floatingLabel.value)):(0,n.EW)((()=>!0===t.stackLabel||!0===e.focused.value||!0===e.hasValue.value)),v=(0,n.EW)((()=>!0===t.bottomSlots||void 0!==t.hint||!0===g.value||!0===t.counter||null!==t.error)),b=(0,n.EW)((()=>!0===t.filled?"filled":!0===t.outlined?"outlined":!0===t.borderless?"borderless":t.standout?"standout":"standard")),y=(0,n.EW)((()=>`q-field row no-wrap items-start q-field--${b.value}`+(void 0!==e.fieldClass?` ${e.fieldClass.value}`:"")+(!0===t.rounded?" q-field--rounded":"")+(!0===t.square?" q-field--square":"")+(!0===_.value?" q-field--float":"")+(!0===C.value?" q-field--labeled":"")+(!0===t.dense?" q-field--dense":"")+(!0===t.itemAligned?" q-field--item-aligned q-item-type":"")+(!0===e.isDark.value?" q-field--dark":"")+(void 0===e.getControl?" q-field--auto-height":"")+(!0===e.focused.value?" q-field--focused":"")+(!0===p.value?" q-field--error":"")+(!0===p.value||!0===e.focused.value?" q-field--highlighted":"")+(!0!==t.hideBottomSpace&&!0===v.value?" q-field--with-bottom":"")+(!0===t.disable?" q-field--disabled":!0===t.readonly?" q-field--readonly":""))),w=(0,n.EW)((()=>"q-field__control relative-position row no-wrap"+(void 0!==t.bgColor?` bg-${t.bgColor}`:"")+(!0===p.value?" text-negative":"string"===typeof t.standout&&0!==t.standout.length&&!0===e.focused.value?` ${t.standout}`:void 0!==t.color?` text-${t.color}`:""))),C=(0,n.EW)((()=>!0===t.labelSlot||void 0!==t.label)),S=(0,n.EW)((()=>"q-field__label no-pointer-events absolute ellipsis"+(void 0!==t.labelColor&&!0!==p.value?` text-${t.labelColor}`:""))),I=(0,n.EW)((()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:_.value,modelValue:t.modelValue,emitValue:e.emitValue}))),D=(0,n.EW)((()=>{const i={};return e.targetUid.value&&(i.for=e.targetUid.value),!0===t.disable&&(i["aria-disabled"]="true"),i}));function R(){const t=document.activeElement;let i=void 0!==e.targetRef&&e.targetRef.value;!i||null!==t&&t.id===e.targetUid.value||(!0===i.hasAttribute("tabindex")||(i=i.querySelector("[tabindex]")),i&&i!==t&&i.focus({preventScroll:!0}))}function N(){(0,L.Gy)(R)}function A(){(0,L.vQ)(R);const t=document.activeElement;null!==t&&e.rootRef.value.contains(t)&&t.blur()}function O(t){null!==u&&(clearTimeout(u),u=null),!0===e.editable.value&&!1===e.focused.value&&(e.focused.value=!0,i("focus",t))}function P(t,n){null!==u&&clearTimeout(u),u=setTimeout((()=>{u=null,(!0!==document.hasFocus()||!0!==e.hasPopupOpen&&void 0!==e.controlRef&&null!==e.controlRef.value&&!1===e.controlRef.value.contains(document.activeElement))&&(!0===e.focused.value&&(e.focused.value=!1,i("blur",t)),void 0!==n&&n())}))}function M(o){if((0,E.Gu)(o),!0!==d.platform.is.mobile){const t=void 0!==e.targetRef&&e.targetRef.value||e.rootRef.value;t.focus()}else!0===e.rootRef.value.contains(document.activeElement)&&document.activeElement.blur();"file"===t.type&&(e.inputRef.value.value=null),i("update:modelValue",null),!0===e.changeEvent&&i("change",null),i("clear",t.modelValue),(0,n.dY)((()=>{const e=h.value;m(),h.value=e}))}function F(e){[13,32].includes(e.keyCode)&&M(e)}function B(){const i=[];return void 0!==o.prepend&&i.push((0,n.h)("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:E.F4},o.prepend())),i.push((0,n.h)("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},W())),!0===p.value&&!1===t.noErrorIcon&&i.push(V("error",[(0,n.h)(r.A,{name:d.iconSet.field.error,color:"negative"})])),!0===t.loading||!0===e.innerLoading.value?i.push(V("inner-loading-append",void 0!==o.loading?o.loading():[(0,n.h)(a.A,{color:t.color})])):!0===t.clearable&&!0===e.hasValue.value&&!0===e.editable.value&&i.push(V("inner-clearable-append",[(0,n.h)(r.A,{class:"q-field__focusable-action",name:t.clearIcon||d.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":d.lang.label.clear,onKeyup:F,onClick:M})])),void 0!==o.append&&i.push((0,n.h)("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:E.F4},o.append())),void 0!==e.getInnerAppend&&i.push(V("inner-append",e.getInnerAppend())),void 0!==e.getControlChild&&i.push(e.getControlChild()),i}function W(){const i=[];return void 0!==t.prefix&&null!==t.prefix&&i.push((0,n.h)("div",{class:"q-field__prefix no-pointer-events row items-center"},t.prefix)),void 0!==e.getShadowControl&&!0===e.hasShadow.value&&i.push(e.getShadowControl()),void 0!==e.getControl?i.push(e.getControl()):void 0!==o.rawControl?i.push(o.rawControl()):void 0!==o.control&&i.push((0,n.h)("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":!0===t.autofocus||void 0},o.control(I.value))),!0===C.value&&i.push((0,n.h)("div",{class:S.value},(0,x.zm)(o.label,t.label))),void 0!==t.suffix&&null!==t.suffix&&i.push((0,n.h)("div",{class:"q-field__suffix no-pointer-events row items-center"},t.suffix)),i.concat((0,x.zm)(o.default))}function H(){let i,r;!0===p.value?null!==f.value?(i=[(0,n.h)("div",{role:"alert"},f.value)],r=`q--slot-error-${f.value}`):(i=(0,x.zm)(o.error),r="q--slot-error"):!0===t.hideHint&&!0!==e.focused.value||(void 0!==t.hint?(i=[(0,n.h)("div",t.hint)],r=`q--slot-hint-${t.hint}`):(i=(0,x.zm)(o.hint),r="q--slot-hint"));const a=!0===t.counter||void 0!==o.counter;if(!0===t.hideBottomSpace&&!1===a&&void 0===i)return;const l=(0,n.h)("div",{key:r,class:"q-field__messages col"},i);return(0,n.h)("div",{class:"q-field__bottom row items-start q-field__bottom--"+(!0!==t.hideBottomSpace?"animated":"stale"),onClick:E.F4},[!0===t.hideBottomSpace?l:(0,n.h)(s.eB,{name:"q-transition--field-message"},(()=>l)),!0===a?(0,n.h)("div",{class:"q-field__counter"},void 0!==o.counter?o.counter():e.computedCounter.value):null])}function V(e,t){return null===t?null:(0,n.h)("div",{key:e,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},t)}let j=!1;return(0,n.Y4)((()=>{j=!0})),(0,n.n)((()=>{!0===j&&!0===t.autofocus&&c.focus()})),!0===t.autofocus&&(0,n.sV)((()=>{c.focus()})),(0,n.xo)((()=>{null!==u&&clearTimeout(u)})),Object.assign(c,{focus:N,blur:A}),function(){const i=void 0===e.getControl&&void 0===o.control?{...e.splitAttrs.attributes.value,"data-autofocus":!0===t.autofocus||void 0,...D.value}:D.value;return(0,n.h)(e.tag.value,{ref:e.rootRef,class:[y.value,l.class],style:l.style,...i},[void 0!==o.before?(0,n.h)("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:E.F4},o.before()):null,(0,n.h)("div",{class:"q-field__inner relative-position col self-stretch"},[(0,n.h)("div",{ref:e.controlRef,class:w.value,tabindex:-1,...e.controlEvents},B()),!0===v.value?H():null]),void 0!==o.after?(0,n.h)("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:E.F4},o.after()):null])}}},60414:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(61758),o=i(34848);function s(e,t,i){let s;function r(){void 0!==s&&(o.A.remove(s),s=void 0)}return(0,n.xo)((()=>{!0===e.value&&r()})),{removeFromHistory:r,addToHistory(){s={condition:()=>!0===i.value,handler:t},o.A.add(s)}}}},32342:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(41597);const o=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,s=/[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u,r=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,a=/[a-z0-9_ -]$/i;function l(e){return function(t){if("compositionend"===t.type||"change"===t.type){if(!0!==t.target.qComposing)return;t.target.qComposing=!1,e(t)}else if("compositionupdate"===t.type&&!0!==t.target.qComposing&&"string"===typeof t.data){const e=!0===n.Sn.is.firefox?!1===a.test(t.data):!0===o.test(t.data)||!0===s.test(t.data)||!0===r.test(t.data);!0===e&&(t.target.qComposing=!0)}}}},52916:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>a,Jl:()=>r,RI:()=>s});var n=i(61758),o=i(15157);const s={modelValue:{type:Boolean,default:null},"onUpdate:modelValue":[Function,Array]},r=["beforeShow","show","beforeHide","hide"];function a({showing:e,canShow:t,hideOnRouteChange:i,handleShow:s,handleHide:r,processOnMount:a}){const l=(0,n.nI)(),{props:c,emit:d,proxy:u}=l;let h;function g(t){!0===e.value?m(t):p(t)}function p(e){if(!0===c.disable||void 0!==e&&!0===e.qAnchorHandled||void 0!==t&&!0!==t(e))return;const i=void 0!==c["onUpdate:modelValue"];!0===i&&(d("update:modelValue",!0),h=e,(0,n.dY)((()=>{h===e&&(h=void 0)}))),null!==c.modelValue&&!1!==i||f(e)}function f(t){!0!==e.value&&(e.value=!0,d("beforeShow",t),void 0!==s?s(t):d("show",t))}function m(e){if(!0===c.disable)return;const t=void 0!==c["onUpdate:modelValue"];!0===t&&(d("update:modelValue",!1),h=e,(0,n.dY)((()=>{h===e&&(h=void 0)}))),null!==c.modelValue&&!1!==t||_(e)}function _(t){!1!==e.value&&(e.value=!1,d("beforeHide",t),void 0!==r?r(t):d("hide",t))}function v(t){if(!0===c.disable&&!0===t)void 0!==c["onUpdate:modelValue"]&&d("update:modelValue",!1);else if(!0===t!==e.value){const e=!0===t?f:_;e(h)}}(0,n.wB)((()=>c.modelValue),v),void 0!==i&&!0===(0,o.$b)(l)&&(0,n.wB)((()=>u.$route.fullPath),(()=>{!0===i.value&&!0===e.value&&m()})),!0===a&&(0,n.sV)((()=>{v(c.modelValue)}));const b={show:p,hide:m,toggle:g};return Object.assign(u,b),b}},31852:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>w,hb:()=>_,g:()=>y,Qn:()=>b});var n=i(61758),o=i(38734),s=i(29104),r=i(41597),a=i(29467),l=i(97677),c=i(22500),d=i(72941);function u(e){const t=[.06,6,50];return"string"===typeof e&&e.length&&e.split(":").forEach(((e,i)=>{const n=parseFloat(e);n&&(t[i]=n)})),t}const h=(0,a.Yg)({name:"touch-swipe",beforeMount(e,{value:t,arg:i,modifiers:n}){if(!0!==n.mouse&&!0!==r.Sn.has.touch)return;const o=!0===n.mouseCapture?"Capture":"",s={handler:t,sensitivity:u(i),direction:(0,l.U)(n),noop:c.lQ,mouseStart(e){(0,l.W)(e,s)&&(0,c.w7)(e)&&((0,c.Z4)(s,"temp",[[document,"mousemove","move",`notPassive${o}`],[document,"mouseup","end","notPassiveCapture"]]),s.start(e,!0))},touchStart(e){if((0,l.W)(e,s)){const t=e.target;(0,c.Z4)(s,"temp",[[t,"touchmove","move","notPassiveCapture"],[t,"touchcancel","end","notPassiveCapture"],[t,"touchend","end","notPassiveCapture"]]),s.start(e)}},start(t,i){!0===r.Sn.is.firefox&&(0,c.M5)(e,!0);const n=(0,c.G1)(t);s.event={x:n.left,y:n.top,time:Date.now(),mouse:!0===i,dir:!1}},move(e){if(void 0===s.event)return;if(!1!==s.event.dir)return void(0,c.Gu)(e);const t=Date.now()-s.event.time;if(0===t)return;const i=(0,c.G1)(e),n=i.left-s.event.x,o=Math.abs(n),r=i.top-s.event.y,a=Math.abs(r);if(!0!==s.event.mouse){if(os.sensitivity[0]&&(s.event.dir=r<0?"up":"down"),!0===s.direction.horizontal&&o>a&&a<100&&l>s.sensitivity[0]&&(s.event.dir=n<0?"left":"right"),!0===s.direction.up&&os.sensitivity[0]&&(s.event.dir="up"),!0===s.direction.down&&o0&&o<100&&u>s.sensitivity[0]&&(s.event.dir="down"),!0===s.direction.left&&o>a&&n<0&&a<100&&l>s.sensitivity[0]&&(s.event.dir="left"),!0===s.direction.right&&o>a&&n>0&&a<100&&l>s.sensitivity[0]&&(s.event.dir="right"),!1!==s.event.dir?((0,c.Gu)(e),!0===s.event.mouse&&(document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),(0,d.w)(),s.styleCleanup=e=>{s.styleCleanup=void 0,document.body.classList.remove("non-selectable");const t=()=>{document.body.classList.remove("no-pointer-events--children")};!0===e?setTimeout(t,50):t()}),s.handler({evt:e,touch:!0!==s.event.mouse,mouse:s.event.mouse,direction:s.event.dir,duration:t,distance:{x:o,y:a}})):s.end(e)},end(t){void 0!==s.event&&((0,c.Fh)(s,"temp"),!0===r.Sn.is.firefox&&(0,c.M5)(e,!1),void 0!==s.styleCleanup&&s.styleCleanup(!0),void 0!==t&&!1!==s.event.dir&&(0,c.Gu)(t),s.event=void 0)}};if(e.__qtouchswipe=s,!0===n.mouse){const t=!0===n.mouseCapture||!0===n.mousecapture?"Capture":"";(0,c.Z4)(s,"main",[[e,"mousedown","mouseStart",`passive${t}`]])}!0===r.Sn.has.touch&&(0,c.Z4)(s,"main",[[e,"touchstart","touchStart","passive"+(!0===n.capture?"Capture":"")],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const i=e.__qtouchswipe;void 0!==i&&(t.oldValue!==t.value&&("function"!==typeof t.value&&i.end(),i.handler=t.value),i.direction=(0,l.U)(t.modifiers))},beforeUnmount(e){const t=e.__qtouchswipe;void 0!==t&&((0,c.Fh)(t,"main"),(0,c.Fh)(t,"temp"),!0===r.Sn.is.firefox&&(0,c.M5)(e,!1),void 0!==t.styleCleanup&&t.styleCleanup(),delete e.__qtouchswipe)}});function g(){let e=Object.create(null);return{getCache:(t,i)=>void 0===e[t]?e[t]="function"===typeof i?i():i:e[t],setCache(t,i){e[t]=i},hasCache(t){return Object.hasOwnProperty.call(e,t)},clearCache(t){void 0!==t?delete e[t]:e=Object.create(null)}}}var p=i(24667),f=i(65139),m=i(15157);const _={name:{required:!0},disable:Boolean},v={setup(e,{slots:t}){return()=>(0,n.h)("div",{class:"q-panel scroll",role:"tabpanel"},(0,f.zm)(t.default))}},b={modelValue:{required:!0},animated:Boolean,infinite:Boolean,swipeable:Boolean,vertical:Boolean,transitionPrev:String,transitionNext:String,transitionDuration:{type:[String,Number],default:300},keepAlive:Boolean,keepAliveInclude:[String,Array,RegExp],keepAliveExclude:[String,Array,RegExp],keepAliveMax:Number},y=["update:modelValue","beforeTransition","transition"];function w(){const{props:e,emit:t,proxy:i}=(0,n.nI)(),{getCache:r}=g(),{registerTimeout:a}=(0,p.A)();let l,c;const d=(0,o.KR)(null),u=(0,o.KR)(null);function _(t){const n=!0===e.vertical?"up":"left";A((!0===i.$q.lang.rtl?-1:1)*(t.direction===n?1:-1))}const b=(0,n.EW)((()=>[[h,_,void 0,{horizontal:!0!==e.vertical,vertical:e.vertical,mouse:!0}]])),y=(0,n.EW)((()=>e.transitionPrev||"slide-"+(!0===e.vertical?"down":"right"))),w=(0,n.EW)((()=>e.transitionNext||"slide-"+(!0===e.vertical?"up":"left"))),C=(0,n.EW)((()=>`--q-transition-duration: ${e.transitionDuration}ms`)),S=(0,n.EW)((()=>"string"===typeof e.modelValue||"number"===typeof e.modelValue?e.modelValue:String(e.modelValue))),k=(0,n.EW)((()=>({include:e.keepAliveInclude,exclude:e.keepAliveExclude,max:e.keepAliveMax}))),x=(0,n.EW)((()=>void 0!==e.keepAliveInclude||void 0!==e.keepAliveExclude));function E(){A(1)}function L(){A(-1)}function T(e){t("update:modelValue",e)}function I(e){return void 0!==e&&null!==e&&""!==e}function D(e){return l.findIndex((t=>t.props.name===e&&""!==t.props.disable&&!0!==t.props.disable))}function R(){return l.filter((e=>""!==e.props.disable&&!0!==e.props.disable))}function N(t){const i=0!==t&&!0===e.animated&&-1!==d.value?"q-transition--"+(-1===t?y.value:w.value):null;u.value!==i&&(u.value=i)}function A(i,n=d.value){let o=n+i;while(-1!==o&&o{c=!1}));o+=i}!0===e.infinite&&0!==l.length&&-1!==n&&n!==l.length&&A(i,-1===i?l.length:-1)}function O(){const t=D(e.modelValue);return d.value!==t&&(d.value=t),!0}function P(){const t=!0===I(e.modelValue)&&O()&&l[d.value];return!0===e.keepAlive?[(0,n.h)(n.PR,k.value,[(0,n.h)(!0===x.value?r(S.value,(()=>({...v,name:S.value}))):v,{key:S.value,style:C.value},(()=>t))])]:[(0,n.h)("div",{class:"q-panel scroll",style:C.value,key:S.value,role:"tabpanel"},[t])]}function M(){if(0!==l.length)return!0===e.animated?[(0,n.h)(s.eB,{name:u.value},P)]:P()}function F(e){return l=(0,m.Hl)((0,f.zm)(e.default,[])).filter((e=>null!==e.props&&void 0===e.props.slot&&!0===I(e.props.name))),l.length}function B(){return l}return(0,n.wB)((()=>e.modelValue),((i,n)=>{const o=!0===I(i)?D(i):-1;!0!==c&&N(-1===o?0:o{t("transition",i,n)}),e.transitionDuration))})),Object.assign(i,{next:E,previous:L,goTo:T}),{panelIndex:d,panelDirectives:b,updatePanelsList:F,updatePanelIndex:O,getPanelContent:M,getEnabledPanels:R,getPanels:B,isValidPanelName:I,keepAliveProps:k,needsUniqueKeepAliveWrapper:x,goToPanelByOffset:A,goToPanel:T,nextPanel:E,previousPanel:L}}},52120:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});i(10239);var n=i(38734),o=i(61758),s=i(29467),r=(i(22500),i(98983)),a=i(68536),l=i(35563),c=i(82453);const d=(0,s.a0)({name:"QPortal",setup(e,{slots:t}){return()=>t.default()}});function u(e){e=e.parent;while(void 0!==e&&null!==e){if("QGlobalDialog"===e.type.name)return!0;if("QDialog"===e.type.name||"QMenu"===e.type.name)return!1;e=e.parent}return!1}function h(e,t,i,s){const h=(0,n.KR)(!1),g=(0,n.KR)(!1);let p=null;const f={},m="dialog"===s&&u(e);function _(t){if(!0===t)return(0,r.gv)(f),void(g.value=!0);g.value=!1,!1===h.value&&(!1===m&&null===p&&(p=(0,a.US)(!1,s)),h.value=!0,l.jx.push(e.proxy),(0,r.FD)(f))}function v(t){if(g.value=!1,!0!==t)return;(0,r.gv)(f),h.value=!1;const i=l.jx.indexOf(e.proxy);-1!==i&&l.jx.splice(i,1),null!==p&&((0,a._J)(p),p=null)}return(0,o.hi)((()=>{v(!0)})),e.proxy.__qPortal=!0,(0,c.$)(e.proxy,"contentEl",(()=>t.value)),{showPortal:_,hidePortal:v,portalIsActive:h,portalIsAccessible:g,renderPortal:()=>!0===m?i():!0===h.value?[(0,o.h)(o.Im,{to:p},(0,o.h)(d,i))]:void 0}}},34276:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(87941);function o(){let e;return{preventBodyScroll(t){t===e||void 0===e&&!0!==t||(e=t,(0,n.A)(t))}}}},8014:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(38734),o=i(61758);function s(e,t){const i=(0,n.KR)(null),s=(0,o.EW)((()=>!0===e.disable?null:(0,o.h)("span",{ref:i,class:"no-outline",tabindex:-1})));function r(e){const n=t.value;void 0!==e&&0===e.type.indexOf("key")?null!==n&&document.activeElement!==n&&!0===n.contains(document.activeElement)&&n.focus():null!==i.value&&(void 0===e||null!==n&&!0===n.contains(e.target))&&i.value.focus()}return{refocusTargetEl:s,refocusTarget:r}}},47502:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>g,Ji:()=>h,ni:()=>u});var n=i(61758),o=i(15157);function s(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function r(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function a(e,t){for(const i in t){const n=t[i],o=e[i];if("string"===typeof n){if(n!==o)return!1}else if(!1===Array.isArray(o)||o.length!==n.length||n.some(((e,t)=>e!==o[t])))return!1}return!0}function l(e,t){return!0===Array.isArray(t)?e.length===t.length&&e.every(((e,i)=>e===t[i])):1===e.length&&e[0]===t}function c(e,t){return!0===Array.isArray(e)?l(e,t):!0===Array.isArray(t)?l(t,e):e===t}function d(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!1===c(e[i],t[i]))return!1;return!0}const u={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean},h={...u,exact:Boolean,activeClass:{type:String,default:"q-router-link--active"},exactActiveClass:{type:String,default:"q-router-link--exact-active"}};function g({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const i=(0,n.nI)(),{props:l,proxy:c,emit:u}=i,h=(0,o.$b)(i),g=(0,n.EW)((()=>!0!==l.disable&&void 0!==l.href)),p=!0===t?(0,n.EW)((()=>!0===h&&!0!==l.disable&&!0!==g.value&&void 0!==l.to&&null!==l.to&&""!==l.to)):(0,n.EW)((()=>!0===h&&!0!==g.value&&void 0!==l.to&&null!==l.to&&""!==l.to)),f=(0,n.EW)((()=>!0===p.value?k(l.to):null)),m=(0,n.EW)((()=>null!==f.value)),_=(0,n.EW)((()=>!0===g.value||!0===m.value)),v=(0,n.EW)((()=>"a"===l.type||!0===_.value?"a":l.tag||e||"div")),b=(0,n.EW)((()=>!0===g.value?{href:l.href,target:l.target}:!0===m.value?{href:f.value.href,target:l.target}:{})),y=(0,n.EW)((()=>{if(!1===m.value)return-1;const{matched:e}=f.value,{length:t}=e,i=e[t-1];if(void 0===i)return-1;const n=c.$route.matched;if(0===n.length)return-1;const o=n.findIndex(r.bind(null,i));if(-1!==o)return o;const a=s(e[t-2]);return t>1&&s(i)===a&&n[n.length-1].path!==a?n.findIndex(r.bind(null,e[t-2])):o})),w=(0,n.EW)((()=>!0===m.value&&-1!==y.value&&a(c.$route.params,f.value.params))),C=(0,n.EW)((()=>!0===w.value&&y.value===c.$route.matched.length-1&&d(c.$route.params,f.value.params))),S=(0,n.EW)((()=>!0===m.value?!0===C.value?` ${l.exactActiveClass} ${l.activeClass}`:!0===l.exact?"":!0===w.value?` ${l.activeClass}`:"":""));function k(e){try{return c.$router.resolve(e)}catch(e){}return null}function x(e,{returnRouterError:t,to:i=l.to,replace:n=l.replace}={}){if(!0===l.disable)return e.preventDefault(),Promise.resolve(!1);if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||void 0!==e.button&&0!==e.button||"_blank"===l.target)return Promise.resolve(!1);e.preventDefault();const o=c.$router[!0===n?"replace":"push"](i);return!0===t?o:o.then((()=>{})).catch((()=>{}))}function E(e){if(!0===m.value){const t=t=>x(e,t);u("click",e,t),!0!==e.defaultPrevented&&t()}else u("click",e)}return{hasRouterLink:m,hasHrefLink:g,hasLink:_,linkTag:v,resolvedLink:f,linkIsActive:w,linkIsExactActive:C,linkClass:S,linkAttrs:b,getLink:k,navigateToRouterLink:x,navigateOnClick:E}}},61906:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>r,v0:()=>o,x_:()=>s});var n=i(61758);const o={xs:18,sm:24,md:32,lg:38,xl:46},s={size:String};function r(e,t=o){return(0,n.EW)((()=>void 0!==e.size?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null))}},40454:(e,t,i)=>{"use strict";i.d(t,{A:()=>s,d:()=>o});var n=i(61758);const o={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function s(e,t=()=>{},i=()=>{}){return{transitionProps:(0,n.EW)((()=>{const n=`q-transition--${e.transitionShow||t()}`,o=`q-transition--${e.transitionHide||i()}`;return{appear:!0,enterFromClass:`${n}-enter-from`,enterActiveClass:`${n}-enter-active`,enterToClass:`${n}-enter-to`,leaveFromClass:`${o}-leave-from`,leaveActiveClass:`${o}-leave-active`,leaveToClass:`${o}-leave-to`}})),transitionStyle:(0,n.EW)((()=>`--q-transition-duration: ${e.transitionDuration}ms`))}}},52510:(e,t,i)=>{"use strict";i.d(t,{M4:()=>r,Sc:()=>o,vq:()=>s});var n=i(61758);const o={name:String};function s(e={}){return(t,i,o)=>{t[i]((0,n.h)("input",{class:"hidden"+(o||""),...e.value}))}}function r(e){return(0,n.EW)((()=>e.name||e.for))}},74915:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(38734),o=i(61758),s=i(85192),r=i(41597);function a(e){return void 0===e||null===e?null:e}function l(e,t){return void 0===e||null===e?!0===t?`f_${(0,s.A)()}`:null:e}function c({getValue:e,required:t=!0}={}){if(!0===r.ot.value){const i=void 0!==e?(0,n.KR)(a(e())):(0,n.KR)(null);return!0===t&&null===i.value&&(0,o.sV)((()=>{i.value=`f_${(0,s.A)()}`})),void 0!==e&&(0,o.wB)(e,(e=>{i.value=l(e,t)})),i}return void 0!==e?(0,o.EW)((()=>l(e(),t))):(0,n.KR)(`f_${(0,s.A)()}`)}},46019:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(61758),o=i(15157);function s(){let e;const t=(0,n.nI)();function i(){e=void 0}return(0,n.Y4)(i),(0,n.xo)(i),{removeTick:i,registerTick(i){e=i,(0,n.dY)((()=>{e===i&&(!1===(0,o.rU)(t)&&e(),e=void 0)}))}}}},24667:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(61758),o=i(15157);function s(){let e=null;const t=(0,n.nI)();function i(){null!==e&&(clearTimeout(e),e=null)}return(0,n.Y4)(i),(0,n.xo)(i),{removeTimeout:i,registerTimeout(n,s){i(),!1===(0,o.rU)(t)&&(e=setTimeout((()=>{e=null,n()}),s))}}}},88672:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(29467),o=i(35563),s=i(2906);function r(e){if(!1===e)return 0;if(!0===e||void 0===e)return 1;const t=parseInt(e,10);return isNaN(t)?0:t}const a=(0,n.Yg)({name:"close-popup",beforeMount(e,{value:t}){const i={depth:r(t),handler(t){0!==i.depth&&setTimeout((()=>{const n=(0,o.Rv)(e);void 0!==n&&(0,o.k0)(n,t,i.depth)}))},handlerKey(e){!0===(0,s.Dv)(e,13)&&i.handler(e)}};e.__qclosepopup=i,e.addEventListener("click",i.handler),e.addEventListener("keyup",i.handlerKey)},updated(e,{value:t,oldValue:i}){t!==i&&(e.__qclosepopup.depth=r(t))},beforeUnmount(e){const t=e.__qclosepopup;e.removeEventListener("click",t.handler),e.removeEventListener("keyup",t.handlerKey),delete e.__qclosepopup}})},39626:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});i(10239);var n=i(29467),o=i(77556),s=i(22500),r=i(2906);function a(e,t=250){let i,n=!1;return function(){return!1===n&&(n=!0,setTimeout((()=>{n=!1}),t),i=e.apply(this,arguments)),i}}function l(e,t,i,n){!0===i.modifiers.stop&&(0,s.ds)(e);const r=i.modifiers.color;let a=i.modifiers.center;a=!0===a||!0===n;const l=document.createElement("span"),c=document.createElement("span"),d=(0,s.G1)(e),{left:u,top:h,width:g,height:p}=t.getBoundingClientRect(),f=Math.sqrt(g*g+p*p),m=f/2,_=(g-f)/2+"px",v=a?_:d.left-u-m+"px",b=(p-f)/2+"px",y=a?b:d.top-h-m+"px";c.className="q-ripple__inner",(0,o.AH)(c,{height:`${f}px`,width:`${f}px`,transform:`translate3d(${v},${y},0) scale3d(.2,.2,1)`,opacity:0}),l.className="q-ripple"+(r?" text-"+r:""),l.setAttribute("dir","ltr"),l.appendChild(c),t.appendChild(l);const w=()=>{l.remove(),clearTimeout(C)};i.abort.push(w);let C=setTimeout((()=>{c.classList.add("q-ripple__inner--enter"),c.style.transform=`translate3d(${_},${b},0) scale3d(1,1,1)`,c.style.opacity=.2,C=setTimeout((()=>{c.classList.remove("q-ripple__inner--enter"),c.classList.add("q-ripple__inner--leave"),c.style.opacity=0,C=setTimeout((()=>{l.remove(),i.abort.splice(i.abort.indexOf(w),1)}),275)}),250)}),50)}function c(e,{modifiers:t,value:i,arg:n}){const o=Object.assign({},e.cfg.ripple,t,i);e.modifiers={early:!0===o.early,stop:!0===o.stop,center:!0===o.center,color:o.color||n,keyCodes:[].concat(o.keyCodes||13)}}const d=(0,n.Yg)({name:"ripple",beforeMount(e,t){const i=t.instance.$.appContext.config.globalProperties.$q.config||{};if(!1===i.ripple)return;const n={cfg:i,enabled:!1!==t.value,modifiers:{},abort:[],start(t){!0===n.enabled&&!0!==t.qSkipRipple&&t.type===(!0===n.modifiers.early?"pointerdown":"click")&&l(t,e,n,!0===t.qKeyEvent)},keystart:a((t=>{!0===n.enabled&&!0!==t.qSkipRipple&&!0===(0,r.Dv)(t,n.modifiers.keyCodes)&&t.type==="key"+(!0===n.modifiers.early?"down":"up")&&l(t,e,n,!0)}),300)};c(n,t),e.__qripple=n,(0,s.Z4)(n,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const i=e.__qripple;void 0!==i&&(i.enabled=!1!==t.value,!0===i.enabled&&Object(t.value)===t.value&&c(i,t))}},beforeUnmount(e){const t=e.__qripple;void 0!==t&&(t.abort.forEach((e=>{e()})),(0,s.Fh)(t,"main"),delete e._qripple)}})},89390:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var n=i(41597),o=i(29467),s=i(97677),r=i(22500),a=i(72941);function l(e,t,i){const n=(0,r.G1)(e);let o,s=n.left-t.event.x,a=n.top-t.event.y,l=Math.abs(s),c=Math.abs(a);const d=t.direction;!0===d.horizontal&&!0!==d.vertical?o=s<0?"left":"right":!0!==d.horizontal&&!0===d.vertical?o=a<0?"up":"down":!0===d.up&&a<0?(o="up",l>c&&(!0===d.left&&s<0?o="left":!0===d.right&&s>0&&(o="right"))):!0===d.down&&a>0?(o="down",l>c&&(!0===d.left&&s<0?o="left":!0===d.right&&s>0&&(o="right"))):!0===d.left&&s<0?(o="left",l0&&(o="down"))):!0===d.right&&s>0&&(o="right",l0&&(o="down")));let u=!1;if(void 0===o&&!1===i){if(!0===t.event.isFirst||void 0===t.event.lastDir)return{};o=t.event.lastDir,u=!0,"left"===o||"right"===o?(n.left-=s,l=0,s=0):(n.top-=a,c=0,a=0)}return{synthetic:u,payload:{evt:e,touch:!0!==t.event.mouse,mouse:!0===t.event.mouse,position:n,direction:o,isFirst:t.event.isFirst,isFinal:!0===i,duration:Date.now()-t.event.time,distance:{x:l,y:c},offset:{x:s,y:a},delta:{x:n.left-t.event.lastX,y:n.top-t.event.lastY}}}}let c=0;const d=(0,o.Yg)({name:"touch-pan",beforeMount(e,{value:t,modifiers:i}){if(!0!==i.mouse&&!0!==n.Sn.has.touch)return;function o(e,t){!0===i.mouse&&!0===t?(0,r.Gu)(e):(!0===i.stop&&(0,r.ds)(e),!0===i.prevent&&(0,r.F4)(e))}const d={uid:"qvtp_"+c++,handler:t,modifiers:i,direction:(0,s.U)(i),noop:r.lQ,mouseStart(e){(0,s.W)(e,d)&&(0,r.w7)(e)&&((0,r.Z4)(d,"temp",[[document,"mousemove","move","notPassiveCapture"],[document,"mouseup","end","passiveCapture"]]),d.start(e,!0))},touchStart(e){if((0,s.W)(e,d)){const t=e.target;(0,r.Z4)(d,"temp",[[t,"touchmove","move","notPassiveCapture"],[t,"touchcancel","end","passiveCapture"],[t,"touchend","end","passiveCapture"]]),d.start(e)}},start(t,o){if(!0===n.Sn.is.firefox&&(0,r.M5)(e,!0),d.lastEvt=t,!0===o||!0===i.stop){if(!0!==d.direction.all&&(!0!==o||!0!==d.modifiers.mouseAllDir&&!0!==d.modifiers.mousealldir)){const e=-1!==t.type.indexOf("mouse")?new MouseEvent(t.type,t):new TouchEvent(t.type,t);!0===t.defaultPrevented&&(0,r.F4)(e),!0===t.cancelBubble&&(0,r.ds)(e),Object.assign(e,{qKeyEvent:t.qKeyEvent,qClickOutside:t.qClickOutside,qAnchorHandled:t.qAnchorHandled,qClonedBy:void 0===t.qClonedBy?[d.uid]:t.qClonedBy.concat(d.uid)}),d.initialEvent={target:t.target,event:e}}(0,r.ds)(t)}const{left:s,top:a}=(0,r.G1)(t);d.event={x:s,y:a,time:Date.now(),mouse:!0===o,detected:!1,isFirst:!0,isFinal:!1,lastX:s,lastY:a}},move(e){if(void 0===d.event)return;const t=(0,r.G1)(e),n=t.left-d.event.x,s=t.top-d.event.y;if(0===n&&0===s)return;d.lastEvt=e;const c=!0===d.event.mouse,u=()=>{let t;o(e,c),!0!==i.preserveCursor&&!0!==i.preservecursor&&(t=document.documentElement.style.cursor||"",document.documentElement.style.cursor="grabbing"),!0===c&&document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),(0,a.w)(),d.styleCleanup=e=>{if(d.styleCleanup=void 0,void 0!==t&&(document.documentElement.style.cursor=t),document.body.classList.remove("non-selectable"),!0===c){const t=()=>{document.body.classList.remove("no-pointer-events--children")};void 0!==e?setTimeout((()=>{t(),e()}),50):t()}else void 0!==e&&e()}};if(!0===d.event.detected){!0!==d.event.isFirst&&o(e,d.event.mouse);const{payload:t,synthetic:i}=l(e,d,!1);return void(void 0!==t&&(!1===d.handler(t)?d.end(e):(void 0===d.styleCleanup&&!0===d.event.isFirst&&u(),d.event.lastX=t.position.left,d.event.lastY=t.position.top,d.event.lastDir=!0===i?void 0:t.direction,d.event.isFirst=!1)))}if(!0===d.direction.all||!0===c&&(!0===d.modifiers.mouseAllDir||!0===d.modifiers.mousealldir))return u(),d.event.detected=!0,void d.move(e);const h=Math.abs(n),g=Math.abs(s);h!==g&&(!0===d.direction.horizontal&&h>g||!0===d.direction.vertical&&h0||!0===d.direction.left&&h>g&&n<0||!0===d.direction.right&&h>g&&n>0?(d.event.detected=!0,d.move(e)):d.end(e,!0))},end(t,i){if(void 0!==d.event){if((0,r.Fh)(d,"temp"),!0===n.Sn.is.firefox&&(0,r.M5)(e,!1),!0===i)void 0!==d.styleCleanup&&d.styleCleanup(),!0!==d.event.detected&&void 0!==d.initialEvent&&d.initialEvent.target.dispatchEvent(d.initialEvent.event);else if(!0===d.event.detected){!0===d.event.isFirst&&d.handler(l(void 0===t?d.lastEvt:t,d).payload);const{payload:e}=l(void 0===t?d.lastEvt:t,d,!0),i=()=>{d.handler(e)};void 0!==d.styleCleanup?d.styleCleanup(i):i()}d.event=void 0,d.initialEvent=void 0,d.lastEvt=void 0}}};if(e.__qtouchpan=d,!0===i.mouse){const t=!0===i.mouseCapture||!0===i.mousecapture?"Capture":"";(0,r.Z4)(d,"main",[[e,"mousedown","mouseStart",`passive${t}`]])}!0===n.Sn.has.touch&&(0,r.Z4)(d,"main",[[e,"touchstart","touchStart","passive"+(!0===i.capture?"Capture":"")],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const i=e.__qtouchpan;void 0!==i&&(t.oldValue!==t.value&&("function"!==typeof value&&i.end(),i.handler=t.value),i.direction=(0,s.U)(t.modifiers))},beforeUnmount(e){const t=e.__qtouchpan;void 0!==t&&(void 0!==t.event&&t.end(),(0,r.Fh)(t,"main"),(0,r.Fh)(t,"temp"),!0===n.Sn.is.firefox&&(0,r.M5)(e,!1),void 0!==t.styleCleanup&&t.styleCleanup(),delete e.__qtouchpan)}})},57991:(e,t,i)=>{"use strict";i.d(t,{i:()=>E,A:()=>I});var n=i(29104),o=i(41597),s=(i(10239),i(29467)),r=i(22500),a=i(53500);const l=["sm","md","lg","xl"],{passive:c}=r.mG,d=(0,s.Xj)({width:0,height:0,name:"xs",sizes:{sm:600,md:1024,lg:1440,xl:1920},lt:{sm:!0,md:!0,lg:!0,xl:!0},gt:{xs:!1,sm:!1,md:!1,lg:!1},xs:!0,sm:!1,md:!1,lg:!1,xl:!1},{setSizes:r.lQ,setDebounce:r.lQ,install({$q:e,onSSRHydrated:t}){if(e.screen=this,!0===this.__installed)return void(void 0!==e.config.screen&&(!1===e.config.screen.bodyClasses?document.body.classList.remove(`screen--${this.name}`):this.__update(!0)));const{visualViewport:i}=window,n=i||window,s=document.scrollingElement||document.documentElement,r=void 0===i||!0===o.Sn.is.mobile?()=>[Math.max(window.innerWidth,s.clientWidth),Math.max(window.innerHeight,s.clientHeight)]:()=>[i.width*i.scale+window.innerWidth-s.clientWidth,i.height*i.scale+window.innerHeight-s.clientHeight],d=void 0!==e.config.screen&&!0===e.config.screen.bodyClasses;this.__update=e=>{const[t,i]=r();if(i!==this.height&&(this.height=i),t!==this.width)this.width=t;else if(!0!==e)return;let n=this.sizes;this.gt.xs=t>=n.sm,this.gt.sm=t>=n.md,this.gt.md=t>=n.lg,this.gt.lg=t>=n.xl,this.lt.sm=t{l.forEach((t=>{void 0!==e[t]&&(h[t]=e[t])}))},this.setDebounce=e=>{g=e};const p=()=>{const e=getComputedStyle(document.body);e.getPropertyValue("--q-size-sm")&&l.forEach((t=>{this.sizes[t]=parseInt(e.getPropertyValue(`--q-size-${t}`),10)})),this.setSizes=e=>{l.forEach((t=>{e[t]&&(this.sizes[t]=e[t])})),this.__update(!0)},this.setDebounce=e=>{void 0!==u&&n.removeEventListener("resize",u,c),u=e>0?(0,a.A)(this.__update,e):this.__update,n.addEventListener("resize",u,c)},this.setDebounce(g),0!==Object.keys(h).length?(this.setSizes(h),h=void 0):this.__update(),!0===d&&"xs"===this.name&&document.body.classList.add("screen--xs")};!0===o.ot.value?t.push(p):p()}});var u=i(50411);function h(e,t,i=document.body){if("string"!==typeof e)throw new TypeError("Expected a string as propName");if("string"!==typeof t)throw new TypeError("Expected a string as value");if(!(i instanceof Element))throw new TypeError("Expected a DOM element");i.style.setProperty(`--q-${e}`,t)}var g=i(2906);function p(e){return!0===e.ios?"ios":!0===e.android?"android":void 0}function f({is:e,has:t,within:i},n){const o=[!0===e.desktop?"desktop":"mobile",(!1===t.touch?"no-":"")+"touch"];if(!0===e.mobile){const t=p(e);void 0!==t&&o.push("platform-"+t)}if(!0===e.nativeMobile){const t=e.nativeMobileWrapper;o.push(t),o.push("native-mobile"),!0!==e.ios||void 0!==n[t]&&!1===n[t].iosStatusBarPadding||o.push("q-ios-padding")}else!0===e.electron?o.push("electron"):!0===e.bex&&o.push("bex");return!0===i.iframe&&o.push("within-iframe"),o}function m(){const{is:e}=o.Sn,t=document.body.className,i=new Set(t.replace(/ {2}/g," ").split(" "));if(!0!==e.nativeMobile&&!0!==e.electron&&!0!==e.bex)if(!0===e.desktop)i.delete("mobile"),i.delete("platform-ios"),i.delete("platform-android"),i.add("desktop");else if(!0===e.mobile){i.delete("desktop"),i.add("mobile"),i.delete("platform-ios"),i.delete("platform-android");const t=p(e);void 0!==t&&i.add(`platform-${t}`)}!0===o.Sn.has.touch&&(i.delete("no-touch"),i.add("touch")),!0===o.Sn.within.iframe&&i.add("within-iframe");const n=Array.from(i).join(" ");t!==n&&(document.body.className=n)}function _(e){for(const t in e)h(t,e[t])}const v={install(e){if(!0!==this.__installed){if(!0===o.ot.value)m();else{const{$q:t}=e;void 0!==t.config.brand&&_(t.config.brand);const i=f(o.Sn,t.config);document.body.classList.add.apply(document.body.classList,i)}!0===o.Sn.is.ios&&document.body.addEventListener("touchstart",r.lQ),window.addEventListener("keydown",g.V7,!0)}}};var b=i(34848),y=i(4360),w=i(93493),C=i(27973),S=i(28253),k=i(1054);const x=[o.Ay,v,u.A,d,b.A,y.A,w.A];function E(e,t){const i=(0,n.Ef)(e);i.config.globalProperties=t.config.globalProperties;const{reload:o,...s}=t._context;return Object.assign(i._context,s),i}function L(e,t){t.forEach((t=>{t.install(e),t.__installed=!0}))}function T(e,t,i){e.config.globalProperties.$q=i.$q,e.provide(C.XA,i.$q),L(i,x),void 0!==t.components&&Object.values(t.components).forEach((t=>{!0===(0,k.Gv)(t)&&void 0!==t.name&&e.component(t.name,t)})),void 0!==t.directives&&Object.values(t.directives).forEach((t=>{!0===(0,k.Gv)(t)&&void 0!==t.name&&e.directive(t.name,t)})),void 0!==t.plugins&&L(i,Object.values(t.plugins).filter((e=>"function"===typeof e.install&&!1===x.includes(e)))),!0===o.ot.value&&(i.$q.onSSRHydrated=()=>{i.onSSRHydrated.forEach((e=>{e()})),i.$q.onSSRHydrated=()=>{}})}const I=function(e,t={}){const i={version:"2.17.2"};!1===S.Or?(void 0!==t.config&&Object.assign(S.cr,t.config),i.config={...S.cr},(0,S.xX)()):i.config=t.config||{},T(e,t,{parentApp:e,$q:i,lang:t.lang,iconSet:t.iconSet,onSSRHydrated:[]})}},50411:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(29467);const o=(0,n.Xj)({isActive:!1,mode:!1},{__media:void 0,set(e){o.mode=e,"auto"===e?(void 0===o.__media&&(o.__media=window.matchMedia("(prefers-color-scheme: dark)"),o.__updateMedia=()=>{o.set("auto")},o.__media.addListener(o.__updateMedia)),e=o.__media.matches):void 0!==o.__media&&(o.__media.removeListener(o.__updateMedia),o.__media=void 0),o.isActive=!0===e,document.body.classList.remove("body--"+(!0===e?"light":"dark")),document.body.classList.add("body--"+(!0===e?"dark":"light"))},toggle(){o.set(!1===o.isActive)},install({$q:e,ssrContext:t}){const{dark:i}=e.config;e.dark=this,!0!==this.__installed&&this.set(void 0!==i&&i)}}),s=o},69610:(e,t,i)=>{"use strict";i.d(t,{A:()=>S});i(10239);var n=i(61758),o=i(38734),s=i(82156),r=i(1693),a=i(23316),l=i(44189),c=i(62669),d=i(10386),u=i(39270),h=i(26267),g=i(30564),p=i(29467),f=i(16372),m=i(2906),_=i(1054);const v=(0,p.a0)({name:"DialogPluginComponent",props:{...f.C,title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:"ok",validator:e=>["ok","cancel","none"].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},emits:["ok","hide"],setup(e,{emit:t}){const{proxy:i}=(0,n.nI)(),{$q:p}=i,v=(0,f.A)(e,p),b=(0,o.KR)(null),y=(0,o.KR)(void 0!==e.prompt?e.prompt.model:void 0!==e.options?e.options.model:void 0),w=(0,n.EW)((()=>"q-dialog-plugin"+(!0===v.value?" q-dialog-plugin--dark q-dark":"")+(!1!==e.progress?" q-dialog-plugin--progress":""))),C=(0,n.EW)((()=>e.color||(!0===v.value?"amber":"primary"))),S=(0,n.EW)((()=>!1===e.progress?null:!0===(0,_.Gv)(e.progress)?{component:e.progress.spinner||g.A,props:{color:e.progress.color||C.value}}:{component:g.A,props:{color:C.value}})),k=(0,n.EW)((()=>void 0!==e.prompt||void 0!==e.options)),x=(0,n.EW)((()=>{if(!0!==k.value)return{};const{model:t,isValid:i,items:n,...o}=void 0!==e.prompt?e.prompt:e.options;return o})),E=(0,n.EW)((()=>!0===(0,_.Gv)(e.ok)||!0===e.ok?p.lang.label.ok:e.ok)),L=(0,n.EW)((()=>!0===(0,_.Gv)(e.cancel)||!0===e.cancel?p.lang.label.cancel:e.cancel)),T=(0,n.EW)((()=>void 0!==e.prompt?void 0!==e.prompt.isValid&&!0!==e.prompt.isValid(y.value):void 0!==e.options&&(void 0!==e.options.isValid&&!0!==e.options.isValid(y.value)))),I=(0,n.EW)((()=>({color:C.value,label:E.value,ripple:!1,disable:T.value,...!0===(0,_.Gv)(e.ok)?e.ok:{flat:!0},"data-autofocus":"ok"===e.focus&&!0!==k.value||void 0,onClick:A}))),D=(0,n.EW)((()=>({color:C.value,label:L.value,ripple:!1,...!0===(0,_.Gv)(e.cancel)?e.cancel:{flat:!0},"data-autofocus":"cancel"===e.focus&&!0!==k.value||void 0,onClick:O})));function R(){b.value.show()}function N(){b.value.hide()}function A(){t("ok",(0,o.ux)(y.value)),N()}function O(){N()}function P(){t("hide")}function M(e){y.value=e}function F(t){!0!==T.value&&"textarea"!==e.prompt.type&&!0===(0,m.Dv)(t,13)&&A()}function B(t,i){return!0===e.html?(0,n.h)(l.A,{class:t,innerHTML:i}):(0,n.h)(l.A,{class:t},(()=>i))}function W(){return[(0,n.h)(u.A,{color:C.value,dense:!0,autofocus:!0,dark:v.value,...x.value,modelValue:y.value,"onUpdate:modelValue":M,onKeyup:F})]}function H(){return[(0,n.h)(h.A,{color:C.value,options:e.options.items,dark:v.value,...x.value,modelValue:y.value,"onUpdate:modelValue":M})]}function V(){const t=[];return e.cancel&&t.push((0,n.h)(r.A,D.value)),e.ok&&t.push((0,n.h)(r.A,I.value)),(0,n.h)(c.A,{class:!0===e.stackButtons?"items-end":"",vertical:e.stackButtons,align:"right"},(()=>t))}function j(){const t=[];return e.title&&t.push(B("q-dialog__title",e.title)),!1!==e.progress&&t.push((0,n.h)(l.A,{class:"q-dialog__progress"},(()=>(0,n.h)(S.value.component,S.value.props)))),e.message&&t.push(B("q-dialog__message",e.message)),void 0!==e.prompt?t.push((0,n.h)(l.A,{class:"scroll q-dialog-plugin__form"},W)):void 0!==e.options&&t.push((0,n.h)(d.A,{dark:v.value}),(0,n.h)(l.A,{class:"scroll q-dialog-plugin__form"},H),(0,n.h)(d.A,{dark:v.value})),(e.ok||e.cancel)&&t.push(V()),t}function z(){return[(0,n.h)(a.A,{class:[w.value,e.cardClass],style:e.cardStyle,dark:v.value},j)]}return(0,n.wB)((()=>e.prompt&&e.prompt.model),M),(0,n.wB)((()=>e.options&&e.options.model),M),Object.assign(i,{show:R,hide:N}),()=>(0,n.h)(s.A,{ref:b,onHide:P},z)}});var b=i(57991),y=i(68536);function w(e,t){for(const i in t)"spinner"!==i&&Object(t[i])===t[i]?(e[i]=Object(e[i])!==e[i]?{}:{...e[i]},w(e[i],t[i])):e[i]=t[i]}function C(e,t,i){return s=>{let r,a;const l=!0===t&&void 0!==s.component;if(!0===l){const{component:e,componentProps:t}=s;r="string"===typeof e?i.component(e):e,a=t||{}}else{const{class:t,style:i,...n}=s;r=e,a=n,void 0!==t&&(n.cardClass=t),void 0!==i&&(n.cardStyle=i)}let c,d=!1;const u=(0,o.KR)(null),h=(0,y.US)(!1,"dialog"),g=e=>{if(null!==u.value&&void 0!==u.value[e])return void u.value[e]();const t=c.$.subTree;if(t&&t.component){if(t.component.proxy&&t.component.proxy[e])return void t.component.proxy[e]();if(t.component.subTree&&t.component.subTree.component&&t.component.subTree.component.proxy&&t.component.subTree.component.proxy[e])return void t.component.subTree.component.proxy[e]()}console.error("[Quasar] Incorrectly defined Dialog component")},p=[],f=[],m={onOk(e){return p.push(e),m},onCancel(e){return f.push(e),m},onDismiss(e){return p.push(e),f.push(e),m},hide(){return g("hide"),m},update(e){if(null!==c){if(!0===l)Object.assign(a,e);else{const{class:t,style:i,...n}=e;void 0!==t&&(n.cardClass=t),void 0!==i&&(n.cardStyle=i),w(a,n)}c.$forceUpdate()}return m}},_=e=>{d=!0,p.forEach((t=>{t(e)}))},v=()=>{C.unmount(h),(0,y._J)(h),C=null,c=null,!0!==d&&f.forEach((e=>{e()}))};let C=(0,b.i)({name:"QGlobalDialog",setup:()=>()=>(0,n.h)(r,{...a,ref:u,onOk:_,onHide:v,onVnodeMounted(...e){"function"===typeof a.onVnodeMounted&&a.onVnodeMounted(...e),(0,n.dY)((()=>g("show")))}})},i);return c=C.mount(h),m}}const S={install({$q:e,parentApp:t}){e.dialog=this.create=C(v,!0,t)}}},93493:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(29467),o=i(82453);const s={name:"material-icons",type:{positive:"check_circle",negative:"warning",info:"info",warning:"priority_high"},arrow:{up:"arrow_upward",right:"arrow_forward",down:"arrow_downward",left:"arrow_back",dropdown:"arrow_drop_down"},chevron:{left:"chevron_left",right:"chevron_right"},colorPicker:{spectrum:"gradient",tune:"tune",palette:"style"},pullToRefresh:{icon:"refresh"},carousel:{left:"chevron_left",right:"chevron_right",up:"keyboard_arrow_up",down:"keyboard_arrow_down",navigationIcon:"lens"},chip:{remove:"cancel",selected:"check"},datetime:{arrowLeft:"chevron_left",arrowRight:"chevron_right",now:"access_time",today:"today"},editor:{bold:"format_bold",italic:"format_italic",strikethrough:"strikethrough_s",underline:"format_underlined",unorderedList:"format_list_bulleted",orderedList:"format_list_numbered",subscript:"vertical_align_bottom",superscript:"vertical_align_top",hyperlink:"link",toggleFullscreen:"fullscreen",quote:"format_quote",left:"format_align_left",center:"format_align_center",right:"format_align_right",justify:"format_align_justify",print:"print",outdent:"format_indent_decrease",indent:"format_indent_increase",removeFormat:"format_clear",formatting:"text_format",fontSize:"format_size",align:"format_align_left",hr:"remove",undo:"undo",redo:"redo",heading:"format_size",code:"code",size:"format_size",font:"font_download",viewSource:"code"},expansionItem:{icon:"keyboard_arrow_down",denseIcon:"arrow_drop_down"},fab:{icon:"add",activeIcon:"close"},field:{clear:"cancel",error:"error"},pagination:{first:"first_page",prev:"keyboard_arrow_left",next:"keyboard_arrow_right",last:"last_page"},rating:{icon:"grade"},stepper:{done:"check",active:"edit",error:"warning"},tabs:{left:"chevron_left",right:"chevron_right",up:"keyboard_arrow_up",down:"keyboard_arrow_down"},table:{arrowUp:"arrow_upward",warning:"warning",firstPage:"first_page",prevPage:"chevron_left",nextPage:"chevron_right",lastPage:"last_page"},tree:{icon:"play_arrow"},uploader:{done:"done",clear:"clear",add:"add_box",upload:"cloud_upload",removeQueue:"clear_all",removeUploaded:"done_all"}},r=(0,n.Xj)({iconMapFn:null,__qIconSet:{}},{set(e,t){const i={...e};i.set=r.set,Object.assign(r.__qIconSet,i)},install({$q:e,iconSet:t,ssrContext:i}){void 0!==e.config.iconMapFn&&(this.iconMapFn=e.config.iconMapFn),e.iconSet=this.__qIconSet,(0,o.$)(e,"iconMapFn",(()=>this.iconMapFn),(e=>{this.iconMapFn=e})),!0===this.__installed?void 0!==t&&this.set(t):(this.props=new Proxy(this.__qIconSet,{get(){return Reflect.get(...arguments)},ownKeys(e){return Reflect.ownKeys(e).filter((e=>"set"!==e))}}),this.set(t||s))}}),a=r},4360:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(29467);const o={isoName:"en-US",nativeName:"English (US)",label:{clear:"Clear",ok:"OK",cancel:"Cancel",close:"Close",set:"Set",select:"Select",reset:"Reset",remove:"Remove",update:"Update",create:"Create",search:"Search",filter:"Filter",refresh:"Refresh",expand:e=>e?`Expand "${e}"`:"Expand",collapse:e=>e?`Collapse "${e}"`:"Collapse"},date:{days:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),daysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),firstDayOfWeek:0,format24h:!1,pluralDay:"days"},table:{noData:"No data available",noResults:"No matching records found",loading:"Loading...",selectedRecords:e=>1===e?"1 record selected.":(0===e?"No":e)+" records selected.",recordsPerPage:"Records per page:",allRows:"All",pagination:(e,t,i)=>e+"-"+t+" of "+i,columns:"Columns"},editor:{url:"URL",bold:"Bold",italic:"Italic",strikethrough:"Strikethrough",underline:"Underline",unorderedList:"Unordered List",orderedList:"Ordered List",subscript:"Subscript",superscript:"Superscript",hyperlink:"Hyperlink",toggleFullscreen:"Toggle Fullscreen",quote:"Quote",left:"Left align",center:"Center align",right:"Right align",justify:"Justify align",print:"Print",outdent:"Decrease indentation",indent:"Increase indentation",removeFormat:"Remove formatting",formatting:"Formatting",fontSize:"Font Size",align:"Align",hr:"Insert Horizontal Rule",undo:"Undo",redo:"Redo",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",paragraph:"Paragraph",code:"Code",size1:"Very small",size2:"A bit small",size3:"Normal",size4:"Medium-large",size5:"Big",size6:"Very big",size7:"Maximum",defaultFont:"Default Font",viewSource:"View Source"},tree:{noNodes:"No nodes available",noResults:"No matching nodes found"}};function s(){const e=!0===Array.isArray(navigator.languages)&&0!==navigator.languages.length?navigator.languages[0]:navigator.language;if("string"===typeof e)return e.split(/[-_]/).map(((e,t)=>0===t?e.toLowerCase():t>1||e.length<4?e.toUpperCase():e[0].toUpperCase()+e.slice(1).toLowerCase())).join("-")}const r=(0,n.Xj)({__qLang:{}},{getLocale:s,set(e=o,t){const i={...e,rtl:!0===e.rtl,getLocale:s};if(i.set=r.set,void 0===r.__langConfig||!0!==r.__langConfig.noHtmlAttrs){const e=document.documentElement;e.setAttribute("dir",!0===i.rtl?"rtl":"ltr"),e.setAttribute("lang",i.isoName)}Object.assign(r.__qLang,i)},install({$q:e,lang:t,ssrContext:i}){e.lang=r.__qLang,r.__langConfig=e.config.lang,!0===this.__installed?void 0!==t&&this.set(t):(this.props=new Proxy(this.__qLang,{get(){return Reflect.get(...arguments)},ownKeys(e){return Reflect.ownKeys(e).filter((e=>"set"!==e&&"getLocale"!==e))}}),this.set(t||o))}}),a=r},36153:(e,t,i)=>{"use strict";i.d(t,{A:()=>w});i(10239);var n=i(61758),o=i(29104),s=i(30564),r=i(57991),a=i(29467),l=i(68536),c=i(87941),d=i(1054);let u,h,g=0,p=null,f={},m={};const _={group:"__default_quasar_group__",delay:0,message:!1,html:!1,spinnerSize:80,spinnerColor:"",messageColor:"",backgroundColor:"",boxClass:"",spinner:s.A,customClass:""},v={..._};function b(e){if(e&&void 0!==e.group&&void 0!==m[e.group])return Object.assign(m[e.group],e);const t=!0===(0,d.Gv)(e)&&!0===e.ignoreDefaults?{..._,...e}:{...v,...e};return m[t.group]=t,t}const y=(0,a.Xj)({isActive:!1},{show(e){f=b(e);const{group:t}=f;return y.isActive=!0,void 0!==u?(f.uid=g,h.$forceUpdate()):(f.uid=++g,null!==p&&clearTimeout(p),p=setTimeout((()=>{p=null;const e=(0,l.US)("q-loading");u=(0,r.i)({name:"QLoading",setup(){function t(){!0!==y.isActive&&void 0!==u&&((0,c.A)(!1),u.unmount(e),(0,l._J)(e),u=void 0,h=void 0)}function i(){if(!0!==y.isActive)return null;const e=[(0,n.h)(f.spinner,{class:"q-loading__spinner",color:f.spinnerColor,size:f.spinnerSize})];return f.message&&e.push((0,n.h)("div",{class:"q-loading__message"+(f.messageColor?` text-${f.messageColor}`:""),[!0===f.html?"innerHTML":"textContent"]:f.message})),(0,n.h)("div",{class:"q-loading fullscreen flex flex-center z-max "+f.customClass.trim(),key:f.uid},[(0,n.h)("div",{class:"q-loading__backdrop"+(f.backgroundColor?` bg-${f.backgroundColor}`:"")}),(0,n.h)("div",{class:"q-loading__box column items-center "+f.boxClass},e)])}return(0,n.sV)((()=>{(0,c.A)(!0)})),()=>(0,n.h)(o.eB,{name:"q-transition--fade",appear:!0,onAfterLeave:t},i)}},y.__parentApp),h=u.mount(e)}),f.delay)),e=>{void 0!==e&&Object(e)===e?y.show({...e,group:t}):y.hide(t)}},hide(e){if(!0===y.isActive){if(void 0===e)m={};else{if(void 0===m[e])return;{delete m[e];const t=Object.keys(m);if(0!==t.length){const e=t[t.length-1];return void y.show({group:e})}}}null!==p&&(clearTimeout(p),p=null),y.isActive=!1}},setDefaults(e){!0===(0,d.Gv)(e)&&Object.assign(v,e)},install({$q:e,parentApp:t}){e.loading=this,y.__parentApp=t,void 0!==e.config.loading&&this.setDefaults(e.config.loading)}}),w=y},20989:(e,t,i)=>{"use strict";i.d(t,{A:()=>D});i(10239);var n=i(38734),o=i(61758),s=i(29104),r=i(3952),a=i(50492),l=i(1693),c=i(30564),d=i(57991),u=i(29467),h=(i(22500),i(68536)),g=i(1054);let p=0;const f={},m={},_={},v={},b=/^\s*$/,y=[],w=[void 0,null,!0,!1,""],C=["top-left","top-right","bottom-left","bottom-right","top","bottom","left","right","center"],S=["top-left","top-right","bottom-left","bottom-right"],k={positive:{icon:e=>e.iconSet.type.positive,color:"positive"},negative:{icon:e=>e.iconSet.type.negative,color:"negative"},warning:{icon:e=>e.iconSet.type.warning,color:"warning",textColor:"dark"},info:{icon:e=>e.iconSet.type.info,color:"info"},ongoing:{group:!1,timeout:0,spinner:!0,color:"grey-8"}};function x(e,t,i){if(!e)return T("parameter required");let o;const s={textColor:"white"};if(!0!==e.ignoreDefaults&&Object.assign(s,f),!1===(0,g.Gv)(e)&&(s.type&&Object.assign(s,k[s.type]),e={message:e}),Object.assign(s,k[e.type||s.type],e),"function"===typeof s.icon&&(s.icon=s.icon(t)),s.spinner?(!0===s.spinner&&(s.spinner=c.A),s.spinner=(0,n.IG)(s.spinner)):s.spinner=!1,s.meta={hasMedia:Boolean(!1!==s.spinner||s.icon||s.avatar),hasText:L(s.message)||L(s.caption)},s.position){if(!1===C.includes(s.position))return T("wrong position",e)}else s.position="bottom";if(!0===w.includes(s.timeout))s.timeout=5e3;else{const t=Number(s.timeout);if(isNaN(t)||t<0)return T("wrong timeout",e);s.timeout=Number.isFinite(t)?t:0}0===s.timeout?s.progress=!1:!0===s.progress&&(s.meta.progressClass="q-notification__progress"+(s.progressClass?` ${s.progressClass}`:""),s.meta.progressStyle={animationDuration:`${s.timeout+1e3}ms`});const r=(!0===Array.isArray(e.actions)?e.actions:[]).concat(!0!==e.ignoreDefaults&&!0===Array.isArray(f.actions)?f.actions:[]).concat(void 0!==k[e.type]&&!0===Array.isArray(k[e.type].actions)?k[e.type].actions:[]),{closeBtn:a}=s;if(a&&r.push({label:"string"===typeof a?a:t.lang.label.close}),s.actions=r.map((({handler:e,noDismiss:t,...i})=>({flat:!0,...i,onClick:"function"===typeof e?()=>{e(),!0!==t&&l()}:()=>{l()}}))),void 0===s.multiLine&&(s.multiLine=s.actions.length>1),Object.assign(s.meta,{class:"q-notification row items-stretch q-notification--"+(!0===s.multiLine?"multi-line":"standard")+(void 0!==s.color?` bg-${s.color}`:"")+(void 0!==s.textColor?` text-${s.textColor}`:"")+(void 0!==s.classes?` ${s.classes}`:""),wrapperClass:"q-notification__wrapper col relative-position border-radius-inherit "+(!0===s.multiLine?"column no-wrap justify-center":"row items-center"),contentClass:"q-notification__content row items-center"+(!0===s.multiLine?"":" col"),leftClass:!0===s.meta.hasText?"additional":"single",attrs:{role:"alert",...s.attrs}}),!1===s.group?(s.group=void 0,s.meta.group=void 0):(void 0!==s.group&&!0!==s.group||(s.group=[s.message,s.caption,s.multiline].concat(s.actions.map((e=>`${e.label}*${e.icon}`))).join("|")),s.meta.group=s.group+"|"+s.position),0===s.actions.length?s.actions=void 0:s.meta.actionsClass="q-notification__actions row items-center "+(!0===s.multiLine?"justify-end":"col-auto")+(!0===s.meta.hasMedia?" q-notification__actions--with-media":""),void 0!==i){i.notif.meta.timer&&(clearTimeout(i.notif.meta.timer),i.notif.meta.timer=void 0),s.meta.uid=i.notif.meta.uid;const e=_[s.position].value.indexOf(i.notif);_[s.position].value[e]=s}else{const t=m[s.meta.group];if(void 0===t){if(s.meta.uid=p++,s.meta.badge=1,-1!==["left","right","center"].indexOf(s.position))_[s.position].value.splice(Math.floor(_[s.position].value.length/2),0,s);else{const e=-1!==s.position.indexOf("top")?"unshift":"push";_[s.position].value[e](s)}void 0!==s.group&&(m[s.meta.group]=s)}else{if(t.meta.timer&&(clearTimeout(t.meta.timer),t.meta.timer=void 0),void 0!==s.badgePosition){if(!1===S.includes(s.badgePosition))return T("wrong badgePosition",e)}else s.badgePosition="top-"+(-1!==s.position.indexOf("left")?"right":"left");s.meta.uid=t.meta.uid,s.meta.badge=t.meta.badge+1,s.meta.badgeClass=`q-notification__badge q-notification__badge--${s.badgePosition}`+(void 0!==s.badgeColor?` bg-${s.badgeColor}`:"")+(void 0!==s.badgeTextColor?` text-${s.badgeTextColor}`:"")+(s.badgeClass?` ${s.badgeClass}`:"");const i=_[s.position].value.indexOf(t);_[s.position].value[i]=m[s.meta.group]=s}}const l=()=>{E(s),o=void 0};return s.timeout>0&&(s.meta.timer=setTimeout((()=>{s.meta.timer=void 0,l()}),s.timeout+1e3)),void 0!==s.group?t=>{void 0!==t?T("trying to update a grouped one which is forbidden",e):l()}:(o={dismiss:l,config:e,notif:s},void 0===i?e=>{if(void 0!==o)if(void 0===e)o.dismiss();else{const i=Object.assign({},o.config,e,{group:!1,position:s.position});x(i,t,o)}}:void Object.assign(i,o))}function E(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);const t=_[e.position].value.indexOf(e);if(-1!==t){void 0!==e.group&&delete m[e.meta.group];const i=y[""+e.meta.uid];if(i){const{width:e,height:t}=getComputedStyle(i);i.style.left=`${i.offsetLeft}px`,i.style.width=e,i.style.height=t}_[e.position].value.splice(t,1),"function"===typeof e.onDismiss&&e.onDismiss()}}function L(e){return void 0!==e&&null!==e&&!0!==b.test(e)}function T(e,t){return console.error(`Notify: ${e}`,t),!1}function I(){return(0,u.a0)({name:"QNotifications",devtools:{hide:!0},setup(){return()=>(0,o.h)("div",{class:"q-notifications"},C.map((e=>(0,o.h)(s.F,{key:e,class:v[e],tag:"div",name:`q-notification--${e}`},(()=>_[e].value.map((e=>{const t=e.meta,i=[];if(!0===t.hasMedia&&(!1!==e.spinner?i.push((0,o.h)(e.spinner,{class:"q-notification__spinner q-notification__spinner--"+t.leftClass,color:e.spinnerColor,size:e.spinnerSize})):e.icon?i.push((0,o.h)(a.A,{class:"q-notification__icon q-notification__icon--"+t.leftClass,name:e.icon,color:e.iconColor,size:e.iconSize,role:"img"})):e.avatar&&i.push((0,o.h)(r.A,{class:"q-notification__avatar q-notification__avatar--"+t.leftClass},(()=>(0,o.h)("img",{src:e.avatar,"aria-hidden":"true"}))))),!0===t.hasText){let t;const n={class:"q-notification__message col"};if(!0===e.html)n.innerHTML=e.caption?`
    ${e.message}
    ${e.caption}
    `:e.message;else{const i=[e.message];t=e.caption?[(0,o.h)("div",i),(0,o.h)("div",{class:"q-notification__caption"},[e.caption])]:i}i.push((0,o.h)("div",n,t))}const n=[(0,o.h)("div",{class:t.contentClass},i)];return!0===e.progress&&n.push((0,o.h)("div",{key:`${t.uid}|p|${t.badge}`,class:t.progressClass,style:t.progressStyle})),void 0!==e.actions&&n.push((0,o.h)("div",{class:t.actionsClass},e.actions.map((e=>(0,o.h)(l.A,e))))),t.badge>1&&n.push((0,o.h)("div",{key:`${t.uid}|${t.badge}`,class:e.meta.badgeClass,style:e.badgeStyle},[t.badge])),(0,o.h)("div",{ref:e=>{y[""+t.uid]=e},key:t.uid,class:t.class,...t.attrs},[(0,o.h)("div",{class:t.wrapperClass},n)])})))))))}})}const D={setDefaults(e){!0===(0,g.Gv)(e)&&Object.assign(f,e)},registerType(e,t){!0===(0,g.Gv)(t)&&(k[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=t=>x(t,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,void 0!==e.config.notify&&this.setDefaults(e.config.notify),!0!==this.__installed){C.forEach((e=>{_[e]=(0,n.KR)([]);const t=!0===["left","center","right"].includes(e)?"center":-1!==e.indexOf("top")?"top":"bottom",i=-1!==e.indexOf("left")?"start":-1!==e.indexOf("right")?"end":"center",o=["left","right"].includes(e)?`items-${"left"===e?"start":"end"} justify-center`:"center"===e?"flex-center":`items-${i}`;v[e]=`q-notifications__list q-notifications__list--${t} fixed column no-wrap ${o}`}));const e=(0,h.US)("q-notify");(0,d.i)(I(),t).mount(e)}}}},41597:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>f,Sn:()=>g,ot:()=>s});i(10239);var n=i(38734),o=i(82453);const s=(0,n.KR)(!1);let r;function a(e,t){const i=/(edg|edge|edga|edgios)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(vivaldi)[\/]([\w.]+)/.exec(e)||/(chrome|crios)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(firefox|fxios)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(e)||[];return{browser:i[5]||i[3]||i[1]||"",version:i[4]||i[2]||"0",platform:t[0]||""}}function l(e){return/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[]}const c="ontouchstart"in window||window.navigator.maxTouchPoints>0;function d(e){const t=e.toLowerCase(),i=l(t),n=a(t,i),o={mobile:!1,desktop:!1,cordova:!1,capacitor:!1,nativeMobile:!1,electron:!1,bex:!1,linux:!1,mac:!1,win:!1,cros:!1,chrome:!1,firefox:!1,opera:!1,safari:!1,vivaldi:!1,edge:!1,edgeChromium:!1,ie:!1,webkit:!1,android:!1,ios:!1,ipad:!1,iphone:!1,ipod:!1,kindle:!1,winphone:!1,blackberry:!1,playbook:!1,silk:!1};n.browser&&(o[n.browser]=!0,o.version=n.version,o.versionNumber=parseInt(n.version,10)),n.platform&&(o[n.platform]=!0);const d=o.android||o.ios||o.bb||o.blackberry||o.ipad||o.iphone||o.ipod||o.kindle||o.playbook||o.silk||o["windows phone"];if(!0===d||-1!==t.indexOf("mobile")?o.mobile=!0:o.desktop=!0,o["windows phone"]&&(o.winphone=!0,delete o["windows phone"]),o.edga||o.edgios||o.edg?(o.edge=!0,n.browser="edge"):o.crios?(o.chrome=!0,n.browser="chrome"):o.fxios&&(o.firefox=!0,n.browser="firefox"),(o.ipod||o.ipad||o.iphone)&&(o.ios=!0),o.vivaldi&&(n.browser="vivaldi",o.vivaldi=!0),(o.chrome||o.opr||o.safari||o.vivaldi||!0===o.mobile&&!0!==o.ios&&!0!==d)&&(o.webkit=!0),o.opr&&(n.browser="opera",o.opera=!0),o.safari&&(o.blackberry||o.bb?(n.browser="blackberry",o.blackberry=!0):o.playbook?(n.browser="playbook",o.playbook=!0):o.android?(n.browser="android",o.android=!0):o.kindle?(n.browser="kindle",o.kindle=!0):o.silk&&(n.browser="silk",o.silk=!0)),o.name=n.browser,o.platform=n.platform,-1!==t.indexOf("electron"))o.electron=!0;else if(-1!==document.location.href.indexOf("-extension://"))o.bex=!0;else{if(void 0!==window.Capacitor?(o.capacitor=!0,o.nativeMobile=!0,o.nativeMobileWrapper="capacitor"):void 0===window._cordovaNative&&void 0===window.cordova||(o.cordova=!0,o.nativeMobile=!0,o.nativeMobileWrapper="cordova"),!0===s.value&&(r={is:{...o}}),!0===c&&!0===o.mac&&(!0===o.desktop&&!0===o.safari||!0===o.nativeMobile&&!0!==o.android&&!0!==o.ios&&!0!==o.ipad)){delete o.mac,delete o.desktop;const e=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(o,{mobile:!0,ios:!0,platform:e,[e]:!0})}!0!==o.mobile&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete o.desktop,o.mobile=!0)}return o}const u=navigator.userAgent||navigator.vendor||window.opera,h={has:{touch:!1,webStorage:!1},within:{iframe:!1}},g={userAgent:u,is:d(u),has:{touch:c},within:{iframe:window.self!==window.top}},p={install(e){const{$q:t}=e;!0===s.value?(e.onSSRHydrated.push((()=>{Object.assign(t.platform,g),s.value=!1})),t.platform=(0,n.Kh)(this)):t.platform=this}};{let e;(0,o.$)(g.has,"webStorage",(()=>{if(void 0!==e)return e;try{if(window.localStorage)return e=!0,!0}catch(e){}return e=!1,!1})),Object.assign(p,g),!0===s.value&&(Object.assign(p,r,h),r=null)}const f=p},34848:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});i(10239);var n=i(41597),o=i(22500);const s=()=>!0;function r(e){return"string"===typeof e&&""!==e&&"/"!==e&&"#/"!==e}function a(e){return!0===e.startsWith("#")&&(e=e.substring(1)),!1===e.startsWith("/")&&(e="/"+e),!0===e.endsWith("/")&&(e=e.substring(0,e.length-1)),"#"+e}function l(e){if(!1===e.backButtonExit)return()=>!1;if("*"===e.backButtonExit)return s;const t=["#/"];return!0===Array.isArray(e.backButtonExit)&&t.push(...e.backButtonExit.filter(r).map(a)),()=>t.includes(window.location.hash)}const c={__history:[],add:o.lQ,remove:o.lQ,install({$q:e}){if(!0===this.__installed)return;const{cordova:t,capacitor:i}=n.Sn.is;if(!0!==t&&!0!==i)return;const o=e.config[!0===t?"cordova":"capacitor"];if(void 0!==o&&!1===o.backButton)return;if(!0===i&&(void 0===window.Capacitor||void 0===window.Capacitor.Plugins.App))return;this.add=e=>{void 0===e.condition&&(e.condition=s),this.__history.push(e)},this.remove=e=>{const t=this.__history.indexOf(e);t>=0&&this.__history.splice(t,1)};const r=l(Object.assign({backButtonExit:!0},o)),a=()=>{if(this.__history.length){const e=this.__history[this.__history.length-1];!0===e.condition()&&(this.__history.pop(),e.handler())}else!0===r()?navigator.app.exitApp():window.history.back()};!0===t?document.addEventListener("deviceready",(()=>{document.addEventListener("backbutton",a,!1)})):window.Capacitor.Plugins.App.addListener("backButton",a)}}},71271:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(41597),o=(i(10239),i(22500)),s=i(1054);function r(e){return!0===(0,s.$P)(e)?"__q_date|"+e.getTime():!0===(0,s.oh)(e)?"__q_expr|"+e.source:"number"===typeof e?"__q_numb|"+e:"boolean"===typeof e?"__q_bool|"+(e?"1":"0"):"string"===typeof e?"__q_strn|"+e:"function"===typeof e?"__q_strn|"+e.toString():e===Object(e)?"__q_objt|"+JSON.stringify(e):e}function a(e){const t=e.length;if(t<9)return e;const i=e.substring(0,8),n=e.substring(9);switch(i){case"__q_date":const t=Number(n);return new Date(!0===Number.isNaN(t)?n:t);case"__q_expr":return new RegExp(n);case"__q_numb":return Number(n);case"__q_bool":return Boolean("1"===n);case"__q_strn":return""+n;case"__q_objt":return JSON.parse(n);default:return e}}function l(){const e=()=>null;return{has:()=>!1,hasItem:()=>!1,getLength:()=>0,getItem:e,getIndex:e,getKey:e,getAll:()=>{},getAllKeys:()=>[],set:o.lQ,setItem:o.lQ,remove:o.lQ,removeItem:o.lQ,clear:o.lQ,isEmpty:()=>!0}}function c(e){const t=window[e+"Storage"],i=e=>{const i=t.getItem(e);return i?a(i):null},n=e=>null!==t.getItem(e),o=(e,i)=>{t.setItem(e,r(i))},s=e=>{t.removeItem(e)};return{has:n,hasItem:n,getLength:()=>t.length,getItem:i,getIndex:e=>ee{let e;const n={},o=t.length;for(let s=0;s{const e=[],i=t.length;for(let n=0;n{t.clear()},isEmpty:()=>0===t.length}}const d=!1===n.Sn.has.webStorage?l():c("local"),u={install({$q:e}){e.localStorage=d}};Object.assign(u,d);const h=u},53500:(e,t,i)=>{"use strict";function n(e,t=250,i){let n=null;function o(){const o=arguments,s=()=>{n=null,!0!==i&&e.apply(this,o)};null!==n?clearTimeout(n):!0===i&&e.apply(this,o),n=setTimeout(s,t)}return o.cancel=()=>{null!==n&&clearTimeout(n)},o}i.d(t,{A:()=>n})},77556:(e,t,i)=>{"use strict";i.d(t,{$J:()=>r,AH:()=>o,V6:()=>s});var n=i(38734);function o(e,t){const i=e.style;for(const e in t)i[e]=t[e]}function s(e){if(void 0===e||null===e)return;if("string"===typeof e)try{return document.querySelector(e)||void 0}catch(e){return}const t=(0,n.R1)(e);return t?t.$el||t:void 0}function r(e,t){if(void 0===e||null===e||!0===e.contains(t))return!0;for(let i=e.nextElementSibling;null!==i;i=i.nextElementSibling)if(i.contains(t))return!0;return!1}},22500:(e,t,i)=>{"use strict";i.d(t,{F4:()=>c,Fh:()=>g,G1:()=>r,Gu:()=>d,M5:()=>u,Z4:()=>h,ds:()=>l,en:()=>a,lQ:()=>o,mG:()=>n,w7:()=>s});i(10239);const n={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(n,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch(e){}function o(){}function s(e){return 0===e.button}function r(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function a(e){if(e.path)return e.path;if(e.composedPath)return e.composedPath();const t=[];let i=e.target;while(i){if(t.push(i),"HTML"===i.tagName)return t.push(document),t.push(window),t;i=i.parentElement}}function l(e){e.stopPropagation()}function c(e){!1!==e.cancelable&&e.preventDefault()}function d(e){!1!==e.cancelable&&e.preventDefault(),e.stopPropagation()}function u(e,t){if(void 0===e||!0===t&&!0===e.__dragPrevented)return;const i=!0===t?e=>{e.__dragPrevented=!0,e.addEventListener("dragstart",c,n.notPassiveCapture)}:e=>{delete e.__dragPrevented,e.removeEventListener("dragstart",c,n.notPassiveCapture)};e.querySelectorAll("a, img").forEach(i)}function h(e,t,i){const o=`__q_${t}_evt`;e[o]=void 0!==e[o]?e[o].concat(i):i,i.forEach((t=>{t[0].addEventListener(t[1],e[t[2]],n[t[3]])}))}function g(e,t){const i=`__q_${t}_evt`;void 0!==e[i]&&(e[i].forEach((t=>{t[0].removeEventListener(t[1],e[t[2]],n[t[3]])})),e[i]=void 0)}},82732:(e,t,i)=>{"use strict";i.d(t,{Tq:()=>n,eo:()=>o});function n(e,t,i){return i<=t?t:Math.min(i,Math.max(t,e))}function o(e,t,i){if(i<=t)return t;const n=i-t+1;let o=t+(e-t)%n;return o{"use strict";i.d(t,{$P:()=>s,Et:()=>a,Gv:()=>o,Hv:()=>n,oh:()=>r});i(24906);function n(e,t){if(e===t)return!0;if(null!==e&&null!==t&&"object"===typeof e&&"object"===typeof t){if(e.constructor!==t.constructor)return!1;let i,o;if(e.constructor===Array){if(i=e.length,i!==t.length)return!1;for(o=i;0!==o--;)if(!0!==n(e[o],t[o]))return!1;return!0}if(e.constructor===Map){if(e.size!==t.size)return!1;let i=e.entries();o=i.next();while(!0!==o.done){if(!0!==t.has(o.value[0]))return!1;o=i.next()}i=e.entries(),o=i.next();while(!0!==o.done){if(!0!==n(o.value[1],t.get(o.value[0])))return!1;o=i.next()}return!0}if(e.constructor===Set){if(e.size!==t.size)return!1;const i=e.entries();o=i.next();while(!0!==o.done){if(!0!==t.has(o.value[0]))return!1;o=i.next()}return!0}if(null!=e.buffer&&e.buffer.constructor===ArrayBuffer){if(i=e.length,i!==t.length)return!1;for(o=i;0!==o--;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const s=Object.keys(e).filter((t=>void 0!==e[t]));if(i=s.length,i!==Object.keys(t).filter((e=>void 0!==t[e])).length)return!1;for(o=i;0!==o--;){const i=s[o];if(!0!==n(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function o(e){return null!==e&&"object"===typeof e&&!0!==Array.isArray(e)}function s(e){return"[object Date]"===Object.prototype.toString.call(e)}function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function a(e){return"number"===typeof e&&isFinite(e)}},28253:(e,t,i)=>{"use strict";i.d(t,{Or:()=>o,cr:()=>n,xX:()=>s});const n={};let o=!1;function s(){o=!0}},68536:(e,t,i)=>{"use strict";i.d(t,{US:()=>l,_J:()=>c});i(10239);var n=i(28253);const o=[],s=[];let r=1,a=document.body;function l(e,t){const i=document.createElement("div");if(i.id=void 0!==t?`q-portal--${t}--${r++}`:e,void 0!==n.cr.globalNodes){const e=n.cr.globalNodes.class;void 0!==e&&(i.className=e)}return a.appendChild(i),o.push(i),s.push(t),i}function c(e){const t=o.indexOf(e);o.splice(t,1),s.splice(t,1),e.remove()}},29467:(e,t,i)=>{"use strict";i.d(t,{Xj:()=>l,Yg:()=>a,a0:()=>r});var n=i(38734),o=i(61758),s=i(82453);function r(e){return(0,n.IG)((0,o.pM)(e))}function a(e){return(0,n.IG)(e)}const l=(e,t)=>{const i=(0,n.Kh)(e);for(const n in e)(0,s.$)(t,n,(()=>i[n]),(e=>{i[n]=e}));return t}},98983:(e,t,i)=>{"use strict";i.d(t,{FD:()=>r,Gy:()=>l,gv:()=>a,vQ:()=>c});i(10239);let n=[],o=[];function s(e){o=o.filter((t=>t!==e))}function r(e){s(e),o.push(e)}function a(e){s(e),0===o.length&&0!==n.length&&(n[n.length-1](),n=[])}function l(e){0===o.length?e():n.push(e)}function c(e){n=n.filter((t=>t!==e))}},88173:(e,t,i)=>{"use strict";i.d(t,{g:()=>r,v:()=>a});i(10239);var n=i(41597);const o=[];function s(e){o[o.length-1](e)}function r(e){!0===n.Sn.is.desktop&&(o.push(e),1===o.length&&document.body.addEventListener("focusin",s))}function a(e){const t=o.indexOf(e);-1!==t&&(o.splice(t,1),0===o.length&&document.body.removeEventListener("focusin",s))}},82453:(e,t,i)=>{"use strict";function n(e,t,i,n){return Object.defineProperty(e,t,{get:i,set:n,enumerable:!0}),e}function o(e,t){for(const i in t)n(e,i,t[i]);return e}i.d(t,{$:()=>n,M:()=>o})},78773:(e,t,i)=>{"use strict";i.d(t,{I:()=>u,V:()=>h});i(10239);var n=i(41597),o=i(2906);const s=[];let r;function a(e){r=27===e.keyCode}function l(){!0===r&&(r=!1)}function c(e){!0===r&&(r=!1,!0===(0,o.Dv)(e,27)&&s[s.length-1](e))}function d(e){window[e]("keydown",a),window[e]("blur",l),window[e]("keyup",c),r=!1}function u(e){!0===n.Sn.is.desktop&&(s.push(e),1===s.length&&d("addEventListener"))}function h(e){const t=s.indexOf(e);-1!==t&&(s.splice(t,1),0===s.length&&d("removeEventListener"))}},2906:(e,t,i)=>{"use strict";i.d(t,{Dv:()=>r,JL:()=>s,V7:()=>o});let n=!1;function o(e){n=!0===e.isComposing}function s(e){return!0===n||e!==Object(e)||!0===e.isComposing||!0===e.qKeyEvent}function r(e,t){return!0!==s(e)&&[].concat(t).includes(e.keyCode)}},10447:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={xs:30,sm:35,md:40,lg:50,xl:60}},35563:(e,t,i)=>{"use strict";i.d(t,{Rv:()=>s,bc:()=>r,jx:()=>o,k0:()=>a});var n=i(15157);const o=[];function s(e){return o.find((t=>null!==t.contentEl&&t.contentEl.contains(e)))}function r(e,t){do{if("QMenu"===e.$options.name){if(e.hide(t),!0===e.$props.separateClosePopup)return(0,n.V_)(e)}else if(!0===e.__qPortal){const i=(0,n.V_)(e);return void 0!==i&&"QPopupProxy"===i.$options.name?(e.hide(t),i):e}e=(0,n.V_)(e)}while(void 0!==e&&null!==e)}function a(e,t,i){while(0!==i&&void 0!==e&&null!==e){if(!0===e.__qPortal){if(i--,"QMenu"===e.$options.name){e=r(e,t);continue}e.hide(t)}e=(0,n.V_)(e)}}},65139:(e,t,i)=>{"use strict";i.d(t,{Hp:()=>r,Ij:()=>s,Kf:()=>l,bG:()=>a,zm:()=>o});var n=i(61758);function o(e,t){return void 0!==e&&e()||t}function s(e,t){if(void 0!==e){const t=e();if(void 0!==t&&null!==t)return t.slice()}return t}function r(e,t){return void 0!==e?t.concat(e()):t}function a(e,t){return void 0===e?t:void 0!==t?t.concat(e()):e()}function l(e,t,i,o,s,r){t.key=o+s;const a=(0,n.h)(e,t,i);return!0===s?(0,n.bo)(a,r()):a}},14897:(e,t,i)=>{"use strict";i.d(t,{E:()=>n});let n=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const t=document.createElement("div");Object.assign(t.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(t),e.scrollLeft=-1e3,n=e.scrollLeft>=0,e.remove()}},72941:(e,t,i)=>{"use strict";i.d(t,{w:()=>o});var n=i(41597);function o(){if(void 0!==window.getSelection){const e=window.getSelection();void 0!==e.empty?e.empty():void 0!==e.removeAllRanges&&(e.removeAllRanges(),!0!==n.Ay.is.mobile&&e.addRange(document.createRange()))}else void 0!==document.selection&&document.selection.empty()}},27973:(e,t,i)=>{"use strict";i.d(t,{ON:()=>o,U_:()=>l,Uv:()=>a,XA:()=>n,YR:()=>s,q3:()=>r});const n="_q_",o="_q_l_",s="_q_pc_",r="_q_fo_",a="_q_tabs_";function l(){}},97677:(e,t,i)=>{"use strict";i.d(t,{U:()=>s,W:()=>a});const n={left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0},o=Object.keys(n);function s(e){const t={};for(const i of o)!0===e[i]&&(t[i]=!0);return 0===Object.keys(t).length?n:(!0===t.horizontal?t.left=t.right=!0:!0===t.left&&!0===t.right&&(t.horizontal=!0),!0===t.vertical?t.up=t.down=!0:!0===t.up&&!0===t.down&&(t.vertical=!0),!0===t.horizontal&&!0===t.vertical&&(t.all=!0),t)}n.all=!0;const r=["INPUT","TEXTAREA"];function a(e,t){return void 0===t.event&&void 0!==e.target&&!0!==e.target.draggable&&"function"===typeof t.handler&&!1===r.includes(e.target.nodeName.toUpperCase())&&(void 0===e.qClonedBy||-1===e.qClonedBy.indexOf(t.uid))}},15157:(e,t,i)=>{"use strict";function n(e){if(Object(e.$parent)===e.$parent)return e.$parent;let{parent:t}=e.$;while(Object(t)===t){if(Object(t.proxy)===t.proxy)return t.proxy;t=t.parent}}function o(e,t){"symbol"===typeof t.type?!0===Array.isArray(t.children)&&t.children.forEach((t=>{o(e,t)})):e.add(t)}function s(e){const t=new Set;return e.forEach((e=>{o(t,e)})),Array.from(t)}function r(e){return void 0!==e.appContext.config.globalProperties.$router}function a(e){return!0===e.isUnmounted||!0===e.isDeactivated}i.d(t,{$b:()=>r,Hl:()=>s,V_:()=>n,rU:()=>a})},87941:(e,t,i)=>{"use strict";i.d(t,{A:()=>y});var n=i(38336),o=i(22500),s=i(41597);let r,a,l,c,d,u,h=0,g=!1,p=null;function f(e){m(e)&&(0,o.Gu)(e)}function m(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const t=(0,o.en)(e),i=e.shiftKey&&!e.deltaX,s=!i&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),r=i||s?e.deltaY:e.deltaX;for(let e=0;e0&&i.scrollTop+i.clientHeight===i.scrollHeight:r<0&&0===i.scrollLeft||r>0&&i.scrollLeft+i.clientWidth===i.scrollWidth}return!0}function _(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function v(e){!0!==g&&(g=!0,requestAnimationFrame((()=>{g=!1;const{height:t}=e.target,{clientHeight:i,scrollTop:n}=document.scrollingElement;void 0!==l&&t===window.innerHeight||(l=i-t,document.scrollingElement.scrollTop=n),n>l&&(document.scrollingElement.scrollTop-=Math.ceil((n-l)/8))})))}function b(e){const t=document.body,i=void 0!==window.visualViewport;if("add"===e){const{overflowY:e,overflowX:l}=window.getComputedStyle(t);r=(0,n.lS)(window),a=(0,n.fQ)(window),c=t.style.left,d=t.style.top,u=window.location.href,t.style.left=`-${r}px`,t.style.top=`-${a}px`,"hidden"!==l&&("scroll"===l||t.scrollWidth>window.innerWidth)&&t.classList.add("q-body--force-scrollbar-x"),"hidden"!==e&&("scroll"===e||t.scrollHeight>window.innerHeight)&&t.classList.add("q-body--force-scrollbar-y"),t.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,!0===s.Sn.is.ios&&(!0===i?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",v,o.mG.passiveCapture),window.visualViewport.addEventListener("scroll",v,o.mG.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",_,o.mG.passiveCapture))}!0===s.Sn.is.desktop&&!0===s.Sn.is.mac&&window[`${e}EventListener`]("wheel",f,o.mG.notPassive),"remove"===e&&(!0===s.Sn.is.ios&&(!0===i?(window.visualViewport.removeEventListener("resize",v,o.mG.passiveCapture),window.visualViewport.removeEventListener("scroll",v,o.mG.passiveCapture)):window.removeEventListener("scroll",_,o.mG.passiveCapture)),t.classList.remove("q-body--prevent-scroll"),t.classList.remove("q-body--force-scrollbar-x"),t.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,t.style.left=c,t.style.top=d,window.location.href===u&&window.scrollTo(r,a),l=void 0)}function y(e){let t="add";if(!0===e){if(h++,null!==p)return clearTimeout(p),void(p=null);if(h>1)return}else{if(0===h)return;if(h--,h>0)return;if(t="remove",!0===s.Sn.is.ios&&!0===s.Sn.is.nativeMobile)return null!==p&&clearTimeout(p),void(p=setTimeout((()=>{b(t),p=null}),100))}b(t)}},38336:(e,t,i)=>{"use strict";i.d(t,{D_:()=>_,RZ:()=>g,XJ:()=>m,cP:()=>o,fQ:()=>a,hD:()=>r,lS:()=>l,rr:()=>p});var n=i(77556);const o=[Element,String],s=[null,document,document.body,document.scrollingElement,document.documentElement];function r(e,t){let i=(0,n.V6)(t);if(void 0===i){if(void 0===e||null===e)return window;i=e.closest(".scroll,.scroll-y,.overflow-auto")}return s.includes(i)?window:i}function a(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function l(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function c(e,t,i=0){const n=void 0===arguments[3]?performance.now():arguments[3],o=a(e);i<=0?o!==t&&u(e,t):requestAnimationFrame((s=>{const r=s-n,a=o+(t-o)/Math.max(r,i)*r;u(e,a),a!==t&&c(e,t,i-r,s)}))}function d(e,t,i=0){const n=void 0===arguments[3]?performance.now():arguments[3],o=l(e);i<=0?o!==t&&h(e,t):requestAnimationFrame((s=>{const r=s-n,a=o+(t-o)/Math.max(r,i)*r;h(e,a),a!==t&&d(e,t,i-r,s)}))}function u(e,t){e!==window?e.scrollTop=t:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t)}function h(e,t){e!==window?e.scrollLeft=t:window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function g(e,t,i){i?c(e,t,i):u(e,t)}function p(e,t,i){i?d(e,t,i):h(e,t)}let f;function m(){if(void 0!==f)return f;const e=document.createElement("p"),t=document.createElement("div");(0,n.AH)(e,{width:"100%",height:"200px"}),(0,n.AH)(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);const i=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return i===o&&(o=t.clientWidth),t.remove(),f=i-o,f}function _(e,t=!0){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&(t?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"])))}},85192:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});i(52321),i(42452),i(13765),i(55516),i(48635),i(9048),i(10239);let n,o=0;const s=new Array(256);for(let e=0;e<256;e++)s[e]=(e+256).toString(16).substring(1);const r=(()=>{const e="undefined"!==typeof crypto?crypto:"undefined"!==typeof window?window.crypto||window.msCrypto:void 0;if(void 0!==e){if(void 0!==e.randomBytes)return e.randomBytes;if(void 0!==e.getRandomValues)return t=>{const i=new Uint8Array(t);return e.getRandomValues(i),i}}return e=>{const t=[];for(let i=e;i>0;i--)t.push(Math.floor(256*Math.random()));return t}})(),a=4096;function l(){(void 0===n||o+16>a)&&(o=0,n=r(a));const e=Array.prototype.slice.call(n,o,o+=16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,s[e[0]]+s[e[1]]+s[e[2]]+s[e[3]]+"-"+s[e[4]]+s[e[5]]+"-"+s[e[6]]+s[e[7]]+"-"+s[e[8]]+s[e[9]]+"-"+s[e[10]]+s[e[11]]+s[e[12]]+s[e[13]]+s[e[14]]+s[e[15]]}},36501:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(57991),o=i(4360),s=i(93493);const r={name:"Quasar",version:"2.17.2",install:n.A,lang:o.A,iconSet:s.A}},1573:(e,t,i)=>{"use strict";function n(e){return e}function o(e){return e}function s(e){return e}i.d(t,{M_:()=>s,wE:()=>o,zj:()=>n})},88941:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});var n=i(21998),o=i(75650),s=i(49385);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:o.l;return(0,s.t)(e,h()),function(i){var n,o,s=i||{},r=s.queryHook,a=void 0===r?g:r;return{$$type:"ais.searchBox",init:function(t){var i=t.instantSearchInstance;e(l(l({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(l(l({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.setQueryParameter("query",void 0)},getRenderState:function(e,t){return l(l({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,s=e.instantSearchInstance,r=e.state;return n||(n=function(e){a(e,(function(e){return t.setQuery(e).search()}))},o=function(){t.setQuery("").search()}),{query:r.query||"",refine:n,clear:o,widgetParams:i,isSearchStalled:"stalled"===s.status}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.query||"";return""===n||e&&e.query===n?e:l(l({},e),{},{query:n})},getWidgetSearchParameters:function(e,t){var i=t.uiState;return e.setQueryParameter("query",i.query||"")}}}};const f=p},49385:(e,t,i)=>{"use strict";function n(e){return Object.prototype.toString.call(e).slice(8,-1)}function o(e,t){if(void 0===e||"function"!==typeof e)throw new Error("The render function is not valid (received type ".concat(n(e),").\n\n").concat(t))}i.d(t,{t:()=>o})},21998:(e,t,i)=>{"use strict";function n(e){var t=e.name,i=e.connector,n=void 0!==i&&i;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",n?"#connector":""].join("")}function o(){for(var e=arguments.length,t=new Array(e),i=0;in,V:()=>o})},75650:(e,t,i)=>{"use strict";function n(){}i.d(t,{l:()=>n})},78685:(e,t,i)=>{"use strict";i.d(t,{Ak:()=>o});const n="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let o=(e=21)=>{let t="",i=crypto.getRandomValues(new Uint8Array(e));while(e--)t+=n[63&i[e]];return t}},92561:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});const n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],o=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],s=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],r=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],a=(e,t,i)=>{let n=e;return"string"===typeof t||Array.isArray(t)?n=e.toLocaleString(t,i):!0!==t&&void 0===i||(n=e.toLocaleString(void 0,i)),n};function l(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const i=t.bits?t.binary?r:s:t.binary?o:n,l=t.space?" ":"";if(t.signed&&0===e)return` 0${l}${i[0]}`;const c=e<0,d=c?"-":t.signed?"+":"";let u;if(c&&(e=-e),void 0!==t.minimumFractionDigits&&(u={minimumFractionDigits:t.minimumFractionDigits}),void 0!==t.maximumFractionDigits&&(u={maximumFractionDigits:t.maximumFractionDigits,...u}),e<1){const n=a(e,t.locale,u);return d+n+l+i[0]}const h=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),i.length-1);e/=(t.binary?1024:1e3)**h,u||(e=e.toPrecision(3));const g=a(Number(e),t.locale,u),p=i[h];return d+g+l+p}},51152:(e,t,i)=>{"use strict";i.d(t,{yb:()=>m,Ay:()=>yf});var n={};function o(e,t,i){if(!e)throw new Error("You need to provide `widgetName` in your data");var n=["ais-"+e];return t&&n.push("-"+t),i&&n.push("--"+i),n.join("")}i.r(n),i.d(n,{AisAutocomplete:()=>xe,AisBreadcrumb:()=>Je,AisClearRefinements:()=>Gt,AisConfigure:()=>ri,AisCurrentRefinements:()=>Pn,AisDynamicWidgets:()=>_f,AisExperimentalConfigureRelatedItems:()=>cn,AisExperimentalDynamicWidgets:()=>vf,AisHierarchicalMenu:()=>ko,AisHighlight:()=>Bo,AisHits:()=>ds,AisHitsPerPage:()=>Is,AisIndex:()=>lr,AisInfiniteHits:()=>Pc,AisInstantSearch:()=>ec,AisInstantSearchSsr:()=>tc,AisMenu:()=>rd,AisMenuSelect:()=>dd,AisNumericMenu:()=>Fd,AisPagination:()=>_u,AisPanel:()=>yu,AisPoweredBy:()=>Eu,AisQueryRuleContext:()=>qu,AisQueryRuleCustomData:()=>Qu,AisRangeInput:()=>_h,AisRatingMenu:()=>Gh,AisRefinementList:()=>Eg,AisRelevantSort:()=>mf,AisSearchBox:()=>Mg,AisSnippet:()=>Wg,AisSortBy:()=>Xg,AisStateResults:()=>Ng,AisStats:()=>dp,AisToggleRefinement:()=>Np,AisVoiceSearch:()=>sf});var s=function(e){var t=e.name;return{props:{classNames:{type:Object,default:void 0}},methods:{suit:function(e,i){var n=o(t,e,i),s=this.classNames&&this.classNames[n];return s?[n,s].join(" "):n}}}};function r(e){for(var t=arguments,i=1;i0;)i[n]=arguments[n+2];var o=i.length>0?i:void 0;if("object"==typeof t&&(t.attrs||t.props||t.scopedSlots||t.on)){var s=Object.keys(t.on||{}),r=Object.assign({},t,t.attrs,t.props,s.reduce((function(e,i){return e["on"+i[0].toUpperCase()+i.slice(1)]=t.on[i],e}),{}));return delete r.attrs,delete r.props,delete r.scopedSlots,s.forEach((function(e){return delete r.on[e]})),r.on&&0===Object.keys(r.on).length&&delete r.on,(0,l.h)(e,r,t.scopedSlots?Object.assign({default:function(){return o}},t.scopedSlots):o)}return(0,l.h)(e,t,o)}return function(){return e.call(this,t)}}function h(e){var t=e.$slots||e.slots;return"function"==typeof t.default?t.default():t.default}function g(e,t){return(e.$slots||e.slots||{})[t]}var p=new Set;function f(e){p.has(e)||(p.add(e),console.warn(e))}var m=function(e,t){var i;void 0===e&&(e={});var n=e.connector;return void 0===t&&(t={}),(i={inject:{instantSearchInstance:{from:"$_ais_instantSearchInstance",default:function(){var e=this.$options._componentTag;throw new TypeError('It looks like you forgot to wrap your Algolia search component "<'+e+'>" inside of an "" component.')}},getParentIndex:{from:"$_ais_getParentIndex",default:function(){var e=this;return function(){return e.instantSearchInstance.mainIndex}}}},data:function(){return{state:null}},created:function(){if("function"==typeof n){if(this.factory=n(this.updateState,(function(){})),this.widget=r(this.factory(this.widgetParams),t),this.getParentIndex().addWidgets([this.widget]),this.instantSearchInstance._initialResults&&!this.instantSearchInstance.started){if("function"!=typeof this.instantSearchInstance.__forceRender)throw new Error("You are using server side rendering with instead of .");this.instantSearchInstance.__forceRender(this.widget,this.getParentIndex())}}else!0!==n&&f("You are using the InstantSearch widget mixin, but didn't provide a connector.\nWhile this is technically possible, and will give you access to the Helper,\nit's not the recommended way of making custom components.\n\nIf you want to disable this message, pass { connector: true } to the mixin.\n\nRead more on using connectors: https://alg.li/vue-custom")}}).beforeUnmount=function(){this.widget&&this.getParentIndex().removeWidgets([this.widget])},i.watch={widgetParams:{handler:function(e){this.state=null,this.getParentIndex().removeWidgets([this.widget]),this.widget=r(this.factory(e),t),this.getParentIndex().addWidgets([this.widget])},deep:!0}},i.methods={updateState:function(e,t){void 0===e&&(e={}),t||(this.state=e)}},i},_=i(21998),v=i(75650),b=i(49385),y={"&":"&","<":"<",">":">",'"':""","'":"'"},w=/[&<>"']/g,C=RegExp(w.source);function S(e){return e&&C.test(e)?e.replace(w,(function(e){return y[e]})):e}var k={"&":"&","<":"<",">":">",""":'"',"'":"'"},x=/&(amp|quot|lt|gt|#39);/g,E=RegExp(x.source);function L(e){return e&&E.test(e)?e.replace(x,(function(e){return k[e]})):e}function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function I(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function D(e){return"object"===T(e)&&null!==e}function R(e){if(!D(e)||"[object Object]"!==I(e))return!1;if(null===Object.getPrototypeOf(e))return!0;var t=e;while(null!==Object.getPrototypeOf(t))t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function A(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t",highlightPostTag:""};function j(e){return S(e).replace(new RegExp(H.highlightPreTag,"g"),V.highlightPreTag).replace(new RegExp(H.highlightPostTag,"g"),V.highlightPostTag)}function z(e){return R(e)&&"string"!==typeof e.value?Object.keys(e).reduce((function(t,i){return M(M({},t),{},F({},i,z(e[i])))}),{}):Array.isArray(e)?e.map(z):M(M({},e),{},{value:j(e.value)})}function U(e){return void 0===e.__escaped&&(e=e.map((function(e){var t=O({},(A(e),e));return t._highlightResult&&(t._highlightResult=z(t._highlightResult)),t._snippetResult&&(t._snippetResult=z(t._snippetResult)),t})),e.__escaped=!0),e}function $(e){return e.map((function(e){return M(M({},e),{},{highlighted:j(e.highlighted)})}))}function q(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function K(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function G(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:20,i=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,fe()),function(i){var n=i||{},o=n.escapeHTML,s=void 0===o||o,r={};return{$$type:"ais.autocomplete",init:function(t){var i=t.instantSearchInstance;e(ue(ue({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance,n=this.getWidgetRenderState(t);n.indices.forEach((function(e){var t=e.sendEvent,i=e.hits;t("view:internal",i)})),e(ue(ue({},n),{},{instantSearchInstance:i}),!1)},getRenderState:function(e,t){return ue(ue({},e),{},{autocomplete:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=this,n=e.helper,o=e.state,a=e.scopedResults,l=e.instantSearchInstance;r.refine||(r.refine=function(e){n.setQuery(e).search()});var c=a.map((function(e){e.results.hits=s?U(e.results.hits):e.results.hits;var i=ae({instantSearchInstance:l,getIndex:function(){return e.results.index},widgetType:t.$$type});return{indexId:e.indexId,indexName:e.results.index,hits:e.results.hits,results:e.results,sendEvent:i}}));return{currentRefinement:o.query||"",indices:c,refine:r.refine,widgetParams:i}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.query||"";return""===n||e&&e.query===n?e:ue(ue({},e),{},{query:n})},getWidgetSearchParameters:function(e,t){var i=t.uiState,n={query:i.query||""};return s?e.setQueryParameters(ue(ue({},n),H)):e.setQueryParameters(n)},dispose:function(e){var i=e.state;t();var n=i.setQueryParameter("query",void 0);return s?n.setQueryParameters(Object.keys(H).reduce((function(e,t){return ue(ue({},e),{},he({},t,void 0))}),{})):n}}}};const _e=me,ve={name:"AisAutocomplete",mixins:[m({connector:_e},{$$widgetType:"ais.autocomplete"}),s({name:"Autocomplete"})],props:{escapeHTML:{type:Boolean,required:!1,default:!0}},computed:{widgetParams:function(){return{escapeHTML:this.escapeHTML}}}};var be=i(58790),ye=(0,l.Lk)("p",null," This widget doesn't render anything without a filled in default slot. ",-1),we=(0,l.Lk)("p",null,"query, function to refine and results are provided.",-1),Ce=(0,l.Lk)("pre",null,"refine: Function",-1),Se=(0,l.Lk)("summary",null,[(0,l.Lk)("code",null,"indices"),(0,l.eW)(":")],-1);function ke(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{refine:e.state.refine,currentRefinement:e.state.currentRefinement,indices:e.state.indices},(function(){return[ye,we,Ce,(0,l.Lk)("pre",null,'currentRefinement: "'+(0,be.v_)(e.state.currentRefinement)+'"',1),(0,l.Lk)("details",null,[Se,(0,l.Lk)("pre",null,(0,be.v_)(e.state.indices),1)])]}))],2)):(0,l.Q3)("",!0)}ve.render=ke;const xe=ve;function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Le(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Te(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;(0,b.t)(e,Be());var i={};return function(n){var o=n||{},s=o.attributes,r=o.separator,a=void 0===r?" > ":r,l=o.rootPath,c=void 0===l?null:l,d=o.transformItems,u=void 0===d?function(e){return e}:d;if(!s||!Array.isArray(s)||0===s.length)throw new Error(Be("The `attributes` option expects an array of strings."));var h=Ne(s,1),g=h[0];function p(e,t){if(!t){var i=e.getHierarchicalFacetBreadcrumb(g);return 0===i.length?e:e.resetPage().toggleFacetRefinement(g,i[0])}return e.resetPage().toggleFacetRefinement(g,t)}return{$$type:"ais.breadcrumb",init:function(t){e(Te(Te({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(Te(Te({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},dispose:function(){t()},getRenderState:function(e,t){return Te(Te({},e),{},{breadcrumb:Te(Te({},e.breadcrumb),{},Ie({},g,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,o=e.helper,s=e.createURL,r=e.results,a=e.state;function l(){if(!r||0===a.hierarchicalFacets.length)return[];var e=Ne(a.hierarchicalFacets,1),t=e[0].name,i=r.getFacetValues(t,{}),n=i&&!Array.isArray(i)&&i.data?i.data:[],o=u(Ve(He(n)),{results:r});return o}var c=l();return i.createURL||(i.createURL=function(e){return s((function(i){return t.getWidgetUiState(i,{searchParameters:p(o.state,e),helper:o})}))}),i.refine||(i.refine=function(e){o.setState(p(o.state,e)).search()}),{canRefine:c.length>0,createURL:i.createURL,items:c,refine:i.refine,widgetParams:n}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getHierarchicalFacetBreadcrumb(g);return je(Te(Te({},e),{},{hierarchicalMenu:Te(Te({},e.hierarchicalMenu),{},Ie({},g,n))}),g)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.hierarchicalMenu&&i.hierarchicalMenu[g];if(e.isConjunctiveFacet(g)||e.isDisjunctiveFacet(g))return e;if(e.isHierarchicalFacet(g))e.getHierarchicalFacetByName(g);var o=e.removeHierarchicalFacet(g).addHierarchicalFacet({name:g,attributes:s,separator:a,rootPath:c});return n?o.addHierarchicalFacetRefinement(g,n.join(a)):o.setQueryParameters({hierarchicalFacetsRefinements:Te(Te({},o.hierarchicalFacetsRefinements),{},Ie({},g,[]))})}}}};function He(e){return e.reduce((function(e,t){return t.isRefined&&(e.push({label:t.name,value:t.escapedValue}),Array.isArray(t.data)&&(e=e.concat(He(t.data)))),e}),[])}function Ve(e){return e.map((function(t,i){return{label:t.label,value:i+1===e.length?null:e[i+1].value}}))}function je(e,t){return e.hierarchicalMenu?(e.hierarchicalMenu[t]&&e.hierarchicalMenu[t].length||delete e.hierarchicalMenu[t],0===Object.keys(e.hierarchicalMenu).length&&delete e.hierarchicalMenu,e):e}const ze=We;function Ue(e){return{all:e=e||new Map,on:function(t,i){var n=e.get(t);n&&n.push(i)||e.set(t,[i])},off:function(t,i){var n=e.get(t);n&&n.splice(n.indexOf(i)>>>0,1)},emit:function(t,i){(e.get(t)||[]).slice().map((function(e){e(i)})),(e.get("*")||[]).slice().map((function(e){e(t,i)}))}}}var $e=function(){var e;return(e={props:{emitter:{type:Object,required:!1,default:function(){return Ue()}}},provide:function(){var e;return(e={}).instantSearchPanelEmitter=this.emitter,e},data:function(){return{canRefine:!0}},created:function(){var e=this;this.emitter.on("PANEL_CHANGE_EVENT",(function(t){e.updateCanRefine(t)}))}}).beforeUnmount=function(){this.emitter.all.clear()},e.methods={updateCanRefine:function(e){this.canRefine=e}},e},qe=function(e){void 0===e&&(e={});var t=e.mapStateToCanRefine;return void 0===t&&(t=function(e){return Boolean(e.canRefine)}),{inject:{emitter:{from:"instantSearchPanelEmitter",default:function(){return{emit:function(){}}}}},data:function(){return{state:null,hasAlreadyEmitted:!1}},watch:{state:{immediate:!0,handler:function(e,i){if(e){var n=t(i||{}),o=t(e);this.hasAlreadyEmitted&&n===o||(this.emitter.emit("PANEL_CHANGE_EVENT",o),this.hasAlreadyEmitted=!0)}}}}}};const Ke={name:"AisBreadcrumb",mixins:[m({connector:ze},{$$widgetType:"ais.breadcrumb"}),qe(),s({name:"Breadcrumb"})],props:{attributes:{type:Array,required:!0},separator:{type:String,default:void 0},rootPath:{type:String,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attributes:this.attributes,separator:this.separator,rootPath:this.rootPath,transformItems:this.transformItems}}},methods:{isLastItem:function(e){return this.state.items.length-1===e}}};var Ge=i(29104),Qe=["href"],Ye=["href"],Ze=["href","onClick"];function Xe(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,refine:e.state.refine,createURL:e.state.createURL},(function(){return[(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[(0,l.Lk)("li",{class:(0,be.C4)([e.suit("item"),!e.state.items.length&&e.suit("item","selected")])},[Boolean(e.state.items.length)?((0,l.uX)(),(0,l.CE)("a",{key:0,href:e.state.createURL(),class:(0,be.C4)(e.suit("link")),onClick:t[0]||(t[0]=(0,Ge.D$)((function(t){return e.state.refine()}),["exact","left","prevent"]))},[(0,l.RG)(e.$slots,"rootLabel",{},(function(){return[(0,l.eW)("Home")]}))],10,Qe)):((0,l.uX)(),(0,l.CE)("a",{key:1,href:e.state.createURL(null),class:(0,be.C4)(e.suit("link")),onClick:t[1]||(t[1]=(0,Ge.D$)((function(t){return e.state.refine(null)}),["exact","left","prevent"]))},[(0,l.RG)(e.$slots,"rootLabel",{},(function(){return[(0,l.eW)("Home")]}))],10,Ye))],2),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t,i){return(0,l.uX)(),(0,l.CE)("li",{key:t.label,class:(0,be.C4)([e.suit("item"),s.isLastItem(i)&&e.suit("item","selected")])},[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("separator")),"aria-hidden":"true"},[(0,l.RG)(e.$slots,"separator",{},(function(){return[(0,l.eW)(">")]}))],2),s.isLastItem(i)?((0,l.uX)(),(0,l.CE)(l.FK,{key:1},[(0,l.eW)((0,be.v_)(t.label),1)],64)):((0,l.uX)(),(0,l.CE)("a",{key:0,href:e.state.createURL(t.value),class:(0,be.C4)(e.suit("link")),onClick:(0,Ge.D$)((function(i){return e.state.refine(t.value)}),["exact","left","prevent"])},(0,be.v_)(t.label),11,Ze))],2)})),128))],2)]}))],2)):(0,l.Q3)("",!0)}Ke.render=Xe;const Je=Ke;function et(e){var t=e.helper,i=e.attributesToClear,n=void 0===i?[]:i,o=t.state.setPage(0);return o=n.reduce((function(e,t){return o.isNumericRefined(t)?e.removeNumericRefinement(t):o.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):o.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):o.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e}),o),-1!==n.indexOf("query")&&(o=o.setQuery("")),o}function tt(e,t){if(!Array.isArray(e))return-1;for(var i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function ut(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}var ht=function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var i=dt(t,ot);return e.setQueryParameters(i)},gt=function(e,t){return t.facets.reduce((function(e,t){return e.addFacet(t)}),e)},pt=function(e,t){return t.disjunctiveFacets.reduce((function(e,t){return e.addDisjunctiveFacet(t)}),e)},ft=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce((function(e,t){var i=tt(e,(function(e){return e.name===t.name}));if(-1===i)return e.concat(t);var n=e.slice();return n.splice(i,1,t),n}),e.hierarchicalFacets)})},mt=function(e,t){return t.tagRefinements.reduce((function(e,t){return e.addTagRefinement(t)}),e)},_t=function(e,t){return e.setQueryParameters({facetsRefinements:rt(rt({},e.facetsRefinements),t.facetsRefinements)})},vt=function(e,t){return e.setQueryParameters({facetsExcludes:rt(rt({},e.facetsExcludes),t.facetsExcludes)})},bt=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:rt(rt({},e.disjunctiveFacetsRefinements),t.disjunctiveFacetsRefinements)})},yt=function(e,t){return e.setQueryParameters({numericRefinements:rt(rt({},e.numericRefinements),t.numericRefinements)})},wt=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:rt(rt({},e.hierarchicalFacetsRefinements),t.hierarchicalFacetsRefinements)})},Ct=function(e,t){var i=it([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return i.length>0?e.setQueryParameters({ruleContexts:i}):e},St=function(){for(var e=arguments.length,t=new Array(e),i=0;i4&&void 0!==arguments[4]?arguments[4]:[],r={type:t,attribute:i,name:n,escapedValue:xt(n)},a=Et(s,(function(e){return e.name===i}));if("hierarchical"===t){for(var l=e.getHierarchicalFacetByName(i),c=n.split(l.separator),d=function(e){return function(t){return e[t]}},u=function(e){a=a&&a.data&&Et(Object.keys(a.data).map(d(a.data)),(function(t){return t.name===c[e]}))},h=0;void 0!==a&&h2&&void 0!==arguments[2]&&arguments[2],n=[],o=t.facetsRefinements,s=void 0===o?{}:o,r=t.facetsExcludes,a=void 0===r?{}:r,l=t.disjunctiveFacetsRefinements,c=void 0===l?{}:l,d=t.hierarchicalFacetsRefinements,u=void 0===d?{}:d,h=t.numericRefinements,g=void 0===h?{}:h,p=t.tagRefinements,f=void 0===p?[]:p;return Object.keys(s).forEach((function(i){var o=s[i];o.forEach((function(o){n.push(Lt(t,"facet",i,o,e.facets))}))})),Object.keys(a).forEach((function(e){var t=a[e];t.forEach((function(t){n.push({type:"exclude",attribute:e,name:t,exclude:!0})}))})),Object.keys(c).forEach((function(i){var o=c[i];o.forEach((function(o){n.push(Lt(t,"disjunctive",i,kt(o),e.disjunctiveFacets))}))})),Object.keys(u).forEach((function(i){var o=u[i];o.forEach((function(o){n.push(Lt(t,"hierarchical",i,o,e.hierarchicalFacets))}))})),Object.keys(g).forEach((function(e){var t=g[e];Object.keys(t).forEach((function(i){var o=i,s=t[o],r=Array.isArray(s)?s:[s];r.forEach((function(t){n.push({type:"numeric",attribute:e,name:"".concat(t),numericValue:t,operator:o})}))}))})),f.forEach((function(e){n.push({type:"tag",attribute:"_tags",name:e})})),i&&t.query&&t.query.trim()&&n.push({attribute:"query",type:"query",name:t.query,query:t.query}),n}function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Dt(e){return Ot(e)||At(e)||Nt(e)||Rt()}function Rt(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Nt(e,t){if(e){if("string"===typeof e)return Pt(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Pt(e,t):void 0}}function At(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ot(e){if(Array.isArray(e))return Pt(e)}function Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Vt()),function(i){var n=i||{},o=n.includedAttributes,s=void 0===o?[]:o,r=n.excludedAttributes,a=void 0===r?["query"]:r,l=n.transformItems,c=void 0===l?function(e){return e}:l;if(i&&i.includedAttributes&&i.excludedAttributes)throw new Error(Vt("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var d={refine:v.l,createURL:function(){return""},attributesToClear:[]},u=function(){return d.refine()},h=function(){return d.createURL()};return{$$type:"ais.clearRefinements",init:function(t){var i=t.instantSearchInstance;e(Ft(Ft({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(Ft(Ft({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(){t()},getRenderState:function(e,t){return Ft(Ft({},e),{},{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,n=e.scopedResults,o=e.results;d.attributesToClear=n.reduce((function(e,t){return e.concat(zt({scopedResult:t,includedAttributes:s,excludedAttributes:a,transformItems:c,results:o}))}),[]),d.refine=function(){d.attributesToClear.forEach((function(e){var t=e.helper,i=e.items;t.setState(et({helper:t,attributesToClear:i})).search()}))},d.createURL=function(){return t(St.apply(void 0,Dt(d.attributesToClear.map((function(e){var t=e.helper,i=e.items;return et({helper:t,attributesToClear:i})})))))};var r=d.attributesToClear.some((function(e){return e.items.length>0}));return{canRefine:r,hasRefinements:r,refine:u,createURL:h,widgetParams:i}}}}};function zt(e){var t=e.scopedResult,i=e.includedAttributes,n=e.excludedAttributes,o=e.transformItems,s=e.results,r=-1!==i.indexOf("query")||-1===n.indexOf("query");return{helper:t.helper,items:o(it(Tt(t.results,t.helper.state,r).map((function(e){return e.attribute})).filter((function(e){return 0===i.length||-1!==i.indexOf(e)})).filter((function(e){return"query"===e&&r||-1===n.indexOf(e)}))),{results:s})}}const Ut=jt,$t={name:"AisClearRefinements",mixins:[m({connector:Ut},{$$widgetType:"ais.clearRefinements"}),qe(),s({name:"ClearRefinements"})],props:{excludedAttributes:{type:Array,default:void 0},includedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}},canRefine:function(){return this.state.hasRefinements}}};var qt=["disabled"];function Kt(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{canRefine:s.canRefine,refine:e.state.refine,createURL:e.state.createURL},(function(){return[(0,l.Lk)("button",{type:"reset",class:(0,be.C4)([e.suit("button"),!s.canRefine&&e.suit("button","disabled")]),disabled:!s.canRefine,onClick:t[0]||(t[0]=(0,Ge.D$)((function(){for(var t,i=[],n=arguments.length;n--;)i[n]=arguments[n];return e.state.refine&&(t=e.state).refine.apply(t,i)}),["prevent"]))},[(0,l.RG)(e.$slots,"resetLabel",{},(function(){return[(0,l.eW)(" Clear refinements ")]}))],10,qt)]}))],2)):(0,l.Q3)("",!0)}$t.render=Kt;const Gt=$t;var Qt=i(1450);function Yt(e){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yt(e)}function Zt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Xt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:v.l,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return function(i){if(!i||!R(i.searchParameters))throw new Error(ii("The `searchParameters` option expects an object."));var n={};function o(e){return function(t){var n=ni(e.state,i),o=St(n,new Qt.SearchParameters(t));i.searchParameters=t,e.setState(o).search()}}return{$$type:"ais.configure",init:function(t){var i=t.instantSearchInstance;e(Xt(Xt({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(Xt(Xt({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var n=e.state;return t(),ni(n,i)},getRenderState:function(e,t){var i,n=this.getWidgetRenderState(t);return Xt(Xt({},e),{},{configure:Xt(Xt({},n),{},{widgetParams:Xt(Xt({},n.widgetParams),{},{searchParameters:St(new Qt.SearchParameters(null===(i=e.configure)||void 0===i?void 0:i.widgetParams.searchParameters),new Qt.SearchParameters(n.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var t=e.helper;return n.refine||(n.refine=o(t)),{refine:n.refine,widgetParams:i}},getWidgetSearchParameters:function(e,t){var n=t.uiState;return St(e,new Qt.SearchParameters(Xt(Xt({},n.configure),i.searchParameters)))},getWidgetUiState:function(e){return Xt(Xt({},e),{},{configure:Xt(Xt({},e.configure),i.searchParameters)})}}}};const si=oi,ri={inheritAttrs:!1,name:"AisConfigure",mixins:[s({name:"Configure"}),m({connector:si},{$$widgetType:"ais.configure"})],computed:{widgetParams:function(){return{searchParameters:Object.assign({},this.$attrs)}}},render:u((function(e){var t=this.$slots.default;return this.state&&t?e("div",{class:this.suit()},[t({refine:this.state.refine,searchParameters:this.state.widgetParams.searchParameters})]):null}))};var ai=function(e,t){return e};function li(){var e=-1,t=-1,i=void 0;return function(n){var o=++e;return Promise.resolve(n).then((function(e){return i&&o1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Ri()),function(i){var n=i||{},o=n.queryLanguages,s=n.attributesForPrediction,r=n.nbHits,a=void 0===r?1:r,l=n.renderDebounceTime,c=void 0===l?100:l,d=n.searchDebounceTime,u=void 0===d?100:d,h=n.escapeHTML,g=void 0===h||h,p=n.extraParameters,f=void 0===p?{}:p;if(!o||0===o.length)throw new Error(Ri("The `queryLanguages` expects an array of strings."));var m,_=li(),v=[],b=!1,y=ci(e,c);return{$$type:"ais.answers",init:function(t){var i=t.state,n=t.instantSearchInstance;if("function"!==typeof n.client.initIndex)throw new Error(Ri("`algoliasearch` <5 required."));var o=n.client.initIndex(i.index);if(!Di(o))throw new Error(Ri("`algoliasearch` >= 4.8.0 required."));m=ci(o.findAnswers,u),e(Ei(Ei({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var i=this,n=t.state.query;if(!n)return v=[],b=!1,void e(Ei(Ei({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1);v=[],b=!0,e(Ei(Ei({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1),_(m(n,o,Ei(Ei({},f),{},{nbHits:a,attributesForPrediction:s}))).then((function(e){if(e){g&&e.hits.length>0&&(e.hits=U(e.hits));var n=mi(e.hits,0,a),o=Si(n,e.queryID);v=o,b=!1,y(Ei(Ei({},i.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)}}))},getRenderState:function(e,t){return Ei(Ei({},e),{},{answers:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{hits:v,isLoading:b,widgetParams:i}},dispose:function(e){var i=e.state;return t(),i},getWidgetSearchParameters:function(e){return e}}}};const Ai=Ni;function Oi(e,t){var i=Array.isArray(t)?t:t.split(".");return i.reduce((function(e,t){return e&&e[t]}),e)}function Pi(e){return Pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pi(e)}function Mi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Fi(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i")}var Qi=function(e,t){return function(i){var n=i||{},o=n.hit,s=n.matchingPatterns,r=n.transformSearchParameters,a=void 0===r?function(e){return e}:r;if(!o)throw new Error(Ki("The `hit` option is required."));if(!s)throw new Error(Ki("The `matchingPatterns` option is required."));var l=Object.keys(s).reduce((function(e,t){var i=s[t],n=Oi(o,t),r=i.score;return Array.isArray(n)?[].concat(Vi(e),[n.map((function(e){return Gi({attributeName:t,attributeValue:e,attributeScore:r})}))]):"string"===typeof n?[].concat(Vi(e),[Gi({attributeName:t,attributeValue:n,attributeScore:r})]):e}),[]),c=Fi({},a(new Qt.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(o.objectID)],optionalFilters:l}))),d=si(e,t);return Fi(Fi({},d({searchParameters:c})),{},{$$type:"ais.configureRelatedItems"})}};const Yi=Qi;function Zi(e,t){var i,n=null===(i=e.getWidgetRenderState)||void 0===i?void 0:i.call(e,t),o=null;if(n&&n.widgetParams){var s=n.widgetParams;s.attribute?o=s.attribute:Array.isArray(s.attributes)&&(o=s.attributes[0])}if("string"!==typeof o)throw new Error("Could not find the attribute of the widget:\n\n".concat(JSON.stringify(e),"\n\nPlease check whether the widget's getWidgetRenderState returns widgetParams.attribute correctly."));return o}function Xi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ji(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,sn()),function(i){var n=i.widgets,o=i.maxValuesPerFacet,s=void 0===o?20:o,r=i.facets,a=void 0===r?["*"]:r,l=i.transformItems,c=void 0===l?function(e){return e}:l,d=i.fallbackWidget;if(!(n&&Array.isArray(n)&&n.every((function(e){return"object"===on(e)}))))throw new Error(sn("The `widgets` option expects an array of widgets."));if(!Array.isArray(a))throw new Error(sn("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(a))));var u=new Map;return{$$type:"ais.dynamicWidgets",init:function(t){n.forEach((function(e){var i=Zi(e,t);u.set(i,{widget:e,isMounted:!1})})),e(Ji(Ji({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var i=t.parent,n=this.getWidgetRenderState(t),o=[],s=[];d&&n.attributesToRender.forEach((function(e){if(!u.has(e)){var t=d({attribute:e});u.set(e,{widget:t,isMounted:!1})}})),u.forEach((function(e,t){var i=e.widget,r=e.isMounted,a=n.attributesToRender.indexOf(t)>-1;!r&&a?(s.push(i),u.set(t,{widget:i,isMounted:!0})):r&&!a&&(o.push(i),u.set(t,{widget:i,isMounted:!1}))})),i.addWidgets(s),setTimeout((function(){return i.removeWidgets(o)}),0),e(Ji(Ji({},n),{},{instantSearchInstance:t.instantSearchInstance}),!1)},dispose:function(e){var i=e.parent,n=[];u.forEach((function(e){var t=e.widget,i=e.isMounted;i&&n.push(t)})),i.removeWidgets(n),t()},getWidgetSearchParameters:function(e){return a.reduce((function(e,t){return e.addFacet(t)}),e.setQueryParameters({maxValuesPerFacet:Math.max(s||0,e.maxValuesPerFacet||0)}))},getRenderState:function(e,t){return Ji(Ji({},e),{},{dynamicWidgets:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,n,o,s,r=e.results;e.state;if(!r)return{attributesToRender:[],widgetParams:i};var a=c(null!==(t=null===(n=r.renderingContent)||void 0===n||null===(o=n.facetOrdering)||void 0===o||null===(s=o.facets)||void 0===s?void 0:s.order)&&void 0!==t?t:[],{results:r});if(!Array.isArray(a))throw new Error(sn("The `transformItems` option expects a function that returns an Array."));return{attributesToRender:a,widgetParams:i}}}}};const an=rn;ai(Ai,"answers is no longer supported");var ln=ai(Yi,"EXPERIMENTAL_connectConfigureRelatedItems is deprecated and will be removed in a next minor version of InstantSearch. Please use connectRelatedItems instead.");ai(an,"use connectDynamicWidgets");const cn={inheritAttrs:!1,name:"AisExperimentalConfigureRelatedItems",mixins:[m({connector:ln},{$$widgetType:"ais.configureRelatedItems"})],props:{hit:{type:Object,required:!0},matchingPatterns:{type:Object,required:!0},transformSearchParameters:{type:Function,required:!1}},computed:{widgetParams:function(){return{hit:this.hit,matchingPatterns:this.matchingPatterns,transformSearchParameters:this.transformSearchParameters}}},render:function(){return null}};function dn(e){return dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(e)}function un(e){return fn(e)||pn(e)||gn(e)||hn()}function hn(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gn(e,t){if(e){if("string"===typeof e)return mn(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?mn(e,t):void 0}}function pn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function fn(e){if(Array.isArray(e))return mn(e)}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Cn()),function(i){if((i||{}).includedAttributes&&(i||{}).excludedAttributes)throw new Error(Cn("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var n=i||{},o=n.includedAttributes,s=n.excludedAttributes,r=void 0===s?["query"]:s,a=n.transformItems,l=void 0===a?function(e){return e}:a;return{$$type:"ais.currentRefinements",init:function(t){var i=t.instantSearchInstance;e(vn(vn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(vn(vn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(){t()},getRenderState:function(e,t){return vn(vn({},e),{},{currentRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.scopedResults,s=e.createURL,a=e.helper;function c(){return t?n.reduce((function(e,i){return e.concat(l(kn({results:i.results,helper:i.helper,indexId:i.indexId,includedAttributes:o,excludedAttributes:r}),{results:t}))}),[]):l(kn({results:{},helper:a,indexId:a.state.index,includedAttributes:o,excludedAttributes:r}),{results:t})}var d=c();return{items:d,canRefine:d.length>0,refine:function(e){return En(a,e)},createURL:function(e){return s(xn(a.state,e))},widgetParams:i}}}}};function kn(e){var t=e.results,i=e.helper,n=e.indexId,o=e.includedAttributes,s=e.excludedAttributes,r=-1!==(o||[]).indexOf("query")||-1===(s||[]).indexOf("query"),a=o?function(e){return-1!==o.indexOf(e.attribute)}:function(e){return-1===s.indexOf(e.attribute)},l=Tt(t,i.state,r).map(Tn).filter(a);return l.reduce((function(e,t){return[].concat(un(e.filter((function(e){return e.attribute!==t.attribute}))),[{indexName:i.state.index,indexId:n,attribute:t.attribute,label:t.attribute,refinements:l.filter((function(e){return e.attribute===t.attribute})).sort((function(e,t){return"numeric"===e.type?e.value-t.value:0})),refine:function(e){return En(i,e)}}])}),[])}function xn(e,t){switch(e=e.resetPage(),t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function En(e,t){e.setState(xn(e.state,t)).search()}function Ln(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}function Tn(e){var t=In(e),i=e.operator?"".concat(Ln(e.operator)," ").concat(e.name):e.name,n={attribute:e.attribute,type:e.type,value:t,label:i};return void 0!==e.operator&&(n.operator=e.operator),void 0!==e.count&&(n.count=e.count),void 0!==e.exhaustive&&(n.exhaustive=e.exhaustive),n}function In(e){return"numeric"===e.type?Number(e.name):"escapedValue"in e?e.escapedValue:e.name}const Dn=Sn,Rn={name:"AisCurrentRefinements",mixins:[s({name:"CurrentRefinements"}),m({connector:Dn},{$$widgetType:"ais.currentRefinements"}),qe()],props:{includedAttributes:{type:Array,default:void 0},excludedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{noRefinement:function(){return this.state&&0===this.state.items.length},widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}}},methods:{createItemKey:function(e){var t=e.attribute,i=e.value;return[t,e.type,i,e.operator].join(":")},capitalize:function(e){return e?e.toString().charAt(0).toLocaleUpperCase()+e.toString().slice(1):""}}};var Nn={key:0},An=["onClick"];function On(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),s.noRefinement&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{refine:e.state.refine,items:e.state.items,createURL:e.state.createURL},(function(){return[(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t){return(0,l.uX)(),(0,l.CE)("li",{key:t.attribute,class:(0,be.C4)(e.suit("item"))},[(0,l.RG)(e.$slots,"item",{refine:t.refine,item:t,createURL:e.state.createURL},(function(){return[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("label"))},(0,be.v_)(s.capitalize(t.label))+": ",3),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(t.refinements,(function(i){return(0,l.uX)(),(0,l.CE)("span",{key:s.createItemKey(i),class:(0,be.C4)(e.suit("category"))},[(0,l.RG)(e.$slots,"refinement",{refine:t.refine,refinement:i,createURL:e.state.createURL},(function(){return[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("categoryLabel"))},["query"===i.attribute?((0,l.uX)(),(0,l.CE)("q",Nn,(0,be.v_)(i.label),1)):((0,l.uX)(),(0,l.CE)(l.FK,{key:1},[(0,l.eW)((0,be.v_)(i.label),1)],64))],2),(0,l.Lk)("button",{class:(0,be.C4)(e.suit("delete")),type:"button",onClick:(0,Ge.D$)((function(e){return t.refine(i)}),["left","exact"])}," ✕ ",10,An)]}))],2)})),128))]}))],2)})),128))],2)]}))],2)):(0,l.Q3)("",!0)}Rn.render=On;const Pn=Rn;function Mn(e,t,i){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,i):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,i):e.state.isDisjunctiveFacetRefined(t,i)}function Fn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Bn(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i=2&&s.length<=4&&(Mn(i,m,a)||t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:o,eventType:p,eventModifier:f,payload:Bn({eventName:c,index:i.getIndex(),filters:["".concat(m,":").concat(a)]},u),attribute:m}))};return s}function Yn(e){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yn(e)}var Zn=["name","escapedValue","data","path"];function Xn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Jn(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function oo(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}function so(e,t){return uo(e)||co(e,t)||ao(e,t)||ro()}function ro(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ao(e,t){if(e){if("string"===typeof e)return lo(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?lo(e,t):void 0}}function lo(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,ho()),function(i){var n=i||{},o=n.attributes,s=n.separator,r=void 0===s?" > ":s,a=n.rootPath,l=void 0===a?null:a,c=n.showParentLevel,d=void 0===c||c,u=n.limit,h=void 0===u?10:u,g=n.showMore,p=void 0!==g&&g,f=n.showMoreLimit,m=void 0===f?20:f,_=n.sortBy,v=void 0===_?go:_,b=n.transformItems,y=void 0===b?function(e){return e}:b;if(!o||!Array.isArray(o)||0===o.length)throw new Error(ho("The `attributes` option expects an array of strings."));if(!0===p&&m<=h)throw new Error(ho("The `showMoreLimit` option must be greater than `limit`."));var w,C,S=so(o,1),k=S[0],x=function(){};function E(){x()}var L=!1;function T(e,t){return function(){L=!L,t.render(e)}}function I(){return L?m:h}function D(e){return e.slice(0,I()).map((function(e){var t=e.name,i=e.escapedValue,n=e.data,o=(e.path,no(e,Zn)),s=Jn(Jn({},o),{},{value:i,label:t,data:null});return Array.isArray(n)&&(s.data=D(n)),s}))}return{$$type:"ais.hierarchicalMenu",init:function(t){var i=t.instantSearchInstance;e(Jn(Jn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;x=T(t,this),e(Jn(Jn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.removeHierarchicalFacet(k).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return Jn(Jn({},e),{},{hierarchicalMenu:Jn(Jn({},e.hierarchicalMenu),{},eo({},k,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,s=e.state,a=e.createURL,l=e.instantSearchInstance,c=e.helper,d=[],u=!1,h=function(e){return a((function(i){return t.getWidgetUiState(i,{searchParameters:s.resetPage().toggleFacetRefinement(k,e),helper:c})}))};if(w||(w=Qn({instantSearchInstance:l,helper:c,attribute:function(e){var t=e.split(r).length-1;return o[t]},widgetType:this.$$type})),C||(C=function(e){w("click:internal",e),c.toggleFacetRefinement(k,e).search()}),n){var g=n.getFacetValues(k,{sortBy:v,facetOrdering:v===go}),f=g&&!Array.isArray(g)&&g.data?g.data:[],m=(s.maxValuesPerFacet||0)>I()?f.length<=I():f.length0,createURL:h,sendEvent:w,widgetParams:i,isShowingMore:L,toggleShowMore:E,canToggleShowMore:u}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getHierarchicalFacetBreadcrumb(k);return fo(Jn(Jn({},e),{},{hierarchicalMenu:Jn(Jn({},e.hierarchicalMenu),{},eo({},k,n))}),k)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.hierarchicalMenu&&i.hierarchicalMenu[k];if(e.isConjunctiveFacet(k)||e.isDisjunctiveFacet(k))return e;if(e.isHierarchicalFacet(k))e.getHierarchicalFacetByName(k);var s=e.removeHierarchicalFacet(k).addHierarchicalFacet({name:k,attributes:o,separator:r,rootPath:l,showParentLevel:d}),a=s.maxValuesPerFacet||0,c=Math.max(a,p?m:h),u=s.setQueryParameter("maxValuesPerFacet",c);return n?u.addHierarchicalFacetRefinement(k,n.join(r)):u.setQueryParameters({hierarchicalFacetsRefinements:Jn(Jn({},u.hierarchicalFacetsRefinements),{},eo({},k,[]))})}}}};function fo(e,t){return e.hierarchicalMenu?(e.hierarchicalMenu[t]&&0!==e.hierarchicalMenu[t].length||delete e.hierarchicalMenu[t],0===Object.keys(e.hierarchicalMenu).length&&delete e.hierarchicalMenu,e):e}const mo=po,_o={name:"HierarchicalMenuList",props:{items:{type:Array,required:!0},level:{type:Number,required:!0},refine:{type:Function,required:!0},createURL:{type:Function,required:!0},suit:{type:Function,required:!0}}};var vo=["href","onClick"];function bo(e,t,i,n,o,s){var r=(0,l.g2)("hierarchical-menu-list",!0);return i.items.length>0?((0,l.uX)(),(0,l.CE)("ul",{key:0,class:(0,be.C4)([i.suit("list"),i.level>0&&i.suit("list","child"),i.suit("list","lvl"+i.level)])},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(i.items,(function(e){return(0,l.uX)(),(0,l.CE)("li",{key:e.value,class:(0,be.C4)([i.suit("item"),e.isRefined&&i.suit("item","selected"),e.data&&e.data.length>0&&i.suit("item","parent")])},[(0,l.Lk)("a",{href:i.createURL(e.value),class:(0,be.C4)([i.suit("link"),e.isRefined&&i.suit("link","selected")]),onClick:(0,Ge.D$)((function(t){return i.refine(e.value)}),["exact","left","prevent"])},[(0,l.Lk)("span",{class:(0,be.C4)(i.suit("label"))},(0,be.v_)(e.label),3),(0,l.Lk)("span",{class:(0,be.C4)(i.suit("count"))},(0,be.v_)(e.count),3)],10,vo),e.data?((0,l.uX)(),(0,l.Wv)(r,{key:0,items:e.data,level:i.level+1,refine:i.refine,createURL:i.createURL,suit:i.suit},null,8,["items","level","refine","createURL","suit"])):(0,l.Q3)("",!0)],2)})),128))],2)):(0,l.Q3)("",!0)}_o.render=bo;const yo=_o,wo={name:"AisHierarchicalMenu",mixins:[s({name:"HierarchicalMenu"}),m({connector:mo},{$$widgetType:"ais.hierarchicalMenu"}),qe()],components:{HierarchicalMenuList:yo},props:{attributes:{type:Array,required:!0},limit:{type:Number,default:void 0},showMoreLimit:{type:Number,default:void 0},showMore:{type:Boolean,default:!1},sortBy:{type:[Array,Function],default:void 0},separator:{type:String,default:void 0},rootPath:{type:String,default:void 0},showParentLevel:{type:Boolean,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attributes:this.attributes,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,separator:this.separator,rootPath:this.rootPath,showParentLevel:this.showParentLevel,sortBy:this.sortBy,transformItems:this.transformItems}}}};var Co=["disabled"];function So(e,t,i,n,o,s){var r=(0,l.g2)("hierarchical-menu-list");return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,refine:e.state.refine,createURL:e.state.createURL,toggleShowMore:e.state.toggleShowMore,sendEvent:e.state.sendEvent},(function(){return[(0,l.bF)(r,{items:e.state.items,level:0,refine:e.state.refine,createURL:e.state.createURL,suit:e.suit},null,8,["items","refine","createURL","suit"]),i.showMore?((0,l.uX)(),(0,l.CE)("button",{key:0,class:(0,be.C4)([e.suit("showMore"),!e.state.canToggleShowMore&&e.suit("showMore","disabled")]),disabled:!e.state.canToggleShowMore,onClick:t[0]||(t[0]=(0,Ge.D$)((function(){for(var t,i=[],n=arguments.length;n--;)i[n]=arguments[n];return e.state.toggleShowMore&&(t=e.state).toggleShowMore.apply(t,i)}),["prevent"]))},[(0,l.RG)(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},(function(){return[(0,l.eW)((0,be.v_)(e.state.isShowingMore?"Show less":"Show more"),1)]}))],10,Co)):(0,l.Q3)("",!0)]}))],2)):(0,l.Q3)("",!0)}wo.render=So;const ko=wo;function xo(){return xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[i]=e[i]);return o}function Lo(e,t){if(null==e)return{};var i,n,o=Eo(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function To(){for(var e=arguments.length,t=new Array(e),i=0;i","post-tag":""},null,8,["hit","attribute","highlighted-tag-name","suit"])}Mo.render=Fo;const Bo=Mo;function Wo(e){return Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wo(e)}function Ho(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Vo(e){for(var t=1;t1)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var i=t[0];if("string"!==typeof i)throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return i},Ko=function(e){return e.map((function(e){return e.__position}))},Go=function(e){var t=e.method,i=e.results,n=e.hits,o=e.objectIDs,s=i.index,r=$o(n,o),a=qo(r);switch(t){case"clickedObjectIDsAfterSearch":var l=Ko(r);return{index:s,queryID:a,objectIDs:o,positions:l};case"convertedObjectIDsAfterSearch":return{index:s,queryID:a,objectIDs:o};default:throw new Error('Unsupported method passed to insights: "'.concat(t,'".'))}},Qo=function(e,t,i){return function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,ns()),function(i){var n,o,s=i||{},r=s.escapeHTML,a=void 0===r||r,l=s.transformItems,c=void 0===l?function(e){return e}:l;return{$$type:"ais.hits",init:function(t){e(Jo(Jo({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var i=this.getWidgetRenderState(t);e(Jo(Jo({},i),{},{instantSearchInstance:t.instantSearchInstance}),!1),i.sendEvent("view:internal",i.items)},getRenderState:function(e,t){return Jo(Jo({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,s,r,l=e.results,d=e.helper,u=e.instantSearchInstance;if(n||(n=ae({instantSearchInstance:u,getIndex:function(){return d.getIndex()},widgetType:this.$$type})),o||(o=le({getIndex:function(){return d.getIndex()},widgetType:this.$$type,instantSearchInstance:u})),!l)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:n,bindEvent:o,widgetParams:i};a&&l.hits.length>0&&(l.hits=U(l.hits));var h=mi(l.hits,l.page,l.hitsPerPage),g=Si(h,l.queryID),p=c(g,{results:l}),f=null===(t=l.renderingContent)||void 0===t||null===(s=t.widgets)||void 0===s||null===(r=s.banners)||void 0===r?void 0:r[0];return{hits:p,items:p,results:l,banner:f,sendEvent:n,bindEvent:o,widgetParams:i}},dispose:function(e){var i=e.state;return t(),a?i.setQueryParameters(Object.keys(H).reduce((function(e,t){return Jo(Jo({},e),{},es({},t,void 0))}),{})):i},getWidgetSearchParameters:function(e,t){return a?e.setQueryParameters(H):e}}}};var ss=Yo(os);const rs=ss;var as=["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"];function ls(e){var t=e.createElement;return function(e){var i=e.classNames,n=e.banner;return n.image.urls[0].url?t("aside",{className:To("ais-Hits-banner",i.bannerRoot)},n.link?t("a",{className:To("ais-Hits-banner-link",i.bannerLink),href:n.link.url,target:n.link.target},t("img",{className:To("ais-Hits-banner-image",i.bannerImage),src:n.image.urls[0].url,alt:n.image.title})):t("img",{className:To("ais-Hits-banner-image",i.bannerImage),src:n.image.urls[0].url,alt:n.image.title})):null}}function cs(e){var t=e.createElement,i=e.Fragment,n=ls({createElement:t,Fragment:i});return function(e){var i=e.classNames,o=void 0===i?{}:i,s=e.hits,r=e.itemComponent,a=e.sendEvent,l=e.emptyComponent,c=e.banner,d=e.bannerComponent,u=Lo(e,as);return t("div",xo({},u,{className:To("ais-Hits",o.root,0===s.length&&To("ais-Hits--empty",o.emptyRoot),u.className)}),c&&(d?t(d,{className:To("ais-Hits-banner",o.bannerRoot),banner:c}):t(n,{classNames:o,banner:c})),0===s.length&&l?t(l,null):t("ol",{className:To("ais-Hits-list",o.list)},s.map((function(e,i){return t(r,{key:e.objectID,hit:e,index:i,className:To("ais-Hits-item",o.item),onClick:function(){a("click:internal",e,"Hit Clicked")},onAuxClick:function(){a("click:internal",e,"Hit Clicked")}})}))))}}const ds={name:"AisHits",mixins:[m({connector:rs},{$$widgetType:"ais.hits"}),s({name:"Hits"})],props:{showBanner:{type:Boolean,default:!0},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{showBanner:this.showBanner,escapeHTML:this.escapeHTML,transformItems:this.transformItems}}},render:u((function(e){var t=this;if(!this.state)return null;var i=g(this,"default"),n=g(this,"item"),o=g(this,"banner");return n||o||!i?e(cs({createElement:e}),{hits:this.state.items,itemComponent:function(i){var o=i.hit,s=i.index,r=i.onClick,a=i.onAuxClick,l=(i.key,function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(i[n]=e[n]);return i}(i,["hit","index","onClick","onAuxClick","key"]));return e("li",{key:o.objectID,attrs:l,on:{click:r,auxclick:a}},[n&&n({item:o,index:s,insights:t.state.insights,sendEvent:t.state.sendEvent})||"objectID: "+o.objectID+", index: "+s])},banner:this.showBanner?this.state.banner:void 0,bannerComponent:o,sendEvent:this.state.sendEvent,classNames:this.classNames&&{root:this.classNames["ais-Hits"],list:this.classNames["ais-Hits-list"],item:this.classNames["ais-Hits-item"],bannerRoot:this.classNames["ais-Hits-banner"],bannerImage:this.classNames["ais-Hits-banner-image"],bannerLink:this.classNames["ais-Hits-banner-link"]}}):e("div",{attrs:{class:this.suit()}},[i({banner:this.state.banner,items:this.state.items,insights:this.state.insights,sendEvent:this.state.sendEvent})])}))};function us(e){return us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},us(e)}function hs(e){return ms(e)||fs(e)||ps(e)||gs()}function gs(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ps(e,t){if(e){if("string"===typeof e)return _s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_s(e,t):void 0}}function fs(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ms(e){if(Array.isArray(e))return _s(e)}function _s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Ss()),function(i){var n=i||{},o=n.items,s=n.transformItems,r=void 0===s?function(e){return e}:s;if(!Array.isArray(o))throw new Error(Ss("The `items` option expects an array of objects."));var a=o,l=a.filter((function(e){return!0===e.default}));if(0===l.length)throw new Error(Ss("A default value must be specified in `items`."));if(l.length>1)throw new Error(Ss("More than one default value is specified in `items`."));var c=l[0],d=function(e){var t=e.hitsPerPage;return a.map((function(e){return bs(bs({},e),{},{isRefined:Number(e.value)===Number(t)})}))},u={getRefine:function(e){return function(t){return t||0===t?e.setQueryParameter("hitsPerPage",t).search():e.setQueryParameter("hitsPerPage",void 0).search()}},createURLFactory:function(e){var t=e.state,i=e.createURL,n=e.getWidgetUiState,o=e.helper;return function(e){return i((function(i){return n(i,{searchParameters:t.resetPage().setQueryParameter("hitsPerPage",e||0===e?e:void 0),helper:o})}))}}};return{$$type:"ais.hitsPerPage",init:function(t){var i=t.state,n=t.instantSearchInstance,o=a.some((function(e){return Number(i.hitsPerPage)===Number(e.value)}));o||(a=[{value:"",label:""}].concat(hs(a))),e(bs(bs({},this.getWidgetRenderState(t)),{},{instantSearchInstance:n}),!0)},render:function(t){var i=t.instantSearchInstance;e(bs(bs({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(e,t){return bs(bs({},e),{},{hitsPerPage:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.state,n=e.results,o=e.createURL,s=e.helper,a=!!n&&n.nbHits>0;return{items:r(d(t),{results:n}),refine:u.getRefine(s),createURL:u.createURLFactory({state:t,createURL:o,getWidgetUiState:this.getWidgetUiState,helper:s}),hasNoResults:!a,canRefine:a,widgetParams:i}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.hitsPerPage;return void 0===n||n===c.value?e:bs(bs({},e),{},{hitsPerPage:n})},getWidgetSearchParameters:function(e,t){var i=t.uiState;return e.setQueryParameters({hitsPerPage:i.hitsPerPage||c.value})}}}};const xs=ks,Es={name:"AisHitsPerPage",mixins:[s({name:"HitsPerPage"}),m({connector:xs},{$$widgetType:"ais.hitsPerPage"}),qe()],props:{items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{items:this.items,transformItems:this.transformItems}}}};var Ls=["value","selected"];function Ts(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{items:e.state.items,refine:e.state.refine,hasNoResults:e.state.hasNoResults,canRefine:e.state.canRefine,createURL:e.state.createURL},(function(){return[(0,l.Lk)("select",{class:(0,be.C4)(e.suit("select")),onChange:t[0]||(t[0]=function(t){return e.state.refine(Number(t.currentTarget.value))})},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t){return(0,l.uX)(),(0,l.CE)("option",{key:t.value,class:(0,be.C4)(e.suit("option")),value:t.value,selected:t.isRefined},(0,be.v_)(t.label),11,Ls)})),128))],34)]}))],2)):(0,l.Q3)("",!0)}Es.render=Ts;const Is=Es;function Ds(e){return"ais.index"===e.$$type}function Rs(e,t,i){var n=t.getHelper();return{uiState:i,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function Ns(e,t,i){var n=t.getResultsForWidget(i),o=t.getHelper();return{helper:o,parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n&&"_state"in n?n._state:o.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function As(e){var t=e.getParent(),i=[e.getHelper().state];while(null!==t)i=[t.getHelper().state].concat(i),t=t.getParent();return i}var Os=0;function Ps(e){"recommend"===e.dependsOn&&(e.$$id=Os++)}function Ms(e){return Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ms(e)}var Fs=["initialSearchParameters"],Bs=["initialRecommendParameters"];function Ws(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Hs(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function Zs(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}var Xs=(0,_.V)({name:"index-widget"});function Js(e,t){var i=t.state,n=t.recommendState,o=t.isPageReset,s=t._uiState;i!==e.state&&(e.state=i,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:o,_uiState:s})),n!==e.recommendState&&(e.recommendState=n)}function er(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce((function(e,i){return Ds(i)?e:i.getWidgetUiState||i.getWidgetState?i.getWidgetUiState?i.getWidgetUiState(e,t):i.getWidgetState(e,t):e}),i)}function tr(e,t){var i=t.initialSearchParameters,n=Ys(t,Fs);return e.reduce((function(e,t){return!t.getWidgetSearchParameters||Ds(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):t.getWidgetSearchParameters(e,n)}),i)}function ir(e,t){var i=t.initialRecommendParameters,n=Ys(t,Bs);return e.reduce((function(e,t){return!Ds(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):e}),i)}function nr(e){var t=e.filter(Ds);0!==t.length&&t.forEach((function(e){var t=e.getHelper();Js(t,{state:t.state.resetPage(),recommendState:t.recommendState,isPageReset:!0}),nr(e.getWidgets())}))}function or(e){var t=e.filter(Ds);return t.reduce((function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(Us(or(t.getWidgets()))))}),[])}var sr=function(e){if(void 0===e||void 0===e.indexName)throw new Error(Xs("The `indexName` option is required."));var t=e.indexName,i=e.indexId,n=void 0===i?t:i,o=[],s={},r=null,a=null,l=null,c=null,d=null,u=!1,h=!1;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return t},getIndexId:function(){return n},getHelper:function(){return l},getResults:function(){var e;return null!==(e=c)&&void 0!==e&&e.lastResults?(c.lastResults._state=l.state,c.lastResults):null},getResultsForWidget:function(e){var t;return"recommend"!==e.dependsOn||Ds(e)||void 0===e.$$id?this.getResults():null!==(t=l)&&void 0!==t&&t.lastRecommendResults?l.lastRecommendResults[e.$$id]:null},getPreviousState:function(){return d},getScopedResults:function(){var e,i=this.getParent();return e=i?i.getWidgets():0===t.length?this.getWidgets():[this],or(e)},getParent:function(){return a},createURL:function(e){return"function"===typeof e?r._createURL(Vs({},n,e(s))):r._createURL(Vs({},n,er(o,{searchParameters:e,helper:l})))},getWidgets:function(){return o},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Xs("The `addWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!==typeof e.init&&"function"!==typeof e.render})))throw new Error(Xs("The widget definition expects a `render` and/or an `init` method."));return e.forEach((function(e){Ds(e)||(r&&"recommend"===e.dependsOn?r._hasRecommendWidget=!0:r?r._hasSearchWidget=!0:"recommend"===e.dependsOn?u=!0:h=!0,Ps(e))})),o=o.concat(e),r&&Boolean(e.length)&&(Js(l,{state:tr(o,{uiState:s,initialSearchParameters:l.state}),recommendState:ir(o,{uiState:s,initialRecommendParameters:l.recommendState}),_uiState:s}),e.forEach((function(e){if(e.getRenderState){var i=e.getRenderState(r.renderState[t.getIndexId()]||{},Rs(r,t,r._initialUiState));ar({renderState:i,instantSearchInstance:r,parent:t})}})),e.forEach((function(e){e.init&&e.init(Rs(r,t,r._initialUiState))})),r.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Xs("The `removeWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!==typeof e.dispose})))throw new Error(Xs("The widget definition expects a `dispose` method."));if(o=o.filter((function(t){return-1===e.indexOf(t)})),o.forEach((function(e){Ds(e)||(r&&"recommend"===e.dependsOn?r._hasRecommendWidget=!0:r?r._hasSearchWidget=!0:"recommend"===e.dependsOn?u=!0:h=!0)})),r&&Boolean(e.length)){var i=e.reduce((function(e,i){var n=i.dispose({helper:l,state:e.cleanedSearchState,recommendState:e.cleanedRecommendState,parent:t});return n instanceof Qt.RecommendParameters?e.cleanedRecommendState=n:n&&(e.cleanedSearchState=n),e}),{cleanedSearchState:l.state,cleanedRecommendState:l.recommendState}),n=i.cleanedSearchState,a=i.cleanedRecommendState,c=r.future.preserveSharedStateOnUnmount?tr(o,{uiState:s,initialSearchParameters:new Qt.SearchParameters({index:this.getIndexName()})}):tr(o,{uiState:er(o,{searchParameters:n,helper:l}),initialSearchParameters:n});s=er(o,{searchParameters:c,helper:l}),l.setState(c),l.recommendState=a,o.length&&r.scheduleSearch()}return this},init:function(e){var i,g=this,p=e.instantSearchInstance,f=e.parent,m=e.uiState;if(null===l){r=p,a=f,s=m[n]||{};var _=p.mainHelper,v=tr(o,{uiState:s,initialSearchParameters:new Qt.SearchParameters({index:t})}),b=ir(o,{uiState:s,initialRecommendParameters:new Qt.RecommendParameters});l=Qt({},v.index,v),l.recommendState=b,l.search=function(){return p.onStateChange?(p.onStateChange({uiState:p.mainIndex.getWidgetUiState({}),setUiState:function(e){return p.setUiState(e,!1)}}),_):_.search()},l.searchWithoutTriggeringOnStateChange=function(){return _.search()},l.searchForFacetValues=function(e,t,i,n){var o=l.state.setQueryParameters(n);return _.searchForFacetValues(e,t,i,o)},c=_.derive((function(){return St.apply(void 0,[_.state].concat(Us(As(g))))}),(function(){return g.getHelper().recommendState}));var y=null===(i=p._initialResults)||void 0===i?void 0:i[this.getIndexId()];if(null!==y&&void 0!==y&&y.results){var w=new Qt.SearchResults(new Qt.SearchParameters(y.state),y.results);c.lastResults=w,l.lastResults=w}if(null!==y&&void 0!==y&&y.recommendResults){var C=new Qt.RecommendResults(new Qt.RecommendParameters({params:y.recommendResults.params}),y.recommendResults.results);c.lastRecommendResults=C,l.lastRecommendResults=C}l.on("change",(function(e){var t=e.isPageReset;t&&nr(o)})),c.on("search",(function(){p.scheduleStalledRender()})),c.on("result",(function(e){var t=e.results;p.scheduleRender(),l.lastResults=t,d=null===t||void 0===t?void 0:t._state})),c.on("recommend:result",(function(e){var t=e.recommend;p.scheduleRender(),l.lastRecommendResults=t.results})),o.forEach((function(e){if(e.getRenderState){var t=e.getRenderState(p.renderState[g.getIndexId()]||{},Rs(p,g,m));ar({renderState:t,instantSearchInstance:p,parent:g})}})),o.forEach((function(e){e.init&&e.init(Rs(p,g,m))})),l.on("change",(function(e){var t=e.state,i=e._uiState;s=er(o,{searchParameters:t,helper:l},i||{}),p.onStateChange||p.onInternalStateChange()})),y&&p.scheduleRender(),u&&(p._hasRecommendWidget=!0),h&&(p._hasSearchWidget=!0)}},render:function(e){var t,i=this,n=e.instantSearchInstance;"error"===n.status&&!n.mainHelper.hasPendingRequests()&&d&&l.setState(d);var s=this.getResults()||null!==(t=c)&&void 0!==t&&t.lastRecommendResults?o:o.filter(Ds);s=s.filter((function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:n})})),s.forEach((function(e){if(e.getRenderState){var t=e.getRenderState(n.renderState[i.getIndexId()]||{},Ns(n,i,e));ar({renderState:t,instantSearchInstance:n,parent:i})}})),s.forEach((function(e){e.render&&e.render(Ns(n,i,e))}))},dispose:function(){var e,t,i=this;o.forEach((function(e){e.dispose&&l&&e.dispose({helper:l,state:l.state,recommendState:l.recommendState,parent:i})})),r=null,a=null,null===(e=l)||void 0===e||e.removeAllListeners(),l=null,null===(t=c)||void 0===t||t.detach(),c=null},getWidgetUiState:function(e){return o.filter(Ds).reduce((function(e,t){return t.getWidgetUiState(e)}),Hs(Hs({},e),{},Vs({},n,Hs(Hs({},e[n]),s))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var i=t.uiState;return tr(o,{uiState:i,initialSearchParameters:e})},refreshUiState:function(){s=er(o,{searchParameters:this.getHelper().state,helper:this.getHelper()},s)},setIndexUiState:function(e){var t="function"===typeof e?e(s):e;r.setUiState((function(e){return Hs(Hs({},e),{},Vs({},n,t))}))}}};const rr=sr;function ar(e){var t=e.renderState,i=e.instantSearchInstance,n=e.parent,o=n?n.getIndexId():i.mainIndex.getIndexId();i.renderState=Hs(Hs({},i.renderState),{},Vs({},o,Hs(Hs({},i.renderState[o]),t)))}const lr={name:"AisIndex",mixins:[s({name:"Index"}),m({connector:function(){return rr}},{$$widgetType:"ais.index"})],provide:function(){var e=this;return{$_ais_getParentIndex:function(){return e.widget}}},props:{indexName:{type:String,required:!0},indexId:{type:String,required:!1}},render:u((function(e){return e("div",{},h(this))})),computed:{widgetParams:function(){return{indexName:this.indexName,indexId:this.indexId}}}};var cr="ais",dr=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.descendantName,n=t.modifierName,o=i?"-".concat(i):"",s=n?"--".concat(n):"";return"".concat(cr,"-").concat(e).concat(o).concat(s)}},ur=dr("Highlight");function hr(e){var t=e.attribute,i=e.highlightedTagName,n=void 0===i?"mark":i,o=e.hit,s=e.cssClasses,r=void 0===s?{}:s,a=Oi(o._highlightResult,t),l=a||{},c=l.value,d=void 0===c?"":c,u=ur({descendantName:"highlighted"})+(r.highlighted?" ".concat(r.highlighted):"");return d.replace(new RegExp(V.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(V.highlightPostTag,"g"),""))}function gr(e){var t=V.highlightPreTag,i=V.highlightPostTag;return e.map((function(e){return e.isHighlighted?t+e.value+i:e.value})).join("")}var pr=new RegExp(/\w/i);function fr(e,t){var i,n,o=e[t],s=(null===(i=e[t+1])||void 0===i?void 0:i.isHighlighted)||!0,r=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return pr.test(L(o.value))||r!==s?o.isHighlighted:r}function mr(e){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(e)}function _r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function vr(e){for(var t=1;t')).replace(new RegExp(V.highlightPostTag,"g"),""))}var xr=dr("Snippet");function Er(e){var t=e.attribute,i=e.highlightedTagName,n=void 0===i?"mark":i,o=e.hit,s=e.cssClasses,r=void 0===s?{}:s,a=Oi(o._snippetResult,t),l=a||{},c=l.value,d=void 0===c?"":c,u=xr({descendantName:"highlighted"})+(r.highlighted?" ".concat(r.highlighted):"");return d.replace(new RegExp(V.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(V.highlightPostTag,"g"),""))}var Lr=dr("ReverseSnippet");function Tr(e){var t=e.attribute,i=e.highlightedTagName,n=void 0===i?"mark":i,o=e.hit,s=e.cssClasses,r=void 0===s?{}:s,a=Oi(o._snippetResult,t),l=a||{},c=l.value,d=void 0===c?"":c,u=Lr({descendantName:"highlighted"})+(r.highlighted?" ".concat(r.highlighted):""),h=gr(Cr(No(d)));return h.replace(new RegExp(V.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(V.highlightPostTag,"g"),""))}function Ir(e){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ir(e)}function Dr(e){var t,i=e.method,n=e.payload;if("object"!==Ir(n))throw new Error("The insights helper expects the payload to be an object.");try{t=q(n)}catch(e){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(i,'" data-insights-payload="').concat(t,'"')}function Rr(e,t){return Dr({method:e,payload:t})}function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}var Ar="_ALGOLIA";function Or(e){if("object"===("undefined"===typeof document?"undefined":Nr(document))&&"string"===typeof document.cookie)for(var t="".concat(e,"="),i=document.cookie.split(";"),n=0;n1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}},i=t.fallback;return"undefined"===typeof window?i():e({window})}function Br(e){return e!==Object(e)}function Wr(e,t){if(e===t)return!0;if(Br(e)||Br(t)||"function"===typeof e||"function"===typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i=0,n=Object.keys(e);i=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function jr(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}function zr(e){var t=e||{},i=(t.page,Vr(t,Hr));return i}function Ur(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,i=["ais.infiniteHits",t].filter(Boolean).join(":");return{read:function(e){var t=e.state,n=Fr((function(e){var t=e.window;return t.sessionStorage}));if(!n)return null;try{var o=JSON.parse(n.getItem(i));return o&&Wr(o.state,zr(t))?o.hits:null}catch(e){if(e instanceof SyntaxError)try{n.removeItem(i)}catch(e){}return null}},write:function(e){var t=e.state,n=e.hits,o=Fr((function(e){var t=e.window;return t.sessionStorage}));if(o)try{o.setItem(i,JSON.stringify({state:zr(t),hits:n}))}catch(e){}}}}var $r=i(83480);function qr(e){if(e.transporter){var t=e.transporter,i=t.headers||t.baseHeaders,n=t.queryParameters||t.baseQueryParameters,o="x-algolia-application-id",s="x-algolia-api-key",r=i[o]||n[o],a=i[s]||n[s];return[r,a]}return[e.applicationID,e.apiKey]}function Kr(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)}))}function Gr(e){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gr(e)}function Qr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Yr(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i0&&void 0!==arguments[0]?arguments[0]:{},i=t.insightsClient,n=t.insightsInitParams,o=t.onEvent,s=t.$$internal,r=void 0!==s&&s,a=t.$$automatic,l=void 0!==a&&a,c=i;i||null===i||Fr((function(e){var t=e.window,i=t.AlgoliaAnalyticsObject||"aa";"string"===typeof i&&(c=t[i]),c||(t.AlgoliaAnalyticsObject=i,t[i]||(t[i]=function(){t[i].queue||(t[i].queue=[]);for(var e=arguments.length,n=new Array(e),o=0;o2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=fa(t);if(r){var a=c.state.userToken;e&&"authenticated"===e&&"default"===n&&!s||(o?l():setTimeout(l,0))}function l(){c.overrideStateWithoutTriggeringChangeEvent(Yr(Yr({},c.state),{},{userToken:r})),a&&a!==t&&i.scheduleSearch(),e=n}};function v(e,t,i){h(e,i?"authenticated":"default",!0),t&&d("setUserToken",t),i&&d("setAuthenticatedUserToken",i)}var w,C,S=void 0,k=Pr();if(k)S=k;else{var x="anonymous-".concat(Kr());S=x}var E=a.userToken;n&&(n.authenticatedUserToken?w=n.authenticatedUserToken:n.userToken&&(C=n.userToken));var L=w||C,T=y||b,I=_||m;if(L)v(L,C,w);else if(E)v(E,E,void 0);else if(T)v(T,b,y);else if(I)v(I,m,_);else if(S){var D,R;if(v(S,S,void 0),null!==n&&void 0!==n&&n.useCookie||null!==(D=f)&&void 0!==D&&D.useCookie)ga(S,(null===n||void 0===n?void 0:n.cookieDuration)||(null===(R=f)||void 0===R?void 0:R.cookieDuration))}d("onUserTokenChange",(function(e){return h(e,"default",!0)}),{immediate:!0}),d("onAuthenticatedUserTokenChange",(function(e){e||d("getUserToken",null,(function(e,t){h(t,"default",!0,!0)})),h(e,"authenticated",!0)}),{immediate:!0});var N=d;pa(d)&&(N=function(e,t){var i={headers:{"X-Algolia-Application-Id":g,"X-Algolia-API-Key":p}};return d(e,t,i)});var A,O=new Set;i.mainHelper.derivedHelpers[0].on("result",(function(e){var t=e.results;t.queryID&&t.queryID===A||(A=t.queryID,O.clear())})),i.sendEventToInsights=function(e){if(o)o(e,N);else if(e.insightsMethod){if("viewedObjectIDs"===e.insightsMethod){var t=e.payload,i=t.objectIDs.filter((function(e){return!O.has(e)}));if(0===i.length)return;i.forEach((function(e){return O.add(e)})),t.objectIDs=i}e.payload.algoliaSource=["instantsearch"],l&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),N(e.insightsMethod,e.payload)}}},unsubscribe:function(){d("onUserTokenChange",void 0),d("onAuthenticatedUserTokenChange",void 0),i.sendEventToInsights=v.l,c&&a&&(c.overrideStateWithoutTriggeringChangeEvent(Yr(Yr({},c.state),a)),i.scheduleSearch())}}}}function ga(e,t){var i=2592e6,n=new Date;n.setTime(n.getTime()+(t||6*i));var o="expires=".concat(n.toUTCString());document.cookie="_ALGOLIA=".concat(e,";").concat(o,";path=/")}function pa(e){var t=(e.version||"").split(".").map(Number),i=ea(t,2),n=i[0],o=i[1],s=n>=3,r=2===n&&o>=6,a=1===n&&o>=10;return s||r||a}function fa(e){if(e)return"number"===typeof e?e.toString():e}function ma(e,t,i){var n=Rs(t,t.mainIndex,t._initialUiState);e.forEach((function(e){var o={};if(e.getWidgetRenderState){var s=e.getWidgetRenderState(n);s&&s.widgetParams&&(o=s.widgetParams)}var r=Object.keys(o).filter((function(e){return void 0!==o[e]}));i.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:r}),"ais.index"===e.$$type&&ma(e.getWidgets(),t,i)}))}function _a(){return Fr((function(e){var t,i,n=e.window;return(null===(t=n.navigator)||void 0===t||null===(i=t.userAgent)||void 0===i?void 0:i.indexOf("Algolia Crawler"))>-1}),{fallback:function(){return!1}})}function va(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.$$internal,i=void 0!==t&&t;return function(e){var t=e.instantSearchInstance,n={widgets:[]},o=document.createElement("meta"),s=document.querySelector("head");return o.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:i,onStateChange:function(){},subscribe:function(){setTimeout((function(){var e=t.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,ma(t.mainIndex.getWidgets(),t,n),t.middleware.forEach((function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})})),o.content=JSON.stringify(n),s.appendChild(o)}),0)},started:function(){},unsubscribe:function(){o.remove()}}}}var ba=i(96734);function ya(e){return ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ya(e)}function wa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ca(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,i=void 0===t?function(e){var t=e.qsModule,i=e.routeState,n=e.location,o=n.protocol,s=n.hostname,r=n.port,a=void 0===r?"":r,l=n.pathname,c=n.hash,d=t.stringify(i),u=""===a?"":":".concat(a);return d?"".concat(o,"//").concat(s).concat(u).concat(l,"?").concat(d).concat(c):"".concat(o,"//").concat(s).concat(u).concat(l).concat(c)}:t,n=e.parseURL,o=void 0===n?function(e){var t=e.qsModule,i=e.location;return t.parse(i.search.slice(1),{arrayLimit:99})}:n,s=e.writeDelay,r=void 0===s?400:s,a=e.windowTitle,l=e.getLocation,c=void 0===l?function(){return Fr((function(e){var t=e.window;return t.location}),{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:l,d=e.start,u=e.dispose,h=e.push,g=e.cleanUrlOnDispose;return new Ta({createURL:i,parseURL:o,writeDelay:r,windowTitle:a,getLocation:c,start:d,dispose:u,push:h,cleanUrlOnDispose:g})}function Da(e){return Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(e)}var Ra=["configure"];function Na(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Aa(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function Ba(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}function Wa(e){e.configure;var t=Fa(e,Ra);return t}function Ha(){return{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce((function(t,i){return Aa(Aa({},t),{},Oa({},i,Wa(e[i])))}),{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,i){return Aa(Aa({},t),{},Oa({},i,Wa(e[i])))}),{})}}}function Va(e){return Va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Va(e)}function ja(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function za(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,i=void 0===t?Ia():t,n=e.stateMapping,o=void 0===n?Ha():n,s=e.$$internal,r=void 0!==s&&s;return function(e){var t=e.instantSearchInstance;function n(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),s=Object.keys(e).reduce((function(t,i){return za(za({},t),{},Ua({},i,e[i]))}),n),r=o.stateToRoute(s);return i.createURL(r)}t._createURL=n;var s=void 0,a=t._initialUiState;return{$$type:"ais.router({router:".concat(i.$$type||"__unknown__",", stateMapping:").concat(o.$$type||"__unknown__","})"),$$internal:r,onStateChange:function(e){var t=e.uiState,n=o.stateToRoute(t);void 0!==s&&Wr(s,n)||(i.write(n),s=n)},subscribe:function(){t._initialUiState=za(za({},a),o.routeToState(i.read())),i.onUpdate((function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(o.routeToState(e))}))},started:function(){var e;null===(e=i.start)||void 0===e||e.call(i)},unsubscribe:function(){i.dispose()}}}};function Ga(e,t){return e.toLocaleString(t)}function Qa(e){return Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qa(e)}function Ya(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Za(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1?i-1:0),s=1;s1?t-1:0),n=1;n0&&void 0!==arguments[0])||arguments[0];null!==(e=n.mainHelper)&&void 0!==e&&e.hasPendingRequests()||(clearTimeout(n._searchStalledTimer),n._searchStalledTimer=null,t&&(n.status="idle",n.error=void 0)),n.mainIndex.render({instantSearchInstance:Bl(n)}),n.emit("render")}))),Vl(Bl(n),"onInternalStateChange",nl((function(){var e=n.mainIndex.getWidgetUiState({});n.middleware.forEach((function(t){var i=t.instance;i.onStateChange({uiState:e})}))}))),n.setMaxListeners(100);var o=e.indexName,s=void 0===o?"":o,r=e.numberLocale,a=e.initialUiState,l=void 0===a?{}:a,c=e.routing,d=void 0===c?null:c,u=e.insights,h=void 0===u?void 0:u,g=e.searchFunction,p=e.stalledSearchDelay,f=void 0===p?200:p,m=e.searchClient,_=void 0===m?null:m,b=e.insightsClient,y=void 0===b?null:b,w=e.onStateChange,C=void 0===w?null:w,S=e.future,k=void 0===S?Dl(Dl({},ql),e.future||{}):S;if(null===_)throw new Error(Ul("The `searchClient` option is required."));if("function"!==typeof _.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"===typeof _.addAlgoliaAgent&&_.addAlgoliaAgent("instantsearch.js (".concat(Ll,")")),y&&"function"!==typeof y)throw new Error(Ul("The `insightsClient` option should be a function."));if(n.client=_,n.future=k,n.insightsClient=y,n.indexName=s,n.helper=null,n.mainHelper=null,n.mainIndex=rr({indexName:s}),n.onStateChange=C,n.started=!1,n.templatesConfig={helpers:tl({numberLocale:r}),compileOptions:{}},n._stalledSearchDelay=f,n._searchStalledTimer=null,n._createURL=$l,n._initialUiState=l,n._initialResults=null,n._insights=h,g&&(n._searchFunction=g),n.sendEventToInsights=v.l,d){var x="boolean"===typeof d?{}:d;x.$$internal=!0,n.use(Ka(x))}if(h){var E="boolean"===typeof h?{}:h;E.$$internal=!0,n.use(ha(E))}return _a()&&n.use(va({$$internal:!0})),n}return Al(i,[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach((function(e){var t=e.instance;t.started()})),"undefined"===typeof this._insights&&t.derivedHelpers[0].once("result",(function(){var t=e.mainIndex.getScopedResults().some((function(e){var t=e.results;return null===t||void 0===t?void 0:t._automaticInsights}));t&&e.use(ha({$$internal:!0,$$automatic:!0}))}))}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null===(e=this.mainHelper)||void 0===e||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach((function(e){var t=e.instance;t.unsubscribe()}))}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout((function(){e.status="stalled",e.scheduleRender()}),this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(Ul("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"===typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&i?this.onStateChange({uiState:n,setUiState:function(e){El("function"===typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(El(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(Ul("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Ul("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),i}($r);const Gl=Kl;var Ql=function(e){return new Gl(e)};Ql.version=Ll,Ql.createInfiniteHitsSessionStorageCache=ai(Ur,"import { createInfiniteHitsSessionStorageCache } from 'instantsearch.js/es/lib/infiniteHitsCache'"),Ql.highlight=ai(hr,"import { highlight } from 'instantsearch.js/es/helpers'"),Ql.reverseHighlight=ai(kr,"import { reverseHighlight } from 'instantsearch.js/es/helpers'"),Ql.snippet=ai(Er,"import { snippet } from 'instantsearch.js/es/helpers'"),Ql.reverseSnippet=ai(Tr,"import { reverseSnippet } from 'instantsearch.js/es/helpers'"),Ql.insights=Rr,Ql.getInsightsAnonymousUserToken=Mr,Object.defineProperty(Ql,"widgets",{get:function(){throw new ReferenceError("\"instantsearch.widgets\" are not available from the ES build.\n\nTo import the widgets:\n\nimport { searchBox } from 'instantsearch.js/es/widgets'")}}),Object.defineProperty(Ql,"connectors",{get:function(){throw new ReferenceError("\"instantsearch.connectors\" are not available from the ES build.\n\nTo import the connectors:\n\nimport { connectSearchBox } from 'instantsearch.js/es/connectors'")}}),Object.defineProperty(Ql,"templates",{get:function(){throw new ReferenceError("\"instantsearch.templates\" are not available from the ES build.\n\nTo import the templates:\n\nimport { carousel } from 'instantsearch.js/es/templates'")}});const Yl=Ql;var Zl="4.19.11",Xl=function(e){var t;return r(((t={mixins:[s({name:"InstantSearch"})],provide:function(){return{$_ais_instantSearchInstance:this.instantSearchInstance}},watch:{searchClient:function(e){f(!1),this.instantSearchInstance.helper.setClient(e).search()},indexName:function(e){this.instantSearchInstance.helper.setIndex(e||"").search()},stalledSearchDelay:function(e){this.instantSearchInstance._stalledSearchDelay=e},routing:function(){throw new Error("routing configuration can not be changed dynamically at this point.\n\nPlease open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props")},onStateChange:function(){throw new Error("onStateChange configuration can not be changed dynamically at this point.\n\nPlease open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props")},searchFunction:function(e){this.instantSearchInstance._searchFunction=e},middlewares:{immediate:!0,handler:function(e,t){var i=this;(t||[]).filter((function(t){return-1===(e||[]).indexOf(t)})).forEach((function(e){i.instantSearchInstance.unuse(e)})),(e||[]).filter((function(e){return-1===(t||[]).indexOf(e)})).forEach((function(e){i.instantSearchInstance.use(e)}))}},future:function(e){this.instantSearchInstance.future=Object.assign(ql,e)}},created:function(){var e=this.instantSearchInstance.client;"function"==typeof e.addAlgoliaAgent&&(e.addAlgoliaAgent("Vue ("+l.rE+")"),e.addAlgoliaAgent("Vue InstantSearch ("+Zl+")"))},mounted:function(){var e=this;this.$nextTick((function(){e.instantSearchInstance.started||e.instantSearchInstance.start()}))}}).beforeUnmount=function(){this.instantSearchInstance.started&&this.instantSearchInstance.dispose(),this.instantSearchInstance.__initialSearchResults=void 0},t),e)},Jl="Vue InstantSearch: You used the prop api-key or app-id.\nThese have been replaced by search-client.\n\nSee more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client";const ec=Xl({name:"AisInstantSearch",props:{searchClient:{type:Object,required:!0},insightsClient:{type:Function,default:void 0},indexName:{type:String,required:!0},routing:{default:void 0,validator:function(e){return!("boolean"==typeof e||!e.router&&!e.stateMapping)||(f("The `routing` option expects an object with `router` and/or `stateMapping`.\n\nSee https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-routing"),!1)}},insights:{default:void 0,validator:function(e){return void 0===e||"boolean"==typeof e||"object"==typeof e}},stalledSearchDelay:{type:Number,default:void 0},searchFunction:{type:Function,default:void 0},onStateChange:{type:Function,default:void 0},initialUiState:{type:Object,default:void 0},apiKey:{type:String,default:void 0,validator:function(e){return e&&f(Jl),!1}},appId:{type:String,default:void 0,validator:function(e){return e&&f(Jl),!1}},middlewares:{type:Array,default:null},future:{type:Object,default:void 0}},data:function(){return{instantSearchInstance:Yl({searchClient:this.searchClient,insightsClient:this.insightsClient,insights:this.insights,indexName:this.indexName,routing:this.routing,stalledSearchDelay:this.stalledSearchDelay,searchFunction:this.searchFunction,onStateChange:this.onStateChange,initialUiState:this.initialUiState,future:this.future})}},render:u((function(e){var t;return e("div",{class:(t={},t[this.suit()]=!0,t[this.suit("","ssr")]=!1,t)},h(this))}))}),tc=Xl({name:"AisInstantSearchSsr",inject:{$_ais_ssrInstantSearchInstance:{default:function(){throw new Error("`createServerRootMixin` is required when using SSR.")}}},data:function(){return{instantSearchInstance:this.$_ais_ssrInstantSearchInstance}},render:u((function(e){var t;return e("div",{class:(t={},t[this.suit()]=!0,t[this.suit("","ssr")]=!0,t)},h(this))}))});function ic(e,t){t(e),e.getWidgets().forEach((function(e){Ds(e)&&ic(e,t)}))}function nc(e){return nc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nc(e)}var oc=["page"],sc=["clickAnalytics","userToken"];function rc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ac(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function vc(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}var bc=(0,_.V)({name:"infinite-hits",connector:!0});function yc(e){var t=e||{},i=(t.page,_c(t,oc));return i}function wc(e){var t=e||{},i=(t.clickAnalytics,t.userToken,_c(t,sc));return i}function Cc(){var e=null,t=null;return{read:function(i){var n=i.state;return Wr(t,yc(n))?e:null},write:function(i){var n=i.state,o=i.hits;t=yc(n),e=o}}}function Sc(e){return Object.keys(e).map(Number).sort((function(e,t){return e-t})).reduce((function(t,i){return t.concat(e[i])}),[])}const kc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,bc()),function(i){var n,o,s,r,a=i||{},l=a.escapeHTML,c=void 0===l||l,d=a.transformItems,u=void 0===d?function(e){return e}:d,h=a.cache,g=void 0===h?Cc():h,p=function(e,t){var i=e.page,n=void 0===i?0:i,o=Object.keys(t).map(Number);return 0===o.length?n:Math.min.apply(Math,[n].concat(uc(o)))},f=function(e,t){var i=e.page,n=void 0===i?0:i,o=Object.keys(t).map(Number);return 0===o.length?n:Math.max.apply(Math,[n].concat(uc(o)))},m=function(e){return function(){e.overrideStateWithoutTriggeringChangeEvent(ac(ac({},e.state),{},{page:p(e.state,g.read({state:wc(e.state)})||{})-1})).searchWithoutTriggeringOnStateChange()}},_=function(e){return function(){e.setPage(f(e.state,g.read({state:wc(e.state)})||{})+1).search()}};return{$$type:"ais.infiniteHits",init:function(t){e(ac(ac({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var i=t.instantSearchInstance,n=this.getWidgetRenderState(t);e(ac(ac({},n),{},{instantSearchInstance:i}),!1),s("view:internal",n.currentPageHits)},getRenderState:function(e,t){return ac(ac({},e),{},{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,a,l,d,h=e.results,v=e.helper,b=e.parent,y=e.state,w=e.instantSearchInstance,C=[],S=b.getPreviousState()||y,k=g.read({state:wc(S)})||{},x=null===h||void 0===h||null===(t=h.renderingContent)||void 0===t||null===(a=t.widgets)||void 0===a||null===(l=a.banners)||void 0===l?void 0:l[0];if(h){var E,L,T=S.page,I=void 0===T?0:T;c&&h.hits.length>0&&(h.hits=U(h.hits));var D=mi(h.hits,h.page,h.hitsPerPage),R=Si(D,h.queryID),N=u(R,{results:h}),A=!1;ic(w.mainIndex,(function(e){!A&&e.getWidgets().some((function(e){var t=e.$$type;return"ais.dynamicWidgets"===t}))&&(A=!0)}));var O=!(null!==(E=S.disjunctiveFacets)&&void 0!==E&&E.length)&&!(S.facets||[]).filter((function(e){return"*"!==e})).length&&!(null!==(L=S.hierarchicalFacets)&&void 0!==L&&L.length);void 0!==k[I]||h.__isArtificial||"idle"!==w.status||A&&O||(k[I]=N,g.write({state:wc(S),hits:k})),C=N,d=0===p(S,k)}else n=m(v),o=_(v),s=ae({instantSearchInstance:w,getIndex:function(){return v.getIndex()},widgetType:this.$$type}),r=le({getIndex:function(){return v.getIndex()},widgetType:this.$$type,instantSearchInstance:w}),d=void 0===S.page||0===p(S,k);var P=Sc(k),M=!h||h.nbPages<=f(S,k)+1;return{hits:P,items:P,currentPageHits:C,sendEvent:s,bindEvent:r,banner:x,results:h,showPrevious:n,showMore:o,isFirstPage:d,isLastPage:M,widgetParams:i}},dispose:function(e){var i=e.state;t();var n=i.setQueryParameter("page",void 0);return c?n.setQueryParameters(Object.keys(H).reduce((function(e,t){return ac(ac({},e),{},lc({},t,void 0))}),{})):n},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.page||0;return n?ac(ac({},e),{},{page:n+1}):e},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=e;c&&(n=e.setQueryParameters(H));var o=i.page?i.page-1:0;return n.setQueryParameter("page",o)}}}};var xc=Yo(kc);const Ec=xc,Lc={name:"AisInfiniteHits",mixins:[m({connector:Ec},{$$widgetType:"ais.infiniteHits"}),s({name:"InfiniteHits"})],props:{showBanner:{type:Boolean,default:!0},showPrevious:{type:Boolean,default:!1},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0},cache:{type:Object,default:void 0}},computed:{widgetParams:function(){return{showBanner:this.showBanner,showPrevious:this.showPrevious,escapeHTML:this.escapeHTML,transformItems:this.transformItems,cache:this.cache}}},methods:{refinePrevious:function(){this.state.showPrevious()},refineNext:function(){this.state.showMore()}}};var Tc=["disabled"],Ic=["href","target"],Dc=["src","alt"],Rc=["src","alt"],Nc=["onClick","onAuxclick"],Ac=["disabled"];function Oc(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[i.showPrevious?(0,l.RG)(e.$slots,"loadPrevious",{key:0,refinePrevious:s.refinePrevious,page:e.state.results.page,isFirstPage:e.state.isFirstPage},(function(){return[(0,l.Lk)("button",{class:(0,be.C4)([e.suit("loadPrevious"),e.state.isFirstPage&&e.suit("loadPrevious","disabled")]),disabled:e.state.isFirstPage,onClick:t[0]||(t[0]=function(e){return s.refinePrevious()})}," Show previous results ",10,Tc)]})):(0,l.Q3)("",!0),(0,l.RG)(e.$slots,"default",{items:e.state.items,results:e.state.results,banner:e.state.banner,isLastPage:e.state.isLastPage,refinePrevious:s.refinePrevious,refineNext:s.refineNext,refine:s.refineNext,insights:e.state.insights,sendEvent:e.state.sendEvent},(function(){return[i.showBanner&&e.state.banner&&e.state.banner.image.urls[0].url?(0,l.RG)(e.$slots,"banner",{key:0,banner:e.state.banner},(function(){return[(0,l.Lk)("aside",{class:(0,be.C4)(e.suit("banner"))},[e.state.banner.link?((0,l.uX)(),(0,l.CE)("a",{key:0,href:e.state.banner.link.url,target:e.state.banner.link.target,class:(0,be.C4)(e.suit("banner-link"))},[(0,l.Lk)("img",{src:e.state.banner.image.urls[0].url,alt:e.state.banner.image.title,class:(0,be.C4)(e.suit("banner-image"))},null,10,Dc)],10,Ic)):((0,l.uX)(),(0,l.CE)("img",{key:1,src:e.state.banner.image.urls[0].url,alt:e.state.banner.image.title,class:(0,be.C4)(e.suit("banner-image"))},null,10,Rc))],2)]})):(0,l.Q3)("",!0),(0,l.Lk)("ol",{class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t,i){return(0,l.uX)(),(0,l.CE)("li",{class:(0,be.C4)(e.suit("item")),key:t.objectID,onClick:function(i){return e.state.sendEvent("click:internal",t,"Hit Clicked")},onAuxclick:function(i){return e.state.sendEvent("click:internal",t,"Hit Clicked")}},[(0,l.RG)(e.$slots,"item",{item:t,index:i,insights:e.state.insights,sendEvent:e.state.sendEvent},(function(){return[(0,l.eW)(" objectID: "+(0,be.v_)(t.objectID)+", index: "+(0,be.v_)(i),1)]}))],42,Nc)})),128))],2),(0,l.RG)(e.$slots,"loadMore",{refineNext:s.refineNext,refine:s.refineNext,page:e.state.results.page,isLastPage:e.state.isLastPage},(function(){return[(0,l.Lk)("button",{class:(0,be.C4)([e.suit("loadMore"),e.state.isLastPage&&e.suit("loadMore","disabled")]),disabled:e.state.isLastPage,onClick:t[1]||(t[1]=function(e){return s.refineNext()})}," Show more results ",10,Ac)]}))]}))],2)):(0,l.Q3)("",!0)}Lc.render=Oc;const Pc=Lc;var Mc=["name","escapedValue","path"];function Fc(e){return Fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fc(e)}function Bc(e,t){if(null==e)return{};var i,n,o=Wc(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function Wc(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}function Hc(e,t){return $c(e)||Uc(e,t)||jc(e,t)||Vc()}function Vc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function jc(e,t){if(e){if("string"===typeof e)return zc(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zc(e,t):void 0}}function zc(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Zc()),function(i){var n,o,s,r=i||{},a=r.attribute,l=r.limit,c=void 0===l?10:l,d=r.showMore,u=void 0!==d&&d,h=r.showMoreLimit,g=void 0===h?20:h,p=r.sortBy,f=void 0===p?Xc:p,m=r.transformItems,_=void 0===m?function(e){return e}:m;if(!a)throw new Error(Zc("The `attribute` option is required."));if(!0===u&&g<=c)throw new Error(Zc("The `showMoreLimit` option must be greater than `limit`."));var v=!1,b=function(){};function y(e,t){return function(){v=!v,t.render(e)}}function w(){b()}function C(){return v?g:c}return{$$type:"ais.menu",init:function(t){var i=t.instantSearchInstance;e(Kc(Kc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(Kc(Kc({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.removeHierarchicalFacet(a).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return Kc(Kc({},e),{},{menu:Kc(Kc({},e.menu),{},Gc({},a,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,r=e.results,l=e.createURL,c=e.instantSearchInstance,d=e.helper,h=[],g=!1;if(n||(n=Qn({instantSearchInstance:c,helper:d,attribute:a,widgetType:this.$$type})),o||(o=function(e){return l((function(i){return t.getWidgetUiState(i,{searchParameters:d.state.resetPage().toggleFacetRefinement(a,e),helper:d})}))}),s||(s=function(e){var t=d.getHierarchicalFacetBreadcrumb(a),i=Hc(t,1),o=i[0];n("click:internal",e||o),d.toggleFacetRefinement(a,e||o).search()}),e.results&&(b=y(e,this)),r){var p=r.getFacetValues(a,{sortBy:f,facetOrdering:f===Xc}),m=p&&!Array.isArray(p)&&p.data?p.data:[];g=u&&(v||m.length>C()),h=_(m.slice(0,C()).map((function(e){var t=e.name,i=e.escapedValue,n=(e.path,Bc(e,Mc));return Kc(Kc({},n),{},{label:t,value:i})})),{results:r})}return{items:h,createURL:o,refine:s,sendEvent:n,canRefine:h.length>0,widgetParams:i,isShowingMore:v,toggleShowMore:w,canToggleShowMore:g}},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getHierarchicalFacetBreadcrumb(a),o=Hc(n,1),s=o[0];return ed(Kc(Kc({},e),{},{menu:Kc(Kc({},e.menu),{},Gc({},a,s))}),a)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.menu&&i.menu[a];if(e.isConjunctiveFacet(a)||e.isDisjunctiveFacet(a))return e;var o=e.removeHierarchicalFacet(a).addHierarchicalFacet({name:a,attributes:[a]}),s=o.maxValuesPerFacet||0,r=Math.max(s,u?g:c),l=o.setQueryParameter("maxValuesPerFacet",r);return n?l.addHierarchicalFacetRefinement(a,n):l.setQueryParameters({hierarchicalFacetsRefinements:Kc(Kc({},l.hierarchicalFacetsRefinements),{},Gc({},a,[]))})}}}};function ed(e,t){return e.menu?(void 0===e.menu[t]&&delete e.menu[t],0===Object.keys(e.menu).length&&delete e.menu,e):e}const td=Jc,id={name:"AisMenu",mixins:[s({name:"Menu"}),m({connector:td},{$$widgetType:"ais.menu"}),qe()],props:{attribute:{type:String,required:!0},limit:{type:Number,default:void 0},showMoreLimit:{type:Number,default:void 0},showMore:{type:Boolean,default:!1},sortBy:{type:[Array,Function],default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,transformItems:this.transformItems}},showShowMoreButton:function(){return this.state.canRefine&&this.showMore}}};var nd=["href","onClick"],od=["disabled"];function sd(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,refine:e.state.refine,createURL:e.state.createURL,toggleShowMore:e.state.toggleShowMore,sendEvent:e.state.sendEvent},(function(){return[(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t){return(0,l.uX)(),(0,l.CE)("li",{key:t.value,class:(0,be.C4)([e.suit("item"),t.isRefined&&e.suit("item","selected")])},[(0,l.Lk)("a",{href:e.state.createURL(t.value),class:(0,be.C4)(e.suit("link")),onClick:(0,Ge.D$)((function(i){return e.state.refine(t.value)}),["exact","left","prevent"])},[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("label"))},(0,be.v_)(t.label),3),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("count"))},(0,be.v_)(t.count),3)],10,nd)],2)})),128))],2),s.showShowMoreButton?((0,l.uX)(),(0,l.CE)("button",{key:0,class:(0,be.C4)([e.suit("showMore"),!e.state.canToggleShowMore&&e.suit("showMore","disabled")]),disabled:!e.state.canToggleShowMore,onClick:t[0]||(t[0]=(0,Ge.D$)((function(){for(var t,i=[],n=arguments.length;n--;)i[n]=arguments[n];return e.state.toggleShowMore&&(t=e.state).toggleShowMore.apply(t,i)}),["prevent"]))},[(0,l.RG)(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},(function(){return[(0,l.eW)((0,be.v_)(e.state.isShowingMore?"Show less":"Show more"),1)]}))],10,od)):(0,l.Q3)("",!0)]}))],2)):(0,l.Q3)("",!0)}id.render=sd;const rd=id,ad={name:"AisMenuSelect",mixins:[s({name:"MenuSelect"}),m({connector:td},{$$widgetType:"ais.menuSelect"}),qe()],props:{attribute:{type:String,required:!0},limit:{type:Number,default:10},sortBy:{type:[Array,Function],default:void 0},transformItems:{type:Function,default:function(e){return e}}},computed:{widgetParams:function(){return{attribute:this.attribute,limit:this.limit,sortBy:this.sortBy,transformItems:this.transformItems}}},methods:{refine:function(e){this.state.refine(e)}}};var ld=["value","selected"];function cd(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,refine:s.refine,createURL:e.state.createURL,sendEvent:e.state.sendEvent},(function(){return[(0,l.Lk)("select",{class:(0,be.C4)(e.suit("select")),onChange:t[0]||(t[0]=function(e){return s.refine(e.currentTarget.value)})},[(0,l.Lk)("option",{class:(0,be.C4)(e.suit("option")),value:""},[(0,l.RG)(e.$slots,"defaultOption",{},(function(){return[(0,l.eW)(" See all ")]}))],2),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t){return(0,l.uX)(),(0,l.CE)("option",{key:t.value,class:(0,be.C4)(e.suit("option")),value:t.value,selected:t.isRefined},[(0,l.RG)(e.$slots,"item",{item:t},(function(){return[(0,l.eW)((0,be.v_)(t.label)+" ("+(0,be.v_)(t.count)+") ",1)]}))],10,ld)})),128))],34)]}))],2)):(0,l.Q3)("",!0)}ad.render=cd;const dd=ad;function ud(e){return"number"===typeof e&&isFinite(e)}function hd(e){return hd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hd(e)}function gd(e,t){var i="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=md(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){a=!0,s=e},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw s}}}}function pd(e,t){return bd(e)||vd(e,t)||md(e,t)||fd()}function fd(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function md(e,t){if(e){if("string"===typeof e)return _d(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_d(e,t):void 0}}function _d(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,xd()),function(i){var n=i||{},o=n.attribute,s=void 0===o?"":o,r=n.items,a=void 0===r?[]:r,l=n.transformItems,c=void 0===l?function(e){return e}:l;if(""===s)throw new Error(xd("The `attribute` option is required."));if(!a||0===a.length)throw new Error(xd("The `items` option expects an array of objects."));var d=function(e){return a.map((function(t){var i=t.start,n=t.end,o=t.label;return{label:o,value:encodeURI(JSON.stringify({start:i,end:n})),isRefined:Id(e,s,{start:i,end:n,label:o})}}))},u={};return{$$type:Ed,init:function(t){var i=t.instantSearchInstance;e(wd(wd({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(wd(wd({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.removeNumericRefinement(s)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getNumericRefinements(s),o=n["="]&&n["="][0];if(o||0===o)return wd(wd({},e),{},{numericMenu:wd(wd({},e.numericMenu),{},Cd({},s,"".concat(n["="])))});var r=n[">="]&&n[">="][0]||"",a=n["<="]&&n["<="][0]||"";return Nd(wd(wd({},e),{},{numericMenu:wd(wd({},e.numericMenu),{},Cd({},s,"".concat(r,":").concat(a)))}),s)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.numericMenu&&i.numericMenu[s],o=e.setQueryParameters({numericRefinements:wd(wd({},e.numericRefinements),{},Cd({},s,{}))});if(!n)return o;var r=-1===n.indexOf(":");if(r)return o.addNumericRefinement(s,"=",Number(n));var a=n.split(":").map(parseFloat),l=pd(a,2),c=l[0],d=l[1],u=ud(c)?o.addNumericRefinement(s,">=",c):o,h=ud(d)?u.addNumericRefinement(s,"<=",d):u;return h},getRenderState:function(e,t){return wd(wd({},e),{},{numericMenu:wd(wd({},e.numericMenu),{},Cd({},s,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,o=e.state,r=e.instantSearchInstance,a=e.helper,l=e.createURL;u.refine||(u.refine=function(e){var t=Dd(a.state,s,e);u.sendEvent("click:internal",e),a.setState(t).search()}),u.createURL||(u.createURL=function(e){return function(i){return l((function(n){return t.getWidgetUiState(n,{searchParameters:Dd(e,s,i),helper:a})}))}}),u.sendEvent||(u.sendEvent=Ld({instantSearchInstance:r}));var h,g=!n||0===n.nbHits,p=d(o),f=!0,m=gd(p);try{for(m.s();!(h=m.n()).done;){var _=h.value;if(_.isRefined&&"{}"!==decodeURI(_.value)){f=!1;break}}}catch(e){m.e(e)}finally{m.f()}return{createURL:u.createURL(o),items:c(p,{results:n}),hasNoResults:g,canRefine:!(g&&f),refine:u.refine,sendEvent:u.sendEvent,widgetParams:i}}}}};function Id(e,t,i){var n=e.getNumericRefinements(t);return void 0!==i.start&&void 0!==i.end?i.start===i.end?Rd(n,"=",i.start):Rd(n,">=",i.start)&&Rd(n,"<=",i.end):void 0!==i.start?Rd(n,">=",i.start):void 0!==i.end?Rd(n,"<=",i.end):void 0===i.start&&void 0===i.end&&Object.keys(n).every((function(e){return 0===(n[e]||[]).length}))}function Dd(e,t,i){var n=e,o=JSON.parse(decodeURI(i)),s=n.getNumericRefinements(t);if(void 0===o.start&&void 0===o.end)return n.removeNumericRefinement(t);if(Id(n,t,o)||(n=n.removeNumericRefinement(t)),void 0!==o.start&&void 0!==o.end){if(o.start>o.end)throw new Error("option.start should be > to option.end");if(o.start===o.end)return n=Rd(s,"=",o.start)?n.removeNumericRefinement(t,"=",o.start):n.addNumericRefinement(t,"=",o.start),n}return void 0!==o.start&&(Rd(s,">=",o.start)&&(n=n.removeNumericRefinement(t,">=",o.start)),n=n.addNumericRefinement(t,">=",o.start)),void 0!==o.end&&(Rd(s,"<=",o.end)&&(n=n.removeNumericRefinement(t,"<=",o.end)),n=n.addNumericRefinement(t,"<=",o.end)),"number"===typeof n.page&&(n.page=0),n}function Rd(e,t,i){return void 0!==e[t]&&e[t].includes(i)}function Nd(e,t){return e.numericMenu?(":"===e.numericMenu[t]&&delete e.numericMenu[t],0===Object.keys(e.numericMenu).length&&delete e.numericMenu,e):e}const Ad=Td,Od={name:"AisNumericMenu",mixins:[m({connector:Ad},{$$widgetType:"ais.numericMenu"}),s({name:"NumericMenu"}),qe()],props:{attribute:{type:String,required:!0},items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,transformItems:this.transformItems,items:this.items}}}};var Pd=["name","value","checked"];function Md(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:e.state.items,canRefine:e.state.canRefine,refine:e.state.refine,createURL:e.state.createURL,sendEvent:e.state.sendEvent},(function(){return[(0,l.Lk)("ul",{class:(0,be.C4)([e.suit("list")])},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(n){return(0,l.uX)(),(0,l.CE)("li",{key:n.label,class:(0,be.C4)([e.suit("item"),n.isRefined&&e.suit("item","selected")])},[(0,l.Lk)("label",{class:(0,be.C4)(e.suit("label"))},[(0,l.Lk)("input",{type:"radio",class:(0,be.C4)(e.suit("radio")),name:i.attribute,value:n.value,checked:n.isRefined,onChange:t[0]||(t[0]=function(t){return e.state.refine(t.target.value)})},null,42,Pd),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("labelText"))},(0,be.v_)(n.label),3)],2)],2)})),128))],2)]}))],2)):(0,l.Q3)("",!0)}Od.render=Md;const Fd=Od;function Bd(e){return jd(e)||Vd(e)||Hd(e)||Wd()}function Wd(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hd(e,t){if(e){if("string"===typeof e)return zd(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zd(e,t):void 0}}function Vd(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function jd(e){if(Array.isArray(e))return zd(e)}function zd(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i=i-t?n-(i-e):t}},{key:"isLastPage",value:function(){return this.currentPage>=this.total-1}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}]),e}();const Jd=Xd;function eu(e){return eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eu(e)}function tu(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function iu(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,ru()),function(i){var n=i||{},o=n.totalPages,s=n.padding,r=void 0===s?3:s,a=new Jd({currentPage:0,total:0,padding:r}),l={};function c(e){var t=e.nbPages;return void 0!==o?Math.min(o,t):t}return{$$type:"ais.pagination",init:function(t){var i=t.instantSearchInstance;e(iu(iu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(iu(iu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.page||0;return n?iu(iu({},e),{},{page:n+1}):e},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.page?i.page-1:0;return e.setQueryParameter("page",n)},getWidgetRenderState:function(e){var t=e.results,n=e.helper,o=e.state,s=e.createURL;l.refine||(l.refine=function(e){n.setPage(e),n.search()}),l.createURL||(l.createURL=function(e){return s((function(t){return iu(iu({},t),{},{page:e+1})}))});var r=o.page||0,d=c(t||{nbPages:0});return a.currentPage=r,a.total=d,{createURL:l.createURL,refine:l.refine,canRefine:d>1,currentRefinement:r,nbHits:(null===t||void 0===t?void 0:t.nbHits)||0,nbPages:d,pages:t?a.pages():[],isFirstPage:a.isFirstPage(),isLastPage:a.isLastPage(),widgetParams:i}},getRenderState:function(e,t){return iu(iu({},e),{},{pagination:this.getWidgetRenderState(t)})}}}};const lu=au,cu={name:"AisPagination",mixins:[s({name:"Pagination"}),m({connector:lu},{$$widgetType:"ais.pagination"}),qe()],props:{padding:{type:Number,default:void 0,validator:function(e){return e>0}},totalPages:{type:Number,default:void 0,validator:function(e){return e>0}},showFirst:{type:Boolean,default:!0},showLast:{type:Boolean,default:!0},showNext:{type:Boolean,default:!0},showPrevious:{type:Boolean,default:!0}},computed:{widgetParams:function(){return{padding:this.padding,totalPages:this.totalPages}}},emits:["page-change"],methods:{refine:function(e){var t=Math.min(Math.max(e,0),this.state.nbPages-1);this.state.refine(t),this.$emit("page-change",t)}}};var du=["href"],uu=["href"],hu=["href","aria-label","onClick"],gu=["href"],pu=["aria-label","href"],fu=["aria-label"];function mu(e,t,i,n,o,s){var r;return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)((r={},r[e.suit()]=!0,r[e.suit("","noRefinement")]=e.state.nbPages<=1,r))},[(0,l.RG)(e.$slots,"default",{refine:s.refine,createURL:e.state.createURL,currentRefinement:e.state.currentRefinement,nbHits:e.state.nbHits,nbPages:e.state.nbPages,pages:e.state.pages,isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage},(function(){var n,o,r,a;return[(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[i.showFirst?((0,l.uX)(),(0,l.CE)("li",{key:0,class:(0,be.C4)((n={},n[e.suit("item")]=!0,n[e.suit("item","disabled")]=e.state.isFirstPage,n[e.suit("item","firstPage")]=!0,n))},[(0,l.RG)(e.$slots,"first",{createURL:function(){return e.state.createURL(0)},isFirstPage:e.state.isFirstPage,refine:function(){return s.refine(0)}},(function(){return[e.state.isFirstPage?((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("link")),"aria-label":"First Page"},"‹‹",2)):((0,l.uX)(),(0,l.CE)("a",{key:0,class:(0,be.C4)(e.suit("link")),"aria-label":"First Page",href:e.state.createURL(0),onClick:t[0]||(t[0]=(0,Ge.D$)((function(e){return s.refine(0)}),["exact","left","prevent"]))},"‹‹",10,du))]}))],2)):(0,l.Q3)("",!0),i.showPrevious?((0,l.uX)(),(0,l.CE)("li",{key:1,class:(0,be.C4)((o={},o[e.suit("item")]=!0,o[e.suit("item","disabled")]=e.state.isFirstPage,o[e.suit("item","previousPage")]=!0,o))},[(0,l.RG)(e.$slots,"previous",{createURL:function(){return e.state.createURL(e.state.currentRefinement-1)},isFirstPage:e.state.isFirstPage,refine:function(){return s.refine(e.state.currentRefinement-1)}},(function(){return[e.state.isFirstPage?((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("link")),"aria-label":"Previous Page"},"‹",2)):((0,l.uX)(),(0,l.CE)("a",{key:0,class:(0,be.C4)(e.suit("link")),"aria-label":"Previous Page",href:e.state.createURL(e.state.currentRefinement-1),onClick:t[1]||(t[1]=(0,Ge.D$)((function(t){return s.refine(e.state.currentRefinement-1)}),["exact","left","prevent"]))},"‹",10,uu))]}))],2)):(0,l.Q3)("",!0),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.pages,(function(t){var i;return(0,l.uX)(),(0,l.CE)("li",{class:(0,be.C4)((i={},i[e.suit("item")]=!0,i[e.suit("item","page")]=!0,i[e.suit("item","selected")]=e.state.currentRefinement===t,i)),key:t},[(0,l.RG)(e.$slots,"item",{page:t,createURL:function(){return e.state.createURL(t)},isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage,refine:function(){return s.refine(t)}},(function(){return[(0,l.Lk)("a",{class:(0,be.C4)(e.suit("link")),href:e.state.createURL(t),"aria-label":"Page "+(t+1),onClick:(0,Ge.D$)((function(e){return s.refine(t)}),["exact","left","prevent"])},(0,be.v_)(t+1),11,hu)]}))],2)})),128)),i.showNext?((0,l.uX)(),(0,l.CE)("li",{key:2,class:(0,be.C4)((r={},r[e.suit("item")]=!0,r[e.suit("item","disabled")]=e.state.isLastPage,r[e.suit("item","nextPage")]=!0,r))},[(0,l.RG)(e.$slots,"next",{createURL:function(){return e.state.createURL(e.state.currentRefinement+1)},isLastPage:e.state.isLastPage,refine:function(){return s.refine(e.state.currentRefinement+1)}},(function(){return[e.state.isLastPage?((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("link")),"aria-label":"Next Page"},"›",2)):((0,l.uX)(),(0,l.CE)("a",{key:0,class:(0,be.C4)(e.suit("link")),"aria-label":"Next Page",href:e.state.createURL(e.state.currentRefinement+1),onClick:t[2]||(t[2]=(0,Ge.D$)((function(t){return s.refine(e.state.currentRefinement+1)}),["exact","left","prevent"]))},"›",10,gu))]}))],2)):(0,l.Q3)("",!0),i.showLast?((0,l.uX)(),(0,l.CE)("li",{key:3,class:(0,be.C4)((a={},a[e.suit("item")]=!0,a[e.suit("item","disabled")]=e.state.isLastPage,a[e.suit("item","lastPage")]=!0,a))},[(0,l.RG)(e.$slots,"last",{createURL:function(){return e.state.createURL(e.state.nbPages-1)},isLastPage:e.state.isLastPage,refine:function(){return s.refine(e.state.nbPages-1)}},(function(){return[e.state.isLastPage?((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("link")),"aria-label":"Last Page, Page "+e.state.nbPages}," ›› ",10,fu)):((0,l.uX)(),(0,l.CE)("a",{key:0,class:(0,be.C4)(e.suit("link")),"aria-label":"Last Page, Page "+e.state.nbPages,href:e.state.createURL(e.state.nbPages-1),onClick:t[3]||(t[3]=(0,Ge.D$)((function(t){return s.refine(e.state.nbPages-1)}),["exact","left","prevent"]))},"››",10,pu))]}))],2)):(0,l.Q3)("",!0)],2)]}))],2)):(0,l.Q3)("",!0)}cu.render=mu;const _u=cu,vu={name:"AisPanel",mixins:[s({name:"Panel"}),$e()],methods:{getSlot:function(e){return this.$slots[e]}}};function bu(e,t,i,n,o,s){return(0,l.uX)(),(0,l.CE)("div",{class:(0,be.C4)([e.suit(),!e.canRefine&&e.suit("","noRefinement")])},[s.getSlot("header")?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit("header"))},[(0,l.RG)(e.$slots,"header",{hasRefinements:e.canRefine})],2)):(0,l.Q3)("",!0),(0,l.Lk)("div",{class:(0,be.C4)(e.suit("body"))},[(0,l.RG)(e.$slots,"default",{hasRefinements:e.canRefine})],2),s.getSlot("footer")?((0,l.uX)(),(0,l.CE)("div",{key:1,class:(0,be.C4)(e.suit("footer"))},[(0,l.RG)(e.$slots,"footer",{hasRefinements:e.canRefine})],2)):(0,l.Q3)("",!0)],2)}vu.render=bu;const yu=vu,wu={name:"AisPoweredBy",mixins:[s({name:"PoweredBy"})],props:{theme:{default:"light",validator:function(e){return-1!==["light","dark"].indexOf(e)}}},computed:{algoliaUrl:function(){return"https://www.algolia.com/?utm_source=vue-instantsearch&utm_medium=website&utm_content="+(location?location.hostname:"")+"&utm_campaign=poweredby"}}};var Cu=["href"],Su=["fill"],ku=["fill"];function xu(e,t,i,n,o,s){return(0,l.uX)(),(0,l.CE)("div",{class:(0,be.C4)([e.suit(),e.suit("",i.theme)])},[(0,l.Lk)("a",{class:(0,be.C4)(e.suit("link")),href:s.algoliaUrl,target:"_blank",rel:"noopener","aria-label":"search by Algolia"},[((0,l.uX)(),(0,l.CE)("svg",{style:{height:"1.2em",width:"auto"},class:(0,be.C4)([e.suit("logo"),e.suit("",i.theme)]),viewBox:"0 0 572 64"},[(0,l.Lk)("path",{fill:"dark"===i.theme?"#FFF":"#36395A",d:"M16 48.3c-3.4 0-6.3-.6-8.7-1.7A12.4 12.4 0 0 1 1.9 42C.6 40 0 38 0 35.4h6.5a6.7 6.7 0 0 0 3.9 6c1.4.7 3.3 1.1 5.6 1.1 2.2 0 4-.3 5.4-1a7 7 0 0 0 3-2.4 6 6 0 0 0 1-3.4c0-1.5-.6-2.8-1.9-3.7-1.3-1-3.3-1.6-5.9-1.8l-4-.4c-3.7-.3-6.6-1.4-8.8-3.4a10 10 0 0 1-3.3-7.9c0-2.4.6-4.6 1.8-6.4a12 12 0 0 1 5-4.3c2.2-1 4.7-1.6 7.5-1.6s5.5.5 7.6 1.6a12 12 0 0 1 5 4.4c1.2 1.8 1.8 4 1.8 6.7h-6.5a6.4 6.4 0 0 0-3.5-5.9c-1-.6-2.6-1-4.4-1s-3.2.3-4.4 1c-1.1.6-2 1.4-2.6 2.4-.5 1-.8 2-.8 3.1a5 5 0 0 0 1.5 3.6c1 1 2.6 1.7 4.7 1.9l4 .3c2.8.2 5.2.8 7.2 1.8 2.1 1 3.7 2.2 4.9 3.8a9.7 9.7 0 0 1 1.7 5.8c0 2.5-.7 4.7-2 6.6a13 13 0 0 1-5.6 4.4c-2.4 1-5.2 1.6-8.4 1.6Zm35.6 0c-2.6 0-4.8-.4-6.7-1.3a13 13 0 0 1-4.7-3.5 17.1 17.1 0 0 1-3.6-10.4v-1c0-2 .3-3.8 1-5.6a13 13 0 0 1 7.3-8.3 15 15 0 0 1 6.3-1.4A13.2 13.2 0 0 1 64 24.3c1 2.2 1.6 4.6 1.6 7.2V34H39.4v-4.3h21.8l-1.8 2.2c0-2-.3-3.7-.9-5.1a7.3 7.3 0 0 0-2.7-3.4c-1.2-.7-2.7-1.1-4.6-1.1s-3.4.4-4.7 1.3a8 8 0 0 0-2.9 3.6c-.6 1.5-.9 3.3-.9 5.4 0 2 .3 3.7 1 5.3a7.9 7.9 0 0 0 2.8 3.7c1.3.8 3 1.3 5 1.3s3.8-.5 5.1-1.3c1.3-1 2.1-2 2.4-3.2h6a11.8 11.8 0 0 1-7 8.7 16 16 0 0 1-6.4 1.2ZM80 48c-2.2 0-4-.3-5.7-1a8.4 8.4 0 0 1-3.7-3.3 9.7 9.7 0 0 1-1.3-5.2c0-2 .5-3.8 1.5-5.2a9 9 0 0 1 4.3-3.1c1.8-.7 4-1 6.7-1H89v4.1h-7.5c-2 0-3.4.5-4.4 1.4-1 1-1.6 2.1-1.6 3.6s.5 2.7 1.6 3.6c1 1 2.5 1.4 4.4 1.4 1.1 0 2.2-.2 3.2-.7 1-.4 1.9-1 2.6-2 .6-1 1-2.4 1-4.2l1.7 2.1c-.2 2-.7 3.8-1.5 5.2a9 9 0 0 1-3.4 3.3 12 12 0 0 1-5.3 1Zm9.5-.7v-8.8h-1v-10c0-1.8-.5-3.2-1.4-4.1-1-1-2.4-1.4-4.2-1.4a142.9 142.9 0 0 0-10.2.4v-5.6a74.8 74.8 0 0 1 8.6-.4c3 0 5.5.4 7.5 1.2s3.4 2 4.4 3.6c1 1.7 1.4 4 1.4 6.7v18.4h-5Zm12.9 0V17.8h5v12.3h-.2c0-4.2 1-7.4 2.8-9.5a11 11 0 0 1 8.3-3.1h1v5.6h-2a9 9 0 0 0-6.3 2.2c-1.5 1.5-2.2 3.6-2.2 6.4v15.6h-6.4Zm34.4 1a15 15 0 0 1-6.6-1.3c-1.9-.9-3.4-2-4.7-3.5a15.5 15.5 0 0 1-2.7-5c-.6-1.7-1-3.6-1-5.4v-1c0-2 .4-3.8 1-5.6a15 15 0 0 1 2.8-4.9c1.3-1.5 2.8-2.6 4.6-3.5a16.4 16.4 0 0 1 13.3.2c2 1 3.5 2.3 4.8 4a12 12 0 0 1 2 6H144c-.2-1.6-1-3-2.2-4.1a7.5 7.5 0 0 0-5.2-1.7 8 8 0 0 0-4.7 1.3 8 8 0 0 0-2.8 3.6 13.8 13.8 0 0 0 0 10.3c.6 1.5 1.5 2.7 2.8 3.6s2.8 1.3 4.8 1.3c1.5 0 2.7-.2 3.8-.8a7 7 0 0 0 2.6-2c.7-1 1-2 1.2-3.2h6.2a11 11 0 0 1-2 6.2 15.1 15.1 0 0 1-11.8 5.5Zm19.7-1v-40h6.4V31h-1.3c0-3 .4-5.5 1.1-7.6a9.7 9.7 0 0 1 3.5-4.8A9.9 9.9 0 0 1 172 17h.3c3.5 0 6 1.1 7.9 3.5 1.7 2.3 2.6 5.7 2.6 10v16.8h-6.4V29.6c0-2.1-.6-3.8-1.8-5a6.4 6.4 0 0 0-4.8-1.8c-2 0-3.7.7-5 2a7.8 7.8 0 0 0-1.9 5.5v17h-6.4Zm63.8 1a12.2 12.2 0 0 1-10.9-6.2 19 19 0 0 1-1.8-7.3h1.4v12.5h-5.1v-40h6.4v19.8l-2 3.5c.2-3.1.8-5.7 1.9-7.7a11 11 0 0 1 4.4-4.5c1.8-1 3.9-1.5 6.1-1.5a13.4 13.4 0 0 1 12.8 9.1c.7 1.9 1 3.8 1 6v1c0 2.2-.3 4.1-1 6a13.6 13.6 0 0 1-13.2 9.4Zm-1.2-5.5a8.4 8.4 0 0 0 7.9-5c.7-1.5 1.1-3.3 1.1-5.3s-.4-3.8-1.1-5.3a8.7 8.7 0 0 0-3.2-3.6 9.6 9.6 0 0 0-9.2-.2 8.5 8.5 0 0 0-3.3 3.2c-.8 1.4-1.3 3-1.3 5v2.3a9 9 0 0 0 1.3 4.8 9 9 0 0 0 3.4 3c1.4.7 2.8 1 4.4 1Zm27.3 3.9-10-28.9h6.5l9.5 28.9h-6Zm-7.5 12.2v-5.7h4.9c1 0 2-.1 2.9-.4a4 4 0 0 0 2-1.4c.4-.7.9-1.6 1.2-2.7l8.6-30.9h6.2l-9.3 32.4a14 14 0 0 1-2.5 5 8.9 8.9 0 0 1-4 2.8c-1.5.6-3.4.9-5.6.9h-4.4Zm9-12.2v-5.2h6.4v5.2H248Z"},null,8,Su),(0,l.Lk)("path",{fill:"dark"===i.theme?"#FFF":"#003DFF",d:"M534.4 9.1H528a.8.8 0 0 1-.7-.7V1.8c0-.4.2-.7.6-.8l6.5-1c.4 0 .8.2.9.6v7.8c0 .4-.4.7-.8.7zM428 35.2V.8c0-.5-.3-.8-.7-.8h-.2l-6.4 1c-.4 0-.7.4-.7.8v35c0 1.6 0 11.8 12.3 12.2.5 0 .8-.4.8-.8V43c0-.4-.3-.7-.6-.8-4.5-.5-4.5-6-4.5-7zm106.5-21.8H528c-.4 0-.7.4-.7.8v34c0 .4.3.8.7.8h6.5c.4 0 .8-.4.8-.8v-34c0-.5-.4-.8-.8-.8zm-17.7 21.8V.8c0-.5-.3-.8-.8-.8l-6.5 1c-.4 0-.7.4-.7.8v35c0 1.6 0 11.8 12.3 12.2.4 0 .8-.4.8-.8V43c0-.4-.3-.7-.7-.8-4.4-.5-4.4-6-4.4-7zm-22.2-20.6a16.5 16.5 0 0 1 8.6 9.3c.8 2.2 1.3 4.8 1.3 7.5a19.4 19.4 0 0 1-4.6 12.6 14.8 14.8 0 0 1-5.2 3.6c-2 .9-5.2 1.4-6.8 1.4a21 21 0 0 1-6.7-1.4 15.4 15.4 0 0 1-8.6-9.3 21.3 21.3 0 0 1 0-14.4 15.2 15.2 0 0 1 8.6-9.3c2-.8 4.3-1.2 6.7-1.2s4.6.4 6.7 1.2zm-6.7 27.6c2.7 0 4.7-1 6.2-3s2.2-4.3 2.2-7.8-.7-6.3-2.2-8.3-3.5-3-6.2-3-4.7 1-6.1 3c-1.5 2-2.2 4.8-2.2 8.3s.7 5.8 2.2 7.8 3.5 3 6.2 3zm-88.8-28.8c-6.2 0-11.7 3.3-14.8 8.2a18.6 18.6 0 0 0 4.8 25.2c1.8 1.2 4 1.8 6.2 1.7s.1 0 .1 0h.9c4.2-.7 8-4 9.1-8.1v7.4c0 .4.3.7.8.7h6.4a.7.7 0 0 0 .7-.7V14.2c0-.5-.3-.8-.7-.8h-13.5zm6.3 26.5a9.8 9.8 0 0 1-5.7 2h-.5a10 10 0 0 1-9.2-14c1.4-3.7 5-6.3 9-6.3h6.4v18.3zm152.3-26.5h13.5c.5 0 .8.3.8.7v33.7c0 .4-.3.7-.8.7h-6.4a.7.7 0 0 1-.8-.7v-7.4c-1.2 4-4.8 7.4-9 8h-.1a4.2 4.2 0 0 1-.5.1h-.9a10.3 10.3 0 0 1-7-2.6c-4-3.3-6.5-8.4-6.5-14.2 0-3.7 1-7.2 3-10 3-5 8.5-8.3 14.7-8.3zm.6 28.4c2.2-.1 4.2-.6 5.7-2V21.7h-6.3a9.8 9.8 0 0 0-9 6.4 10.2 10.2 0 0 0 9.1 13.9h.5zM452.8 13.4c-6.2 0-11.7 3.3-14.8 8.2a18.5 18.5 0 0 0 3.6 24.3 10.4 10.4 0 0 0 13 .6c2.2-1.5 3.8-3.7 4.5-6.1v7.8c0 2.8-.8 5-2.2 6.3-1.5 1.5-4 2.2-7.5 2.2l-6-.3c-.3 0-.7.2-.8.5l-1.6 5.5c-.1.4.1.8.5 1h.1c2.8.4 5.5.6 7 .6 6.3 0 11-1.4 14-4.1 2.7-2.5 4.2-6.3 4.5-11.4V14.2c0-.5-.4-.8-.8-.8h-13.5zm6.3 8.2v18.3a9.6 9.6 0 0 1-5.6 2h-1a10.3 10.3 0 0 1-8.8-14c1.4-3.7 5-6.3 9-6.3h6.4zM291 31.5A32 32 0 0 1 322.8 0h30.8c.6 0 1.2.5 1.2 1.2v61.5c0 1.1-1.3 1.7-2.2 1l-19.2-17a18 18 0 0 1-11 3.4 18.1 18.1 0 1 1 18.2-14.8c-.1.4-.5.7-.9.6-.1 0-.3 0-.4-.2l-3.8-3.4c-.4-.3-.6-.8-.7-1.4a12 12 0 1 0-2.4 8.3c.4-.4 1-.5 1.6-.2l14.7 13.1v-46H323a26 26 0 1 0 10 49.7c.8-.4 1.6-.2 2.3.3l3 2.7c.3.2.3.7 0 1l-.2.2a32 32 0 0 1-47.2-28.6z"},null,8,ku)],2))],10,Cu)],2)}wu.render=xu;const Eu=wu;function Lu(e){return Lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lu(e)}function Tu(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Iu(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i0)}))}function Vu(e){return e.replace(/[^a-z0-9-_]+/gi,"_")}function ju(e){var t=e.helper,i=e.sharedHelperState,n=e.trackedFilters,o=Object.keys(n).reduce((function(e,o){var s=Tt(t.lastResults||{},i,!0).filter((function(e){return e.attribute===o})).map((function(e){return e.numericValue||e.name})),r=n[o],a=r(s);return[].concat(Au(e),Au(s.filter((function(e){return a.includes(e)})).map((function(e){return Vu("ais-".concat(o,"-").concat(e))}))))}),[]);return o}function zu(e){var t=this.helper,i=this.initialRuleContexts,n=this.trackedFilters,o=this.transformRuleContexts,s=e.state,r=s.ruleContexts||[],a=ju({helper:t,sharedHelperState:s,trackedFilters:n}),l=[].concat(Au(i),Au(a)),c=o(l).slice(0,10);Wr(r,c)||t.overrideStateWithoutTriggeringChangeEvent(Iu(Iu({},s),{},{ruleContexts:c}))}var Uu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Wu()),function(i){var n=i||{},o=n.trackedFilters,s=void 0===o?{}:o,r=n.transformRuleContexts,a=void 0===r?function(e){return e}:r,l=n.transformItems,c=void 0===l?function(e){return e}:l;Object.keys(s).forEach((function(e){if("function"!==typeof s[e])throw new Error(Wu("'The \"".concat(e,'" filter value in the `trackedFilters` option expects a function.')))}));var d,u=Object.keys(s).length>0,h=[];return{$$type:"ais.queryRules",init:function(t){var n=t.helper,o=t.state,r=t.instantSearchInstance;h=o.ruleContexts||[],d=zu.bind({helper:n,initialRuleContexts:h,trackedFilters:s,transformRuleContexts:a}),u&&((Hu(o)||Boolean(i.transformRuleContexts))&&d({state:o}),n.on("change",d)),e(Iu(Iu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var i=t.instantSearchInstance;e(Iu(Iu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},getWidgetRenderState:function(e){var t=e.results,n=t||{},o=n.userData,s=void 0===o?[]:o,r=c(s,{results:t});return{items:r,widgetParams:i}},getRenderState:function(e,t){return Iu(Iu({},e),{},{queryRules:this.getWidgetRenderState(t)})},dispose:function(e){var i=e.helper,n=e.state;return t(),u?(i.removeListener("change",d),n.setQueryParameter("ruleContexts",h)):n}}}};const $u=Uu,qu={name:"AisQueryRuleContext",mixins:[s({name:"QueryRuleContext"}),m({connector:$u},{$$widgetType:"ais.queryRuleContext"})],props:{trackedFilters:{type:Object,required:!0},transformRuleContexts:{type:Function,required:!1,default:void 0}},computed:{widgetParams:function(){return{trackedFilters:this.trackedFilters,transformRuleContexts:this.transformRuleContexts}}},render:function(){return null}},Ku={name:"AisQueryRuleCustomData",mixins:[s({name:"QueryRuleCustomData"}),m({connector:$u},{$$widgetType:"ais.queryRuleCustomData"})],props:{transformItems:{type:Function,required:!1,default:void 0}},computed:{widgetParams:function(){return{transformItems:this.transformItems}}}};function Gu(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{items:e.state.items},(function(){return[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t,i){return(0,l.uX)(),(0,l.CE)("div",{key:i},[(0,l.RG)(e.$slots,"item",{item:t},(function(){return[(0,l.Lk)("pre",null,(0,be.v_)(t),1)]}))])})),128))]}))],2)):(0,l.Q3)("",!0)}Ku.render=Gu;const Qu=Ku;function Yu(e){return Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yu(e)}function Zu(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Xu(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,lh()),function(i){var n=i||{},o=n.attribute,s=void 0===o?"":o,r=n.min,a=n.max,l=n.precision,c=void 0===l?0:l;if(!s)throw new Error(lh("The `attribute` option is required."));if(ud(r)&&ud(a)&&r>a)throw new Error(lh("The `max` option can't be lower than `min`."));var d=function(e){return Number(Number(e).toFixed(c))},u={from:function(e){return e.toLocaleString()},to:function(e){return d(e).toLocaleString()}},h=function(e,t,i,n){var o,l,d=e.state,u=t.min,h=t.max,g=d.getNumericRefinement(s,">=")||[],p=ih(g,1),f=p[0],m=d.getNumericRefinement(s,"<=")||[],_=ih(m,1),v=_[0],b=void 0===i||""===i,y=void 0===n||""===n,w=dh({min:b?void 0:parseFloat(i),max:y?void 0:parseFloat(n),precision:c}),C=w.min,S=w.max;o=ud(r)||u!==C?ud(r)&&b?r:C:void 0,l=ud(a)||h!==S?ud(a)&&y?a:S:void 0;var k=void 0===o,x=ud(u)&&u<=o,E=k||ud(o)&&(!ud(u)||x),L=void 0===l,T=ud(l)&&h>=l,I=L||ud(l)&&(!ud(h)||T),D=f!==o,R=v!==l;return(D||R)&&E&&I?(d=d.removeNumericRefinement(s),ud(o)&&(d=d.addNumericRefinement(s,">=",o)),ud(l)&&(d=d.addNumericRefinement(s,"<=",l)),d.resetPage()):null},g=function(e){return function(){1!==arguments.length||e.sendEventToInsights(arguments.length<=0?void 0:arguments[0])}};function p(e){var t,i;return t=ud(r)?r:ud(e.min)?e.min:0,i=ud(a)?a:ud(e.max)?e.max:0,dh({min:t,max:i,precision:c})}function f(e){var t=e.getNumericRefinement(s,">=")||[],i=ih(t,1),n=i[0],o=e.getNumericRefinement(s,"<=")||[],r=ih(o,1),a=r[0],l=ud(n)?n:-1/0,c=ud(a)?a:1/0;return[l,c]}function m(e,t){return function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[void 0,void 0],n=ih(i,2),o=n[0],s=n[1],r=h(e,t,o,s);r&&e.setState(r).search()}}return{$$type:ch,init:function(t){e(Xu(Xu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(Xu(Xu({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return Xu(Xu({},e),{},{range:Xu(Xu({},e.range),{},Ju({},s,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,n=e.results,o=e.helper,r=e.instantSearchInstance,a=n&&n.disjunctiveFacets||[],l=Et(a,(function(e){return e.name===s})),d=l&&l.stats||{min:void 0,max:void 0},h=p(d),_=f(o);return t=m(o,n?h:{min:void 0,max:void 0}),{refine:t,canRefine:h.min!==h.max,format:u,range:h,sendEvent:g(r),widgetParams:Xu(Xu({},i),{},{precision:c}),start:_}},dispose:function(e){var i=e.state;return t(),i.removeDisjunctiveFacet(s).removeNumericRefinement(s)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.getNumericRefinements(s),o=n[">="],r=void 0===o?[]:o,a=n["<="],l=void 0===a?[]:a;return 0===r.length&&0===l.length?e:Xu(Xu({},e),{},{range:Xu(Xu({},e.range),{},Ju({},s,"".concat(r,":").concat(l)))})},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=e.addDisjunctiveFacet(s).setQueryParameters({numericRefinements:Xu(Xu({},e.numericRefinements),{},Ju({},s,{}))});ud(r)&&(n=n.addNumericRefinement(s,">=",r)),ud(a)&&(n=n.addNumericRefinement(s,"<=",a));var o=i.range&&i.range[s];if(!o||-1===o.indexOf(":"))return n;var l=o.split(":").map(parseFloat),c=ih(l,2),d=c[0],u=c[1];return ud(d)&&(!ud(r)||r="),n=n.addNumericRefinement(s,">=",d)),ud(u)&&(!ud(a)||ue.length)&&(t=e.length);for(var i=0,n=new Array(t);i=").concat(a)]},attribute:o})}}else t.sendEventToInsights(s[0])}},Bh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Oh()),function(i){var n,o=i||{},s=o.attribute,r=o.max,a=void 0===r?5:r;if(!s)throw new Error(Oh("The `attribute` option is required."));var l=function(e){var t,i=e.getNumericRefinements(s);if(null!==(t=i[">="])&&void 0!==t&&t.length)return i[">="][0]},c=function(e){var t=0;return e.forEach((function(e){var i=e.name.split("."),n=Th(i,2),o=n[1],s=void 0===o?"":o;t=Math.max(t,s.length)})),t};function d(e,t){var i=l(e)===Number(t),n=e.resetPage().removeNumericRefinement(s);return i?n:n.addNumericRefinement(s,"<=",a).addNumericRefinement(s,">=",Number(t))}var u=function(e,t){n("click:internal",t),e.setState(d(e.state,t)).search()},h={toggleRefinementFactory:function(e){return u.bind(null,e)},createURLFactory:function(e){var t=e.state,i=e.createURL,n=e.getWidgetUiState,o=e.helper;return function(e){return i((function(i){return n(i,{searchParameters:d(t,e),helper:o})}))}}};return{$$type:Ph,init:function(t){var i=t.instantSearchInstance;e(kh(kh({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(kh(kh({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},getRenderState:function(e,t){return kh(kh({},e),{},{ratingMenu:kh(kh({},e.ratingMenu),{},xh({},s,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.helper,o=e.results,r=e.state,d=e.instantSearchInstance,u=e.createURL,g=[];n||(n=Fh({instantSearchInstance:d,helper:t,getRefinedStar:function(){return l(t.state)},attribute:s}));var p=!1,f=0,m=null===o||void 0===o?void 0:o.getFacetValues(s,{});if(o&&m){m.length;for(var _=c(m),v=(Math.pow(10,_),l(r)),b=function(e){var t=v===e;p=p||t;var i=m.filter((function(t){return Number(t.name)>=e&&Number(t.name)<=a})).map((function(e){return e.count})).reduce((function(e,t){return e+t}),0);if(f+=i,v&&!t&&0===i)return"continue";var n=bh(new Array(Math.floor(a/Mh))).map((function(t,i){return i*Mh0,refine:h.toggleRefinementFactory(t),sendEvent:n,createURL:h.createURLFactory({state:r,createURL:u,helper:t,getWidgetUiState:this.getWidgetUiState}),widgetParams:i}},dispose:function(e){var i=e.state;return t(),i.removeNumericRefinement(s)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=l(i);return Wh(kh(kh({},e),{},{ratingMenu:kh(kh({},e.ratingMenu),{},xh({},s,"number"===typeof n?n:void 0))}),s)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n=i.ratingMenu&&i.ratingMenu[s],o=e.addDisjunctiveFacet(s).removeNumericRefinement(s).removeDisjunctiveFacetRefinement(s);return n?o.addNumericRefinement(s,"<=",a).addNumericRefinement(s,">=",n):o.setQueryParameters({numericRefinements:kh(kh({},o.numericRefinements),{},xh({},s,{}))})}}}};function Wh(e,t){return e.ratingMenu?("number"!==typeof e.ratingMenu[t]&&delete e.ratingMenu[t],0===Object.keys(e.ratingMenu).length&&delete e.ratingMenu,e):e}const Hh=Bh,Vh={name:"AisRatingMenu",mixins:[s({name:"RatingMenu"}),m({connector:Hh},{$$widgetType:"ais.ratingMenu"}),qe()],props:{attribute:{type:String,required:!0},max:{type:Number,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,max:this.max}}}};var jh={style:{display:"none"}},zh=[(0,l.Lk)("symbol",{id:"ais-RatingMenu-starSymbol",viewBox:"0 0 24 24"},[(0,l.Lk)("path",{d:"M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"})],-1),(0,l.Lk)("symbol",{id:"ais-RatingMenu-starEmptySymbol",viewBox:"0 0 24 24"},[(0,l.Lk)("path",{d:"M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"})],-1)],Uh=["href","aria-label","onClick"],$h=[(0,l.Lk)("use",{"xlink:href":"#ais-RatingMenu-starSymbol"},null,-1)],qh=[(0,l.Lk)("use",{"xlink:href":"#ais-RatingMenu-starEmptySymbol"},null,-1)];function Kh(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{items:e.state.items,refine:e.state.refine,createURL:e.state.createURL,sendEvent:e.state.sendEvent,canRefine:e.state.canRefine},(function(){return[((0,l.uX)(),(0,l.CE)("svg",jh,zh)),(0,l.Lk)("ul",{class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.items,(function(t,i){return(0,l.uX)(),(0,l.CE)("li",{key:i,class:(0,be.C4)([e.suit("item"),t.isRefined&&e.suit("item","selected")])},[(0,l.Lk)("div",null,[(0,l.Lk)("a",{href:e.state.createURL(t.value),"aria-label":t.value+" & up",class:(0,be.C4)(e.suit("link")),onClick:(0,Ge.D$)((function(i){return e.state.refine(t.value)}),["exact","left","prevent"])},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(t.stars,(function(t,i){return(0,l.uX)(),(0,l.CE)(l.FK,null,[t?((0,l.uX)(),(0,l.CE)("svg",{"aria-hidden":"true",width:"24",height:"24",class:(0,be.C4)([e.suit("starIcon"),e.suit("starIcon--full")]),key:i+"-full"},$h,2)):((0,l.uX)(),(0,l.CE)("svg",{class:(0,be.C4)([e.suit("starIcon"),e.suit("starIcon--empty")]),"aria-hidden":"true",width:"24",height:"24",key:i+"-empty"},qh,2))],64)})),256)),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("label")),"aria-hidden":"true"},[(0,l.RG)(e.$slots,"andUp",{},(function(){return[(0,l.eW)("& Up")]}))],2),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("count"))},(0,be.v_)(t.count),3)],10,Uh)])],2)})),128))],2)]}))],2)):(0,l.Q3)("",!0)}Vh.render=Kh;const Gh=Vh;function Qh(e){return Qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qh(e)}var Yh=["name","escapedValue"],Zh=["escapedValue","value"];function Xh(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Jh(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function og(e,t){if(null==e)return{};var i,n,o={},s=Object.keys(e);for(n=0;n=0||(o[i]=e[i]);return o}var sg=(0,_.V)({name:"refinement-list",connector:!0}),rg=["isRefined","count:desc","name:asc"],ag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,sg()),function(i){var n=i||{},o=n.attribute,s=n.operator,r=void 0===s?"or":s,a=n.limit,l=void 0===a?10:a,c=n.showMore,d=void 0!==c&&c,u=n.showMoreLimit,h=void 0===u?20:u,g=n.sortBy,p=void 0===g?rg:g,f=n.escapeFacetValues,m=void 0===f||f,_=n.transformItems,v=void 0===_?function(e){return e}:_;if(!o)throw new Error(sg("The `attribute` option is required."));if(!/^(and|or)$/.test(r))throw new Error(sg('The `operator` must one of: `"and"`, `"or"` (got "'.concat(r,'").')));if(!0===d&&h<=l)throw new Error(sg("`showMoreLimit` should be greater than `limit`."));var b,y,w,C=function(e){var t=e.name,i=e.escapedValue,n=ng(e,Yh);return Jh(Jh({},n),{},{value:i,label:t,highlighted:t})},S=[],k=!0,x=!1,E=function(){};function L(){E()}function T(e,t){return function(){x=!x,t.render(e)}}function I(){return x?h:l}var D=function(){return function(){}},R=function(t,i){return function(n){return function(s){var r=n.instantSearchInstance,a=n.results;if(""===s&&S)e(Jh(Jh({},i.getWidgetRenderState(Jh(Jh({},n),{},{results:b}))),{},{instantSearchInstance:r}),!1);else{var l={highlightPreTag:m?H.highlightPreTag:V.highlightPreTag,highlightPostTag:m?H.highlightPostTag:V.highlightPostTag};t.searchForFacetValues(o,s,Math.min(I(),100),l).then((function(t){var o=m?$(t.facetHits):t.facetHits,s=v(o.map((function(e){var t=e.escapedValue,i=e.value,n=ng(e,Zh);return Jh(Jh({},n),{},{value:t,label:i})})),{results:a});e(Jh(Jh({},i.getWidgetRenderState(Jh(Jh({},n),{},{results:b}))),{},{items:s,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:r}),!1)}))}}}};return{$$type:"ais.refinementList",init:function(t){e(Jh(Jh({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(Jh(Jh({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return Jh(Jh({},e),{},{refinementList:Jh(Jh({},e.refinementList),{},eg({},o,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,s=e.state,r=e.createURL,a=e.instantSearchInstance,c=e.helper,u=[],h=[];if(w&&y&&D||(w=Qn({instantSearchInstance:a,helper:c,attribute:o,widgetType:this.$$type}),y=function(e){w("click:internal",e),c.toggleFacetRefinement(o,e).search()},D=R(c,this)),n){var g=n.getFacetValues(o,{sortBy:p,facetOrdering:p===rg});h=g&&Array.isArray(g)?g:[],u=v(h.slice(0,I()).map(C),{results:n});var f=s.maxValuesPerFacet,m=I();k=f>m?h.length<=m:h.lengthl,A=d&&!k,O=N||A;return{createURL:function(e){return r((function(i){return t.getWidgetUiState(i,{searchParameters:s.resetPage().toggleFacetRefinement(o,e),helper:c})}))},items:u,refine:y,searchForItems:_,isFromSearch:!1,canRefine:u.length>0,widgetParams:i,isShowingMore:x,canToggleShowMore:O,toggleShowMore:L,sendEvent:w,hasExhaustiveItems:k}},dispose:function(e){var i=e.state;t();var n=i.setQueryParameter("maxValuesPerFacet",void 0);return"and"===r?n.removeFacet(o):n.removeDisjunctiveFacet(o)},getWidgetUiState:function(e,t){var i=t.searchParameters,n="or"===r?i.getDisjunctiveRefinements(o):i.getConjunctiveRefinements(o);return lg(Jh(Jh({},e),{},{refinementList:Jh(Jh({},e.refinementList),{},eg({},o,n))}),o)},getWidgetSearchParameters:function(e,t){var i=t.uiState,n="or"===r;if(e.isHierarchicalFacet(o))return e;if(n&&e.isConjunctiveFacet(o)||!n&&e.isDisjunctiveFacet(o))return e;var s=i.refinementList&&i.refinementList[o],a=n?e.addDisjunctiveFacet(o).removeDisjunctiveFacetRefinement(o):e.addFacet(o).removeFacetRefinement(o),c=a.maxValuesPerFacet||0,u=Math.max(c,d?h:l),g=a.setQueryParameter("maxValuesPerFacet",u);if(!s){var p=n?"disjunctiveFacetsRefinements":"facetsRefinements";return g.setQueryParameters(eg({},p,Jh(Jh({},g[p]),{},eg({},o,[]))))}return s.reduce((function(e,t){return n?e.addDisjunctiveFacetRefinement(o,t):e.addFacetRefinement(o,t)}),g)}}}};function lg(e,t){return e.refinementList?(e.refinementList[t]&&0!==e.refinementList[t].length||delete e.refinementList[t],0===Object.keys(e.refinementList).length&&delete e.refinementList,e):e}const cg=ag,dg={name:"SearchInput",mixins:[s({name:"SearchBox"})],props:{placeholder:{type:String,default:"Search here…"},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!1},shouldShowLoadingIndicator:{type:Boolean,default:!1},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Search"},resetTitle:{type:String,default:"Clear"},value:{type:String,required:!1,default:void 0},modelValue:{type:String,required:!1,default:void 0}},emits:["input","update:modelValue","blur","focus","reset"],data:function(){return{query:""}},methods:{isFocused:function(){return document.activeElement===this.$refs.input},onInput:function(e){this.ignoreCompositionEvents&&e.isComposing||(this.$emit("input",e.target.value),this.$emit("update:modelValue",e.target.value))},onFormSubmit:function(){this.$refs.input.blur()},onFormReset:function(){this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("reset")}}};var ug=["placeholder","autofocus","value"],hg=["title","hidden"],gg=[(0,l.Lk)("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"},null,-1)],pg=["title","hidden"],fg=[(0,l.Lk)("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"},null,-1)],mg=["hidden"],_g=["aria-hidden"],vg=[(0,l.Fv)('',1)];function bg(e,t,i,n,o,s){return(0,l.uX)(),(0,l.CE)("form",{action:"",role:"search",novalidate:"",class:(0,be.C4)(e.suit("form")),onSubmit:t[4]||(t[4]=(0,Ge.D$)((function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s.onFormSubmit&&s.onFormSubmit.apply(s,e)}),["prevent"])),onReset:t[5]||(t[5]=(0,Ge.D$)((function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s.onFormReset&&s.onFormReset.apply(s,e)}),["prevent"]))},[(0,l.Lk)("input",{type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",maxlength:"512","aria-label":"Search",placeholder:i.placeholder,autofocus:i.autofocus,class:(0,be.C4)(e.suit("input")),value:i.value||i.modelValue,onFocus:t[0]||(t[0]=function(t){return e.$emit("focus",t)}),onBlur:t[1]||(t[1]=function(t){return e.$emit("blur",t)}),onInput:t[2]||(t[2]=function(e){return s.onInput(e)}),onCompositionend:t[3]||(t[3]=function(e){return s.onInput(e)}),ref:"input"},null,42,ug),(0,l.Lk)("button",{type:"submit",title:i.submitTitle,class:(0,be.C4)(e.suit("submit")),hidden:i.showLoadingIndicator&&i.shouldShowLoadingIndicator},[(0,l.RG)(e.$slots,"submit-icon",{},(function(){return[((0,l.uX)(),(0,l.CE)("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 40 40",class:(0,be.C4)(e.suit("submitIcon"))},gg,2))]}))],10,hg),(0,l.Lk)("button",{type:"reset",title:i.resetTitle,class:(0,be.C4)(e.suit("reset")),hidden:!i.value&&!i.modelValue||i.showLoadingIndicator&&i.shouldShowLoadingIndicator},[(0,l.RG)(e.$slots,"reset-icon",{},(function(){return[((0,l.uX)(),(0,l.CE)("svg",{"aria-hidden":"true",height:"10",viewBox:"0 0 20 20",class:(0,be.C4)(e.suit("resetIcon")),width:"10"},fg,2))]}))],10,pg),i.showLoadingIndicator?((0,l.uX)(),(0,l.CE)("span",{key:0,hidden:!i.shouldShowLoadingIndicator,class:(0,be.C4)(e.suit("loadingIndicator"))},[(0,l.RG)(e.$slots,"loading-indicator",{},(function(){return[((0,l.uX)(),(0,l.CE)("svg",{"aria-hidden":!i.shouldShowLoadingIndicator,"aria-label":"Results are loading",width:"16",height:"16",stroke:"#444",viewBox:"0 0 38 38",class:(0,be.C4)(e.suit("loadingIcon"))},vg,10,_g))]}))],10,mg)):(0,l.Q3)("",!0)],34)}dg.render=bg;const yg=dg;var wg=function(){};const Cg={name:"AisRefinementList",components:{SearchInput:yg,AisHighlight:Bo},mixins:[s({name:"RefinementList"}),m({connector:cg},{$$widgetType:"ais.refinementList"}),qe()],props:{attribute:{type:String,required:!0},searchable:{type:Boolean,default:void 0},searchablePlaceholder:{type:String,required:!1,default:"Search here…"},operator:{default:"or",validator:function(e){return"and"===e||"or"===e},required:!1},limit:{type:Number,required:!1,default:void 0},showMoreLimit:{type:Number,required:!1,default:void 0},showMore:{type:Boolean,required:!1,default:!1},sortBy:{type:[Array,Function],required:!1,default:void 0},transformItems:{type:Function,required:!1,default:void 0}},data:function(){return{searchForFacetValuesQuery:""}},computed:{searchForFacetValues:{get:function(){return this.searchForFacetValuesQuery},set:function(e){this.state.searchForItems(e),this.searchForFacetValuesQuery=e}},toggleShowMore:function(){return this.state.toggleShowMore||wg},items:function(){return this.state.items.map((function(e){return Object.assign({},e,{_highlightResult:{item:{value:e.highlighted}}})}))},widgetParams:function(){return{attribute:this.attribute,operator:this.operator,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,escapeFacetValues:!0,transformItems:this.transformItems}}},methods:{refine:function(e){this.state.refine(e),this.searchForFacetValuesQuery=""}}};var Sg=["value","checked","onChange"],kg=["disabled"];function xg(e,t,i,n,o,s){var r=(0,l.g2)("search-input"),a=(0,l.g2)("ais-highlight");return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),0===s.items.length&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{items:s.items,refine:s.refine,searchForItems:e.state.searchForItems,searchForItemsQuery:o.searchForFacetValuesQuery,toggleShowMore:s.toggleShowMore,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,createURL:e.state.createURL,isFromSearch:e.state.isFromSearch,canRefine:e.state.canRefine,sendEvent:e.state.sendEvent},(function(){var n;return[i.searchable?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit("searchBox"))},[(0,l.bF)(r,{modelValue:s.searchForFacetValues,"onUpdate:modelValue":t[0]||(t[0]=function(e){return s.searchForFacetValues=e}),"show-loading-indicator":!0,placeholder:i.searchablePlaceholder,"class-names":e.classNames},null,8,["modelValue","placeholder","class-names"])],2)):(0,l.Q3)("",!0),e.state.isFromSearch&&0===s.items.length?(0,l.RG)(e.$slots,"noResults",{key:1,query:s.searchForFacetValues},(function(){return[(0,l.Lk)("div",{class:(0,be.C4)(e.suit("noResults"))},"No results.",2)]})):(0,l.Q3)("",!0),s.items.length>0?((0,l.uX)(),(0,l.CE)("ul",{key:2,class:(0,be.C4)(e.suit("list"))},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(s.items,(function(t){return(0,l.uX)(),(0,l.CE)("li",{class:(0,be.C4)([e.suit("item"),t.isRefined&&e.suit("item","selected")]),key:t.value},[(0,l.RG)(e.$slots,"item",{item:t,refine:s.refine,createURL:e.state.createURL},(function(){return[(0,l.Lk)("label",{class:(0,be.C4)(e.suit("label"))},[(0,l.Lk)("input",{class:(0,be.C4)(e.suit("checkbox")),type:"checkbox",value:t.value,checked:t.isRefined,onChange:function(e){return s.refine(t.value)}},null,42,Sg),i.searchable?((0,l.uX)(),(0,l.CE)("span",{key:0,class:(0,be.C4)(e.suit("labelText"))},[(0,l.bF)(a,{attribute:"item",hit:t},null,8,["hit"])],2)):((0,l.uX)(),(0,l.CE)("span",{key:1,class:(0,be.C4)(e.suit("labelText"))},(0,be.v_)(t.label),3)),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("count"))},(0,be.v_)(t.count),3)],2)]}))],2)})),128))],2)):(0,l.Q3)("",!0),i.showMore?((0,l.uX)(),(0,l.CE)("button",{key:3,class:(0,be.C4)([e.suit("showMore"),(n={},n[e.suit("showMore","disabled")]=!e.state.canToggleShowMore,n)]),onClick:t[1]||(t[1]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s.toggleShowMore&&s.toggleShowMore.apply(s,e)}),disabled:!e.state.canToggleShowMore},[(0,l.RG)(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},(function(){return[(0,l.eW)(" Show "+(0,be.v_)(e.state.isShowingMore?"less":"more"),1)]}))],10,kg)):(0,l.Q3)("",!0)]}))],2)):(0,l.Q3)("",!0)}Cg.render=xg;const Eg=Cg;var Lg;const Tg=((Lg={name:"AisStateResults",mixins:[m({connector:!0}),s({name:"StateResults"})],props:{catchError:{type:Boolean,default:!1}},data:function(){var e=this;return{renderFn:function(){var t=e.instantSearchInstance,i=t.status,n=t.error,o=e.getParentIndex().getResults(),s=e.getParentIndex().getHelper(),r=s?s.state:null;e.state={results:o,state:r,status:i,error:n}}}},created:function(){this.instantSearchInstance.addListener("render",this.renderFn),this.renderFn()}}).beforeUnmount=function(){this.widget&&(this.instantSearchInstance.removeListener("render",this.renderFn),this.errorFn&&this.instantSearchInstance.removeListener("error",this.errorFn))},Lg.watch={catchError:{immediate:!0,handler:function(e){e?(this.errorFn=function(){},this.instantSearchInstance.addListener("error",this.errorFn)):this.errorFn&&(this.instantSearchInstance.removeListener("error",this.errorFn),this.errorFn=void 0)}}},Lg.computed={stateResults:function(){var e=this.state,t=e.results,i=e.state,n=e.status,o=e.error;return r({},t,{results:t,state:i,status:n,error:o})}},Lg);var Ig=(0,l.Lk)("p",null," Use this component to have a different layout based on a certain state. ",-1),Dg=(0,l.Lk)("p",null,"Fill in the slot, and get access to the following things:",-1);function Rg(e,t,i,n,o,s){return e.state&&e.state.state&&e.state.results?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",(0,be._B)((0,l.Ng)(s.stateResults)),(function(){return[Ig,Dg,(0,l.Lk)("pre",null,"results: "+(0,be.v_)(Object.keys(e.state.results)),1),(0,l.Lk)("pre",null,"state: "+(0,be.v_)(Object.keys(e.state.state)),1),(0,l.Lk)("pre",null,"status: "+(0,be.v_)(e.state.status),1),(0,l.Lk)("pre",null,"error: "+(0,be.v_)(e.state.error),1)]}))],2)):(0,l.Q3)("",!0)}Tg.render=Rg;const Ng=Tg;var Ag=i(88941);const Og={name:"AisSearchBox",mixins:[m({connector:Ag.A},{$$widgetType:"ais.searchBox"}),s({name:"SearchBox"})],components:{SearchInput:yg},props:{placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!0},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Submit the search query"},resetTitle:{type:String,default:"Clear the search query"},value:{type:String,default:void 0},modelValue:{type:String,default:void 0},queryHook:{type:Function,default:void 0}},data:function(){return{localValue:"",isVue2:c,isVue3:d}},computed:{widgetParams:function(){return{queryHook:this.queryHook}},isControlled:function(){return void 0!==this.value||void 0!==this.modelValue},model:function(){return this.value||this.modelValue},currentRefinement:{get:function(){this.isControlled&&this.model!==this.localValue&&(this.localValue=this.model,this.$emit("input",this.model),this.$emit("update:modelValue",this.model),this.state.refine(this.model));var e=this.$refs.searchInput;return e&&e.isFocused()?this.localValue:this.model||this.state.query||""},set:function(e){this.localValue=e,this.state.refine(e),this.isControlled&&(this.$emit("input",e),this.$emit("update:modelValue",e))}}}};function Pg(e,t,i,n,o,s){var r=(0,l.g2)("search-input");return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{currentRefinement:s.currentRefinement,isSearchStalled:e.state.isSearchStalled,refine:e.state.refine},(function(){return[(0,l.bF)(r,{onFocus:t[0]||(t[0]=function(t){return e.$emit("focus",t)}),onBlur:t[1]||(t[1]=function(t){return e.$emit("blur",t)}),onReset:t[2]||(t[2]=function(t){return e.$emit("reset")}),placeholder:i.placeholder,autofocus:i.autofocus,"show-loading-indicator":i.showLoadingIndicator,"should-show-loading-indicator":e.state.isSearchStalled,"ignore-composition-events":i.ignoreCompositionEvents,"submit-title":i.submitTitle,"reset-title":i.resetTitle,"class-names":e.classNames,modelValue:s.currentRefinement,"onUpdate:modelValue":t[3]||(t[3]=function(e){return s.currentRefinement=e}),ref:"searchInput"},(0,l.eX)({default:(0,l.k6)((function(){return[o.isVue2?(0,l.RG)(e.$slots,"loading-indicator",{key:0,slot:"loading-indicator"}):(0,l.Q3)("",!0),o.isVue2?(0,l.RG)(e.$slots,"submit-icon",{key:1,slot:"submit-icon"}):(0,l.Q3)("",!0),o.isVue2?(0,l.RG)(e.$slots,"reset-icon",{key:2,slot:"reset-icon"}):(0,l.Q3)("",!0)]})),_:2},[o.isVue3?{name:"loading-indicator",fn:(0,l.k6)((function(){return[(0,l.RG)(e.$slots,"loading-indicator")]})),key:"0"}:void 0,o.isVue3?{name:"submit-icon",fn:(0,l.k6)((function(){return[(0,l.RG)(e.$slots,"submit-icon")]})),key:"1"}:void 0,o.isVue3?{name:"reset-icon",fn:(0,l.k6)((function(){return[(0,l.RG)(e.$slots,"reset-icon")]})),key:"2"}:void 0]),1032,["placeholder","autofocus","show-loading-indicator","should-show-loading-indicator","ignore-composition-events","submit-title","reset-title","class-names","modelValue"])]}))],2)):(0,l.Q3)("",!0)}Og.render=Pg;const Mg=Og,Fg={name:"AisSnippet",mixins:[s({name:"Snippet"})],components:{AisHighlighter:Po},props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"}}};function Bg(e,t,i,n,o,s){var r=(0,l.g2)("ais-highlighter");return(0,l.uX)(),(0,l.Wv)(r,{hit:i.hit,attribute:i.attribute,"highlighted-tag-name":i.highlightedTagName,suit:e.suit,"highlight-property":"_snippetResult","pre-tag":"","post-tag":""},null,8,["hit","attribute","highlighted-tag-name","suit"])}Fg.render=Bg;const Wg=Fg;function Hg(e){return Hg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hg(e)}function Vg(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function jg(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;(0,b.t)(e,qg());var i={};return function(n){var o=n||{},s=o.items,r=o.transformItems,a=void 0===r?function(e){return e}:r;if(!Array.isArray(s))throw new Error(qg("The `items` option expects an array of objects."));return{$$type:"ais.sortBy",init:function(t){var i=t.instantSearchInstance,n=this.getWidgetRenderState(t),o=n.currentRefinement;Et(s,(function(e){return e.value===o}));e(jg(jg({},n),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(jg(jg({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var n=e.state;return t(),i.initialIndex?n.setIndex(i.initialIndex):n},getRenderState:function(e,t){return jg(jg({},e),{},{sortBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,o=e.helper,r=e.state,l=e.parent;!i.initialIndex&&l&&(i.initialIndex=l.getIndexName()),i.setIndex||(i.setIndex=function(e){o.setIndex(e).search()});var c=!t||0===t.nbHits;return{currentRefinement:r.index,options:a(s,{results:t}),refine:i.setIndex,hasNoResults:c,canRefine:!c&&s.length>0,widgetParams:n}},getWidgetUiState:function(e,t){var n=t.searchParameters,o=n.index;return jg(jg({},e),{},{sortBy:o!==i.initialIndex?o:void 0})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return e.setQueryParameter("index",n.sortBy||i.initialIndex||e.index)}}}};const Gg=Kg,Qg={name:"AisSortBy",mixins:[s({name:"SortBy"}),m({connector:Gg},{$$widgetType:"ais.sortBy"}),qe()],props:{items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{items:this.items,transformItems:this.transformItems}}}};var Yg=["value","selected"];function Zg(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{items:e.state.options,hasNoResults:e.state.hasNoResults,refine:e.state.refine,currentRefinement:e.state.currentRefinement,canRefine:e.state.canRefine},(function(){return[(0,l.Lk)("select",{class:(0,be.C4)(e.suit("select")),onChange:t[0]||(t[0]=function(t){return e.state.refine(t.currentTarget.value)}),"aria-label":"Sort results by"},[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.state.options,(function(t){return(0,l.uX)(),(0,l.CE)("option",{key:t.value,class:(0,be.C4)(e.suit("option")),value:t.value,selected:t.value===e.state.currentRefinement},(0,be.v_)(t.label),11,Yg)})),128))],34)]}))],2)):(0,l.Q3)("",!0)}Qg.render=Zg;const Xg=Qg;function Jg(e){return Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jg(e)}function ep(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function tp(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,sp()),function(i){return{$$type:"ais.stats",init:function(t){var i=t.instantSearchInstance;e(tp(tp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(tp(tp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(){t()},getRenderState:function(e,t){return tp(tp({},e),{},{stats:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.state;return t?{hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbSortedHits:t.nbSortedHits,areHitsSorted:"undefined"!==typeof t.appliedRelevancyStrictness&&t.appliedRelevancyStrictness>0&&t.nbSortedHits!==t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,widgetParams:i}:{hitsPerPage:n.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:n.page||0,processingTimeMS:-1,query:n.query||"",widgetParams:i}}}}};const ap=rp,lp={name:"AisStats",mixins:[m({connector:ap},{$$widgetType:"ais.stats"}),s({name:"Stats"})],computed:{sortedResultsSentence:function(){var e=this.state,t=e.nbHits,i=e.nbSortedHits,n="sorted out of "+t.toLocaleString();return 0===i?"No relevant results "+n:1===i?"1 relevant result "+n:i>1?(i||0).toLocaleString()+" relevant results "+n:""},resultsSentence:function(){var e=this.state.nbHits;return 0===e?"No results":1===e?"1 result":e>1?e.toLocaleString()+" results":""},widgetParams:function(){return{}}}};function cp(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",(0,l.v6)(e.state,{results:e.state.instantSearchInstance.helper.lastResults}),(function(){return[(0,l.Lk)("span",{class:(0,be.C4)(e.suit("text"))},[e.state.areHitsSorted?((0,l.uX)(),(0,l.CE)(l.FK,{key:0},[(0,l.eW)((0,be.v_)(s.sortedResultsSentence),1)],64)):((0,l.uX)(),(0,l.CE)(l.FK,{key:1},[(0,l.eW)((0,be.v_)(s.resultsSentence),1)],64)),(0,l.eW)(" found in "+(0,be.v_)(e.state.processingTimeMS.toLocaleString())+"ms",1)],2)]}))],2)):(0,l.Q3)("",!0)}lp.render=cp;const dp=lp;function up(e){return Array.isArray(e)?e:[e]}function hp(e){return hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hp(e)}function gp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function pp(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,kp()),function(i){var n=i||{},o=n.attribute,s=n.on,r=void 0===s||s,a=n.off;if(!o)throw new Error(kp("The `attribute` option is required."));var l,c=void 0!==a,d=up(r).map(xt),u=c?up(a).map(xt):void 0,h=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isRefined:!1},i=t.isRefined;i?(d.forEach((function(t){return e.removeDisjunctiveFacetRefinement(o,t)})),c&&u.forEach((function(t){return e.addDisjunctiveFacetRefinement(o,t)}))):(l("click:internal",i),c&&u.forEach((function(t){return e.removeDisjunctiveFacetRefinement(o,t)})),d.forEach((function(t){return e.addDisjunctiveFacetRefinement(o,t)}))),e.search()}},g={createURLFactory:function(e,t){var i=t.state,n=t.createURL,s=t.getWidgetUiState,r=t.helper;return function(){i=i.resetPage();var t=e?d:u;t&&t.forEach((function(e){i=i.removeDisjunctiveFacetRefinement(o,e)}));var a=e?u:d;return a&&a.forEach((function(e){i=i.addDisjunctiveFacetRefinement(o,e)})),n((function(e){return s(e,{searchParameters:i,helper:r})}))}}};return{$$type:xp,init:function(t){var i=t.instantSearchInstance;e(pp(pp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(pp(pp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.removeDisjunctiveFacet(o)},getRenderState:function(e,t){return pp(pp({},e),{},{toggleRefinement:pp(pp({},e.toggleRefinement),{},fp({},o,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.state,n=e.helper,s=e.results,r=e.createURL,a=e.instantSearchInstance,p=d.every((function(e){return t.isDisjunctiveFacetRefined(o,e)})),f={isRefined:p,count:0},m={isRefined:c&&!p,count:0};if(s){var _=up(u||!1),v=s.getFacetValues(o,{})||[],b=d.map((function(e){return Et(v,(function(t){var i=t.escapedValue;return i===xt(String(e))}))})).filter((function(e){return void 0!==e})),y=c?_.map((function(e){return Et(v,(function(t){var i=t.escapedValue;return i===xt(String(e))}))})).filter((function(e){return void 0!==e})):[];f={isRefined:!!b.length&&b.every((function(e){return e.isRefined})),count:b.reduce((function(e,t){return e+t.count}),0)||null},m={isRefined:!!y.length&&y.every((function(e){return e.isRefined})),count:y.reduce((function(e,t){return e+t.count}),0)||v.reduce((function(e,t){var i=t.count;return e+i}),0)}}l||(l=Ep({instantSearchInstance:a,attribute:o,on:d,helper:n}));var w=p?m:f;return{value:{name:o,isRefined:p,count:s?w.count:null,onFacetValue:f,offFacetValue:m},createURL:g.createURLFactory(p,{state:t,createURL:r,helper:n,getWidgetUiState:this.getWidgetUiState}),sendEvent:l,canRefine:Boolean(s?w.count:null),refine:h(n),widgetParams:i}},getWidgetUiState:function(e,t){var i,n=t.searchParameters,s=d&&d.every((function(e){return n.isDisjunctiveFacetRefined(o,e)}));return s?pp(pp({},e),{},{toggle:pp(pp({},e.toggle),{},fp({},o,s))}):(null===(i=e.toggle)||void 0===i||delete i[o],e)},getWidgetSearchParameters:function(e,t){var i=t.uiState;if(e.isHierarchicalFacet(o)||e.isConjunctiveFacet(o))return e;var n=e.addDisjunctiveFacet(o).removeDisjunctiveFacetRefinement(o),s=Boolean(i.toggle&&i.toggle[o]);return s?(d&&d.forEach((function(e){n=n.addDisjunctiveFacetRefinement(o,e)})),n):c?(u&&u.forEach((function(e){n=n.addDisjunctiveFacetRefinement(o,e)})),n):n.setQueryParameters({disjunctiveFacetsRefinements:pp(pp({},e.disjunctiveFacetsRefinements),{},fp({},o,[]))})}}}};const Tp=Lp,Ip={name:"AisToggleRefinement",mixins:[s({name:"ToggleRefinement"}),m({connector:Tp},{$$widgetType:"ais.toggleRefinement"}),qe()],props:{attribute:{type:String,required:!0},on:{type:[String,Number,Boolean,Array],required:!1,default:!0},off:{type:[String,Number,Boolean,Array],required:!1,default:void 0},label:{type:String,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,on:this.on,off:this.off}}}};var Dp=["name","value","checked"];function Rp(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)([e.suit(),!e.state.canRefine&&e.suit("","noRefinement")])},[(0,l.RG)(e.$slots,"default",{value:e.state.value,canRefine:e.state.canRefine,refine:e.state.refine,createURL:e.state.createURL,sendEvent:e.state.sendEvent},(function(){return[(0,l.Lk)("label",{class:(0,be.C4)(e.suit("label"))},[(0,l.Lk)("input",{class:(0,be.C4)(e.suit("checkbox")),type:"checkbox",name:e.state.value.name,value:i.on,checked:e.state.value.isRefined,onChange:t[0]||(t[0]=function(t){return e.state.refine(e.state.value)})},null,42,Dp),(0,l.Lk)("span",{class:(0,be.C4)(e.suit("labelText"))},(0,be.v_)(i.label||e.state.value.name),3),null!==e.state.value.count?((0,l.uX)(),(0,l.CE)("span",{key:0,class:(0,be.C4)(e.suit("count"))},(0,be.v_)(e.state.value.count.toLocaleString()),3)):(0,l.Q3)("",!0)],2)]}))],2)):(0,l.Q3)("",!0)}Ip.render=Rp;const Np=Ip;function Ap(e){return Ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ap(e)}function Op(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Pp(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};l=Pp(Pp({},l),e),s()},h=function(){return l},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";u(a(e))},p=function(){u({status:"waiting"})},f=function(e){u({status:"error",errorCode:e.error})},m=function(e){u({status:"recognizing",transcript:e.results[0]&&e.results[0][0]&&e.results[0][0].transcript||"",isSpeechFinal:e.results[0]&&e.results[0].isFinal}),i&&l.transcript&&o(l.transcript)},_=function(){l.errorCode||!l.transcript||i||o(l.transcript),"error"!==l.status&&u({status:"finished"})},v=function(){t=new r,t&&(g("askingPermission"),t.interimResults=!0,n&&(t.lang=n),t.addEventListener("start",p),t.addEventListener("error",f),t.addEventListener("result",m),t.addEventListener("end",_),t.start())},b=function(){t&&(t.stop(),t.removeEventListener("start",p),t.removeEventListener("error",f),t.removeEventListener("result",m),t.removeEventListener("end",_),t=void 0)},y=function(){b(),g("finished")};return{getState:h,isBrowserSupported:c,isListening:d,startListening:v,stopListening:y,dispose:b}};const Hp=Wp;function Vp(e){return Vp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vp(e)}function jp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function zp(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v.l;return(0,b.t)(e,Kp()),function(i){var n=i.searchAsYouSpeak,o=void 0!==n&&n,s=i.language,r=i.additionalQueryParameters,a=i.createVoiceSearchHelper,l=void 0===a?Hp:a;return{$$type:"ais.voiceSearch",init:function(t){var i=t.instantSearchInstance;e(zp(zp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(zp(zp({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},getRenderState:function(e,t){return zp(zp({},e),{},{voiceSearch:this.getWidgetRenderState(t)})},getWidgetRenderState:function(t){var n=this,a=t.helper,c=t.instantSearchInstance;this._refine||(this._refine=function(e){if(e!==a.state.query){var t=s?[s.split("-")[0]]:void 0;a.setQueryParameter("queryLanguages",t),"function"===typeof r&&a.setState(a.state.setQueryParameters(zp({ignorePlurals:!0,removeStopWords:!0,optionalWords:e},r({query:e})))),a.setQuery(e).search()}}),this._voiceSearchHelper||(this._voiceSearchHelper=l({searchAsYouSpeak:o,language:s,onQueryChange:function(e){return n._refine(e)},onStateChange:function(){e(zp(zp({},n.getWidgetRenderState(t)),{},{instantSearchInstance:c}),!1)}}));var d=this._voiceSearchHelper,u=d.isBrowserSupported,h=d.isListening,g=d.startListening,p=d.stopListening,f=d.getState;return{isBrowserSupported:u(),isListening:h(),toggleListening:function(){u()&&(h()?p():g())},voiceListeningState:f(),widgetParams:i}},dispose:function(e){var i=e.state;this._voiceSearchHelper.dispose(),t();var n=i;if("function"===typeof r){var o=r({query:""}),s=o?Object.keys(o).reduce((function(e,t){return e[t]=void 0,e}),{}):{};n=i.setQueryParameters(zp({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},s))}return n.setQueryParameter("query",void 0)},getWidgetUiState:function(e,t){var i=t.searchParameters,n=i.query||"";return n?zp(zp({},e),{},{query:n}):e},getWidgetSearchParameters:function(e,t){var i=t.uiState;return e.setQueryParameter("query",i.query||"")}}}};const Qp=Gp,Yp={name:"AisVoiceSearch",mixins:[m({connector:Qp},{$$widgetType:"ais.voiceSearch"}),s({name:"VoiceSearch"})],props:{searchAsYouSpeak:{type:Boolean,required:!1,default:void 0},language:{type:String,default:void 0},additionalQueryParameters:{type:Object,default:void 0},buttonTitle:{type:String,required:!1,default:"Search by voice"},disabledButtonTitle:{type:String,required:!1,default:"Search by voice (not supported on this browser)"}},data:function(){return{buttonSvgAttrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}}},computed:{widgetParams:function(){return{searchAsYouSpeak:this.searchAsYouSpeak,language:this.language,additionalQueryParameters:this.additionalQueryParameters}},errorNotAllowed:function(){return"error"===this.state.voiceListeningState.status&&"not-allowed"===this.state.voiceListeningState.errorCode},rootSlotProps:function(){return{isBrowserSupported:this.state.isBrowserSupported,isListening:this.state.isListening,toggleListening:this.state.toggleListening,voiceListeningState:this.state.voiceListeningState}},innerSlotProps:function(){return{status:this.state.voiceListeningState.status,errorCode:this.state.voiceListeningState.errorCode,isListening:this.state.isListening,transcript:this.state.voiceListeningState.transcript,isSpeechFinal:this.state.voiceListeningState.isSpeechFinal,isBrowserSupported:this.state.isBrowserSupported}}},methods:{handleClick:function(e){e.currentTarget.blur(),this.state.toggleListening()}}};var Zp=["title","disabled"],Xp=[(0,l.Fv)('',5)],Jp=["fill"],ef=(0,l.Lk)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),tf=(0,l.Lk)("line",{x1:"12",y1:"19",x2:"12",y2:"23"},null,-1),nf=(0,l.Lk)("line",{x1:"8",y1:"23",x2:"16",y2:"23"},null,-1);function of(e,t,i,n,o,s){return e.state?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",(0,be._B)((0,l.Ng)(s.rootSlotProps)),(function(){return[(0,l.Lk)("button",{type:"button",class:(0,be.C4)(e.suit("button")),title:e.state.isBrowserSupported?i.buttonTitle:i.disabledButtonTitle,disabled:!e.state.isBrowserSupported,onClick:t[0]||(t[0]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s.handleClick&&s.handleClick.apply(s,e)})},[(0,l.RG)(e.$slots,"buttonText",(0,be._B)((0,l.Ng)(s.innerSlotProps)),(function(){return[s.errorNotAllowed?((0,l.uX)(),(0,l.CE)("svg",(0,be._B)((0,l.v6)({key:0},o.buttonSvgAttrs)),Xp,16)):((0,l.uX)(),(0,l.CE)("svg",(0,be._B)((0,l.v6)({key:1},o.buttonSvgAttrs)),[(0,l.Lk)("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",fill:e.state.isListening?"currentColor":"none"},null,8,Jp),ef,tf,nf],16))]}))],10,Zp),(0,l.Lk)("div",{class:(0,be.C4)(e.suit("status"))},[(0,l.RG)(e.$slots,"status",(0,be._B)((0,l.Ng)(s.innerSlotProps)),(function(){return[(0,l.Lk)("p",null,(0,be.v_)(e.state.voiceListeningState.transcript),1)]}))],2)]}))],2)):(0,l.Q3)("",!0)}Yp.render=of;const sf=Yp;function rf(e){return rf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rf(e)}function af(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function lf(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:v.l,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.l;return function(i){var n={};return{$$type:"ais.relevantSort",init:function(t){var i=t.instantSearchInstance;e(lf(lf({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!0)},render:function(t){var i=t.instantSearchInstance;e(lf(lf({},this.getWidgetRenderState(t)),{},{instantSearchInstance:i}),!1)},dispose:function(e){var i=e.state;return t(),i.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(e,t){return lf(lf({},e),{},{relevantSort:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,o=e.helper;n.refine||(n.refine=function(e){o.setQueryParameter("relevancyStrictness",e).search()});var s=t||{},r=s.appliedRelevancyStrictness,a=void 0!==r;return{isRelevantSorted:"undefined"!==typeof r&&r>0,isVirtualReplica:a,canRefine:a,refine:n.refine,widgetParams:i}},getWidgetSearchParameters:function(e,t){var i,n=t.uiState;return e.setQueryParameter("relevancyStrictness",null!==(i=n.relevantSort)&&void 0!==i?i:e.relevancyStrictness)},getWidgetUiState:function(e,t){var i=t.searchParameters;return lf(lf({},e),{},{relevantSort:i.relevancyStrictness||e.relevantSort})}}}};const gf=hf,pf={name:"AisRelevantSort",mixins:[s({name:"RelevantSort"}),m({connector:gf},{$$widgetType:"ais.relevantSort"})],methods:{refine:function(){this.state.isRelevantSorted?this.state.refine(0):this.state.refine(void 0)}}};function ff(e,t,i,n,o,s){return e.state&&e.state.isVirtualReplica?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,be.C4)(e.suit())},[(0,l.RG)(e.$slots,"default",{isRelevantSorted:e.state.isRelevantSorted,refine:e.state.refine},(function(){return[(0,l.Lk)("div",{class:(0,be.C4)(e.suit("text"))},[(0,l.RG)(e.$slots,"text",{isRelevantSorted:e.state.isRelevantSorted})],2),(0,l.Lk)("button",{type:"button",class:(0,be.C4)(e.suit("button")),onClick:t[0]||(t[0]=function(e){return s.refine()})},[(0,l.RG)(e.$slots,"button",{isRelevantSorted:e.state.isRelevantSorted},(function(){return[(0,l.eW)((0,be.v_)(e.state.isRelevantSorted?"See all results":"See relevant results"),1)]}))],2)]}))],2)):(0,l.Q3)("",!0)}pf.render=ff;const mf=pf,_f={name:"AisDynamicWidgets",mixins:[m({connector:an},{$$widgetType:"ais.dynamicWidgets"}),s({name:"DynamicWidgets"})],props:{transformItems:{type:Function,default:void 0},facets:{type:Array,default:void 0},maxValuesPerFacet:{type:Number,default:void 0}},render:u((function(e){var t=this,i=new Map;if((h(this)||[]).forEach((function(n){var o=function e(t){var i,n=t.props;if(n){if(n.attribute)return n.attribute;if(Array.isArray(n.attributes))return n.attributes[0]}if(i=t.children&&t.children.default&&t.children.default(),Array.isArray(i))return i.reduce((function(t,i){return t||e(i)}),void 0)}(n);o&&i.set(o,e("div",{key:o,class:[t.suit("widget")]},[n]))})),!this.state){var n=[];return i.forEach((function(e){return n.push(e)})),e("div",r({class:[this.suit()]},{attrs:{hidden:!0}}),n)}return e("div",{class:[this.suit()]},this.state.attributesToRender.map((function(e){return i.get(e)})))})),computed:{widgetParams:function(){return{transformItems:this.transformItems,facets:this.facets,maxValuesPerFacet:this.maxValuesPerFacet,widgets:[]}}}},vf=Object.assign({},_f,{name:"AisExperimentalDynamicWidgets",mounted:function(){f("Use AisDynamicWidgets instead of AisExperimentalDynamicWidgets.")}});var bf={install:function(e){Object.keys(n).forEach((function(t){e.component(n[t].name,n[t])}))}};const yf=bf}}]); \ No newline at end of file diff --git a/json.worker.js b/json.worker.js index 897fa02..a5e1e25 100644 --- a/json.worker.js +++ b/json.worker.js @@ -1,8 +1,8 @@ -(()=>{var e={5053:(e,t,n)=>{"use strict";function i(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,r=e.length;ie){const n=new Set;return e.filter((e=>{const i=t(e);return!n.has(i)&&(n.add(i),!0)}))}function l(e,t){return e.length>0?e[0]:t}function c(e,t,n){const i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)}function h(e,t){for(const n of t)e.push(n)}var u;function d(e,t){return(n,i)=>t(e(n),e(i))}n.d(t,{E4:()=>h,Fy:()=>l,Hw:()=>f,U9:()=>g,VE:()=>d,aI:()=>i,c1:()=>p,dM:()=>a,j3:()=>m,kj:()=>o,n:()=>r,nK:()=>c,pN:()=>s}),function(e){function t(e){return e<0}function n(e){return e<=0}function i(e){return e>0}function r(e){return 0===e}e.isLessThan=t,e.isLessThanOrEqual=n,e.isGreaterThan=i,e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(u||(u={}));const g=(e,t)=>e-t;function f(e){return(t,n)=>-e(t,n)}class m{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;while(t=0&&e(this.items[t]))t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class p{static{this.empty=new p((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new p((t=>this.iterate((n=>!e(n)||t(n)))))}map(e){return new p((t=>this.iterate((n=>t(e(n))))))}findLast(e){let t;return this.iterate((n=>(e(n)&&(t=n),!0))),t}findLastMaxBy(e){let t,n=!0;return this.iterate((i=>((n||u.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0))),t}}},3654:(e,t,n)=>{"use strict";function i(e,t){const n=r(e,t);if(-1!==n)return e[n]}function r(e,t,n=e.length-1){for(let i=n;i>=0;i--){const n=e[i];if(t(n))return i}return-1}function s(e,t){const n=o(e,t);return-1===n?void 0:e[n]}function o(e,t,n=0,i=e.length){let r=n,s=i;while(ri,XP:()=>a,hw:()=>l,iM:()=>o,lx:()=>s,vJ:()=>c});class c{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(c.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=o(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}},9109:(e,t,n)=>{"use strict";n.d(t,{Ft:()=>o,Xo:()=>a,ok:()=>r,xb:()=>s});var i=n(4396);function r(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function o(e){e()||(e(),(0,i.dz)(new i.D7("Assertion Failed")))}function a(e,t){let n=0;while(n{"use strict";n.d(t,{vb:()=>l,uC:()=>c,Qg:()=>a,$6:()=>h});n(7792);var i=n(4396),r=n(231),s=n(8894),o=n(5160);Symbol("MicrotaskDelay");function a(e){return!!e&&"function"===typeof e.then}class l{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new i.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const r=n.setInterval((()=>{e()}),t);this.disposable=(0,s.s)((()=>{n.clearInterval(r),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class c{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let h,u;(function(){u="function"!==typeof globalThis.requestIdleCallback||"function"!==typeof globalThis.cancelIdleCallback?(e,t)=>{(0,o._p)((()=>{if(n)return;const e=Date.now()+15,i={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(i))}));let n=!1;return{dispose(){n||(n=!0)}}}:(e,t,n)=>{const i=e.requestIdleCallback(t,"number"===typeof n?{timeout:n}:void 0);let r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(i))}}},h=e=>u(globalThis,e)})();var d;(function(e){async function t(e){let t;const n=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if("undefined"!==typeof t)throw t;return n}function n(e){return new Promise((async(t,n)=>{try{await e(t,n)}catch(i){n(i)}}))}e.settled=t,e.withAsyncBody=n})(d||(d={}));class g{static fromArray(e){return new g((t=>{t.emitMany(e)}))}static fromPromise(e){return new g((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new g((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new g((async t=>{await Promise.all(e.map((async e=>{for await(const n of e)t.emitOne(n)})))}))}static{this.EMPTY=g.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new r.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(n){this.reject(n)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new g((async n=>{for await(const i of e)n.emitOne(t(i))}))}map(e){return g.map(this,e)}static filter(e,t){return new g((async n=>{for await(const i of e)t(i)&&n.emitOne(i)}))}filter(e){return g.filter(this,e)}static coalesce(e){return g.filter(e,(e=>!!e))}coalesce(){return g.coalesce(this)}static async toPromise(e){const t=[];for await(const n of e)t.push(n);return t}toPromise(){return g.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}},7885:(e,t,n)=>{"use strict";n.d(t,{$l:()=>a,Gs:()=>d,MB:()=>o,Sw:()=>h,bb:()=>c,gN:()=>l,pJ:()=>u});var i=n(5661);const r="undefined"!==typeof Buffer;new i.d((()=>new Uint8Array(256)));let s;class o{static wrap(e){return r&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new o(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return r?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function l(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function c(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function h(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function u(e,t){return e[t]}function d(e,t,n){e[n]=t}},7389:(e,t,n)=>{"use strict";function i(e){return e}n.d(t,{VV:()=>s,o5:()=>r});class r{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"===typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class s{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"===typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const n=this._fn(e);return this._map.set(e,n),this._map2.set(t,n),n}}},7792:(e,t,n)=>{"use strict";n.d(t,{Qi:()=>a});var i=n(231);const r=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var s;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof o||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r})})(s||(s={}));class o{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?r:(this._emitter||(this._emitter=new i.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token instanceof o&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=s.None}}},6455:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var i=n(322);const r=Object.create(null);function s(e,t){if((0,i.Kg)(t)){const n=r[t];if(void 0===n)throw new Error(`${e} references an unknown codicon: ${t}`);t=n}return r[e]=t,{id:e}}const o={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),gitPullRequestLabel:s("git-pull-request-label",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugHint:s("debug-hint",60017),terminalDecorationSuccess:s("terminal-decoration-success",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circleOutline:s("circle-outline",60092),circle:s("circle",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:s("terminal-decoration-incomplete",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),diffSidebyside:s("diff-sidebyside",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),compareChanges:s("compare-changes",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),gitPullRequestMilestone:s("git-pull-request-milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),terminalDecorationMark:s("terminal-decoration-mark",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),debugAlt:s("debug-alt",60305),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),gitPullRequestReviewer:s("git-pull-request-reviewer",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),gitPullRequestAssignee:s("git-pull-request-assignee",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),issueClosed:s("issue-closed",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),export:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnknown:s("workspace-unknown",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracket:s("bracket",60175),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newline:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),terminalDecorationError:s("terminal-decoration-error",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),blank:s("blank",60419),heartFilled:s("heart-filled",60420),map:s("map",60421),mapHorizontal:s("map-horizontal",60421),foldHorizontal:s("fold-horizontal",60421),mapFilled:s("map-filled",60422),mapHorizontalFilled:s("map-horizontal-filled",60422),foldHorizontalFilled:s("fold-horizontal-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),send:s("send",60431),sparkle:s("sparkle",60432),insert:s("insert",60433),mic:s("mic",60434),thumbsdownFilled:s("thumbsdown-filled",60435),thumbsupFilled:s("thumbsup-filled",60436),coffee:s("coffee",60437),snake:s("snake",60438),game:s("game",60439),vr:s("vr",60440),chip:s("chip",60441),piano:s("piano",60442),music:s("music",60443),micFilled:s("mic-filled",60444),repoFetch:s("repo-fetch",60445),copilot:s("copilot",60446),lightbulbSparkle:s("lightbulb-sparkle",60447),robot:s("robot",60448),sparkleFilled:s("sparkle-filled",60449),diffSingle:s("diff-single",60450),diffMultiple:s("diff-multiple",60451),surroundWith:s("surround-with",60452),share:s("share",60453),gitStash:s("git-stash",60454),gitStashApply:s("git-stash-apply",60455),gitStashPop:s("git-stash-pop",60456),vscode:s("vscode",60457),vscodeInsiders:s("vscode-insiders",60458),codeOss:s("code-oss",60459),runCoverage:s("run-coverage",60460),runAllCoverage:s("run-all-coverage",60461),coverage:s("coverage",60462),githubProject:s("github-project",60463),mapVertical:s("map-vertical",60464),foldVertical:s("fold-vertical",60464),mapVerticalFilled:s("map-vertical-filled",60465),foldVerticalFilled:s("fold-vertical-filled",60465),goToSearch:s("go-to-search",60466),percentage:s("percentage",60467),sortPercentage:s("sort-percentage",60467),attach:s("attach",60468)},a={dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left"),dropDownButton:s("drop-down-button",60084),symbolCustomColor:s("symbol-customcolor",60252),exportIcon:s("export",60332),workspaceUnspecified:s("workspace-unspecified",60355),newLine:s("newline",60394),thumbsDownFilled:s("thumbsdown-filled",60435),thumbsUpFilled:s("thumbsup-filled",60436),gitFetch:s("git-fetch",60445),lightbulbSparkleAutofix:s("lightbulb-sparkle-autofix",60447),debugBreakpointPending:s("debug-breakpoint-pending",60377)},l={...o,...a}},5476:(e,t,n)=>{"use strict";function i(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,{Q1:()=>a,bU:()=>r,hB:()=>s});class r{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=e.a,o=Math.max(t,n,i),a=Math.min(t,n,i);let l=0,c=0;const h=(a+o)/2,u=o-a;if(u>0){switch(c=Math.min(h<=.5?u/(2*h):u/(2-2*h),1),o){case t:l=(n-i)/u+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:o}=e;let a,l,c;if(0===n)a=l=c=i;else{const e=i<.5?i*(1+n):i+n-i*n,r=2*i-e;a=s._hue2rgb(r,e,t+1/3),l=s._hue2rgb(r,e,t),c=s._hue2rgb(r,e,t-1/3)}return new r(Math.round(255*a),Math.round(255*l),Math.round(255*c),o)}}class o{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=Math.max(t,n,i),s=Math.min(t,n,i),a=r-s,l=0===r?0:a/r;let c;return c=0===a?0:r===t?((n-i)/a%6+6)%6:r===n?(i-t)/a+2:(t-n)/a+4,new o(Math.round(60*c),l,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:s}=e,o=i*n,a=o*(1-Math.abs(t/60%2-1)),l=i-o;let[c,h,u]=[0,0,0];return t<60?(c=o,h=a):t<120?(c=a,h=o):t<180?(h=o,u=a):t<240?(h=a,u=o):t<300?(c=a,u=o):t<=360&&(c=o,u=a),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),u=Math.round(255*(u+l)),new r(c,h,u,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof r)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof o))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=o.toRGBA(e)}}equals(e){return!!e&&r.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&o.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g),n=a._relativeLuminanceForComponent(this.rgba.b),r=.2126*e+.7152*t+.0722*n;return i(r,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t{"use strict";n.d(t,{D7:()=>f,EM:()=>d,Qg:()=>h,cU:()=>o,dz:()=>s,iH:()=>u});class i{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(g.isErrorNoTelemetry(e))throw new g(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const r=new i;function s(e){l(e)||r.onUnexpectedError(e)}function o(e){if(e instanceof Error){const{name:t,message:n}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i,noTelemetry:g.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof c||e instanceof Error&&e.name===a&&e.message===a}class c extends Error{constructor(){super(a),this.name=this.message}}function h(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class d extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class g extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof g)return e;const t=new g;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}},231:(e,t,n)=>{"use strict";n.d(t,{Jh:()=>c,vl:()=>v});var i=n(4396),r=n(8894),s=(n(7806),n(4240));const o=!1,a=!1,l=!1;var c;(function(e){function t(e){if(l){const{onDidAddListener:t}=e,n=g.create();let i=0;e.onDidAddListener=()=>{2===++i&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),n.print()),t?.()}}}function n(e,t){return p(e,(()=>{}),0,void 0,!0,void 0,t)}function i(e){return(t,n=null,i)=>{let r,s=!1;return r=e((e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)}),null,i),s&&r.dispose(),r}}function s(t,n){return e.once(e.filter(t,n))}function o(e,t,n){return f(((n,i=null,r)=>e((e=>n.call(i,t(e))),null,r)),n)}function a(e,t,n){return f(((n,i=null,r)=>e((e=>{t(e),n.call(i,e)}),null,r)),n)}function c(e,t,n){return f(((n,i=null,r)=>e((e=>t(e)&&n.call(i,e)),null,r)),n)}function h(e){return e}function u(...e){return(t,n=null,i)=>{const s=(0,r.qE)(...e.map((e=>e((e=>t.call(n,e))))));return m(s,i)}}function d(e,t,n,i){let r=n;return o(e,(e=>(r=t(r,e),r)),i)}function f(e,n){let i;const r={onWillAddFirstListener(){i=e(s.fire,s)},onDidRemoveLastListener(){i?.dispose()}};n||t(r);const s=new v(r);return n?.add(s),s.event}function m(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function p(e,n,i=100,r=!1,s=!1,o,a){let l,c,h,u,d=0;const g={leakWarningThreshold:o,onWillAddFirstListener(){l=e((e=>{d++,c=n(c,e),r&&!h&&(f.fire(c),c=void 0),u=()=>{const e=c;c=void 0,h=void 0,(!r||d>1)&&f.fire(e),d=0},"number"===typeof i?(clearTimeout(h),h=setTimeout(u,i)):void 0===h&&(h=0,queueMicrotask(u))}))},onWillRemoveListener(){s&&d>0&&u?.()},onDidRemoveLastListener(){u=void 0,l.dispose()}};a||t(g);const f=new v(g);return a?.add(f),f.event}function b(t,n=0,i){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),n,void 0,!0,void 0,i)}function _(e,t=(e,t)=>e===t,n){let i,r=!0;return c(e,(e=>{const n=r||!t(e,i);return r=!1,i=e,n}),n)}function k(t,n,i){return[e.filter(t,n,i),e.filter(t,(e=>!n(e)),i)]}function C(e,t=!1,n=[],i){let r=n.slice(),s=e((e=>{r?r.push(e):a.fire(e)}));i&&i.add(s);const o=()=>{r?.forEach((e=>a.fire(e))),r=null},a=new v({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),i&&i.add(s))},onDidAddFirstListener(){r&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return i&&i.add(a),a.event}function y(e,t){const n=(n,i,r)=>{const s=t(new w);return e((function(e){const t=s.evaluate(e);t!==L&&n.call(i,t)}),void 0,r)};return n}e.None=()=>r.jG.None,e.defer=n,e.once=i,e.onceIf=s,e.map=o,e.forEach=a,e.filter=c,e.signal=h,e.any=u,e.reduce=d,e.debounce=p,e.accumulate=b,e.latch=_,e.split=k,e.buffer=C,e.chain=y;const L=Symbol("HaltChainable");class w{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:L)),this}reduce(e,t){let n=t;return this.steps.push((t=>(n=e(n,t),n))),this}latch(e=(e,t)=>e===t){let t,n=!0;return this.steps.push((i=>{const r=n||!e(i,t);return n=!1,t=i,r?i:L})),this}evaluate(e){for(const t of this.steps)if(e=t(e),e===L)break;return e}}function S(e,t,n=e=>e){const i=(...e)=>o.fire(n(...e)),r=()=>e.on(t,i),s=()=>e.removeListener(t,i),o=new v({onWillAddFirstListener:r,onDidRemoveLastListener:s});return o.event}function x(e,t,n=e=>e){const i=(...e)=>o.fire(n(...e)),r=()=>e.addEventListener(t,i),s=()=>e.removeEventListener(t,i),o=new v({onWillAddFirstListener:r,onDidRemoveLastListener:s});return o.event}function E(e){return new Promise((t=>i(e)(t)))}function N(e){const t=new v;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event}function T(e,t){return e((e=>t.fire(e)))}function A(e,t,n){return t(n),e((e=>t(e)))}e.fromNodeEventEmitter=S,e.fromDOMEventEmitter=x,e.toPromise=E,e.fromPromise=N,e.forward=T,e.runAndSubscribe=A;class I{constructor(e,n){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};n||t(i),this.emitter=new v(i),n&&n.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function O(e,t){const n=new I(e,t);return n.emitter.event}function M(e){return(t,n,i)=>{let s=0,o=!1;const a={beginUpdate(){s++},endUpdate(){s--,0===s&&(e.reportChanges(),o&&(o=!1,t.call(n)))},handlePossibleChange(){},handleChange(){o=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return i instanceof r.Cm?i.add(l):Array.isArray(i)&&i.push(l),l}}e.fromObservable=O,e.fromObservableLight=M})(c||(c={}));class h{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${h._idPool++}`,h.all.add(this)}start(e){this._stopWatch=new s.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}let u=-1;class d{static{this._idPool=1}constructor(e,t,n=(d._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[n,i]of this._stacks)(!e||t{if(e instanceof p)t(e);else for(let n=0;n{0!==e.length&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join("\n")),e.length=0)}),3e3),k=new FinalizationRegistry((t=>{"string"===typeof t&&e.push(t)}))}class v{constructor(e){this._size=0,this._options=e,this._leakageMon=u>0||this._options?.leakWarningThreshold?new d(e?.onListenerError??i.dz,this._options?.leakWarningThreshold??u):void 0,this._perfMon=this._options?._profName?new h(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(a){const e=this._listeners;queueMicrotask((()=>{_(e,(e=>e.stack?.print()))}))}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],n=new m(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]),s=this._options?.onListenerError||i.dz;return s(n),r.jG.None}if(this._disposed)return r.jG.None;t&&(e=e.bind(t));const s=new p(e);let o,l;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(s.stack=g.create(),o=this._leakageMon.check(s.stack,this._size+1)),a&&(s.stack=l??g.create()),this._listeners?this._listeners instanceof p?(this._deliveryQueue??=new C,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;const c=(0,r.s)((()=>{k?.unregister(c),o?.(),this._removeListener(s)}));if(n instanceof r.Cm?n.add(c):Array.isArray(n)&&n.push(c),k){const e=(new Error).stack.split("\n").slice(2,3).join("\n").trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);k.register(c,t?.[2]??e,c)}return c},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,n=t.indexOf(e);if(-1===n)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const i=this._deliveryQueue.current===this;if(this._size*b<=t.length){let e=0;for(let n=0;n0}}class C{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}},7531:(e,t,n)=>{"use strict";n.d(t,{TH:()=>o,Zn:()=>l,_1:()=>c,kb:()=>a});var i=n(1643),r=(n(5160),n(601));function s(e){return 47===e||92===e}function o(e){return e.replace(/[\\/]/g,i.SA.sep)}function a(e){return-1===e.indexOf("/")&&(e=o(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function l(e,t=i.SA.sep){if(!e)return"";const n=e.length,r=e.charCodeAt(0);if(s(r)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){let i=3;const r=i;for(;ie.length)return!1;if(n){const n=(0,r.ns)(e,t);if(!n)return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===s&&i--,e.charAt(i)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}function h(e){return e>=65&&e<=90||e>=97&&e<=122}},3589:(e,t,n)=>{"use strict";n.d(t,{YW:()=>D,qg:()=>R});var i=n(3723),r=n(7531),s=n(1553),o=n(1643),a=n(5160),l=n(601);const c="**",h="/",u="[/\\\\]",d="[^/\\\\]",g=/\//g;function f(e,t){switch(e){case 0:return"";case 1:return`${d}*?`;default:return`(?:${u}|${d}+${u}${t?`|${u}${d}+`:""})*?`}}function m(e,t){if(!e)return[];const n=[];let i=!1,r=!1,s="";for(const o of e){switch(o){case t:if(!i&&!r){n.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1;break}s+=o}return s&&n.push(s),n}function p(e){if(!e)return"";let t="";const n=m(e,h);if(n.every((e=>e===c)))t=".*";else{let e=!1;n.forEach(((i,r)=>{if(i===c){if(e)return;t+=f(2,r===n.length-1)}else{let e=!1,s="",o=!1,a="";for(const n of i)if("}"!==n&&e)s+=n;else if(!o||"]"===n&&a)switch(n){case"{":e=!0;continue;case"[":o=!0;continue;case"}":{const n=m(s,","),i=`(?:${n.map((e=>p(e))).join("|")})`;t+=i,e=!1,s="";break}case"]":t+="["+a+"]",o=!1,a="";break;case"?":t+=d;continue;case"*":t+=f(1);continue;default:t+=(0,l.bm)(n)}else{let e;e="-"===n?n:"^"!==n&&"!"!==n||a?n===h?"":(0,l.bm)(n):"^",a+=e}rx(e,t))).filter((e=>e!==S)),e),i=n.length;if(!i)return S;if(1===i)return n[0];const r=function(t,i){for(let r=0,s=n.length;r!!e.allBasenames));s&&(r.allBasenames=s.allBasenames);const o=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(r.allPaths=o),r}function O(e,t,n){const i=o.Vn===o.SA.sep,r=i?e:e.replace(g,o.Vn),s=o.Vn+r,a=o.SA.sep+e;let l;return l=n?function(n,o){return"string"!==typeof n||n!==r&&!n.endsWith(s)&&(i||n!==e&&!n.endsWith(a))?null:t}:function(n,s){return"string"!==typeof n||n!==r&&(i||n!==e)?null:t},l.allPaths=[(n?"*/":"./")+e],l}function M(e){try{const t=new RegExp(`^${p(e)}$`);return function(n){return t.lastIndex=0,"string"===typeof n&&t.test(n)?e:null}}catch(t){return S}}function D(e,t,n){return!(!e||"string"!==typeof t)&&R(e)(t,void 0,n)}function R(e,t={}){if(!e)return w;if("string"===typeof e||B(e)){const n=x(e,t);if(n===S)return w;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return F(e,t)}function B(e){const t=e;return!!t&&("string"===typeof t.base&&"string"===typeof t.pattern)}function F(e,t){const n=V(Object.getOwnPropertyNames(e).map((n=>P(n,e[n],t))).filter((e=>e!==S))),r=n.length;if(!r)return S;if(!n.some((e=>!!e.requiresSiblings))){if(1===r)return n[0];const e=function(e,t){let r;for(let s=0,o=n.length;s{for(const e of r){const t=await e;if("string"===typeof t)return t}return null})():null},t=n.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,r){let s,a;for(let l=0,c=n.length;l{for(const e of a){const t=await e;if("string"===typeof t)return t}return null})():null},a=n.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}function P(e,t,n){if(!1===t)return S;const r=x(e,n);if(r===S)return S;if("boolean"===typeof t)return r;if(t){const n=t.when;if("string"===typeof n){const t=(t,s,o,a)=>{if(!a||!r(t,s))return null;const l=n.replace("$(basename)",(()=>o)),c=a(l);return(0,i.Qg)(c)?c.then((t=>t?e:null)):c?e:null};return t.requiresSiblings=!0,t}}return r}function V(e,t){const n=e.filter((e=>!!e.basenames));if(n.length<2)return e;const i=n.reduce(((e,t)=>{const n=t.basenames;return n?e.concat(n):e}),[]);let r;if(t){r=[];for(let e=0,n=i.length;e{const n=t.patterns;return n?e.concat(n):e}),[]);const s=function(e,t){if("string"!==typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?r[n]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;const o=e.filter((e=>!e.basenames));return o.push(s),o}},5647:(e,t,n)=>{"use strict";n.d(t,{e2:()=>a,sN:()=>r,v7:()=>f});var i=n(601);function r(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?l(e,t):c(e,t);case"string":return a(e,t);case"boolean":return o(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}}function s(e,t){return(t<<5)-t+e|0}function o(e,t){return s(e?433:863,t)}function a(e,t){t=s(149417,t);for(let n=0,i=e.length;nr(t,e)),t)}function c(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,n)=>(t=a(n,t),r(e[n],t))),t)}function h(e,t,n=32){const i=n-t,r=~((1<>>i)>>>0}function u(e,t=0,n=e.byteLength,i=0){for(let r=0;re.toString(16).padStart(2,"0"))).join(""):d((e>>>0).toString(16),t/4)}class f{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let r,s,o=this._buffLen,a=this._leftoverHighSurrogate;0!==a?(r=a,s=-1,a=0):(r=e.charCodeAt(0),s=0);while(1){let l=r;if(i.pc(r)){if(!(s+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),g(this._h0)+g(this._h1)+g(this._h2)+g(this._h3)+g(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,u(this._buff,this._buffLen),this._buffLen>56&&(this._step(),u(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=f._bigBlock32,t=this._buffDV;for(let h=0;h<64;h+=4)e.setUint32(h,t.getUint32(h,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,h(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let n,i,r,s=this._h0,o=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let u=0;u<80;u++)u<20?(n=o&a|~o&l,i=1518500249):u<40?(n=o^a^l,i=1859775393):u<60?(n=o&a|o&l|a&l,i=2400959708):(n=o^a^l,i=3395469782),r=h(s,5)+n+c+i+e.getUint32(4*u,!1)&4294967295,c=l,l=a,a=h(o,30),o=s,s=r;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}},5837:(e,t,n)=>{"use strict";var i;n.d(t,{f:()=>i}),function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function i(){return n}function*r(e){yield e}function s(e){return t(e)?e:r(e)}function o(e){return e||n}function*a(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function l(e){return!e||!0===e[Symbol.iterator]().next().done}function c(e){return e[Symbol.iterator]().next().value}function h(e,t){let n=0;for(const i of e)if(t(i,n++))return!0;return!1}function u(e,t){for(const n of e)if(t(n))return n}function*d(e,t){for(const n of e)t(n)&&(yield n)}function*g(e,t){let n=0;for(const i of e)yield t(i,n++)}function*f(e,t){let n=0;for(const i of e)yield*t(i,n++)}function*m(...e){for(const t of e)yield*t}function p(e,t,n){let i=n;for(const r of e)i=t(i,r);return i}function*b(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t{"use strict";n.d(t,{d:()=>i});class i{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},8894:(e,t,n)=>{"use strict";function i(e,t){const n=this;let i,r=!1;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}n.d(t,{jG:()=>p,$w:()=>_,Cm:()=>m,HE:()=>b,qE:()=>g,AS:()=>d,VD:()=>c,s:()=>f,Ay:()=>l});var r=n(5837);const s=!1;let o=null;function a(e){o=e}if(s){const e="__is_disposable_tracked__";a(new class{trackDisposable(t){const n=new Error("Potentially leaked disposable").stack;setTimeout((()=>{t[e]||console.log(n)}),3e3)}setParent(t,n){if(t&&t!==p.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==p.None)try{t[e]=!0}catch{}}markAsSingleton(e){}})}function l(e){return o?.trackDisposable(e),e}function c(e){o?.markAsDisposed(e)}function h(e,t){o?.setParent(e,t)}function u(e,t){if(o)for(const n of e)o.setParent(n,t)}function d(e){if(r.f.is(e)){const n=[];for(const i of e)if(i)try{i.dispose()}catch(t){n.push(t)}if(1===n.length)throw n[0];if(n.length>1)throw new AggregateError(n,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function g(...e){const t=f((()=>d(e)));return u(e,t),t}function f(e){const t=l({dispose:i((()=>{c(t),e()}))});return t}class m{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,l(this)}dispose(){this._isDisposed||(c(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{d(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return h(e,this),this._isDisposed?m.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),h(e,null))}}class p{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new m,l(this),h(this._store,this)}dispose(){c(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class b{constructor(){this._isDisposed=!1,l(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&h(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,c(this),this._value?.dispose(),this._value=void 0}}class _{constructor(){this._store=new Map,this._isDisposed=!1,l(this)}dispose(){c(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{d(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},7806:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});class i{static{this.Undefined=new i(void 0)}constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}}class r{constructor(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===i.Undefined}clear(){let e=this._first;while(e!==i.Undefined){const t=e.next;e.prev=i.Undefined,e.next=i.Undefined,e=t}this._first=i.Undefined,this._last=i.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new i(e);if(this._first===i.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==i.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==i.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==i.Undefined&&e.next!==i.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===i.Undefined&&e.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):e.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):e.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==i.Undefined)yield e.element,e=e.next}}},1553:(e,t,n)=>{"use strict";var i,r;n.d(t,{cO:()=>u,db:()=>d,fT:()=>a,qK:()=>h});class s{constructor(e,t){this.uri=e,this.value=t}}function o(e){return Array.isArray(e)}class a{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[i]="ResourceMap",e instanceof a)this.map=new Map(e.map),this.toKey=t??a.defaultToKey;else if(o(e)){this.map=new Map,this.toKey=t??a.defaultToKey;for(const[t,n]of e)this.set(t,n)}else this.map=new Map,this.toKey=e??a.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(const[n,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(i=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class l{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;while(i){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class c extends l{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class h extends c{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class d{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}},3911:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});const i=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},6657:(e,t,n)=>{"use strict";n.d(t,{ny:()=>i,v$:()=>c,zl:()=>m});var i,r=n(4396),s=n(5160),o=n(601),a=n(9133),l=n(1643);function c(e,t){return a.r.isUri(e)?(0,o.Q_)(e.scheme,t):(0,o.ns)(e,t+":")}(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(i||(i={}));const h="tkn";class u{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,i.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(u){return r.dz(u),e}const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&-1===n.indexOf("[")&&(n=`[${n}]`);const o=this._ports[t],l=this._connectionTokens[t];let c=`path=${encodeURIComponent(e.path)}`;return"string"===typeof l&&(c+=`&${h}=${encodeURIComponent(l)}`),a.r.from({scheme:s.HZ?this._preferredWebSchema:i.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:c})}}const d=new u,g="vscode-app";class f{static{this.FALLBACK_AUTHORITY=g}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===i.vscodeRemote?d.rewrite(e):e.scheme!==i.file||!s.ib&&s.lg!==`${i.vscodeFileResource}://${f.FALLBACK_AUTHORITY}`?e:e.with({scheme:i.vscodeFileResource,authority:e.authority||f.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const n=l.fj(t,e);return a.r.file(n)}return a.r.parse(t.toUrl(e))}}const m=new f;var p;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";function i(e){let i;"string"===typeof e?i=new URL(e).searchParams:e instanceof URL?i=e.searchParams:a.r.isUri(e)&&(i=new URL(e.toString(!0)).searchParams);const r=i?.get(n);if(r)return t.get(r)}function r(e,t,i){if(!globalThis.crossOriginIsolated)return;const r=t&&i?"3":i?"2":"1";e instanceof URLSearchParams?e.set(n,r):e[n]=r}e.getHeadersFromQuery=i,e.addSearchParam=r})(p||(p={}))},5603:(e,t,n)=>{"use strict";n.d(t,{V0:()=>s,aI:()=>i,kT:()=>o});Object.prototype.hasOwnProperty;function i(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;nfunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},i={};for(const r of e)i[r]=n(r);return i}},1643:(e,t,n)=>{"use strict";n.d(t,{P8:()=>B,pD:()=>R,LC:()=>F,fj:()=>O,S8:()=>I,SA:()=>A,V8:()=>D,hd:()=>M,Vn:()=>P,IN:()=>N});var i=n(5160);let r;const s=globalThis.vscode;if("undefined"!==typeof s&&"undefined"!==typeof s.process){const e=s.process;r={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else r="undefined"!==typeof process&&"string"===typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env["VSCODE_CWD"]||process.cwd()}}:{get platform(){return i.uF?"win32":i.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const o=r.cwd,a=r.env,l=r.platform,c=65,h=97,u=90,d=122,g=46,f=47,m=92,p=58,b=63;class _ extends Error{constructor(e,t,n){let i;"string"===typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${r} ${i} of type ${t}`;s+=". Received type "+typeof n,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function k(e,t){if(null===e||"object"!==typeof e)throw new _(t,"Object",e)}function v(e,t){if("string"!==typeof e)throw new _(t,"string",e)}const C="win32"===l;function y(e){return e===f||e===m}function L(e){return e===f}function w(e){return e>=c&&e<=u||e>=h&&e<=d}function S(e,t,n,i){let r="",s=0,o=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c2){const e=r.lastIndexOf(n);-1===e?(r="",s=0):(r=r.slice(0,e),s=r.length-1-r.lastIndexOf(n)),o=c,a=0;continue}if(0!==r.length){r="",s=0,o=c,a=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(o+1,c)}`:r=e.slice(o+1,c),s=c-o-1;o=c,a=0}else l===g&&-1!==a?++a:a=-1}return r}function x(e){return e?`${"."===e[0]?"":"."}${e}`:""}function E(e,t){k(t,"pathObject");const n=t.dir||t.root,i=t.base||`${t.name||""}${x(t.ext)}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const N={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],v(s,`paths[${r}]`),0===s.length)continue}else 0===t.length?s=o():(s=a[`=${t}`]||o(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===m)&&(s=`${t}\\`));const l=s.length;let c=0,h="",u=!1;const d=s.charCodeAt(0);if(1===l)y(d)&&(c=1,u=!0);else if(y(d))if(u=!0,y(s.charCodeAt(1))){let e=2,t=e;while(e2&&y(s.charCodeAt(2))&&(u=!0,c=3));if(h.length>0)if(t.length>0){if(h.toLowerCase()!==t.toLowerCase())continue}else t=h;if(i){if(t.length>0)break}else if(n=`${s.slice(c)}\\${n}`,i=u,u&&t.length>0)break}return n=S(n,!i,"\\",y),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){v(e,"path");const t=e.length;if(0===t)return".";let n,i=0,r=!1;const s=e.charCodeAt(0);if(1===t)return L(s)?"\\":e;if(y(s))if(r=!0,y(e.charCodeAt(1))){let r=2,s=r;while(r2&&y(e.charCodeAt(2))&&(r=!0,i=3));let o=i0&&y(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?r?`\\${o}`:o:r?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){v(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return y(n)||t>2&&w(n)&&e.charCodeAt(1)===p&&y(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let s=0;s0&&(void 0===t?t=n=i:t+=`\\${i}`)}if(void 0===t)return".";let i=!0,r=0;if("string"===typeof n&&y(n.charCodeAt(0))){++r;const e=n.length;e>1&&y(n.charCodeAt(1))&&(++r,e>2&&(y(n.charCodeAt(2))?++r:i=!1))}if(i){while(r=2&&(t=`\\${t.slice(r)}`)}return N.normalize(t)},relative(e,t){if(v(e,"from"),v(t,"to"),e===t)return"";const n=N.resolve(e),i=N.resolve(t);if(n===i)return"";if(e=n.toLowerCase(),t=i.toLowerCase(),e===t)return"";let r=0;while(rr&&e.charCodeAt(s-1)===m)s--;const o=s-r;let a=0;while(aa&&t.charCodeAt(l-1)===m)l--;const c=l-a,h=oh){if(t.charCodeAt(a+d)===m)return i.slice(a+d+1);if(2===d)return i.slice(a+d)}o>h&&(e.charCodeAt(r+d)===m?u=d:2===d&&(u=3)),-1===u&&(u=0)}let g="";for(d=r+u+1;d<=s;++d)d!==s&&e.charCodeAt(d)!==m||(g+=0===g.length?"..":"\\..");return a+=u,g.length>0?`${g}${i.slice(a,l)}`:(i.charCodeAt(a)===m&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e||0===e.length)return e;const t=N.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===m){if(t.charCodeAt(1)===m){const e=t.charCodeAt(2);if(e!==b&&e!==g)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(w(t.charCodeAt(0))&&t.charCodeAt(1)===p&&t.charCodeAt(2)===m)return`\\\\?\\${t}`;return e},dirname(e){v(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const r=e.charCodeAt(0);if(1===t)return y(r)?e:".";if(y(r)){if(n=i=1,y(e.charCodeAt(1))){let r=2,s=r;while(r2&&y(e.charCodeAt(2))?3:2,i=n);let s=-1,o=!0;for(let a=t-1;a>=i;--a)if(y(e.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&v(t,"suffix"),v(e,"path");let n,i=0,r=-1,s=!0;if(e.length>=2&&w(e.charCodeAt(0))&&e.charCodeAt(1)===p&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(y(l)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=i;--n)if(y(e.charCodeAt(n))){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){v(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===p&&w(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(y(t)){if(!s){i=a+1;break}}else-1===r&&(s=!1,r=a+1),t===g?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:E.bind(null,"\\"),parse(e){v(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,r=e.charCodeAt(0);if(1===n)return y(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(y(r)){if(i=1,y(e.charCodeAt(1))){let t=2,r=t;while(t0&&(t.root=e.slice(0,i));let s=-1,o=i,a=-1,l=!0,c=e.length-1,h=0;for(;c>=i;--c)if(r=e.charCodeAt(c),y(r)){if(!l){o=c+1;break}}else-1===a&&(l=!1,a=c+1),r===g?-1===s?s=c:1!==h&&(h=1):-1!==s&&(h=-1);return-1!==a&&(-1===s||0===h||1===h&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==i?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},T=(()=>{if(C){const e=/\\/g;return()=>{const t=o().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>o()})(),A={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const r=i>=0?e[i]:T();v(r,`paths[${i}]`),0!==r.length&&(t=`${r}/${t}`,n=r.charCodeAt(0)===f)}return t=S(t,!n,"/",L),n?`/${t}`:t.length>0?t:"."},normalize(e){if(v(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===f,n=e.charCodeAt(e.length-1)===f;return e=S(e,!t,"/",L),0===e.length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return v(e,"path"),e.length>0&&e.charCodeAt(0)===f},join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":A.normalize(t)},relative(e,t){if(v(e,"from"),v(t,"to"),e===t)return"";if(e=A.resolve(e),t=A.resolve(t),e===t)return"";const n=1,i=e.length,r=i-n,s=1,o=t.length-s,a=ra){if(t.charCodeAt(s+c)===f)return t.slice(s+c+1);if(0===c)return t.slice(s+c)}else r>a&&(e.charCodeAt(n+c)===f?l=c:0===c&&(l=0));let h="";for(c=n+l+1;c<=i;++c)c!==i&&e.charCodeAt(c)!==f||(h+=0===h.length?"..":"/..");return`${h}${t.slice(s+l)}`},toNamespacedPath(e){return e},dirname(e){if(v(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===f;let n=-1,i=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===f){if(!i){n=r;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&v(t,"ext"),v(e,"path");let n,i=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===f){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===f){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){v(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==f)-1===i&&(r=!1,i=o+1),a===g?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=o+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:E.bind(null,"/"),parse(e){v(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===f;let i;n?(t.root="/",i=1):i=0;let r=-1,s=0,o=-1,a=!0,l=e.length-1,c=0;for(;l>=i;--l){const t=e.charCodeAt(l);if(t!==f)-1===o&&(a=!1,o=l+1),t===g?-1===r?r=l:1!==c&&(c=1):-1!==r&&(c=-1);else if(!a){s=l+1;break}}if(-1!==o){const i=0===s&&n?1:s;-1===r||0===c||1===c&&r===o-1&&r===s+1?t.base=t.name=e.slice(i,o):(t.name=e.slice(i,r),t.base=e.slice(i,o),t.ext=e.slice(r,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};A.win32=N.win32=N,A.posix=N.posix=A;const I=C?N.normalize:A.normalize,O=C?N.join:A.join,M=C?N.resolve:A.resolve,D=C?N.relative:A.relative,R=C?N.dirname:A.dirname,B=C?N.basename:A.basename,F=C?N.extname:A.extname,P=C?N.sep:A.sep},5160:(e,t,n)=>{"use strict";n.d(t,{H8:()=>V,HZ:()=>T,OS:()=>R,UP:()=>q,_p:()=>D,cm:()=>P,gm:()=>z,ib:()=>N,j9:()=>E,lg:()=>I,nr:()=>j,uF:()=>S,zx:()=>x});var i=n(1337);const r="en";let s,o,a=!1,l=!1,c=!1,h=!1,u=!1,d=!1,g=!1,f=!1,m=!1,p=!1,b=null,_=null,k=null;const v=globalThis;let C;"undefined"!==typeof v.vscode&&"undefined"!==typeof v.vscode.process?C=v.vscode.process:"undefined"!==typeof process&&"string"===typeof process?.versions?.node&&(C=process);const y="string"===typeof C?.versions?.electron,L=y&&"renderer"===C?.type;if("object"===typeof C){a="win32"===C.platform,l="darwin"===C.platform,c="linux"===C.platform,h=c&&!!C.env["SNAP"]&&!!C.env["SNAP_REVISION"],g=y,m=!!C.env["CI"]||!!C.env["BUILD_ARTIFACTSTAGINGDIRECTORY"],s=r,b=r;const e=C.env["VSCODE_NLS_CONFIG"];if(e)try{const t=JSON.parse(e);s=t.userLocale,_=t.osLocale,b=t.resolvedLanguage||r,k=t.languagePack?.translationsConfigFile}catch(W){}u=!0}else"object"!==typeof navigator||L?console.error("Unable to resolve platform."):(o=navigator.userAgent,a=o.indexOf("Windows")>=0,l=o.indexOf("Macintosh")>=0,f=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=o.indexOf("Linux")>=0,p=o?.indexOf("Mobi")>=0,d=!0,b=i.i8()||r,s=navigator.language.toLowerCase(),_=s);let w=0;l?w=1:a?w=3:c&&(w=2);const S=a,x=l,E=c,N=u,T=d,A=d&&"function"===typeof v.importScripts,I=A?v.origin:void 0,O=o,M="function"===typeof v.postMessage&&!v.importScripts,D=(()=>{if(M){const e=[];v.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n{const i=++t;e.push({id:i,callback:n}),v.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})(),R=l||f?2:a?1:3;let B=!0,F=!1;function P(){if(!F){F=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);B=513===t[0]}return B}const V=!!(O&&O.indexOf("Chrome")>=0),z=!!(O&&O.indexOf("Firefox")>=0),j=!!(!V&&O&&O.indexOf("Safari")>=0),q=!!(O&&O.indexOf("Edg/")>=0);O&&O.indexOf("Android")},4366:(e,t,n)=>{"use strict";n.d(t,{B6:()=>m,P8:()=>d});var i=n(7531),r=n(6657),s=n(1643),o=n(5160),a=n(601),l=n(9133);function c(e){return(0,l.I)(e,!0)}class h{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===r.ny.file)return i._1(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(g(e.authority,t.authority))return i._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return d(e)||e.authority}basename(e){return s.SA.basename(e.path)}extname(e){return s.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===r.ny.file?t=l.r.file(s.pD(c(e))).path:(t=s.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===r.ny.file?l.r.file(s.S8(c(e))).path:s.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!g(e.authority,t.authority))return;if(e.scheme===r.ny.file){const n=s.V8(c(e),c(t));return o.uF?i.TH(n):n}let n=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(n.length,a.length);ei.Zn(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.Vn){return f(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.Vn){let n=!1;if(e.scheme===r.ny.file){const r=c(e);n=void 0!==r&&r.length===i.Zn(r).length&&r[r.length-1]===t}else{t="/";const i=e.path;n=1===i.length&&47===i.charCodeAt(i.length-1)}return n||f(e,t)?e:e.with({path:e.path+"/"})}}const u=new h((()=>!1)),d=(new h((e=>e.scheme!==r.ny.file||!o.j9)),new h((e=>!0)),u.isEqual.bind(u),u.isEqualOrParent.bind(u),u.getComparisonKey.bind(u),u.basenameOrAuthority.bind(u),u.basename.bind(u)),g=(u.extname.bind(u),u.dirname.bind(u),u.joinPath.bind(u),u.normalizePath.bind(u),u.relativePath.bind(u),u.resolvePath.bind(u),u.isAbsolutePath.bind(u),u.isEqualAuthority.bind(u)),f=u.hasTrailingPathSeparator.bind(u);u.removeTrailingPathSeparator.bind(u),u.addTrailingPathSeparator.bind(u);var m;(function(e){function t(t){const n=new Map,i=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));i.split(";").forEach((e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)}));const r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(e.META_DATA_MIME,r),n}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(m||(m={}))},4240:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const i=globalThis.performance&&"function"===typeof globalThis.performance.now;class r{static create(e){return new r(e)}constructor(e){this._now=i&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},601:(e,t,n)=>{"use strict";n.d(t,{$X:()=>D,AV:()=>s,E_:()=>A,HG:()=>d,LJ:()=>y,LU:()=>P,NB:()=>l,OS:()=>c,Q_:()=>k,Ss:()=>B,UD:()=>f,Wv:()=>_,Z5:()=>w,_J:()=>M,aC:()=>O,bm:()=>a,eY:()=>h,jy:()=>o,km:()=>E,lT:()=>g,ne:()=>R,ns:()=>v,pc:()=>C,r_:()=>F,tk:()=>V,tl:()=>W,uz:()=>u,y_:()=>U,z_:()=>L});var i=n(7389),r=n(5661);function s(e){return!e||"string"!==typeof e||0===e.trim().length}function o(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;while(e.indexOf(t,i)===i)i+=n;return e.substring(i)}function c(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function h(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function u(e){return e.split(/\r\n|\r|\n/)}function d(e){for(let t=0,n=e.length;t=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function f(e,t){return et?1:0}function m(e,t,n=0,i=e.length,r=0,s=t.length){for(;ns)return 1}const o=i-n,a=s-r;return oa?1:0}function p(e,t,n=0,i=e.length,r=0,s=t.length){for(;n=128||a>=128)return m(e.toLowerCase(),t.toLowerCase(),n,i,r,s);b(o)&&(o-=32),b(a)&&(a-=32);const l=o-a;if(0!==l)return l}const o=i-n,a=s-r;return oa?1:0}function b(e){return e>=97&&e<=122}function _(e){return e>=65&&e<=90}function k(e,t){return e.length===t.length&&0===p(e,t)}function v(e,t){const n=t.length;return!(t.length>e.length)&&0===p(e,t,0,n)}function C(e){return 55296<=e&&e<=56319}function y(e){return 56320<=e&&e<=57343}function L(e,t){return t-56320+(e-55296<<10)+65536}function w(e,t,n){const i=e.charCodeAt(n);if(C(i)&&n+11){const i=e.charCodeAt(t-2);if(C(i))return L(i,n)}return n}class x{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=S(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=w(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class E{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new x(e,t)}nextGraphemeLength(){const e=j.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.nextCodePoint());while(!t.eol()){const n=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());if(z(i,r)){t.setOffset(n);break}i=r}return t.offset-n}prevGraphemeLength(){const e=j.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.prevCodePoint());while(t.offset>0){const n=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());if(z(r,i)){t.setOffset(n);break}i=r}return n-t.offset}eol(){return this._iterator.eol()}}let N;function T(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function A(e){return N||(N=T()),N.test(e)}const I=/^[\t\n\r\x20-\x7E]*$/;function O(e){return I.test(e)}const M=/[\u2028\u2029]/;function D(e){return M.test(e)}function R(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function B(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const F=String.fromCharCode(65279);function P(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function V(e){const t=26;return e%=2*t,et[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}function q(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}class W{static{this.ambiguousCharacterData=new r.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new i.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let n=0;n!e.startsWith("_")&&e in r));0===o.length&&(o=["_default"]);for(const c of o){const e=t(r[c]);s=i(s,e)}const a=t(r["_common"]),l=n(a,s);return new W(l)}))}static getInstance(e){return W.cache.get(Array.from(e))}static{this._locales=new r.d((()=>Object.keys(W.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return W._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class U{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(U.getRawData())),this._data}static isInvisibleCharacter(e){return U.getData().has(e)}static get codePoints(){return U.getData()}}},322:(e,t,n)=>{"use strict";function i(e){return"string"===typeof e}function r(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(e){return"undefined"===typeof e}function o(e){return s(e)||null===e}n.d(t,{Gv:()=>r,Kg:()=>i,b0:()=>s,z:()=>o})},2647:(e,t,n)=>{"use strict";function i(e){return e<0?0:e>255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,{W:()=>i,j:()=>r})},9133:(e,t,n)=>{"use strict";n.d(t,{I:()=>v,r:()=>f});var i=n(1643),r=n(5160);const s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function c(e,t){return e||t?e:"file"}function h(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d;break}return t}const u="",d="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){return e instanceof f||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"string"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}constructor(e,t,n,i,r,s=!1){"object"===typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=c(e,s),this.authority=t||u,this.path=h(this.scheme,n||u),this.query=i||u,this.fragment=r||u,l(this,s))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===i?i=this.path:null===i&&(i=u),void 0===r?r=this.query:null===r&&(r=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new p(t,n,i,r,s)}static parse(e,t=!1){const n=g.exec(e);return n?new p(n[2]||u,w(n[4]||u),w(n[5]||u),w(n[7]||u),w(n[9]||u),t):new p(u,u,u,u,u)}static file(e){let t=u;if(r.uF&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new p("file",t,e,u,u)}static from(e,t){const n=new p(e.scheme,e.authority,e.path,e.query,e.fragment,t);return n}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=r.uF&&"file"===e.scheme?f.file(i.IN.join(v(e,!0),...t)).path:i.SA.join(e.path,...t),e.with({path:n})}toString(e=!1){return C(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{const t=new p(e);return t._formatted=e.external??null,t._fsPath=e._sep===m?e.fsPath??null:null,t}}return e}}const m=r.uF?1:void 0;class p extends f{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const b={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function _(e,t,n){let i,r=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=b[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function k(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.uF&&(n=n.replace(/\//g,"\\")),n}function C(e,t){const n=t?k:_;let i="",{scheme:r,authority:s,path:o,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=d,i+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),l&&(i+="#",i+=t?l:_(l,!1,!1)),i}function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}const L=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(e){return e.match(L)?e.replace(L,(e=>y(e))):e}},1352:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SimpleWorkerClient:()=>v,SimpleWorkerServer:()=>L,create:()=>w,logOnceWebWorkerWarning:()=>g});var i=n(4396),r=n(231),s=n(8894),o=n(6657),a=n(5160),l=n(601);const c=!0,h="default",u="$initialize";let d=!1;function g(e){a.HZ&&(d||(d=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class f{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.method=i,this.args=r,this.type=0}}class m{constructor(e,t,n,i){this.vsWorker=e,this.seq=t,this.res=n,this.err=i,this.type=1}}class p{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=i,this.arg=r,this.type=2}}class b{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class _{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class k{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const i=String(++this._lastSentReq);return new Promise(((r,s)=>{this._pendingReplies[i]={resolve:r,reject:s},this._send(new f(this._workerId,i,e,t,n))}))}listen(e,t,n){let i=null;const s=new r.vl({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new p(this._workerId,i,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new _(this._workerId,i)),i=null}});return s.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const n={get:(n,i)=>("string"!==typeof i||n[i]||(y(i)?n[i]=t=>this.listen(e,i,t):C(i)?n[i]=this.listen(e,i,void 0):36===i.charCodeAt(0)&&(n[i]=async(...n)=>(await(t?.()),this.sendMessage(e,i,n)))),n[i])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;return e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req,n=this._handler.handleMessage(e.channel,e.method,e.args);n.then((e=>{this._send(new m(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,i.cU)(e.detail)),this._send(new m(this._workerId,t,void 0,(0,i.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new b(this._workerId,t,e))}));this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let n=0;n{this._protocol.handleMessage(e)}),(e=>{(0,i.dz)(e)}))),this._protocol=new k({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)}),this._protocol.setWorkerId(this._worker.getId());let n=null;const r=globalThis.require;"undefined"!==typeof r&&"function"===typeof r.getConfig?n=r.getConfig():"undefined"!==typeof globalThis.requirejs&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(h,u,[this._worker.getId(),JSON.parse(JSON.stringify(n)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(h,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,n){const i=this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!==typeof i[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(r){return Promise.reject(r)}}_handleEvent(e,t,n){const i=this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on main thread`);if(y(t)){const r=i[t].call(i,n);if("function"!==typeof r)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return r}if(C(t)){const n=i[t];if("function"!==typeof n)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return n}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function C(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function y(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class L{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new k({sendMessage:(t,n)=>{e(t,n)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===h&&t===u)return this.initialize(n[0],n[1],n[2]);const i=e===h?this._requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!==typeof i[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(r){return Promise.reject(r)}}_handleEvent(e,t,n){const i=e===h?this._requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(y(t)){const e=i[t].call(i,n);if("function"!==typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(C(t)){const e=i[t];if("function"!==typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,i){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){if(t&&("undefined"!==typeof t.baseUrl&&delete t["baseUrl"],"undefined"!==typeof t.paths&&"undefined"!==typeof t.paths.vs&&delete t.paths["vs"],"undefined"!==typeof t.trustedTypesPolicy&&delete t["trustedTypesPolicy"],t.catchError=!0,globalThis.require.config(t)),c){const e=o.zl.asBrowserUri(`${i}.js`).toString(!0);return n(5890)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}return new Promise(((e,t)=>{const n=globalThis.require;n([i],(n=>{this._requestHandler=n.create(this),this._requestHandler?e():t(new Error("No RequestHandler!"))}),t)}))}this._requestHandler=this._requestHandlerFactory(this)}}function w(e){return new L(e,null)}},4529:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(2647);class r{constructor(e){const t=(0,i.W)(e);this._defaultValue=t,this._asciiMap=r._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=(0,i.W)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}},2764:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>b,aZ:()=>p,l5:()=>C,lQ:()=>k,s7:()=>w,sH:()=>y,sN:()=>_,ss:()=>v,yI:()=>m,zp:()=>L});var i=n(1337),r=n(5476),s=n(7732),o=n(3711);const a=(0,s.x1A)("editor.lineHighlightBackground",null,i.kg("lineHighlight","Background color for the highlight of line at the cursor position.")),l=((0,s.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.b1q},i.kg("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),(0,s.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},i.kg("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("rangeHighlightBorder","Background color of the border around highlighted ranges.")),(0,s.x1A)("editor.symbolHighlightBackground",{dark:s.Ubg,light:s.Ubg,hcDark:null,hcLight:null},i.kg("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("symbolHighlightBorder","Background color of the border around highlighted symbols.")),(0,s.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:r.Q1.black,hcDark:r.Q1.white,hcLight:"#0F4A85"},i.kg("caret","Color of the editor cursor."))),c=(0,s.x1A)("editorCursor.background",null,i.kg("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),h=((0,s.x1A)("editorMultiCursor.primary.foreground",l,i.kg("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.primary.background",c,i.kg("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorMultiCursor.secondary.foreground",l,i.kg("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.secondary.background",c,i.kg("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},i.kg("editorWhitespaces","Color of whitespace characters in the editor."))),u=((0,s.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorLineNumbers","Color of editor line numbers.")),(0,s.x1A)("editorIndentGuide.background",h,i.kg("editorIndentGuides","Color of the editor indentation guides."),!1,i.kg("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead."))),d=(0,s.x1A)("editorIndentGuide.activeBackground",h,i.kg("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,i.kg("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),g=((0,s.x1A)("editorIndentGuide.background1",u,i.kg("editorIndentGuides1","Color of the editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.background2","#00000000",i.kg("editorIndentGuides2","Color of the editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.background3","#00000000",i.kg("editorIndentGuides3","Color of the editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.background4","#00000000",i.kg("editorIndentGuides4","Color of the editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.background5","#00000000",i.kg("editorIndentGuides5","Color of the editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.background6","#00000000",i.kg("editorIndentGuides6","Color of the editor indentation guides (6).")),(0,s.x1A)("editorIndentGuide.activeBackground1",d,i.kg("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.activeBackground2","#00000000",i.kg("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.activeBackground3","#00000000",i.kg("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.activeBackground4","#00000000",i.kg("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.activeBackground5","#00000000",i.kg("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.activeBackground6","#00000000",i.kg("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),(0,s.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.buw,hcLight:s.buw},i.kg("editorActiveLineNumber","Color of editor active line number"),!1,i.kg("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."))),f=((0,s.x1A)("editorLineNumber.activeForeground",g,i.kg("editorActiveLineNumber","Color of editor active line number")),(0,s.x1A)("editorLineNumber.dimmedForeground",null,i.kg("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),(0,s.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:r.Q1.lightgrey,hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorRuler","Color of the editor rulers.")),(0,s.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},i.kg("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},i.kg("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.b1q,hcLight:s.b1q},i.kg("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},i.kg("editorOverviewRulerBorder","Color of the overview ruler border.")),(0,s.x1A)("editorOverviewRuler.background",null,i.kg("editorOverviewRulerBackground","Background color of the editor overview ruler.")),(0,s.x1A)("editorGutter.background",s.YtV,i.kg("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:s.b1q},i.kg("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.x1A)("editorUnnecessaryCode.opacity",{dark:r.Q1.fromHex("#000a"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),(0,s.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:r.Q1.fromHex("#292929").transparent(.8)},i.kg("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.x1A)("editorGhostText.foreground",{dark:r.Q1.fromHex("#ffffff56"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.x1A)("editorGhostText.background",null,i.kg("editorGhostTextBackground","Background color of the ghost text in the editor.")),new r.Q1(new r.bU(0,122,204,.6))),m=((0,s.x1A)("editorOverviewRuler.rangeHighlightForeground",f,i.kg("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editorOverviewRuler.errorForeground",{dark:new r.Q1(new r.bU(255,18,18,.7)),light:new r.Q1(new r.bU(255,18,18,.7)),hcDark:new r.Q1(new r.bU(255,50,50,1)),hcLight:"#B5200D"},i.kg("overviewRuleError","Overview ruler marker color for errors."))),p=(0,s.x1A)("editorOverviewRuler.warningForeground",{dark:s.Hng,light:s.Hng,hcDark:s.Stt,hcLight:s.Stt},i.kg("overviewRuleWarning","Overview ruler marker color for warnings.")),b=(0,s.x1A)("editorOverviewRuler.infoForeground",{dark:s.pOz,light:s.pOz,hcDark:s.IIb,hcLight:s.IIb},i.kg("overviewRuleInfo","Overview ruler marker color for infos.")),_=(0,s.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},i.kg("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),k=(0,s.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},i.kg("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),v=(0,s.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},i.kg("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),C=(0,s.x1A)("editorBracketHighlight.foreground4","#00000000",i.kg("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),y=(0,s.x1A)("editorBracketHighlight.foreground5","#00000000",i.kg("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),L=(0,s.x1A)("editorBracketHighlight.foreground6","#00000000",i.kg("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),w=(0,s.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new r.Q1(new r.bU(255,18,18,.8)),light:new r.Q1(new r.bU(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},i.kg("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));(0,s.x1A)("editorBracketPairGuide.background1","#00000000",i.kg("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background2","#00000000",i.kg("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background3","#00000000",i.kg("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background4","#00000000",i.kg("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background5","#00000000",i.kg("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background6","#00000000",i.kg("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground1","#00000000",i.kg("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground2","#00000000",i.kg("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground3","#00000000",i.kg("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground4","#00000000",i.kg("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground5","#00000000",i.kg("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground6","#00000000",i.kg("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorUnicodeHighlight.border",s.Hng,i.kg("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.x1A)("editorUnicodeHighlight.background",s.whs,i.kg("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));(0,o.zy)(((e,t)=>{const n=e.getColor(s.YtV),i=e.getColor(a),r=i&&!i.isTransparent()?i:n;r&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${r}; }`)}))},6627:(e,t,n)=>{"use strict";function i(e){let t=0,n=0,i=0,r=0;for(let s=0,o=e.length;si})},4544:(e,t,n)=>{"use strict";n.d(t,{M:()=>a,S:()=>l});var i=n(4396),r=n(371),s=n(8690),o=n(3654);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let n=1;nt)throw new i.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}contains(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let n=0,i=0,r=null;while(n=s.startLineNumber?r=new a(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return null!==r&&t.push(r),new l(t)}subtractFrom(e){const t=(0,o.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)return new l([e]);const i=[];let r=e.startLineNumber;for(let s=t;sr&&i.push(new a(r,e.startLineNumber)),r=e.endLineNumberExclusive}return re.toString())).join(", ")}getIntersection(e){const t=[];let n=0,i=0;while(nt.delta(e))))}}},371:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(4396);class r{static addRange(e,t){let n=0;while(nt))return new r(e,t)}static ofLength(e){return new r(0,e)}static ofStartAndLength(e,t){return new r(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new i.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new r(this.start+e,this.endExclusive+e)}deltaStart(e){return new r(this.start+e,this.endExclusive)}deltaEnd(e){return new r(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t{"use strict";n.d(t,{y:()=>i});class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";n.d(t,{Q:()=>r});var i=n(6788);class r{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let n,i,s,o;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new r(n,i,s,o)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,o=e.endColumn;const a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,h=t.endColumn;return nc?(s=c,o=h):s===c&&(o=Math.min(o,h)),n>s||n===s&&i>o?null:new r(n,i,s,o)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new i.y(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new i.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return r.collapseToEnd(this)}static collapseToEnd(e){return new r(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new r(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},8581:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(6788),r=n(8690);class s extends r.Q{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new i.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new i.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n{"use strict";n.d(t,{W:()=>s});var i=n(6788),r=n(8690);class s{static{this.zero=new s(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new s(0,t.column-e.column):new s(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return s.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const i of e)"\n"===i?(t++,n=0):n++;return new s(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new r.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new r.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new i.y(e.lineNumber,e.column+this.columnCount):new i.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},939:(e,t,n)=>{"use strict";n.d(t,{Io:()=>l,Ld:()=>a,Th:()=>h});var i=n(5837),r=n(7806);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function o(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of s)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const a=o();function l(e){let t=a;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const c=new r.w;function h(e,t,n,r,s){if(t=l(t),s||(s=i.f.first(c)),n.length>s.maxLen){let i=e-s.maxLen/2;return i<0?i=0:r+=i,n=n.substring(i,e+s.maxLen/2),h(e,t,n,r,s)}const o=Date.now(),a=e-1-r;let d=-1,g=null;for(let i=1;;i++){if(Date.now()-o>=s.timeBudget)break;const e=a-s.windowSize*i;t.lastIndex=Math.max(0,e);const r=u(t,n,a,d);if(!r&&g)break;if(g=r,e<=0)break;d=e}if(g){const e={word:g[0],startColumn:r+1+g.index,endColumn:r+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function u(e,t,n,i){let r;while(r=e.exec(t)){const t=r.index||0;if(t<=n&&e.lastIndex>=n)return r;if(i>0&&t>i)return null}return null}c.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},4577:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});class i{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!==(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){const t=this.getForeground(e);let n="mtk"+t;const i=this.getFontStyle(e);return 1&i&&(n+=" mtki"),2&i&&(n+=" mtkb"),4&i&&(n+=" mtku"),8&i&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let r=`color: ${t[n]};`;1&i&&(r+="font-style: italic;"),2&i&&(r+="font-weight: bold;");let s="";return 4&i&&(s+=" underline"),8&i&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&n),bold:Boolean(2&n),underline:Boolean(4&n),strikethrough:Boolean(8&n)}}}},5350:(e,t,n)=>{"use strict";n.d(t,{rY:()=>p,ou:()=>m,dG:()=>L,OB:()=>w});var i=n(6455),r=(n(9133),n(231)),s=n(8894);class o{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,s.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new a(this,e,t);return this._factories.set(e,n),(0,s.s)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){const t=this.get(e);if(t)return!0;const n=this._factories.get(e);return!(n&&!n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class a extends s.jG{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var l,c,h,u,d,g,f=n(1337);class m{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class p{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}(function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"})(l||(l={})),function(e){const t=new Map;function n(e){let n=t.get(e);return n||(console.info("No codicon found for CompletionItemKind "+e),n=i.W.symbolProperty),n}t.set(0,i.W.symbolMethod),t.set(1,i.W.symbolFunction),t.set(2,i.W.symbolConstructor),t.set(3,i.W.symbolField),t.set(4,i.W.symbolVariable),t.set(5,i.W.symbolClass),t.set(6,i.W.symbolStruct),t.set(7,i.W.symbolInterface),t.set(8,i.W.symbolModule),t.set(9,i.W.symbolProperty),t.set(10,i.W.symbolEvent),t.set(11,i.W.symbolOperator),t.set(12,i.W.symbolUnit),t.set(13,i.W.symbolValue),t.set(15,i.W.symbolEnum),t.set(14,i.W.symbolConstant),t.set(15,i.W.symbolEnum),t.set(16,i.W.symbolEnumMember),t.set(17,i.W.symbolKeyword),t.set(27,i.W.symbolSnippet),t.set(18,i.W.symbolText),t.set(19,i.W.symbolColor),t.set(20,i.W.symbolFile),t.set(21,i.W.symbolReference),t.set(22,i.W.symbolCustomColor),t.set(23,i.W.symbolFolder),t.set(24,i.W.symbolTypeParameter),t.set(25,i.W.account),t.set(26,i.W.issues),e.toIcon=n;const r=new Map;function s(e,t){let n=r.get(e);return"undefined"!==typeof n||t||(n=9),n}r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26),e.fromString=s}(c||(c={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(h||(h={}));(function(e){e[e["Automatic"]=0]="Automatic",e[e["PasteAs"]=1]="PasteAs"})(u||(u={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(d||(d={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(g||(g={}));(0,f.kg)("Array","array"),(0,f.kg)("Boolean","boolean"),(0,f.kg)("Class","class"),(0,f.kg)("Constant","constant"),(0,f.kg)("Constructor","constructor"),(0,f.kg)("Enum","enumeration"),(0,f.kg)("EnumMember","enumeration member"),(0,f.kg)("Event","event"),(0,f.kg)("Field","field"),(0,f.kg)("File","file"),(0,f.kg)("Function","function"),(0,f.kg)("Interface","interface"),(0,f.kg)("Key","key"),(0,f.kg)("Method","method"),(0,f.kg)("Module","module"),(0,f.kg)("Namespace","namespace"),(0,f.kg)("Null","null"),(0,f.kg)("Number","number"),(0,f.kg)("Object","object"),(0,f.kg)("Operator","operator"),(0,f.kg)("Package","package"),(0,f.kg)("Property","property"),(0,f.kg)("String","string"),(0,f.kg)("Struct","struct"),(0,f.kg)("TypeParameter","type parameter"),(0,f.kg)("Variable","variable");var b,_,k,v,C;(function(e){const t=new Map;function n(e){let n=t.get(e);return n||(console.info("No codicon found for SymbolKind "+e),n=i.W.symbolProperty),n}t.set(0,i.W.symbolFile),t.set(1,i.W.symbolModule),t.set(2,i.W.symbolNamespace),t.set(3,i.W.symbolPackage),t.set(4,i.W.symbolClass),t.set(5,i.W.symbolMethod),t.set(6,i.W.symbolProperty),t.set(7,i.W.symbolField),t.set(8,i.W.symbolConstructor),t.set(9,i.W.symbolEnum),t.set(10,i.W.symbolInterface),t.set(11,i.W.symbolFunction),t.set(12,i.W.symbolVariable),t.set(13,i.W.symbolConstant),t.set(14,i.W.symbolString),t.set(15,i.W.symbolNumber),t.set(16,i.W.symbolBoolean),t.set(17,i.W.symbolArray),t.set(18,i.W.symbolObject),t.set(19,i.W.symbolKey),t.set(20,i.W.symbolNull),t.set(21,i.W.symbolEnumMember),t.set(22,i.W.symbolStruct),t.set(23,i.W.symbolEvent),t.set(24,i.W.symbolOperator),t.set(25,i.W.symbolTypeParameter),e.toIcon=n})(b||(b={}));class y{static{this.Comment=new y("comment")}static{this.Imports=new y("imports")}static{this.Region=new y("region")}static fromValue(e){switch(e){case"comment":return y.Comment;case"imports":return y.Imports;case"region":return y.Region}return new y(e)}constructor(e){this.value=e}}(function(e){e[e["AIGenerated"]=1]="AIGenerated"})(_||(_={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(k||(k={})),function(e){function t(e){return!(!e||"object"!==typeof e)&&("string"===typeof e.id&&"string"===typeof e.title)}e.is=t}(v||(v={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(C||(C={}));const L=new o,w=new o;var S;(function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"})(S||(S={}))},4573:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(7778);const r=(0,i.u1)("languageService")},5764:(e,t,n)=>{"use strict";n.d(t,{W6:()=>h,vH:()=>u});var i=n(1337),r=n(231),s=n(6374),o=n(3911),a=n(7503);const l={ModesRegistry:"editor.modesRegistry"};class c{constructor(){this._onDidChangeLanguages=new r.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t{"use strict";n.d(t,{A5:()=>i,Dg:()=>l,F4:()=>d,L5:()=>u,Wo:()=>h,X2:()=>a,ZS:()=>r,nk:()=>c,vd:()=>g});var i,r,s,o=n(5603);(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(i||(i={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(r||(r={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,o.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"===typeof e.read}class h{constructor(e,t,n,i,r,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=r,this._isTracked=s}}class u{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class d{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},2773:(e,t,n)=>{"use strict";n.d(t,{lt:()=>g,W5:()=>C,hB:()=>b,dr:()=>m,wC:()=>v});var i=n(601),r=n(1553),s=n(4529);class o extends s.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let n=0,i=e.length;nt)break;n=i}return n}findNextIntlWordAtOrAfterOffset(e,t){for(const n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index=0;let t=null;try{t=i.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(r){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new u.L5(t,this.wordSeparators?l(this.wordSeparators,[]):null,n?this.searchString:null)}}function f(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t=n)break;const i=e.charCodeAt(t);if(110===i||114===i||87===i)return!0}}return!1}function m(e,t,n){if(!n)return new u.Dg(e,null);const i=[];for(let r=0,s=t.length;r=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1}}class b{static findMatches(e,t,n,i,r){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new C(s.wordSeparators,s.regex),i,r):this._doFindMatchesLineByLine(e,n,s,i,r):[]}static _getMultilineMatchRange(e,t,n,i,r,s){let o,a,l=0;if(i?(l=i.findLineFeedCountBeforeOffset(r),o=t+r+l):o=t+r,i){const e=i.findLineFeedCountBeforeOffset(r+s.length),t=e-l;a=o+s.length+t}else a=o+s.length;const c=e.getPositionAt(o),u=e.getPositionAt(a);return new h.Q(c.lineNumber,c.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,n,i,r){const s=e.getOffsetAt(t.getStartPosition()),o=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new p(o):null,l=[];let c,h=0;n.reset(0);while(c=n.next(o))if(l[h++]=m(this._getMultilineMatchRange(e,s,o,a,c.index,c[0]),c,i),h>=r)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,r){const s=[];let o=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r);for(let l=t.startLineNumber+1;l=a))return r;return r}const c=new C(e.wordSeparators,e.regex);let d;c.reset(0);do{if(d=c.next(t),d&&(s[r++]=m(new h.Q(n,d.index+1+i,n,d.index+1+d[0].length+i),d,o),r>=a))return r}while(d);return r}static findNextMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new C(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,s,i):this._doFindNextMatchLineByLine(e,n,s,i)}static _doFindNextMatchMultiline(e,t,n,i){const r=new c.y(t.lineNumber,1),s=e.getOffsetAt(r),o=e.getLineCount(),a=e.getValueInRange(new h.Q(r.lineNumber,r.column,o,e.getLineMaxColumn(o)),1),l="\r\n"===e.getEOL()?new p(a):null;n.reset(t.column-1);const u=n.next(a);return u?m(this._getMultilineMatchRange(e,s,a,l,u.index,u[0]),u,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new c.y(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s),a=this._findFirstMatchInLine(n,o,s,t.column,i);if(a)return a;for(let l=1;l<=r;l++){const t=(s+l-1)%r,o=e.getLineContent(t+1),a=this._findFirstMatchInLine(n,o,t+1,1,i);if(a)return a}return null}static _findFirstMatchInLine(e,t,n,i,r){e.reset(i-1);const s=e.next(t);return s?m(new h.Q(n,s.index+1,n,s.index+1+s[0].length),s,r):null}static findPreviousMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new C(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,i):this._doFindPreviousMatchLineByLine(e,n,s,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const r=this._doFindMatchesMultiline(e,new h.Q(1,1,t.lineNumber,t.column),n,i,10*d);if(r.length>0)return r[r.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new c.y(s,e.getLineMaxColumn(s)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(n,o,s,i);if(a)return a;for(let l=1;l<=r;l++){const t=(r+s-l-1)%r,o=e.getLineContent(t+1),a=this._findLastMatchInLine(n,o,t+1,i);if(a)return a}return null}static _findLastMatchInLine(e,t,n,i){let r,s=null;e.reset(0);while(r=e.next(t))s=m(new h.Q(n,r.index+1,n,r.index+1+r[0].length),r,i);return s}}function _(e,t,n,i,r){if(0===i)return!0;const s=t.charCodeAt(i-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}function k(e,t,n,i,r){if(i+r===n)return!0;const s=t.charCodeAt(i+r);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i+r-1);if(0!==e.get(n))return!0}return!1}function v(e,t,n,i,r){return _(e,t,n,i,r)&&k(e,t,n,i,r)}class C{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const r=n.index,s=n[0].length;if(r===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){i.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=s,!this._wordSeparators||v(this._wordSeparators,e,t,r,s))return n}while(n);return null}}},215:(e,t,n)=>{"use strict";n.r(t),n.d(t,{KeyMod:()=>me,createMonacoBaseAPI:()=>pe});var i=n(7792),r=n(231);class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new s,a=new s,l=new s,c=new Array(230),h={},u=[],d=Object.create(null),g=Object.create(null),f=[],m=[];for(let be=0;be<=193;be++)f[be]=-1;for(let be=0;be<=132;be++)m[be]=-1;var p;function b(e,t){const n=(65535&t)<<16>>>0;return(e|n)>>>0}(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],i=[];for(const r of t){const[e,t,s,p,b,_,k,v,C]=r;if(i[t]||(i[t]=!0,u[t]=s,d[s]=t,g[s.toLowerCase()]=t,e&&(f[t]=p,0!==p&&3!==p&&5!==p&&4!==p&&6!==p&&57!==p&&(m[p]=t))),!n[p]){if(n[p]=!0,!b)throw new Error(`String representation missing for key code ${p} around scan code ${s}`);o.define(p,b),a.define(p,v||b),l.define(p,C||v||b)}_&&(c[_]=p),k&&(h[k]=p)}m[3]=46})(),function(e){function t(e){return o.keyCodeToStr(e)}function n(e){return o.strToKeyCode(e)}function i(e){return a.keyCodeToStr(e)}function r(e){return l.keyCodeToStr(e)}function s(e){return a.strToKeyCode(e)||l.strToKeyCode(e)}function c(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=i,e.toUserSettingsGeneral=r,e.fromUserSettings=s,e.toElectronAccelerator=c}(p||(p={}));var _,k,v,C,y,L,w,S,x,E,N,T,A,I,O,M,D,R,B,F,P,V,z,j,q,W,U,$,H,K,G,Q,J,X,Y,Z,ee,te,ne,ie,re,se,oe,ae,le,ce,he=n(9133),ue=n(6788),de=n(8690),ge=n(8581),fe=n(5350);(function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"})(_||(_={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["Auto"]=2]="Auto"}(k||(k={})),function(e){e[e["None"]=0]="None",e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(v||(v={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(C||(C={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(y||(y={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(L||(L={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(w||(w={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(S||(S={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(x||(x={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(E||(E={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(N||(N={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["ariaRequired"]=5]="ariaRequired",e[e["autoClosingBrackets"]=6]="autoClosingBrackets",e[e["autoClosingComments"]=7]="autoClosingComments",e[e["screenReaderAnnounceInlineSuggestion"]=8]="screenReaderAnnounceInlineSuggestion",e[e["autoClosingDelete"]=9]="autoClosingDelete",e[e["autoClosingOvertype"]=10]="autoClosingOvertype",e[e["autoClosingQuotes"]=11]="autoClosingQuotes",e[e["autoIndent"]=12]="autoIndent",e[e["automaticLayout"]=13]="automaticLayout",e[e["autoSurround"]=14]="autoSurround",e[e["bracketPairColorization"]=15]="bracketPairColorization",e[e["guides"]=16]="guides",e[e["codeLens"]=17]="codeLens",e[e["codeLensFontFamily"]=18]="codeLensFontFamily",e[e["codeLensFontSize"]=19]="codeLensFontSize",e[e["colorDecorators"]=20]="colorDecorators",e[e["colorDecoratorsLimit"]=21]="colorDecoratorsLimit",e[e["columnSelection"]=22]="columnSelection",e[e["comments"]=23]="comments",e[e["contextmenu"]=24]="contextmenu",e[e["copyWithSyntaxHighlighting"]=25]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=26]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=27]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=28]="cursorStyle",e[e["cursorSurroundingLines"]=29]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=30]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=31]="cursorWidth",e[e["disableLayerHinting"]=32]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=33]="disableMonospaceOptimizations",e[e["domReadOnly"]=34]="domReadOnly",e[e["dragAndDrop"]=35]="dragAndDrop",e[e["dropIntoEditor"]=36]="dropIntoEditor",e[e["emptySelectionClipboard"]=37]="emptySelectionClipboard",e[e["experimentalWhitespaceRendering"]=38]="experimentalWhitespaceRendering",e[e["extraEditorClassName"]=39]="extraEditorClassName",e[e["fastScrollSensitivity"]=40]="fastScrollSensitivity",e[e["find"]=41]="find",e[e["fixedOverflowWidgets"]=42]="fixedOverflowWidgets",e[e["folding"]=43]="folding",e[e["foldingStrategy"]=44]="foldingStrategy",e[e["foldingHighlight"]=45]="foldingHighlight",e[e["foldingImportsByDefault"]=46]="foldingImportsByDefault",e[e["foldingMaximumRegions"]=47]="foldingMaximumRegions",e[e["unfoldOnClickAfterEndOfLine"]=48]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=49]="fontFamily",e[e["fontInfo"]=50]="fontInfo",e[e["fontLigatures"]=51]="fontLigatures",e[e["fontSize"]=52]="fontSize",e[e["fontWeight"]=53]="fontWeight",e[e["fontVariations"]=54]="fontVariations",e[e["formatOnPaste"]=55]="formatOnPaste",e[e["formatOnType"]=56]="formatOnType",e[e["glyphMargin"]=57]="glyphMargin",e[e["gotoLocation"]=58]="gotoLocation",e[e["hideCursorInOverviewRuler"]=59]="hideCursorInOverviewRuler",e[e["hover"]=60]="hover",e[e["inDiffEditor"]=61]="inDiffEditor",e[e["inlineSuggest"]=62]="inlineSuggest",e[e["inlineEdit"]=63]="inlineEdit",e[e["letterSpacing"]=64]="letterSpacing",e[e["lightbulb"]=65]="lightbulb",e[e["lineDecorationsWidth"]=66]="lineDecorationsWidth",e[e["lineHeight"]=67]="lineHeight",e[e["lineNumbers"]=68]="lineNumbers",e[e["lineNumbersMinChars"]=69]="lineNumbersMinChars",e[e["linkedEditing"]=70]="linkedEditing",e[e["links"]=71]="links",e[e["matchBrackets"]=72]="matchBrackets",e[e["minimap"]=73]="minimap",e[e["mouseStyle"]=74]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=75]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=76]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=77]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=78]="multiCursorModifier",e[e["multiCursorPaste"]=79]="multiCursorPaste",e[e["multiCursorLimit"]=80]="multiCursorLimit",e[e["occurrencesHighlight"]=81]="occurrencesHighlight",e[e["overviewRulerBorder"]=82]="overviewRulerBorder",e[e["overviewRulerLanes"]=83]="overviewRulerLanes",e[e["padding"]=84]="padding",e[e["pasteAs"]=85]="pasteAs",e[e["parameterHints"]=86]="parameterHints",e[e["peekWidgetDefaultFocus"]=87]="peekWidgetDefaultFocus",e[e["placeholder"]=88]="placeholder",e[e["definitionLinkOpensInPeek"]=89]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=90]="quickSuggestions",e[e["quickSuggestionsDelay"]=91]="quickSuggestionsDelay",e[e["readOnly"]=92]="readOnly",e[e["readOnlyMessage"]=93]="readOnlyMessage",e[e["renameOnType"]=94]="renameOnType",e[e["renderControlCharacters"]=95]="renderControlCharacters",e[e["renderFinalNewline"]=96]="renderFinalNewline",e[e["renderLineHighlight"]=97]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=98]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=99]="renderValidationDecorations",e[e["renderWhitespace"]=100]="renderWhitespace",e[e["revealHorizontalRightPadding"]=101]="revealHorizontalRightPadding",e[e["roundedSelection"]=102]="roundedSelection",e[e["rulers"]=103]="rulers",e[e["scrollbar"]=104]="scrollbar",e[e["scrollBeyondLastColumn"]=105]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=106]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=107]="scrollPredominantAxis",e[e["selectionClipboard"]=108]="selectionClipboard",e[e["selectionHighlight"]=109]="selectionHighlight",e[e["selectOnLineNumbers"]=110]="selectOnLineNumbers",e[e["showFoldingControls"]=111]="showFoldingControls",e[e["showUnused"]=112]="showUnused",e[e["snippetSuggestions"]=113]="snippetSuggestions",e[e["smartSelect"]=114]="smartSelect",e[e["smoothScrolling"]=115]="smoothScrolling",e[e["stickyScroll"]=116]="stickyScroll",e[e["stickyTabStops"]=117]="stickyTabStops",e[e["stopRenderingLineAfter"]=118]="stopRenderingLineAfter",e[e["suggest"]=119]="suggest",e[e["suggestFontSize"]=120]="suggestFontSize",e[e["suggestLineHeight"]=121]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=122]="suggestOnTriggerCharacters",e[e["suggestSelection"]=123]="suggestSelection",e[e["tabCompletion"]=124]="tabCompletion",e[e["tabIndex"]=125]="tabIndex",e[e["unicodeHighlighting"]=126]="unicodeHighlighting",e[e["unusualLineTerminators"]=127]="unusualLineTerminators",e[e["useShadowDOM"]=128]="useShadowDOM",e[e["useTabStops"]=129]="useTabStops",e[e["wordBreak"]=130]="wordBreak",e[e["wordSegmenterLocales"]=131]="wordSegmenterLocales",e[e["wordSeparators"]=132]="wordSeparators",e[e["wordWrap"]=133]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=134]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=135]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=136]="wordWrapColumn",e[e["wordWrapOverride1"]=137]="wordWrapOverride1",e[e["wordWrapOverride2"]=138]="wordWrapOverride2",e[e["wrappingIndent"]=139]="wrappingIndent",e[e["wrappingStrategy"]=140]="wrappingStrategy",e[e["showDeprecated"]=141]="showDeprecated",e[e["inlayHints"]=142]="inlayHints",e[e["editorClassName"]=143]="editorClassName",e[e["pixelRatio"]=144]="pixelRatio",e[e["tabFocusMode"]=145]="tabFocusMode",e[e["layoutInfo"]=146]="layoutInfo",e[e["wrappingInfo"]=147]="wrappingInfo",e[e["defaultColorDecorators"]=148]="defaultColorDecorators",e[e["colorDecoratorsActivatedOn"]=149]="colorDecoratorsActivatedOn",e[e["inlineCompletionsAccessibilityVerbose"]=150]="inlineCompletionsAccessibilityVerbose"}(T||(T={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(A||(A={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(I||(I={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(O||(O={})),function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"}(M||(M={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(D||(D={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(R||(R={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(B||(B={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(F||(F={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(P||(P={})),function(e){e[e["DependsOnKbLayout"]=-1]="DependsOnKbLayout",e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["Digit0"]=21]="Digit0",e[e["Digit1"]=22]="Digit1",e[e["Digit2"]=23]="Digit2",e[e["Digit3"]=24]="Digit3",e[e["Digit4"]=25]="Digit4",e[e["Digit5"]=26]="Digit5",e[e["Digit6"]=27]="Digit6",e[e["Digit7"]=28]="Digit7",e[e["Digit8"]=29]="Digit8",e[e["Digit9"]=30]="Digit9",e[e["KeyA"]=31]="KeyA",e[e["KeyB"]=32]="KeyB",e[e["KeyC"]=33]="KeyC",e[e["KeyD"]=34]="KeyD",e[e["KeyE"]=35]="KeyE",e[e["KeyF"]=36]="KeyF",e[e["KeyG"]=37]="KeyG",e[e["KeyH"]=38]="KeyH",e[e["KeyI"]=39]="KeyI",e[e["KeyJ"]=40]="KeyJ",e[e["KeyK"]=41]="KeyK",e[e["KeyL"]=42]="KeyL",e[e["KeyM"]=43]="KeyM",e[e["KeyN"]=44]="KeyN",e[e["KeyO"]=45]="KeyO",e[e["KeyP"]=46]="KeyP",e[e["KeyQ"]=47]="KeyQ",e[e["KeyR"]=48]="KeyR",e[e["KeyS"]=49]="KeyS",e[e["KeyT"]=50]="KeyT",e[e["KeyU"]=51]="KeyU",e[e["KeyV"]=52]="KeyV",e[e["KeyW"]=53]="KeyW",e[e["KeyX"]=54]="KeyX",e[e["KeyY"]=55]="KeyY",e[e["KeyZ"]=56]="KeyZ",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["F20"]=78]="F20",e[e["F21"]=79]="F21",e[e["F22"]=80]="F22",e[e["F23"]=81]="F23",e[e["F24"]=82]="F24",e[e["NumLock"]=83]="NumLock",e[e["ScrollLock"]=84]="ScrollLock",e[e["Semicolon"]=85]="Semicolon",e[e["Equal"]=86]="Equal",e[e["Comma"]=87]="Comma",e[e["Minus"]=88]="Minus",e[e["Period"]=89]="Period",e[e["Slash"]=90]="Slash",e[e["Backquote"]=91]="Backquote",e[e["BracketLeft"]=92]="BracketLeft",e[e["Backslash"]=93]="Backslash",e[e["BracketRight"]=94]="BracketRight",e[e["Quote"]=95]="Quote",e[e["OEM_8"]=96]="OEM_8",e[e["IntlBackslash"]=97]="IntlBackslash",e[e["Numpad0"]=98]="Numpad0",e[e["Numpad1"]=99]="Numpad1",e[e["Numpad2"]=100]="Numpad2",e[e["Numpad3"]=101]="Numpad3",e[e["Numpad4"]=102]="Numpad4",e[e["Numpad5"]=103]="Numpad5",e[e["Numpad6"]=104]="Numpad6",e[e["Numpad7"]=105]="Numpad7",e[e["Numpad8"]=106]="Numpad8",e[e["Numpad9"]=107]="Numpad9",e[e["NumpadMultiply"]=108]="NumpadMultiply",e[e["NumpadAdd"]=109]="NumpadAdd",e[e["NUMPAD_SEPARATOR"]=110]="NUMPAD_SEPARATOR",e[e["NumpadSubtract"]=111]="NumpadSubtract",e[e["NumpadDecimal"]=112]="NumpadDecimal",e[e["NumpadDivide"]=113]="NumpadDivide",e[e["KEY_IN_COMPOSITION"]=114]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=115]="ABNT_C1",e[e["ABNT_C2"]=116]="ABNT_C2",e[e["AudioVolumeMute"]=117]="AudioVolumeMute",e[e["AudioVolumeUp"]=118]="AudioVolumeUp",e[e["AudioVolumeDown"]=119]="AudioVolumeDown",e[e["BrowserSearch"]=120]="BrowserSearch",e[e["BrowserHome"]=121]="BrowserHome",e[e["BrowserBack"]=122]="BrowserBack",e[e["BrowserForward"]=123]="BrowserForward",e[e["MediaTrackNext"]=124]="MediaTrackNext",e[e["MediaTrackPrevious"]=125]="MediaTrackPrevious",e[e["MediaStop"]=126]="MediaStop",e[e["MediaPlayPause"]=127]="MediaPlayPause",e[e["LaunchMediaPlayer"]=128]="LaunchMediaPlayer",e[e["LaunchMail"]=129]="LaunchMail",e[e["LaunchApp2"]=130]="LaunchApp2",e[e["Clear"]=131]="Clear",e[e["MAX_VALUE"]=132]="MAX_VALUE"}(V||(V={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(z||(z={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(j||(j={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(q||(q={})),function(e){e[e["Normal"]=1]="Normal",e[e["Underlined"]=2]="Underlined"}(W||(W={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(U||(U={})),function(e){e[e["AIGenerated"]=1]="AIGenerated"}($||($={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(H||(H={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(K||(K={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(G||(G={})),function(e){e[e["Word"]=0]="Word",e[e["Line"]=1]="Line",e[e["Suggest"]=2]="Suggest"}(Q||(Q={})),function(e){e[e["Left"]=0]="Left",e[e["Right"]=1]="Right",e[e["None"]=2]="None",e[e["LeftOfInjectedText"]=3]="LeftOfInjectedText",e[e["RightOfInjectedText"]=4]="RightOfInjectedText"}(J||(J={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(X||(X={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(Y||(Y={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(Z||(Z={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(ee||(ee={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(te||(te={})),function(e){e["Off"]="off",e["OnCode"]="onCode",e["On"]="on"}(ne||(ne={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(ie||(ie={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(re||(re={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(se||(se={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(oe||(oe={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(ae||(ae={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(le||(le={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(ce||(ce={}));class me{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return b(e,t)}}function pe(){return{editor:void 0,languages:void 0,CancellationTokenSource:i.Qi,Emitter:r.vl,KeyCode:V,KeyMod:me,Position:ue.y,Range:de.Q,Selection:ge.L,SelectionDirection:te,MarkerSeverity:z,MarkerTag:j,Uri:he.r,Token:fe.ou}}},5926:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseEditorSimpleWorker:()=>it,EditorSimpleWorker:()=>rt,create:()=>st});class i{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var r=n(5647);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,s]=h._getElements(e),[o,a,l]=h._getElements(t);this._hasStrings=s&&l,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(h._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n=e&&r>=n&&this.ElementsAreEqual(t,r))t--,r--;if(e>t||n>r){let s;return n<=r?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,r-n+1)]):e<=t?(a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,r,o,l,s),h=o[0],u=l[0];if(null!==c)return c;if(!s[0]){const o=this.ComputeDiffRecursive(e,h,n,u,s);let a=[];return a=s[0]?[new i(h+1,t-(h+1)+1,u+1,r-(u+1)+1)]:this.ComputeDiffRecursive(h+1,t,u+1,r,s),this.ConcatenateChanges(o,a)}return[new i(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,s,o,a,l,h,u,d,g,f,m,p,b,_,k){let v=null,C=null,y=new c,L=t,w=n,S=f[0]-b[0]-r,x=-1073741824,E=this.m_forwardHistory.length-1;do{const t=S+e;t===L||t=0&&(h=this.m_forwardHistory[E],e=h[0],L=1,w=h.length-1)}while(--E>=-1);if(v=y.getReverseChanges(),k[0]){let e=f[0]+1,t=b[0]+1;if(null!==v&&v.length>0){const n=v[v.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}C=[new i(e,g-e+1,t,p-t+1)]}else{y=new c,L=o,w=a,S=f[0]-b[0]-l,x=1073741824,E=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+s;e===L||e=u[e+1]?(d=u[e+1]-1,m=d-S-l,d>x&&y.MarkNextChange(),x=d+1,y.AddOriginalElement(d+1,m+1),S=e+1-s):(d=u[e-1],m=d-S-l,d>x&&y.MarkNextChange(),x=d,y.AddModifiedElement(d+1,m+1),S=e-1-s),E>=0&&(u=this.m_reverseHistory[E],s=u[0],L=1,w=u.length-1)}while(--E>=-1);C=y.getChanges()}return this.ConcatenateChanges(v,C)}ComputeRecursionPoint(e,t,n,r,s,o,a){let c=0,h=0,u=0,d=0,g=0,f=0;e--,n--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(r-n),p=m+1,b=new Int32Array(p),_=new Int32Array(p),k=r-n,v=t-e,C=e-n,y=t-r,L=v-k,w=L%2===0;b[k]=e,_[v]=t,a[0]=!1;for(let S=1;S<=m/2+1;S++){let m=0,L=0;u=this.ClipDiagonalBound(k-S,S,k,p),d=this.ClipDiagonalBound(k+S,S,k,p);for(let e=u;e<=d;e+=2){c=e===u||em+L&&(m=c,L=h),!w&&Math.abs(e-v)<=S-1&&c>=_[e])return s[0]=c,o[0]=h,n<=_[e]&&S<=1448?this.WALKTRACE(k,u,d,C,v,g,f,y,b,_,c,t,s,h,r,o,w,a):null}const x=(m-e+(L-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,x))return a[0]=!0,s[0]=m,o[0]=L,x>0&&S<=1448?this.WALKTRACE(k,u,d,C,v,g,f,y,b,_,c,t,s,h,r,o,w,a):(e++,n++,[new i(e,t-e+1,n,r-n+1)]);g=this.ClipDiagonalBound(v-S,S,v,p),f=this.ClipDiagonalBound(v+S,S,v,p);for(let i=g;i<=f;i+=2){c=i===g||i=_[i+1]?_[i+1]-1:_[i-1],h=c-(i-v)-y;const l=c;while(c>e&&h>n&&this.ElementsAreEqual(c,h))c--,h--;if(_[i]=c,w&&Math.abs(i-k)<=S&&c<=b[i])return s[0]=c,o[0]=h,l>=b[i]&&S<=1448?this.WALKTRACE(k,u,d,C,v,g,f,y,b,_,c,t,s,h,r,o,w,a):null}if(S<=1447){let e=new Int32Array(d-u+2);e[0]=k-u+1,l.Copy2(b,u,e,1,d-u+1),this.m_forwardHistory.push(e),e=new Int32Array(f-g+2),e[0]=v-g+1,l.Copy2(_,g,e,1,f-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(k,u,d,C,v,g,f,y,b,_,c,t,s,h,r,o,w,a)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;while(n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,r=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,r=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,c=n.modifiedStart-e;if(tl&&(l=u,a=e)}n.originalStart-=a,n.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&t>a&&(a=t,l=h,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){const r=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,i)?1:0;return r+s}ConcatenateChanges(e,t){const n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return l.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],l.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return l.Copy(e,0,n,0,e.length),l.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(r,s,o,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&et&&(t=s),i>n&&(n=i),o>n&&(n=o)}t++,n++;const i=new g(n,t,0);for(let r=0,s=e.length;r=this._maxCharCode?0:this._states.get(e,t)}}let m=null;function p(){return null===m&&(m=new f([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),m}let b=null;function _(){if(null===b){b=new d.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let n=0;ni);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:s+2},url:t.substring(i,s+1)}}static computeLinks(e,t=p()){const n=_(),i=[];for(let r=1,s=e.getLineCount();r<=s;r++){const s=e.getLineContent(r),o=s.length;let a=0,l=0,c=0,h=1,u=!1,d=!1,g=!1,f=!1;while(a=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}var y=n(215),L=n(2899),w=n(4240),S=n(7412);class x{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class E{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}var N=n(4396),T=n(4544),A=n(6788),I=n(9109),O=n(371);n(3904);class M{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}class D{static inverse(e,t,n){const i=[];let r=1,s=1;for(const a of e){const e=new D(new T.M(r,a.original.startLineNumber),new T.M(s,a.modified.startLineNumber));e.modified.isEmpty||i.push(e),r=a.original.endLineNumberExclusive,s=a.modified.endLineNumberExclusive}const o=new D(new T.M(r,t+1),new T.M(s,n+1));return o.modified.isEmpty||i.push(o),i}static clip(e,t,n){const i=[];for(const r of e){const e=r.original.intersect(t),s=r.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&i.push(new D(e,s))}return i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new D(this.modified,this.original)}join(e){return new D(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new P(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new N.D7("not a valid diff");return new P(new u.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new u.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new P(new u.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new u.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(B(this.original.endLineNumberExclusive,e)&&B(this.modified.endLineNumberExclusive,t))return new P(new u.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new u.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new P(u.Q.fromPositions(new A.y(this.original.startLineNumber,1),R(new A.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),u.Q.fromPositions(new A.y(this.modified.startLineNumber,1),R(new A.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new P(u.Q.fromPositions(R(new A.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),R(new A.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),u.Q.fromPositions(R(new A.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),R(new A.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new N.D7}}function R(e,t){if(e.lineNumber<1)return new A.y(1,1);if(e.lineNumber>t.length)return new A.y(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new A.y(e.lineNumber,n.length+1):e}function B(e,t){return e>=1&&e<=t.length}class F extends D{static fromRangeMappings(e){const t=T.M.join(e.map((e=>T.M.fromRangeInclusive(e.originalRange)))),n=T.M.join(e.map((e=>T.M.fromRangeInclusive(e.modifiedRange))));return new F(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new F(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new F(this.original,this.modified,[this.toRangeMapping()])}}class P{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new P(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new M(this.originalRange,t)}}var V=n(601);const z=3;class j{computeDiff(e,t,n){const i=new G(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}),r=i.computeDiff(),s=[];let o=null;for(const a of r.changes){let e,t;e=0===a.originalEndLineNumber?new T.M(a.originalStartLineNumber+1,a.originalStartLineNumber+1):new T.M(a.originalStartLineNumber,a.originalEndLineNumber+1),t=0===a.modifiedEndLineNumber?new T.M(a.modifiedStartLineNumber+1,a.modifiedStartLineNumber+1):new T.M(a.modifiedStartLineNumber,a.modifiedEndLineNumber+1);let n=new F(e,t,a.charChanges?.map((e=>new P(new u.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new u.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));o&&(o.modified.endLineNumberExclusive!==n.modified.startLineNumber&&o.original.endLineNumberExclusive!==n.original.startLineNumber||(n=new F(o.original.join(n.original),o.modified.join(n.modified),o.innerChanges&&n.innerChanges?o.innerChanges.concat(n.innerChanges):void 0),s.pop())),s.push(n),o=n}return(0,I.Ft)((()=>(0,I.Xo)(s,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class ${constructor(e,t,n,i,r,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const i=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),c=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new $(i,r,s,o,a,l,c,h)}}function H(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,r=e.length;i0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=q(s,a,r,!0).changes;o&&(e=H(e)),u=[];for(let t=0,n=e.length;t1&&o>1){const i=e.charCodeAt(n-2),r=t.charCodeAt(o-2);if(i!==r)break;n--,o--}(n>1||o>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,n,s+1,1,o)}{let n=J(e,1),o=J(t,1);const a=e.length+1,l=t.length+1;while(n!0;const t=Date.now();return()=>Date.now()-t{n.push(ee.fromOffsetPairs(e?e.getEndExclusives():te.zero,i?i.getStarts():new te(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),n}static fromOffsetPairs(e,t){return new ee(new O.L(e.offset1,t.offset1),new O.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new N.D7("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new ee(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new ee(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new ee(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new ee(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new ee(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(t&&n)return new ee(t,n)}getStarts(){return new te(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new te(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class te{static{this.zero=new te(0,0)}static{this.max=new te(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new te(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class ne{static{this.instance=new ne}isValid(){return!0}}class ie{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new N.D7("timeout must be positive")}isValid(){const e=Date.now()-this.startTime0&&a>0&&3===s.get(g-1,a-1)&&(h+=o.get(g-1,a-1)),h+=i?i(g,a):1):h=-1;const u=Math.max(l,c,h);if(u===h){const e=g>0&&a>0?o.get(g-1,a-1):0;o.set(g,a,e+1),s.set(g,a,3)}else u===l?(o.set(g,a,0),s.set(g,a,1)):u===c&&(o.set(g,a,0),s.set(g,a,2));r.set(g,a,u)}const a=[];let l=e.length,c=t.length;function h(e,t){e+1===l&&t+1===c||a.push(new ee(new O.L(e+1,l),new O.L(t+1,c))),l=e,c=t}let u=e.length-1,d=t.length-1;while(u>=0&&d>=0)3===s.get(u,d)?(h(u,d),u--,d--):1===s.get(u,d)?u--:d--;return h(-1,-1),a.reverse(),new Z(a,!1)}}class le{compute(e,t,n=ne.instance){if(0===e.length||0===t.length)return Z.trivial(e,t);const i=e,r=t;function s(e,t){while(ei.length||d>r.length)continue;const g=s(u,d);a.set(c,g);const f=u===o?l.get(c+1):l.get(c-1);if(l.set(c,g!==u?new ce(f,u,d,g-u):f),a.get(c)===i.length&&a.get(c)-c===r.length)break e}}let h=l.get(c);const u=[];let d=i.length,g=r.length;while(1){const e=h?h.x+h.length:0,t=h?h.y+h.length:0;if(e===d&&t===g||u.push(new ee(new O.L(e,d),new O.L(t,g))),!h)break;d=h.x,g=h.y,h=h.prev}return u.reverse(),new Z(u,!1)}}class ce{constructor(e,t,n,i){this.prev=e,this.x=t,this.y=n,this.length=i}}class he{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class ue{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var de=n(3654),ge=n(1553);class fe{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let t=e[i-1],r=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(r=this.range.startColumn-1,t=t.substring(r)),this.lineStartOffsets.push(r);let s=0;if(!n){const e=t.trimStart();s=t.length-e.length,t=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-r-s,t.length):t.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=_e(e>0?this.elements[e-1]:-1),n=_e(et<=e)),i=e-this.firstElementOffsetByLineIdx[n];return new A.y(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+i+(0===i&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?u.Q.fromPositions(n,n):u.Q.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!me(this.elements[e]))return;let t=e;while(t>0&&me(this.elements[t-1]))t--;let n=e;while(nt<=e.start))??0,n=(0,de.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new O.L(t,n)}}function me(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const pe={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:30,[6]:3,[7]:10,[8]:10};function be(e){return pe[e]}function _e(e){return 10===e?8:13===e?7:se(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function ke(e,t,n,i,r,s){let{moves:o,excludedChanges:a}=Ce(e,t,n,s);if(!s.isValid())return[];const l=e.filter((e=>!a.has(e))),c=ye(l,i,r,t,n,s);return(0,Y.E4)(o,c),o=we(o),o=o.filter((e=>{const n=e.original.toOffsetRange().slice(t).map((e=>e.trim())),i=n.join("\n");return i.length>=15&&ve(n,(e=>e.length>=2))>=2})),o=Se(e,o),o}function ve(e,t){let n=0;for(const i of e)t(i)&&n++;return n}function Ce(e,t,n,i){const r=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new oe(e.original,t,e))),o=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new oe(e.modified,n,e)))),a=new Set;for(const l of s){let e,t=-1;for(const n of o){const i=l.computeSimilarity(n);i>t&&(t=i,e=n)}if(t>.9&&e&&(o.delete(e),r.push(new D(l.range,e.range)),a.add(l.source),a.add(e.source)),!i.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}function ye(e,t,n,i,r,s){const o=[],a=new ge.db;for(const d of e)for(let e=d.original.startLineNumber;ee.modified.startLineNumber),Y.U9));for(const d of e){let e=[];for(let t=d.modified.startLineNumber;t{for(const i of e)if(i.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&i.modifiedLineRange.endLineNumberExclusive+1===r.endLineNumberExclusive)return i.originalLineRange=new T.M(i.originalLineRange.startLineNumber,t.endLineNumberExclusive),i.modifiedLineRange=new T.M(i.modifiedLineRange.startLineNumber,r.endLineNumberExclusive),void s.push(i);const n={modifiedLineRange:r,originalLineRange:t};l.push(n),s.push(n)})),e=s}if(!s.isValid())return[]}l.sort((0,Y.Hw)((0,Y.VE)((e=>e.modifiedLineRange.length),Y.U9)));const c=new T.S,h=new T.S;for(const d of l){const e=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,t=c.subtractFrom(d.modifiedLineRange),n=h.subtractFrom(d.originalLineRange).getWithDelta(e),i=t.getIntersection(n);for(const r of i.ranges){if(r.length<3)continue;const t=r,n=r.delta(-e);o.push(new D(n,t)),c.addRange(t),h.addRange(n)}}o.sort((0,Y.VE)((e=>e.original.startLineNumber),Y.U9));const u=new de.vJ(e);for(let d=0;de.original.startLineNumber<=t.original.startLineNumber)),a=(0,de.lx)(e,(e=>e.modified.startLineNumber<=t.modified.startLineNumber)),l=Math.max(t.original.startLineNumber-n.original.startLineNumber,t.modified.startLineNumber-a.modified.startLineNumber),g=u.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumberi.length||n>r.length)break;if(c.contains(n)||h.contains(e))break;if(!Le(i[e-1],r[n-1],s))break}for(p>0&&(h.addRange(new T.M(t.original.startLineNumber-p,t.original.startLineNumber)),c.addRange(new T.M(t.modified.startLineNumber-p,t.modified.startLineNumber))),b=0;bi.length||n>r.length)break;if(c.contains(n)||h.contains(e))break;if(!Le(i[e-1],r[n-1],s))break}b>0&&(h.addRange(new T.M(t.original.endLineNumberExclusive,t.original.endLineNumberExclusive+b)),c.addRange(new T.M(t.modified.endLineNumberExclusive,t.modified.endLineNumberExclusive+b))),(p>0||b>0)&&(o[d]=new D(new T.M(t.original.startLineNumber-p,t.original.endLineNumberExclusive+b),new T.M(t.modified.startLineNumber-p,t.modified.endLineNumberExclusive+b)))}return o}function Le(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new le,r=i.compute(new fe([e],new u.Q(1,1,1,e.length),!1),new fe([t],new u.Q(1,1,1,t.length),!1),n);let s=0;const o=ee.invert(r.diffs,e.length);for(const h of o)h.seq1Range.forEach((t=>{se(e.charCodeAt(t))||s++}));function a(t){let n=0;for(let i=0;it.length?e:t),c=s/l>.6&&l>10;return c}function we(e){if(0===e.length)return e;e.sort((0,Y.VE)((e=>e.original.startLineNumber),Y.U9));const t=[e[0]];for(let n=1;n=0&&o>=0;a&&s+o<=2?t[t.length-1]=i.join(r):t.push(r)}return t}function Se(e,t){const n=new de.vJ(e);return t=t.filter((t=>{const i=n.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber0&&(o=o.delta(a))}r.push(o)}return i.length>0&&r.push(i[i.length-1]),r}function Ne(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let i=0;i0?n[i-1]:void 0,s=n[i],o=i+1=i.start&&e.seq2Range.start-o>=r.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&oc&&(c=o,l=h)}return e.delta(l)}function Ae(e,t,n){const i=[];for(const r of n){const e=i[i.length-1];e?r.seq1Range.start-e.seq1Range.endExclusive<=2||r.seq2Range.start-e.seq2Range.endExclusive<=2?i[i.length-1]=new ee(e.seq1Range.join(r.seq1Range),e.seq2Range.join(r.seq2Range)):i.push(r):i.push(r)}return i}function Ie(e,t,n){const i=ee.invert(n,e.length),r=[];let s=new te(0,0);function o(n,o){if(n.offset10){const n=i[0],r=n.seq1Range.intersects(c.seq1Range)||n.seq2Range.intersects(c.seq2Range);if(!r)break;const s=e.findWordContaining(n.seq1Range.start),o=t.findWordContaining(n.seq2Range.start),a=new ee(s,o),l=a.intersect(n);if(u+=l.seq1Range.length,d+=l.seq2Range.length,c=c.join(a),!(c.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;i.shift()}u+d<2*(c.seq1Range.length+c.seq2Range.length)/3&&r.push(c),s=c.getEndExclusives()}while(i.length>0){const e=i.shift();e.seq1Range.isEmpty||(o(e.getStarts(),e),o(e.getEndExclusives().delta(-1),e))}const a=Oe(n,r);return a}function Oe(e,t){const n=[];while(e.length>0||t.length>0){const i=e[0],r=t[0];let s;s=i&&(!r||i.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Me(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const o=[i[0]];for(let a=1;a5||n.seq1Range.length+n.seq2Range.length>5)}const u=h(c,l);u?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}i=o}while(s++<10&&r);return i}function De(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const a=[i[0]];for(let l=1;l5||r.length>500)return!1;const o=e.getText(r).trim();if(o.length>20||o.split(/\r\n|\r|\n/).length>1)return!1;const a=e.countLinesIn(n.seq1Range),l=n.seq1Range.length,u=t.countLinesIn(n.seq2Range),d=n.seq2Range.length,g=e.countLinesIn(i.seq1Range),f=i.seq1Range.length,m=t.countLinesIn(i.seq2Range),p=i.seq2Range.length,b=130;function _(e){return Math.min(e,b)}return Math.pow(Math.pow(_(40*a+l),1.5)+Math.pow(_(40*u+d),1.5),1.5)+Math.pow(Math.pow(_(40*g+f),1.5)+Math.pow(_(40*m+p),1.5),1.5)>(b**1.5)**1.5*1.3}const d=u(h,c);d?(r=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}i=a}while(s++<10&&r);const o=[];return(0,Y.kj)(i,((t,n,i)=>{let r=n;function s(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}const a=e.extendToFullLines(n.seq1Range),l=e.getText(new O.L(a.start,n.seq1Range.start));s(l)&&(r=r.deltaStart(-l.length));const c=e.getText(new O.L(n.seq1Range.endExclusive,a.endExclusive));s(c)&&(r=r.deltaEnd(c.length));const h=ee.fromOffsetPairs(t?t.getEndExclusives():te.zero,i?i.getStarts():te.max),u=r.intersect(h);o.length>0&&u.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(u):o.push(u)})),o}class Re{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=0===e?0:Be(this.lines[e-1]),n=e===this.lines.length?0:Be(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function Be(e){let t=0;while(te===t)))return new x([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new x([new F(new T.M(1,e.length+1),new T.M(1,t.length+1),[new P(new u.Q(1,1,e.length,e[e.length-1].length+1),new u.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const i=0===n.maxComputationTimeMs?ne.instance:new ie(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,s=new Map;function o(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map((e=>o(e.trim()))),l=t.map((e=>o(e.trim()))),c=new Re(a,e),h=new Re(l,t),d=(()=>c.length+h.length<1700?this.dynamicProgrammingDiffing.compute(c,h,i,((n,i)=>e[n]===t[i]?0===t[i].length?.1:1+Math.log(1+t[i].length):.99)):this.myersDiffingAlgorithm.compute(c,h,i))();let g=d.diffs,f=d.hitTimeout;g=xe(c,h,g),g=Me(c,h,g);const m=[],p=n=>{if(r)for(let s=0;su.seq1Range.start-b===u.seq2Range.start-_));const n=u.seq1Range.start-b;p(n),b=u.seq1Range.endExclusive,_=u.seq2Range.endExclusive;const s=this.refineDiff(e,t,u,i,r);s.hitTimeout&&(f=!0);for(const e of s.mappings)m.push(e)}p(e.length-b);const k=Pe(m,e,t);let v=[];return n.computeMoves&&(v=this.computeMoves(k,e,t,a,l,i,r)),(0,I.Ft)((()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function i(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const r of k){if(!r.innerChanges)return!1;for(const i of r.innerChanges){const r=n(i.modifiedRange.getStartPosition(),t)&&n(i.modifiedRange.getEndPosition(),t)&&n(i.originalRange.getStartPosition(),e)&&n(i.originalRange.getEndPosition(),e);if(!r)return!1}if(!i(r.modified,t)||!i(r.original,e))return!1}return!0})),new x(k,v,f)}computeMoves(e,t,n,i,r,s,o){const a=ke(e,t,n,i,r,s),l=a.map((e=>{const i=this.refineDiff(t,n,new ee(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o),r=Pe(i.mappings,t,n,!0);return new E(e,r)}));return l}refineDiff(e,t,n,i,r){const s=ze(n),o=s.toRangeMapping2(e,t),a=new fe(e,o.originalRange,r),l=new fe(t,o.modifiedRange,r),c=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,i):this.myersDiffingAlgorithm.compute(a,l,i),h=!1;let u=c.diffs;h&&ee.assertSorted(u),u=xe(a,l,u),h&&ee.assertSorted(u),u=Ie(a,l,u),h&&ee.assertSorted(u),u=Ae(a,l,u),h&&ee.assertSorted(u),u=De(a,l,u),h&&ee.assertSorted(u);const d=u.map((e=>new P(a.translateRange(e.seq1Range),l.translateRange(e.seq2Range))));return h&&P.assertSorted(d),{mappings:d,hitTimeout:c.hitTimeout}}}function Pe(e,t,n,i=!1){const r=[];for(const s of(0,Y.n)(e.map((e=>Ve(e,t,n))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=s[0],t=s[s.length-1];r.push(new F(e.original.join(t.original),e.modified.join(t.modified),s.map((e=>e.innerChanges[0]))))}return(0,I.Ft)((()=>{if(!i&&r.length>0){if(r[0].modified.startLineNumber!==r[0].original.startLineNumber)return!1;if(n.length-r[r.length-1].modified.endLineNumberExclusive!==t.length-r[r.length-1].original.endLineNumberExclusive)return!1}return(0,I.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+r&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+r&&(i=1);const s=new T.M(e.originalRange.startLineNumber+i,e.originalRange.endLineNumber+1+r),o=new T.M(e.modifiedRange.startLineNumber+i,e.modifiedRange.endLineNumber+1+r);return new F(s,o,[e])}function ze(e){return new D(new T.M(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new T.M(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}const je={getLegacy:()=>new j,getDefault:()=>new Fe};var qe=n(5603),We=n(6657),Ue=n(5476);function $e(e){const t=[];for(const n of e){const e=Number(n);(e||0===e&&""!==n.replace(/\s/g,""))&&t.push(e)}return t}function He(e,t,n,i){return{red:e/255,blue:n/255,green:t/255,alpha:i}}function Ke(e,t){const n=t.index,i=t[0].length;if(!n)return;const r=e.positionAt(n),s={startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:r.lineNumber,endColumn:r.column+i};return s}function Ge(e,t){if(!e)return;const n=Ue.Q1.Format.CSS.parseHex(t);return n?{range:e,color:He(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}:void 0}function Qe(e,t,n){if(!e||1!==t.length)return;const i=t[0],r=i.values(),s=$e(r);return{range:e,color:He(s[0],s[1],s[2],n?s[3]:1)}}function Je(e,t,n){if(!e||1!==t.length)return;const i=t[0],r=i.values(),s=$e(r),o=new Ue.Q1(new Ue.hB(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:e,color:He(o.rgba.r,o.rgba.g,o.rgba.b,o.rgba.a)}}function Xe(e,t){return"string"===typeof e?[...e.matchAll(t)]:e.findMatches(t)}function Ye(e){const t=[],n=/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm,i=Xe(e,n);if(i.length>0)for(const r of i){const n=r.filter((e=>void 0!==e)),i=n[1],s=n[2];if(!s)continue;let o;if("rgb"===i){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;o=Qe(Ke(e,r),Xe(s,t),!1)}else if("rgba"===i){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Qe(Ke(e,r),Xe(s,t),!0)}else if("hsl"===i){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=Je(Ke(e,r),Xe(s,t),!1)}else if("hsla"===i){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Je(Ke(e,r),Xe(s,t),!0)}else"#"===i&&(o=Ge(Ke(e,r),i+s));o&&t.push(o)}return t}function Ze(e){return e&&"function"===typeof e.getValue&&"function"===typeof e.positionAt?Ye(e):[]}var et=n(6198),tt=n(6294);const nt=!0;class it{constructor(){this._workerTextModelSyncServer=new tt.WorkerTextModelSyncServer}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){const i=this._getModel(e);return i?S.UnicodeTextModelHighlighter.computeUnicodeHighlights(i,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const n=this._getModel(e);return n?(0,et.findSectionHeaders)(n,t):[]}async $computeDiff(e,t,n,i){const r=this._getModel(e),s=this._getModel(t);if(!r||!s)return null;const o=rt.computeDiff(r,s,n,i);return o}static computeDiff(e,t,n,i){const r="advanced"===i?je.getDefault():je.getLegacy(),s=e.getLinesContent(),o=t.getLinesContent(),a=r.computeDiff(s,o,n),l=!(a.changes.length>0)&&this._modelsAreIdentical(e,t);function c(e){return e.map((e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:l,quitEarly:a.hitTimeout,changes:c(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,c(e.changes)]))}}static _modelsAreIdentical(e,t){const n=e.getLineCount(),i=t.getLineCount();if(n!==i)return!1;for(let r=1;r<=n;r++){const n=e.getLineContent(r),i=t.getLineContent(r);if(n!==i)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){const i=this._getModel(e);if(!i)return t;const r=[];let s;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return u.Q.compareRangesUsingStarts(e.range,t.range);const n=e.range?0:1,i=t.range?0:1;return n-i}));let a=0;for(let o=1;ort._diffLimit){r.push({range:l,text:c});continue}const t=o(e,c,n),a=i.offsetAt(u.Q.lift(l).getStartPosition());for(const n of t){const e=i.positionAt(a+n.originalStart),t=i.positionAt(a+n.originalStart+n.originalLength),s={text:c.substr(n.modifiedStart,n.modifiedLength),range:{startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:t.lineNumber,endColumn:t.column}};i.getValueInRange(s.range)!==s.text&&r.push(s)}}return"number"===typeof s&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?v(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?Ze(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,i){const r=new w.W,s=new RegExp(n,i),o=new Set;e:for(const a of e){const e=this._getModel(a);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>rt._suggestionsLimit))break e}return{words:Array.from(o),duration:r.elapsed()}}async $computeWordRanges(e,t,n,i){const r=this._getModel(e);if(!r)return Object.create(null);const s=new RegExp(n,i),o=Object.create(null);for(let a=t.startLineNumber;athis._host.$fhr(e,t),s=(0,qe.kT)(i,r),o={host:s,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve((0,qe.V0)(this._foreignModule))):new Promise(((i,r)=>{const s=e=>{this._foreignModule=e.create(o,t),i((0,qe.V0)(this._foreignModule))};if(nt){const t=We.zl.asBrowserUri(`${e}.js`).toString(!0);n(9204)(`${t}`).then(s).catch(r)}else Promise.resolve().then(function(){var t=[n(7614)(`${e}`)];s.apply(null,t)}.bind(this))["catch"](r.bind(this))}))}$fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}}function st(e){return new rt(L.EditorWorkerHost.getChannel(e),null)}"function"===typeof importScripts&&(globalThis.monaco=(0,y.createMonacoBaseAPI)())},4117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IEditorWorkerService:()=>r});var i=n(7778);const r=(0,i.u1)("editorWorkerService")},2899:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EditorWorkerHost:()=>i});class i{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(i.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(i.CHANNEL_NAME,t)}}},6198:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findSectionHeaders:()=>s});const i=new RegExp("\\bMARK:\\s*(.*)$","d"),r=/^-+|-+$/g;function s(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const i=o(e,t);n=n.concat(i)}if(t.findMarkSectionHeaders){const t=a(e);n=n.concat(t)}return n}function o(e,t){const n=[],i=e.getLineCount();for(let r=1;r<=i;r++){const i=e.getLineContent(r),s=i.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:r,startColumn:s[0].length+1,endLineNumber:r,endColumn:i.length+1};if(e.endColumn>e.startColumn){const t={range:e,...c(i.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}function a(e){const t=[],n=e.getLineCount();for(let i=1;i<=n;i++){const n=e.getLineContent(i);l(n,i,t)}return t}function l(e,t,n){i.lastIndex=0;const r=i.exec(e);if(r){const e=r.indices[1][0]+1,i=r.indices[1][1]+1,s={startLineNumber:t,startColumn:e,endLineNumber:t,endColumn:i};if(s.endColumn>s.startColumn){const e={range:s,...c(r[1]),shouldBeInComments:!0};(e.text||e.hasSeparatorLine)&&n.push(e)}}}function c(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(r,""),{text:e,hasSeparatorLine:t}}},2340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getIconClasses:()=>d});var i,r=n(6657),s=n(4366),o=n(9133),a=n(5764);(function(e){e[e["FILE"]=0]="FILE",e[e["FOLDER"]=1]="FOLDER",e[e["ROOT_FOLDER"]=2]="ROOT_FOLDER"})(i||(i={}));var l,c,h=n(6455);(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeColor=t})(l||(l={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(e){const i=t.exec(e.id);if(!i)return n(h.W.error);const[,r,s]=i,o=["codicon","codicon-"+r];return s&&o.push("codicon-modifier-"+s.substring(1)),o}function i(e){return n(e).join(" ")}function r(e){return"."+n(e).join(".")}function s(e){return e&&"object"===typeof e&&"string"===typeof e.id&&("undefined"===typeof e.color||l.isThemeColor(e.color))}e.asClassNameArray=n,e.asClassName=i,e.asCSSSelector=r,e.isThemeIcon=s;const o=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);function a(e){const t=o.exec(e);if(!t)return;const[,n]=t;return{id:n}}function c(e){return{id:e}}function u(e,t){let n=e.id;const i=n.lastIndexOf("~");return-1!==i&&(n=n.substring(0,i)),t&&(n=`${n}~${t}`),{id:n}}function d(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)}function g(e,t){return e.id===t.id&&e.color?.id===t.color?.id}e.fromString=a,e.fromId=c,e.modify=u,e.getModifier=d,e.isEqual=g}(c||(c={}));const u=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,n,a,l){if(c.isThemeIcon(l))return[`codicon-${l.id}`,"predefined-file-icon"];if(o.r.isUri(l))return[];const h=a===i.ROOT_FOLDER?["rootfolder-icon"]:a===i.FOLDER?["folder-icon"]:["file-icon"];if(n){let o;if(n.scheme===r.ny.data){const e=s.B6.parseMetaData(n);o=e.get(s.B6.META_DATA_LABEL)}else{const e=n.path.match(u);e?(o=f(e[2].toLowerCase()),e[1]&&h.push(`${f(e[1].toLowerCase())}-name-dir-icon`)):o=f(n.authority.toLowerCase())}if(a===i.ROOT_FOLDER)h.push(`${o}-root-name-folder-icon`);else if(a===i.FOLDER)h.push(`${o}-name-folder-icon`);else{if(o){if(h.push(`${o}-name-file-icon`),h.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t{"use strict";n.r(t),n.d(t,{ILanguageFeatureDebounceService:()=>m,LanguageFeatureDebounceService:()=>k});var i=n(5647),r=n(1553);function s(e,t,n){return Math.min(Math.max(e,t),n)}class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class a{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},f=function(e,t){return function(n,i){t(n,i,e)}};const m=(0,l.u1)("ILanguageFeatureDebounceService");var p;(function(e){const t=new WeakMap;let n=0;function i(e){let i=t.get(e);return void 0===i&&(i=++n,t.set(e,i)),i}e.of=i})(p||(p={}));class b{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class _{constructor(e,t,n,i,s,o){this._logService=e,this._name=t,this._registry=n,this._default=i,this._min=s,this._max=o,this._cache=new r.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,i.sN)(p.of(t),e)),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?s(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let i=this._cache.get(n);i||(i=new a(6),this._cache.set(n,i));const r=s(i.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new o;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return s(e,this._min,this._max)}}let k=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){const i=n?.min??50,r=n?.max??i**2,s=n?.key??void 0,o=`${p.of(e)},${i}${s?","+s:""}`;let a=this._data.get(o);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new b(1.5*i)):a=new _(this._logService,t,e,0|this._overallAverage()||1.5*i,i,r),this._data.set(o,a)),a}_overallAverage(){const e=new o;for(const t of this._data.values())e.update(t.default());return e.value}};k=g([f(0,u.rr),f(1,c)],k),(0,h.v)(m,k,1)},2847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ILanguageFeaturesService:()=>r});var i=n(7778);const r=(0,i.u1)("ILanguageFeaturesService")},1369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageFeaturesService:()=>m});var i=n(231),r=n(8894),s=n(9322),o=n(3589),a=n(1643);function l(e,t,n,i,r,s){if(Array.isArray(e)){let o=0;for(const a of e){const e=l(a,t,n,i,r,s);if(10===e)return e;e>o&&(o=e)}return o}if("string"===typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){const{language:l,pattern:c,scheme:h,hasAccessToAllModels:u,notebookType:d}=e;if(!i&&!u)return 0;d&&r&&(t=r);let g=0;if(h)if(h===t.scheme)g=10;else{if("*"!==h)return 0;g=5}if(l)if(l===n)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(d)if(d===s)g=10;else{if("*"!==d||void 0===s)return 0;g=Math.max(g,5)}if(c){let e;if(e="string"===typeof c?c:{...c,base:(0,a.S8)(c.base)},e!==t.fsPath&&!(0,o.YW)(e,t.fsPath))return 0;g=10}return g}return 0}function c(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(c):!!e.exclusive)}class h{constructor(e,t,n,i,r){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=i,this.recursive=r}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class u{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new i.vl,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,r.s)((()=>{if(n){const e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e,t=!1){const n=[];return this._orderedForEach(e,t,(e=>n.push(e.provider))),n}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,!1,(e=>{n&&i===e._score?n.push(e.provider):(i=e._score,n=[e.provider],t.push(n))})),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(const i of this._entries)i._score>0&&n(i)}_updateScores(e,t){const n=this._notebookInfoResolver?.(e.uri),i=n?new h(e.uri,e.getLanguageId(),n.uri,n.type,t):new h(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(i)){this._lastCandidate=i;for(const n of this._entries)if(n._score=l(n.selector,i.uri,i.languageId,(0,s.vd)(e),i.notebookUri,i.notebookType),c(n.selector)&&n._score>0){if(!t){for(const e of this._entries)e._score=0;n._score=1e3;break}n._score=0}this._entries.sort(u._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._timet._time?-1:0}}function d(e){return"string"!==typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var g=n(2847),f=n(4979);class m{constructor(){this.referenceProvider=new u(this._score.bind(this)),this.renameProvider=new u(this._score.bind(this)),this.newSymbolNamesProvider=new u(this._score.bind(this)),this.codeActionProvider=new u(this._score.bind(this)),this.definitionProvider=new u(this._score.bind(this)),this.typeDefinitionProvider=new u(this._score.bind(this)),this.declarationProvider=new u(this._score.bind(this)),this.implementationProvider=new u(this._score.bind(this)),this.documentSymbolProvider=new u(this._score.bind(this)),this.inlayHintsProvider=new u(this._score.bind(this)),this.colorProvider=new u(this._score.bind(this)),this.codeLensProvider=new u(this._score.bind(this)),this.documentFormattingEditProvider=new u(this._score.bind(this)),this.documentRangeFormattingEditProvider=new u(this._score.bind(this)),this.onTypeFormattingEditProvider=new u(this._score.bind(this)),this.signatureHelpProvider=new u(this._score.bind(this)),this.hoverProvider=new u(this._score.bind(this)),this.documentHighlightProvider=new u(this._score.bind(this)),this.multiDocumentHighlightProvider=new u(this._score.bind(this)),this.selectionRangeProvider=new u(this._score.bind(this)),this.foldingRangeProvider=new u(this._score.bind(this)),this.linkProvider=new u(this._score.bind(this)),this.inlineCompletionsProvider=new u(this._score.bind(this)),this.inlineEditProvider=new u(this._score.bind(this)),this.completionProvider=new u(this._score.bind(this)),this.linkedEditingRangeProvider=new u(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new u(this._score.bind(this)),this.documentSemanticTokensProvider=new u(this._score.bind(this)),this.documentDropEditProvider=new u(this._score.bind(this)),this.documentPasteEditProvider=new u(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,f.v)(g.ILanguageFeaturesService,m,1)},2657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageService:()=>ne});var i=n(231),r=n(8894),s=n(7024),o=n(5053),a=n(5350),l=n(5764);const c=(e,t)=>e===t;new WeakMap;class h{constructor(e,t,n){this.owner=e,this.debugNameSource=t,this.referenceFn=n}getDebugName(e){return g(e,this)}}const u=new Map,d=new WeakMap;function g(e,t){const n=d.get(e);if(n)return n;const i=f(e,t);if(i){let t=u.get(i)??0;t++,u.set(i,t);const n=1===t?i:`${i}#${t}`;return d.set(e,n),n}}function f(e,t){const n=d.get(e);if(n)return n;const i=t.owner?_(t.owner)+".":"";let r;const s=t.debugNameSource;if(void 0!==s){if("function"!==typeof s)return i+s;if(r=s(),void 0!==r)return i+r}const o=t.referenceFn;if(void 0!==o&&(r=v(o),void 0!==r))return i+r;if(void 0!==t.owner){const n=m(t.owner,e);if(void 0!==n)return i+n}}function m(e,t){for(const n in e)if(e[n]===t)return n}const p=new Map,b=new WeakMap;function _(e){const t=b.get(e);if(t)return t;const n=k(e);let i=p.get(n)??0;i++,p.set(n,i);const r=1===i?n:`${n}#${i}`;return b.set(e,r),r}function k(e){const t=e.constructor;return t?t.name:"Object"}function v(e){const t=e.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//,i=n.exec(t),r=i?i[1]:void 0;return r?.trim()}let C,y,L,w;function S(e){C=e}function x(){return C}class E{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return N([T(R("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[T(" "),I(O(e.oldValue,70),{color:"red",strikeThrough:!0}),T(" "),I(O(e.newValue,60),{color:"green"})]:[T(" (unchanged)")]:[T(" "),I(O(e.newValue,60),{color:"green"}),T(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([A("observable value changed"),I(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return I(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,i)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,i]))}handleDerivedRecomputed(e,t){const n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([A("derived recomputed"),I(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([A("observable from event triggered"),I(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,i)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,i]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([A("autorun"),I(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([A("transaction"),I(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function N(e){const t=new Array,n=[];let i="";function r(e){if("length"in e)for(const t of e)t&&r(t);else"text"in e?(i+=`%c${e.text}`,t.push(e.style),e.data&&n.push(...e.data)):"data"in e&&n.push(...e.data)}r(e);const s=[i,...t];return s.push(...n),s}function T(e){return I(e,{color:"black"})}function A(e){return I(B(`${e}: `,10),{color:"black",bold:!0})}function I(e,t={color:"black"}){function n(e){return Object.entries(e).reduce(((e,[t,n])=>`${e}${t}:${n};`),"")}const i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:n(i)}}function O(e,t){switch(typeof e){case"number":return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?M(e,t):D(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`;default:return""+e}}function M(e,t){let n="[ ",i=!0;for(const r of e){if(i||(n+=", "),n.length-5>t){n+="...";break}i=!1,n+=`${O(r,t-n.length)}`}return n+=" ]",n}function D(e,t){let n="{ ",i=!0;for(const[r,s]of Object.entries(e)){if(i||(n+=", "),n.length-5>t){n+="...";break}i=!1,n+=`${r}: ${O(s,t-n.length)}`}return n+=" }",n}function R(e,t){let n="";for(let i=1;i<=t;i++)n+=e;return n}function B(e,t){while(e.length{const e=v(i);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/,r=t.exec(i.toString());return r?`${this.debugName}.${r[2]}`:n?void 0:`${this.debugName} (mapped)`},debugReferenceFn:i},(e=>i(this.read(e),e)))}flatten(){return w({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(y(this,t)),this}keepObserved(e){return e.add(L(this)),this}}class j extends z{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){const t=this.observers.delete(e);t&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function q(e,t){const n=new U(e,t);try{e(n)}finally{n.finish()}}function W(e,t,n){e?t(e):q(t,n)}class U{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],x()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():v(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const n of this.observers)n.handlePossibleChange(this);if(t)for(const n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,$.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),i=3===this.state;if(n&&(1===this.state||i)&&(this.state=2,i))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function G(e){return new Q(new h(void 0,void 0,e),e,void 0,void 0)}class Q{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,i){this._debugNameData=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=i,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),x()?.handleAutorunCreated(this),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){x()?.handleAutorunTriggered(this);const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{t||x()?.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,$.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary);n&&(this.state=2)}}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(e){e.Observer=Q})(G||(G={}));function J(...e){let t,n,i;return 3===e.length?[t,n,i]=e:[n,i]=e,new X(new h(t,void 0,i),n,i,(()=>X.globalTransaction),c)}class X extends j{constructor(e,t,n,i,r){super(),this._debugNameData=e,this.event=t,this._getValue=n,this._getTransaction=i,this._equalityComparator=r,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),n=this.value,i=!this.hasValue||!this._equalityComparator(n,t);let r=!1;i&&(this.value=t,this.hasValue&&(r=!0,W(this._getTransaction(),(e=>{x()?.handleFromEventObservableTriggered(this,{oldValue:n,newValue:t,change:void 0,didChange:i,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),r||x()?.handleFromEventObservableTriggered(this,{oldValue:n,newValue:t,change:void 0,didChange:i,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){if(this.subscription)return this.hasValue||this.handleEvent(void 0),this.value;{const e=this._getValue(void 0);return e}}}(function(e){function t(e,t){let n=!1;void 0===X.globalTransaction&&(X.globalTransaction=e,n=!0);try{t()}finally{n&&(X.globalTransaction=void 0)}}e.Observer=X,e.batchEventsGlobally=t})(J||(J={}));function Y(e){const t=new ee(!1,void 0);return e.addObserver(t),(0,r.s)((()=>{e.removeObserver(t)}))}function Z(e,t){const n=new ee(!0,t);return e.addObserver(n),t?t(e.get()):e.reportChanges(),(0,r.s)((()=>{e.removeObserver(n)}))}P(Y),F(Z);class ee{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}n(4396);const te=!1;te&&S(new E);class ne extends r.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new i.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new i.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new i.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,ne.instanceCount++,this._registry=this._register(new s.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){ne.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,o.Fy)(n,null)}createById(e){return new ie(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new ie(this.onDidChange,(()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class ie{constructor(e,t){this._value=J(this,e,(()=>t())),this.onDidChange=i.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},5911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clearPlatformLanguageAssociations:()=>p,getLanguageIds:()=>b,registerPlatformLanguageAssociation:()=>g});var i=n(3589),r=n(3911),s=n(6657),o=n(1643),a=n(4366),l=n(601),c=n(5764);let h=[],u=[],d=[];function g(e,t=!1){f(e,!1,t)}function f(e,t,n){const i=m(e,t);h.push(i),i.userConfigured?d.push(i):u.push(i),n&&!i.userConfigured&&h.forEach((e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))}))}function m(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:t,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,i.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(o.SA.sep)>=0}}function p(){h=h.filter((e=>e.userConfigured)),u=[]}function b(e,t){return _(e,t).map((e=>e.id))}function _(e,t){let n;if(e)switch(e.scheme){case s.ny.file:n=e.fsPath;break;case s.ny.data:{const t=a.B6.parseMetaData(e);n=t.get(a.B6.META_DATA_LABEL);break}case s.ny.vscodeNotebookCell:n=void 0;break;default:n=e.path}if(!n)return[{id:"unknown",mime:r.K.unknown}];n=n.toLowerCase();const i=(0,o.P8)(n),l=k(n,i,d);if(l)return[l,{id:c.vH,mime:r.K.text}];const h=k(n,i,u);if(h)return[h,{id:c.vH,mime:r.K.text}];if(t){const e=v(t);if(e)return[e,{id:c.vH,mime:r.K.text}]}return[{id:"unknown",mime:r.K.unknown}]}function k(e,t,n){let i,r,s;for(let o=n.length-1;o>=0;o--){const a=n[o];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!r||a.filepattern.length>r.filepattern.length)){const n=a.filepatternOnPath?e:t;a.filepatternLowercase?.(n)&&(r=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&t.endsWith(a.extensionLowercase)&&(s=a)}return i||(r||(s||void 0))}function v(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=h.length-1;t>=0;t--){const n=h[t];if(!n.firstline)continue;const i=e.match(n.firstline);if(i&&i.length>0)return n}}},7024:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageIdCodec:()=>d,LanguagesRegistry:()=>g});var i=n(231),r=n(8894),s=n(601),o=n(5911),a=n(5764),l=n(7503),c=n(6374);const h=Object.prototype.hasOwnProperty,u="vs.editor.nullLanguage";class d{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(u,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||u}}class g extends r.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new d,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,o.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),c.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;h.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i=`text/x-${n}`,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const s of t.filenames)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filename:s},this._warnOnOverwrite),e.filenames.push(s);if(Array.isArray(t.filenamePatterns))for(const s of t.filenamePatterns)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filepattern:s},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,s.eY)(t)||(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,firstline:t},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,l)}}e.aliases.push(n);let r=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(r=0===t.aliases.length?[null]:t.aliases),null!==r)for(const s of r)s&&0!==s.length&&e.aliases.push(s);const a=null!==r&&r.length>0;if(a&&null===r[0]);else{const t=(a?r[0]:null)||n;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&h.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return h.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&h.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,o.getLanguageIds)(e,t):[]}}},3637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IMarkerDecorationsService:()=>r});var i=n(7778);const r=(0,i.u1)("markerDecorationsService")},9420:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MarkerDecorationsService:()=>w});var i,r=n(601);(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(i||(i={})),function(e){const t="error",n="warning",i="warn",s="info",o="ignore";function a(o){return o?r.Q_(t,o)?e.Error:r.Q_(n,o)||r.Q_(i,o)?e.Warning:r.Q_(s,o)?e.Info:e.Ignore:e.Ignore}function l(i){switch(i){case e.Error:return t;case e.Warning:return n;case e.Info:return s;default:return o}}e.fromValue=a,e.toString=l}(i||(i={}));const s=i;var o,a,l=n(1337),c=n(7778);(function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"})(o||(o={})),function(e){function t(e,t){return t-e}e.compare=t;const n=Object.create(null);function i(e){return n[e]||""}function r(t){switch(t){case s.Error:return e.Error;case s.Warning:return e.Warning;case s.Info:return e.Info;case s.Ignore:return e.Hint}}function o(t){switch(t){case e.Error:return s.Error;case e.Warning:return s.Warning;case e.Info:return s.Info;case e.Hint:return s.Ignore}}n[e.Error]=(0,l.kg)("sev.error","Error"),n[e.Warning]=(0,l.kg)("sev.warning","Warning"),n[e.Info]=(0,l.kg)("sev.info","Info"),e.toString=i,e.fromSeverity=r,e.toSeverity=o}(o||(o={})),function(e){const t="";function n(e){return i(e,!0)}function i(e,n){const i=[t];return e.source?i.push(e.source.replace("¦","\\¦")):i.push(t),e.code?"string"===typeof e.code?i.push(e.code.replace("¦","\\¦")):i.push(e.code.value.replace("¦","\\¦")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(o.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("¦","\\¦")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("¦")}e.makeKey=n,e.makeKeyOptionalMessage=i}(a||(a={}));const h=(0,c.u1)("markerService");var u=n(8894),d=n(9322),g=n(3711),f=n(2764),m=n(9361),p=n(8690),b=n(6657),_=n(231),k=n(7732),v=n(1553);function C(e,t){const n=[],i=[];for(const r of e)t.has(r)||n.push(r);for(const r of t)e.has(r)||i.push(r);return{removed:n,added:i}}var y=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},L=function(e,t){return function(n,i){t(n,i,e)}};let w=class extends u.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new _.vl),this._markerDecorations=new v.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new S(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==b.ny.inMemory&&e.uri.scheme!==b.ny.internal&&e.uri.scheme!==b.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};w=y([L(0,m.IModelService),L(1,h)],w);class S extends u.jG{constructor(e){super(),this.model=e,this._map=new v.cO,this._register((0,u.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:n}=C(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===n.length)return!1;const i=n.map((e=>this._map.get(e))),r=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(i,r);for(const o of n)this._map.delete(o);for(let o=0;o=t)return n;const i=e.getWordAtPosition(n.getStartPosition());i&&(n=new p.Q(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){const i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0}}},9361:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IModelService:()=>r});var i=n(7778);const r=(0,i.u1)("modelService")},2713:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultModelSHA1Computer:()=>hs,ModelService:()=>cs});var i=n(231),r=n(8894),s=n(5160),o=n(5053),a=n(5476),l=n(4396),c=n(601),h=n(9133),u=n(6627);class d{static _nextVisibleColumn(e,t,n){return 9===e?d.nextRenderTabStop(t,n):c.ne(e)||c.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){const i=Math.min(t-1,e.length),r=e.substring(0,i),s=new c.km(r);let o=0;while(!s.eol()){const e=c.Z5(r,i,s.offset);s.nextGraphemeLength(),o=this._nextVisibleColumn(e,o,n)}return o}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const i=e.length,r=new c.km(e);let s=0,o=1;while(!r.eol()){const a=c.Z5(e,i,r.offset);r.nextGraphemeLength();const l=this._nextVisibleColumn(a,s,n),h=r.offset+1;if(l>=t){const e=t-s,n=l-t;return n \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new y(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new y({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new y({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"===typeof e.autoCloseBefore?e.autoCloseBefore:S.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"===typeof e.autoCloseBefore?e.autoCloseBefore:S.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}function x(e){return 0!==(3&e)}var E=n(7885);let N,T,A;function I(){return N||(N=new TextDecoder("UTF-16LE")),N}function O(){return T||(T=new TextDecoder("UTF-16BE")),T}function M(){return A||(A=s.cm()?I():O()),A}function D(e,t,n){const i=new Uint16Array(e.buffer,t,n);return n>0&&(65279===i[0]||65534===i[0])?R(e,t,n):I().decode(i)}function R(e,t,n){const i=[];let r=0;for(let s=0;s[e[0].toLowerCase(),e[1].toLowerCase()]));const n=[];for(let o=0;o{const[n,i]=e,[r,s]=t;return n===r||n===s||i===r||i===s},r=(e,i)=>{const r=Math.min(e,i),s=Math.max(e,i);for(let o=0;o0&&s.push({open:i,close:r})}return s}class P{constructor(e,t){this._richEditBracketsBrand=void 0;const n=F(t);this.brackets=n.map(((t,i)=>new B(e,i,t.open,t.close,q(t.open,t.close,n,i),W(t.open,t.close,n,i)))),this.forwardRegex=U(this.brackets),this.reversedRegex=$(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const i of this.brackets){for(const e of i.open)this.textIsBracket[e]=i,this.textIsOpenBracket[e]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,e.length);for(const e of i.close)this.textIsBracket[e]=i,this.textIsOpenBracket[e]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,e.length)}}}function V(e,t,n,i){for(let r=0,s=t.length;r=0&&i.push(t);for(const t of s.close)t.indexOf(e)>=0&&i.push(t)}}function z(e,t){return e.length-t.length}function j(e){if(e.length<=1)return e;const t=[],n=new Set;for(const i of e)n.has(i)||(t.push(i),n.add(i));return t}function q(e,t,n,i){let r=[];r=r.concat(e),r=r.concat(t);for(let s=0,o=r.length;s=0;i--)t[n++]=e.charCodeAt(i);return M().decode(t)}let t=null,n=null;return function(i){return t!==i&&(t=i,n=e(t)),n}}();class Q{static _findPrevBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=n.length-(r.index||0),o=r[0].length,a=i+s;return new p.Q(t,a-o+1,t,a+1)}static findPrevBracketInRange(e,t,n,i,r){const s=G(n),o=s.substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,o,i)}static findNextBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=r.index||0,o=r[0].length;if(0===o)return null;const a=i+s;return new p.Q(t,a+1,t,a+1+o)}static findNextBracketInRange(e,t,n,i,r){const s=n.substring(i,r);return this.findNextBracketInText(e,t,s,i)}}class J{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return(0,o.dM)(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const i=t.findTokenIndexAtOffset(n-1);if(x(t.getStandardTokenType(i)))return null;const r=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,o=Q.findPrevBracketInRange(r,1,s,0,s.length);if(!o)return null;const a=s.substring(o.startColumn-1,o.endColumn-1).toLowerCase(),l=this._richEditBrackets.textIsOpenBracket[a];if(l)return null;const c=t.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function X(e){return e.global&&(e.lastIndex=0),!0}class Y{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&X(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&X(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&X(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&X(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class Z{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=Z._createOpenBracketRegExp(e[0]),n=Z._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let r=0,s=this._regExpRules.length;r!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))));if(s)return e.action}if(e>=2&&n.length>0&&i.length>0)for(let r=0,s=this._brackets.length;r=2&&n.length>0)for(let r=0,s=this._brackets.length;r{const t=new Set;return{info:new le(this,e,t),closing:t}})),r=new re.VV((e=>{const t=new Set,n=new Set;return{info:new ce(this,e,t,n),opening:t,openingColorized:n}}));for(const[o,a]of n){const e=i.get(o),t=r.get(a);e.closing.add(t.info),t.opening.add(e.info)}const s=t.colorizedBracketPairs?oe(t.colorizedBracketPairs):n.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[o,a]of s){const e=i.get(o),t=r.get(a);e.closing.add(t.info),t.openingColorized.add(e.info),t.opening.add(e.info)}this._openingBrackets=new Map([...i.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...r.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return K(t,e)}}function oe(e){return e.filter((([e,t])=>""!==e&&""!==t))}class ae{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class le extends ae{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}}class ce extends ae{constructor(e,t,n,i){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(e){return e["config"]===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e["config"]===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var he=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},ue=function(e,t){return function(n,i){t(n,i,e)}};class de{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const ge=(0,ee.u1)("languageConfigurationService");let fe=class extends r.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new Le),this.onDidChangeEmitter=this._register(new i.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(pe));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>n.has(e))),i=e.change.overrides.filter((([e,t])=>t.some((e=>n.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new de(void 0));else for(const n of i)this.languageService.isRegisteredLanguageId(n)&&(this.configurations.delete(n),this.onDidChangeEmitter.fire(new de(n)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new de(e.languageId))})))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=me(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};function me(e,t,n,i){let r=t.getLanguageConfiguration(e);if(!r){if(!i.isRegisteredLanguageId(e))return new we(e,{});r=new we(e,{})}const s=be(r.languageId,n),o=ve([r.underlyingConfig,s]),a=new we(r.languageId,o);return a}fe=he([ue(0,te.pG),ue(1,v.L)],fe);const pe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function be(e,t){const n=t.getValue(pe.brackets,{overrideIdentifier:e}),i=t.getValue(pe.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:_e(n),colorizedBracketPairs:_e(i)}}function _e(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class ke{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new Ce(e,t,++this._order);return this._entries.push(n),this._resolved=null,(0,r.s)((()=>{for(let e=0;ee.configuration))))}}function ve(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const n of e)t={comments:n.comments||t.comments,brackets:n.brackets||t.brackets,wordPattern:n.wordPattern||t.wordPattern,indentationRules:n.indentationRules||t.indentationRules,onEnterRules:n.onEnterRules||t.onEnterRules,autoClosingPairs:n.autoClosingPairs||t.autoClosingPairs,surroundingPairs:n.surroundingPairs||t.surroundingPairs,autoCloseBefore:n.autoCloseBefore||t.autoCloseBefore,folding:n.folding||t.folding,colorizedBracketPairs:n.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:n.__electricCharacterSupport||t.__electricCharacterSupport};return t}class Ce{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class ye{constructor(e){this.languageId=e}}class Le extends r.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(ie.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let i=this._entries.get(e);i||(i=new ke(e),this._entries.set(e,i));const s=i.register(t,n);return this._onDidChange.fire(new ye(e)),(0,r.s)((()=>{s.dispose(),this._onDidChange.fire(new ye(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class we{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new Z(this.underlyingConfig):null,this.comments=we._handleComments(this.underlyingConfig),this.characterPair=new S(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||C.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new Y(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new se(e,this.underlyingConfig)}getWordDefinition(){return(0,C.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new P(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new J(this.brackets)),this._electricCharacter}onEnter(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null}getAutoClosingPairs(){return new L(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){const[e,i]=t.blockComment;n.blockCommentStartToken=e,n.blockCommentEndToken=i}return n}}(0,ne.v)(ge,fe,1);var Se=n(9322);class xe{constructor(e,t,n,i){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=i}}class Ee{constructor(e,t,n,i,r,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=i,this.nestingLevelOfEqualBracketType=r,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class Ne extends Ee{constructor(e,t,n,i,r,s,o){super(e,t,n,i,r,s),this.minVisibleColumnIndentation=o}}var Te=n(3904);function Ae(e,t,n,i){return e!==n?De(n-e,i):De(0,i-t)}const Ie=0;function Oe(e){return 0===e}const Me=2**26;function De(e,t){return e*Me+t}function Re(e){const t=e,n=Math.floor(t/Me),i=t-n*Me;return new Te.W(n,i)}function Be(e){return Math.floor(e/Me)}function Fe(e){return e}function Pe(e,t){let n=e+t;return t>=Me&&(n-=e%Me),n}function Ve(e,t){return e.reduce(((e,n)=>Pe(e,t(n))),Ie)}function ze(e,t){return e===t}function je(e,t){const n=e,i=t,r=i-n;if(r<=0)return Ie;const s=Math.floor(n/Me),o=Math.floor(i/Me),a=i-o*Me;if(s===o){const e=n-s*Me;return De(0,a-e)}return De(o-s,a)}function qe(e,t){return e=t}function $e(e){return De(e.lineNumber-1,e.column-1)}function He(e,t){const n=e,i=Math.floor(n/Me),r=n-i*Me,s=t,o=Math.floor(s/Me),a=s-o*Me;return new p.Q(i+1,r+1,o+1,a+1)}function Ke(e){const t=(0,c.uz)(e);return De(t.length-1,t[t.length-1].length)}class Ge{static fromModelContentChanges(e){const t=e.map((e=>{const t=p.Q.lift(e.range);return new Ge($e(t.getStartPosition()),$e(t.getEndPosition()),Ke(e.text))})).reverse();return t}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${Re(this.startOffset)}...${Re(this.endOffset)}) -> ${Re(this.newLength)}`}}class Qe{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Je.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return null===n?null:je(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?De(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):De(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Re(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?De(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):De(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){while(this.nextEditIdx>5;if(0===i){const e=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;while(1){const i=this.lineTokens,r=i.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(n>1500)break}const i=Ae(e,t,this.lineIdx,this.lineCharOffset);return new ft(i,0,-1,Ye.getEmpty(),new ht(i))}}class bt{constructor(e,t){this.text=e,this._offset=Ie,this.idx=0;const n=t.getRegExpStr(),i=n?new RegExp(n+"|\n","gi"):null,r=[];let s,o=0,a=0,l=0,c=0;const h=[];for(let g=0;g<60;g++)h.push(new ft(De(0,g),0,-1,Ye.getEmpty(),new ht(De(0,g))));const u=[];for(let g=0;g<60;g++)u.push(new ft(De(1,g),0,-1,Ye.getEmpty(),new ht(De(1,g))));if(i){i.lastIndex=0;while(null!==(s=i.exec(e))){const e=s.index,n=s[0];if("\n"===n)o++,a=e+1;else{if(l!==e){let t;if(c===o){const n=e-l;if(nkt(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(2===n.kind&&n.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}function kt(e){let t=(0,c.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}class vt{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=_t.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Ct(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function n(){if(t>=e.length)return null;const n=t,i=e[n].listHeight;t++;while(t=2?yt(0===n&&t===e.length?e:e.slice(n,t),!1):e[n]}let i=n(),r=n();if(!r)return i;for(let o=n();o;o=n())Lt(i,r)<=Lt(r,o)?(i=wt(i,r),r=o):r=wt(r,o);const s=wt(i,r);return s}function yt(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let n=e.length;while(n>3){const i=n>>1;for(let r=0;r=3?e[2]:null,t)}function Lt(e,t){return Math.abs(e.listHeight-t.listHeight)}function wt(e,t){return e.listHeight===t.listHeight?it.create23(e,t,null,!1):e.listHeight>t.listHeight?St(e,t):xt(t,e)}function St(e,t){e=e.toMutable();let n=e;const i=[];let r;while(1){if(t.listHeight===n.listHeight){r=t;break}if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const e=i[s];r?e.childrenLength>=3?r=it.create23(e.unappendChild(),r,null,!1):(e.appendChildOfSameHeight(r),r=void 0):e.handleChildrenChanged()}return r?it.create23(e,r,null,!1):e}function xt(e,t){e=e.toMutable();let n=e;const i=[];while(t.listHeight!==n.listHeight){if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeFirstElementMutable()}let r=t;for(let s=i.length-1;s>=0;s--){const e=i[s];r?e.childrenLength>=3?r=it.create23(r,e.unprependChild(),null,!1):(e.prependChildOfSameHeight(r),r=void 0):e.handleChildrenChanged()}return r?it.create23(r,e,null,!1):e}class Et{constructor(e){this.lastOffset=Ie,this.nextNodes=[e],this.offsets=[Ie],this.idxs=[]}readLongestNodeAt(e,t){if(qe(e,this.lastOffset))throw new Error("Invalid offset");this.lastOffset=e;while(1){const n=Tt(this.nextNodes);if(!n)return;const i=Tt(this.offsets);if(qe(e,i))return;if(qe(i,e))if(Pe(i,n.length)<=e)this.nextNodeAfterCurrent();else{const e=Nt(n);-1!==e?(this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const e=Nt(n);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)}}}}nextNodeAfterCurrent(){while(1){const e=Tt(this.offsets),t=Tt(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const n=Tt(this.nextNodes),i=Nt(n,this.idxs[this.idxs.length-1]);if(-1!==i){this.nextNodes.push(n.getChild(i)),this.offsets.push(Pe(e,t.length)),this.idxs[this.idxs.length-1]=i;break}this.idxs.pop()}}}function Nt(e,t=-1){while(1){if(t++,t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function Tt(e){return e.length>0?e[e.length-1]:void 0}function At(e,t,n,i){const r=new It(e,t,n,i);return r.parseDocument()}class It{constructor(e,t,n,i){if(this.tokenizer=e,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,n&&i)throw new Error("Not supported");this.oldNodeReader=n?new Et(n):void 0,this.positionMapper=new Qe(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ye.getEmpty(),0);return e||(e=it.getEmpty()),e}parseList(e,t){const n=[];while(1){let i=this.tryReadChildFromCache(e);if(!i){const n=this.tokenizer.peek();if(!n||2===n.kind&&n.bracketIds.intersects(e))break;i=this.parseChild(e,t+1)}4===i.kind&&0===i.childrenLength||n.push(i)}const i=this.oldNodeReader?Ct(n):yt(n,this.createImmutableLists);return i}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!Oe(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(n=>{if(null!==t&&!qe(n.length,t))return!1;const i=n.canBeReused(e);return i}));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new dt(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new ht(n.length);const i=e.merge(n.bracketIds),r=this.parseList(i,t+1),s=this.tokenizer.peek();return s&&2===s.kind&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),nt.create(n.astNode,r,s.astNode)):nt.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}function Ot(e,t){if(0===e.length)return t;if(0===t.length)return e;const n=new o.j3(Dt(e)),i=Dt(t);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let r=n.dequeue();function s(e){if(void 0===e){const e=n.takeWhile((e=>!0))||[];return r&&e.unshift(r),e}const t=[];while(r&&!Oe(e)){const[i,s]=r.splitAt(e);t.push(i),e=je(i.lengthAfter,e),r=s??n.dequeue()}return Oe(e)||t.push(new Mt(!1,e,e)),t}const a=[];function l(e,t,n){if(a.length>0&&ze(a[a.length-1].endOffset,e)){const e=a[a.length-1];a[a.length-1]=new Ge(e.startOffset,t,Pe(e.newLength,n))}else a.push({startOffset:e,endOffset:t,newLength:n})}let c=Ie;for(const o of i){const e=s(o.lengthBefore);if(o.modified){const t=Ve(e,(e=>e.lengthBefore)),n=Pe(c,t);l(c,n,o.lengthAfter),c=n}else for(const t of e){const e=c;c=Pe(c,t.lengthBefore),t.modified&&l(e,c,t.lengthAfter)}}return a}class Mt{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=je(e,this.lengthAfter);return ze(t,Ie)?[this,void 0]:this.modified?[new Mt(this.modified,this.lengthBefore,e),new Mt(this.modified,Ie,t)]:[new Mt(this.modified,e,e),new Mt(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${Re(this.lengthBefore)} -> ${Re(this.lengthAfter)}`}}function Dt(e){const t=[];let n=Ie;for(const i of e){const e=je(n,i.startOffset);Oe(e)||t.push(new Mt(!1,e,e));const r=je(i.startOffset,i.endOffset);t.push(new Mt(!0,r,i.newLength)),n=i.endOffset}return t}class Rt extends r.jG{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new i.vl,this.denseKeyProvider=new et,this.brackets=new vt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new bt(this.textModel.getValue(),e);this.initialAstWithoutTokens=At(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Ge(De(e.fromLineNumber-1,0),De(e.toLineNumber,0),De(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Ge.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=Ot(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=Ot(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const i=!1,r=i?t?.deepClone():t,s=new mt(this.textModel,this.brackets),o=At(s,e,r,n);return o}getBracketsInRange(e,t){this.flushQueue();const n=De(e.startLineNumber-1,e.startColumn-1),i=De(e.endLineNumber-1,e.endColumn-1);return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens;Pt(r,Ie,r.length,n,i,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const n=$e(e.getStartPosition()),i=$e(e.getEndPosition());return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens,s=new Vt(e,t,this.textModel);zt(r,Ie,r.length,n,i,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Ft(t,Ie,t.length,$e(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Bt(t,Ie,t.length,$e(e))}}function Bt(e,t,n,i){if(4===e.kind||2===e.kind){const r=[];for(const i of e.children)n=Pe(t,i.length),r.push({nodeOffsetStart:t,nodeOffsetEnd:n}),t=n;for(let t=r.length-1;t>=0;t--){const{nodeOffsetStart:n,nodeOffsetEnd:s}=r[t];if(qe(n,i)){const r=Bt(e.children[t],n,s,i);if(r)return r}}return null}if(3===e.kind)return null;if(1===e.kind){const i=He(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function Ft(e,t,n,i){if(4===e.kind||2===e.kind){for(const r of e.children){if(n=Pe(t,r.length),qe(i,n)){const e=Ft(r,t,n,i);if(e)return e}t=n}return null}if(3===e.kind)return null;if(1===e.kind){const i=He(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function Pt(e,t,n,i,r,s,o,a,l,c,h=!1){if(o>200)return!0;e:while(1)switch(e.kind){case 4:{const a=e.childrenLength;for(let h=0;h200)return!0;let l=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const h=Pe(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),l=s.push(new Ne(He(t,n),He(t,h),e.closingBracket?He(Pe(h,e.child?.length||Ie),n):void 0,o,c,e,u)),t=h,l&&e.child){const c=e.child;if(n=Pe(t,c.length),We(t,r)&&Ue(n,i)&&(l=zt(c,t,n,i,r,s,o+1,a),!l))return!1}a?.set(e.openingBracket.text,c)}else{let n=t;for(const t of e.children){const e=n;if(n=Pe(n,t.length),We(e,r)&&We(i,n)&&(l=zt(t,e,n,i,r,s,o,a),!l))return!1}}return l}class jt extends r.jG{get canBuildAST(){const e=5e6;return this.textModel.getValueLength()<=e}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new r.HE),this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new r.Cm;this.bracketPairsTree.value=qt(e.add(new Rt(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),e),e.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||o.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||o.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||o.c1.empty}findMatchingBracketUp(e,t,n){const i=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column);if(this.canBuildAST){const n=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!n)return null;const i=this.getBracketPairsInRange(p.Q.fromPositions(t,t)).findLast((e=>n.closes(e.openingBracketInfo)));return i?i.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!s)return null;const o=s.textIsBracket[t];return o?$t(this._findMatchingBracketUp(o,i,Wt(n))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(p.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,o.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),p.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const n=Wt(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,i){const r=t.getCount(),s=t.getLanguageId(i);let o=Math.max(0,e.column-1-n.maxBracketLength);for(let l=i-1;l>=0;l--){const e=t.getEndOffset(l);if(e<=o)break;if(x(t.getStandardTokenType(l))||t.getLanguageId(l)!==s){o=e;break}}let a=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let l=i+1;l=a)break;if(x(t.getStandardTokenType(l))||t.getLanguageId(l)!==s){a=e;break}}return{searchStartOffset:o,searchEndOffset:a}}_matchBracket(e,t){const n=e.lineNumber,i=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),s=i.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(o&&!x(i.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,s),c=null;while(1){const i=Q.findNextBracketInRange(o.forwardRegex,n,r,a,l);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=r.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),n=this._matchFoundBracket(i,o.textIsBracket[e],o.textIsOpenBracket[e],t);if(n){if(n instanceof Ut)return null;c=n}}a=i.endColumn-1}if(c)return c}if(s>0&&i.getStartOffset(s)===e.column-1){const o=s-1,a=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(o)).brackets;if(a&&!x(i.getStandardTokenType(o))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,a,o),c=Q.findPrevBracketInRange(a.reversedRegex,n,r,s,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),n=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(n)return n instanceof Ut?null:n}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return r?r instanceof Ut?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const i=e.languageId,r=e.reversedRegex;let s=-1,o=0;const a=(t,i,a,l)=>{while(1){if(n&&++o%100===0&&!n())return Ut.INSTANCE;const c=Q.findPrevBracketInRange(r,t,i,a,l);if(!c)break;const h=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this.textModel.tokenization.getLineTokens(l),n=e.getCount(),r=this.textModel.getLineContent(l);let s=n-1,o=r.length,c=r.length;l===t.lineNumber&&(s=e.findTokenIndexAtOffset(t.column-1),o=t.column-1,c=t.column-1);let h=!0;for(;s>=0;s--){const t=e.getLanguageId(s)===i&&!x(e.getStandardTokenType(s));if(t)h?o=e.getStartOffset(s):(o=e.getStartOffset(s),c=e.getEndOffset(s));else if(h&&o!==c){const e=a(l,r,o,c);if(e)return e}h=t}if(h&&o!==c){const e=a(l,r,o,c);if(e)return e}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageId,r=e.forwardRegex;let s=1,o=0;const a=(t,i,a,l)=>{while(1){if(n&&++o%100===0&&!n())return Ut.INSTANCE;const c=Q.findNextBracketInRange(r,t,i,a,l);if(!c)break;const h=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let c=t.lineNumber;c<=l;c++){const e=this.textModel.tokenization.getLineTokens(c),n=e.getCount(),r=this.textModel.getLineContent(c);let s=0,o=0,l=0;c===t.lineNumber&&(s=e.findTokenIndexAtOffset(t.column-1),o=t.column-1,l=t.column-1);let h=!0;for(;s=1;s--){const e=this.textModel.tokenization.getLineTokens(s),o=e.getCount(),a=this.textModel.getLineContent(s);let l=o-1,c=a.length,h=a.length;if(s===t.lineNumber){l=e.findTokenIndexAtOffset(t.column-1),c=t.column-1,h=t.column-1;const s=e.getLanguageId(l);n!==s&&(n=s,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let u=!0;for(;l>=0;l--){const t=e.getLanguageId(l);if(n!==t){if(i&&r&&u&&c!==h){const e=Q.findPrevBracketInRange(i.reversedRegex,s,a,c,h);if(e)return this._toFoundBracket(r,e);u=!1}n=t,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const o=!!i&&!x(e.getStandardTokenType(l));if(o)u?c=e.getStartOffset(l):(c=e.getStartOffset(l),h=e.getEndOffset(l));else if(r&&i&&u&&c!==h){const e=Q.findPrevBracketInRange(i.reversedRegex,s,a,c,h);if(e)return this._toFoundBracket(r,e)}u=o}if(r&&i&&u&&c!==h){const e=Q.findPrevBracketInRange(i.reversedRegex,s,a,c,h);if(e)return this._toFoundBracket(r,e)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const n=this.textModel.getLineCount();let i=null,r=null,s=null;for(let o=t.lineNumber;o<=n;o++){const e=this.textModel.tokenization.getLineTokens(o),n=e.getCount(),a=this.textModel.getLineContent(o);let l=0,c=0,h=0;if(o===t.lineNumber){l=e.findTokenIndexAtOffset(t.column-1),c=t.column-1,h=t.column-1;const n=e.getLanguageId(l);i!==n&&(i=n,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let u=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const i=Wt(t),r=this.textModel.getLineCount(),s=new Map;let o=[];const a=(e,t)=>{if(!s.has(e)){const n=[];for(let e=0,i=t?t.brackets.length:0;e{while(1){if(i&&++l%100===0&&!i())return Ut.INSTANCE;const a=Q.findNextBracketInRange(e.forwardRegex,t,n,r,s);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[c];if(h&&(h.isOpen(c)?o[h.index]++:h.isClose(c)&&o[h.index]--,-1===o[h.index]))return this._matchFoundBracket(a,h,!1,i);r=a.endColumn-1}return null};let h=null,u=null;for(let d=n.lineNumber;d<=r;d++){const e=this.textModel.tokenization.getLineTokens(d),t=e.getCount(),i=this.textModel.getLineContent(d);let r=0,s=0,o=0;if(d===n.lineNumber){r=e.findTokenIndexAtOffset(n.column-1),s=n.column-1,o=n.column-1;const t=e.getLanguageId(r);h!==t&&(h=t,u=this.languageConfigurationService.getLanguageConfiguration(h).brackets,a(h,u))}let l=!0;for(;rt?.dispose()}}function Wt(e){if("undefined"===typeof e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class Ut{static{this.INSTANCE=new Ut}constructor(){this._searchCanceledBrand=void 0}}function $t(e){return e instanceof Ut?null:e}var Ht=n(2764),Kt=n(3711);class Gt extends r.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new Qt,this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,i){if(i)return[];if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const r=this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray();return r}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new p.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Qt{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,Kt.zy)(((e,t)=>{const n=[Ht.sN,Ht.lQ,Ht.ss,Ht.l5,Ht.sH,Ht.zp],i=new Qt;t.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${e.getColor(Ht.s7)}; }`);const r=n.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let s=0;s<30;s++){const e=r[s%r.length];t.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${e}; }`)}}));var Jt=n(1337);function Xt(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Yt{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Xt(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Xt(this.oldText)}")`:`(replace@${this.oldPosition} "${Xt(this.oldText)}" with "${Xt(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const i=t.length;E.Sw(e,i,n),n+=4;for(let r=0;r0&&(this.changes=Zt(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(E.Sw(e,t?t.length:0,n),n+=4,t)for(const i of t)E.Sw(e,i.selectionStartLineNumber,n),n+=4,E.Sw(e,i.selectionStartColumn,n),n+=4,E.Sw(e,i.positionLineNumber,n),n+=4,E.Sw(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=E.bb(e,t);t+=4;for(let r=0;re.toString())).join(", ")}matchesResource(e){const t=h.r.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof rn}append(e,t,n,i,r){this._data instanceof rn&&this._data.append(e,t,n,i,r)}close(){this._data instanceof rn&&(this._data=this._data.serialize())}open(){this._data instanceof rn||(this._data=rn.deserialize(this._data))}undo(){if(h.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof rn&&(this._data=this._data.serialize());const e=rn.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(h.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof rn&&(this._data=this._data.serialize());const e=rn.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof rn&&(this._data=this._data.serialize()),this._data.byteLength+168}}class on{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const e=nn(i.resource);this._editStackElementsMap.set(e,i)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=nn(e);return this._editStackElementsMap.has(t)}setModel(e){const t=nn(h.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=nn(e.uri);if(this._editStackElementsMap.has(t)){const n=this._editStackElementsMap.get(t);return n.canAppend(e)}return!1}append(e,t,n,i,r){const s=nn(e.uri),o=this._editStackElementsMap.get(s);o.append(e,t,n,i,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=nn(e);if(this._editStackElementsMap.has(t)){const e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,tn.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function an(e){const t=e.getEOL();return"\n"===t?0:1}function ln(e){return!!e&&(e instanceof sn||e instanceof on)}class cn{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ln(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ln(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const n=this._undoRedoService.getLastElement(this._model.uri);if(ln(n)&&n.canAppend(this._model))return n;const i=new sn(Jt.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i,t),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],an(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,i){const r=this._getOrCreateEditStackElement(e,i),s=this._model.applyEdits(t,!0),o=cn._computeCursorState(n,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),r.append(this._model,a.map((e=>e.textChange)),an(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return(0,l.dz)(n),null}}}var hn,un=n(3654);class dn extends r.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function gn(e,t){let n=0,i=0;const r=e.length;while(ii)throw new l.D7("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide);let o=-2,a=-1,c=-2,h=-1;const u=e=>{if(-1!==o&&(-2===o||o>e-1)){o=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){o=t,a=e;break}}}if(-2===c){c=-1,h=-1;for(let t=e;t=0){c=t,h=e;break}}}};let d=-2,g=-1,f=-2,m=-1;const p=e=>{if(-2===d){d=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){d=t,g=e;break}}}if(-1!==f&&(-2===f||f=0){f=t,m=e;break}}}};let b=0,_=!0,k=0,v=!0,C=0,y=0;for(let l=0;_||v;l++){const r=e-l,o=e+l;l>1&&(r<1||r1&&(o>i||o>n)&&(v=!1),l>5e4&&(_=!1,v=!1);let f=-1;if(_&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(c=r-1,h=e,f=Math.ceil(e/this.textModel.getOptions().indentSize)):(u(r),f=this._getIndentLevelForWhitespaceLine(s,a,h))}let L=-1;if(v&&o<=i){const e=this._computeIndentLevel(o-1);e>=0?(d=o-1,g=e,L=Math.ceil(e/this.textModel.getOptions().indentSize)):(p(o),L=this._getIndentLevelForWhitespaceLine(s,g,m))}if(0!==l){if(1===l){if(o<=i&&L>=0&&y+1===L){_=!1,b=o,k=o,C=L;continue}if(r>=1&&f>=0&&f-1===y){v=!1,b=r,k=r,C=f;continue}if(b=e,k=e,C=y,0===C)return{startLineNumber:b,endLineNumber:k,indent:C}}_&&(f>=C?b=r:_=!1),v&&(L>=C?k=o:v=!1)}else y=f}return{startLineNumber:b,endLineNumber:k,indent:C}}getLinesBracketGuides(e,t,n,i){const r=[];for(let c=e;c<=t;c++)r.push([]);const s=!0,o=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new p.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let a;if(n&&o.length>0){const i=(e<=n.lineNumber&&n.lineNumber<=t?o:this.textModel.bracketPairs.getBracketPairsInRange(p.Q.fromPositions(n)).toArray()).filter((e=>p.Q.strictContainsPosition(e.range,n)));a=(0,un.Uk)(i,(e=>s||e.range.startLineNumber!==e.range.endLineNumber))?.range}const l=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,h=new bn;for(const u of o){if(!u.closingBracketRange)continue;const n=a&&u.range.equalsRange(a);if(!n&&!i.includeInactive)continue;const o=h.getInlineClassName(u.nestingLevel,u.nestingLevelOfEqualBracketType,l)+(i.highlightActive&&n?" "+h.activeClassName:""),d=u.openingBracketRange.getStartPosition(),g=u.closingBracketRange.getStartPosition(),f=i.horizontalGuides===hn.Enabled||i.horizontalGuides===hn.EnabledForActive&&n;if(u.range.startLineNumber===u.range.endLineNumber){s&&f&&r[u.range.startLineNumber-e].push(new fn(-1,u.openingBracketRange.getEndPosition().column,o,new mn(!1,g.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(g),p=this.getVisibleColumnFromPosition(u.openingBracketRange.getStartPosition()),b=Math.min(p,m,u.minVisibleColumnIndentation+1);let _=!1;const k=c.HG(this.textModel.getLineContent(u.closingBracketRange.startLineNumber)),v=k=e&&p>b&&r[d.lineNumber-e].push(new fn(b,-1,o,new mn(!1,d.column),-1,-1)),g.lineNumber<=t&&m>b&&r[g.lineNumber-e].push(new fn(b,-1,o,new mn(!_,g.column),-1,-1)))}for(const c of r)c.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return r}getVisibleColumnFromPosition(e){return d.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide),o=new Array(t-e+1);let a=-2,l=-1,c=-2,h=-1;for(let u=e;u<=t;u++){const t=u-e,r=this._computeIndentLevel(u-1);if(r>=0)a=u-1,l=r,o[t]=Math.ceil(r/i.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=u-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,h=t;break}}}o[t]=this._getIndentLevelForWhitespaceLine(s,l,h)}}return o}_getIndentLevelForWhitespaceLine(e,t,n){const i=this.textModel.getOptions();return-1===t||-1===n?0:t0&&a>0)return;if(l>0&&c>0)return;const h=Math.abs(a-c),u=Math.abs(o-l);if(0===h)return r.spacesDiff=u,void(u>0&&0<=l-1&&l-10?r++:p>1&&s++,kn(o,a,l,m,u),u.looksLikeAlignment&&(!n||t!==u.spacesDiff))continue;const _=u.spacesDiff;_<=c&&h[_]++,o=l,a=m}let d=n;r!==s&&(d=r{const n=h[t];n>e&&(e=n,g=t)})),4===g&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(g=2)}return{insertSpaces:d,tabSize:g}}function Cn(e){return(1&e.metadata)>>>0}function yn(e,t){e.metadata=254&e.metadata|t}function Ln(e){return(2&e.metadata)>>>1===1}function wn(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function Sn(e){return(4&e.metadata)>>>2===1}function xn(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function En(e){return(64&e.metadata)>>>6===1}function Nn(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function Tn(e){return(24&e.metadata)>>>3}function An(e,t){e.metadata=231&e.metadata|t<<3}function In(e){return(32&e.metadata)>>>5===1}function On(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class Mn{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,yn(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,xn(this,!1),Nn(this,!1),An(this,1),On(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,wn(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;const t=this.options.className;xn(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Nn(this,null!==this.options.glyphMarginClassName),An(this,this.options.stickiness),On(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Dn=new Mn(null,0,0);Dn.parent=Dn,Dn.left=Dn,Dn.right=Dn,yn(Dn,0);class Rn{constructor(){this.root=Dn,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,r,s){return this.root===Dn?[]:Un(this,e,t,n,i,r,s)}search(e,t,n,i){return this.root===Dn?[]:Wn(this,e,t,n,i)}collectNodesFromOwner(e){return jn(this,e)}collectNodesPostOrder(){return qn(this)}insert(e){$n(this,e),this._normalizeDeltaIfNecessary()}delete(e){Kn(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;while(e!==this.root)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const r=n.start+i,s=n.end+i;n.setCachedOffsets(r,s,t)}acceptReplace(e,t,n,i){const r=Vn(this,e,e+t);for(let s=0,o=r.length;sn)&&(1!==i&&(2===i||t))}function Pn(e,t,n,i,r){const s=Tn(e),o=0===s||2===s,a=1===s||2===s,l=n-t,c=i,h=Math.min(l,c),u=e.start;let d=!1;const g=e.end;let f=!1;t<=u&&g<=n&&In(e)&&(e.start=t,d=!0,e.end=t,f=!0);{const e=r?1:l>0?2:0;!d&&Fn(u,o,t,e)&&(d=!0),!f&&Fn(g,a,t,e)&&(f=!0)}if(h>0&&!r){const e=l>c?2:0;!d&&Fn(u,o,t+h,e)&&(d=!0),!f&&Fn(g,a,t+h,e)&&(f=!0)}{const i=r?1:0;!d&&Fn(u,o,n,i)&&(e.start=t+c,d=!0),!f&&Fn(g,a,n,i)&&(e.end=t+c,f=!0)}const m=c-l;d||(e.start=Math.max(0,u+m)),f||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function Vn(e,t,n){let i=e.root,r=0,s=0,o=0,a=0;const l=[];let c=0;while(i!==Dn)if(Ln(i))wn(i.left,!1),wn(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else{if(!Ln(i.left)){if(s=r+i.maxEnd,sn?wn(i,!0):(a=r+i.end,a>=t&&(i.setCachedOffsets(o,a,0),l[c++]=i),wn(i,!0),i.right===Dn||Ln(i.right)||(r+=i.delta,i=i.right))}return wn(e.root,!1),l}function zn(e,t,n,i){let r=e.root,s=0,o=0,a=0;const l=i-(n-t);while(r!==Dn)if(Ln(r))wn(r.left,!1),wn(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),Zn(r),r=r.parent;else{if(!Ln(r.left)){if(o=s+r.maxEnd,on?(r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),wn(r,!0)):(wn(r,!0),r.right===Dn||Ln(r.right)||(s+=r.delta,r=r.right))}wn(e.root,!1)}function jn(e,t){let n=e.root;const i=[];let r=0;while(n!==Dn)Ln(n)?(wn(n.left,!1),wn(n.right,!1),n=n.parent):n.left===Dn||Ln(n.left)?(n.ownerId===t&&(i[r++]=n),wn(n,!0),n.right===Dn||Ln(n.right)||(n=n.right)):n=n.left;return wn(e.root,!1),i}function qn(e){let t=e.root;const n=[];let i=0;while(t!==Dn)Ln(t)?(wn(t.left,!1),wn(t.right,!1),t=t.parent):t.left===Dn||Ln(t.left)?t.right===Dn||Ln(t.right)?(n[i++]=t,wn(t,!0)):t=t.right:t=t.left;return wn(e.root,!1),n}function Wn(e,t,n,i,r){let s=e.root,o=0,a=0,l=0;const c=[];let h=0;while(s!==Dn){if(Ln(s)){wn(s.left,!1),wn(s.right,!1),s===s.parent.right&&(o-=s.parent.delta),s=s.parent;continue}if(s.left!==Dn&&!Ln(s.left)){s=s.left;continue}a=o+s.start,l=o+s.end,s.setCachedOffsets(a,l,i);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),n&&Sn(s)&&(e=!1),r&&!En(s)&&(e=!1),e&&(c[h++]=s),wn(s,!0),s.right===Dn||Ln(s.right)||(o+=s.delta,s=s.right)}return wn(e.root,!1),c}function Un(e,t,n,i,r,s,o){let a=e.root,l=0,c=0,h=0,u=0;const d=[];let g=0;while(a!==Dn)if(Ln(a))wn(a.left,!1),wn(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!Ln(a.left)){if(c=l+a.maxEnd,cn)wn(a,!0);else{if(u=l+a.end,u>=t){a.setCachedOffsets(h,u,s);let e=!0;i&&a.ownerId&&a.ownerId!==i&&(e=!1),r&&Sn(a)&&(e=!1),o&&!En(a)&&(e=!1),e&&(d[g++]=a)}wn(a,!0),a.right===Dn||Ln(a.right)||(l+=a.delta,a=a.right)}}return wn(e.root,!1),d}function $n(e,t){if(e.root===Dn)return t.parent=Dn,t.left=Dn,t.right=Dn,yn(t,0),e.root=t,e.root;Hn(e,t),ei(t.parent);let n=t;while(n!==e.root&&1===Cn(n.parent))if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===Cn(t)?(yn(n.parent,0),yn(t,0),yn(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,Jn(e,n)),yn(n.parent,0),yn(n.parent.parent,1),Xn(e,n.parent.parent))}else{const t=n.parent.parent.left;1===Cn(t)?(yn(n.parent,0),yn(t,0),yn(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,Xn(e,n)),yn(n.parent,0),yn(n.parent.parent,1),Jn(e,n.parent.parent))}return yn(e.root,0),t}function Hn(e,t){let n=0,i=e.root;const r=t.start,s=t.end;while(1){const e=ti(r,s,i.start+n,i.end+n);if(e<0){if(i.left===Dn){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===Dn){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=Dn,t.right=Dn,yn(t,1)}function Kn(e,t){let n,i;if(t.left===Dn?(n=t.right,i=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===Dn?(n=t.left,i=t):(i=Gn(t.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,yn(n,0),t.detach(),Qn(),Zn(n),void(e.root.parent=Dn);const r=1===Cn(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,yn(i,Cn(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==Dn&&(i.left.parent=i),i.right!==Dn&&(i.right.parent=i)),t.detach(),r)return ei(n.parent),i!==t&&(ei(i),ei(i.parent)),void Qn();let s;ei(n),ei(n.parent),i!==t&&(ei(i),ei(i.parent));while(n!==e.root&&0===Cn(n))n===n.parent.left?(s=n.parent.right,1===Cn(s)&&(yn(s,0),yn(n.parent,1),Jn(e,n.parent),s=n.parent.right),0===Cn(s.left)&&0===Cn(s.right)?(yn(s,1),n=n.parent):(0===Cn(s.right)&&(yn(s.left,0),yn(s,1),Xn(e,s),s=n.parent.right),yn(s,Cn(n.parent)),yn(n.parent,0),yn(s.right,0),Jn(e,n.parent),n=e.root)):(s=n.parent.left,1===Cn(s)&&(yn(s,0),yn(n.parent,1),Xn(e,n.parent),s=n.parent.left),0===Cn(s.left)&&0===Cn(s.right)?(yn(s,1),n=n.parent):(0===Cn(s.left)&&(yn(s.right,0),yn(s,1),Jn(e,s),s=n.parent.left),yn(s,Cn(n.parent)),yn(n.parent,0),yn(s.left,0),Xn(e,n.parent),n=e.root));yn(n,0),Qn()}function Gn(e){while(e.left!==Dn)e=e.left;return e}function Qn(){Dn.parent=Dn,Dn.delta=0,Dn.start=0,Dn.end=0}function Jn(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==Dn&&(n.left.parent=t),n.parent=t.parent,t.parent===Dn?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,Zn(t),Zn(n)}function Xn(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==Dn&&(n.right.parent=t),n.parent=t.parent,t.parent===Dn?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,Zn(t),Zn(n)}function Yn(e){let t=e.end;if(e.left!==Dn){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==Dn){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function Zn(e){e.maxEnd=Yn(e)}function ei(e){while(e!==Dn){const t=Yn(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function ti(e,t,n,i){return e===n?t-i:e-n}class ni{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==ii)return ri(this.right);let e=this;while(e.parent!==ii){if(e.parent.left===e)break;e=e.parent}return e.parent===ii?ii:e.parent}prev(){if(this.left!==ii)return si(this.left);let e=this;while(e.parent!==ii){if(e.parent.right===e)break;e=e.parent}return e.parent===ii?ii:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const ii=new ni(null,0);function ri(e){while(e.left!==ii)e=e.left;return e}function si(e){while(e.right!==ii)e=e.right;return e}function oi(e){return e===ii?0:e.size_left+e.piece.length+oi(e.right)}function ai(e){return e===ii?0:e.lf_left+e.piece.lineFeedCnt+ai(e.right)}function li(){ii.parent=ii}function ci(e,t){const n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==ii&&(n.left.parent=t),n.parent=t.parent,t.parent===ii?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function hi(e,t){const n=t.left;t.left=n.right,n.right!==ii&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===ii?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function ui(e,t){let n,i;if(t.left===ii?(i=t,n=i.right):t.right===ii?(i=t,n=i.left):(i=ri(t.right),n=i.right),i===e.root)return e.root=n,n.color=0,t.detach(),li(),void(e.root.parent=ii);const r=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,fi(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,fi(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==ii&&(i.left.parent=i),i.right!==ii&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,fi(e,i)),t.detach(),n.parent.left===n){const t=oi(n),i=ai(n);if(t!==n.parent.size_left||i!==n.parent.lf_left){const r=t-n.parent.size_left,s=i-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=i,gi(e,n.parent,r,s)}}if(fi(e,n.parent),r)return void li();let s;while(n!==e.root&&0===n.color)n===n.parent.left?(s=n.parent.right,1===s.color&&(s.color=0,n.parent.color=1,ci(e,n.parent),s=n.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.right.color&&(s.left.color=0,s.color=1,hi(e,s),s=n.parent.right),s.color=n.parent.color,n.parent.color=0,s.right.color=0,ci(e,n.parent),n=e.root)):(s=n.parent.left,1===s.color&&(s.color=0,n.parent.color=1,hi(e,n.parent),s=n.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.left.color&&(s.right.color=0,s.color=1,ci(e,s),s=n.parent.left),s.color=n.parent.color,n.parent.color=0,s.left.color=0,hi(e,n.parent),n=e.root));n.color=0,li()}function di(e,t){fi(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,ci(e,t)),t.parent.color=0,t.parent.parent.color=1,hi(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,hi(e,t)),t.parent.color=0,t.parent.parent.color=1,ci(e,t.parent.parent))}e.root.color=0}function gi(e,t,n,i){while(t!==e.root&&t!==ii)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function fi(e,t){let n=0,i=0;if(t!==e.root){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t!==e.root){t=t.parent,n=oi(t.left)-t.size_left,i=ai(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i;while(t!==e.root&&(0!==n||0!==i))t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}}ii.parent=ii,ii.left=ii,ii.right=ii,ii.color=0;var mi=n(2773);const pi=65535;function bi(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class _i{constructor(e,t,n,i,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=r}}function ki(e,t=!0){const n=[0];let i=1;for(let r=0,s=e.length;r126)&&(o=!1)}const a=new _i(bi(e),i,r,s,o);return e.length=0,a}class Ci{constructor(e,t,n,i,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=r}}class yi{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Li{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==ii&&e.iterate(e.root,(e=>(e!==ii&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class wi{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const n=this._cache;for(let i=0;i=e)&&(n[i]=null,t=!0)}if(t){const e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class Si{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new yi("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ii,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let r=0,s=e.length;r0){e[r].lineStarts||(e[r].lineStarts=ki(e[r].buffer));const t=new Ci(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),i=this.rbInsertRight(i,t)}this._searchCache=new wi(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=pi,n=t-Math.floor(t/3),i=2*n;let r="",s=0;const o=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(s<=n||s+l0){const t=r.replace(/\r\n|\r|\n/g,e);o.push(new yi(t,ki(t)))}this.create(o,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Li(this,e)}getOffsetAt(e,t){let n=0,i=this.root;while(i!==ii)if(i.left!==ii&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;const r=this.getAccumulatedValue(i,e-i.lf_left-2);return n+(r+t-1)}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const i=e;while(t!==ii)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,0===r.index){const e=this.getOffsetAt(n+1,1),t=i-e;return new m.y(n+1,t+1)}return new m.y(n+1,r.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===ii){const t=this.getOffsetAt(n+1,1),r=i-e-t;return new m.y(n+1,r+1)}t=t.right}return new m.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){const n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(r+e.remainder,r+t.remainder)}let n=e.node;const i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let s=i.substring(r+e.remainder,r+n.piece.length);n=n.next();while(n!==ii){const e=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=e.substring(i,i+t.remainder);break}s+=e.substr(i,n.piece.length),n=n.next()}return s}getLinesContent(){const e=[];let t=0,n="",i=!1;return this.iterate(this.root,(r=>{if(r===ii)return!0;const s=r.piece;let o=s.length;if(0===o)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,c=s.start.line,h=s.end.line;let u=l[c]+s.start.column;if(i&&(10===a.charCodeAt(u)&&(u++,o--),e[t++]=n,n="",i=!1,0===o))return!0;if(c===h)return this._EOLNormalized||13!==a.charCodeAt(u+o-1)?n+=a.substr(u,o):(i=!0,n+=a.substr(u,o-1)),!0;n+=this._EOLNormalized?a.substring(u,Math.max(u,l[c+1]-this._EOLLength)):a.substring(u,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let i=c+1;ie+g,t.reset(0)):(_=u.buffer,k=e=>e,t.reset(g));do{if(m=t.next(_),m){if(k(m.index)>=f)return c;this.positionInBuffer(e,k(m.index)-d,b);const t=this.getLineFeedCnt(e.piece.bufferIndex,r,b),s=b.line===r.line?b.column-r.column+i:b.column+1,o=s+m[0].length;if(h[c++]=(0,mi.dr)(new p.Q(n+t,s,n+t,o),m,a),k(m.index)+m[0].length>=f)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,n,i){const r=[];let s=0;const o=new mi.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,o,e.startLineNumber,e.startColumn,c,h,t,n,i,s,r),r;let u=e.startLineNumber,d=a.node;while(d!==l.node){const l=this.getLineFeedCnt(d.piece.bufferIndex,c,d.piece.end);if(l>=1){const a=this._buffers[d.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),g=a[c.line+l],f=u===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(d,o,u,f,c,this.positionInBuffer(d,g-h),t,n,i,s,r),s>=i)return r;u+=l}const h=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const a=this.getLineContent(u).substring(h,e.endColumn-1);return s=this._findMatchesInLine(t,o,a,e.endLineNumber,h,s,r,n,i),r}if(s=this._findMatchesInLine(t,o,this.getLineContent(u).substr(h),u,h,s,r,n,i),s>=i)return r;u++,a=this.nodeAt2(u,1),d=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){const a=u===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(u).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,o,l,e.endLineNumber,a,s,r,n,i),r}const g=u===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,o,u,g,c,h,t,n,i,s,r),r}_findMatchesInLine(e,t,n,i,r,s,o,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=n.length;let u=-a;while(-1!==(u=n.indexOf(t,u+a)))if((!c||(0,mi.wC)(c,n,h,u,a))&&(o[s++]=new Se.Dg(new p.Q(i,u+1+r,i,u+1+a+r),null),s>=l))return s;return s}let h;t.reset(0);do{if(h=t.next(n),h&&(o[s++]=(0,mi.dr)(new p.Q(i,h.index+1+r,i,h.index+1+h[0].length+r),h,a),s>=l))return s}while(h);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==ii){const{node:n,remainder:i,nodeStartOffset:r}=this.nodeAt(e),s=n.piece,o=s.bufferIndex,a=this.positionInBuffer(n,i);if(0===n.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&r+s.length===e&&t.lengthe){const e=[];let r=new Ci(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(o,s.end)-this.offsetInBuffer(o,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){const e=this.nodeCharCodeAt(n,i);if(10===e){const e={line:r.start.line+1,column:0};r=new Ci(r.bufferIndex,e,r.end,this.getLineFeedCnt(r.bufferIndex,e,r.end),r.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){const r=this.nodeCharCodeAt(n,i-1);if(13===r){const r=this.positionInBuffer(n,i-1);this.deleteNodeTail(n,r),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a)}else this.deleteNodeTail(n,a);const l=this.createNewPieces(t);r.length>0&&this.rbInsertRight(n,r);let c=n;for(let t=0;t=0;s--)r=this.rbInsertLeft(r,i[s]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]);let r=i;for(let s=1;s=u))break;l=h+1}}return n?(n.line=h,n.column=a-d,null):{line:h,column:a-d}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;const i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;const r=i[n.line+1],s=i[n.line]+n.column;if(r>s+1)return n.line-t.line;const o=s-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(o)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){const n=this._buffers[e].lineStarts;return n[t.line]+t.column}deleteNodes(e){for(let t=0;tpi){const t=[];while(e.length>pi){const n=e.charCodeAt(pi-1);let i;13===n||n>=55296&&n<=56319?(i=e.substring(0,pi-1),e=e.substring(pi-1)):(i=e.substring(0,pi),e=e.substring(pi));const r=ki(i);t.push(new Ci(this._buffers.length,{line:0,column:0},{line:r.length-1,column:i.length-r[r.length-1]},r.length-1,i.length)),this._buffers.push(new yi(i,r))}const n=ki(e);return t.push(new Ci(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new yi(e,n)),t}let t=this._buffers[0].buffer.length;const n=ki(e,!1);let i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let e=0;e=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const i=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:r,nodeStartLineNumber:s-(e-1-n.lf_left)}),a.substring(l+i,l+o-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(n,e-n.lf_left-2),r=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=r.substring(s+t,s+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right}}n=n.next();while(n!==ii){const e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const r=this.getAccumulatedValue(n,0),s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=e.substring(s,s+r-t),i}{const t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=e.substr(t,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;while(e!==ii)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){const n=e.piece,i=this.positionInBuffer(e,t),r=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(t!==r)return{index:t,remainder:0}}return{index:r,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;const n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[r]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),s=t,o=this.offsetInBuffer(n.bufferIndex,s),a=this.getLineFeedCnt(n.bufferIndex,n.start,s),l=a-i,c=o-r,h=n.length+c;e.piece=new Ci(n.bufferIndex,n.start,s,a,h),gi(this,e,c,l)}deleteNodeHead(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),s=t,o=this.getLineFeedCnt(n.bufferIndex,s,n.end),a=this.offsetInBuffer(n.bufferIndex,s),l=o-i,c=r-a,h=n.length+c;e.piece=new Ci(n.bufferIndex,s,n.end,o,h),gi(this,e,c,l)}shrinkNode(e,t,n){const i=e.piece,r=i.start,s=i.end,o=i.length,a=i.lineFeedCnt,l=t,c=this.getLineFeedCnt(i.bufferIndex,i.start,l),h=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,r);e.piece=new Ci(i.bufferIndex,i.start,l,c,h),gi(this,e,h-o,c-a);const u=new Ci(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(d)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const r=ki(t,!1);for(let d=0;de)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;const n={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,i=0;while(n!==ii)if(n.left!==ii&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(r+t-1,s),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:i};t-=n.piece.length-r;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}n=n.next();while(n!==ii){if(n.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(n,0),i=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:i}}if(n.piece.length>=t-1){const e=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:e}}t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===ii||0===e.piece.lineFeedCnt)return!1;const t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,r=n[i]+t.start.column;if(i===n.length-1)return!1;const s=n[i+1];return!(s>r+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(r)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==ii&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const n=[],i=this._buffers[e.piece.bufferIndex].lineStarts;let r;r=0===e.piece.end.column?{line:e.piece.end.line-1,column:i[e.piece.end.line]-i[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,o=e.piece.lineFeedCnt-1;e.piece=new Ci(e.piece.bufferIndex,e.piece.start,r,o,s),gi(this,e,-1,-1),0===e.piece.length&&n.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Ci(t.piece.bufferIndex,a,t.piece.end,c,l),gi(this,t,-1,-1),0===t.piece.length&&n.push(t);const h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let u=0;ue.sortIndex-t.sortIndex))}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;const f=this._doApplyEdits(a);let m=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const n=d[e].oldContent,i=this.getLineContent(t);0!==i.length&&i!==n&&-1===c.HG(i)&&m.push(t)}}return this._onDidChangeContent.fire(),new Se.F4(g,f,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,i=e[e.length-1].range,r=new p.Q(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn);let s=n.startLineNumber,o=n.startColumn;const a=[];for(let u=0,g=e.length;u0&&a.push(n.text),s=i.endLineNumber,o=i.endColumn}const l=a.join(""),[c,h,d]=(0,u.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(xi._sortOpsDescending);const t=[];for(let n=0;n0){const e=o.eolCount+1;c=1===e?new p.Q(a,l,a,l+o.firstLineLength):new p.Q(a,l,a+e-1,o.lastLineLength+1)}else c=new p.Q(a,l,a,l);n=c.endLineNumber,i=c.endColumn,t.push(c),r=o}return t}static _sortOpsAscending(e,t){const n=p.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){const n=p.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class Ei{constructor(e,t,n,i,r,s,o,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=r,this._containsRTL=s,this._containsUnusualLineTerminators=o,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let r=0,s=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=vi(this._tmpLineStarts,e);this.chunks.push(new yi(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=c.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=c.$X(e)))}finish(e=!0){return this._finish(),new Ei(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=ki(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Ti=n(4544),Ai=n(5350),Ii=n(3723),Oi=n(4240),Mi=n(371);const Di=new class{clone(){return this}equals(e){return this===e}};function Ri(e,t){const n=new Uint32Array(2);return n[0]=0,n[1]=(32768|e|2<<24)>>>0,new Ai.rY(n,null===t?Di:t)}class Bi{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(0===t)return void this.insert(e,n);if(0===n)return void this.delete(e,t);const i=this._store.slice(0,e),r=this._store.slice(e+t),s=Fi(n,this._default);this._store=i.concat(s,r)}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const n=[];for(let i=0;i0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e)return void n.appendLineTokens(t)}this._tokens.push(new Pi(e,[t]))}finalize(){return this._tokens}}class zi{static{this.defaultTokenMetadata=33587200}static createEmpty(e,t){const n=zi.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=n,new zi(i,e,t)}static createFromTextAndMetadata(e,t){let n=0,i="";const r=new Array;for(const{text:s,metadata:o}of e)r.push(n+s.length,o),n+=s.length,i+=s;return new zi(new Uint32Array(r),i,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=n}equals(e){return e instanceof zi&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const i=t<<1,r=i+(n<<1);for(let s=i;s0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)],n=gt.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return gt.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return gt.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return gt.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return gt.x.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return gt.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return zi.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new ji(this,e,t,n)}static convertToEndOffset(e,t){const n=e.length>>>1,i=n-1;for(let r=0;r>>1)-1;while(nt&&(i=r)}return n}withInserted(e){if(0===e.length)return this;let t=0,n=0,i="";const r=new Array;let s=0;while(1){const o=ts){i+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];r.push(i.length,e),s=a.offset}i+=a.text,r.push(i.length,a.tokenMetadata),n++}}return new zi(new Uint32Array(r),i,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),n=this.getEndOffset(e),i=this._text.substring(t,n);return i}forEach(e){const t=this.getCount();for(let n=0;n=n)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof ji&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,n=this._source.getStartOffset(t),i=this._source.getEndOffset(t);let r=this._source.getTokenText(t);return nthis._endOffset&&(r=r.substring(0,r.length-(i-this._endOffset))),r}forEach(e){for(let t=0;tt)break;const r=this._textModel.getLineContent(i.lineNumber),s=Ki(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i.startState);e.add(i.lineNumber,s.tokens),this.store.setEndState(i.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const n=this.getStartState(e.lineNumber);if(!n)return 0;const i=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),s=r.substring(0,e.column-1)+t+r.substring(e.column-1),o=Ki(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n),a=new zi(o.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,n){const i=e.lineNumber,r=e.column,s=this.getStartState(i);if(!s)return null;const o=this._textModel.getLineContent(i),a=o.substring(0,r-1)+n+o.substring(r-1+t),l=this._textModel.getLanguageIdAtPosition(i,0),c=Ki(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s),h=new zi(c.tokens,a,this._languageIdCodec);return h}hasAccurateTokensForLine(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&o>=1;o--){const e=this._textModel.getLineFirstNonWhitespaceColumn(o);if(0!==e&&(e0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}}class Hi{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Mi.L(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Mi.L(n.start,e):this._ranges.splice(t,1,new Mi.L(n.start,e),new Mi.L(e+1,n.endExclusive))}}addRange(e){Mi.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;while(!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive))n++;let i=n;while(!(i>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function Ki(e,t,n,i,r,s){let o=null;if(n)try{o=n.tokenizeEncoded(i,r,s.clone())}catch(a){(0,l.dz)(a)}return o||(o=Ri(e.encodeLanguageId(t),s)),zi.convertToEndOffset(o.tokens,i.length),o}class Gi{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,Ii.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;const i=this._tokenizeOneInvalidLine(t);if(i>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Ti.M(e,t))}}class Qi{constructor(){this._onDidChangeVisibleRanges=new i.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Ji((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Ji{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const n=e.map((e=>new Ti.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}class Xi extends r.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Ii.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,o.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class Yi extends r.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new i.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class Zi extends Yi{constructor(e,t,n,i){super(t,n,i),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=Ai.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new zi(n,t,this._languageIdCodec)}return zi.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLineWithEdit(e,t,n){return null}get hasTokens(){const e=void 0!==this._treeSitterService.getParseResult(this._textModel);return e}}var er=n(5863);const tr=new Uint32Array(0).buffer;class nr{static deleteBeginning(e,t){return null===e||e===tr?e:nr.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===tr)return e;const n=ir(e),i=n[n.length-2];return nr.delete(e,t,i)}static delete(e,t,n){if(null===e||e===tr||t===n)return e;const i=ir(e),r=i.length>>>1;if(0===t&&i[i.length-2]===n)return tr;const s=zi.findIndexInTokensArray(i,t),o=s>0?i[s-1<<1]:0,a=i[s<<1];if(nc&&(i[l++]=e,i[l++]=i[1+(d<<1)],c=e)}if(l===i.length)return e;const u=new Uint32Array(l);return u.set(i.subarray(0,l),0),u.buffer}static append(e,t){if(t===tr)return e;if(e===tr)return t;if(null===e)return e;if(null===t)return null;const n=ir(e),i=ir(t),r=i.length>>>1,s=new Uint32Array(n.length+i.length);s.set(n,0);let o=n.length;const a=n[n.length-2];for(let l=0;l>>1;let s=zi.findIndexInTokensArray(i,t);if(s>0){const e=i[s-1<<1];e===t&&s--}for(let o=s;o0}getTokens(e,t,n){let i=null;if(t1&&(t=gt.x.getLanguageId(i[1])!==e),!t)return tr}if(!i||0===i.length){const n=new Uint32Array(2);return n[0]=t,n[1]=sr(e),n.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const n=[];for(let i=0;i=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=nr.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=nr.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n=this._len||(0!==t?(this._lineTokens[i]=nr.deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=nr.insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[i]=nr.insert(this._lineTokens[i],e.column-1,n))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const n=[];for(let i=0,r=e.length;i>>0}class or{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const i=t[0].getRange(),r=t[t.length-1].getRange();if(!i||!r)return e;n=e.plusRange(i).plusRange(r)}let i=null;for(let r=0,s=this._pieces.length;rn.endLineNumber){i=i||{index:r};break}if(e.removeTokens(n),e.isEmpty()){this._pieces.splice(r,1),r--,s--;continue}if(e.endLineNumbern.endLineNumber){i=i||{index:r};continue}const[t,o]=e.split(n);t.isEmpty()?i=i||{index:r}:o.isEmpty()||(this._pieces.splice(r,1,t,o),r++,s++,i=i||{index:r})}return i=i||{index:this._pieces.length},t.length>0&&(this._pieces=o.nK(this._pieces,i.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const n=this._pieces;if(0===n.length)return t;const i=or._findFirstPieceWithLine(n,e),r=n[i].getLineTokens(e);if(!r)return t;const s=t.getCount(),o=r.getCount();let a=0;const l=[];let c=0,h=0;const u=(e,t)=>{e!==h&&(h=e,l[c++]=e,l[c++]=t)};for(let d=0;d>>0,l=~o>>>0;while(at)){while(r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber)r--;return r}i=r-1}}return n}acceptEdit(e,t,n,i,r){for(const s of this._pieces)s.acceptEdit(e,t,n,i,r)}}var ar,lr=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},cr=function(e,t){return function(n,i){t(n,i,e)}};let hr=ar=class extends dn{constructor(e,t,n,s,o,a,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=s,this._languageService=o,this._languageConfigurationService=a,this._treeSitterService=l,this._semanticTokens=new or(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new i.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new i.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new r.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(i.Jh.filter(Ai.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new ur(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new Zi(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){Ai.OB.get(this._languageId)?this._tokens instanceof Zi||this.createTokens(!0):this._tokens instanceof ur||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,n,i]=(0,u.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,n,i,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new l.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this._tokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),i=this.getLineTokens(t.lineNumber),r=i.findTokenIndexAtOffset(t.column-1),[s,o]=ar._findLanguageBoundaries(i,r),a=(0,C.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(r>0&&s===t.column-1){const[s,o]=ar._findLanguageBoundaries(i,r-1),a=(0,C.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r-1)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let s=t;s>=0&&e.getLanguageId(s)===n;s--)i=e.getStartOffset(s);let r=e.getLineContent().length;for(let s=t,o=e.getCount();s{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(i.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let n=this._attachedViewStates.get(e);n||(n=new Xi((()=>this.refreshRanges(n.lineRanges))),this._attachedViewStates.set(e,n)),n.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new Ui(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Ai.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(n){return(0,l.dz)(n),[null,null]}return[e,t]},[n,i]=t();if(this._tokenizer=n&&i?new Wi(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{if(2===this._backgroundTokenizationState)return;const e=2;this._backgroundTokenizationState=e,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(e,t)=>{if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&this._tokenizer?.store.setEndState(e,t)}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Gi(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),n?.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new rr(this._languageIdCodec),this._debugBackgroundStates=new Ui(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,n]=(0,u.W)(t.text);this._tokens.acceptEdit(t.range,e,n),this._debugBackgroundTokens?.acceptEdit(t.range,e,n)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Ti.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const n=new Vi,{heuristicTokens:i}=this._tokenizer.tokenizeHeuristically(n,e,t),r=this.setTokens(n.finalize());if(i)for(const s of r.changes)this._backgroundTokenizer.value?.requestTokens(s.fromLineNumber,s.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new Vi;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const i=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(i)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;const i=this._textModel.validatePosition(new m.y(e,t));return this.forceTokenization(i.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(i,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;const i=this._textModel.validatePosition(e);return this.forceTokenization(i.lineNumber),this._tokenizer.tokenizeLineWithEdit(i,t,n)}get hasTokens(){return this._tokens.hasTokens}}class dr{constructor(){this.changeType=1}}class gr{static applyInjectedText(e,t){if(!t||0===t.length)return e;let n="",i=0;for(const r of t)n+=e.substring(i,r.column-1),i=r.column-1,n+=r.options.content;return n+=e.substring(i),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new gr(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new gr(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,n,i,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=i,this.order=r}}class fr{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class mr{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class pr{constructor(e,t,n,i){this.changeType=4,this.injectedTexts=i,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class br{constructor(){this.changeType=5}}class _r{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},xr=function(e,t){return function(n,i){t(n,i,e)}};function Er(e){const t=new Ni;return t.acceptChunk(e),t.finish()}function Nr(e){const t=new Ni;let n;while("string"===typeof(n=e.read()))t.acceptChunk(n);return t.finish()}function Tr(e,t){let n;return n="string"===typeof e?Er(e):Se.nk(e)?Nr(e):e,n.create(t)}let Ar=0;const Ir=999,Or=1e4;class Mr{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,n=0;do{const i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}while(1)}}const Dr=()=>{throw new Error("Invalid change accessor")};let Rr=class extends r.jG{static{wr=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:_.tabSize,indentSize:_.indentSize,insertSpaces:_.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:_.trimAutoWhitespace,largeFileOptimizations:_.largeFileOptimizations,bracketPairColorizationOptions:_.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const n=vn(e,t.tabSize,t.insertSpaces);return new Se.X2({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Se.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,r.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,s=null,o,a,l,u){super(),this._undoRedoService=o,this._languageService=a,this._languageConfigurationService=l,this.instantiationService=u,this._onWillDispose=this._register(new i.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Jr((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new i.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new i.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new i.vl),this._eventEmitter=this._register(new Xr),this._languageSelectionListener=this._register(new r.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new Qi,Ar++,this.id="$model"+Ar,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource="undefined"===typeof s||null===s?h.r.parse("inmemory://model/"+Ar):s,this._attachedEditorCount=0;const{textBuffer:d,disposable:g}=Tr(e,n.defaultEOL);this._buffer=d,this._bufferDisposable=g,this._options=wr.resolveOptions(this._buffer,n);const f="string"===typeof t?t:t.languageId;"string"!==typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new jt(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new pn(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Gt(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(hr,this,this._bracketPairs,f,this._attachedViews);const m=this._buffer.getLineCount(),b=this._buffer.getValueLengthInRange(new p.Q(1,1,m,this._buffer.getLineLength(m)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=b>wr.LARGE_FILE_SIZE_THRESHOLD||m>wr.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=b>wr.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=b>wr._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=c.tk(Ar),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new zr,this._commandManager=new cn(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new xi([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=r.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new l.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new vr(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e||void 0===e)throw(0,l.Qg)();const{textBuffer:t,disposable:n}=Tr(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,r,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:r,isRedoing:s,isFlush:o}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new zr,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new _r([new dr],this._versionId,!1,!1),this._createContentChanged2(new p.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new _r([new br],this._versionId,!1,!1),this._createContentChanged2(new p.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const n=this._buffer.getLineLength(i);n>=Or?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!==typeof e.indentSize?e.indentSize:this._options.originalIndentSize,i="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,r="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s="undefined"!==typeof e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,o=new Se.X2({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:s});if(this._options.equals(o))return;const a=this._options.createChangeEvent(o);this._options=o,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const n=vn(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),f(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(c._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new Mr(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let r=Math.floor("number"!==typeof n||isNaN(n)?1:n),s=Math.floor("number"!==typeof i||isNaN(i)?1:i);if(r<1)r=1,s=1;else if(r>t)r=t,s=this.getLineMaxColumn(r);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(r);s>=e&&(s=e)}const o=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!==typeof o||isNaN(o)?1:o),c=Math.floor("number"!==typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return n===r&&i===s&&o===l&&a===c&&e instanceof p.Q&&!(e instanceof b.L)?e:new p.Q(r,s,l,c)}_isValidPosition(e,t,n){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const i=this._buffer.getLineCount();if(e>i)return!1;if(1===t)return!0;const r=this.getLineMaxColumn(e);if(t>r)return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(c.pc(n))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor("number"!==typeof e||isNaN(e)?1:e),r=Math.floor("number"!==typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(i<1)return new m.y(1,1);if(i>s)return new m.y(s,this.getLineMaxColumn(s));if(r<=1)return new m.y(i,1);const o=this.getLineMaxColumn(i);if(r>=o)return new m.y(i,o);if(1===n){const e=this._buffer.getLineCharCode(i,r-2);if(c.pc(e))return new m.y(i,r-1)}return new m.y(i,r)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof m.y&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(r,s,0))return!1;if(1===t){const e=i>1?this._buffer.getLineCharCode(n,i-2):0,t=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,o=c.pc(e),a=c.pc(t);return!o&&!a}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof p.Q&&!(e instanceof b.L)&&this._isValidRange(e,t))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,s=n.column,o=i.lineNumber,a=i.column;if(1===t){const e=s>1?this._buffer.getLineCharCode(r,s-2):0,t=a>1&&a<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,a-2):0,n=c.pc(e),i=c.pc(t);return n||i?r===o&&s===a?new p.Q(r,s-1,o,a-1):n&&i?new p.Q(r,s-1,o,a+1):n?new p.Q(r,s-1,o,a):new p.Q(r,s,o,a+1):new p.Q(r,s,o,a)}return new p.Q(r,s,o,a)}modifyPosition(e,t){this._assertNotDisposed();const n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new p.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,r,s,o=Ir){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>p.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>p.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!n&&e.indexOf("\n")<0){const t=new mi.lt(e,n,i,r),a=t.parseSearchRequest();if(!a)return[];c=e=>this.findMatchesLineByLine(e,a,s,o)}else c=t=>mi.hB.findMatches(this,new mi.lt(e,n,i,r),t,s,o);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new mi.lt(e,n,i,r),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let c=new p.Q(o.lineNumber,o.column,l,this.getLineMaxColumn(l)),h=this.findMatchesLineByLine(c,a,s,1);return mi.hB.findNextMatch(this,new mi.lt(e,n,i,r),o,s),h.length>0?h[0]:(c=new p.Q(1,1,o.lineNumber,this.getLineMaxColumn(o.lineNumber)),h=this.findMatchesLineByLine(c,a,s,1),h.length>0?h[0]:null)}return mi.hB.findNextMatch(this,new mi.lt(e,n,i,r),o,s)}findPreviousMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);return mi.hB.findPreviousMatch(this,new mi.lt(e,n,i,r),o,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Se.Wo?e:new Se.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n({range:this.validateRange(e.range),text:e.text})));let i=!0;if(e)for(let t=0,r=e.length;tr.endLineNumber,o=r.startLineNumber>t.endLineNumber;if(!i&&!o){s=!0;break}}if(!s){i=!1;break}}if(i)for(let e=0,r=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&(!(i===t.startLineNumber&&t.startColumn===r&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(0))&&!(i===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(o.length-1)))){s=!1;break}}if(s){const e=new p.Q(i,1,i,r);t.push(new Se.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,i)}_applyUndo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new p.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}}));this._applyUndoRedoEdits(r,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new p.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}}));this._applyUndoRedoEdits(r,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,r,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==s.length){for(let n=0,i=s.length;n=0;t--){const n=l+t,i=p+t;C.takeFromEndWhile((e=>e.lineNumber>i));const r=C.takeFromEndWhile((e=>e.lineNumber===i));e.push(new fr(n,this.getLineContent(i),r))}if(ge.lineNumbere.lineNumber===t))}e.push(new pr(i+1,l+d,h,c))}t+=f}this._emitContentChangedEvent(new _r(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===i.reverseEdits?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e),n=t.map((e=>new fr(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new kr(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(t,n)=>this._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Qr(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)};let i=null;try{i=t(n)}catch(r){(0,l.dz)(r)}return n.addDecoration=Dr,n.changeDecoration=Dr,n.changeDecorationOptions=Dr,n.removeDecoration=Dr,n.deltaDecorations=Dr,i}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,l.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Gr[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),o=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,r),i.setOptions(Gr[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,i=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1,r=!1){const s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),c=this.getLineMaxColumn(l),h=new p.Q(a,1,l,c),u=this._getDecorationsInRange(h,n,i,r);return(0,o.E4)(u,this._decorationProvider.getDecorationsInRange(h,n,i)),u}getDecorationsInRange(e,t=0,n=!1,i=!1,r=!1){const s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,r);return(0,o.E4)(a,this._decorationProvider.getDecorationsInRange(s,t,n,i)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return gr.fromDecorations(i).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,i){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(n.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),s=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!(!n.options.overviewRuler||!n.options.overviewRuler.color),r=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(n.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=i!==r,o=Pr(t)!==Vr(n);s||o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,i=!1){const r=this.getVersionId(),s=t.length;let o=0;const a=n.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(a);while(othis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Br(this.getLineContent(e))+1}};function Br(e){let t=0;for(const n of e){if(" "!==n&&"\t"!==n)break;t++}return t}function Fr(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Pr(e){return!!e.after||!!e.before}function Vr(e){return!!e.options.after||!!e.options.before}Rr=wr=Sr([xr(4,Cr),xr(5,v.L),xr(6,ge),xr(7,ee._Y)],Rr);class zr{constructor(){this._decorationsTree0=new Rn,this._decorationsTree1=new Rn,this._injectedTextDecorationsTree=new Rn}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)null===n.range&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,i,r,s){const o=e.getVersionId(),a=this._intervalSearch(t,n,i,r,o,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,n,i,r,s){const o=this._decorationsTree0.intervalSearch(e,t,n,i,r,s),a=this._decorationsTree1.intervalSearch(e,t,n,i,r,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,n,i,r,s);return o.concat(a).concat(l)}getInjectedTextInInterval(e,t,n,i){const r=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,i,!1,r,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const n=e.getVersionId(),i=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,i).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,n,i,r){const s=e.getVersionId(),o=this._search(t,n,i,s,r);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,i,r){if(n)return this._decorationsTree1.search(e,t,i,r);{const n=this._decorationsTree0.search(e,t,i,r),s=this._decorationsTree1.search(e,t,i,r),o=this._injectedTextDecorationsTree.search(e,t,i,r);return n.concat(s).concat(o)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),i=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){Vr(e)?this._injectedTextDecorationsTree.insert(e):Fr(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Vr(e)?this._injectedTextDecorationsTree.delete(e):Fr(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Vr(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Fr(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i),this._injectedTextDecorationsTree.acceptReplace(e,t,n,i)}}function jr(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class qr{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Wr extends qr{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:Se.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class Ur{constructor(e){this.position=e?.position??Se.ZS.Center,this.persistLane=e?.persistLane}}class $r extends qr{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?a.Q1.fromHex(e):t.getColor(e.id)}}class Hr{static from(e){return e instanceof Hr?e:new Hr(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Kr{static register(e){return new Kr(e)}static createDynamic(e){return new Kr(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?jr(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?jr(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Wr(e.overviewRuler):null,this.minimap=e.minimap?new $r(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Ur(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?jr(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?jr(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?jr(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?c.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?jr(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?jr(e.marginClassName):null,this.inlineClassName=e.inlineClassName?jr(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?jr(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?jr(e.afterContentClassName):null,this.after=e.after?Hr.from(e.after):null,this.before=e.before?Hr.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}Kr.EMPTY=Kr.register({description:"empty"});const Gr=[Kr.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Kr.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Kr.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Kr.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Qr(e){return e instanceof Kr?e:Kr.createDynamic(e)}class Jr extends r.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new i.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Xr extends r.jG{constructor(){super(),this._fastEmitter=this._register(new i.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new i.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}var Yr,Zr=n(6151),es=n(5647),ts=n(6657),ns=n(5603),is=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},rs=function(e,t){return function(n,i){t(n,i,e)}};function ss(e){return e.toString()}class os{constructor(e,t,n){this.model=e,this._modelEventListeners=new r.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>n(e,t))))}dispose(){this._modelEventListeners.dispose()}}const as=s.j9||s.zx?1:2;class ls{constructor(e,t,n,i,r,s,o,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=r,this.sha1=s,this.versionId=o,this.alternativeVersionId=a}}let cs=class extends r.jG{static{Yr=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,n,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=r,this._onModelAdded=this._register(new i.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new i.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new i.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let n=_.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let i="tabSize";if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(i=Math.max(t,1))}let r=_.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=as;const o=e.eol;"\r\n"===o?s=2:"\n"===o&&(s=1);let a=_.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let l=_.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=_.largeFileOptimizations;e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=_.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"===typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:i,insertSpaces:r,detectIndentation:l,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:c,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"string"===typeof n&&"auto"!==n?n:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}getCreationOptions(e,t,n){const i="string"===typeof e?e:e.languageId;let r=this._modelCreationOptionsByLanguageAndResource[i+t];if(!r){const e=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:t}),s=this._getEOL(t,i);r=Yr._readModelOptions({editor:e,eol:s},n),this._modelCreationOptionsByLanguageAndResource[i+t]=r}return r}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,r=n.length;ie){const t=[];this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));while(t.length>0&&this._disposedModelsHeapSize>e){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const r=this.getCreationOptions(t,n,i),s=this._instantiationService.createInstance(Rr,e,t,r,n);if(n&&this._disposedModels.has(ss(n))){const e=this._removeDisposedModel(n),t=this._undoRedoService.getElements(n),i=this._getSHA1Computer(),r=!!i.canComputeSHA1(s)&&i.computeSHA1(s)===e.sha1;if(r||e.sharesUndoRedoStack){for(const e of t.past)ln(e)&&e.matchesResource(n)&&e.setModel(s);for(const e of t.future)ln(e)&&e.matchesResource(n)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,(e=>ln(e)&&e.matchesResource(n))),r&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const o=ss(s.uri);if(this._models[o])throw new Error("ModelService: Cannot add model because it already exists!");const a=new os(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[o]=a,a}createModel(e,t,n,i=!1){let r;return r=t?this._createModelData(e,t,n,i):this._createModelData(e,ie.vH,n,i),this._onModelAdded.fire(r.model),r.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n0||t.future.length>0){for(const n of t.past)ln(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri));for(const n of t.future)ln(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri))}}const o=Yr.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(r)if(i||!(s>o)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(o-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>ln(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new ls(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),i,s,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!i){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,i=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget);Yr._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new hs}};cs=Yr=is([rs(0,te.pG),rs(1,Zr.ITextResourcePropertiesService),rs(2,Cr),rs(3,ee._Y)],cs);class hs{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=hs.MAX_MODEL_SIZE}computeSHA1(e){const t=new es.v7,n=e.createSnapshot();let i;while(i=n.read())t.update(i);return t.digest()}}},4037:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextModelService:()=>r});var i=n(7778);const r=(0,i.u1)("textModelService")},3699:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeSemanticTokensDto:()=>a});var i=n(7885),r=n(5160);function s(e){for(let t=0,n=e.length;t{"use strict";n.r(t),n.d(t,{SemanticTokensProviderStyling:()=>p,toMultilineTokens2:()=>b});var i=n(4577),r=n(3711),s=n(458),o=n(6788),a=n(8690),l=n(6627);class c{static create(e,t){return new c(e,new h(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.Q(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[i,r,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new c(this._startLineNumber,i),new c(this._startLineNumber+s,r)]}applyEdit(e,t){const[n,i,r]=(0,l.W)(t);this.acceptEdit(e,n,i,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,r){this._acceptDeleteRange(e),this._acceptInsertText(new o.y(e.startLineNumber,e.startColumn),t,n,i,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const e=n-t;return void(this._startLineNumber-=e)}const i=this._tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const i=-t;this._startLineNumber-=i,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,r){if(0===t&&0===n)return;const s=e.lineNumber-this._startLineNumber;if(s<0)return void(this._startLineNumber+=t);const o=this._tokens.getMaxDeltaLine();s>=o+1||this._tokens.acceptInsertText(s,e.column-1,t,n,i,r)}}class h{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)){let r=i;while(r>t&&this._getDeltaLine(r-1)===e)r--;let s=i;while(se||h===e&&d>=t)&&(he||o===e&&g>=t){if(or?f-=r-n:f=n;else if(d===t&&g===n){if(!(d===i&&f>r)){c=!0;continue}f-=r-n}else if(dr)){c=!0;continue}d=t,g=n,f=g+(f-r)}else if(d>i){if(0===a&&!c){l=o;break}d-=a}else{if(!(d===i&&g>=r))throw new Error("Not possible!");e&&0===d&&(g+=e,f+=e),d-=a,g-=r-n,f-=r-n}const p=4*l;s[p]=d,s[p+1]=g,s[p+2]=f,s[p+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,r,s){const o=0===n&&1===i&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let c=0;c=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},f=function(e,t){return function(n,i){t(n,i,e)}};const m=!1;let p=class{constructor(e,t,n,i){this._legend=e,this._themeService=t,this._languageService=n,this._logService=i,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new k}getMetadata(e,t,n){const r=this._languageService.languageIdCodec.encodeLanguageId(n),o=this._hashTable.get(e,t,r);let a;if(o)a=o.metadata,m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${i.x.getForeground(a)}, fontStyle ${i.x.getFontStyle(a).toString(2)}`);else{let o=this._legend.tokenTypes[e];const l=[];if(o){let e=t;for(let t=0;e>0&&t>=1;m&&e>0&&this._logService.getLevel()===s.$b.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const i=this._themeService.getColorTheme().getTokenStyleMetadata(o,l,n);if("undefined"===typeof i)a=2147483647;else{if(a=0,"undefined"!==typeof i.italic){const e=(i.italic?1:0)<<11;a|=1|e}if("undefined"!==typeof i.bold){const e=(i.bold?2:0)<<11;a|=2|e}if("undefined"!==typeof i.underline){const e=(i.underline?4:0)<<11;a|=4|e}if("undefined"!==typeof i.strikethrough){const e=(i.strikethrough?8:0)<<11;a|=8|e}if(i.foreground){const e=i.foreground<<15;a|=16|e}0===a&&(a=2147483647)}}else m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,o="not-in-legend";this._hashTable.add(e,t,r,a),m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${l.join(" ")}): foreground ${i.x.getForeground(a)}, fontStyle ${i.x.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,i,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${i} is outside the previous data (length ${r}).`))}};function b(e,t,n){const i=e.data,r=e.data.length/5|0,s=Math.max(Math.ceil(r/1024),400),o=[];let a=0,l=1,h=0;while(ae&&0===i[5*t])t--;if(t-1===e){let e=u;while(e+1c)t.warnOverlappingSemanticTokens(o,c+1);else{const e=t.getMetadata(_,k,n);2147483647!==e&&(0===f&&(f=o),d[g]=o-f,d[g+1]=c,d[g+2]=b,d[g+3]=e,g+=4,m=o,p=b)}l=o,h=c,a++}g!==d.length&&(d=d.subarray(0,g));const b=c.create(f,d);o.push(b)}return o}p=g([f(1,r.Gy),f(2,d.L),f(3,s.rr)],p);class _{constructor(e,t,n,i){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=i,this.next=null}}class k{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=k._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=k._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";n.r(t),n.d(t,{ISemanticTokensStylingService:()=>r});var i=n(7778);const r=(0,i.u1)("semanticTokensStylingService")},2205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SemanticTokensStylingService:()=>d});var i=n(8894),r=n(4573),s=n(3711),o=n(458),a=n(4686),l=n(7284),c=n(4979),h=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},u=function(e,t){return function(n,i){t(n,i,e)}};let d=class extends i.jG{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};d=h([u(0,s.Gy),u(1,o.rr),u(2,r.L)],d),(0,c.v)(l.ISemanticTokensStylingService,d,1)},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MirrorModel:()=>b,STOP_SYNC_MODEL_DELTA_TIME_MS:()=>f,WorkerTextModelSyncClient:()=>m,WorkerTextModelSyncServer:()=>p});var i=n(3723),r=n(8894),s=n(9133),o=n(6788),a=n(8690),l=n(939),c=n(601),h=(n(5053),n(2647));class u{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,h.j)(e);const n=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,h.j)(e),t=(0,h.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,h.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,s=0;while(t<=n)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e=r))break;t=i+1}return new d(i,e-s)}}class d{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class g{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new o.y(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;ithis._checkStopModelSync()),Math.round(f/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,r.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const n of e){const e=n.toString();this._syncedModels[e]||this._beginModelSync(n,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const n in this._syncedModelsLastUsedTime){const i=e-this._syncedModelsLastUsedTime[n];i>f&&t.push(n)}for(const n of t)this._stopModelSync(n)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n)return;if(!t&&n.isTooLargeForSyncing())return;const i=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const s=new r.Cm;s.add(n.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(i.toString(),e)}))),s.add(n.onWillDispose((()=>{this._stopModelSync(i)}))),s.add((0,r.s)((()=>{this._proxy.$acceptRemovedModel(i)}))),this._syncedModels[i]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,r.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new b(s.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;const n=this._models[e];n.onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class b extends g{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}},4977:(e,t,n)=>{"use strict";n.r(t)},6151:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextResourceConfigurationService:()=>r,ITextResourcePropertiesService:()=>s});var i=n(7778);const r=(0,i.u1)("textResourceConfigurationService"),s=(0,i.u1)("textResourcePropertiesService")},5863:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeSitterParserService:()=>r});var i=n(7778);const r=(0,i.u1)("treeSitterParserService")},1210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DraggedTreeItemsIdentifier:()=>r,TreeViewsDnDService:()=>i});class i{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class r{constructor(e){this.identifier=e}}},5231:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeViewsDnDService:()=>o});var i=n(4979),r=n(7778),s=n(1210);const o=(0,r.u1)("treeViewsDndService");(0,i.v)(o,s.TreeViewsDnDService,1)},7412:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnicodeTextModelHighlighter:()=>l});var i=n(8690),r=n(2773),s=n(601),o=n(9109),a=n(939);class l{static computeUnicodeHighlights(e,t,n){const l=n?n.startLineNumber:1,u=n?n.endLineNumber:e.getLineCount(),d=new h(t),g=d.getCandidateCodePoints();let f;f="allNonBasicAscii"===g?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(`${c(Array.from(g))}`,"g");const m=new r.W5(null,f),p=[];let b,_=!1,k=0,v=0,C=0;e:for(let r=l,c=u;r<=c;r++){const t=e.getLineContent(r),n=t.length;m.reset(0);do{if(b=m.next(t),b){let e=b.index,l=b.index+b[0].length;if(e>0){const n=t.charCodeAt(e-1);s.pc(n)&&e--}if(l+1=t){_=!0;break e}p.push(new i.Q(r,e+1,r,l+1))}}}while(b)}return{ranges:p,hasMore:_,ambiguousCharacterCount:k,invisibleCharacterCount:v,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(e,t){const n=new h(t),i=n.shouldHighlightNonBasicASCII(e,null);switch(i){case 0:return null;case 2:return{kind:1};case 3:{const i=e.codePointAt(0),r=n.ambiguousCharacters.getPrimaryConfusable(i),o=s.tl.getLocales().filter((e=>!s.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(i)));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function c(e,t){const n=`[${s.bm(e.map((e=>String.fromCodePoint(e))).join(""))}]`;return n}class h{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.y_.codePoints)u(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,r=!1;if(t)for(const o of t){const e=o.codePointAt(0),t=s.aC(o);i=i||t,t||this.ambiguousCharacters.isAmbiguous(e)||s.y_.isInvisibleCharacter(e)||(r=!0)}return!i&&r?0:this.options.invisibleCharacters&&!u(e)&&s.y_.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function u(e){return" "===e||"\n"===e||"\t"===e}},1337:(e,t,n)=>{"use strict";function i(){return globalThis._VSCODE_NLS_MESSAGES}function r(){return globalThis._VSCODE_NLS_LANGUAGE}n.d(t,{i8:()=>r,kg:()=>a});const s="pseudo"===r()||"undefined"!==typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>{const i=n[0],r=t[i];let s=e;return"string"===typeof r?s=r:"number"!==typeof r&&"boolean"!==typeof r&&void 0!==r&&null!==r||(s=String(r)),s})),s&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function a(e,t,...n){return o("number"===typeof e?l(e,t):t,n)}function l(e,t){const n=i()?.[e];if("string"!==typeof n){if("string"===typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}},2828:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>s,pG:()=>r});var i=n(7778);const r=(0,i.u1)("configurationService");function s(e){return e.replace(/[\[\]]/g,"")}},7503:(e,t,n)=>{"use strict";n.d(t,{Fd:()=>h});var i=n(5053),r=n(231),s=n(322),o=n(1337),a=n(2828),l=n(6223),c=n(6374);const h={Configuration:"base.contributions.configuration"},u={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},b="vscode://schemas/settings/resourceLanguage",_=c.O.as(l.F.JSONContribution);class k{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new r.vl,this._onDidUpdateConfiguration=new r.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:o.kg("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},_.registerSchema(b,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=new Set;this.doRegisterConfigurations(e,t,n),_.registerSchema(b,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const n=[];for(const{overrides:i,source:r}of e)for(const e in i){t.add(e);const s=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),o=i[e];if(s.configurationDefaultOverrides.push({value:o,source:r}),L.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,r),n.push(...w(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t;const n=this.configurationProperties[e];n&&(this.updatePropertyDefaultValue(e,n),this.updateSchema(e,n))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,t,n){const i={type:"object",default:t.value,description:o.kg("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,a.Mo)(e)),$ref:b,defaultDefaultValue:t.value,source:n,defaultValueSource:n};this.configurationProperties[e]=i,this.defaultLanguageConfigurationOverridesNode.properties[e]=i}mergeDefaultConfigurationsForOverrideIdentifier(e,t,n,i){const r=i?.value||{},o=i?.source??new Map;if(o instanceof Map){for(const e of Object.keys(t)){const i=t[e],a=s.Gv(i)&&(s.b0(r[e])||s.Gv(r[e]));if(a){if(r[e]={...r[e]??{},...i},n)for(const t in i)o.set(`${e}.${t}`,n)}else r[e]=i,n?o.set(e,n):o.delete(e)}return{value:r,source:o}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,n,i){const r=this.configurationProperties[e],o=i?.value??r?.defaultDefaultValue;let a=n;const l=s.Gv(t)&&(void 0!==r&&"object"===r.type||void 0===r&&(s.b0(o)||s.Gv(o)));if(l){if(a=i?.source??new Map,!(a instanceof Map))return void console.error("defaultValueSource is not a Map");for(const i in t)n&&a.set(`${e}.${i}`,n);t={...s.Gv(o)?o:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,n),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,n,i,r=3,o){r=s.z(e.scope)?r:e.scope;const a=e.properties;if(a)for(const c in a){const e=a[c];t&&E(c,e)?delete a[c]:(e.source=n,e.defaultDefaultValue=a[c].default,this.updatePropertyDefaultValue(c,e),L.test(c)?e.scope=void 0:(e.scope=s.z(e.scope)?r:e.scope,e.restricted=s.z(e.restricted)?!!i?.includes(c):e.restricted),!a[c].hasOwnProperty("included")||a[c].included?(this.configurationProperties[c]=a[c],a[c].policy?.name&&this.policyConfigurations.set(a[c].policy.name,c),!a[c].deprecationMessage&&a[c].markdownDeprecationMessage&&(a[c].deprecationMessage=a[c].markdownDeprecationMessage),o.add(c)):(this.excludedConfigurationProperties[c]=a[c],delete a[c]))}const l=e.allOf;if(l)for(const s of l)this.validateAndRegisterProperties(s,t,n,i,r,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const n=e.properties;if(n)for(const t in n)this.updateSchema(t,n[t]);const i=e.allOf;i?.forEach(t)};t(e)}updateSchema(e,t){switch(u.properties[e]=t,t.scope){case 1:d.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:f.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:p.properties[e]=t;break;case 5:p.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:b};this.updatePropertyDefaultValue(t,n),u.properties[t]=n,d.properties[t]=n,g.properties[t]=n,f.properties[t]=n,m.properties[t]=n,p.properties[t]=n}}registerOverridePropertyPatternKey(){const e={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:b};u.patternProperties[y]=e,d.patternProperties[y]=e,g.patternProperties[y]=e,f.patternProperties[y]=e,m.patternProperties[y]=e,p.patternProperties[y]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let i,r;!n||t.disallowConfigurationDefault&&n.source||(i=n.value,r=n.source),s.b0(i)&&(i=t.defaultDefaultValue,r=void 0),s.b0(i)&&(i=S(t.type)),t.default=i,t.defaultValueSource=r}}const v="\\[([^\\]]+)\\]",C=new RegExp(v,"g"),y=`^(${v})+$`,L=new RegExp(y);function w(e){const t=[];if(L.test(e)){let n=C.exec(e);while(n?.length){const i=n[1].trim();i&&t.push(i),n=C.exec(e)}}return(0,i.dM)(t)}function S(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const x=new k;function E(e,t){return e.trim()?L.test(e)?o.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==x.getConfigurationProperties()[e]?o.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==x.getPolicyConfigurations().get(t.policy?.name)?o.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,x.getPolicyConfigurations().get(t.policy?.name)):null:o.kg("config.property.empty","Cannot register an empty property")}c.O.add(h.Configuration,x)},4979:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});class i{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const r=[];function s(e,t,n){t instanceof i||(t=new i(t,[],Boolean(n))),r.push([e,t])}},7778:(e,t,n)=>{"use strict";var i;n.d(t,{_Y:()=>r,u1:()=>o}),function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t}(i||(i={}));const r=o("instantiationService");function s(e,t,n){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n}],t[i.DI_TARGET]=t)}function o(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(t,e,i)};return t.toString=()=>e,i.serviceIds.set(e,t),t}},6223:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var i=n(231),r=n(6374);const s={JSONContribution:"base.contributions.json"};function o(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class a{constructor(){this._onDidChangeSchema=new i.vl,this.schemasById={}}registerSchema(e,t){this.schemasById[o(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const l=new a;r.O.add(s.JSONContribution,l)},458:(e,t,n)=>{"use strict";n.d(t,{rr:()=>Q,$b:()=>J});n(231);var i=n(8894),r=n(5160),s=n(601),o=n(4396),a=n(1337);function l(...e){switch(e.length){case 1:return(0,a.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,a.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,a.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const c=(0,a.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),h=(0,a.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class u{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw(0,o.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){while(!this._isAtEnd()){this._start=this._current;const e=this._advance();switch(e){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(l("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(l("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(l("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&(this._input.charCodeAt(this._current)===e&&(this._current++,!0))}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,n=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),n=u._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){while(39!==this._peek()&&!this._isAtEnd())this._advance();this._isAtEnd()?this._error(c):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,n=!1;while(1){if(e>=this._input.length)return this._current=e,void this._error(h);const i=this._input.charCodeAt(e);if(t)t=!1;else{if(47===i&&!n){e++;break}91===i?n=!0:92===i?t=!0:93===i&&(n=!1)}e++}while(e=this._input.length}}var d=n(7778);const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",r.zx),g.set("isLinux",r.j9),g.set("isWindows",r.uF),g.set("isWeb",r.HZ),g.set("isMacNative",r.zx&&!r.HZ),g.set("isEdge",r.UP),g.set("isFirefox",r.gm),g.set("isChrome",r.H8),g.set("isSafari",r.nr);const f=Object.prototype.hasOwnProperty,m={regexParsingWithErrorRecovery:!0},p=(0,a.kg)("contextkey.parser.error.emptyString","Empty context key expression"),b=(0,a.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),_=(0,a.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),k=(0,a.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),v=(0,a.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),C=(0,a.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),y=(0,a.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),L=(0,a.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class w{static{this._parseError=new Error}constructor(e=m){this._config=e,this._scanner=new u,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?C:void 0;throw this._parsingErrors.push({message:v,offset:e.offset,lexeme:u.getLexeme(e),additionalInfo:t}),w._parseError}return e}catch(t){if(t!==w._parseError)throw t;return}}else this._parsingErrors.push({message:p,offset:0,lexeme:"",additionalInfo:b})}_expr(){return this._or()}_or(){const e=[this._and()];while(this._matchOne(16)){const t=this._and();e.push(t)}return 1===e.length?e[0]:S.or(...e)}_and(){const e=[this._term()];while(this._matchOne(15)){const t=this._term();e.push(t)}return 1===e.length?e[0]:S.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),E.INSTANCE;case 12:return this._advance(),N.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,k),e?.negate()}case 17:return this._advance(),D.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),S.true();case 12:return this._advance(),S.false();case 0:{this._advance();const e=this._expr();return this._consume(1,k),e}case 17:{const i=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const n=e.lexeme,r=n.lastIndexOf("/"),s=r===n.length-1?void 0:this._removeFlagsGY(n.substring(r+1));let o;try{o=new RegExp(n.substring(1,r),s)}catch(t){throw this._errExpectedButGot("REGEX",e)}return z.create(i,o)}switch(e.type){case 10:case 19:{const n=[e.lexeme];this._advance();let r=this._peek(),s=0;for(let t=0;t=0){const o=t.slice(i+1,s),a="i"===t[s+1]?"i":"";try{r=new RegExp(o,a)}catch(n){throw this._errExpectedButGot("REGEX",e)}}}if(null===r)throw this._errExpectedButGot("REGEX",e);return z.create(i,r)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,_);const e=this._value();return S.notIn(i,e)}const r=this._peek().type;switch(r){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return S.equals(i,e);switch(e){case"true":return S.has(i);case"false":return S.not(i);default:return S.equals(i,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return S.notEquals(i,e);switch(e){case"true":return S.not(i);case"false":return S.has(i);default:return S.notEquals(i,e)}}case 5:return this._advance(),P.create(i,this._value());case 6:return this._advance(),V.create(i,this._value());case 7:return this._advance(),B.create(i,this._value());case 8:return this._advance(),F.create(i,this._value());case 13:return this._advance(),S.in(i,this._value());default:return S.has(i)}}case 20:throw this._parsingErrors.push({message:y,offset:e.offset,lexeme:"",additionalInfo:L}),w._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){const i=(0,a.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,u.getLexeme(t)),r=t.offset,s=u.getLexeme(t);return this._parsingErrors.push({message:i,offset:r,lexeme:s,additionalInfo:n}),w._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class S{static false(){return E.INSTANCE}static true(){return N.INSTANCE}static has(e){return T.create(e)}static equals(e,t){return A.create(e,t)}static notEquals(e,t){return M.create(e,t)}static regex(e,t){return z.create(e,t)}static in(e,t){return I.create(e,t)}static notIn(e,t){return O.create(e,t)}static not(e){return D.create(e)}static and(...e){return W.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static{this._parser=new w({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(void 0===e||null===e)return;const t=this._parser.parse(e);return t}}function x(e,t){return e.cmp(t)}class E{static{this.INSTANCE=new E}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return N.INSTANCE}}class N{static{this.INSTANCE=new N}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}class T{static create(e,t=null){const n=g.get(e);return"boolean"===typeof n?n?N.INSTANCE:E.INSTANCE:new T(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"===typeof e?e?N.INSTANCE:E.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this)),this.negated}}class A{static create(e,t,n=null){if("boolean"===typeof t)return t?T.create(e,n):D.create(e,n);const i=g.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?N.INSTANCE:E.INSTANCE}return new A(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=g.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?N.INSTANCE:E.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class I{static create(e,t){return new I(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):"string"===typeof n&&"object"===typeof t&&null!==t&&f.call(t,n)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=O.create(this.key,this.valueKey)),this.negated}}class O{static create(e,t){return new O(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=I.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class M{static create(e,t,n=null){if("boolean"===typeof t)return t?D.create(e,n):T.create(e,n);const i=g.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?E.INSTANCE:N.INSTANCE}return new M(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=g.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?E.INSTANCE:N.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class D{static create(e,t=null){const n=g.get(e);return"boolean"===typeof n?n?E.INSTANCE:N.INSTANCE:new D(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"===typeof e?e?E.INSTANCE:N.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this)),this.negated}}function R(e,t){if("string"===typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"===typeof e||"number"===typeof e?t(e):E.INSTANCE}class B{static create(e,t,n=null){return R(t,(t=>new B(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,n=null){return R(t,(t=>new F(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class P{static create(e,t,n=null){return R(t,(t=>new P(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))new V(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class z{static create(e,t){return new z(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this)),this.negated}}class j{static create(e){return new j(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function q(e){let t=null;for(let n=0,i=e.length;ne.expr.length)return 1;for(let t=0,n=this.expr.length;t1){const e=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),r=0===i.length,s=U.create(e.expr.map((e=>W.create([e,t],null,n))),null,r);s&&(i.push(s),i.sort(x))}if(1===i.length)return i[0];if(n){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,n){return U._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());while(e.length>1){const t=e.shift(),n=e.shift(),i=[];for(const e of G(t))for(const t of G(n))i.push(W.create([e,t],null,!1));e.unshift(U.create(i,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class $ extends T{static{this._info=[]}static all(){return $._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,"object"===typeof n?$._info.push({...n,key:e}):!0!==n&&$._info.push({key:e,description:n,type:null!==t&&void 0!==t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return A.create(this.key,e)}}(0,d.u1)("contextKeyService");function H(e,t){return et?1:0}function K(e,t,n,i){return en?1:ti?1:0}function G(e){return 9===e.type?e.expr:[e]}const Q=(0,d.u1)("logService");var J;(function(e){e[e["Off"]=0]="Off",e[e["Trace"]=1]="Trace",e[e["Debug"]=2]="Debug",e[e["Info"]=3]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=5]="Error"})(J||(J={}));J.Info;i.jG;function X(e){switch(e){case J.Trace:return"trace";case J.Debug:return"debug";case J.Info:return"info";case J.Warning:return"warn";case J.Error:return"error";case J.Off:return"off"}}new $("logLevel",X(J.Info))},6374:(e,t,n)=>{"use strict";n.d(t,{O:()=>o});var i=n(9109),r=n(322);class s{constructor(){this.data=new Map}add(e,t){i.ok(r.Kg(e)),i.ok(r.Gv(t)),i.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const o=new s},7732:(e,t,n)=>{"use strict";n.d(t,{buw:()=>I,b1q:()=>A,YtV:()=>F,Ubg:()=>G,IIb:()=>H,pOz:()=>$,whs:()=>q,Stt:()=>U,Hng:()=>W,yLC:()=>be,KoI:()=>me,uMG:()=>pe,x1A:()=>m});var i=n(9109),r=n(3723),s=n(5476),o=n(231),a=n(6223),l=n(6374),c=n(1337);function h(e){return null!==e&&"object"===typeof e&&"light"in e&&"dark"in e}const u={ColorContribution:"base.contributions.colors"},d="default";class g{constructor(){this._onDidChangeSchema=new o.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,r){const s={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r};this.colorsById[e]=s;const o={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(o.deprecationMessage=r),i&&(o.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",o.patternErrorMessage=c.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[o,{type:"string",const:d,description:c.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n?.defaults){const e=h(n.defaults)?n.defaults[t.type]:n.defaults;return L(e,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(e,t)=>{const n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}}const f=new g;function m(e,t,n,i,r){return f.registerColor(e,t,n,i,r)}function p(e,t){switch(e.op){case 0:return L(e.value,t)?.darken(e.factor);case 1:return L(e.value,t)?.lighten(e.factor);case 2:return L(e.value,t)?.transparent(e.factor);case 3:{const n=L(e.background,t);return n?L(e.value,t)?.makeOpaque(n):L(e.value,t)}case 4:for(const n of e.values){const e=L(n,t);if(e)return e}return;case 6:return L(t.defines(e.if)?e.then:e.else,t);case 5:{const n=L(e.value,t);if(!n)return;const i=L(e.background,t);return i?n.isDarkerThan(i)?s.Q1.getLighterColor(n,i,e.factor).transparent(e.transparency):s.Q1.getDarkerColor(n,i,e.factor).transparent(e.transparency):n.transparent(e.factor*e.transparency)}default:throw(0,i.xb)(e)}}function b(e,t){return{op:0,value:e,factor:t}}function _(e,t){return{op:1,value:e,factor:t}}function k(e,t){return{op:2,value:e,factor:t}}function v(...e){return{op:4,values:e}}function C(e,t,n){return{op:6,if:e,then:t,else:n}}function y(e,t,n,i){return{op:5,value:e,background:t,factor:n,transparency:i}}function L(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?s.Q1.fromHex(e):t.getColor(e):e instanceof s.Q1?e:"object"===typeof e?p(e,t):void 0}l.O.add(u.ColorContribution,f);const w="vscode://schemas/workbench-colors",S=l.O.as(a.F.JSONContribution);S.registerSchema(w,f.getColorSchema());const x=new r.uC((()=>S.notifySchemaChanged(w)),200);f.onDidChangeSchema((()=>{x.isScheduled()||x.schedule()}));const E=m("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},c.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),N=(m("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},c.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),m("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},c.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),m("descriptionForeground",{light:"#717171",dark:k(E,.7),hcDark:k(E,.7),hcLight:k(E,.7)},c.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),m("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},c.kg("iconForeground","The default color for icons in the workbench."))),T=m("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},c.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),A=m("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},c.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),I=m("contrastActiveBorder",{light:null,dark:null,hcDark:T,hcLight:T},c.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),O=(m("selection.background",null,c.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),m("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},c.kg("textLinkForeground","Foreground color for links in text.")),m("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},c.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),m("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Q1.black,hcLight:"#292929"},c.kg("textSeparatorForeground","Color for text separators.")),m("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},c.kg("textPreformatForeground","Foreground color for preformatted text segments.")),m("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},c.kg("textPreformatBackground","Background color for preformatted text segments.")),m("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},c.kg("textBlockQuoteBackground","Background color for block quotes in text.")),m("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Q1.white,hcLight:"#292929"},c.kg("textBlockQuoteBorder","Border color for block quotes in text.")),m("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Q1.black,hcLight:"#F2F2F2"},c.kg("textCodeBlockBackground","Background color for code blocks in text.")),m("sash.hoverBorder",T,c.kg("sashActiveBorder","Border color of active sashes.")),m("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Q1.black,hcLight:"#0F4A85"},c.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),M=(m("badge.foreground",{dark:s.Q1.white,light:"#333",hcDark:s.Q1.white,hcLight:s.Q1.white},c.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),m("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},c.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled."))),D=m("scrollbarSlider.background",{dark:s.Q1.fromHex("#797979").transparent(.4),light:s.Q1.fromHex("#646464").transparent(.4),hcDark:k(A,.6),hcLight:k(A,.4)},c.kg("scrollbarSliderBackground","Scrollbar slider background color.")),R=m("scrollbarSlider.hoverBackground",{dark:s.Q1.fromHex("#646464").transparent(.7),light:s.Q1.fromHex("#646464").transparent(.7),hcDark:k(A,.8),hcLight:k(A,.8)},c.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),B=m("scrollbarSlider.activeBackground",{dark:s.Q1.fromHex("#BFBFBF").transparent(.4),light:s.Q1.fromHex("#000000").transparent(.6),hcDark:A,hcLight:A},c.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),F=(m("progressBar.background",{dark:s.Q1.fromHex("#0E70C0"),light:s.Q1.fromHex("#0E70C0"),hcDark:A,hcLight:A},c.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),m("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("editorBackground","Editor background color."))),P=(m("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Q1.white,hcLight:E},c.kg("editorForeground","Editor default foreground color.")),m("editorStickyScroll.background",F,c.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),m("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),m("editorStickyScroll.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),m("editorStickyScroll.shadow",M,c.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),m("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Q1.white},c.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),V=m("editorWidget.foreground",E,c.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),z=m("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:A,hcLight:A},c.kg("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),j=(m("editorWidget.resizeBorder",null,c.kg("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),m("editorError.background",null,c.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},c.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),q=(m("editorError.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},c.kg("errorBorder","If set, color of double underlines for errors in the editor.")),m("editorWarning.background",null,c.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0)),W=m("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},c.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),U=m("editorWarning.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#FFCC00").transparent(.8),hcLight:s.Q1.fromHex("#FFCC00").transparent(.8)},c.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),$=(m("editorInfo.background",null,c.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},c.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),H=m("editorInfo.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},c.kg("infoBorder","If set, color of double underlines for infos in the editor.")),K=(m("editorHint.foreground",{dark:s.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},c.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),m("editorHint.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},c.kg("hintBorder","If set, color of double underlines for hints in the editor.")),m("editorLink.activeForeground",{dark:"#4E94CE",light:s.Q1.blue,hcDark:s.Q1.cyan,hcLight:"#292929"},c.kg("activeLinkForeground","Color of active links.")),m("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},c.kg("editorSelectionBackground","Color of the editor selection."))),G=(m("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Q1.white},c.kg("editorSelectionForeground","Color of the selected text for high contrast.")),m("editor.inactiveSelectionBackground",{light:k(K,.5),dark:k(K,.5),hcDark:k(K,.7),hcLight:k(K,.5)},c.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.selectionHighlightBackground",{light:y(K,F,.3,.6),dark:y(K,F,.3,.6),hcDark:null,hcLight:null},c.kg("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:I,hcLight:I},c.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),m("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},c.kg("editorFindMatch","Color of the current search match.")),m("editor.findMatchForeground",null,c.kg("editorFindMatchForeground","Text color of the current search match.")),m("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},c.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),Q=(m("editor.findMatchHighlightForeground",null,c.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),m("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},c.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.findMatchBorder",{light:null,dark:null,hcDark:I,hcLight:I},c.kg("editorFindMatchBorder","Border color of the current search match.")),m("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:I,hcLight:I},c.kg("findMatchHighlightBorder","Border color of the other search matches."))),J=(m("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:k(I,.4),hcLight:k(I,.4)},c.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},c.kg("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorHoverWidget.background",P,c.kg("hoverBackground","Background color of the editor hover."))),X=(m("editorHoverWidget.foreground",V,c.kg("hoverForeground","Foreground color of the editor hover.")),m("editorHoverWidget.border",z,c.kg("hoverBorder","Border color of the editor hover.")),m("editorHoverWidget.statusBarBackground",{dark:_(J,.2),light:b(J,.05),hcDark:P,hcLight:P},c.kg("statusBarBackground","Background color of the editor hover status bar.")),m("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Q1.white,hcLight:s.Q1.black},c.kg("editorInlayHintForeground","Foreground color of inline hints"))),Y=m("editorInlayHint.background",{dark:k(O,.1),light:k(O,.1),hcDark:k(s.Q1.white,.1),hcLight:k(O,.1)},c.kg("editorInlayHintBackground","Background color of inline hints")),Z=(m("editorInlayHint.typeForeground",X,c.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),m("editorInlayHint.typeBackground",Y,c.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),m("editorInlayHint.parameterForeground",X,c.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),m("editorInlayHint.parameterBackground",Y,c.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),m("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},c.kg("editorLightBulbForeground","The color used for the lightbulb actions icon."))),ee=(m("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},c.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),m("editorLightBulbAi.foreground",Z,c.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),m("editor.snippetTabstopHighlightBackground",{dark:new s.Q1(new s.bU(124,124,124,.3)),light:new s.Q1(new s.bU(10,50,100,.2)),hcDark:new s.Q1(new s.bU(124,124,124,.3)),hcLight:new s.Q1(new s.bU(10,50,100,.2))},c.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),m("editor.snippetTabstopHighlightBorder",null,c.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),m("editor.snippetFinalTabstopHighlightBackground",null,c.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),m("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Q1(new s.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},c.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new s.Q1(new s.bU(155,185,85,.2))),te=new s.Q1(new s.bU(255,0,0,.2)),ne=(m("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},c.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},c.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.insertedLineBackground",{dark:ee,light:ee,hcDark:null,hcLight:null},c.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedLineBackground",{dark:te,light:te,hcDark:null,hcLight:null},c.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditorGutter.insertedLineBackground",null,c.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),m("diffEditorGutter.removedLineBackground",null,c.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),m("diffEditorOverview.insertedForeground",null,c.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),m("diffEditorOverview.removedForeground",null,c.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),m("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},c.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),m("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},c.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),m("diffEditor.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("diffEditorBorder","Border color between the two text editors.")),m("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},c.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),m("diffEditor.unchangedRegionBackground","sideBar.background",c.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedRegionForeground","foreground",c.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},c.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),m("widget.shadow",{dark:k(s.Q1.black,.36),light:k(s.Q1.black,.16),hcDark:null,hcLight:null},c.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),ie=(m("widget.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),m("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},c.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"))),re=(m("toolbar.hoverOutline",{dark:null,light:null,hcDark:I,hcLight:I},c.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),m("toolbar.activeBackground",{dark:_(ie,.1),light:b(ie,.1),hcDark:null,hcLight:null},c.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),m("breadcrumb.foreground",k(E,.8),c.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),m("breadcrumb.background",F,c.kg("breadcrumbsBackground","Background color of breadcrumb items.")),m("breadcrumb.focusForeground",{light:b(E,.2),dark:_(E,.1),hcDark:_(E,.1),hcLight:_(E,.1)},c.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),m("breadcrumb.activeSelectionForeground",{light:b(E,.2),dark:_(E,.1),hcDark:_(E,.1),hcLight:_(E,.1)},c.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),m("breadcrumbPicker.background",P,c.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),.5),se=s.Q1.fromHex("#40C8AE").transparent(re),oe=s.Q1.fromHex("#40A6FF").transparent(re),ae=s.Q1.fromHex("#606060").transparent(.4),le=.4,ce=1,he=m("merge.currentHeaderBackground",{dark:se,light:se,hcDark:null,hcLight:null},c.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),ue=(m("merge.currentContentBackground",k(he,le),c.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.incomingHeaderBackground",{dark:oe,light:oe,hcDark:null,hcLight:null},c.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),de=(m("merge.incomingContentBackground",k(ue,le),c.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.commonHeaderBackground",{dark:ae,light:ae,hcDark:null,hcLight:null},c.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),ge=(m("merge.commonContentBackground",k(de,le),c.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},c.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),fe=(m("editorOverviewRuler.currentContentForeground",{dark:k(he,ce),light:k(he,ce),hcDark:ge,hcLight:ge},c.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.incomingContentForeground",{dark:k(ue,ce),light:k(ue,ce),hcDark:ge,hcLight:ge},c.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.commonContentForeground",{dark:k(de,ce),light:k(de,ce),hcDark:ge,hcLight:ge},c.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},c.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",c.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),m("problemsErrorIcon.foreground",j,c.kg("problemsErrorIconForeground","The color used for the problems error icon.")),m("problemsWarningIcon.foreground",W,c.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),m("problemsInfoIcon.foreground",$,c.kg("problemsInfoIconForeground","The color used for the problems info icon.")),m("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},c.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0)),me=(m("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},c.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),m("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},c.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),m("minimap.infoHighlight",{dark:$,light:$,hcDark:H,hcLight:H},c.kg("minimapInfo","Minimap marker color for infos."))),pe=m("minimap.warningHighlight",{dark:W,light:W,hcDark:U,hcLight:U},c.kg("overviewRuleWarning","Minimap marker color for warnings.")),be=m("minimap.errorHighlight",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},c.kg("minimapError","Minimap marker color for errors.")),_e=(m("minimap.background",null,c.kg("minimapBackground","Minimap background color.")),m("minimap.foregroundOpacity",s.Q1.fromHex("#000f"),c.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),m("minimapSlider.background",k(D,.5),c.kg("minimapSliderBackground","Minimap slider background color.")),m("minimapSlider.hoverBackground",k(R,.5),c.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),m("minimapSlider.activeBackground",k(B,.5),c.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),m("charts.foreground",E,c.kg("chartsForeground","The foreground color used in charts.")),m("charts.lines",k(E,.5),c.kg("chartsLines","The color used for horizontal lines in charts.")),m("charts.red",j,c.kg("chartsRed","The red color used in chart visualizations.")),m("charts.blue",$,c.kg("chartsBlue","The blue color used in chart visualizations.")),m("charts.yellow",W,c.kg("chartsYellow","The yellow color used in chart visualizations.")),m("charts.orange",fe,c.kg("chartsOrange","The orange color used in chart visualizations.")),m("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},c.kg("chartsGreen","The green color used in chart visualizations.")),m("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},c.kg("chartsPurple","The purple color used in chart visualizations.")),m("input.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("inputBoxBackground","Input box background.")),m("input.foreground",E,c.kg("inputBoxForeground","Input box foreground.")),m("input.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("inputBoxBorder","Input box border.")),m("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:A,hcLight:A},c.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields."))),ke=m("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},c.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),ve=m("inputOption.activeBackground",{dark:k(T,.4),light:k(T,.2),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},c.kg("inputOption.activeBackground","Background hover color of options in input fields.")),Ce=m("inputOption.activeForeground",{dark:s.Q1.white,light:s.Q1.black,hcDark:E,hcLight:E},c.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),ye=(m("input.placeholderForeground",{light:k(E,.5),dark:k(E,.5),hcDark:k(E,.7),hcLight:k(E,.7)},c.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),m("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("inputValidationInfoBackground","Input validation background color for information severity.")),m("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:E},c.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),m("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:A,hcLight:A},c.kg("inputValidationInfoBorder","Input validation border color for information severity.")),m("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),m("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:E},c.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),m("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:A,hcLight:A},c.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),m("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("inputValidationErrorBackground","Input validation background color for error severity.")),m("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:E},c.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),m("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:A,hcLight:A},c.kg("inputValidationErrorBorder","Input validation border color for error severity.")),m("dropdown.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("dropdownBackground","Dropdown background."))),Le=(m("dropdown.listBackground",{dark:null,light:null,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("dropdownListBackground","Dropdown list background.")),m("dropdown.foreground",{dark:"#F0F0F0",light:E,hcDark:s.Q1.white,hcLight:E},c.kg("dropdownForeground","Dropdown foreground."))),we=m("dropdown.border",{dark:ye,light:"#CECECE",hcDark:A,hcLight:A},c.kg("dropdownBorder","Dropdown border.")),Se=m("button.foreground",s.Q1.white,c.kg("buttonForeground","Button foreground color.")),xe=(m("button.separator",k(Se,.4),c.kg("buttonSeparator","Button separator color.")),m("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},c.kg("buttonBackground","Button background color."))),Ee=(m("button.hoverBackground",{dark:_(xe,.2),light:b(xe,.2),hcDark:xe,hcLight:xe},c.kg("buttonHoverBackground","Button background color when hovering.")),m("button.border",A,c.kg("buttonBorder","Button border color.")),m("button.secondaryForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:s.Q1.white,hcLight:E},c.kg("buttonSecondaryForeground","Secondary button foreground color.")),m("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Q1.white},c.kg("buttonSecondaryBackground","Secondary button background color."))),Ne=(m("button.secondaryHoverBackground",{dark:_(Ee,.2),light:b(Ee,.2),hcDark:null,hcLight:null},c.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),m("radio.activeForeground",Ce,c.kg("radioActiveForeground","Foreground color of active radio option."))),Te=(m("radio.activeBackground",ve,c.kg("radioBackground","Background color of active radio option.")),m("radio.activeBorder",_e,c.kg("radioActiveBorder","Border color of the active radio option.")),m("radio.inactiveForeground",null,c.kg("radioInactiveForeground","Foreground color of inactive radio option.")),m("radio.inactiveBackground",null,c.kg("radioInactiveBackground","Background color of inactive radio option.")),m("radio.inactiveBorder",{light:k(Ne,.2),dark:k(Ne,.2),hcDark:k(Ne,.4),hcLight:k(Ne,.2)},c.kg("radioInactiveBorder","Border color of the inactive radio option.")),m("radio.inactiveHoverBackground",ke,c.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),m("checkbox.background",ye,c.kg("checkbox.background","Background color of checkbox widget.")),m("checkbox.selectBackground",P,c.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),m("checkbox.foreground",Le,c.kg("checkbox.foreground","Foreground color of checkbox widget.")),m("checkbox.border",we,c.kg("checkbox.border","Border color of checkbox widget.")),m("checkbox.selectBorder",N,c.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),m("keybindingLabel.background",{dark:new s.Q1(new s.bU(128,128,128,.17)),light:new s.Q1(new s.bU(221,221,221,.4)),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},c.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.foreground",{dark:s.Q1.fromHex("#CCCCCC"),light:s.Q1.fromHex("#555555"),hcDark:s.Q1.white,hcLight:E},c.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.border",{dark:new s.Q1(new s.bU(51,51,51,.6)),light:new s.Q1(new s.bU(204,204,204,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:A},c.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.bottomBorder",{dark:new s.Q1(new s.bU(68,68,68,.6)),light:new s.Q1(new s.bU(187,187,187,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:E},c.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),m("list.focusBackground",null,c.kg("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusForeground",null,c.kg("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusOutline",{dark:T,light:T,hcDark:I,hcLight:I},c.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusAndSelectionOutline",null,c.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),m("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),Ae=m("list.activeSelectionForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:null,hcLight:null},c.kg("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ie=m("list.activeSelectionIconForeground",null,c.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Oe=(m("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveSelectionForeground",null,c.kg("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveSelectionIconForeground",null,c.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveFocusBackground",null,c.kg("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveFocusOutline",null,c.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Q1.white.transparent(.1),hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),m("list.hoverForeground",null,c.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),m("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},c.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),m("list.dropBetweenBackground",{dark:N,light:N,hcDark:null,hcLight:null},c.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),m("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:T,hcLight:T},c.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree."))),Me=(m("list.focusHighlightForeground",{dark:Oe,light:C(Te,Oe,"#BBE7FF"),hcDark:Oe,hcLight:Oe},c.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),m("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},c.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),m("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},c.kg("listErrorForeground","Foreground color of list items containing errors.")),m("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},c.kg("listWarningForeground","Foreground color of list items containing warnings.")),m("listFilterWidget.background",{light:b(P,0),dark:_(P,0),hcDark:P,hcLight:P},c.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),m("listFilterWidget.outline",{dark:s.Q1.transparent,light:s.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},c.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),m("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:A,hcLight:A},c.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),m("listFilterWidget.shadow",ne,c.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),m("list.filterMatchBackground",{dark:G,light:G,hcDark:null,hcLight:null},c.kg("listFilterMatchHighlight","Background color of the filtered match.")),m("list.filterMatchBorder",{dark:Q,light:Q,hcDark:A,hcLight:I},c.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),m("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},c.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),m("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},c.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),De=(m("tree.inactiveIndentGuidesStroke",k(Me,.4),c.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),m("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},c.kg("tableColumnsBorder","Table border color between columns.")),m("tree.tableOddRowsBackground",{dark:k(E,.04),light:k(E,.04),hcDark:null,hcLight:null},c.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),m("editorActionList.background",P,c.kg("editorActionListBackground","Action List background color.")),m("editorActionList.foreground",V,c.kg("editorActionListForeground","Action List foreground color.")),m("editorActionList.focusForeground",Ae,c.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),m("editorActionList.focusBackground",Te,c.kg("editorActionListFocusBackground","Action List background color for the focused item.")),m("menu.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("menuBorder","Border color of menus.")),m("menu.foreground",Le,c.kg("menuForeground","Foreground color of menu items.")),m("menu.background",ye,c.kg("menuBackground","Background color of menu items.")),m("menu.selectionForeground",Ae,c.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),m("menu.selectionBackground",Te,c.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),m("menu.selectionBorder",{dark:null,light:null,hcDark:I,hcLight:I},c.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),m("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:A,hcLight:A},c.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),m("quickInput.background",P,c.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),m("quickInput.foreground",V,c.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),m("quickInputTitle.background",{dark:new s.Q1(new s.bU(255,255,255,.105)),light:new s.Q1(new s.bU(0,0,0,.06)),hcDark:"#000000",hcLight:s.Q1.white},c.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),m("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Q1.white,hcLight:"#0F4A85"},c.kg("pickerGroupForeground","Quick picker color for grouping labels.")),m("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Q1.white,hcLight:"#0F4A85"},c.kg("pickerGroupBorder","Quick picker color for grouping borders.")),m("quickInput.list.focusBackground",null,"",void 0,c.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")));m("quickInputList.focusForeground",Ae,c.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),m("quickInputList.focusIconForeground",Ie,c.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),m("quickInputList.focusBackground",{dark:v(De,Te),light:v(De,Te),hcDark:null,hcLight:null},c.kg("quickInput.listFocusBackground","Quick picker background color for the focused item.")),m("search.resultsInfoForeground",{light:E,dark:k(E,.65),hcDark:E,hcLight:E},c.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),m("searchEditor.findMatchBackground",{light:k(G,.66),dark:k(G,.66),hcDark:G,hcLight:G},c.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),m("searchEditor.findMatchBorder",{light:k(Q,.66),dark:k(Q,.66),hcDark:Q,hcLight:Q},c.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},3711:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>l,zy:()=>g,Yf:()=>c});var i,r=n(231),s=n(8894),o=n(7778),a=n(6374);(function(e){e["DARK"]="dark",e["LIGHT"]="light",e["HIGH_CONTRAST_DARK"]="hcDark",e["HIGH_CONTRAST_LIGHT"]="hcLight"})(i||(i={}));const l=(0,o.u1)("themeService");function c(e){return{id:e}}const h={ThemingContribution:"base.contributions.theming"};class u{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new r.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,s.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}}const d=new u;function g(e){return d.onColorThemeChange(e)}a.O.add(h.ThemingContribution,d);s.jG},5890:(e,t,n)=>{var i={"./simpleWorker":1352,"./simpleWorker.js":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker.js":1352};function r(e){return Promise.resolve().then((()=>{if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var r=i[e];return n(r)}))}r.keys=()=>Object.keys(i),r.id=5890,e.exports=r},9204:(e,t,n)=>{var i={"./editorBaseApi":[215],"./editorBaseApi.js":[215],"./editorSimpleWorker":[5926],"./editorSimpleWorker.js":[5926],"./editorWorker":[4117,792],"./editorWorker.js":[4117,792],"./editorWorkerHost":[2899],"./editorWorkerHost.js":[2899],"./findSectionHeaders":[6198],"./findSectionHeaders.js":[6198],"./getIconClasses":[2340,792],"./getIconClasses.js":[2340,792],"./languageFeatureDebounce":[2454,792],"./languageFeatureDebounce.js":[2454,792],"./languageFeatures":[2847,792],"./languageFeatures.js":[2847,792],"./languageFeaturesService":[1369,792],"./languageFeaturesService.js":[1369,792],"./languageService":[2657,792],"./languageService.js":[2657,792],"./languagesAssociations":[5911,792],"./languagesAssociations.js":[5911,792],"./languagesRegistry":[7024,792],"./languagesRegistry.js":[7024,792],"./markerDecorations":[3637,792],"./markerDecorations.js":[3637,792],"./markerDecorationsService":[9420,792],"./markerDecorationsService.js":[9420,792],"./model":[9361,792],"./model.js":[9361,792],"./modelService":[2713,792],"./modelService.js":[2713,792],"./resolverService":[4037,792],"./resolverService.js":[4037,792],"./semanticTokensDto":[3699,792],"./semanticTokensDto.js":[3699,792],"./semanticTokensProviderStyling":[4686,792],"./semanticTokensProviderStyling.js":[4686,792],"./semanticTokensStyling":[7284,792],"./semanticTokensStyling.js":[7284,792],"./semanticTokensStylingService":[2205,792],"./semanticTokensStylingService.js":[2205,792],"./textModelSync/textModelSync.impl":[6294],"./textModelSync/textModelSync.impl.js":[6294],"./textModelSync/textModelSync.protocol":[4977,792],"./textModelSync/textModelSync.protocol.js":[4977,792],"./textResourceConfiguration":[6151,792],"./textResourceConfiguration.js":[6151,792],"./treeSitterParserService":[5863,792],"./treeSitterParserService.js":[5863,792],"./treeViewsDnd":[1210,792],"./treeViewsDnd.js":[1210,792],"./treeViewsDndService":[5231,792],"./treeViewsDndService.js":[5231,792],"./unicodeTextModelHighlighter":[7412],"./unicodeTextModelHighlighter.js":[7412],"monaco-editor/esm/vs/editor/common/services/editorBaseApi":[215],"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":[215],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":[5926],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":[5926],"monaco-editor/esm/vs/editor/common/services/editorWorker":[4117,792],"monaco-editor/esm/vs/editor/common/services/editorWorker.js":[4117,792],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":[2899],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":[2899],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":[6198],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":[6198],"monaco-editor/esm/vs/editor/common/services/getIconClasses":[2340,792],"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":[2340,792],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":[2454,792],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":[2454,792],"monaco-editor/esm/vs/editor/common/services/languageFeatures":[2847,792],"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":[2847,792],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":[1369,792],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":[1369,792],"monaco-editor/esm/vs/editor/common/services/languageService":[2657,792],"monaco-editor/esm/vs/editor/common/services/languageService.js":[2657,792],"monaco-editor/esm/vs/editor/common/services/languagesAssociations":[5911,792],"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":[5911,792],"monaco-editor/esm/vs/editor/common/services/languagesRegistry":[7024,792],"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":[7024,792],"monaco-editor/esm/vs/editor/common/services/markerDecorations":[3637,792],"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":[3637,792],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":[9420,792],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":[9420,792],"monaco-editor/esm/vs/editor/common/services/model":[9361,792],"monaco-editor/esm/vs/editor/common/services/model.js":[9361,792],"monaco-editor/esm/vs/editor/common/services/modelService":[2713,792],"monaco-editor/esm/vs/editor/common/services/modelService.js":[2713,792],"monaco-editor/esm/vs/editor/common/services/resolverService":[4037,792],"monaco-editor/esm/vs/editor/common/services/resolverService.js":[4037,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":[3699,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":[3699,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":[4686,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":[4686,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":[7284,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":[7284,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":[2205,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":[2205,792],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":[6294],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":[6294],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":[4977,792],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":[4977,792],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":[6151,792],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":[6151,792],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":[5863,792],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":[5863,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":[1210,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":[1210,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":[5231,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":[5231,792],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":[7412],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":[7412]};function r(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(r)))}r.keys=()=>Object.keys(i),r.id=9204,e.exports=r},7614:(e,t,n)=>{var i={"./editorBaseApi":215,"./editorBaseApi.js":215,"./editorSimpleWorker":5926,"./editorSimpleWorker.js":5926,"./editorWorker":4117,"./editorWorker.js":4117,"./editorWorkerHost":2899,"./editorWorkerHost.js":2899,"./findSectionHeaders":6198,"./findSectionHeaders.js":6198,"./getIconClasses":2340,"./getIconClasses.js":2340,"./languageFeatureDebounce":2454,"./languageFeatureDebounce.js":2454,"./languageFeatures":2847,"./languageFeatures.js":2847,"./languageFeaturesService":1369,"./languageFeaturesService.js":1369,"./languageService":2657,"./languageService.js":2657,"./languagesAssociations":5911,"./languagesAssociations.js":5911,"./languagesRegistry":7024,"./languagesRegistry.js":7024,"./markerDecorations":3637,"./markerDecorations.js":3637,"./markerDecorationsService":9420,"./markerDecorationsService.js":9420,"./model":9361,"./model.js":9361,"./modelService":2713,"./modelService.js":2713,"./resolverService":4037,"./resolverService.js":4037,"./semanticTokensDto":3699,"./semanticTokensDto.js":3699,"./semanticTokensProviderStyling":4686,"./semanticTokensProviderStyling.js":4686,"./semanticTokensStyling":7284,"./semanticTokensStyling.js":7284,"./semanticTokensStylingService":2205,"./semanticTokensStylingService.js":2205,"./textModelSync/textModelSync.impl":6294,"./textModelSync/textModelSync.impl.js":6294,"./textModelSync/textModelSync.protocol":4977,"./textModelSync/textModelSync.protocol.js":4977,"./textResourceConfiguration":6151,"./textResourceConfiguration.js":6151,"./treeSitterParserService":5863,"./treeSitterParserService.js":5863,"./treeViewsDnd":1210,"./treeViewsDnd.js":1210,"./treeViewsDndService":5231,"./treeViewsDndService.js":5231,"./unicodeTextModelHighlighter":7412,"./unicodeTextModelHighlighter.js":7412,"monaco-editor/esm/vs/editor/common/services/editorBaseApi":215,"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":215,"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":5926,"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":5926,"monaco-editor/esm/vs/editor/common/services/editorWorker":4117,"monaco-editor/esm/vs/editor/common/services/editorWorker.js":4117,"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":2899,"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":2899,"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":6198,"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":6198,"monaco-editor/esm/vs/editor/common/services/getIconClasses":2340,"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":2340,"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":2454,"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":2454,"monaco-editor/esm/vs/editor/common/services/languageFeatures":2847,"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":2847,"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":1369,"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":1369,"monaco-editor/esm/vs/editor/common/services/languageService":2657,"monaco-editor/esm/vs/editor/common/services/languageService.js":2657,"monaco-editor/esm/vs/editor/common/services/languagesAssociations":5911,"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":5911,"monaco-editor/esm/vs/editor/common/services/languagesRegistry":7024,"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":7024,"monaco-editor/esm/vs/editor/common/services/markerDecorations":3637,"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":3637,"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":9420,"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":9420,"monaco-editor/esm/vs/editor/common/services/model":9361,"monaco-editor/esm/vs/editor/common/services/model.js":9361,"monaco-editor/esm/vs/editor/common/services/modelService":2713,"monaco-editor/esm/vs/editor/common/services/modelService.js":2713,"monaco-editor/esm/vs/editor/common/services/resolverService":4037,"monaco-editor/esm/vs/editor/common/services/resolverService.js":4037,"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":3699,"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":3699,"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":4686,"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":4686,"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":7284,"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":7284,"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":2205,"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":2205,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":6294,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":6294,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":4977,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":4977,"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":6151,"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":6151,"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":5863,"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":5863,"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":1210,"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":1210,"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":5231,"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":5231,"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":7412,"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":7412};function r(e){var t=s(e);return n(t)}function s(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=s,e.exports=r,r.id=7614}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}(()=>{n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{n.e=()=>Promise.resolve()})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();(()=>{"use strict";var e=n(1352),t=n(5926),i=n(2899);let r=!1;function s(n){if(r)return;r=!0;const s=new e.SimpleWorkerServer((e=>{globalThis.postMessage(e)}),(e=>new t.EditorSimpleWorker(i.EditorWorkerHost.getChannel(e),n)));globalThis.onmessage=e=>{s.onmessage(e.data)}} +(()=>{var e={5053:(e,t,n)=>{"use strict";function i(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,r=e.length;ie){const n=new Set;return e.filter((e=>{const i=t(e);return!n.has(i)&&(n.add(i),!0)}))}function l(e,t){return e.length>0?e[0]:t}function c(e,t,n){const i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)}function h(e,t){for(const n of t)e.push(n)}var u;function d(e,t){return(n,i)=>t(e(n),e(i))}n.d(t,{E4:()=>h,Fy:()=>l,Hw:()=>f,U9:()=>g,VE:()=>d,aI:()=>i,c1:()=>p,dM:()=>a,j3:()=>m,kj:()=>o,n:()=>r,nK:()=>c,pN:()=>s}),function(e){function t(e){return e<0}function n(e){return e<=0}function i(e){return e>0}function r(e){return 0===e}e.isLessThan=t,e.isLessThanOrEqual=n,e.isGreaterThan=i,e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(u||(u={}));const g=(e,t)=>e-t;function f(e){return(t,n)=>-e(t,n)}class m{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;while(t=0&&e(this.items[t]))t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class p{static{this.empty=new p((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new p((t=>this.iterate((n=>!e(n)||t(n)))))}map(e){return new p((t=>this.iterate((n=>t(e(n))))))}findLast(e){let t;return this.iterate((n=>(e(n)&&(t=n),!0))),t}findLastMaxBy(e){let t,n=!0;return this.iterate((i=>((n||u.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0))),t}}},3654:(e,t,n)=>{"use strict";function i(e,t){const n=r(e,t);if(-1!==n)return e[n]}function r(e,t,n=e.length-1){for(let i=n;i>=0;i--){const n=e[i];if(t(n))return i}return-1}function s(e,t){const n=o(e,t);return-1===n?void 0:e[n]}function o(e,t,n=0,i=e.length){let r=n,s=i;while(ri,XP:()=>a,hw:()=>l,iM:()=>o,lx:()=>s,vJ:()=>c});class c{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(c.assertInvariants){if(this._prevFindLastPredicate)for(const t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.");this._prevFindLastPredicate=e}const t=o(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}},9109:(e,t,n)=>{"use strict";n.d(t,{Ft:()=>o,Xo:()=>a,ok:()=>r,xb:()=>s});var i=n(4396);function r(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function o(e){e()||(e(),(0,i.dz)(new i.D7("Assertion Failed")))}function a(e,t){let n=0;while(n{"use strict";n.d(t,{vb:()=>l,uC:()=>c,Qg:()=>a,$6:()=>h});n(7792);var i=n(4396),r=n(231),s=n(8894),o=n(5160);Symbol("MicrotaskDelay");function a(e){return!!e&&"function"===typeof e.then}class l{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new i.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const r=n.setInterval((()=>{e()}),t);this.disposable=(0,s.s)((()=>{n.clearInterval(r),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class c{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let h,u;(function(){u="function"!==typeof globalThis.requestIdleCallback||"function"!==typeof globalThis.cancelIdleCallback?(e,t)=>{(0,o._p)((()=>{if(n)return;const e=Date.now()+15,i={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(i))}));let n=!1;return{dispose(){n||(n=!0)}}}:(e,t,n)=>{const i=e.requestIdleCallback(t,"number"===typeof n?{timeout:n}:void 0);let r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(i))}}},h=e=>u(globalThis,e)})();var d;(function(e){async function t(e){let t;const n=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if("undefined"!==typeof t)throw t;return n}function n(e){return new Promise((async(t,n)=>{try{await e(t,n)}catch(e){n(e)}}))}e.settled=t,e.withAsyncBody=n})(d||(d={}));class g{static fromArray(e){return new g((t=>{t.emitMany(e)}))}static fromPromise(e){return new g((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new g((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new g((async t=>{await Promise.all(e.map((async e=>{for await(const n of e)t.emitOne(n)})))}))}static{this.EMPTY=g.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new r.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new g((async n=>{for await(const i of e)n.emitOne(t(i))}))}map(e){return g.map(this,e)}static filter(e,t){return new g((async n=>{for await(const i of e)t(i)&&n.emitOne(i)}))}filter(e){return g.filter(this,e)}static coalesce(e){return g.filter(e,(e=>!!e))}coalesce(){return g.coalesce(this)}static async toPromise(e){const t=[];for await(const n of e)t.push(n);return t}toPromise(){return g.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}},7885:(e,t,n)=>{"use strict";n.d(t,{$l:()=>a,Gs:()=>d,MB:()=>o,Sw:()=>h,bb:()=>c,gN:()=>l,pJ:()=>u});var i=n(5661);const r="undefined"!==typeof Buffer;new i.d((()=>new Uint8Array(256)));let s;class o{static wrap(e){return r&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new o(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return r?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function l(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function c(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function h(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function u(e,t){return e[t]}function d(e,t,n){e[n]=t}},7389:(e,t,n)=>{"use strict";function i(e){return e}n.d(t,{VV:()=>s,o5:()=>r});class r{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"===typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class s{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"===typeof e?(this._fn=e,this._computeKey=i):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const n=this._fn(e);return this._map.set(e,n),this._map2.set(t,n),n}}},7792:(e,t,n)=>{"use strict";n.d(t,{Qi:()=>a});var i=n(231);const r=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var s;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof o||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r})})(s||(s={}));class o{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?r:(this._emitter||(this._emitter=new i.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token instanceof o&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=s.None}}},6455:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var i=n(322);const r=Object.create(null);function s(e,t){if((0,i.Kg)(t)){const n=r[t];if(void 0===n)throw new Error(`${e} references an unknown codicon: ${t}`);t=n}return r[e]=t,{id:e}}const o={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),gitPullRequestLabel:s("git-pull-request-label",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugHint:s("debug-hint",60017),terminalDecorationSuccess:s("terminal-decoration-success",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circleOutline:s("circle-outline",60092),circle:s("circle",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:s("terminal-decoration-incomplete",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),diffSidebyside:s("diff-sidebyside",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),compareChanges:s("compare-changes",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),gitPullRequestMilestone:s("git-pull-request-milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),terminalDecorationMark:s("terminal-decoration-mark",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),debugAlt:s("debug-alt",60305),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),gitPullRequestReviewer:s("git-pull-request-reviewer",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),gitPullRequestAssignee:s("git-pull-request-assignee",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),issueClosed:s("issue-closed",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),export:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnknown:s("workspace-unknown",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracket:s("bracket",60175),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newline:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),terminalDecorationError:s("terminal-decoration-error",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),blank:s("blank",60419),heartFilled:s("heart-filled",60420),map:s("map",60421),mapHorizontal:s("map-horizontal",60421),foldHorizontal:s("fold-horizontal",60421),mapFilled:s("map-filled",60422),mapHorizontalFilled:s("map-horizontal-filled",60422),foldHorizontalFilled:s("fold-horizontal-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),send:s("send",60431),sparkle:s("sparkle",60432),insert:s("insert",60433),mic:s("mic",60434),thumbsdownFilled:s("thumbsdown-filled",60435),thumbsupFilled:s("thumbsup-filled",60436),coffee:s("coffee",60437),snake:s("snake",60438),game:s("game",60439),vr:s("vr",60440),chip:s("chip",60441),piano:s("piano",60442),music:s("music",60443),micFilled:s("mic-filled",60444),repoFetch:s("repo-fetch",60445),copilot:s("copilot",60446),lightbulbSparkle:s("lightbulb-sparkle",60447),robot:s("robot",60448),sparkleFilled:s("sparkle-filled",60449),diffSingle:s("diff-single",60450),diffMultiple:s("diff-multiple",60451),surroundWith:s("surround-with",60452),share:s("share",60453),gitStash:s("git-stash",60454),gitStashApply:s("git-stash-apply",60455),gitStashPop:s("git-stash-pop",60456),vscode:s("vscode",60457),vscodeInsiders:s("vscode-insiders",60458),codeOss:s("code-oss",60459),runCoverage:s("run-coverage",60460),runAllCoverage:s("run-all-coverage",60461),coverage:s("coverage",60462),githubProject:s("github-project",60463),mapVertical:s("map-vertical",60464),foldVertical:s("fold-vertical",60464),mapVerticalFilled:s("map-vertical-filled",60465),foldVerticalFilled:s("fold-vertical-filled",60465),goToSearch:s("go-to-search",60466),percentage:s("percentage",60467),sortPercentage:s("sort-percentage",60467),attach:s("attach",60468)},a={dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left"),dropDownButton:s("drop-down-button",60084),symbolCustomColor:s("symbol-customcolor",60252),exportIcon:s("export",60332),workspaceUnspecified:s("workspace-unspecified",60355),newLine:s("newline",60394),thumbsDownFilled:s("thumbsdown-filled",60435),thumbsUpFilled:s("thumbsup-filled",60436),gitFetch:s("git-fetch",60445),lightbulbSparkleAutofix:s("lightbulb-sparkle-autofix",60447),debugBreakpointPending:s("debug-breakpoint-pending",60377)},l={...o,...a}},5476:(e,t,n)=>{"use strict";function i(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,{Q1:()=>a,bU:()=>r,hB:()=>s});class r{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=e.a,o=Math.max(t,n,i),a=Math.min(t,n,i);let l=0,c=0;const h=(a+o)/2,u=o-a;if(u>0){switch(c=Math.min(h<=.5?u/(2*h):u/(2-2*h),1),o){case t:l=(n-i)/u+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:o}=e;let a,l,c;if(0===n)a=l=c=i;else{const e=i<.5?i*(1+n):i+n-i*n,r=2*i-e;a=s._hue2rgb(r,e,t+1/3),l=s._hue2rgb(r,e,t),c=s._hue2rgb(r,e,t-1/3)}return new r(Math.round(255*a),Math.round(255*l),Math.round(255*c),o)}}class o{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=Math.max(t,n,i),s=Math.min(t,n,i),a=r-s,l=0===r?0:a/r;let c;return c=0===a?0:r===t?((n-i)/a%6+6)%6:r===n?(i-t)/a+2:(t-n)/a+4,new o(Math.round(60*c),l,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:s}=e,o=i*n,a=o*(1-Math.abs(t/60%2-1)),l=i-o;let[c,h,u]=[0,0,0];return t<60?(c=o,h=a):t<120?(c=a,h=o):t<180?(h=o,u=a):t<240?(h=a,u=o):t<300?(c=a,u=o):t<=360&&(c=o,u=a),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),u=Math.round(255*(u+l)),new r(c,h,u,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof r)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof o))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=o.toRGBA(e)}}equals(e){return!!e&&r.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&o.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g),n=a._relativeLuminanceForComponent(this.rgba.b),r=.2126*e+.7152*t+.0722*n;return i(r,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t{"use strict";n.d(t,{D7:()=>f,EM:()=>d,Qg:()=>h,cU:()=>o,dz:()=>s,iH:()=>u});class i{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(g.isErrorNoTelemetry(e))throw new g(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const r=new i;function s(e){l(e)||r.onUnexpectedError(e)}function o(e){if(e instanceof Error){const{name:t,message:n}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i,noTelemetry:g.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof c||e instanceof Error&&e.name===a&&e.message===a}class c extends Error{constructor(){super(a),this.name=this.message}}function h(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class d extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class g extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof g)return e;const t=new g;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}},231:(e,t,n)=>{"use strict";n.d(t,{Jh:()=>c,vl:()=>v});var i=n(4396),r=n(8894),s=(n(7806),n(4240));const o=!1,a=!1,l=!1;var c;(function(e){function t(e){if(l){const{onDidAddListener:t}=e,n=g.create();let i=0;e.onDidAddListener=()=>{2===++i&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),n.print()),t?.()}}}function n(e,t){return p(e,(()=>{}),0,void 0,!0,void 0,t)}function i(e){return(t,n=null,i)=>{let r,s=!1;return r=e((e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)}),null,i),s&&r.dispose(),r}}function s(t,n){return e.once(e.filter(t,n))}function o(e,t,n){return f(((n,i=null,r)=>e((e=>n.call(i,t(e))),null,r)),n)}function a(e,t,n){return f(((n,i=null,r)=>e((e=>{t(e),n.call(i,e)}),null,r)),n)}function c(e,t,n){return f(((n,i=null,r)=>e((e=>t(e)&&n.call(i,e)),null,r)),n)}function h(e){return e}function u(...e){return(t,n=null,i)=>{const s=(0,r.qE)(...e.map((e=>e((e=>t.call(n,e))))));return m(s,i)}}function d(e,t,n,i){let r=n;return o(e,(e=>(r=t(r,e),r)),i)}function f(e,n){let i;const r={onWillAddFirstListener(){i=e(s.fire,s)},onDidRemoveLastListener(){i?.dispose()}};n||t(r);const s=new v(r);return n?.add(s),s.event}function m(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function p(e,n,i=100,r=!1,s=!1,o,a){let l,c,h,u,d=0;const g={leakWarningThreshold:o,onWillAddFirstListener(){l=e((e=>{d++,c=n(c,e),r&&!h&&(f.fire(c),c=void 0),u=()=>{const e=c;c=void 0,h=void 0,(!r||d>1)&&f.fire(e),d=0},"number"===typeof i?(clearTimeout(h),h=setTimeout(u,i)):void 0===h&&(h=0,queueMicrotask(u))}))},onWillRemoveListener(){s&&d>0&&u?.()},onDidRemoveLastListener(){u=void 0,l.dispose()}};a||t(g);const f=new v(g);return a?.add(f),f.event}function b(t,n=0,i){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),n,void 0,!0,void 0,i)}function _(e,t=(e,t)=>e===t,n){let i,r=!0;return c(e,(e=>{const n=r||!t(e,i);return r=!1,i=e,n}),n)}function k(t,n,i){return[e.filter(t,n,i),e.filter(t,(e=>!n(e)),i)]}function C(e,t=!1,n=[],i){let r=n.slice(),s=e((e=>{r?r.push(e):a.fire(e)}));i&&i.add(s);const o=()=>{r?.forEach((e=>a.fire(e))),r=null},a=new v({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),i&&i.add(s))},onDidAddFirstListener(){r&&(t?setTimeout(o):o())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return i&&i.add(a),a.event}function y(e,t){const n=(n,i,r)=>{const s=t(new w);return e((function(e){const t=s.evaluate(e);t!==L&&n.call(i,t)}),void 0,r)};return n}e.None=()=>r.jG.None,e.defer=n,e.once=i,e.onceIf=s,e.map=o,e.forEach=a,e.filter=c,e.signal=h,e.any=u,e.reduce=d,e.debounce=p,e.accumulate=b,e.latch=_,e.split=k,e.buffer=C,e.chain=y;const L=Symbol("HaltChainable");class w{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:L)),this}reduce(e,t){let n=t;return this.steps.push((t=>(n=e(n,t),n))),this}latch(e=(e,t)=>e===t){let t,n=!0;return this.steps.push((i=>{const r=n||!e(i,t);return n=!1,t=i,r?i:L})),this}evaluate(e){for(const t of this.steps)if(e=t(e),e===L)break;return e}}function S(e,t,n=e=>e){const i=(...e)=>o.fire(n(...e)),r=()=>e.on(t,i),s=()=>e.removeListener(t,i),o=new v({onWillAddFirstListener:r,onDidRemoveLastListener:s});return o.event}function x(e,t,n=e=>e){const i=(...e)=>o.fire(n(...e)),r=()=>e.addEventListener(t,i),s=()=>e.removeEventListener(t,i),o=new v({onWillAddFirstListener:r,onDidRemoveLastListener:s});return o.event}function E(e){return new Promise((t=>i(e)(t)))}function N(e){const t=new v;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event}function T(e,t){return e((e=>t.fire(e)))}function A(e,t,n){return t(n),e((e=>t(e)))}e.fromNodeEventEmitter=S,e.fromDOMEventEmitter=x,e.toPromise=E,e.fromPromise=N,e.forward=T,e.runAndSubscribe=A;class I{constructor(e,n){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};n||t(i),this.emitter=new v(i),n&&n.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function O(e,t){const n=new I(e,t);return n.emitter.event}function M(e){return(t,n,i)=>{let s=0,o=!1;const a={beginUpdate(){s++},endUpdate(){s--,0===s&&(e.reportChanges(),o&&(o=!1,t.call(n)))},handlePossibleChange(){},handleChange(){o=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return i instanceof r.Cm?i.add(l):Array.isArray(i)&&i.push(l),l}}e.fromObservable=O,e.fromObservableLight=M})(c||(c={}));class h{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${h._idPool++}`,h.all.add(this)}start(e){this._stopWatch=new s.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}let u=-1;class d{static{this._idPool=1}constructor(e,t,n=(d._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[n,i]of this._stacks)(!e||t{if(e instanceof p)t(e);else for(let n=0;n{0!==e.length&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join("\n")),e.length=0)}),3e3),k=new FinalizationRegistry((t=>{"string"===typeof t&&e.push(t)}))}class v{constructor(e){this._size=0,this._options=e,this._leakageMon=u>0||this._options?.leakWarningThreshold?new d(e?.onListenerError??i.dz,this._options?.leakWarningThreshold??u):void 0,this._perfMon=this._options?._profName?new h(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(a){const e=this._listeners;queueMicrotask((()=>{_(e,(e=>e.stack?.print()))}))}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],n=new m(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]),s=this._options?.onListenerError||i.dz;return s(n),r.jG.None}if(this._disposed)return r.jG.None;t&&(e=e.bind(t));const s=new p(e);let o,l;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(s.stack=g.create(),o=this._leakageMon.check(s.stack,this._size+1)),a&&(s.stack=l??g.create()),this._listeners?this._listeners instanceof p?(this._deliveryQueue??=new C,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;const c=(0,r.s)((()=>{k?.unregister(c),o?.(),this._removeListener(s)}));if(n instanceof r.Cm?n.add(c):Array.isArray(n)&&n.push(c),k){const e=(new Error).stack.split("\n").slice(2,3).join("\n").trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);k.register(c,t?.[2]??e,c)}return c},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,n=t.indexOf(e);if(-1===n)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const i=this._deliveryQueue.current===this;if(this._size*b<=t.length){let e=0;for(let n=0;n0}}class C{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}},7531:(e,t,n)=>{"use strict";n.d(t,{TH:()=>o,Zn:()=>l,_1:()=>c,kb:()=>a});var i=n(1643),r=(n(5160),n(601));function s(e){return 47===e||92===e}function o(e){return e.replace(/[\\/]/g,i.SA.sep)}function a(e){return-1===e.indexOf("/")&&(e=o(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function l(e,t=i.SA.sep){if(!e)return"";const n=e.length,r=e.charCodeAt(0);if(s(r)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){let i=3;const r=i;for(;ie.length)return!1;if(n){const n=(0,r.ns)(e,t);if(!n)return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===s&&i--,e.charAt(i)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}function h(e){return e>=65&&e<=90||e>=97&&e<=122}},3589:(e,t,n)=>{"use strict";n.d(t,{YW:()=>D,qg:()=>R});var i=n(3723),r=n(7531),s=n(1553),o=n(1643),a=n(5160),l=n(601);const c="**",h="/",u="[/\\\\]",d="[^/\\\\]",g=/\//g;function f(e,t){switch(e){case 0:return"";case 1:return`${d}*?`;default:return`(?:${u}|${d}+${u}${t?`|${u}${d}+`:""})*?`}}function m(e,t){if(!e)return[];const n=[];let i=!1,r=!1,s="";for(const o of e){switch(o){case t:if(!i&&!r){n.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1;break}s+=o}return s&&n.push(s),n}function p(e){if(!e)return"";let t="";const n=m(e,h);if(n.every((e=>e===c)))t=".*";else{let e=!1;n.forEach(((i,r)=>{if(i===c){if(e)return;t+=f(2,r===n.length-1)}else{let e=!1,s="",o=!1,a="";for(const n of i)if("}"!==n&&e)s+=n;else if(!o||"]"===n&&a)switch(n){case"{":e=!0;continue;case"[":o=!0;continue;case"}":{const n=m(s,","),i=`(?:${n.map((e=>p(e))).join("|")})`;t+=i,e=!1,s="";break}case"]":t+="["+a+"]",o=!1,a="";break;case"?":t+=d;continue;case"*":t+=f(1);continue;default:t+=(0,l.bm)(n)}else{let e;e="-"===n?n:"^"!==n&&"!"!==n||a?n===h?"":(0,l.bm)(n):"^",a+=e}rx(e,t))).filter((e=>e!==S)),e),i=n.length;if(!i)return S;if(1===i)return n[0];const r=function(t,i){for(let r=0,s=n.length;r!!e.allBasenames));s&&(r.allBasenames=s.allBasenames);const o=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(r.allPaths=o),r}function O(e,t,n){const i=o.Vn===o.SA.sep,r=i?e:e.replace(g,o.Vn),s=o.Vn+r,a=o.SA.sep+e;let l;return l=n?function(n,o){return"string"!==typeof n||n!==r&&!n.endsWith(s)&&(i||n!==e&&!n.endsWith(a))?null:t}:function(n,s){return"string"!==typeof n||n!==r&&(i||n!==e)?null:t},l.allPaths=[(n?"*/":"./")+e],l}function M(e){try{const t=new RegExp(`^${p(e)}$`);return function(n){return t.lastIndex=0,"string"===typeof n&&t.test(n)?e:null}}catch(e){return S}}function D(e,t,n){return!(!e||"string"!==typeof t)&&R(e)(t,void 0,n)}function R(e,t={}){if(!e)return w;if("string"===typeof e||B(e)){const n=x(e,t);if(n===S)return w;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return F(e,t)}function B(e){const t=e;return!!t&&("string"===typeof t.base&&"string"===typeof t.pattern)}function F(e,t){const n=V(Object.getOwnPropertyNames(e).map((n=>P(n,e[n],t))).filter((e=>e!==S))),r=n.length;if(!r)return S;if(!n.some((e=>!!e.requiresSiblings))){if(1===r)return n[0];const e=function(e,t){let r;for(let s=0,o=n.length;s{for(const e of r){const t=await e;if("string"===typeof t)return t}return null})():null},t=n.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const s=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,r){let s,a;for(let l=0,c=n.length;l{for(const e of a){const t=await e;if("string"===typeof t)return t}return null})():null},a=n.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=n.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}function P(e,t,n){if(!1===t)return S;const r=x(e,n);if(r===S)return S;if("boolean"===typeof t)return r;if(t){const n=t.when;if("string"===typeof n){const t=(t,s,o,a)=>{if(!a||!r(t,s))return null;const l=n.replace("$(basename)",(()=>o)),c=a(l);return(0,i.Qg)(c)?c.then((t=>t?e:null)):c?e:null};return t.requiresSiblings=!0,t}}return r}function V(e,t){const n=e.filter((e=>!!e.basenames));if(n.length<2)return e;const i=n.reduce(((e,t)=>{const n=t.basenames;return n?e.concat(n):e}),[]);let r;if(t){r=[];for(let e=0,n=i.length;e{const n=t.patterns;return n?e.concat(n):e}),[]);const s=function(e,t){if("string"!==typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?r[n]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;const o=e.filter((e=>!e.basenames));return o.push(s),o}},5647:(e,t,n)=>{"use strict";n.d(t,{e2:()=>a,sN:()=>r,v7:()=>f});var i=n(601);function r(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?l(e,t):c(e,t);case"string":return a(e,t);case"boolean":return o(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}}function s(e,t){return(t<<5)-t+e|0}function o(e,t){return s(e?433:863,t)}function a(e,t){t=s(149417,t);for(let n=0,i=e.length;nr(t,e)),t)}function c(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,n)=>(t=a(n,t),r(e[n],t))),t)}function h(e,t,n=32){const i=n-t,r=~((1<>>i)>>>0}function u(e,t=0,n=e.byteLength,i=0){for(let r=0;re.toString(16).padStart(2,"0"))).join(""):d((e>>>0).toString(16),t/4)}class f{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let r,s,o=this._buffLen,a=this._leftoverHighSurrogate;0!==a?(r=a,s=-1,a=0):(r=e.charCodeAt(0),s=0);while(1){let l=r;if(i.pc(r)){if(!(s+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),g(this._h0)+g(this._h1)+g(this._h2)+g(this._h3)+g(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,u(this._buff,this._buffLen),this._buffLen>56&&(this._step(),u(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=f._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,h(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,i,r,s=this._h0,o=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(n=o&a|~o&l,i=1518500249):t<40?(n=o^a^l,i=1859775393):t<60?(n=o&a|o&l|a&l,i=2400959708):(n=o^a^l,i=3395469782),r=h(s,5)+n+c+i+e.getUint32(4*t,!1)&4294967295,c=l,l=a,a=h(o,30),o=s,s=r;this._h0=this._h0+s&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}},5837:(e,t,n)=>{"use strict";var i;n.d(t,{f:()=>i}),function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function i(){return n}function*r(e){yield e}function s(e){return t(e)?e:r(e)}function o(e){return e||n}function*a(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function l(e){return!e||!0===e[Symbol.iterator]().next().done}function c(e){return e[Symbol.iterator]().next().value}function h(e,t){let n=0;for(const i of e)if(t(i,n++))return!0;return!1}function u(e,t){for(const n of e)if(t(n))return n}function*d(e,t){for(const n of e)t(n)&&(yield n)}function*g(e,t){let n=0;for(const i of e)yield t(i,n++)}function*f(e,t){let n=0;for(const i of e)yield*t(i,n++)}function*m(...e){for(const t of e)yield*t}function p(e,t,n){let i=n;for(const n of e)i=t(i,n);return i}function*b(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t{"use strict";n.d(t,{d:()=>i});class i{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},8894:(e,t,n)=>{"use strict";function i(e,t){const n=this;let i,r=!1;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}n.d(t,{jG:()=>p,$w:()=>_,Cm:()=>m,HE:()=>b,qE:()=>g,AS:()=>d,VD:()=>c,s:()=>f,Ay:()=>l});var r=n(5837);const s=!1;let o=null;function a(e){o=e}if(s){const e="__is_disposable_tracked__";a(new class{trackDisposable(t){const n=new Error("Potentially leaked disposable").stack;setTimeout((()=>{t[e]||console.log(n)}),3e3)}setParent(t,n){if(t&&t!==p.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==p.None)try{t[e]=!0}catch{}}markAsSingleton(e){}})}function l(e){return o?.trackDisposable(e),e}function c(e){o?.markAsDisposed(e)}function h(e,t){o?.setParent(e,t)}function u(e,t){if(o)for(const n of e)o.setParent(n,t)}function d(e){if(r.f.is(e)){const t=[];for(const n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function g(...e){const t=f((()=>d(e)));return u(e,t),t}function f(e){const t=l({dispose:i((()=>{c(t),e()}))});return t}class m{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,l(this)}dispose(){this._isDisposed||(c(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{d(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return h(e,this),this._isDisposed?m.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),h(e,null))}}class p{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new m,l(this),h(this._store,this)}dispose(){c(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class b{constructor(){this._isDisposed=!1,l(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&h(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,c(this),this._value?.dispose(),this._value=void 0}}class _{constructor(){this._store=new Map,this._isDisposed=!1,l(this)}dispose(){c(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{d(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},7806:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});class i{static{this.Undefined=new i(void 0)}constructor(e){this.element=e,this.next=i.Undefined,this.prev=i.Undefined}}class r{constructor(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===i.Undefined}clear(){let e=this._first;while(e!==i.Undefined){const t=e.next;e.prev=i.Undefined,e.next=i.Undefined,e=t}this._first=i.Undefined,this._last=i.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new i(e);if(this._first===i.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==i.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==i.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==i.Undefined&&e.next!==i.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===i.Undefined&&e.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):e.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):e.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==i.Undefined)yield e.element,e=e.next}}},1553:(e,t,n)=>{"use strict";var i,r;n.d(t,{cO:()=>u,db:()=>d,fT:()=>a,qK:()=>h});class s{constructor(e,t){this.uri=e,this.value=t}}function o(e){return Array.isArray(e)}class a{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[i]="ResourceMap",e instanceof a)this.map=new Map(e.map),this.toKey=t??a.defaultToKey;else if(o(e)){this.map=new Map,this.toKey=t??a.defaultToKey;for(const[t,n]of e)this.set(t,n)}else this.map=new Map,this.toKey=e??a.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(const[t,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(i=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class l{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;while(i){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class c extends l{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class h extends c{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class d{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}},3911:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});const i=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},6657:(e,t,n)=>{"use strict";n.d(t,{ny:()=>i,v$:()=>c,zl:()=>m});var i,r=n(4396),s=n(5160),o=n(601),a=n(9133),l=n(1643);function c(e,t){return a.r.isUri(e)?(0,o.Q_)(e.scheme,t):(0,o.ns)(e,t+":")}(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(i||(i={}));const h="tkn";class u{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,i.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return r.dz(t),e}const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&-1===n.indexOf("[")&&(n=`[${n}]`);const o=this._ports[t],l=this._connectionTokens[t];let c=`path=${encodeURIComponent(e.path)}`;return"string"===typeof l&&(c+=`&${h}=${encodeURIComponent(l)}`),a.r.from({scheme:s.HZ?this._preferredWebSchema:i.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:c})}}const d=new u,g="vscode-app";class f{static{this.FALLBACK_AUTHORITY=g}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===i.vscodeRemote?d.rewrite(e):e.scheme!==i.file||!s.ib&&s.lg!==`${i.vscodeFileResource}://${f.FALLBACK_AUTHORITY}`?e:e.with({scheme:i.vscodeFileResource,authority:e.authority||f.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const n=l.fj(t,e);return a.r.file(n)}return a.r.parse(t.toUrl(e))}}const m=new f;var p;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";function i(e){let i;"string"===typeof e?i=new URL(e).searchParams:e instanceof URL?i=e.searchParams:a.r.isUri(e)&&(i=new URL(e.toString(!0)).searchParams);const r=i?.get(n);if(r)return t.get(r)}function r(e,t,i){if(!globalThis.crossOriginIsolated)return;const r=t&&i?"3":i?"2":"1";e instanceof URLSearchParams?e.set(n,r):e[n]=r}e.getHeadersFromQuery=i,e.addSearchParam=r})(p||(p={}))},5603:(e,t,n)=>{"use strict";n.d(t,{V0:()=>s,aI:()=>i,kT:()=>o});Object.prototype.hasOwnProperty;function i(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;nfunction(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)},i={};for(const t of e)i[t]=n(t);return i}},1643:(e,t,n)=>{"use strict";n.d(t,{P8:()=>B,pD:()=>R,LC:()=>F,fj:()=>O,S8:()=>I,SA:()=>A,V8:()=>D,hd:()=>M,Vn:()=>P,IN:()=>N});var i=n(5160);let r;const s=globalThis.vscode;if("undefined"!==typeof s&&"undefined"!==typeof s.process){const e=s.process;r={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else r="undefined"!==typeof process&&"string"===typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env["VSCODE_CWD"]||process.cwd()}}:{get platform(){return i.uF?"win32":i.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const o=r.cwd,a=r.env,l=r.platform,c=65,h=97,u=90,d=122,g=46,f=47,m=92,p=58,b=63;class _ extends Error{constructor(e,t,n){let i;"string"===typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${r} ${i} of type ${t}`;s+=". Received type "+typeof n,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function k(e,t){if(null===e||"object"!==typeof e)throw new _(t,"Object",e)}function v(e,t){if("string"!==typeof e)throw new _(t,"string",e)}const C="win32"===l;function y(e){return e===f||e===m}function L(e){return e===f}function w(e){return e>=c&&e<=u||e>=h&&e<=d}function S(e,t,n,i){let r="",s=0,o=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c2){const e=r.lastIndexOf(n);-1===e?(r="",s=0):(r=r.slice(0,e),s=r.length-1-r.lastIndexOf(n)),o=c,a=0;continue}if(0!==r.length){r="",s=0,o=c,a=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(o+1,c)}`:r=e.slice(o+1,c),s=c-o-1;o=c,a=0}else l===g&&-1!==a?++a:a=-1}return r}function x(e){return e?`${"."===e[0]?"":"."}${e}`:""}function E(e,t){k(t,"pathObject");const n=t.dir||t.root,i=t.base||`${t.name||""}${x(t.ext)}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const N={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],v(s,`paths[${r}]`),0===s.length)continue}else 0===t.length?s=o():(s=a[`=${t}`]||o(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===m)&&(s=`${t}\\`));const l=s.length;let c=0,h="",u=!1;const d=s.charCodeAt(0);if(1===l)y(d)&&(c=1,u=!0);else if(y(d))if(u=!0,y(s.charCodeAt(1))){let e=2,t=e;while(e2&&y(s.charCodeAt(2))&&(u=!0,c=3));if(h.length>0)if(t.length>0){if(h.toLowerCase()!==t.toLowerCase())continue}else t=h;if(i){if(t.length>0)break}else if(n=`${s.slice(c)}\\${n}`,i=u,u&&t.length>0)break}return n=S(n,!i,"\\",y),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){v(e,"path");const t=e.length;if(0===t)return".";let n,i=0,r=!1;const s=e.charCodeAt(0);if(1===t)return L(s)?"\\":e;if(y(s))if(r=!0,y(e.charCodeAt(1))){let r=2,s=r;while(r2&&y(e.charCodeAt(2))&&(r=!0,i=3));let o=i0&&y(e.charCodeAt(t-1))&&(o+="\\"),void 0===n?r?`\\${o}`:o:r?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){v(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return y(n)||t>2&&w(n)&&e.charCodeAt(1)===p&&y(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let i=0;i0&&(void 0===t?t=n=r:t+=`\\${r}`)}if(void 0===t)return".";let i=!0,r=0;if("string"===typeof n&&y(n.charCodeAt(0))){++r;const e=n.length;e>1&&y(n.charCodeAt(1))&&(++r,e>2&&(y(n.charCodeAt(2))?++r:i=!1))}if(i){while(r=2&&(t=`\\${t.slice(r)}`)}return N.normalize(t)},relative(e,t){if(v(e,"from"),v(t,"to"),e===t)return"";const n=N.resolve(e),i=N.resolve(t);if(n===i)return"";if(e=n.toLowerCase(),t=i.toLowerCase(),e===t)return"";let r=0;while(rr&&e.charCodeAt(s-1)===m)s--;const o=s-r;let a=0;while(aa&&t.charCodeAt(l-1)===m)l--;const c=l-a,h=oh){if(t.charCodeAt(a+d)===m)return i.slice(a+d+1);if(2===d)return i.slice(a+d)}o>h&&(e.charCodeAt(r+d)===m?u=d:2===d&&(u=3)),-1===u&&(u=0)}let g="";for(d=r+u+1;d<=s;++d)d!==s&&e.charCodeAt(d)!==m||(g+=0===g.length?"..":"\\..");return a+=u,g.length>0?`${g}${i.slice(a,l)}`:(i.charCodeAt(a)===m&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e||0===e.length)return e;const t=N.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===m){if(t.charCodeAt(1)===m){const e=t.charCodeAt(2);if(e!==b&&e!==g)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(w(t.charCodeAt(0))&&t.charCodeAt(1)===p&&t.charCodeAt(2)===m)return`\\\\?\\${t}`;return e},dirname(e){v(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const r=e.charCodeAt(0);if(1===t)return y(r)?e:".";if(y(r)){if(n=i=1,y(e.charCodeAt(1))){let r=2,s=r;while(r2&&y(e.charCodeAt(2))?3:2,i=n);let s=-1,o=!0;for(let n=t-1;n>=i;--n)if(y(e.charCodeAt(n))){if(!o){s=n;break}}else o=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&v(t,"suffix"),v(e,"path");let n,i=0,r=-1,s=!0;if(e.length>=2&&w(e.charCodeAt(0))&&e.charCodeAt(1)===p&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(y(l)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=i;--n)if(y(e.charCodeAt(n))){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){v(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===p&&w(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(y(t)){if(!s){i=a+1;break}}else-1===r&&(s=!1,r=a+1),t===g?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1)}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:E.bind(null,"\\"),parse(e){v(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,r=e.charCodeAt(0);if(1===n)return y(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(y(r)){if(i=1,y(e.charCodeAt(1))){let t=2,r=t;while(t0&&(t.root=e.slice(0,i));let s=-1,o=i,a=-1,l=!0,c=e.length-1,h=0;for(;c>=i;--c)if(r=e.charCodeAt(c),y(r)){if(!l){o=c+1;break}}else-1===a&&(l=!1,a=c+1),r===g?-1===s?s=c:1!==h&&(h=1):-1!==s&&(h=-1);return-1!==a&&(-1===s||0===h||1===h&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),t.dir=o>0&&o!==i?e.slice(0,o-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},T=(()=>{if(C){const e=/\\/g;return()=>{const t=o().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>o()})(),A={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const r=i>=0?e[i]:T();v(r,`paths[${i}]`),0!==r.length&&(t=`${r}/${t}`,n=r.charCodeAt(0)===f)}return t=S(t,!n,"/",L),n?`/${t}`:t.length>0?t:"."},normalize(e){if(v(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===f,n=e.charCodeAt(e.length-1)===f;return e=S(e,!t,"/",L),0===e.length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return v(e,"path"),e.length>0&&e.charCodeAt(0)===f},join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":A.normalize(t)},relative(e,t){if(v(e,"from"),v(t,"to"),e===t)return"";if(e=A.resolve(e),t=A.resolve(t),e===t)return"";const n=1,i=e.length,r=i-n,s=1,o=t.length-s,a=ra){if(t.charCodeAt(s+c)===f)return t.slice(s+c+1);if(0===c)return t.slice(s+c)}else r>a&&(e.charCodeAt(n+c)===f?l=c:0===c&&(l=0));let h="";for(c=n+l+1;c<=i;++c)c!==i&&e.charCodeAt(c)!==f||(h+=0===h.length?"..":"/..");return`${h}${t.slice(s+l)}`},toNamespacedPath(e){return e},dirname(e){if(v(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===f;let n=-1,i=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===f){if(!i){n=t;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&v(t,"ext"),v(e,"path");let n,i=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===f){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1),o>=0&&(l===t.charCodeAt(o)?-1===--o&&(r=n):(o=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===f){if(!s){i=n+1;break}}else-1===r&&(s=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){v(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a!==f)-1===i&&(r=!1,i=o+1),a===g?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){n=o+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===n+1?"":e.slice(t,i)},format:E.bind(null,"/"),parse(e){v(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===f;let i;n?(t.root="/",i=1):i=0;let r=-1,s=0,o=-1,a=!0,l=e.length-1,c=0;for(;l>=i;--l){const t=e.charCodeAt(l);if(t!==f)-1===o&&(a=!1,o=l+1),t===g?-1===r?r=l:1!==c&&(c=1):-1!==r&&(c=-1);else if(!a){s=l+1;break}}if(-1!==o){const i=0===s&&n?1:s;-1===r||0===c||1===c&&r===o-1&&r===s+1?t.base=t.name=e.slice(i,o):(t.name=e.slice(i,r),t.base=e.slice(i,o),t.ext=e.slice(r,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};A.win32=N.win32=N,A.posix=N.posix=A;const I=C?N.normalize:A.normalize,O=C?N.join:A.join,M=C?N.resolve:A.resolve,D=C?N.relative:A.relative,R=C?N.dirname:A.dirname,B=C?N.basename:A.basename,F=C?N.extname:A.extname,P=C?N.sep:A.sep},5160:(e,t,n)=>{"use strict";n.d(t,{H8:()=>V,HZ:()=>T,OS:()=>R,UP:()=>q,_p:()=>D,cm:()=>P,gm:()=>z,ib:()=>N,j9:()=>E,lg:()=>I,nr:()=>j,uF:()=>S,zx:()=>x});var i=n(1337);const r="en";let s,o,a=!1,l=!1,c=!1,h=!1,u=!1,d=!1,g=!1,f=!1,m=!1,p=!1,b=null,_=null,k=null;const v=globalThis;let C;"undefined"!==typeof v.vscode&&"undefined"!==typeof v.vscode.process?C=v.vscode.process:"undefined"!==typeof process&&"string"===typeof process?.versions?.node&&(C=process);const y="string"===typeof C?.versions?.electron,L=y&&"renderer"===C?.type;if("object"===typeof C){a="win32"===C.platform,l="darwin"===C.platform,c="linux"===C.platform,h=c&&!!C.env["SNAP"]&&!!C.env["SNAP_REVISION"],g=y,m=!!C.env["CI"]||!!C.env["BUILD_ARTIFACTSTAGINGDIRECTORY"],s=r,b=r;const e=C.env["VSCODE_NLS_CONFIG"];if(e)try{const t=JSON.parse(e);s=t.userLocale,_=t.osLocale,b=t.resolvedLanguage||r,k=t.languagePack?.translationsConfigFile}catch(e){}u=!0}else"object"!==typeof navigator||L?console.error("Unable to resolve platform."):(o=navigator.userAgent,a=o.indexOf("Windows")>=0,l=o.indexOf("Macintosh")>=0,f=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=o.indexOf("Linux")>=0,p=o?.indexOf("Mobi")>=0,d=!0,b=i.i8()||r,s=navigator.language.toLowerCase(),_=s);let w=0;l?w=1:a?w=3:c&&(w=2);const S=a,x=l,E=c,N=u,T=d,A=d&&"function"===typeof v.importScripts,I=A?v.origin:void 0,O=o,M="function"===typeof v.postMessage&&!v.importScripts,D=(()=>{if(M){const e=[];v.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n{const i=++t;e.push({id:i,callback:n}),v.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})(),R=l||f?2:a?1:3;let B=!0,F=!1;function P(){if(!F){F=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);B=513===t[0]}return B}const V=!!(O&&O.indexOf("Chrome")>=0),z=!!(O&&O.indexOf("Firefox")>=0),j=!!(!V&&O&&O.indexOf("Safari")>=0),q=!!(O&&O.indexOf("Edg/")>=0);O&&O.indexOf("Android")},4366:(e,t,n)=>{"use strict";n.d(t,{B6:()=>m,P8:()=>d});var i=n(7531),r=n(6657),s=n(1643),o=n(5160),a=n(601),l=n(9133);function c(e){return(0,l.I)(e,!0)}class h{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===r.ny.file)return i._1(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(g(e.authority,t.authority))return i._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return d(e)||e.authority}basename(e){return s.SA.basename(e.path)}extname(e){return s.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===r.ny.file?t=l.r.file(s.pD(c(e))).path:(t=s.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===r.ny.file?l.r.file(s.S8(c(e))).path:s.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!g(e.authority,t.authority))return;if(e.scheme===r.ny.file){const n=s.V8(c(e),c(t));return o.uF?i.TH(n):n}let n=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(n.length,a.length);ei.Zn(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.Vn){return f(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.Vn){let n=!1;if(e.scheme===r.ny.file){const r=c(e);n=void 0!==r&&r.length===i.Zn(r).length&&r[r.length-1]===t}else{t="/";const i=e.path;n=1===i.length&&47===i.charCodeAt(i.length-1)}return n||f(e,t)?e:e.with({path:e.path+"/"})}}const u=new h((()=>!1)),d=(new h((e=>e.scheme!==r.ny.file||!o.j9)),new h((e=>!0)),u.isEqual.bind(u),u.isEqualOrParent.bind(u),u.getComparisonKey.bind(u),u.basenameOrAuthority.bind(u),u.basename.bind(u)),g=(u.extname.bind(u),u.dirname.bind(u),u.joinPath.bind(u),u.normalizePath.bind(u),u.relativePath.bind(u),u.resolvePath.bind(u),u.isAbsolutePath.bind(u),u.isEqualAuthority.bind(u)),f=u.hasTrailingPathSeparator.bind(u);u.removeTrailingPathSeparator.bind(u),u.addTrailingPathSeparator.bind(u);var m;(function(e){function t(t){const n=new Map,i=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));i.split(";").forEach((e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)}));const r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(e.META_DATA_MIME,r),n}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(m||(m={}))},4240:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const i=globalThis.performance&&"function"===typeof globalThis.performance.now;class r{static create(e){return new r(e)}constructor(e){this._now=i&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},601:(e,t,n)=>{"use strict";n.d(t,{$X:()=>D,AV:()=>s,E_:()=>A,HG:()=>d,LJ:()=>y,LU:()=>P,NB:()=>l,OS:()=>c,Q_:()=>k,Ss:()=>B,UD:()=>f,Wv:()=>_,Z5:()=>w,_J:()=>M,aC:()=>O,bm:()=>a,eY:()=>h,jy:()=>o,km:()=>E,lT:()=>g,ne:()=>R,ns:()=>v,pc:()=>C,r_:()=>F,tk:()=>V,tl:()=>W,uz:()=>u,y_:()=>U,z_:()=>L});var i=n(7389),r=n(5661);function s(e){return!e||"string"!==typeof e||0===e.trim().length}function o(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;while(e.indexOf(t,i)===i)i+=n;return e.substring(i)}function c(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function h(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function u(e){return e.split(/\r\n|\r|\n/)}function d(e){for(let t=0,n=e.length;t=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function f(e,t){return et?1:0}function m(e,t,n=0,i=e.length,r=0,s=t.length){for(;ns)return 1}const o=i-n,a=s-r;return oa?1:0}function p(e,t,n=0,i=e.length,r=0,s=t.length){for(;n=128||a>=128)return m(e.toLowerCase(),t.toLowerCase(),n,i,r,s);b(o)&&(o-=32),b(a)&&(a-=32);const l=o-a;if(0!==l)return l}const o=i-n,a=s-r;return oa?1:0}function b(e){return e>=97&&e<=122}function _(e){return e>=65&&e<=90}function k(e,t){return e.length===t.length&&0===p(e,t)}function v(e,t){const n=t.length;return!(t.length>e.length)&&0===p(e,t,0,n)}function C(e){return 55296<=e&&e<=56319}function y(e){return 56320<=e&&e<=57343}function L(e,t){return t-56320+(e-55296<<10)+65536}function w(e,t,n){const i=e.charCodeAt(n);if(C(i)&&n+11){const i=e.charCodeAt(t-2);if(C(i))return L(i,n)}return n}class x{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=S(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=w(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class E{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new x(e,t)}nextGraphemeLength(){const e=j.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.nextCodePoint());while(!t.eol()){const n=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());if(z(i,r)){t.setOffset(n);break}i=r}return t.offset-n}prevGraphemeLength(){const e=j.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.prevCodePoint());while(t.offset>0){const n=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());if(z(r,i)){t.setOffset(n);break}i=r}return n-t.offset}eol(){return this._iterator.eol()}}let N;function T(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function A(e){return N||(N=T()),N.test(e)}const I=/^[\t\n\r\x20-\x7E]*$/;function O(e){return I.test(e)}const M=/[\u2028\u2029]/;function D(e){return M.test(e)}function R(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function B(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const F=String.fromCharCode(65279);function P(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function V(e){const t=26;return e%=2*t,et[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}function q(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}class W{static{this.ambiguousCharacterData=new r.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new i.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let n=0;n!e.startsWith("_")&&e in r));0===o.length&&(o=["_default"]);for(const e of o){const n=t(r[e]);s=i(s,n)}const a=t(r["_common"]),l=n(a,s);return new W(l)}))}static getInstance(e){return W.cache.get(Array.from(e))}static{this._locales=new r.d((()=>Object.keys(W.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return W._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class U{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(U.getRawData())),this._data}static isInvisibleCharacter(e){return U.getData().has(e)}static get codePoints(){return U.getData()}}},322:(e,t,n)=>{"use strict";function i(e){return"string"===typeof e}function r(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(e){return"undefined"===typeof e}function o(e){return s(e)||null===e}n.d(t,{Gv:()=>r,Kg:()=>i,b0:()=>s,z:()=>o})},2647:(e,t,n)=>{"use strict";function i(e){return e<0?0:e>255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,{W:()=>i,j:()=>r})},9133:(e,t,n)=>{"use strict";n.d(t,{I:()=>v,r:()=>f});var i=n(1643),r=n(5160);const s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function c(e,t){return e||t?e:"file"}function h(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d;break}return t}const u="",d="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){return e instanceof f||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"string"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}constructor(e,t,n,i,r,s=!1){"object"===typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=c(e,s),this.authority=t||u,this.path=h(this.scheme,n||u),this.query=i||u,this.fragment=r||u,l(this,s))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===i?i=this.path:null===i&&(i=u),void 0===r?r=this.query:null===r&&(r=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new p(t,n,i,r,s)}static parse(e,t=!1){const n=g.exec(e);return n?new p(n[2]||u,w(n[4]||u),w(n[5]||u),w(n[7]||u),w(n[9]||u),t):new p(u,u,u,u,u)}static file(e){let t=u;if(r.uF&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new p("file",t,e,u,u)}static from(e,t){const n=new p(e.scheme,e.authority,e.path,e.query,e.fragment,t);return n}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=r.uF&&"file"===e.scheme?f.file(i.IN.join(v(e,!0),...t)).path:i.SA.join(e.path,...t),e.with({path:n})}toString(e=!1){return C(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{const t=new p(e);return t._formatted=e.external??null,t._fsPath=e._sep===m?e.fsPath??null:null,t}}return e}}const m=r.uF?1:void 0;class p extends f{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const b={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _(e,t,n){let i,r=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=b[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function k(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.uF&&(n=n.replace(/\//g,"\\")),n}function C(e,t){const n=t?k:_;let i="",{scheme:r,authority:s,path:o,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=d,i+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),l&&(i+="#",i+=t?l:_(l,!1,!1)),i}function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}const L=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(e){return e.match(L)?e.replace(L,(e=>y(e))):e}},1352:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SimpleWorkerClient:()=>v,SimpleWorkerServer:()=>L,create:()=>w,logOnceWebWorkerWarning:()=>g});var i=n(4396),r=n(231),s=n(8894),o=n(6657),a=n(5160),l=n(601);const c=!0,h="default",u="$initialize";let d=!1;function g(e){a.HZ&&(d||(d=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class f{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.method=i,this.args=r,this.type=0}}class m{constructor(e,t,n,i){this.vsWorker=e,this.seq=t,this.res=n,this.err=i,this.type=1}}class p{constructor(e,t,n,i,r){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=i,this.arg=r,this.type=2}}class b{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class _{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class k{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const i=String(++this._lastSentReq);return new Promise(((r,s)=>{this._pendingReplies[i]={resolve:r,reject:s},this._send(new f(this._workerId,i,e,t,n))}))}listen(e,t,n){let i=null;const s=new r.vl({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new p(this._workerId,i,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new _(this._workerId,i)),i=null}});return s.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const n={get:(n,i)=>("string"!==typeof i||n[i]||(y(i)?n[i]=t=>this.listen(e,i,t):C(i)?n[i]=this.listen(e,i,void 0):36===i.charCodeAt(0)&&(n[i]=async(...n)=>(await(t?.()),this.sendMessage(e,i,n)))),n[i])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;return e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),void t.reject(n)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req,n=this._handler.handleMessage(e.channel,e.method,e.args);n.then((e=>{this._send(new m(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,i.cU)(e.detail)),this._send(new m(this._workerId,t,void 0,(0,i.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new b(this._workerId,t,e))}));this._pendingEvents.set(t,n)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let n=0;n{this._protocol.handleMessage(e)}),(e=>{(0,i.dz)(e)}))),this._protocol=new k({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)}),this._protocol.setWorkerId(this._worker.getId());let n=null;const r=globalThis.require;"undefined"!==typeof r&&"function"===typeof r.getConfig?n=r.getConfig():"undefined"!==typeof globalThis.requirejs&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(h,u,[this._worker.getId(),JSON.parse(JSON.stringify(n)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(h,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,n){const i=this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!==typeof i[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){const i=this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on main thread`);if(y(t)){const r=i[t].call(i,n);if("function"!==typeof r)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return r}if(C(t)){const n=i[t];if("function"!==typeof n)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return n}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function C(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function y(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class L{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new k({sendMessage:(t,n)=>{e(t,n)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===h&&t===u)return this.initialize(n[0],n[1],n[2]);const i=e===h?this._requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!==typeof i[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(i[t].apply(i,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){const i=e===h?this._requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(y(t)){const e=i[t].call(i,n);if("function"!==typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(C(t)){const e=i[t];if("function"!==typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,i){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){if(t&&("undefined"!==typeof t.baseUrl&&delete t["baseUrl"],"undefined"!==typeof t.paths&&"undefined"!==typeof t.paths.vs&&delete t.paths["vs"],"undefined"!==typeof t.trustedTypesPolicy&&delete t["trustedTypesPolicy"],t.catchError=!0,globalThis.require.config(t)),c){const e=o.zl.asBrowserUri(`${i}.js`).toString(!0);return n(5890)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}return new Promise(((e,t)=>{const n=globalThis.require;n([i],(n=>{this._requestHandler=n.create(this),this._requestHandler?e():t(new Error("No RequestHandler!"))}),t)}))}this._requestHandler=this._requestHandlerFactory(this)}}function w(e){return new L(e,null)}},4529:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var i=n(2647);class r{constructor(e){const t=(0,i.W)(e);this._defaultValue=t,this._asciiMap=r._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const n=(0,i.W)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}},2764:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>b,aZ:()=>p,l5:()=>C,lQ:()=>k,s7:()=>w,sH:()=>y,sN:()=>_,ss:()=>v,yI:()=>m,zp:()=>L});var i=n(1337),r=n(5476),s=n(7732),o=n(3711);const a=(0,s.x1A)("editor.lineHighlightBackground",null,i.kg("lineHighlight","Background color for the highlight of line at the cursor position.")),l=((0,s.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.b1q},i.kg("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),(0,s.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},i.kg("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("rangeHighlightBorder","Background color of the border around highlighted ranges.")),(0,s.x1A)("editor.symbolHighlightBackground",{dark:s.Ubg,light:s.Ubg,hcDark:null,hcLight:null},i.kg("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.buw,hcLight:s.buw},i.kg("symbolHighlightBorder","Background color of the border around highlighted symbols.")),(0,s.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:r.Q1.black,hcDark:r.Q1.white,hcLight:"#0F4A85"},i.kg("caret","Color of the editor cursor."))),c=(0,s.x1A)("editorCursor.background",null,i.kg("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),h=((0,s.x1A)("editorMultiCursor.primary.foreground",l,i.kg("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.primary.background",c,i.kg("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorMultiCursor.secondary.foreground",l,i.kg("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),(0,s.x1A)("editorMultiCursor.secondary.background",c,i.kg("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),(0,s.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},i.kg("editorWhitespaces","Color of whitespace characters in the editor."))),u=((0,s.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorLineNumbers","Color of editor line numbers.")),(0,s.x1A)("editorIndentGuide.background",h,i.kg("editorIndentGuides","Color of the editor indentation guides."),!1,i.kg("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead."))),d=(0,s.x1A)("editorIndentGuide.activeBackground",h,i.kg("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,i.kg("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),g=((0,s.x1A)("editorIndentGuide.background1",u,i.kg("editorIndentGuides1","Color of the editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.background2","#00000000",i.kg("editorIndentGuides2","Color of the editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.background3","#00000000",i.kg("editorIndentGuides3","Color of the editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.background4","#00000000",i.kg("editorIndentGuides4","Color of the editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.background5","#00000000",i.kg("editorIndentGuides5","Color of the editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.background6","#00000000",i.kg("editorIndentGuides6","Color of the editor indentation guides (6).")),(0,s.x1A)("editorIndentGuide.activeBackground1",d,i.kg("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),(0,s.x1A)("editorIndentGuide.activeBackground2","#00000000",i.kg("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),(0,s.x1A)("editorIndentGuide.activeBackground3","#00000000",i.kg("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),(0,s.x1A)("editorIndentGuide.activeBackground4","#00000000",i.kg("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),(0,s.x1A)("editorIndentGuide.activeBackground5","#00000000",i.kg("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),(0,s.x1A)("editorIndentGuide.activeBackground6","#00000000",i.kg("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),(0,s.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.buw,hcLight:s.buw},i.kg("editorActiveLineNumber","Color of editor active line number"),!1,i.kg("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."))),f=((0,s.x1A)("editorLineNumber.activeForeground",g,i.kg("editorActiveLineNumber","Color of editor active line number")),(0,s.x1A)("editorLineNumber.dimmedForeground",null,i.kg("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),(0,s.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:r.Q1.lightgrey,hcDark:r.Q1.white,hcLight:"#292929"},i.kg("editorRuler","Color of the editor rulers.")),(0,s.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},i.kg("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},i.kg("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.b1q,hcLight:s.b1q},i.kg("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},i.kg("editorOverviewRulerBorder","Color of the overview ruler border.")),(0,s.x1A)("editorOverviewRuler.background",null,i.kg("editorOverviewRulerBackground","Background color of the editor overview ruler.")),(0,s.x1A)("editorGutter.background",s.YtV,i.kg("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:s.b1q},i.kg("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.x1A)("editorUnnecessaryCode.opacity",{dark:r.Q1.fromHex("#000a"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),(0,s.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:r.Q1.fromHex("#fff").transparent(.8),hcLight:r.Q1.fromHex("#292929").transparent(.8)},i.kg("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.x1A)("editorGhostText.foreground",{dark:r.Q1.fromHex("#ffffff56"),light:r.Q1.fromHex("#0007"),hcDark:null,hcLight:null},i.kg("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.x1A)("editorGhostText.background",null,i.kg("editorGhostTextBackground","Background color of the ghost text in the editor.")),new r.Q1(new r.bU(0,122,204,.6))),m=((0,s.x1A)("editorOverviewRuler.rangeHighlightForeground",f,i.kg("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.x1A)("editorOverviewRuler.errorForeground",{dark:new r.Q1(new r.bU(255,18,18,.7)),light:new r.Q1(new r.bU(255,18,18,.7)),hcDark:new r.Q1(new r.bU(255,50,50,1)),hcLight:"#B5200D"},i.kg("overviewRuleError","Overview ruler marker color for errors."))),p=(0,s.x1A)("editorOverviewRuler.warningForeground",{dark:s.Hng,light:s.Hng,hcDark:s.Stt,hcLight:s.Stt},i.kg("overviewRuleWarning","Overview ruler marker color for warnings.")),b=(0,s.x1A)("editorOverviewRuler.infoForeground",{dark:s.pOz,light:s.pOz,hcDark:s.IIb,hcLight:s.IIb},i.kg("overviewRuleInfo","Overview ruler marker color for infos.")),_=(0,s.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},i.kg("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),k=(0,s.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},i.kg("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),v=(0,s.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},i.kg("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),C=(0,s.x1A)("editorBracketHighlight.foreground4","#00000000",i.kg("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),y=(0,s.x1A)("editorBracketHighlight.foreground5","#00000000",i.kg("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),L=(0,s.x1A)("editorBracketHighlight.foreground6","#00000000",i.kg("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),w=(0,s.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new r.Q1(new r.bU(255,18,18,.8)),light:new r.Q1(new r.bU(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},i.kg("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));(0,s.x1A)("editorBracketPairGuide.background1","#00000000",i.kg("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background2","#00000000",i.kg("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background3","#00000000",i.kg("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background4","#00000000",i.kg("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background5","#00000000",i.kg("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.background6","#00000000",i.kg("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground1","#00000000",i.kg("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground2","#00000000",i.kg("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground3","#00000000",i.kg("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground4","#00000000",i.kg("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground5","#00000000",i.kg("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),(0,s.x1A)("editorBracketPairGuide.activeBackground6","#00000000",i.kg("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.")),(0,s.x1A)("editorUnicodeHighlight.border",s.Hng,i.kg("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.x1A)("editorUnicodeHighlight.background",s.whs,i.kg("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));(0,o.zy)(((e,t)=>{const n=e.getColor(s.YtV),i=e.getColor(a),r=i&&!i.isTransparent()?i:n;r&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${r}; }`)}))},6627:(e,t,n)=>{"use strict";function i(e){let t=0,n=0,i=0,r=0;for(let s=0,o=e.length;si})},4544:(e,t,n)=>{"use strict";n.d(t,{M:()=>a,S:()=>l});var i=n(4396),r=n(371),s=n(8690),o=n(3654);class a{static fromRangeInclusive(e){return new a(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new l(e[0].slice());for(let n=1;nt)throw new i.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}contains(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,o.lx)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let n=0,i=0,r=null;while(n=s.startLineNumber?r=new a(r.startLineNumber,Math.max(r.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(r),r=s)}return null!==r&&t.push(r),new l(t)}subtractFrom(e){const t=(0,o.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),n=(0,o.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===n)return new l([e]);const i=[];let r=e.startLineNumber;for(let e=t;er&&i.push(new a(r,t.startLineNumber)),r=t.endLineNumberExclusive}return re.toString())).join(", ")}getIntersection(e){const t=[];let n=0,i=0;while(nt.delta(e))))}}},371:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(4396);class r{static addRange(e,t){let n=0;while(nt))return new r(e,t)}static ofLength(e){return new r(0,e)}static ofStartAndLength(e,t){return new r(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new i.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new r(this.start+e,this.endExclusive+e)}deltaStart(e){return new r(this.start+e,this.endExclusive)}deltaEnd(e){return new r(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new i.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t{"use strict";n.d(t,{y:()=>i});class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";n.d(t,{Q:()=>r});var i=n(6788);class r{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let n,i,s,o;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new r(n,i,s,o)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,o=e.endColumn;const a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,h=t.endColumn;return nc?(s=c,o=h):s===c&&(o=Math.min(o,h)),n>s||n===s&&i>o?null:new r(n,i,s,o)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new i.y(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new i.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return r.collapseToEnd(this)}static collapseToEnd(e){return new r(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new r(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},8581:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var i=n(6788),r=n(8690);class s extends r.Q{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new i.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new i.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n{"use strict";n.d(t,{W:()=>s});var i=n(6788),r=n(8690);class s{static{this.zero=new s(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new s(0,t.column-e.column):new s(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return s.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const i of e)"\n"===i?(t++,n=0):n++;return new s(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new r.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new r.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new i.y(e.lineNumber,e.column+this.columnCount):new i.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},939:(e,t,n)=>{"use strict";n.d(t,{Io:()=>l,Ld:()=>a,Th:()=>h});var i=n(5837),r=n(7806);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function o(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of s)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const a=o();function l(e){let t=a;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const c=new r.w;function h(e,t,n,r,s){if(t=l(t),s||(s=i.f.first(c)),n.length>s.maxLen){let i=e-s.maxLen/2;return i<0?i=0:r+=i,n=n.substring(i,e+s.maxLen/2),h(e,t,n,r,s)}const o=Date.now(),a=e-1-r;let d=-1,g=null;for(let e=1;;e++){if(Date.now()-o>=s.timeBudget)break;const i=a-s.windowSize*e;t.lastIndex=Math.max(0,i);const r=u(t,n,a,d);if(!r&&g)break;if(g=r,i<=0)break;d=i}if(g){const e={word:g[0],startColumn:r+1+g.index,endColumn:r+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function u(e,t,n,i){let r;while(r=e.exec(t)){const t=r.index||0;if(t<=n&&e.lastIndex>=n)return r;if(i>0&&t>i)return null}return null}c.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},4577:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});class i{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!==(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){const t=this.getForeground(e);let n="mtk"+t;const i=this.getFontStyle(e);return 1&i&&(n+=" mtki"),2&i&&(n+=" mtkb"),4&i&&(n+=" mtku"),8&i&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let r=`color: ${t[n]};`;1&i&&(r+="font-style: italic;"),2&i&&(r+="font-weight: bold;");let s="";return 4&i&&(s+=" underline"),8&i&&(s+=" line-through"),s&&(r+=`text-decoration:${s};`),r}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&n),bold:Boolean(2&n),underline:Boolean(4&n),strikethrough:Boolean(8&n)}}}},5350:(e,t,n)=>{"use strict";n.d(t,{rY:()=>p,ou:()=>m,dG:()=>L,OB:()=>w});var i=n(6455),r=(n(9133),n(231)),s=n(8894);class o{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,s.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new a(this,e,t);return this._factories.set(e,n),(0,s.s)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){const t=this.get(e);if(t)return!0;const n=this._factories.get(e);return!(n&&!n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class a extends s.jG{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var l,c,h,u,d,g,f=n(1337);class m{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class p{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}(function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"})(l||(l={})),function(e){const t=new Map;function n(e){let n=t.get(e);return n||(console.info("No codicon found for CompletionItemKind "+e),n=i.W.symbolProperty),n}t.set(0,i.W.symbolMethod),t.set(1,i.W.symbolFunction),t.set(2,i.W.symbolConstructor),t.set(3,i.W.symbolField),t.set(4,i.W.symbolVariable),t.set(5,i.W.symbolClass),t.set(6,i.W.symbolStruct),t.set(7,i.W.symbolInterface),t.set(8,i.W.symbolModule),t.set(9,i.W.symbolProperty),t.set(10,i.W.symbolEvent),t.set(11,i.W.symbolOperator),t.set(12,i.W.symbolUnit),t.set(13,i.W.symbolValue),t.set(15,i.W.symbolEnum),t.set(14,i.W.symbolConstant),t.set(15,i.W.symbolEnum),t.set(16,i.W.symbolEnumMember),t.set(17,i.W.symbolKeyword),t.set(27,i.W.symbolSnippet),t.set(18,i.W.symbolText),t.set(19,i.W.symbolColor),t.set(20,i.W.symbolFile),t.set(21,i.W.symbolReference),t.set(22,i.W.symbolCustomColor),t.set(23,i.W.symbolFolder),t.set(24,i.W.symbolTypeParameter),t.set(25,i.W.account),t.set(26,i.W.issues),e.toIcon=n;const r=new Map;function s(e,t){let n=r.get(e);return"undefined"!==typeof n||t||(n=9),n}r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26),e.fromString=s}(c||(c={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(h||(h={}));(function(e){e[e["Automatic"]=0]="Automatic",e[e["PasteAs"]=1]="PasteAs"})(u||(u={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(d||(d={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(g||(g={}));(0,f.kg)("Array","array"),(0,f.kg)("Boolean","boolean"),(0,f.kg)("Class","class"),(0,f.kg)("Constant","constant"),(0,f.kg)("Constructor","constructor"),(0,f.kg)("Enum","enumeration"),(0,f.kg)("EnumMember","enumeration member"),(0,f.kg)("Event","event"),(0,f.kg)("Field","field"),(0,f.kg)("File","file"),(0,f.kg)("Function","function"),(0,f.kg)("Interface","interface"),(0,f.kg)("Key","key"),(0,f.kg)("Method","method"),(0,f.kg)("Module","module"),(0,f.kg)("Namespace","namespace"),(0,f.kg)("Null","null"),(0,f.kg)("Number","number"),(0,f.kg)("Object","object"),(0,f.kg)("Operator","operator"),(0,f.kg)("Package","package"),(0,f.kg)("Property","property"),(0,f.kg)("String","string"),(0,f.kg)("Struct","struct"),(0,f.kg)("TypeParameter","type parameter"),(0,f.kg)("Variable","variable");var b,_,k,v,C;(function(e){const t=new Map;function n(e){let n=t.get(e);return n||(console.info("No codicon found for SymbolKind "+e),n=i.W.symbolProperty),n}t.set(0,i.W.symbolFile),t.set(1,i.W.symbolModule),t.set(2,i.W.symbolNamespace),t.set(3,i.W.symbolPackage),t.set(4,i.W.symbolClass),t.set(5,i.W.symbolMethod),t.set(6,i.W.symbolProperty),t.set(7,i.W.symbolField),t.set(8,i.W.symbolConstructor),t.set(9,i.W.symbolEnum),t.set(10,i.W.symbolInterface),t.set(11,i.W.symbolFunction),t.set(12,i.W.symbolVariable),t.set(13,i.W.symbolConstant),t.set(14,i.W.symbolString),t.set(15,i.W.symbolNumber),t.set(16,i.W.symbolBoolean),t.set(17,i.W.symbolArray),t.set(18,i.W.symbolObject),t.set(19,i.W.symbolKey),t.set(20,i.W.symbolNull),t.set(21,i.W.symbolEnumMember),t.set(22,i.W.symbolStruct),t.set(23,i.W.symbolEvent),t.set(24,i.W.symbolOperator),t.set(25,i.W.symbolTypeParameter),e.toIcon=n})(b||(b={}));class y{static{this.Comment=new y("comment")}static{this.Imports=new y("imports")}static{this.Region=new y("region")}static fromValue(e){switch(e){case"comment":return y.Comment;case"imports":return y.Imports;case"region":return y.Region}return new y(e)}constructor(e){this.value=e}}(function(e){e[e["AIGenerated"]=1]="AIGenerated"})(_||(_={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(k||(k={})),function(e){function t(e){return!(!e||"object"!==typeof e)&&("string"===typeof e.id&&"string"===typeof e.title)}e.is=t}(v||(v={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(C||(C={}));const L=new o,w=new o;var S;(function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"})(S||(S={}))},4573:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var i=n(7778);const r=(0,i.u1)("languageService")},5764:(e,t,n)=>{"use strict";n.d(t,{W6:()=>h,vH:()=>u});var i=n(1337),r=n(231),s=n(6374),o=n(3911),a=n(7503);const l={ModesRegistry:"editor.modesRegistry"};class c{constructor(){this._onDidChangeLanguages=new r.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t{"use strict";n.d(t,{A5:()=>i,Dg:()=>l,F4:()=>d,L5:()=>u,Wo:()=>h,X2:()=>a,ZS:()=>r,nk:()=>c,vd:()=>g});var i,r,s,o=n(5603);(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(i||(i={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(r||(r={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(s||(s={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,o.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"===typeof e.read}class h{constructor(e,t,n,i,r,s){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=r,this._isTracked=s}}class u{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class d{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},2773:(e,t,n)=>{"use strict";n.d(t,{lt:()=>g,W5:()=>C,hB:()=>b,dr:()=>m,wC:()=>v});var i=n(601),r=n(1553),s=n(4529);class o extends s.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let t=0,n=e.length;tt)break;n=i}return n}findNextIntlWordAtOrAfterOffset(e,t){for(const n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index=0;let t=null;try{t=i.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new u.L5(t,this.wordSeparators?l(this.wordSeparators,[]):null,n?this.searchString:null)}}function f(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t=n)break;const i=e.charCodeAt(t);if(110===i||114===i||87===i)return!0}}return!1}function m(e,t,n){if(!n)return new u.Dg(e,null);const i=[];for(let e=0,n=t.length;e=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1}}class b{static findMatches(e,t,n,i,r){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,n,new C(s.wordSeparators,s.regex),i,r):this._doFindMatchesLineByLine(e,n,s,i,r):[]}static _getMultilineMatchRange(e,t,n,i,r,s){let o,a,l=0;if(i?(l=i.findLineFeedCountBeforeOffset(r),o=t+r+l):o=t+r,i){const e=i.findLineFeedCountBeforeOffset(r+s.length),t=e-l;a=o+s.length+t}else a=o+s.length;const c=e.getPositionAt(o),u=e.getPositionAt(a);return new h.Q(c.lineNumber,c.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,n,i,r){const s=e.getOffsetAt(t.getStartPosition()),o=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new p(o):null,l=[];let c,h=0;n.reset(0);while(c=n.next(o))if(l[h++]=m(this._getMultilineMatchRange(e,s,o,a,c.index,c[0]),c,i),h>=r)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,r){const s=[];let o=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);o=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,o,s,i,r);for(let a=t.startLineNumber+1;a=a))return r;return r}const c=new C(e.wordSeparators,e.regex);let d;c.reset(0);do{if(d=c.next(t),d&&(s[r++]=m(new h.Q(n,d.index+1+i,n,d.index+1+d[0].length+i),d,o),r>=a))return r}while(d);return r}static findNextMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new C(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,s,i):this._doFindNextMatchLineByLine(e,n,s,i)}static _doFindNextMatchMultiline(e,t,n,i){const r=new c.y(t.lineNumber,1),s=e.getOffsetAt(r),o=e.getLineCount(),a=e.getValueInRange(new h.Q(r.lineNumber,r.column,o,e.getLineMaxColumn(o)),1),l="\r\n"===e.getEOL()?new p(a):null;n.reset(t.column-1);const u=n.next(a);return u?m(this._getMultilineMatchRange(e,s,a,l,u.index,u[0]),u,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new c.y(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s),a=this._findFirstMatchInLine(n,o,s,t.column,i);if(a)return a;for(let t=1;t<=r;t++){const o=(s+t-1)%r,a=e.getLineContent(o+1),l=this._findFirstMatchInLine(n,a,o+1,1,i);if(l)return l}return null}static _findFirstMatchInLine(e,t,n,i,r){e.reset(i-1);const s=e.next(t);return s?m(new h.Q(n,s.index+1,n,s.index+1+s[0].length),s,r):null}static findPreviousMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const s=new C(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,s,i):this._doFindPreviousMatchLineByLine(e,n,s,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const r=this._doFindMatchesMultiline(e,new h.Q(1,1,t.lineNumber,t.column),n,i,10*d);if(r.length>0)return r[r.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new c.y(s,e.getLineMaxColumn(s)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const r=e.getLineCount(),s=t.lineNumber,o=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(n,o,s,i);if(a)return a;for(let t=1;t<=r;t++){const o=(r+s-t-1)%r,a=e.getLineContent(o+1),l=this._findLastMatchInLine(n,a,o+1,i);if(l)return l}return null}static _findLastMatchInLine(e,t,n,i){let r,s=null;e.reset(0);while(r=e.next(t))s=m(new h.Q(n,r.index+1,n,r.index+1+r[0].length),r,i);return s}}function _(e,t,n,i,r){if(0===i)return!0;const s=t.charCodeAt(i-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}function k(e,t,n,i,r){if(i+r===n)return!0;const s=t.charCodeAt(i+r);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(r>0){const n=t.charCodeAt(i+r-1);if(0!==e.get(n))return!0}return!1}function v(e,t,n,i,r){return _(e,t,n,i,r)&&k(e,t,n,i,r)}class C{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const r=n.index,s=n[0].length;if(r===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){i.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=s,!this._wordSeparators||v(this._wordSeparators,e,t,r,s))return n}while(n);return null}}},215:(e,t,n)=>{"use strict";n.r(t),n.d(t,{KeyMod:()=>me,createMonacoBaseAPI:()=>pe});var i=n(7792),r=n(231);class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new s,a=new s,l=new s,c=new Array(230),h={},u=[],d=Object.create(null),g=Object.create(null),f=[],m=[];for(let e=0;e<=193;e++)f[e]=-1;for(let e=0;e<=132;e++)m[e]=-1;var p;function b(e,t){const n=(65535&t)<<16>>>0;return(e|n)>>>0}(function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],i=[];for(const e of t){const[t,r,s,p,b,_,k,v,C]=e;if(i[r]||(i[r]=!0,u[r]=s,d[s]=r,g[s.toLowerCase()]=r,t&&(f[r]=p,0!==p&&3!==p&&5!==p&&4!==p&&6!==p&&57!==p&&(m[p]=r))),!n[p]){if(n[p]=!0,!b)throw new Error(`String representation missing for key code ${p} around scan code ${s}`);o.define(p,b),a.define(p,v||b),l.define(p,C||v||b)}_&&(c[_]=p),k&&(h[k]=p)}m[3]=46})(),function(e){function t(e){return o.keyCodeToStr(e)}function n(e){return o.strToKeyCode(e)}function i(e){return a.keyCodeToStr(e)}function r(e){return l.keyCodeToStr(e)}function s(e){return a.strToKeyCode(e)||l.strToKeyCode(e)}function c(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=i,e.toUserSettingsGeneral=r,e.fromUserSettings=s,e.toElectronAccelerator=c}(p||(p={}));var _,k,v,C,y,L,w,S,x,E,N,T,A,I,O,M,D,R,B,F,P,V,z,j,q,W,U,$,H,K,G,Q,J,X,Y,Z,ee,te,ne,ie,re,se,oe,ae,le,ce,he=n(9133),ue=n(6788),de=n(8690),ge=n(8581),fe=n(5350);(function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"})(_||(_={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["Auto"]=2]="Auto"}(k||(k={})),function(e){e[e["None"]=0]="None",e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(v||(v={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(C||(C={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(y||(y={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(L||(L={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(w||(w={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(S||(S={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(x||(x={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(E||(E={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(N||(N={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["ariaRequired"]=5]="ariaRequired",e[e["autoClosingBrackets"]=6]="autoClosingBrackets",e[e["autoClosingComments"]=7]="autoClosingComments",e[e["screenReaderAnnounceInlineSuggestion"]=8]="screenReaderAnnounceInlineSuggestion",e[e["autoClosingDelete"]=9]="autoClosingDelete",e[e["autoClosingOvertype"]=10]="autoClosingOvertype",e[e["autoClosingQuotes"]=11]="autoClosingQuotes",e[e["autoIndent"]=12]="autoIndent",e[e["automaticLayout"]=13]="automaticLayout",e[e["autoSurround"]=14]="autoSurround",e[e["bracketPairColorization"]=15]="bracketPairColorization",e[e["guides"]=16]="guides",e[e["codeLens"]=17]="codeLens",e[e["codeLensFontFamily"]=18]="codeLensFontFamily",e[e["codeLensFontSize"]=19]="codeLensFontSize",e[e["colorDecorators"]=20]="colorDecorators",e[e["colorDecoratorsLimit"]=21]="colorDecoratorsLimit",e[e["columnSelection"]=22]="columnSelection",e[e["comments"]=23]="comments",e[e["contextmenu"]=24]="contextmenu",e[e["copyWithSyntaxHighlighting"]=25]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=26]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=27]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=28]="cursorStyle",e[e["cursorSurroundingLines"]=29]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=30]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=31]="cursorWidth",e[e["disableLayerHinting"]=32]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=33]="disableMonospaceOptimizations",e[e["domReadOnly"]=34]="domReadOnly",e[e["dragAndDrop"]=35]="dragAndDrop",e[e["dropIntoEditor"]=36]="dropIntoEditor",e[e["emptySelectionClipboard"]=37]="emptySelectionClipboard",e[e["experimentalWhitespaceRendering"]=38]="experimentalWhitespaceRendering",e[e["extraEditorClassName"]=39]="extraEditorClassName",e[e["fastScrollSensitivity"]=40]="fastScrollSensitivity",e[e["find"]=41]="find",e[e["fixedOverflowWidgets"]=42]="fixedOverflowWidgets",e[e["folding"]=43]="folding",e[e["foldingStrategy"]=44]="foldingStrategy",e[e["foldingHighlight"]=45]="foldingHighlight",e[e["foldingImportsByDefault"]=46]="foldingImportsByDefault",e[e["foldingMaximumRegions"]=47]="foldingMaximumRegions",e[e["unfoldOnClickAfterEndOfLine"]=48]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=49]="fontFamily",e[e["fontInfo"]=50]="fontInfo",e[e["fontLigatures"]=51]="fontLigatures",e[e["fontSize"]=52]="fontSize",e[e["fontWeight"]=53]="fontWeight",e[e["fontVariations"]=54]="fontVariations",e[e["formatOnPaste"]=55]="formatOnPaste",e[e["formatOnType"]=56]="formatOnType",e[e["glyphMargin"]=57]="glyphMargin",e[e["gotoLocation"]=58]="gotoLocation",e[e["hideCursorInOverviewRuler"]=59]="hideCursorInOverviewRuler",e[e["hover"]=60]="hover",e[e["inDiffEditor"]=61]="inDiffEditor",e[e["inlineSuggest"]=62]="inlineSuggest",e[e["inlineEdit"]=63]="inlineEdit",e[e["letterSpacing"]=64]="letterSpacing",e[e["lightbulb"]=65]="lightbulb",e[e["lineDecorationsWidth"]=66]="lineDecorationsWidth",e[e["lineHeight"]=67]="lineHeight",e[e["lineNumbers"]=68]="lineNumbers",e[e["lineNumbersMinChars"]=69]="lineNumbersMinChars",e[e["linkedEditing"]=70]="linkedEditing",e[e["links"]=71]="links",e[e["matchBrackets"]=72]="matchBrackets",e[e["minimap"]=73]="minimap",e[e["mouseStyle"]=74]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=75]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=76]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=77]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=78]="multiCursorModifier",e[e["multiCursorPaste"]=79]="multiCursorPaste",e[e["multiCursorLimit"]=80]="multiCursorLimit",e[e["occurrencesHighlight"]=81]="occurrencesHighlight",e[e["overviewRulerBorder"]=82]="overviewRulerBorder",e[e["overviewRulerLanes"]=83]="overviewRulerLanes",e[e["padding"]=84]="padding",e[e["pasteAs"]=85]="pasteAs",e[e["parameterHints"]=86]="parameterHints",e[e["peekWidgetDefaultFocus"]=87]="peekWidgetDefaultFocus",e[e["placeholder"]=88]="placeholder",e[e["definitionLinkOpensInPeek"]=89]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=90]="quickSuggestions",e[e["quickSuggestionsDelay"]=91]="quickSuggestionsDelay",e[e["readOnly"]=92]="readOnly",e[e["readOnlyMessage"]=93]="readOnlyMessage",e[e["renameOnType"]=94]="renameOnType",e[e["renderControlCharacters"]=95]="renderControlCharacters",e[e["renderFinalNewline"]=96]="renderFinalNewline",e[e["renderLineHighlight"]=97]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=98]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=99]="renderValidationDecorations",e[e["renderWhitespace"]=100]="renderWhitespace",e[e["revealHorizontalRightPadding"]=101]="revealHorizontalRightPadding",e[e["roundedSelection"]=102]="roundedSelection",e[e["rulers"]=103]="rulers",e[e["scrollbar"]=104]="scrollbar",e[e["scrollBeyondLastColumn"]=105]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=106]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=107]="scrollPredominantAxis",e[e["selectionClipboard"]=108]="selectionClipboard",e[e["selectionHighlight"]=109]="selectionHighlight",e[e["selectOnLineNumbers"]=110]="selectOnLineNumbers",e[e["showFoldingControls"]=111]="showFoldingControls",e[e["showUnused"]=112]="showUnused",e[e["snippetSuggestions"]=113]="snippetSuggestions",e[e["smartSelect"]=114]="smartSelect",e[e["smoothScrolling"]=115]="smoothScrolling",e[e["stickyScroll"]=116]="stickyScroll",e[e["stickyTabStops"]=117]="stickyTabStops",e[e["stopRenderingLineAfter"]=118]="stopRenderingLineAfter",e[e["suggest"]=119]="suggest",e[e["suggestFontSize"]=120]="suggestFontSize",e[e["suggestLineHeight"]=121]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=122]="suggestOnTriggerCharacters",e[e["suggestSelection"]=123]="suggestSelection",e[e["tabCompletion"]=124]="tabCompletion",e[e["tabIndex"]=125]="tabIndex",e[e["unicodeHighlighting"]=126]="unicodeHighlighting",e[e["unusualLineTerminators"]=127]="unusualLineTerminators",e[e["useShadowDOM"]=128]="useShadowDOM",e[e["useTabStops"]=129]="useTabStops",e[e["wordBreak"]=130]="wordBreak",e[e["wordSegmenterLocales"]=131]="wordSegmenterLocales",e[e["wordSeparators"]=132]="wordSeparators",e[e["wordWrap"]=133]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=134]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=135]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=136]="wordWrapColumn",e[e["wordWrapOverride1"]=137]="wordWrapOverride1",e[e["wordWrapOverride2"]=138]="wordWrapOverride2",e[e["wrappingIndent"]=139]="wrappingIndent",e[e["wrappingStrategy"]=140]="wrappingStrategy",e[e["showDeprecated"]=141]="showDeprecated",e[e["inlayHints"]=142]="inlayHints",e[e["editorClassName"]=143]="editorClassName",e[e["pixelRatio"]=144]="pixelRatio",e[e["tabFocusMode"]=145]="tabFocusMode",e[e["layoutInfo"]=146]="layoutInfo",e[e["wrappingInfo"]=147]="wrappingInfo",e[e["defaultColorDecorators"]=148]="defaultColorDecorators",e[e["colorDecoratorsActivatedOn"]=149]="colorDecoratorsActivatedOn",e[e["inlineCompletionsAccessibilityVerbose"]=150]="inlineCompletionsAccessibilityVerbose"}(T||(T={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(A||(A={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(I||(I={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=3]="Right"}(O||(O={})),function(e){e[e["Increase"]=0]="Increase",e[e["Decrease"]=1]="Decrease"}(M||(M={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(D||(D={})),function(e){e[e["Both"]=0]="Both",e[e["Right"]=1]="Right",e[e["Left"]=2]="Left",e[e["None"]=3]="None"}(R||(R={})),function(e){e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(B||(B={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(F||(F={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(P||(P={})),function(e){e[e["DependsOnKbLayout"]=-1]="DependsOnKbLayout",e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["Digit0"]=21]="Digit0",e[e["Digit1"]=22]="Digit1",e[e["Digit2"]=23]="Digit2",e[e["Digit3"]=24]="Digit3",e[e["Digit4"]=25]="Digit4",e[e["Digit5"]=26]="Digit5",e[e["Digit6"]=27]="Digit6",e[e["Digit7"]=28]="Digit7",e[e["Digit8"]=29]="Digit8",e[e["Digit9"]=30]="Digit9",e[e["KeyA"]=31]="KeyA",e[e["KeyB"]=32]="KeyB",e[e["KeyC"]=33]="KeyC",e[e["KeyD"]=34]="KeyD",e[e["KeyE"]=35]="KeyE",e[e["KeyF"]=36]="KeyF",e[e["KeyG"]=37]="KeyG",e[e["KeyH"]=38]="KeyH",e[e["KeyI"]=39]="KeyI",e[e["KeyJ"]=40]="KeyJ",e[e["KeyK"]=41]="KeyK",e[e["KeyL"]=42]="KeyL",e[e["KeyM"]=43]="KeyM",e[e["KeyN"]=44]="KeyN",e[e["KeyO"]=45]="KeyO",e[e["KeyP"]=46]="KeyP",e[e["KeyQ"]=47]="KeyQ",e[e["KeyR"]=48]="KeyR",e[e["KeyS"]=49]="KeyS",e[e["KeyT"]=50]="KeyT",e[e["KeyU"]=51]="KeyU",e[e["KeyV"]=52]="KeyV",e[e["KeyW"]=53]="KeyW",e[e["KeyX"]=54]="KeyX",e[e["KeyY"]=55]="KeyY",e[e["KeyZ"]=56]="KeyZ",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["F20"]=78]="F20",e[e["F21"]=79]="F21",e[e["F22"]=80]="F22",e[e["F23"]=81]="F23",e[e["F24"]=82]="F24",e[e["NumLock"]=83]="NumLock",e[e["ScrollLock"]=84]="ScrollLock",e[e["Semicolon"]=85]="Semicolon",e[e["Equal"]=86]="Equal",e[e["Comma"]=87]="Comma",e[e["Minus"]=88]="Minus",e[e["Period"]=89]="Period",e[e["Slash"]=90]="Slash",e[e["Backquote"]=91]="Backquote",e[e["BracketLeft"]=92]="BracketLeft",e[e["Backslash"]=93]="Backslash",e[e["BracketRight"]=94]="BracketRight",e[e["Quote"]=95]="Quote",e[e["OEM_8"]=96]="OEM_8",e[e["IntlBackslash"]=97]="IntlBackslash",e[e["Numpad0"]=98]="Numpad0",e[e["Numpad1"]=99]="Numpad1",e[e["Numpad2"]=100]="Numpad2",e[e["Numpad3"]=101]="Numpad3",e[e["Numpad4"]=102]="Numpad4",e[e["Numpad5"]=103]="Numpad5",e[e["Numpad6"]=104]="Numpad6",e[e["Numpad7"]=105]="Numpad7",e[e["Numpad8"]=106]="Numpad8",e[e["Numpad9"]=107]="Numpad9",e[e["NumpadMultiply"]=108]="NumpadMultiply",e[e["NumpadAdd"]=109]="NumpadAdd",e[e["NUMPAD_SEPARATOR"]=110]="NUMPAD_SEPARATOR",e[e["NumpadSubtract"]=111]="NumpadSubtract",e[e["NumpadDecimal"]=112]="NumpadDecimal",e[e["NumpadDivide"]=113]="NumpadDivide",e[e["KEY_IN_COMPOSITION"]=114]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=115]="ABNT_C1",e[e["ABNT_C2"]=116]="ABNT_C2",e[e["AudioVolumeMute"]=117]="AudioVolumeMute",e[e["AudioVolumeUp"]=118]="AudioVolumeUp",e[e["AudioVolumeDown"]=119]="AudioVolumeDown",e[e["BrowserSearch"]=120]="BrowserSearch",e[e["BrowserHome"]=121]="BrowserHome",e[e["BrowserBack"]=122]="BrowserBack",e[e["BrowserForward"]=123]="BrowserForward",e[e["MediaTrackNext"]=124]="MediaTrackNext",e[e["MediaTrackPrevious"]=125]="MediaTrackPrevious",e[e["MediaStop"]=126]="MediaStop",e[e["MediaPlayPause"]=127]="MediaPlayPause",e[e["LaunchMediaPlayer"]=128]="LaunchMediaPlayer",e[e["LaunchMail"]=129]="LaunchMail",e[e["LaunchApp2"]=130]="LaunchApp2",e[e["Clear"]=131]="Clear",e[e["MAX_VALUE"]=132]="MAX_VALUE"}(V||(V={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(z||(z={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(j||(j={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(q||(q={})),function(e){e[e["Normal"]=1]="Normal",e[e["Underlined"]=2]="Underlined"}(W||(W={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(U||(U={})),function(e){e[e["AIGenerated"]=1]="AIGenerated"}($||($={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["Automatic"]=1]="Automatic"}(H||(H={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(K||(K={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(G||(G={})),function(e){e[e["Word"]=0]="Word",e[e["Line"]=1]="Line",e[e["Suggest"]=2]="Suggest"}(Q||(Q={})),function(e){e[e["Left"]=0]="Left",e[e["Right"]=1]="Right",e[e["None"]=2]="None",e[e["LeftOfInjectedText"]=3]="LeftOfInjectedText",e[e["RightOfInjectedText"]=4]="RightOfInjectedText"}(J||(J={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(X||(X={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(Y||(Y={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(Z||(Z={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(ee||(ee={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(te||(te={})),function(e){e["Off"]="off",e["OnCode"]="onCode",e["On"]="on"}(ne||(ne={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(ie||(ie={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(re||(re={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(se||(se={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(oe||(oe={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(ae||(ae={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(le||(le={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(ce||(ce={}));class me{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return b(e,t)}}function pe(){return{editor:void 0,languages:void 0,CancellationTokenSource:i.Qi,Emitter:r.vl,KeyCode:V,KeyMod:me,Position:ue.y,Range:de.Q,Selection:ge.L,SelectionDirection:te,MarkerSeverity:z,MarkerTag:j,Uri:he.r,Token:fe.ou}}},5926:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseEditorSimpleWorker:()=>it,EditorSimpleWorker:()=>rt,create:()=>st});class i{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var r=n(5647);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,s]=h._getElements(e),[o,a,l]=h._getElements(t);this._hasStrings=s&&l,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=o,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(h._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n=e&&r>=n&&this.ElementsAreEqual(t,r))t--,r--;if(e>t||n>r){let s;return n<=r?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,r-n+1)]):e<=t?(a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,r,o,l,s),h=o[0],u=l[0];if(null!==c)return c;if(!s[0]){const o=this.ComputeDiffRecursive(e,h,n,u,s);let a=[];return a=s[0]?[new i(h+1,t-(h+1)+1,u+1,r-(u+1)+1)]:this.ComputeDiffRecursive(h+1,t,u+1,r,s),this.ConcatenateChanges(o,a)}return[new i(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,s,o,a,l,h,u,d,g,f,m,p,b,_,k){let v=null,C=null,y=new c,L=t,w=n,S=f[0]-b[0]-r,x=-1073741824,E=this.m_forwardHistory.length-1;do{const t=S+e;t===L||t=0&&(h=this.m_forwardHistory[E],e=h[0],L=1,w=h.length-1)}while(--E>=-1);if(v=y.getReverseChanges(),k[0]){let e=f[0]+1,t=b[0]+1;if(null!==v&&v.length>0){const n=v[v.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}C=[new i(e,g-e+1,t,p-t+1)]}else{y=new c,L=o,w=a,S=f[0]-b[0]-l,x=1073741824,E=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+s;e===L||e=u[e+1]?(d=u[e+1]-1,m=d-S-l,d>x&&y.MarkNextChange(),x=d+1,y.AddOriginalElement(d+1,m+1),S=e+1-s):(d=u[e-1],m=d-S-l,d>x&&y.MarkNextChange(),x=d,y.AddModifiedElement(d+1,m+1),S=e-1-s),E>=0&&(u=this.m_reverseHistory[E],s=u[0],L=1,w=u.length-1)}while(--E>=-1);C=y.getChanges()}return this.ConcatenateChanges(v,C)}ComputeRecursionPoint(e,t,n,r,s,o,a){let c=0,h=0,u=0,d=0,g=0,f=0;e--,n--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(r-n),p=m+1,b=new Int32Array(p),_=new Int32Array(p),k=r-n,v=t-e,C=e-n,y=t-r,L=v-k,w=L%2===0;b[k]=e,_[v]=t,a[0]=!1;for(let L=1;L<=m/2+1;L++){let m=0,S=0;u=this.ClipDiagonalBound(k-L,L,k,p),d=this.ClipDiagonalBound(k+L,L,k,p);for(let e=u;e<=d;e+=2){c=e===u||em+S&&(m=c,S=h),!w&&Math.abs(e-v)<=L-1&&c>=_[e])return s[0]=c,o[0]=h,n<=_[e]&&L<=1448?this.WALKTRACE(k,u,d,C,v,g,f,y,b,_,c,t,s,h,r,o,w,a):null}const x=(m-e+(S-n)-L)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,x))return a[0]=!0,s[0]=m,o[0]=S,x>0&&L<=1448?this.WALKTRACE(k,u,d,C,v,g,f,y,b,_,c,t,s,h,r,o,w,a):(e++,n++,[new i(e,t-e+1,n,r-n+1)]);g=this.ClipDiagonalBound(v-L,L,v,p),f=this.ClipDiagonalBound(v+L,L,v,p);for(let i=g;i<=f;i+=2){c=i===g||i=_[i+1]?_[i+1]-1:_[i-1],h=c-(i-v)-y;const l=c;while(c>e&&h>n&&this.ElementsAreEqual(c,h))c--,h--;if(_[i]=c,w&&Math.abs(i-k)<=L&&c<=b[i])return s[0]=c,o[0]=h,l>=b[i]&&L<=1448?this.WALKTRACE(k,u,d,C,v,g,f,y,b,_,c,t,s,h,r,o,w,a):null}if(L<=1447){let e=new Int32Array(d-u+2);e[0]=k-u+1,l.Copy2(b,u,e,1,d-u+1),this.m_forwardHistory.push(e),e=new Int32Array(f-g+2),e[0]=v-g+1,l.Copy2(_,g,e,1,f-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(k,u,d,C,v,g,f,y,b,_,c,t,s,h,r,o,w,a)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;while(n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,r=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,r=n.modifiedStart+n.modifiedLength}const s=n.originalLength>0,o=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,c=n.modifiedStart-e;if(tl&&(l=u,a=e)}n.originalStart-=a,n.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t0&&n>a&&(a=n,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){const r=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,i)?1:0;return r+s}ConcatenateChanges(e,t){const n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return l.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],l.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return l.Copy(e,0,n,0,e.length),l.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(r,s,o,a),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&et&&(t=s),r>n&&(n=r),o>n&&(n=o)}t++,n++;const i=new g(n,t,0);for(let t=0,n=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let m=null;function p(){return null===m&&(m=new f([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),m}let b=null;function _(){if(null===b){b=new d.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;ti);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(s);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&s--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:s+2},url:t.substring(i,s+1)}}static computeLinks(e,t=p()){const n=_(),i=[];for(let r=1,s=e.getLineCount();r<=s;r++){const s=e.getLineContent(r),o=s.length;let a=0,l=0,c=0,h=1,u=!1,d=!1,g=!1,f=!1;while(a=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}var y=n(215),L=n(2899),w=n(4240),S=n(7412);class x{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class E{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}var N=n(4396),T=n(4544),A=n(6788),I=n(9109),O=n(371);n(3904);class M{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}class D{static inverse(e,t,n){const i=[];let r=1,s=1;for(const t of e){const e=new D(new T.M(r,t.original.startLineNumber),new T.M(s,t.modified.startLineNumber));e.modified.isEmpty||i.push(e),r=t.original.endLineNumberExclusive,s=t.modified.endLineNumberExclusive}const o=new D(new T.M(r,t+1),new T.M(s,n+1));return o.modified.isEmpty||i.push(o),i}static clip(e,t,n){const i=[];for(const r of e){const e=r.original.intersect(t),s=r.modified.intersect(n);e&&!e.isEmpty&&s&&!s.isEmpty&&i.push(new D(e,s))}return i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new D(this.modified,this.original)}join(e){return new D(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new P(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new N.D7("not a valid diff");return new P(new u.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new u.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new P(new u.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new u.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(B(this.original.endLineNumberExclusive,e)&&B(this.modified.endLineNumberExclusive,t))return new P(new u.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new u.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new P(u.Q.fromPositions(new A.y(this.original.startLineNumber,1),R(new A.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),u.Q.fromPositions(new A.y(this.modified.startLineNumber,1),R(new A.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new P(u.Q.fromPositions(R(new A.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),R(new A.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),u.Q.fromPositions(R(new A.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),R(new A.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new N.D7}}function R(e,t){if(e.lineNumber<1)return new A.y(1,1);if(e.lineNumber>t.length)return new A.y(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new A.y(e.lineNumber,n.length+1):e}function B(e,t){return e>=1&&e<=t.length}class F extends D{static fromRangeMappings(e){const t=T.M.join(e.map((e=>T.M.fromRangeInclusive(e.originalRange)))),n=T.M.join(e.map((e=>T.M.fromRangeInclusive(e.modifiedRange))));return new F(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new F(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new F(this.original,this.modified,[this.toRangeMapping()])}}class P{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new P(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new M(this.originalRange,t)}}var V=n(601);const z=3;class j{computeDiff(e,t,n){const i=new G(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}),r=i.computeDiff(),s=[];let o=null;for(const e of r.changes){let t,n;t=0===e.originalEndLineNumber?new T.M(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new T.M(e.originalStartLineNumber,e.originalEndLineNumber+1),n=0===e.modifiedEndLineNumber?new T.M(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new T.M(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let i=new F(t,n,e.charChanges?.map((e=>new P(new u.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new u.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));o&&(o.modified.endLineNumberExclusive!==i.modified.startLineNumber&&o.original.endLineNumberExclusive!==i.original.startLineNumber||(i=new F(o.original.join(i.original),o.modified.join(i.modified),o.innerChanges&&i.innerChanges?o.innerChanges.concat(i.innerChanges):void 0),s.pop())),s.push(i),o=i}return(0,I.Ft)((()=>(0,I.Xo)(s,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class ${constructor(e,t,n,i,r,s,o,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=s,this.modifiedEndLineNumber=o,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){const i=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),c=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new $(i,r,s,o,a,l,c,h)}}function H(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,r=e.length;i0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const s=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=q(s,a,r,!0).changes;o&&(e=H(e)),u=[];for(let t=0,n=e.length;t1&&o>1){const i=e.charCodeAt(n-2),r=t.charCodeAt(o-2);if(i!==r)break;n--,o--}(n>1||o>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,n,s+1,1,o)}{let n=J(e,1),o=J(t,1);const a=e.length+1,l=t.length+1;while(n!0;const t=Date.now();return()=>Date.now()-t{n.push(ee.fromOffsetPairs(e?e.getEndExclusives():te.zero,i?i.getStarts():new te(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),n}static fromOffsetPairs(e,t){return new ee(new O.L(e.offset1,t.offset1),new O.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new N.D7("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new ee(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new ee(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new ee(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new ee(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new ee(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(t&&n)return new ee(t,n)}getStarts(){return new te(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new te(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class te{static{this.zero=new te(0,0)}static{this.max=new te(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new te(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class ne{static{this.instance=new ne}isValid(){return!0}}class ie{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new N.D7("timeout must be positive")}isValid(){const e=Date.now()-this.startTime0&&l>0&&3===s.get(a-1,l-1)&&(u+=o.get(a-1,l-1)),u+=i?i(a,l):1):u=-1;const d=Math.max(c,h,u);if(d===u){const e=a>0&&l>0?o.get(a-1,l-1):0;o.set(a,l,e+1),s.set(a,l,3)}else d===c?(o.set(a,l,0),s.set(a,l,1)):d===h&&(o.set(a,l,0),s.set(a,l,2));r.set(a,l,d)}const a=[];let l=e.length,c=t.length;function h(e,t){e+1===l&&t+1===c||a.push(new ee(new O.L(e+1,l),new O.L(t+1,c))),l=e,c=t}let u=e.length-1,d=t.length-1;while(u>=0&&d>=0)3===s.get(u,d)?(h(u,d),u--,d--):1===s.get(u,d)?u--:d--;return h(-1,-1),a.reverse(),new Z(a,!1)}}class le{compute(e,t,n=ne.instance){if(0===e.length||0===t.length)return Z.trivial(e,t);const i=e,r=t;function s(e,t){while(ei.length||d>r.length)continue;const g=s(u,d);a.set(c,g);const f=u===o?l.get(c+1):l.get(c-1);if(l.set(c,g!==u?new ce(f,u,d,g-u):f),a.get(c)===i.length&&a.get(c)-c===r.length)break e}}let h=l.get(c);const u=[];let d=i.length,g=r.length;while(1){const e=h?h.x+h.length:0,t=h?h.y+h.length:0;if(e===d&&t===g||u.push(new ee(new O.L(e,d),new O.L(t,g))),!h)break;d=h.x,g=h.y,h=h.prev}return u.reverse(),new Z(u,!1)}}class ce{constructor(e,t,n,i){this.prev=e,this.x=t,this.y=n,this.length=i}}class he{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class ue{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var de=n(3654),ge=n(1553);class fe{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let i=e[t-1],r=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(r=this.range.startColumn-1,i=i.substring(r)),this.lineStartOffsets.push(r);let s=0;if(!n){const e=i.trimStart();s=i.length-e.length,i=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);const o=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-r-s,i.length):i.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=_e(e>0?this.elements[e-1]:-1),n=_e(et<=e)),i=e-this.firstElementOffsetByLineIdx[n];return new A.y(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+i+(0===i&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?u.Q.fromPositions(n,n):u.Q.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!me(this.elements[e]))return;let t=e;while(t>0&&me(this.elements[t-1]))t--;let n=e;while(nt<=e.start))??0,n=(0,de.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new O.L(t,n)}}function me(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const pe={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function be(e){return pe[e]}function _e(e){return 10===e?8:13===e?7:se(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function ke(e,t,n,i,r,s){let{moves:o,excludedChanges:a}=Ce(e,t,n,s);if(!s.isValid())return[];const l=e.filter((e=>!a.has(e))),c=ye(l,i,r,t,n,s);return(0,Y.E4)(o,c),o=we(o),o=o.filter((e=>{const n=e.original.toOffsetRange().slice(t).map((e=>e.trim())),i=n.join("\n");return i.length>=15&&ve(n,(e=>e.length>=2))>=2})),o=Se(e,o),o}function ve(e,t){let n=0;for(const i of e)t(i)&&n++;return n}function Ce(e,t,n,i){const r=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new oe(e.original,t,e))),o=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new oe(e.modified,n,e)))),a=new Set;for(const e of s){let t,n=-1;for(const i of o){const r=e.computeSimilarity(i);r>n&&(n=r,t=i)}if(n>.9&&t&&(o.delete(t),r.push(new D(e.range,t.range)),a.add(e.source),a.add(t.source)),!i.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}function ye(e,t,n,i,r,s){const o=[],a=new ge.db;for(const n of e)for(let e=n.original.startLineNumber;ee.modified.startLineNumber),Y.U9));for(const t of e){let e=[];for(let i=t.modified.startLineNumber;i{for(const n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===r.endLineNumberExclusive)return n.originalLineRange=new T.M(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new T.M(n.modifiedLineRange.startLineNumber,r.endLineNumberExclusive),void s.push(n);const n={modifiedLineRange:r,originalLineRange:t};l.push(n),s.push(n)})),e=s}if(!s.isValid())return[]}l.sort((0,Y.Hw)((0,Y.VE)((e=>e.modifiedLineRange.length),Y.U9)));const c=new T.S,h=new T.S;for(const e of l){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,n=c.subtractFrom(e.modifiedLineRange),i=h.subtractFrom(e.originalLineRange).getWithDelta(t),r=n.getIntersection(i);for(const e of r.ranges){if(e.length<3)continue;const n=e,i=e.delta(-t);o.push(new D(i,n)),c.addRange(n),h.addRange(i)}}o.sort((0,Y.VE)((e=>e.original.startLineNumber),Y.U9));const u=new de.vJ(e);for(let t=0;te.original.startLineNumber<=n.original.startLineNumber)),l=(0,de.lx)(e,(e=>e.modified.startLineNumber<=n.modified.startLineNumber)),d=Math.max(n.original.startLineNumber-a.original.startLineNumber,n.modified.startLineNumber-l.modified.startLineNumber),g=u.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumberi.length||t>r.length)break;if(c.contains(t)||h.contains(e))break;if(!Le(i[e-1],r[t-1],s))break}for(p>0&&(h.addRange(new T.M(n.original.startLineNumber-p,n.original.startLineNumber)),c.addRange(new T.M(n.modified.startLineNumber-p,n.modified.startLineNumber))),b=0;bi.length||t>r.length)break;if(c.contains(t)||h.contains(e))break;if(!Le(i[e-1],r[t-1],s))break}b>0&&(h.addRange(new T.M(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+b)),c.addRange(new T.M(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+b))),(p>0||b>0)&&(o[t]=new D(new T.M(n.original.startLineNumber-p,n.original.endLineNumberExclusive+b),new T.M(n.modified.startLineNumber-p,n.modified.endLineNumberExclusive+b)))}return o}function Le(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new le,r=i.compute(new fe([e],new u.Q(1,1,1,e.length),!1),new fe([t],new u.Q(1,1,1,t.length),!1),n);let s=0;const o=ee.invert(r.diffs,e.length);for(const t of o)t.seq1Range.forEach((t=>{se(e.charCodeAt(t))||s++}));function a(t){let n=0;for(let i=0;it.length?e:t),c=s/l>.6&&l>10;return c}function we(e){if(0===e.length)return e;e.sort((0,Y.VE)((e=>e.original.startLineNumber),Y.U9));const t=[e[0]];for(let n=1;n=0&&o>=0;a&&s+o<=2?t[t.length-1]=i.join(r):t.push(r)}return t}function Se(e,t){const n=new de.vJ(e);return t=t.filter((t=>{const i=n.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber0&&(o=o.delta(a))}r.push(o)}return i.length>0&&r.push(i[i.length-1]),r}function Ne(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let i=0;i0?n[i-1]:void 0,s=n[i],o=i+1=i.start&&e.seq2Range.start-o>=r.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&oc&&(c=a,l=i)}return e.delta(l)}function Ae(e,t,n){const i=[];for(const e of n){const t=i[i.length-1];t?e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2?i[i.length-1]=new ee(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):i.push(e):i.push(e)}return i}function Ie(e,t,n){const i=ee.invert(n,e.length),r=[];let s=new te(0,0);function o(n,o){if(n.offset10){const n=i[0],r=n.seq1Range.intersects(c.seq1Range)||n.seq2Range.intersects(c.seq2Range);if(!r)break;const s=e.findWordContaining(n.seq1Range.start),o=t.findWordContaining(n.seq2Range.start),a=new ee(s,o),l=a.intersect(n);if(u+=l.seq1Range.length,d+=l.seq2Range.length,c=c.join(a),!(c.seq1Range.endExclusive>=n.seq1Range.endExclusive))break;i.shift()}u+d<2*(c.seq1Range.length+c.seq2Range.length)/3&&r.push(c),s=c.getEndExclusives()}while(i.length>0){const e=i.shift();e.seq1Range.isEmpty||(o(e.getStarts(),e),o(e.getEndExclusives().delta(-1),e))}const a=Oe(n,r);return a}function Oe(e,t){const n=[];while(e.length>0||t.length>0){const i=e[0],r=t[0];let s;s=i&&(!r||i.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Me(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const o=[i[0]];for(let a=1;a5||n.seq1Range.length+n.seq2Range.length>5)}const u=h(c,l);u?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}i=o}while(s++<10&&r);return i}function De(e,t,n){let i=n;if(0===i.length)return i;let r,s=0;do{r=!1;const a=[i[0]];for(let l=1;l5||r.length>500)return!1;const o=e.getText(r).trim();if(o.length>20||o.split(/\r\n|\r|\n/).length>1)return!1;const a=e.countLinesIn(n.seq1Range),l=n.seq1Range.length,u=t.countLinesIn(n.seq2Range),d=n.seq2Range.length,g=e.countLinesIn(i.seq1Range),f=i.seq1Range.length,m=t.countLinesIn(i.seq2Range),p=i.seq2Range.length,b=130;function _(e){return Math.min(e,b)}return Math.pow(Math.pow(_(40*a+l),1.5)+Math.pow(_(40*u+d),1.5),1.5)+Math.pow(Math.pow(_(40*g+f),1.5)+Math.pow(_(40*m+p),1.5),1.5)>(b**1.5)**1.5*1.3}const d=u(h,c);d?(r=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}i=a}while(s++<10&&r);const o=[];return(0,Y.kj)(i,((t,n,i)=>{let r=n;function s(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}const a=e.extendToFullLines(n.seq1Range),l=e.getText(new O.L(a.start,n.seq1Range.start));s(l)&&(r=r.deltaStart(-l.length));const c=e.getText(new O.L(n.seq1Range.endExclusive,a.endExclusive));s(c)&&(r=r.deltaEnd(c.length));const h=ee.fromOffsetPairs(t?t.getEndExclusives():te.zero,i?i.getStarts():te.max),u=r.intersect(h);o.length>0&&u.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(u):o.push(u)})),o}class Re{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=0===e?0:Be(this.lines[e-1]),n=e===this.lines.length?0:Be(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function Be(e){let t=0;while(te===t)))return new x([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new x([new F(new T.M(1,e.length+1),new T.M(1,t.length+1),[new P(new u.Q(1,1,e.length,e[e.length-1].length+1),new u.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const i=0===n.maxComputationTimeMs?ne.instance:new ie(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,s=new Map;function o(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map((e=>o(e.trim()))),l=t.map((e=>o(e.trim()))),c=new Re(a,e),h=new Re(l,t),d=(()=>c.length+h.length<1700?this.dynamicProgrammingDiffing.compute(c,h,i,((n,i)=>e[n]===t[i]?0===t[i].length?.1:1+Math.log(1+t[i].length):.99)):this.myersDiffingAlgorithm.compute(c,h,i))();let g=d.diffs,f=d.hitTimeout;g=xe(c,h,g),g=Me(c,h,g);const m=[],p=n=>{if(r)for(let s=0;sn.seq1Range.start-b===n.seq2Range.start-_));const s=n.seq1Range.start-b;p(s),b=n.seq1Range.endExclusive,_=n.seq2Range.endExclusive;const o=this.refineDiff(e,t,n,i,r);o.hitTimeout&&(f=!0);for(const e of o.mappings)m.push(e)}p(e.length-b);const k=Pe(m,e,t);let v=[];return n.computeMoves&&(v=this.computeMoves(k,e,t,a,l,i,r)),(0,I.Ft)((()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function i(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const r of k){if(!r.innerChanges)return!1;for(const i of r.innerChanges){const r=n(i.modifiedRange.getStartPosition(),t)&&n(i.modifiedRange.getEndPosition(),t)&&n(i.originalRange.getStartPosition(),e)&&n(i.originalRange.getEndPosition(),e);if(!r)return!1}if(!i(r.modified,t)||!i(r.original,e))return!1}return!0})),new x(k,v,f)}computeMoves(e,t,n,i,r,s,o){const a=ke(e,t,n,i,r,s),l=a.map((e=>{const i=this.refineDiff(t,n,new ee(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o),r=Pe(i.mappings,t,n,!0);return new E(e,r)}));return l}refineDiff(e,t,n,i,r){const s=ze(n),o=s.toRangeMapping2(e,t),a=new fe(e,o.originalRange,r),l=new fe(t,o.modifiedRange,r),c=a.length+l.length<500?this.dynamicProgrammingDiffing.compute(a,l,i):this.myersDiffingAlgorithm.compute(a,l,i),h=!1;let u=c.diffs;h&&ee.assertSorted(u),u=xe(a,l,u),h&&ee.assertSorted(u),u=Ie(a,l,u),h&&ee.assertSorted(u),u=Ae(a,l,u),h&&ee.assertSorted(u),u=De(a,l,u),h&&ee.assertSorted(u);const d=u.map((e=>new P(a.translateRange(e.seq1Range),l.translateRange(e.seq2Range))));return h&&P.assertSorted(d),{mappings:d,hitTimeout:c.hitTimeout}}}function Pe(e,t,n,i=!1){const r=[];for(const i of(0,Y.n)(e.map((e=>Ve(e,t,n))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=i[0],t=i[i.length-1];r.push(new F(e.original.join(t.original),e.modified.join(t.modified),i.map((e=>e.innerChanges[0]))))}return(0,I.Ft)((()=>{if(!i&&r.length>0){if(r[0].modified.startLineNumber!==r[0].original.startLineNumber)return!1;if(n.length-r[r.length-1].modified.endLineNumberExclusive!==t.length-r[r.length-1].original.endLineNumberExclusive)return!1}return(0,I.Xo)(r,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+r&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+r&&(i=1);const s=new T.M(e.originalRange.startLineNumber+i,e.originalRange.endLineNumber+1+r),o=new T.M(e.modifiedRange.startLineNumber+i,e.modifiedRange.endLineNumber+1+r);return new F(s,o,[e])}function ze(e){return new D(new T.M(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new T.M(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}const je={getLegacy:()=>new j,getDefault:()=>new Fe};var qe=n(5603),We=n(6657),Ue=n(5476);function $e(e){const t=[];for(const n of e){const e=Number(n);(e||0===e&&""!==n.replace(/\s/g,""))&&t.push(e)}return t}function He(e,t,n,i){return{red:e/255,blue:n/255,green:t/255,alpha:i}}function Ke(e,t){const n=t.index,i=t[0].length;if(!n)return;const r=e.positionAt(n),s={startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:r.lineNumber,endColumn:r.column+i};return s}function Ge(e,t){if(!e)return;const n=Ue.Q1.Format.CSS.parseHex(t);return n?{range:e,color:He(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}:void 0}function Qe(e,t,n){if(!e||1!==t.length)return;const i=t[0],r=i.values(),s=$e(r);return{range:e,color:He(s[0],s[1],s[2],n?s[3]:1)}}function Je(e,t,n){if(!e||1!==t.length)return;const i=t[0],r=i.values(),s=$e(r),o=new Ue.Q1(new Ue.hB(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:e,color:He(o.rgba.r,o.rgba.g,o.rgba.b,o.rgba.a)}}function Xe(e,t){return"string"===typeof e?[...e.matchAll(t)]:e.findMatches(t)}function Ye(e){const t=[],n=/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm,i=Xe(e,n);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),r=i[1],s=i[2];if(!s)continue;let o;if("rgb"===r){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;o=Qe(Ke(e,n),Xe(s,t),!1)}else if("rgba"===r){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Qe(Ke(e,n),Xe(s,t),!0)}else if("hsl"===r){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=Je(Ke(e,n),Xe(s,t),!1)}else if("hsla"===r){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=Je(Ke(e,n),Xe(s,t),!0)}else"#"===r&&(o=Ge(Ke(e,n),r+s));o&&t.push(o)}return t}function Ze(e){return e&&"function"===typeof e.getValue&&"function"===typeof e.positionAt?Ye(e):[]}var et=n(6198),tt=n(6294);const nt=!0;class it{constructor(){this._workerTextModelSyncServer=new tt.WorkerTextModelSyncServer}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){const i=this._getModel(e);return i?S.UnicodeTextModelHighlighter.computeUnicodeHighlights(i,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const n=this._getModel(e);return n?(0,et.findSectionHeaders)(n,t):[]}async $computeDiff(e,t,n,i){const r=this._getModel(e),s=this._getModel(t);if(!r||!s)return null;const o=rt.computeDiff(r,s,n,i);return o}static computeDiff(e,t,n,i){const r="advanced"===i?je.getDefault():je.getLegacy(),s=e.getLinesContent(),o=t.getLinesContent(),a=r.computeDiff(s,o,n),l=!(a.changes.length>0)&&this._modelsAreIdentical(e,t);function c(e){return e.map((e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:l,quitEarly:a.hitTimeout,changes:c(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,c(e.changes)]))}}static _modelsAreIdentical(e,t){const n=e.getLineCount(),i=t.getLineCount();if(n!==i)return!1;for(let i=1;i<=n;i++){const n=e.getLineContent(i),r=t.getLineContent(i);if(n!==r)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,n){const i=this._getModel(e);if(!i)return t;const r=[];let s;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return u.Q.compareRangesUsingStarts(e.range,t.range);const n=e.range?0:1,i=t.range?0:1;return n-i}));let a=0;for(let e=1;ert._diffLimit){r.push({range:e,text:a});continue}const c=o(t,a,n),h=i.offsetAt(u.Q.lift(e).getStartPosition());for(const e of c){const t=i.positionAt(h+e.originalStart),n=i.positionAt(h+e.originalStart+e.originalLength),s={text:a.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};i.getValueInRange(s.range)!==s.text&&r.push(s)}}return"number"===typeof s&&r.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?v(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?Ze(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,n,i){const r=new w.W,s=new RegExp(n,i),o=new Set;e:for(const n of e){const e=this._getModel(n);if(e)for(const n of e.words(s))if(n!==t&&isNaN(Number(n))&&(o.add(n),o.size>rt._suggestionsLimit))break e}return{words:Array.from(o),duration:r.elapsed()}}async $computeWordRanges(e,t,n,i){const r=this._getModel(e);if(!r)return Object.create(null);const s=new RegExp(n,i),o=Object.create(null);for(let e=t.startLineNumber;ethis._host.$fhr(e,t),s=(0,qe.kT)(i,r),o={host:s,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve((0,qe.V0)(this._foreignModule))):new Promise(((i,r)=>{const s=e=>{this._foreignModule=e.create(o,t),i((0,qe.V0)(this._foreignModule))};if(nt){const t=We.zl.asBrowserUri(`${e}.js`).toString(!0);n(9204)(`${t}`).then(s).catch(r)}else Promise.resolve().then(function(){var t=[n(7614)(`${e}`)];s.apply(null,t)}.bind(this))["catch"](r.bind(this))}))}$fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}function st(e){return new rt(L.EditorWorkerHost.getChannel(e),null)}"function"===typeof importScripts&&(globalThis.monaco=(0,y.createMonacoBaseAPI)())},4117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IEditorWorkerService:()=>r});var i=n(7778);const r=(0,i.u1)("editorWorkerService")},2899:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EditorWorkerHost:()=>i});class i{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(i.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(i.CHANNEL_NAME,t)}}},6198:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findSectionHeaders:()=>s});const i=new RegExp("\\bMARK:\\s*(.*)$","d"),r=/^-+|-+$/g;function s(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const i=o(e,t);n=n.concat(i)}if(t.findMarkSectionHeaders){const t=a(e);n=n.concat(t)}return n}function o(e,t){const n=[],i=e.getLineCount();for(let r=1;r<=i;r++){const i=e.getLineContent(r),s=i.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:r,startColumn:s[0].length+1,endLineNumber:r,endColumn:i.length+1};if(e.endColumn>e.startColumn){const t={range:e,...c(i.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}function a(e){const t=[],n=e.getLineCount();for(let i=1;i<=n;i++){const n=e.getLineContent(i);l(n,i,t)}return t}function l(e,t,n){i.lastIndex=0;const r=i.exec(e);if(r){const e=r.indices[1][0]+1,i=r.indices[1][1]+1,s={startLineNumber:t,startColumn:e,endLineNumber:t,endColumn:i};if(s.endColumn>s.startColumn){const e={range:s,...c(r[1]),shouldBeInComments:!0};(e.text||e.hasSeparatorLine)&&n.push(e)}}}function c(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(r,""),{text:e,hasSeparatorLine:t}}},2340:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getIconClasses:()=>d});var i,r=n(6657),s=n(4366),o=n(9133),a=n(5764);(function(e){e[e["FILE"]=0]="FILE",e[e["FOLDER"]=1]="FOLDER",e[e["ROOT_FOLDER"]=2]="ROOT_FOLDER"})(i||(i={}));var l,c,h=n(6455);(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeColor=t})(l||(l={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(e){const i=t.exec(e.id);if(!i)return n(h.W.error);const[,r,s]=i,o=["codicon","codicon-"+r];return s&&o.push("codicon-modifier-"+s.substring(1)),o}function i(e){return n(e).join(" ")}function r(e){return"."+n(e).join(".")}function s(e){return e&&"object"===typeof e&&"string"===typeof e.id&&("undefined"===typeof e.color||l.isThemeColor(e.color))}e.asClassNameArray=n,e.asClassName=i,e.asCSSSelector=r,e.isThemeIcon=s;const o=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);function a(e){const t=o.exec(e);if(!t)return;const[,n]=t;return{id:n}}function c(e){return{id:e}}function u(e,t){let n=e.id;const i=n.lastIndexOf("~");return-1!==i&&(n=n.substring(0,i)),t&&(n=`${n}~${t}`),{id:n}}function d(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)}function g(e,t){return e.id===t.id&&e.color?.id===t.color?.id}e.fromString=a,e.fromId=c,e.modify=u,e.getModifier=d,e.isEqual=g}(c||(c={}));const u=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,n,a,l){if(c.isThemeIcon(l))return[`codicon-${l.id}`,"predefined-file-icon"];if(o.r.isUri(l))return[];const h=a===i.ROOT_FOLDER?["rootfolder-icon"]:a===i.FOLDER?["folder-icon"]:["file-icon"];if(n){let o;if(n.scheme===r.ny.data){const e=s.B6.parseMetaData(n);o=e.get(s.B6.META_DATA_LABEL)}else{const e=n.path.match(u);e?(o=f(e[2].toLowerCase()),e[1]&&h.push(`${f(e[1].toLowerCase())}-name-dir-icon`)):o=f(n.authority.toLowerCase())}if(a===i.ROOT_FOLDER)h.push(`${o}-root-name-folder-icon`);else if(a===i.FOLDER)h.push(`${o}-name-folder-icon`);else{if(o){if(h.push(`${o}-name-file-icon`),h.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t{"use strict";n.r(t),n.d(t,{ILanguageFeatureDebounceService:()=>m,LanguageFeatureDebounceService:()=>k});var i=n(5647),r=n(1553);function s(e,t,n){return Math.min(Math.max(e,t),n)}class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class a{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},f=function(e,t){return function(n,i){t(n,i,e)}};const m=(0,l.u1)("ILanguageFeatureDebounceService");var p;(function(e){const t=new WeakMap;let n=0;function i(e){let i=t.get(e);return void 0===i&&(i=++n,t.set(e,i)),i}e.of=i})(p||(p={}));class b{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class _{constructor(e,t,n,i,s,o){this._logService=e,this._name=t,this._registry=n,this._default=i,this._min=s,this._max=o,this._cache=new r.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,i.sN)(p.of(t),e)),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?s(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let i=this._cache.get(n);i||(i=new a(6),this._cache.set(n,i));const r=s(i.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new o;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return s(e,this._min,this._max)}}let k=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){const i=n?.min??50,r=n?.max??i**2,s=n?.key??void 0,o=`${p.of(e)},${i}${s?","+s:""}`;let a=this._data.get(o);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new b(1.5*i)):a=new _(this._logService,t,e,0|this._overallAverage()||1.5*i,i,r),this._data.set(o,a)),a}_overallAverage(){const e=new o;for(const t of this._data.values())e.update(t.default());return e.value}};k=g([f(0,u.rr),f(1,c)],k),(0,h.v)(m,k,1)},2847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ILanguageFeaturesService:()=>r});var i=n(7778);const r=(0,i.u1)("ILanguageFeaturesService")},1369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageFeaturesService:()=>m});var i=n(231),r=n(8894),s=n(9322),o=n(3589),a=n(1643);function l(e,t,n,i,r,s){if(Array.isArray(e)){let o=0;for(const a of e){const e=l(a,t,n,i,r,s);if(10===e)return e;e>o&&(o=e)}return o}if("string"===typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){const{language:l,pattern:c,scheme:h,hasAccessToAllModels:u,notebookType:d}=e;if(!i&&!u)return 0;d&&r&&(t=r);let g=0;if(h)if(h===t.scheme)g=10;else{if("*"!==h)return 0;g=5}if(l)if(l===n)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(d)if(d===s)g=10;else{if("*"!==d||void 0===s)return 0;g=Math.max(g,5)}if(c){let e;if(e="string"===typeof c?c:{...c,base:(0,a.S8)(c.base)},e!==t.fsPath&&!(0,o.YW)(e,t.fsPath))return 0;g=10}return g}return 0}function c(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(c):!!e.exclusive)}class h{constructor(e,t,n,i,r){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=i,this.recursive=r}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class u{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new i.vl,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,r.s)((()=>{if(n){const e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e,t=!1){const n=[];return this._orderedForEach(e,t,(e=>n.push(e.provider))),n}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,!1,(e=>{n&&i===e._score?n.push(e.provider):(i=e._score,n=[e.provider],t.push(n))})),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(const e of this._entries)e._score>0&&n(e)}_updateScores(e,t){const n=this._notebookInfoResolver?.(e.uri),i=n?new h(e.uri,e.getLanguageId(),n.uri,n.type,t):new h(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(i)){this._lastCandidate=i;for(const n of this._entries)if(n._score=l(n.selector,i.uri,i.languageId,(0,s.vd)(e),i.notebookUri,i.notebookType),c(n.selector)&&n._score>0){if(!t){for(const e of this._entries)e._score=0;n._score=1e3;break}n._score=0}this._entries.sort(u._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._timet._time?-1:0}}function d(e){return"string"!==typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var g=n(2847),f=n(4979);class m{constructor(){this.referenceProvider=new u(this._score.bind(this)),this.renameProvider=new u(this._score.bind(this)),this.newSymbolNamesProvider=new u(this._score.bind(this)),this.codeActionProvider=new u(this._score.bind(this)),this.definitionProvider=new u(this._score.bind(this)),this.typeDefinitionProvider=new u(this._score.bind(this)),this.declarationProvider=new u(this._score.bind(this)),this.implementationProvider=new u(this._score.bind(this)),this.documentSymbolProvider=new u(this._score.bind(this)),this.inlayHintsProvider=new u(this._score.bind(this)),this.colorProvider=new u(this._score.bind(this)),this.codeLensProvider=new u(this._score.bind(this)),this.documentFormattingEditProvider=new u(this._score.bind(this)),this.documentRangeFormattingEditProvider=new u(this._score.bind(this)),this.onTypeFormattingEditProvider=new u(this._score.bind(this)),this.signatureHelpProvider=new u(this._score.bind(this)),this.hoverProvider=new u(this._score.bind(this)),this.documentHighlightProvider=new u(this._score.bind(this)),this.multiDocumentHighlightProvider=new u(this._score.bind(this)),this.selectionRangeProvider=new u(this._score.bind(this)),this.foldingRangeProvider=new u(this._score.bind(this)),this.linkProvider=new u(this._score.bind(this)),this.inlineCompletionsProvider=new u(this._score.bind(this)),this.inlineEditProvider=new u(this._score.bind(this)),this.completionProvider=new u(this._score.bind(this)),this.linkedEditingRangeProvider=new u(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new u(this._score.bind(this)),this.documentSemanticTokensProvider=new u(this._score.bind(this)),this.documentDropEditProvider=new u(this._score.bind(this)),this.documentPasteEditProvider=new u(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,f.v)(g.ILanguageFeaturesService,m,1)},2657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageService:()=>ne});var i=n(231),r=n(8894),s=n(7024),o=n(5053),a=n(5350),l=n(5764);const c=(e,t)=>e===t;new WeakMap;class h{constructor(e,t,n){this.owner=e,this.debugNameSource=t,this.referenceFn=n}getDebugName(e){return g(e,this)}}const u=new Map,d=new WeakMap;function g(e,t){const n=d.get(e);if(n)return n;const i=f(e,t);if(i){let t=u.get(i)??0;t++,u.set(i,t);const n=1===t?i:`${i}#${t}`;return d.set(e,n),n}}function f(e,t){const n=d.get(e);if(n)return n;const i=t.owner?_(t.owner)+".":"";let r;const s=t.debugNameSource;if(void 0!==s){if("function"!==typeof s)return i+s;if(r=s(),void 0!==r)return i+r}const o=t.referenceFn;if(void 0!==o&&(r=v(o),void 0!==r))return i+r;if(void 0!==t.owner){const n=m(t.owner,e);if(void 0!==n)return i+n}}function m(e,t){for(const n in e)if(e[n]===t)return n}const p=new Map,b=new WeakMap;function _(e){const t=b.get(e);if(t)return t;const n=k(e);let i=p.get(n)??0;i++,p.set(n,i);const r=1===i?n:`${n}#${i}`;return b.set(e,r),r}function k(e){const t=e.constructor;return t?t.name:"Object"}function v(e){const t=e.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//,i=n.exec(t),r=i?i[1]:void 0;return r?.trim()}let C,y,L,w;function S(e){C=e}function x(){return C}class E{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return N([T(R("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[T(" "),I(O(e.oldValue,70),{color:"red",strikeThrough:!0}),T(" "),I(O(e.newValue,60),{color:"green"})]:[T(" (unchanged)")]:[T(" "),I(O(e.newValue,60),{color:"green"}),T(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([A("observable value changed"),I(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return I(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,i)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,i]))}handleDerivedRecomputed(e,t){const n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([A("derived recomputed"),I(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([A("observable from event triggered"),I(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,i)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,i]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([A("autorun"),I(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([A("transaction"),I(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function N(e){const t=new Array,n=[];let i="";function r(e){if("length"in e)for(const t of e)t&&r(t);else"text"in e?(i+=`%c${e.text}`,t.push(e.style),e.data&&n.push(...e.data)):"data"in e&&n.push(...e.data)}r(e);const s=[i,...t];return s.push(...n),s}function T(e){return I(e,{color:"black"})}function A(e){return I(B(`${e}: `,10),{color:"black",bold:!0})}function I(e,t={color:"black"}){function n(e){return Object.entries(e).reduce(((e,[t,n])=>`${e}${t}:${n};`),"")}const i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:n(i)}}function O(e,t){switch(typeof e){case"number":return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?M(e,t):D(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`;default:return""+e}}function M(e,t){let n="[ ",i=!0;for(const r of e){if(i||(n+=", "),n.length-5>t){n+="...";break}i=!1,n+=`${O(r,t-n.length)}`}return n+=" ]",n}function D(e,t){let n="{ ",i=!0;for(const[r,s]of Object.entries(e)){if(i||(n+=", "),n.length-5>t){n+="...";break}i=!1,n+=`${r}: ${O(s,t-n.length)}`}return n+=" }",n}function R(e,t){let n="";for(let i=1;i<=t;i++)n+=e;return n}function B(e,t){while(e.length{const e=v(i);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/,r=t.exec(i.toString());return r?`${this.debugName}.${r[2]}`:n?void 0:`${this.debugName} (mapped)`},debugReferenceFn:i},(e=>i(this.read(e),e)))}flatten(){return w({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(y(this,t)),this}keepObserved(e){return e.add(L(this)),this}}class j extends z{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){const t=this.observers.delete(e);t&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function q(e,t){const n=new U(e,t);try{e(n)}finally{n.finish()}}function W(e,t,n){e?t(e):q(t,n)}class U{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],x()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():v(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,$.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),i=3===this.state;if(n&&(1===this.state||i)&&(this.state=2,i))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function G(e){return new Q(new h(void 0,void 0,e),e,void 0,void 0)}class Q{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,n,i){this._debugNameData=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=i,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),x()?.handleAutorunCreated(this),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){x()?.handleAutorunTriggered(this);const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{t||x()?.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,$.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary);n&&(this.state=2)}}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(e){e.Observer=Q})(G||(G={}));function J(...e){let t,n,i;return 3===e.length?[t,n,i]=e:[n,i]=e,new X(new h(t,void 0,i),n,i,(()=>X.globalTransaction),c)}class X extends j{constructor(e,t,n,i,r){super(),this._debugNameData=e,this.event=t,this._getValue=n,this._getTransaction=i,this._equalityComparator=r,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),n=this.value,i=!this.hasValue||!this._equalityComparator(n,t);let r=!1;i&&(this.value=t,this.hasValue&&(r=!0,W(this._getTransaction(),(e=>{x()?.handleFromEventObservableTriggered(this,{oldValue:n,newValue:t,change:void 0,didChange:i,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),r||x()?.handleFromEventObservableTriggered(this,{oldValue:n,newValue:t,change:void 0,didChange:i,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){if(this.subscription)return this.hasValue||this.handleEvent(void 0),this.value;{const e=this._getValue(void 0);return e}}}(function(e){function t(e,t){let n=!1;void 0===X.globalTransaction&&(X.globalTransaction=e,n=!0);try{t()}finally{n&&(X.globalTransaction=void 0)}}e.Observer=X,e.batchEventsGlobally=t})(J||(J={}));function Y(e){const t=new ee(!1,void 0);return e.addObserver(t),(0,r.s)((()=>{e.removeObserver(t)}))}function Z(e,t){const n=new ee(!0,t);return e.addObserver(n),t?t(e.get()):e.reportChanges(),(0,r.s)((()=>{e.removeObserver(n)}))}P(Y),F(Z);class ee{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}n(4396);const te=!1;te&&S(new E);class ne extends r.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new i.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new i.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new i.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,ne.instanceCount++,this._registry=this._register(new s.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){ne.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,o.Fy)(n,null)}createById(e){return new ie(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new ie(this.onDidChange,(()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class ie{constructor(e,t){this._value=J(this,e,(()=>t())),this.onDidChange=i.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},5911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clearPlatformLanguageAssociations:()=>p,getLanguageIds:()=>b,registerPlatformLanguageAssociation:()=>g});var i=n(3589),r=n(3911),s=n(6657),o=n(1643),a=n(4366),l=n(601),c=n(5764);let h=[],u=[],d=[];function g(e,t=!1){f(e,!1,t)}function f(e,t,n){const i=m(e,t);h.push(i),i.userConfigured?d.push(i):u.push(i),n&&!i.userConfigured&&h.forEach((e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))}))}function m(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:t,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,i.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(o.SA.sep)>=0}}function p(){h=h.filter((e=>e.userConfigured)),u=[]}function b(e,t){return _(e,t).map((e=>e.id))}function _(e,t){let n;if(e)switch(e.scheme){case s.ny.file:n=e.fsPath;break;case s.ny.data:{const t=a.B6.parseMetaData(e);n=t.get(a.B6.META_DATA_LABEL);break}case s.ny.vscodeNotebookCell:n=void 0;break;default:n=e.path}if(!n)return[{id:"unknown",mime:r.K.unknown}];n=n.toLowerCase();const i=(0,o.P8)(n),l=k(n,i,d);if(l)return[l,{id:c.vH,mime:r.K.text}];const h=k(n,i,u);if(h)return[h,{id:c.vH,mime:r.K.text}];if(t){const e=v(t);if(e)return[e,{id:c.vH,mime:r.K.text}]}return[{id:"unknown",mime:r.K.unknown}]}function k(e,t,n){let i,r,s;for(let o=n.length-1;o>=0;o--){const a=n[o];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!r||a.filepattern.length>r.filepattern.length)){const n=a.filepatternOnPath?e:t;a.filepatternLowercase?.(n)&&(r=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&t.endsWith(a.extensionLowercase)&&(s=a)}return i||(r||(s||void 0))}function v(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=h.length-1;t>=0;t--){const n=h[t];if(!n.firstline)continue;const i=e.match(n.firstline);if(i&&i.length>0)return n}}},7024:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LanguageIdCodec:()=>d,LanguagesRegistry:()=>g});var i=n(231),r=n(8894),s=n(601),o=n(5911),a=n(5764),l=n(7503),c=n(6374);const h=Object.prototype.hasOwnProperty,u="vs.editor.nullLanguage";class d{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(u,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||u}}class g extends r.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new d,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,o.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),c.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;h.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i=`text/x-${n}`,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const r of t.filenames)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filename:r},this._warnOnOverwrite),e.filenames.push(r);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,filepattern:e},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,s.eY)(t)||(0,o.registerPlatformLanguageAssociation)({id:n,mime:i,firstline:t},this._warnOnOverwrite)}catch(n){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,n)}}e.aliases.push(n);let r=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(r=0===t.aliases.length?[null]:t.aliases),null!==r)for(const t of r)t&&0!==t.length&&e.aliases.push(t);const a=null!==r&&r.length>0;if(a&&null===r[0]);else{const t=(a?r[0]:null)||n;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&h.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return h.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&h.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,o.getLanguageIds)(e,t):[]}}},3637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IMarkerDecorationsService:()=>r});var i=n(7778);const r=(0,i.u1)("markerDecorationsService")},9420:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MarkerDecorationsService:()=>w});var i,r=n(601);(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(i||(i={})),function(e){const t="error",n="warning",i="warn",s="info",o="ignore";function a(o){return o?r.Q_(t,o)?e.Error:r.Q_(n,o)||r.Q_(i,o)?e.Warning:r.Q_(s,o)?e.Info:e.Ignore:e.Ignore}function l(i){switch(i){case e.Error:return t;case e.Warning:return n;case e.Info:return s;default:return o}}e.fromValue=a,e.toString=l}(i||(i={}));const s=i;var o,a,l=n(1337),c=n(7778);(function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"})(o||(o={})),function(e){function t(e,t){return t-e}e.compare=t;const n=Object.create(null);function i(e){return n[e]||""}function r(t){switch(t){case s.Error:return e.Error;case s.Warning:return e.Warning;case s.Info:return e.Info;case s.Ignore:return e.Hint}}function o(t){switch(t){case e.Error:return s.Error;case e.Warning:return s.Warning;case e.Info:return s.Info;case e.Hint:return s.Ignore}}n[e.Error]=(0,l.kg)("sev.error","Error"),n[e.Warning]=(0,l.kg)("sev.warning","Warning"),n[e.Info]=(0,l.kg)("sev.info","Info"),e.toString=i,e.fromSeverity=r,e.toSeverity=o}(o||(o={})),function(e){const t="";function n(e){return i(e,!0)}function i(e,n){const i=[t];return e.source?i.push(e.source.replace("¦","\\¦")):i.push(t),e.code?"string"===typeof e.code?i.push(e.code.replace("¦","\\¦")):i.push(e.code.value.replace("¦","\\¦")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(o.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("¦","\\¦")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("¦")}e.makeKey=n,e.makeKeyOptionalMessage=i}(a||(a={}));const h=(0,c.u1)("markerService");var u=n(8894),d=n(9322),g=n(3711),f=n(2764),m=n(9361),p=n(8690),b=n(6657),_=n(231),k=n(7732),v=n(1553);function C(e,t){const n=[],i=[];for(const i of e)t.has(i)||n.push(i);for(const n of t)e.has(n)||i.push(n);return{removed:n,added:i}}var y=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},L=function(e,t){return function(n,i){t(n,i,e)}};let w=class extends u.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new _.vl),this._markerDecorations=new v.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new S(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==b.ny.inMemory&&e.uri.scheme!==b.ny.internal&&e.uri.scheme!==b.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};w=y([L(0,m.IModelService),L(1,h)],w);class S extends u.jG{constructor(e){super(),this.model=e,this._map=new v.cO,this._register((0,u.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:n}=C(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===n.length)return!1;const i=n.map((e=>this._map.get(e))),r=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(i,r);for(const e of n)this._map.delete(e);for(let e=0;e=t)return n;const i=e.getWordAtPosition(n.getStartPosition());i&&(n=new p.Q(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){const i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0}}},9361:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IModelService:()=>r});var i=n(7778);const r=(0,i.u1)("modelService")},2713:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultModelSHA1Computer:()=>hs,ModelService:()=>cs});var i=n(231),r=n(8894),s=n(5160),o=n(5053),a=n(5476),l=n(4396),c=n(601),h=n(9133),u=n(6627);class d{static _nextVisibleColumn(e,t,n){return 9===e?d.nextRenderTabStop(t,n):c.ne(e)||c.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,n){const i=Math.min(t-1,e.length),r=e.substring(0,i),s=new c.km(r);let o=0;while(!s.eol()){const e=c.Z5(r,i,s.offset);s.nextGraphemeLength(),o=this._nextVisibleColumn(e,o,n)}return o}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const i=e.length,r=new c.km(e);let s=0,o=1;while(!r.eol()){const a=c.Z5(e,i,r.offset);r.nextGraphemeLength();const l=this._nextVisibleColumn(a,s,n),h=r.offset+1;if(l>=t){const e=t-s,n=l-t;return n \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new y(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new y({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new y({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"===typeof e.autoCloseBefore?e.autoCloseBefore:S.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"===typeof e.autoCloseBefore?e.autoCloseBefore:S.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}function x(e){return 0!==(3&e)}var E=n(7885);let N,T,A;function I(){return N||(N=new TextDecoder("UTF-16LE")),N}function O(){return T||(T=new TextDecoder("UTF-16BE")),T}function M(){return A||(A=s.cm()?I():O()),A}function D(e,t,n){const i=new Uint16Array(e.buffer,t,n);return n>0&&(65279===i[0]||65534===i[0])?R(e,t,n):I().decode(i)}function R(e,t,n){const i=[];let r=0;for(let s=0;s[e[0].toLowerCase(),e[1].toLowerCase()]));const n=[];for(let e=0;e{const[n,i]=e,[r,s]=t;return n===r||n===s||i===r||i===s},r=(e,i)=>{const r=Math.min(e,i),s=Math.max(e,i);for(let e=0;e0&&s.push({open:r,close:o})}return s}class P{constructor(e,t){this._richEditBracketsBrand=void 0;const n=F(t);this.brackets=n.map(((t,i)=>new B(e,i,t.open,t.close,q(t.open,t.close,n,i),W(t.open,t.close,n,i)))),this.forwardRegex=U(this.brackets),this.reversedRegex=$(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const e of this.brackets){for(const t of e.open)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,t.length);for(const t of e.close)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,t.length)}}}function V(e,t,n,i){for(let r=0,s=t.length;r=0&&i.push(t);for(const t of s.close)t.indexOf(e)>=0&&i.push(t)}}function z(e,t){return e.length-t.length}function j(e){if(e.length<=1)return e;const t=[],n=new Set;for(const i of e)n.has(i)||(t.push(i),n.add(i));return t}function q(e,t,n,i){let r=[];r=r.concat(e),r=r.concat(t);for(let e=0,t=r.length;e=0;i--)t[n++]=e.charCodeAt(i);return M().decode(t)}let t=null,n=null;return function(i){return t!==i&&(t=i,n=e(t)),n}}();class Q{static _findPrevBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=n.length-(r.index||0),o=r[0].length,a=i+s;return new p.Q(t,a-o+1,t,a+1)}static findPrevBracketInRange(e,t,n,i,r){const s=G(n),o=s.substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,o,i)}static findNextBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const s=r.index||0,o=r[0].length;if(0===o)return null;const a=i+s;return new p.Q(t,a+1,t,a+1+o)}static findNextBracketInRange(e,t,n,i,r){const s=n.substring(i,r);return this.findNextBracketInText(e,t,s,i)}}class J{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return(0,o.dM)(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const i=t.findTokenIndexAtOffset(n-1);if(x(t.getStandardTokenType(i)))return null;const r=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,n-1)+e,o=Q.findPrevBracketInRange(r,1,s,0,s.length);if(!o)return null;const a=s.substring(o.startColumn-1,o.endColumn-1).toLowerCase(),l=this._richEditBrackets.textIsOpenBracket[a];if(l)return null;const c=t.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function X(e){return e.global&&(e.lastIndex=0),!0}class Y{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&X(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&X(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&X(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&X(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class Z{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=Z._createOpenBracketRegExp(e[0]),n=Z._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let e=0,r=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))));if(s)return r.action}if(e>=2&&n.length>0&&i.length>0)for(let e=0,t=this._brackets.length;e=2&&n.length>0)for(let e=0,t=this._brackets.length;e{const t=new Set;return{info:new le(this,e,t),closing:t}})),r=new re.VV((e=>{const t=new Set,n=new Set;return{info:new ce(this,e,t,n),opening:t,openingColorized:n}}));for(const[e,t]of n){const n=i.get(e),s=r.get(t);n.closing.add(s.info),s.opening.add(n.info)}const s=t.colorizedBracketPairs?oe(t.colorizedBracketPairs):n.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of s){const n=i.get(e),s=r.get(t);n.closing.add(s.info),s.openingColorized.add(n.info),s.opening.add(n.info)}this._openingBrackets=new Map([...i.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...r.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return K(t,e)}}function oe(e){return e.filter((([e,t])=>""!==e&&""!==t))}class ae{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class le extends ae{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}}class ce extends ae{constructor(e,t,n,i){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(e){return e["config"]===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e["config"]===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var he=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},ue=function(e,t){return function(n,i){t(n,i,e)}};class de{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const ge=(0,ee.u1)("languageConfigurationService");let fe=class extends r.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new Le),this.onDidChangeEmitter=this._register(new i.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(pe));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>n.has(e))),i=e.change.overrides.filter((([e,t])=>t.some((e=>n.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new de(void 0));else for(const e of i)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new de(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new de(e.languageId))})))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=me(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};function me(e,t,n,i){let r=t.getLanguageConfiguration(e);if(!r){if(!i.isRegisteredLanguageId(e))return new we(e,{});r=new we(e,{})}const s=be(r.languageId,n),o=ve([r.underlyingConfig,s]),a=new we(r.languageId,o);return a}fe=he([ue(0,te.pG),ue(1,v.L)],fe);const pe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function be(e,t){const n=t.getValue(pe.brackets,{overrideIdentifier:e}),i=t.getValue(pe.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:_e(n),colorizedBracketPairs:_e(i)}}function _e(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class ke{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new Ce(e,t,++this._order);return this._entries.push(n),this._resolved=null,(0,r.s)((()=>{for(let e=0;ee.configuration))))}}function ve(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const n of e)t={comments:n.comments||t.comments,brackets:n.brackets||t.brackets,wordPattern:n.wordPattern||t.wordPattern,indentationRules:n.indentationRules||t.indentationRules,onEnterRules:n.onEnterRules||t.onEnterRules,autoClosingPairs:n.autoClosingPairs||t.autoClosingPairs,surroundingPairs:n.surroundingPairs||t.surroundingPairs,autoCloseBefore:n.autoCloseBefore||t.autoCloseBefore,folding:n.folding||t.folding,colorizedBracketPairs:n.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:n.__electricCharacterSupport||t.__electricCharacterSupport};return t}class Ce{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class ye{constructor(e){this.languageId=e}}class Le extends r.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new i.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(ie.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let i=this._entries.get(e);i||(i=new ke(e),this._entries.set(e,i));const s=i.register(t,n);return this._onDidChange.fire(new ye(e)),(0,r.s)((()=>{s.dispose(),this._onDidChange.fire(new ye(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class we{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new Z(this.underlyingConfig):null,this.comments=we._handleComments(this.underlyingConfig),this.characterPair=new S(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||C.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new Y(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new se(e,this.underlyingConfig)}getWordDefinition(){return(0,C.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new P(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new J(this.brackets)),this._electricCharacter}onEnter(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null}getAutoClosingPairs(){return new L(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){const[e,i]=t.blockComment;n.blockCommentStartToken=e,n.blockCommentEndToken=i}return n}}(0,ne.v)(ge,fe,1);var Se=n(9322);class xe{constructor(e,t,n,i){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=n,this.isInvalid=i}}class Ee{constructor(e,t,n,i,r,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=i,this.nestingLevelOfEqualBracketType=r,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class Ne extends Ee{constructor(e,t,n,i,r,s,o){super(e,t,n,i,r,s),this.minVisibleColumnIndentation=o}}var Te=n(3904);function Ae(e,t,n,i){return e!==n?De(n-e,i):De(0,i-t)}const Ie=0;function Oe(e){return 0===e}const Me=2**26;function De(e,t){return e*Me+t}function Re(e){const t=e,n=Math.floor(t/Me),i=t-n*Me;return new Te.W(n,i)}function Be(e){return Math.floor(e/Me)}function Fe(e){return e}function Pe(e,t){let n=e+t;return t>=Me&&(n-=e%Me),n}function Ve(e,t){return e.reduce(((e,n)=>Pe(e,t(n))),Ie)}function ze(e,t){return e===t}function je(e,t){const n=e,i=t,r=i-n;if(r<=0)return Ie;const s=Math.floor(n/Me),o=Math.floor(i/Me),a=i-o*Me;if(s===o){const e=n-s*Me;return De(0,a-e)}return De(o-s,a)}function qe(e,t){return e=t}function $e(e){return De(e.lineNumber-1,e.column-1)}function He(e,t){const n=e,i=Math.floor(n/Me),r=n-i*Me,s=t,o=Math.floor(s/Me),a=s-o*Me;return new p.Q(i+1,r+1,o+1,a+1)}function Ke(e){const t=(0,c.uz)(e);return De(t.length-1,t[t.length-1].length)}class Ge{static fromModelContentChanges(e){const t=e.map((e=>{const t=p.Q.lift(e.range);return new Ge($e(t.getStartPosition()),$e(t.getEndPosition()),Ke(e.text))})).reverse();return t}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${Re(this.startOffset)}...${Re(this.endOffset)}) -> ${Re(this.newLength)}`}}class Qe{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Je.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return null===n?null:je(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?De(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):De(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Re(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?De(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):De(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){while(this.nextEditIdx>5;if(0===i){const e=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;while(1){const i=this.lineTokens,r=i.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(n>1500)break}const i=Ae(e,t,this.lineIdx,this.lineCharOffset);return new ft(i,0,-1,Ye.getEmpty(),new ht(i))}}class bt{constructor(e,t){this.text=e,this._offset=Ie,this.idx=0;const n=t.getRegExpStr(),i=n?new RegExp(n+"|\n","gi"):null,r=[];let s,o=0,a=0,l=0,c=0;const h=[];for(let e=0;e<60;e++)h.push(new ft(De(0,e),0,-1,Ye.getEmpty(),new ht(De(0,e))));const u=[];for(let e=0;e<60;e++)u.push(new ft(De(1,e),0,-1,Ye.getEmpty(),new ht(De(1,e))));if(i){i.lastIndex=0;while(null!==(s=i.exec(e))){const e=s.index,n=s[0];if("\n"===n)o++,a=e+1;else{if(l!==e){let t;if(c===o){const n=e-l;if(nkt(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(2===n.kind&&n.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}function kt(e){let t=(0,c.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}class vt{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=_t.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Ct(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function n(){if(t>=e.length)return null;const n=t,i=e[n].listHeight;t++;while(t=2?yt(0===n&&t===e.length?e:e.slice(n,t),!1):e[n]}let i=n(),r=n();if(!r)return i;for(let e=n();e;e=n())Lt(i,r)<=Lt(r,e)?(i=wt(i,r),r=e):r=wt(r,e);const s=wt(i,r);return s}function yt(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let n=e.length;while(n>3){const i=n>>1;for(let r=0;r=3?e[2]:null,t)}function Lt(e,t){return Math.abs(e.listHeight-t.listHeight)}function wt(e,t){return e.listHeight===t.listHeight?it.create23(e,t,null,!1):e.listHeight>t.listHeight?St(e,t):xt(t,e)}function St(e,t){e=e.toMutable();let n=e;const i=[];let r;while(1){if(t.listHeight===n.listHeight){r=t;break}if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeLastElementMutable()}for(let e=i.length-1;e>=0;e--){const t=i[e];r?t.childrenLength>=3?r=it.create23(t.unappendChild(),r,null,!1):(t.appendChildOfSameHeight(r),r=void 0):t.handleChildrenChanged()}return r?it.create23(e,r,null,!1):e}function xt(e,t){e=e.toMutable();let n=e;const i=[];while(t.listHeight!==n.listHeight){if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeFirstElementMutable()}let r=t;for(let e=i.length-1;e>=0;e--){const t=i[e];r?t.childrenLength>=3?r=it.create23(r,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(r),r=void 0):t.handleChildrenChanged()}return r?it.create23(r,e,null,!1):e}class Et{constructor(e){this.lastOffset=Ie,this.nextNodes=[e],this.offsets=[Ie],this.idxs=[]}readLongestNodeAt(e,t){if(qe(e,this.lastOffset))throw new Error("Invalid offset");this.lastOffset=e;while(1){const n=Tt(this.nextNodes);if(!n)return;const i=Tt(this.offsets);if(qe(e,i))return;if(qe(i,e))if(Pe(i,n.length)<=e)this.nextNodeAfterCurrent();else{const e=Nt(n);-1!==e?(this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const e=Nt(n);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)}}}}nextNodeAfterCurrent(){while(1){const e=Tt(this.offsets),t=Tt(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const n=Tt(this.nextNodes),i=Nt(n,this.idxs[this.idxs.length-1]);if(-1!==i){this.nextNodes.push(n.getChild(i)),this.offsets.push(Pe(e,t.length)),this.idxs[this.idxs.length-1]=i;break}this.idxs.pop()}}}function Nt(e,t=-1){while(1){if(t++,t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function Tt(e){return e.length>0?e[e.length-1]:void 0}function At(e,t,n,i){const r=new It(e,t,n,i);return r.parseDocument()}class It{constructor(e,t,n,i){if(this.tokenizer=e,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,n&&i)throw new Error("Not supported");this.oldNodeReader=n?new Et(n):void 0,this.positionMapper=new Qe(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ye.getEmpty(),0);return e||(e=it.getEmpty()),e}parseList(e,t){const n=[];while(1){let i=this.tryReadChildFromCache(e);if(!i){const n=this.tokenizer.peek();if(!n||2===n.kind&&n.bracketIds.intersects(e))break;i=this.parseChild(e,t+1)}4===i.kind&&0===i.childrenLength||n.push(i)}const i=this.oldNodeReader?Ct(n):yt(n,this.createImmutableLists);return i}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!Oe(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(n=>{if(null!==t&&!qe(n.length,t))return!1;const i=n.canBeReused(e);return i}));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new dt(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new ht(n.length);const i=e.merge(n.bracketIds),r=this.parseList(i,t+1),s=this.tokenizer.peek();return s&&2===s.kind&&(s.bracketId===n.bracketId||s.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),nt.create(n.astNode,r,s.astNode)):nt.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}function Ot(e,t){if(0===e.length)return t;if(0===t.length)return e;const n=new o.j3(Dt(e)),i=Dt(t);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let r=n.dequeue();function s(e){if(void 0===e){const e=n.takeWhile((e=>!0))||[];return r&&e.unshift(r),e}const t=[];while(r&&!Oe(e)){const[i,s]=r.splitAt(e);t.push(i),e=je(i.lengthAfter,e),r=s??n.dequeue()}return Oe(e)||t.push(new Mt(!1,e,e)),t}const a=[];function l(e,t,n){if(a.length>0&&ze(a[a.length-1].endOffset,e)){const e=a[a.length-1];a[a.length-1]=new Ge(e.startOffset,t,Pe(e.newLength,n))}else a.push({startOffset:e,endOffset:t,newLength:n})}let c=Ie;for(const e of i){const t=s(e.lengthBefore);if(e.modified){const n=Ve(t,(e=>e.lengthBefore)),i=Pe(c,n);l(c,i,e.lengthAfter),c=i}else for(const e of t){const t=c;c=Pe(c,e.lengthBefore),e.modified&&l(t,c,e.lengthAfter)}}return a}class Mt{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=je(e,this.lengthAfter);return ze(t,Ie)?[this,void 0]:this.modified?[new Mt(this.modified,this.lengthBefore,e),new Mt(this.modified,Ie,t)]:[new Mt(this.modified,e,e),new Mt(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${Re(this.lengthBefore)} -> ${Re(this.lengthAfter)}`}}function Dt(e){const t=[];let n=Ie;for(const i of e){const e=je(n,i.startOffset);Oe(e)||t.push(new Mt(!1,e,e));const r=je(i.startOffset,i.endOffset);t.push(new Mt(!0,r,i.newLength)),n=i.endOffset}return t}class Rt extends r.jG{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new i.vl,this.denseKeyProvider=new et,this.brackets=new vt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new bt(this.textModel.getValue(),e);this.initialAstWithoutTokens=At(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Ge(De(e.fromLineNumber-1,0),De(e.toLineNumber,0),De(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Ge.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=Ot(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=Ot(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const i=!1,r=i?t?.deepClone():t,s=new mt(this.textModel,this.brackets),o=At(s,e,r,n);return o}getBracketsInRange(e,t){this.flushQueue();const n=De(e.startLineNumber-1,e.startColumn-1),i=De(e.endLineNumber-1,e.endColumn-1);return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens;Pt(r,Ie,r.length,n,i,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const n=$e(e.getStartPosition()),i=$e(e.getEndPosition());return new o.c1((e=>{const r=this.initialAstWithoutTokens||this.astWithTokens,s=new Vt(e,t,this.textModel);zt(r,Ie,r.length,n,i,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Ft(t,Ie,t.length,$e(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Bt(t,Ie,t.length,$e(e))}}function Bt(e,t,n,i){if(4===e.kind||2===e.kind){const r=[];for(const i of e.children)n=Pe(t,i.length),r.push({nodeOffsetStart:t,nodeOffsetEnd:n}),t=n;for(let t=r.length-1;t>=0;t--){const{nodeOffsetStart:n,nodeOffsetEnd:s}=r[t];if(qe(n,i)){const r=Bt(e.children[t],n,s,i);if(r)return r}}return null}if(3===e.kind)return null;if(1===e.kind){const i=He(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function Ft(e,t,n,i){if(4===e.kind||2===e.kind){for(const r of e.children){if(n=Pe(t,r.length),qe(i,n)){const e=Ft(r,t,n,i);if(e)return e}t=n}return null}if(3===e.kind)return null;if(1===e.kind){const i=He(t,n);return{bracketInfo:e.bracketInfo,range:i}}return null}function Pt(e,t,n,i,r,s,o,a,l,c,h=!1){if(o>200)return!0;e:while(1)switch(e.kind){case 4:{const a=e.childrenLength;for(let h=0;h200)return!0;let l=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const h=Pe(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),l=s.push(new Ne(He(t,n),He(t,h),e.closingBracket?He(Pe(h,e.child?.length||Ie),n):void 0,o,c,e,u)),t=h,l&&e.child){const c=e.child;if(n=Pe(t,c.length),We(t,r)&&Ue(n,i)&&(l=zt(c,t,n,i,r,s,o+1,a),!l))return!1}a?.set(e.openingBracket.text,c)}else{let n=t;for(const t of e.children){const e=n;if(n=Pe(n,t.length),We(e,r)&&We(i,n)&&(l=zt(t,e,n,i,r,s,o,a),!l))return!1}}return l}class jt extends r.jG{get canBuildAST(){const e=5e6;return this.textModel.getValueLength()<=e}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new r.HE),this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new r.Cm;this.bracketPairsTree.value=qt(e.add(new Rt(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),e),e.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||o.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||o.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||o.c1.empty}findMatchingBracketUp(e,t,n){const i=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column);if(this.canBuildAST){const n=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!n)return null;const i=this.getBracketPairsInRange(p.Q.fromPositions(t,t)).findLast((e=>n.closes(e.openingBracketInfo)));return i?i.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!s)return null;const o=s.textIsBracket[t];return o?$t(this._findMatchingBracketUp(o,i,Wt(n))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(p.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,o.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),p.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const n=Wt(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,i){const r=t.getCount(),s=t.getLanguageId(i);let o=Math.max(0,e.column-1-n.maxBracketLength);for(let e=i-1;e>=0;e--){const n=t.getEndOffset(e);if(n<=o)break;if(x(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){o=n;break}}let a=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let e=i+1;e=a)break;if(x(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=n;break}}return{searchStartOffset:o,searchEndOffset:a}}_matchBracket(e,t){const n=e.lineNumber,i=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),s=i.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(o&&!x(i.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,s),c=null;while(1){const i=Q.findNextBracketInRange(o.forwardRegex,n,r,a,l);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=r.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),n=this._matchFoundBracket(i,o.textIsBracket[e],o.textIsOpenBracket[e],t);if(n){if(n instanceof Ut)return null;c=n}}a=i.endColumn-1}if(c)return c}if(s>0&&i.getStartOffset(s)===e.column-1){const o=s-1,a=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(o)).brackets;if(a&&!x(i.getStandardTokenType(o))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,a,o),c=Q.findPrevBracketInRange(a.reversedRegex,n,r,s,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),n=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(n)return n instanceof Ut?null:n}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return r?r instanceof Ut?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const i=e.languageId,r=e.reversedRegex;let s=-1,o=0;const a=(t,i,a,l)=>{while(1){if(n&&++o%100===0&&!n())return Ut.INSTANCE;const c=Q.findPrevBracketInRange(r,t,i,a,l);if(!c)break;const h=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const n=this.textModel.tokenization.getLineTokens(e),r=n.getCount(),s=this.textModel.getLineContent(e);let o=r-1,l=s.length,c=s.length;e===t.lineNumber&&(o=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let h=!0;for(;o>=0;o--){const t=n.getLanguageId(o)===i&&!x(n.getStandardTokenType(o));if(t)h?l=n.getStartOffset(o):(l=n.getStartOffset(o),c=n.getEndOffset(o));else if(h&&l!==c){const t=a(e,s,l,c);if(t)return t}h=t}if(h&&l!==c){const t=a(e,s,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageId,r=e.forwardRegex;let s=1,o=0;const a=(t,i,a,l)=>{while(1){if(n&&++o%100===0&&!n())return Ut.INSTANCE;const c=Q.findNextBracketInRange(r,t,i,a,l);if(!c)break;const h=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const n=this.textModel.tokenization.getLineTokens(e),r=n.getCount(),s=this.textModel.getLineContent(e);let o=0,l=0,c=0;e===t.lineNumber&&(o=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let h=!0;for(;o=1;e--){const s=this.textModel.tokenization.getLineTokens(e),o=s.getCount(),a=this.textModel.getLineContent(e);let l=o-1,c=a.length,h=a.length;if(e===t.lineNumber){l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1,h=t.column-1;const e=s.getLanguageId(l);n!==e&&(n=e,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let u=!0;for(;l>=0;l--){const t=s.getLanguageId(l);if(n!==t){if(i&&r&&u&&c!==h){const t=Q.findPrevBracketInRange(i.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(r,t);u=!1}n=t,i=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const o=!!i&&!x(s.getStandardTokenType(l));if(o)u?c=s.getStartOffset(l):(c=s.getStartOffset(l),h=s.getEndOffset(l));else if(r&&i&&u&&c!==h){const t=Q.findPrevBracketInRange(i.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(r,t)}u=o}if(r&&i&&u&&c!==h){const t=Q.findPrevBracketInRange(i.reversedRegex,e,a,c,h);if(t)return this._toFoundBracket(r,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const n=this.textModel.getLineCount();let i=null,r=null,s=null;for(let e=t.lineNumber;e<=n;e++){const n=this.textModel.tokenization.getLineTokens(e),o=n.getCount(),a=this.textModel.getLineContent(e);let l=0,c=0,h=0;if(e===t.lineNumber){l=n.findTokenIndexAtOffset(t.column-1),c=t.column-1,h=t.column-1;const e=n.getLanguageId(l);i!==e&&(i=e,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let u=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const i=Wt(t),r=this.textModel.getLineCount(),s=new Map;let o=[];const a=(e,t)=>{if(!s.has(e)){const n=[];for(let e=0,i=t?t.brackets.length:0;e{while(1){if(i&&++l%100===0&&!i())return Ut.INSTANCE;const a=Q.findNextBracketInRange(e.forwardRegex,t,n,r,s);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[c];if(h&&(h.isOpen(c)?o[h.index]++:h.isClose(c)&&o[h.index]--,-1===o[h.index]))return this._matchFoundBracket(a,h,!1,i);r=a.endColumn-1}return null};let h=null,u=null;for(let e=n.lineNumber;e<=r;e++){const t=this.textModel.tokenization.getLineTokens(e),i=t.getCount(),r=this.textModel.getLineContent(e);let s=0,o=0,l=0;if(e===n.lineNumber){s=t.findTokenIndexAtOffset(n.column-1),o=n.column-1,l=n.column-1;const e=t.getLanguageId(s);h!==e&&(h=e,u=this.languageConfigurationService.getLanguageConfiguration(h).brackets,a(h,u))}let d=!0;for(;st?.dispose()}}function Wt(e){if("undefined"===typeof e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class Ut{static{this.INSTANCE=new Ut}constructor(){this._searchCanceledBrand=void 0}}function $t(e){return e instanceof Ut?null:e}var Ht=n(2764),Kt=n(3711);class Gt extends r.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new Qt,this.onDidChangeEmitter=new i.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,i){if(i)return[];if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const r=this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray();return r}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new p.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Qt{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,Kt.zy)(((e,t)=>{const n=[Ht.sN,Ht.lQ,Ht.ss,Ht.l5,Ht.sH,Ht.zp],i=new Qt;t.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${e.getColor(Ht.s7)}; }`);const r=n.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const n=r[e%r.length];t.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(e)} { color: ${n}; }`)}}));var Jt=n(1337);function Xt(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Yt{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Xt(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Xt(this.oldText)}")`:`(replace@${this.oldPosition} "${Xt(this.oldText)}" with "${Xt(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const i=t.length;E.Sw(e,i,n),n+=4;for(let r=0;r0&&(this.changes=Zt(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(E.Sw(e,t?t.length:0,n),n+=4,t)for(const i of t)E.Sw(e,i.selectionStartLineNumber,n),n+=4,E.Sw(e,i.selectionStartColumn,n),n+=4,E.Sw(e,i.positionLineNumber,n),n+=4,E.Sw(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=E.bb(e,t);t+=4;for(let r=0;re.toString())).join(", ")}matchesResource(e){const t=h.r.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof rn}append(e,t,n,i,r){this._data instanceof rn&&this._data.append(e,t,n,i,r)}close(){this._data instanceof rn&&(this._data=this._data.serialize())}open(){this._data instanceof rn||(this._data=rn.deserialize(this._data))}undo(){if(h.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof rn&&(this._data=this._data.serialize());const e=rn.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(h.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof rn&&(this._data=this._data.serialize());const e=rn.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof rn&&(this._data=this._data.serialize()),this._data.byteLength+168}}class on{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=nn(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=nn(e);return this._editStackElementsMap.has(t)}setModel(e){const t=nn(h.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=nn(e.uri);if(this._editStackElementsMap.has(t)){const n=this._editStackElementsMap.get(t);return n.canAppend(e)}return!1}append(e,t,n,i,r){const s=nn(e.uri),o=this._editStackElementsMap.get(s);o.append(e,t,n,i,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=nn(e);if(this._editStackElementsMap.has(t)){const e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,tn.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function an(e){const t=e.getEOL();return"\n"===t?0:1}function ln(e){return!!e&&(e instanceof sn||e instanceof on)}class cn{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ln(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);ln(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const n=this._undoRedoService.getLastElement(this._model.uri);if(ln(n)&&n.canAppend(this._model))return n;const i=new sn(Jt.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i,t),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],an(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,i){const r=this._getOrCreateEditStackElement(e,i),s=this._model.applyEdits(t,!0),o=cn._computeCursorState(n,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),r.append(this._model,a.map((e=>e.textChange)),an(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,l.dz)(e),null}}}var hn,un=n(3654);class dn extends r.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function gn(e,t){let n=0,i=0;const r=e.length;while(ii)throw new l.D7("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide);let o=-2,a=-1,c=-2,h=-1;const u=e=>{if(-1!==o&&(-2===o||o>e-1)){o=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){o=t,a=e;break}}}if(-2===c){c=-1,h=-1;for(let t=e;t=0){c=t,h=e;break}}}};let d=-2,g=-1,f=-2,m=-1;const p=e=>{if(-2===d){d=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){d=t,g=e;break}}}if(-1!==f&&(-2===f||f=0){f=t,m=e;break}}}};let b=0,_=!0,k=0,v=!0,C=0,y=0;for(let r=0;_||v;r++){const o=e-r,l=e+r;r>1&&(o<1||o1&&(l>i||l>n)&&(v=!1),r>5e4&&(_=!1,v=!1);let f=-1;if(_&&o>=1){const e=this._computeIndentLevel(o-1);e>=0?(c=o-1,h=e,f=Math.ceil(e/this.textModel.getOptions().indentSize)):(u(o),f=this._getIndentLevelForWhitespaceLine(s,a,h))}let L=-1;if(v&&l<=i){const e=this._computeIndentLevel(l-1);e>=0?(d=l-1,g=e,L=Math.ceil(e/this.textModel.getOptions().indentSize)):(p(l),L=this._getIndentLevelForWhitespaceLine(s,g,m))}if(0!==r){if(1===r){if(l<=i&&L>=0&&y+1===L){_=!1,b=l,k=l,C=L;continue}if(o>=1&&f>=0&&f-1===y){v=!1,b=o,k=o,C=f;continue}if(b=e,k=e,C=y,0===C)return{startLineNumber:b,endLineNumber:k,indent:C}}_&&(f>=C?b=o:_=!1),v&&(L>=C?k=l:v=!1)}else y=f}return{startLineNumber:b,endLineNumber:k,indent:C}}getLinesBracketGuides(e,t,n,i){const r=[];for(let n=e;n<=t;n++)r.push([]);const s=!0,o=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new p.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let a;if(n&&o.length>0){const i=(e<=n.lineNumber&&n.lineNumber<=t?o:this.textModel.bracketPairs.getBracketPairsInRange(p.Q.fromPositions(n)).toArray()).filter((e=>p.Q.strictContainsPosition(e.range,n)));a=(0,un.Uk)(i,(e=>s||e.range.startLineNumber!==e.range.endLineNumber))?.range}const l=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,h=new bn;for(const n of o){if(!n.closingBracketRange)continue;const o=a&&n.range.equalsRange(a);if(!o&&!i.includeInactive)continue;const u=h.getInlineClassName(n.nestingLevel,n.nestingLevelOfEqualBracketType,l)+(i.highlightActive&&o?" "+h.activeClassName:""),d=n.openingBracketRange.getStartPosition(),g=n.closingBracketRange.getStartPosition(),f=i.horizontalGuides===hn.Enabled||i.horizontalGuides===hn.EnabledForActive&&o;if(n.range.startLineNumber===n.range.endLineNumber){s&&f&&r[n.range.startLineNumber-e].push(new fn(-1,n.openingBracketRange.getEndPosition().column,u,new mn(!1,g.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(g),p=this.getVisibleColumnFromPosition(n.openingBracketRange.getStartPosition()),b=Math.min(p,m,n.minVisibleColumnIndentation+1);let _=!1;const k=c.HG(this.textModel.getLineContent(n.closingBracketRange.startLineNumber)),v=k=e&&p>b&&r[d.lineNumber-e].push(new fn(b,-1,u,new mn(!1,d.column),-1,-1)),g.lineNumber<=t&&m>b&&r[g.lineNumber-e].push(new fn(b,-1,u,new mn(!_,g.column),-1,-1)))}for(const e of r)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return r}getVisibleColumnFromPosition(e){return d.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(r&&r.offSide),o=new Array(t-e+1);let a=-2,l=-1,c=-2,h=-1;for(let r=e;r<=t;r++){const t=r-e,u=this._computeIndentLevel(r-1);if(u>=0)a=r-1,l=u,o[t]=Math.ceil(u/i.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=r-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,h=t;break}}}o[t]=this._getIndentLevelForWhitespaceLine(s,l,h)}}return o}_getIndentLevelForWhitespaceLine(e,t,n){const i=this.textModel.getOptions();return-1===t||-1===n?0:t0&&a>0)return;if(l>0&&c>0)return;const h=Math.abs(a-c),u=Math.abs(o-l);if(0===h)return r.spacesDiff=u,void(u>0&&0<=l-1&&l-10?r++:p>1&&s++,kn(o,a,d,m,u),u.looksLikeAlignment&&(!n||t!==u.spacesDiff))continue;const _=u.spacesDiff;_<=c&&h[_]++,o=d,a=m}let d=n;r!==s&&(d=r{const n=h[t];n>e&&(e=n,g=t)})),4===g&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(g=2)}return{insertSpaces:d,tabSize:g}}function Cn(e){return(1&e.metadata)>>>0}function yn(e,t){e.metadata=254&e.metadata|t}function Ln(e){return(2&e.metadata)>>>1===1}function wn(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function Sn(e){return(4&e.metadata)>>>2===1}function xn(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function En(e){return(64&e.metadata)>>>6===1}function Nn(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function Tn(e){return(24&e.metadata)>>>3}function An(e,t){e.metadata=231&e.metadata|t<<3}function In(e){return(32&e.metadata)>>>5===1}function On(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class Mn{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,yn(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,xn(this,!1),Nn(this,!1),An(this,1),On(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,wn(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;const t=this.options.className;xn(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Nn(this,null!==this.options.glyphMarginClassName),An(this,this.options.stickiness),On(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Dn=new Mn(null,0,0);Dn.parent=Dn,Dn.left=Dn,Dn.right=Dn,yn(Dn,0);class Rn{constructor(){this.root=Dn,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,r,s){return this.root===Dn?[]:Un(this,e,t,n,i,r,s)}search(e,t,n,i){return this.root===Dn?[]:Wn(this,e,t,n,i)}collectNodesFromOwner(e){return jn(this,e)}collectNodesPostOrder(){return qn(this)}insert(e){$n(this,e),this._normalizeDeltaIfNecessary()}delete(e){Kn(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;while(e!==this.root)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const r=n.start+i,s=n.end+i;n.setCachedOffsets(r,s,t)}acceptReplace(e,t,n,i){const r=Vn(this,e,e+t);for(let e=0,t=r.length;en)&&(1!==i&&(2===i||t))}function Pn(e,t,n,i,r){const s=Tn(e),o=0===s||2===s,a=1===s||2===s,l=n-t,c=i,h=Math.min(l,c),u=e.start;let d=!1;const g=e.end;let f=!1;t<=u&&g<=n&&In(e)&&(e.start=t,d=!0,e.end=t,f=!0);{const e=r?1:l>0?2:0;!d&&Fn(u,o,t,e)&&(d=!0),!f&&Fn(g,a,t,e)&&(f=!0)}if(h>0&&!r){const e=l>c?2:0;!d&&Fn(u,o,t+h,e)&&(d=!0),!f&&Fn(g,a,t+h,e)&&(f=!0)}{const i=r?1:0;!d&&Fn(u,o,n,i)&&(e.start=t+c,d=!0),!f&&Fn(g,a,n,i)&&(e.end=t+c,f=!0)}const m=c-l;d||(e.start=Math.max(0,u+m)),f||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function Vn(e,t,n){let i=e.root,r=0,s=0,o=0,a=0;const l=[];let c=0;while(i!==Dn)if(Ln(i))wn(i.left,!1),wn(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else{if(!Ln(i.left)){if(s=r+i.maxEnd,sn?wn(i,!0):(a=r+i.end,a>=t&&(i.setCachedOffsets(o,a,0),l[c++]=i),wn(i,!0),i.right===Dn||Ln(i.right)||(r+=i.delta,i=i.right))}return wn(e.root,!1),l}function zn(e,t,n,i){let r=e.root,s=0,o=0,a=0;const l=i-(n-t);while(r!==Dn)if(Ln(r))wn(r.left,!1),wn(r.right,!1),r===r.parent.right&&(s-=r.parent.delta),Zn(r),r=r.parent;else{if(!Ln(r.left)){if(o=s+r.maxEnd,on?(r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),wn(r,!0)):(wn(r,!0),r.right===Dn||Ln(r.right)||(s+=r.delta,r=r.right))}wn(e.root,!1)}function jn(e,t){let n=e.root;const i=[];let r=0;while(n!==Dn)Ln(n)?(wn(n.left,!1),wn(n.right,!1),n=n.parent):n.left===Dn||Ln(n.left)?(n.ownerId===t&&(i[r++]=n),wn(n,!0),n.right===Dn||Ln(n.right)||(n=n.right)):n=n.left;return wn(e.root,!1),i}function qn(e){let t=e.root;const n=[];let i=0;while(t!==Dn)Ln(t)?(wn(t.left,!1),wn(t.right,!1),t=t.parent):t.left===Dn||Ln(t.left)?t.right===Dn||Ln(t.right)?(n[i++]=t,wn(t,!0)):t=t.right:t=t.left;return wn(e.root,!1),n}function Wn(e,t,n,i,r){let s=e.root,o=0,a=0,l=0;const c=[];let h=0;while(s!==Dn){if(Ln(s)){wn(s.left,!1),wn(s.right,!1),s===s.parent.right&&(o-=s.parent.delta),s=s.parent;continue}if(s.left!==Dn&&!Ln(s.left)){s=s.left;continue}a=o+s.start,l=o+s.end,s.setCachedOffsets(a,l,i);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),n&&Sn(s)&&(e=!1),r&&!En(s)&&(e=!1),e&&(c[h++]=s),wn(s,!0),s.right===Dn||Ln(s.right)||(o+=s.delta,s=s.right)}return wn(e.root,!1),c}function Un(e,t,n,i,r,s,o){let a=e.root,l=0,c=0,h=0,u=0;const d=[];let g=0;while(a!==Dn)if(Ln(a))wn(a.left,!1),wn(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!Ln(a.left)){if(c=l+a.maxEnd,cn)wn(a,!0);else{if(u=l+a.end,u>=t){a.setCachedOffsets(h,u,s);let e=!0;i&&a.ownerId&&a.ownerId!==i&&(e=!1),r&&Sn(a)&&(e=!1),o&&!En(a)&&(e=!1),e&&(d[g++]=a)}wn(a,!0),a.right===Dn||Ln(a.right)||(l+=a.delta,a=a.right)}}return wn(e.root,!1),d}function $n(e,t){if(e.root===Dn)return t.parent=Dn,t.left=Dn,t.right=Dn,yn(t,0),e.root=t,e.root;Hn(e,t),ei(t.parent);let n=t;while(n!==e.root&&1===Cn(n.parent))if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===Cn(t)?(yn(n.parent,0),yn(t,0),yn(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,Jn(e,n)),yn(n.parent,0),yn(n.parent.parent,1),Xn(e,n.parent.parent))}else{const t=n.parent.parent.left;1===Cn(t)?(yn(n.parent,0),yn(t,0),yn(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,Xn(e,n)),yn(n.parent,0),yn(n.parent.parent,1),Jn(e,n.parent.parent))}return yn(e.root,0),t}function Hn(e,t){let n=0,i=e.root;const r=t.start,s=t.end;while(1){const e=ti(r,s,i.start+n,i.end+n);if(e<0){if(i.left===Dn){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===Dn){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=Dn,t.right=Dn,yn(t,1)}function Kn(e,t){let n,i;if(t.left===Dn?(n=t.right,i=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===Dn?(n=t.left,i=t):(i=Gn(t.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,yn(n,0),t.detach(),Qn(),Zn(n),void(e.root.parent=Dn);const r=1===Cn(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,yn(i,Cn(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==Dn&&(i.left.parent=i),i.right!==Dn&&(i.right.parent=i)),t.detach(),r)return ei(n.parent),i!==t&&(ei(i),ei(i.parent)),void Qn();let s;ei(n),ei(n.parent),i!==t&&(ei(i),ei(i.parent));while(n!==e.root&&0===Cn(n))n===n.parent.left?(s=n.parent.right,1===Cn(s)&&(yn(s,0),yn(n.parent,1),Jn(e,n.parent),s=n.parent.right),0===Cn(s.left)&&0===Cn(s.right)?(yn(s,1),n=n.parent):(0===Cn(s.right)&&(yn(s.left,0),yn(s,1),Xn(e,s),s=n.parent.right),yn(s,Cn(n.parent)),yn(n.parent,0),yn(s.right,0),Jn(e,n.parent),n=e.root)):(s=n.parent.left,1===Cn(s)&&(yn(s,0),yn(n.parent,1),Xn(e,n.parent),s=n.parent.left),0===Cn(s.left)&&0===Cn(s.right)?(yn(s,1),n=n.parent):(0===Cn(s.left)&&(yn(s.right,0),yn(s,1),Jn(e,s),s=n.parent.left),yn(s,Cn(n.parent)),yn(n.parent,0),yn(s.left,0),Xn(e,n.parent),n=e.root));yn(n,0),Qn()}function Gn(e){while(e.left!==Dn)e=e.left;return e}function Qn(){Dn.parent=Dn,Dn.delta=0,Dn.start=0,Dn.end=0}function Jn(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==Dn&&(n.left.parent=t),n.parent=t.parent,t.parent===Dn?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,Zn(t),Zn(n)}function Xn(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==Dn&&(n.right.parent=t),n.parent=t.parent,t.parent===Dn?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,Zn(t),Zn(n)}function Yn(e){let t=e.end;if(e.left!==Dn){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==Dn){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function Zn(e){e.maxEnd=Yn(e)}function ei(e){while(e!==Dn){const t=Yn(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function ti(e,t,n,i){return e===n?t-i:e-n}class ni{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==ii)return ri(this.right);let e=this;while(e.parent!==ii){if(e.parent.left===e)break;e=e.parent}return e.parent===ii?ii:e.parent}prev(){if(this.left!==ii)return si(this.left);let e=this;while(e.parent!==ii){if(e.parent.right===e)break;e=e.parent}return e.parent===ii?ii:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const ii=new ni(null,0);function ri(e){while(e.left!==ii)e=e.left;return e}function si(e){while(e.right!==ii)e=e.right;return e}function oi(e){return e===ii?0:e.size_left+e.piece.length+oi(e.right)}function ai(e){return e===ii?0:e.lf_left+e.piece.lineFeedCnt+ai(e.right)}function li(){ii.parent=ii}function ci(e,t){const n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==ii&&(n.left.parent=t),n.parent=t.parent,t.parent===ii?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function hi(e,t){const n=t.left;t.left=n.right,n.right!==ii&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===ii?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function ui(e,t){let n,i;if(t.left===ii?(i=t,n=i.right):t.right===ii?(i=t,n=i.left):(i=ri(t.right),n=i.right),i===e.root)return e.root=n,n.color=0,t.detach(),li(),void(e.root.parent=ii);const r=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,fi(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,fi(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==ii&&(i.left.parent=i),i.right!==ii&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,fi(e,i)),t.detach(),n.parent.left===n){const t=oi(n),i=ai(n);if(t!==n.parent.size_left||i!==n.parent.lf_left){const r=t-n.parent.size_left,s=i-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=i,gi(e,n.parent,r,s)}}if(fi(e,n.parent),r)return void li();let s;while(n!==e.root&&0===n.color)n===n.parent.left?(s=n.parent.right,1===s.color&&(s.color=0,n.parent.color=1,ci(e,n.parent),s=n.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.right.color&&(s.left.color=0,s.color=1,hi(e,s),s=n.parent.right),s.color=n.parent.color,n.parent.color=0,s.right.color=0,ci(e,n.parent),n=e.root)):(s=n.parent.left,1===s.color&&(s.color=0,n.parent.color=1,hi(e,n.parent),s=n.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,n=n.parent):(0===s.left.color&&(s.right.color=0,s.color=1,ci(e,s),s=n.parent.left),s.color=n.parent.color,n.parent.color=0,s.left.color=0,hi(e,n.parent),n=e.root));n.color=0,li()}function di(e,t){fi(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,ci(e,t)),t.parent.color=0,t.parent.parent.color=1,hi(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,hi(e,t)),t.parent.color=0,t.parent.parent.color=1,ci(e,t.parent.parent))}e.root.color=0}function gi(e,t,n,i){while(t!==e.root&&t!==ii)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function fi(e,t){let n=0,i=0;if(t!==e.root){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t!==e.root){t=t.parent,n=oi(t.left)-t.size_left,i=ai(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i;while(t!==e.root&&(0!==n||0!==i))t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}}ii.parent=ii,ii.left=ii,ii.right=ii,ii.color=0;var mi=n(2773);const pi=65535;function bi(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class _i{constructor(e,t,n,i,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=r}}function ki(e,t=!0){const n=[0];let i=1;for(let t=0,r=e.length;t126)&&(o=!1)}const a=new _i(bi(e),i,r,s,o);return e.length=0,a}class Ci{constructor(e,t,n,i,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=r}}class yi{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Li{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==ii&&e.iterate(e.root,(e=>(e!==ii&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class wi{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const n=this._cache;for(let i=0;i=e)&&(n[i]=null,t=!0)}if(t){const e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class Si{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new yi("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ii,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let t=0,n=e.length;t0){e[t].lineStarts||(e[t].lineStarts=ki(e[t].buffer));const n=new Ci(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),i=this.rbInsertRight(i,n)}this._searchCache=new wi(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=pi,n=t-Math.floor(t/3),i=2*n;let r="",s=0;const o=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(s<=n||s+l0){const t=r.replace(/\r\n|\r|\n/g,e);o.push(new yi(t,ki(t)))}this.create(o,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Li(this,e)}getOffsetAt(e,t){let n=0,i=this.root;while(i!==ii)if(i.left!==ii&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;const r=this.getAccumulatedValue(i,e-i.lf_left-2);return n+(r+t-1)}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const i=e;while(t!==ii)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,0===r.index){const e=this.getOffsetAt(n+1,1),t=i-e;return new m.y(n+1,t+1)}return new m.y(n+1,r.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===ii){const t=this.getOffsetAt(n+1,1),r=i-e-t;return new m.y(n+1,r+1)}t=t.right}return new m.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){const n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(r+e.remainder,r+t.remainder)}let n=e.node;const i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let s=i.substring(r+e.remainder,r+n.piece.length);n=n.next();while(n!==ii){const e=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=e.substring(i,i+t.remainder);break}s+=e.substr(i,n.piece.length),n=n.next()}return s}getLinesContent(){const e=[];let t=0,n="",i=!1;return this.iterate(this.root,(r=>{if(r===ii)return!0;const s=r.piece;let o=s.length;if(0===o)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,c=s.start.line,h=s.end.line;let u=l[c]+s.start.column;if(i&&(10===a.charCodeAt(u)&&(u++,o--),e[t++]=n,n="",i=!1,0===o))return!0;if(c===h)return this._EOLNormalized||13!==a.charCodeAt(u+o-1)?n+=a.substr(u,o):(i=!0,n+=a.substr(u,o-1)),!0;n+=this._EOLNormalized?a.substring(u,Math.max(u,l[c+1]-this._EOLLength)):a.substring(u,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let i=c+1;ie+g,t.reset(0)):(_=u.buffer,k=e=>e,t.reset(g));do{if(m=t.next(_),m){if(k(m.index)>=f)return c;this.positionInBuffer(e,k(m.index)-d,b);const t=this.getLineFeedCnt(e.piece.bufferIndex,r,b),s=b.line===r.line?b.column-r.column+i:b.column+1,o=s+m[0].length;if(h[c++]=(0,mi.dr)(new p.Q(n+t,s,n+t,o),m,a),k(m.index)+m[0].length>=f)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,n,i){const r=[];let s=0;const o=new mi.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,o,e.startLineNumber,e.startColumn,c,h,t,n,i,s,r),r;let u=e.startLineNumber,d=a.node;while(d!==l.node){const l=this.getLineFeedCnt(d.piece.bufferIndex,c,d.piece.end);if(l>=1){const a=this._buffers[d.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),g=a[c.line+l],f=u===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(d,o,u,f,c,this.positionInBuffer(d,g-h),t,n,i,s,r),s>=i)return r;u+=l}const h=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const a=this.getLineContent(u).substring(h,e.endColumn-1);return s=this._findMatchesInLine(t,o,a,e.endLineNumber,h,s,r,n,i),r}if(s=this._findMatchesInLine(t,o,this.getLineContent(u).substr(h),u,h,s,r,n,i),s>=i)return r;u++,a=this.nodeAt2(u,1),d=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){const a=u===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(u).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,o,l,e.endLineNumber,a,s,r,n,i),r}const g=u===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,o,u,g,c,h,t,n,i,s,r),r}_findMatchesInLine(e,t,n,i,r,s,o,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=n.length;let u=-a;while(-1!==(u=n.indexOf(t,u+a)))if((!c||(0,mi.wC)(c,n,h,u,a))&&(o[s++]=new Se.Dg(new p.Q(i,u+1+r,i,u+1+a+r),null),s>=l))return s;return s}let h;t.reset(0);do{if(h=t.next(n),h&&(o[s++]=(0,mi.dr)(new p.Q(i,h.index+1+r,i,h.index+1+h[0].length+r),h,a),s>=l))return s}while(h);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==ii){const{node:n,remainder:i,nodeStartOffset:r}=this.nodeAt(e),s=n.piece,o=s.bufferIndex,a=this.positionInBuffer(n,i);if(0===n.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&r+s.length===e&&t.lengthe){const e=[];let r=new Ci(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(o,s.end)-this.offsetInBuffer(o,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){const e=this.nodeCharCodeAt(n,i);if(10===e){const e={line:r.start.line+1,column:0};r=new Ci(r.bufferIndex,e,r.end,this.getLineFeedCnt(r.bufferIndex,e,r.end),r.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){const r=this.nodeCharCodeAt(n,i-1);if(13===r){const r=this.positionInBuffer(n,i-1);this.deleteNodeTail(n,r),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a)}else this.deleteNodeTail(n,a);const l=this.createNewPieces(t);r.length>0&&this.rbInsertRight(n,r);let c=n;for(let e=0;e=0;e--)r=this.rbInsertLeft(r,i[e]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]);let r=i;for(let e=1;e=u))break;l=h+1}}return n?(n.line=h,n.column=a-d,null):{line:h,column:a-d}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;const i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;const r=i[n.line+1],s=i[n.line]+n.column;if(r>s+1)return n.line-t.line;const o=s-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(o)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){const n=this._buffers[e].lineStarts;return n[t.line]+t.column}deleteNodes(e){for(let t=0;tpi){const t=[];while(e.length>pi){const n=e.charCodeAt(pi-1);let i;13===n||n>=55296&&n<=56319?(i=e.substring(0,pi-1),e=e.substring(pi-1)):(i=e.substring(0,pi),e=e.substring(pi));const r=ki(i);t.push(new Ci(this._buffers.length,{line:0,column:0},{line:r.length-1,column:i.length-r[r.length-1]},r.length-1,i.length)),this._buffers.push(new yi(i,r))}const n=ki(e);return t.push(new Ci(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new yi(e,n)),t}let t=this._buffers[0].buffer.length;const n=ki(e,!1);let i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let e=0;e=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const i=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:r,nodeStartLineNumber:s-(e-1-n.lf_left)}),a.substring(l+i,l+o-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(n,e-n.lf_left-2),r=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=r.substring(s+t,s+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right}}n=n.next();while(n!==ii){const e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const r=this.getAccumulatedValue(n,0),s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=e.substring(s,s+r-t),i}{const t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=e.substr(t,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;while(e!==ii)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){const n=e.piece,i=this.positionInBuffer(e,t),r=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(t!==r)return{index:t,remainder:0}}return{index:r,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;const n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[r]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),s=t,o=this.offsetInBuffer(n.bufferIndex,s),a=this.getLineFeedCnt(n.bufferIndex,n.start,s),l=a-i,c=o-r,h=n.length+c;e.piece=new Ci(n.bufferIndex,n.start,s,a,h),gi(this,e,c,l)}deleteNodeHead(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),s=t,o=this.getLineFeedCnt(n.bufferIndex,s,n.end),a=this.offsetInBuffer(n.bufferIndex,s),l=o-i,c=r-a,h=n.length+c;e.piece=new Ci(n.bufferIndex,s,n.end,o,h),gi(this,e,c,l)}shrinkNode(e,t,n){const i=e.piece,r=i.start,s=i.end,o=i.length,a=i.lineFeedCnt,l=t,c=this.getLineFeedCnt(i.bufferIndex,i.start,l),h=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,r);e.piece=new Ci(i.bufferIndex,i.start,l,c,h),gi(this,e,h-o,c-a);const u=new Ci(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(d)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const r=ki(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;const n={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,i=0;while(n!==ii)if(n.left!==ii&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(r+t-1,s),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:i};t-=n.piece.length-r;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}n=n.next();while(n!==ii){if(n.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(n,0),i=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:i}}if(n.piece.length>=t-1){const e=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:e}}t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===ii||0===e.piece.lineFeedCnt)return!1;const t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,r=n[i]+t.start.column;if(i===n.length-1)return!1;const s=n[i+1];return!(s>r+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(r)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==ii&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const n=[],i=this._buffers[e.piece.bufferIndex].lineStarts;let r;r=0===e.piece.end.column?{line:e.piece.end.line-1,column:i[e.piece.end.line]-i[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,o=e.piece.lineFeedCnt-1;e.piece=new Ci(e.piece.bufferIndex,e.piece.start,r,o,s),gi(this,e,-1,-1),0===e.piece.length&&n.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Ci(t.piece.bufferIndex,a,t.piece.end,c,l),gi(this,t,-1,-1),0===t.piece.length&&n.push(t);const h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=s;const f=this._doApplyEdits(a);let m=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const n=d[e].oldContent,i=this.getLineContent(t);0!==i.length&&i!==n&&-1===c.HG(i)&&m.push(t)}}return this._onDidChangeContent.fire(),new Se.F4(g,f,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,i=e[e.length-1].range,r=new p.Q(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn);let s=n.startLineNumber,o=n.startColumn;const a=[];for(let n=0,i=e.length;n0&&a.push(i.text),s=r.endLineNumber,o=r.endColumn}const l=a.join(""),[c,h,d]=(0,u.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(xi._sortOpsDescending);const t=[];for(let n=0;n0){const e=o.eolCount+1;c=1===e?new p.Q(a,l,a,l+o.firstLineLength):new p.Q(a,l,a+e-1,o.lastLineLength+1)}else c=new p.Q(a,l,a,l);n=c.endLineNumber,i=c.endColumn,t.push(c),r=o}return t}static _sortOpsAscending(e,t){const n=p.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){const n=p.Q.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class Ei{constructor(e,t,n,i,r,s,o,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=r,this._containsRTL=s,this._containsUnusualLineTerminators=o,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,i=n.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=vi(this._tmpLineStarts,e);this.chunks.push(new yi(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=c.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=c.$X(e)))}finish(e=!0){return this._finish(),new Ei(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=ki(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Ti=n(4544),Ai=n(5350),Ii=n(3723),Oi=n(4240),Mi=n(371);const Di=new class{clone(){return this}equals(e){return this===e}};function Ri(e,t){const n=new Uint32Array(2);return n[0]=0,n[1]=(32768|e|2<<24)>>>0,new Ai.rY(n,null===t?Di:t)}class Bi{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(0===t)return void this.insert(e,n);if(0===n)return void this.delete(e,t);const i=this._store.slice(0,e),r=this._store.slice(e+t),s=Fi(n,this._default);this._store=i.concat(s,r)}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const n=[];for(let e=0;e0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e)return void n.appendLineTokens(t)}this._tokens.push(new Pi(e,[t]))}finalize(){return this._tokens}}class zi{static{this.defaultTokenMetadata=33587200}static createEmpty(e,t){const n=zi.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=n,new zi(i,e,t)}static createFromTextAndMetadata(e,t){let n=0,i="";const r=new Array;for(const{text:t,metadata:s}of e)r.push(n+t.length,s),n+=t.length,i+=t;return new zi(new Uint32Array(r),i,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=n}equals(e){return e instanceof zi&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const i=t<<1,r=i+(n<<1);for(let t=i;t0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)],n=gt.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return gt.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return gt.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return gt.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return gt.x.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return gt.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return zi.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new ji(this,e,t,n)}static convertToEndOffset(e,t){const n=e.length>>>1,i=n-1;for(let t=0;t>>1)-1;while(nt&&(i=r)}return n}withInserted(e){if(0===e.length)return this;let t=0,n=0,i="";const r=new Array;let s=0;while(1){const o=ts){i+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];r.push(i.length,e),s=a.offset}i+=a.text,r.push(i.length,a.tokenMetadata),n++}}return new zi(new Uint32Array(r),i,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),n=this.getEndOffset(e),i=this._text.substring(t,n);return i}forEach(e){const t=this.getCount();for(let n=0;n=n)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof ji&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,n=this._source.getStartOffset(t),i=this._source.getEndOffset(t);let r=this._source.getTokenText(t);return nthis._endOffset&&(r=r.substring(0,r.length-(i-this._endOffset))),r}forEach(e){for(let t=0;tt)break;const r=this._textModel.getLineContent(i.lineNumber),s=Ki(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i.startState);e.add(i.lineNumber,s.tokens),this.store.setEndState(i.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const n=this.getStartState(e.lineNumber);if(!n)return 0;const i=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),s=r.substring(0,e.column-1)+t+r.substring(e.column-1),o=Ki(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n),a=new zi(o.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,n){const i=e.lineNumber,r=e.column,s=this.getStartState(i);if(!s)return null;const o=this._textModel.getLineContent(i),a=o.substring(0,r-1)+n+o.substring(r-1+t),l=this._textModel.getLanguageIdAtPosition(i,0),c=Ki(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s),h=new zi(c.tokens,a,this._languageIdCodec);return h}hasAccurateTokensForLine(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&r>=1;r--){const e=this._textModel.getLineFirstNonWhitespaceColumn(r);if(0!==e&&(e0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}}class Hi{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Mi.L(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Mi.L(n.start,e):this._ranges.splice(t,1,new Mi.L(n.start,e),new Mi.L(e+1,n.endExclusive))}}addRange(e){Mi.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;while(!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive))n++;let i=n;while(!(i>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function Ki(e,t,n,i,r,s){let o=null;if(n)try{o=n.tokenizeEncoded(i,r,s.clone())}catch(e){(0,l.dz)(e)}return o||(o=Ri(e.encodeLanguageId(t),s)),zi.convertToEndOffset(o.tokens,i.length),o}class Gi{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,Ii.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;const i=this._tokenizeOneInvalidLine(t);if(i>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Ti.M(e,t))}}class Qi{constructor(){this._onDidChangeVisibleRanges=new i.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Ji((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Ji{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const n=e.map((e=>new Ti.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}class Xi extends r.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Ii.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,o.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class Yi extends r.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new i.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class Zi extends Yi{constructor(e,t,n,i){super(t,n,i),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=Ai.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new zi(n,t,this._languageIdCodec)}return zi.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLineWithEdit(e,t,n){return null}get hasTokens(){const e=void 0!==this._treeSitterService.getParseResult(this._textModel);return e}}var er=n(5863);const tr=new Uint32Array(0).buffer;class nr{static deleteBeginning(e,t){return null===e||e===tr?e:nr.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===tr)return e;const n=ir(e),i=n[n.length-2];return nr.delete(e,t,i)}static delete(e,t,n){if(null===e||e===tr||t===n)return e;const i=ir(e),r=i.length>>>1;if(0===t&&i[i.length-2]===n)return tr;const s=zi.findIndexInTokensArray(i,t),o=s>0?i[s-1<<1]:0,a=i[s<<1];if(nc&&(i[l++]=t,i[l++]=i[1+(e<<1)],c=t)}if(l===i.length)return e;const u=new Uint32Array(l);return u.set(i.subarray(0,l),0),u.buffer}static append(e,t){if(t===tr)return e;if(e===tr)return t;if(null===e)return e;if(null===t)return null;const n=ir(e),i=ir(t),r=i.length>>>1,s=new Uint32Array(n.length+i.length);s.set(n,0);let o=n.length;const a=n[n.length-2];for(let e=0;e>>1;let s=zi.findIndexInTokensArray(i,t);if(s>0){const e=i[s-1<<1];e===t&&s--}for(let e=s;e0}getTokens(e,t,n){let i=null;if(t1&&(t=gt.x.getLanguageId(i[1])!==e),!t)return tr}if(!i||0===i.length){const n=new Uint32Array(2);return n[0]=t,n[1]=sr(e),n.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const n=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=nr.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=nr.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n=this._len||(0!==t?(this._lineTokens[i]=nr.deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=nr.insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[i]=nr.insert(this._lineTokens[i],e.column-1,n))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const n=[];for(let i=0,r=e.length;i>>0}class or{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const i=t[0].getRange(),r=t[t.length-1].getRange();if(!i||!r)return e;n=e.plusRange(i).plusRange(r)}let i=null;for(let e=0,t=this._pieces.length;en.endLineNumber){i=i||{index:e};break}if(r.removeTokens(n),r.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(r.endLineNumbern.endLineNumber){i=i||{index:e};continue}const[s,o]=r.split(n);s.isEmpty()?i=i||{index:e}:o.isEmpty()||(this._pieces.splice(e,1,s,o),e++,t++,i=i||{index:e})}return i=i||{index:this._pieces.length},t.length>0&&(this._pieces=o.nK(this._pieces,i.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const n=this._pieces;if(0===n.length)return t;const i=or._findFirstPieceWithLine(n,e),r=n[i].getLineTokens(e);if(!r)return t;const s=t.getCount(),o=r.getCount();let a=0;const l=[];let c=0,h=0;const u=(e,t)=>{e!==h&&(h=e,l[c++]=e,l[c++]=t)};for(let e=0;e>>0,c=~l>>>0;while(at)){while(r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber)r--;return r}i=r-1}}return n}acceptEdit(e,t,n,i,r){for(const s of this._pieces)s.acceptEdit(e,t,n,i,r)}}var ar,lr=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},cr=function(e,t){return function(n,i){t(n,i,e)}};let hr=ar=class extends dn{constructor(e,t,n,s,o,a,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=s,this._languageService=o,this._languageConfigurationService=a,this._treeSitterService=l,this._semanticTokens=new or(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new i.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new i.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new i.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new r.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(i.Jh.filter(Ai.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new ur(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new Zi(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){Ai.OB.get(this._languageId)?this._tokens instanceof Zi||this.createTokens(!0):this._tokens instanceof ur||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,n,i]=(0,u.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,n,i,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new l.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this._tokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),i=this.getLineTokens(t.lineNumber),r=i.findTokenIndexAtOffset(t.column-1),[s,o]=ar._findLanguageBoundaries(i,r),a=(0,C.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(r>0&&s===t.column-1){const[s,o]=ar._findLanguageBoundaries(i,r-1),a=(0,C.Th)(t.column,this.getLanguageConfiguration(i.getLanguageId(r-1)).getWordDefinition(),n.substring(s,o),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let r=t;r>=0&&e.getLanguageId(r)===n;r--)i=e.getStartOffset(r);let r=e.getLineContent().length;for(let i=t,s=e.getCount();i{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(i.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let n=this._attachedViewStates.get(e);n||(n=new Xi((()=>this.refreshRanges(n.lineRanges))),this._attachedViewStates.set(e,n)),n.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new Ui(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Ai.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,l.dz)(e),[null,null]}return[e,t]},[n,i]=t();if(this._tokenizer=n&&i?new Wi(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{if(2===this._backgroundTokenizationState)return;const e=2;this._backgroundTokenizationState=e,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(e,t)=>{if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&this._tokenizer?.store.setEndState(e,t)}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Gi(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),n?.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new rr(this._languageIdCodec),this._debugBackgroundStates=new Ui(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,n]=(0,u.W)(t.text);this._tokens.acceptEdit(t.range,e,n),this._debugBackgroundTokens?.acceptEdit(t.range,e,n)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Ti.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const n=new Vi,{heuristicTokens:i}=this._tokenizer.tokenizeHeuristically(n,e,t),r=this.setTokens(n.finalize());if(i)for(const e of r.changes)this._backgroundTokenizer.value?.requestTokens(e.fromLineNumber,e.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new Vi;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const i=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(i)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;const i=this._textModel.validatePosition(new m.y(e,t));return this.forceTokenization(i.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(i,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;const i=this._textModel.validatePosition(e);return this.forceTokenization(i.lineNumber),this._tokenizer.tokenizeLineWithEdit(i,t,n)}get hasTokens(){return this._tokens.hasTokens}}class dr{constructor(){this.changeType=1}}class gr{static applyInjectedText(e,t){if(!t||0===t.length)return e;let n="",i=0;for(const r of t)n+=e.substring(i,r.column-1),i=r.column-1,n+=r.options.content;return n+=e.substring(i),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new gr(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new gr(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,n,i,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=i,this.order=r}}class fr{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class mr{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class pr{constructor(e,t,n,i){this.changeType=4,this.injectedTexts=i,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class br{constructor(){this.changeType=5}}class _r{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},xr=function(e,t){return function(n,i){t(n,i,e)}};function Er(e){const t=new Ni;return t.acceptChunk(e),t.finish()}function Nr(e){const t=new Ni;let n;while("string"===typeof(n=e.read()))t.acceptChunk(n);return t.finish()}function Tr(e,t){let n;return n="string"===typeof e?Er(e):Se.nk(e)?Nr(e):e,n.create(t)}let Ar=0;const Ir=999,Or=1e4;class Mr{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,n=0;do{const i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}while(1)}}const Dr=()=>{throw new Error("Invalid change accessor")};let Rr=class extends r.jG{static{wr=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:_.tabSize,indentSize:_.indentSize,insertSpaces:_.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:_.trimAutoWhitespace,largeFileOptimizations:_.largeFileOptimizations,bracketPairColorizationOptions:_.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const n=vn(e,t.tabSize,t.insertSpaces);return new Se.X2({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Se.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,r.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,s=null,o,a,l,u){super(),this._undoRedoService=o,this._languageService=a,this._languageConfigurationService=l,this.instantiationService=u,this._onWillDispose=this._register(new i.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Jr((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new i.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new i.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new i.vl),this._eventEmitter=this._register(new Xr),this._languageSelectionListener=this._register(new r.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new Qi,Ar++,this.id="$model"+Ar,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource="undefined"===typeof s||null===s?h.r.parse("inmemory://model/"+Ar):s,this._attachedEditorCount=0;const{textBuffer:d,disposable:g}=Tr(e,n.defaultEOL);this._buffer=d,this._bufferDisposable=g,this._options=wr.resolveOptions(this._buffer,n);const f="string"===typeof t?t:t.languageId;"string"!==typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new jt(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new pn(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Gt(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(hr,this,this._bracketPairs,f,this._attachedViews);const m=this._buffer.getLineCount(),b=this._buffer.getValueLengthInRange(new p.Q(1,1,m,this._buffer.getLineLength(m)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=b>wr.LARGE_FILE_SIZE_THRESHOLD||m>wr.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=b>wr.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=b>wr._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=c.tk(Ar),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new zr,this._commandManager=new cn(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new xi([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=r.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new l.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new vr(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e||void 0===e)throw(0,l.Qg)();const{textBuffer:t,disposable:n}=Tr(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,r,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:r,isRedoing:s,isFlush:o}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new zr,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new _r([new dr],this._versionId,!1,!1),this._createContentChanged2(new p.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),s=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new _r([new br],this._versionId,!1,!1),this._createContentChanged2(new p.Q(1,1,r,s),0,i,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const n=this._buffer.getLineLength(i);n>=Or?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!==typeof e.indentSize?e.indentSize:this._options.originalIndentSize,i="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,r="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s="undefined"!==typeof e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,o=new Se.X2({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:s});if(this._options.equals(o))return;const a=this._options.createChangeEvent(o);this._options=o,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const n=vn(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),f(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(c._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new Mr(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let r=Math.floor("number"!==typeof n||isNaN(n)?1:n),s=Math.floor("number"!==typeof i||isNaN(i)?1:i);if(r<1)r=1,s=1;else if(r>t)r=t,s=this.getLineMaxColumn(r);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(r);s>=e&&(s=e)}const o=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!==typeof o||isNaN(o)?1:o),c=Math.floor("number"!==typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return n===r&&i===s&&o===l&&a===c&&e instanceof p.Q&&!(e instanceof b.L)?e:new p.Q(r,s,l,c)}_isValidPosition(e,t,n){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const i=this._buffer.getLineCount();if(e>i)return!1;if(1===t)return!0;const r=this.getLineMaxColumn(e);if(t>r)return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(c.pc(n))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor("number"!==typeof e||isNaN(e)?1:e),r=Math.floor("number"!==typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(i<1)return new m.y(1,1);if(i>s)return new m.y(s,this.getLineMaxColumn(s));if(r<=1)return new m.y(i,1);const o=this.getLineMaxColumn(i);if(r>=o)return new m.y(i,o);if(1===n){const e=this._buffer.getLineCharCode(i,r-2);if(c.pc(e))return new m.y(i,r-1)}return new m.y(i,r)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof m.y&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(r,s,0))return!1;if(1===t){const e=i>1?this._buffer.getLineCharCode(n,i-2):0,t=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,o=c.pc(e),a=c.pc(t);return!o&&!a}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof p.Q&&!(e instanceof b.L)&&this._isValidRange(e,t))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,s=n.column,o=i.lineNumber,a=i.column;if(1===t){const e=s>1?this._buffer.getLineCharCode(r,s-2):0,t=a>1&&a<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,a-2):0,n=c.pc(e),i=c.pc(t);return n||i?r===o&&s===a?new p.Q(r,s-1,o,a-1):n&&i?new p.Q(r,s-1,o,a+1):n?new p.Q(r,s-1,o,a):new p.Q(r,s,o,a+1):new p.Q(r,s,o,a)}return new p.Q(r,s,o,a)}modifyPosition(e,t){this._assertNotDisposed();const n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new p.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,r,s,o=Ir){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>p.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>p.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!n&&e.indexOf("\n")<0){const t=new mi.lt(e,n,i,r),a=t.parseSearchRequest();if(!a)return[];c=e=>this.findMatchesLineByLine(e,a,s,o)}else c=t=>mi.hB.findMatches(this,new mi.lt(e,n,i,r),t,s,o);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new mi.lt(e,n,i,r),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let c=new p.Q(o.lineNumber,o.column,l,this.getLineMaxColumn(l)),h=this.findMatchesLineByLine(c,a,s,1);return mi.hB.findNextMatch(this,new mi.lt(e,n,i,r),o,s),h.length>0?h[0]:(c=new p.Q(1,1,o.lineNumber,this.getLineMaxColumn(o.lineNumber)),h=this.findMatchesLineByLine(c,a,s,1),h.length>0?h[0]:null)}return mi.hB.findNextMatch(this,new mi.lt(e,n,i,r),o,s)}findPreviousMatch(e,t,n,i,r,s){this._assertNotDisposed();const o=this.validatePosition(t);return mi.hB.findPreviousMatch(this,new mi.lt(e,n,i,r),o,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Se.Wo?e:new Se.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n({range:this.validateRange(e.range),text:e.text})));let i=!0;if(e)for(let t=0,r=e.length;tr.endLineNumber,o=r.startLineNumber>t.endLineNumber;if(!i&&!o){s=!0;break}}if(!s){i=!1;break}}if(i)for(let e=0,i=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&(!(i===t.startLineNumber&&t.startColumn===r&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(0))&&!(i===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&o&&o.length>0&&"\n"===o.charAt(o.length-1)))){s=!1;break}}if(s){const e=new p.Q(i,1,i,r);t.push(new Se.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,i)}_applyUndo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new p.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}}));this._applyUndoRedoEdits(r,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const r=e.map((e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new p.Q(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}}));this._applyUndoRedoEdits(r,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,r,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),s=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e=0;t--){const n=l+t,i=p+t;C.takeFromEndWhile((e=>e.lineNumber>i));const r=C.takeFromEndWhile((e=>e.lineNumber===i));e.push(new fr(n,this.getLineContent(i),r))}if(ge.lineNumbere.lineNumber===t))}e.push(new pr(i+1,l+d,h,c))}t+=f}this._emitContentChangedEvent(new _r(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===i.reverseEdits?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e),n=t.map((e=>new fr(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new kr(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(t,n)=>this._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Qr(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)};let i=null;try{i=t(n)}catch(e){(0,l.dz)(e)}return n.addDecoration=Dr,n.changeDecoration=Dr,n.changeDecorationOptions=Dr,n.removeDecoration=Dr,n.deltaDecorations=Dr,i}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,l.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Gr[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const r=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),o=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,r),i.setOptions(Gr[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,n=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1,r=!1){const s=this.getLineCount(),a=Math.min(s,Math.max(1,e)),l=Math.min(s,Math.max(1,t)),c=this.getLineMaxColumn(l),h=new p.Q(a,1,l,c),u=this._getDecorationsInRange(h,n,i,r);return(0,o.E4)(u,this._decorationProvider.getDecorationsInRange(h,n,i)),u}getDecorationsInRange(e,t=0,n=!1,i=!1,r=!1){const s=this.validateRange(e),a=this._getDecorationsInRange(s,t,n,r);return(0,o.E4)(a,this._decorationProvider.getDecorationsInRange(s,t,n,i)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return gr.fromDecorations(i).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,i){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,s,t,n,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(n.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),s=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!(!n.options.overviewRuler||!n.options.overviewRuler.color),r=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(n.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=i!==r,o=Pr(t)!==Vr(n);s||o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,i=!1){const r=this.getVersionId(),s=t.length;let o=0;const a=n.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(a);while(othis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Br(this.getLineContent(e))+1}};function Br(e){let t=0;for(const n of e){if(" "!==n&&"\t"!==n)break;t++}return t}function Fr(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Pr(e){return!!e.after||!!e.before}function Vr(e){return!!e.options.after||!!e.options.before}Rr=wr=Sr([xr(4,Cr),xr(5,v.L),xr(6,ge),xr(7,ee._Y)],Rr);class zr{constructor(){this._decorationsTree0=new Rn,this._decorationsTree1=new Rn,this._injectedTextDecorationsTree=new Rn}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)null===n.range&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,i,r,s){const o=e.getVersionId(),a=this._intervalSearch(t,n,i,r,o,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,n,i,r,s){const o=this._decorationsTree0.intervalSearch(e,t,n,i,r,s),a=this._decorationsTree1.intervalSearch(e,t,n,i,r,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,n,i,r,s);return o.concat(a).concat(l)}getInjectedTextInInterval(e,t,n,i){const r=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,n,i,!1,r,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const n=e.getVersionId(),i=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,i).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,n,i,r){const s=e.getVersionId(),o=this._search(t,n,i,s,r);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,i,r){if(n)return this._decorationsTree1.search(e,t,i,r);{const n=this._decorationsTree0.search(e,t,i,r),s=this._decorationsTree1.search(e,t,i,r),o=this._injectedTextDecorationsTree.search(e,t,i,r);return n.concat(s).concat(o)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),i=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){Vr(e)?this._injectedTextDecorationsTree.insert(e):Fr(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Vr(e)?this._injectedTextDecorationsTree.delete(e):Fr(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Vr(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Fr(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i),this._injectedTextDecorationsTree.acceptReplace(e,t,n,i)}}function jr(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class qr{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Wr extends qr{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:Se.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class Ur{constructor(e){this.position=e?.position??Se.ZS.Center,this.persistLane=e?.persistLane}}class $r extends qr{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?a.Q1.fromHex(e):t.getColor(e.id)}}class Hr{static from(e){return e instanceof Hr?e:new Hr(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Kr{static register(e){return new Kr(e)}static createDynamic(e){return new Kr(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?jr(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?jr(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Wr(e.overviewRuler):null,this.minimap=e.minimap?new $r(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Ur(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?jr(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?jr(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?jr(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?c.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?jr(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?jr(e.marginClassName):null,this.inlineClassName=e.inlineClassName?jr(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?jr(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?jr(e.afterContentClassName):null,this.after=e.after?Hr.from(e.after):null,this.before=e.before?Hr.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}Kr.EMPTY=Kr.register({description:"empty"});const Gr=[Kr.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Kr.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Kr.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Kr.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Qr(e){return e instanceof Kr?e:Kr.createDynamic(e)}class Jr extends r.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new i.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Xr extends r.jG{constructor(){super(),this._fastEmitter=this._register(new i.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new i.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}var Yr,Zr=n(6151),es=n(5647),ts=n(6657),ns=n(5603),is=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},rs=function(e,t){return function(n,i){t(n,i,e)}};function ss(e){return e.toString()}class os{constructor(e,t,n){this.model=e,this._modelEventListeners=new r.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>n(e,t))))}dispose(){this._modelEventListeners.dispose()}}const as=s.j9||s.zx?1:2;class ls{constructor(e,t,n,i,r,s,o,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=r,this.sha1=s,this.versionId=o,this.alternativeVersionId=a}}let cs=class extends r.jG{static{Yr=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,n,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=r,this._onModelAdded=this._register(new i.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new i.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new i.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let n=_.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let i="tabSize";if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(i=Math.max(t,1))}let r=_.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=as;const o=e.eol;"\r\n"===o?s=2:"\n"===o&&(s=1);let a=_.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let l=_.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=_.largeFileOptimizations;e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=_.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"===typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:i,insertSpaces:r,detectIndentation:l,defaultEOL:s,trimAutoWhitespace:a,largeFileOptimizations:c,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"string"===typeof n&&"auto"!==n?n:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}getCreationOptions(e,t,n){const i="string"===typeof e?e:e.languageId;let r=this._modelCreationOptionsByLanguageAndResource[i+t];if(!r){const e=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:t}),s=this._getEOL(t,i);r=Yr._readModelOptions({editor:e,eol:s},n),this._modelCreationOptionsByLanguageAndResource[i+t]=r}return r}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,r=n.length;ie){const t=[];this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));while(t.length>0&&this._disposedModelsHeapSize>e){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const r=this.getCreationOptions(t,n,i),s=this._instantiationService.createInstance(Rr,e,t,r,n);if(n&&this._disposedModels.has(ss(n))){const e=this._removeDisposedModel(n),t=this._undoRedoService.getElements(n),i=this._getSHA1Computer(),r=!!i.canComputeSHA1(s)&&i.computeSHA1(s)===e.sha1;if(r||e.sharesUndoRedoStack){for(const e of t.past)ln(e)&&e.matchesResource(n)&&e.setModel(s);for(const e of t.future)ln(e)&&e.matchesResource(n)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(n,!0,(e=>ln(e)&&e.matchesResource(n))),r&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const o=ss(s.uri);if(this._models[o])throw new Error("ModelService: Cannot add model because it already exists!");const a=new os(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[o]=a,a}createModel(e,t,n,i=!1){let r;return r=t?this._createModelData(e,t,n,i):this._createModelData(e,ie.vH,n,i),this._onModelAdded.fire(r.model),r.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n0||t.future.length>0){for(const n of t.past)ln(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri));for(const n of t.future)ln(n)&&n.matchesResource(e.uri)&&(r=!0,s+=n.heapSize(e.uri),n.setModel(e.uri))}}const o=Yr.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(r)if(i||!(s>o)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(o-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>ln(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new ls(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),i,s,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!i){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,i=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget);Yr._setModelOptionsForModel(e,s,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new hs}};cs=Yr=is([rs(0,te.pG),rs(1,Zr.ITextResourcePropertiesService),rs(2,Cr),rs(3,ee._Y)],cs);class hs{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=hs.MAX_MODEL_SIZE}computeSHA1(e){const t=new es.v7,n=e.createSnapshot();let i;while(i=n.read())t.update(i);return t.digest()}}},4037:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextModelService:()=>r});var i=n(7778);const r=(0,i.u1)("textModelService")},3699:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeSemanticTokensDto:()=>a});var i=n(7885),r=n(5160);function s(e){for(let t=0,n=e.length;t{"use strict";n.r(t),n.d(t,{SemanticTokensProviderStyling:()=>p,toMultilineTokens2:()=>b});var i=n(4577),r=n(3711),s=n(458),o=n(6788),a=n(8690),l=n(6627);class c{static create(e,t){return new c(e,new h(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.Q(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[i,r,s]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new c(this._startLineNumber,i),new c(this._startLineNumber+s,r)]}applyEdit(e,t){const[n,i,r]=(0,l.W)(t);this.acceptEdit(e,n,i,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,r){this._acceptDeleteRange(e),this._acceptInsertText(new o.y(e.startLineNumber,e.startColumn),t,n,i,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const e=n-t;return void(this._startLineNumber-=e)}const i=this._tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const i=-t;this._startLineNumber-=i,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,r){if(0===t&&0===n)return;const s=e.lineNumber-this._startLineNumber;if(s<0)return void(this._startLineNumber+=t);const o=this._tokens.getMaxDeltaLine();s>=o+1||this._tokens.acceptInsertText(s,e.column-1,t,n,i,r)}}class h{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)){let r=i;while(r>t&&this._getDeltaLine(r-1)===e)r--;let s=i;while(se||h===e&&d>=t)&&(he||h===e&&g>=t){if(hr?f-=r-n:f=n;else if(d===t&&g===n){if(!(d===i&&f>r)){c=!0;continue}f-=r-n}else if(dr)){c=!0;continue}d=t,g=n,f=g+(f-r)}else if(d>i){if(0===a&&!c){l=o;break}d-=a}else{if(!(d===i&&g>=r))throw new Error("Not possible!");e&&0===d&&(g+=e,f+=e),d-=a,g-=r-n,f-=r-n}const p=4*l;s[p]=d,s[p+1]=g,s[p+2]=f,s[p+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,r,s){const o=0===n&&1===i&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},f=function(e,t){return function(n,i){t(n,i,e)}};const m=!1;let p=class{constructor(e,t,n,i){this._legend=e,this._themeService=t,this._languageService=n,this._logService=i,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new k}getMetadata(e,t,n){const r=this._languageService.languageIdCodec.encodeLanguageId(n),o=this._hashTable.get(e,t,r);let a;if(o)a=o.metadata,m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${i.x.getForeground(a)}, fontStyle ${i.x.getFontStyle(a).toString(2)}`);else{let o=this._legend.tokenTypes[e];const l=[];if(o){let e=t;for(let t=0;e>0&&t>=1;m&&e>0&&this._logService.getLevel()===s.$b.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const i=this._themeService.getColorTheme().getTokenStyleMetadata(o,l,n);if("undefined"===typeof i)a=2147483647;else{if(a=0,"undefined"!==typeof i.italic){const e=(i.italic?1:0)<<11;a|=1|e}if("undefined"!==typeof i.bold){const e=(i.bold?2:0)<<11;a|=2|e}if("undefined"!==typeof i.underline){const e=(i.underline?4:0)<<11;a|=4|e}if("undefined"!==typeof i.strikethrough){const e=(i.strikethrough?8:0)<<11;a|=8|e}if(i.foreground){const e=i.foreground<<15;a|=16|e}0===a&&(a=2147483647)}}else m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,o="not-in-legend";this._hashTable.add(e,t,r,a),m&&this._logService.getLevel()===s.$b.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${l.join(" ")}): foreground ${i.x.getForeground(a)}, fontStyle ${i.x.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,i,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${i} is outside the previous data (length ${r}).`))}};function b(e,t,n){const i=e.data,r=e.data.length/5|0,s=Math.max(Math.ceil(r/1024),400),o=[];let a=0,l=1,h=0;while(ae&&0===i[5*t])t--;if(t-1===e){let e=u;while(e+1c)t.warnOverlappingSemanticTokens(o,c+1);else{const e=t.getMetadata(_,k,n);2147483647!==e&&(0===f&&(f=o),d[g]=o-f,d[g+1]=c,d[g+2]=b,d[g+3]=e,g+=4,m=o,p=b)}l=o,h=c,a++}g!==d.length&&(d=d.subarray(0,g));const b=c.create(f,d);o.push(b)}return o}p=g([f(1,r.Gy),f(2,d.L),f(3,s.rr)],p);class _{constructor(e,t,n,i){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=i,this.next=null}}class k{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=k._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=k._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";n.r(t),n.d(t,{ISemanticTokensStylingService:()=>r});var i=n(7778);const r=(0,i.u1)("semanticTokensStylingService")},2205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SemanticTokensStylingService:()=>d});var i=n(8894),r=n(4573),s=n(3711),o=n(458),a=n(4686),l=n(7284),c=n(4979),h=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},u=function(e,t){return function(n,i){t(n,i,e)}};let d=class extends i.jG{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};d=h([u(0,s.Gy),u(1,o.rr),u(2,r.L)],d),(0,c.v)(l.ISemanticTokensStylingService,d,1)},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MirrorModel:()=>b,STOP_SYNC_MODEL_DELTA_TIME_MS:()=>f,WorkerTextModelSyncClient:()=>m,WorkerTextModelSyncServer:()=>p});var i=n(3723),r=n(8894),s=n(9133),o=n(6788),a=n(8690),l=n(939),c=n(601),h=(n(5053),n(2647));class u{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,h.j)(e);const n=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,h.j)(e),t=(0,h.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,h.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,s=0;while(t<=n)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e=r))break;t=i+1}return new d(i,e-s)}}class d{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class g{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new o.y(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;ithis._checkStopModelSync()),Math.round(f/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,r.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const n of e){const e=n.toString();this._syncedModels[e]||this._beginModelSync(n,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const n in this._syncedModelsLastUsedTime){const i=e-this._syncedModelsLastUsedTime[n];i>f&&t.push(n)}for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n)return;if(!t&&n.isTooLargeForSyncing())return;const i=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const s=new r.Cm;s.add(n.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(i.toString(),e)}))),s.add(n.onWillDispose((()=>{this._stopModelSync(i)}))),s.add((0,r.s)((()=>{this._proxy.$acceptRemovedModel(i)}))),this._syncedModels[i]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,r.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new b(s.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;const n=this._models[e];n.onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class b extends g{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{const e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}},4977:(e,t,n)=>{"use strict";n.r(t)},6151:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITextResourceConfigurationService:()=>r,ITextResourcePropertiesService:()=>s});var i=n(7778);const r=(0,i.u1)("textResourceConfigurationService"),s=(0,i.u1)("textResourcePropertiesService")},5863:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeSitterParserService:()=>r});var i=n(7778);const r=(0,i.u1)("treeSitterParserService")},1210:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DraggedTreeItemsIdentifier:()=>r,TreeViewsDnDService:()=>i});class i{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class r{constructor(e){this.identifier=e}}},5231:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ITreeViewsDnDService:()=>o});var i=n(4979),r=n(7778),s=n(1210);const o=(0,r.u1)("treeViewsDndService");(0,i.v)(o,s.TreeViewsDnDService,1)},7412:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnicodeTextModelHighlighter:()=>l});var i=n(8690),r=n(2773),s=n(601),o=n(9109),a=n(939);class l{static computeUnicodeHighlights(e,t,n){const l=n?n.startLineNumber:1,u=n?n.endLineNumber:e.getLineCount(),d=new h(t),g=d.getCandidateCodePoints();let f;f="allNonBasicAscii"===g?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(`${c(Array.from(g))}`,"g");const m=new r.W5(null,f),p=[];let b,_=!1,k=0,v=0,C=0;e:for(let t=l,n=u;t<=n;t++){const n=e.getLineContent(t),r=n.length;m.reset(0);do{if(b=m.next(n),b){let e=b.index,l=b.index+b[0].length;if(e>0){const t=n.charCodeAt(e-1);s.pc(t)&&e--}if(l+1=n){_=!0;break e}p.push(new i.Q(t,e+1,t,l+1))}}}while(b)}return{ranges:p,hasMore:_,ambiguousCharacterCount:k,invisibleCharacterCount:v,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(e,t){const n=new h(t),i=n.shouldHighlightNonBasicASCII(e,null);switch(i){case 0:return null;case 2:return{kind:1};case 3:{const i=e.codePointAt(0),r=n.ambiguousCharacters.getPrimaryConfusable(i),o=s.tl.getLocales().filter((e=>!s.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(i)));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function c(e,t){const n=`[${s.bm(e.map((e=>String.fromCodePoint(e))).join(""))}]`;return n}class h{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.y_.codePoints)u(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,r=!1;if(t)for(const e of t){const t=e.codePointAt(0),n=s.aC(e);i=i||n,n||this.ambiguousCharacters.isAmbiguous(t)||s.y_.isInvisibleCharacter(t)||(r=!0)}return!i&&r?0:this.options.invisibleCharacters&&!u(e)&&s.y_.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function u(e){return" "===e||"\n"===e||"\t"===e}},1337:(e,t,n)=>{"use strict";function i(){return globalThis._VSCODE_NLS_MESSAGES}function r(){return globalThis._VSCODE_NLS_LANGUAGE}n.d(t,{i8:()=>r,kg:()=>a});const s="pseudo"===r()||"undefined"!==typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>{const i=n[0],r=t[i];let s=e;return"string"===typeof r?s=r:"number"!==typeof r&&"boolean"!==typeof r&&void 0!==r&&null!==r||(s=String(r)),s})),s&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function a(e,t,...n){return o("number"===typeof e?l(e,t):t,n)}function l(e,t){const n=i()?.[e];if("string"!==typeof n){if("string"===typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}},2828:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>s,pG:()=>r});var i=n(7778);const r=(0,i.u1)("configurationService");function s(e){return e.replace(/[\[\]]/g,"")}},7503:(e,t,n)=>{"use strict";n.d(t,{Fd:()=>h});var i=n(5053),r=n(231),s=n(322),o=n(1337),a=n(2828),l=n(6223),c=n(6374);const h={Configuration:"base.contributions.configuration"},u={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},b="vscode://schemas/settings/resourceLanguage",_=c.O.as(l.F.JSONContribution);class k{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new r.vl,this._onDidUpdateConfiguration=new r.vl,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:o.kg("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},_.registerSchema(b,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=new Set;this.doRegisterConfigurations(e,t,n),_.registerSchema(b,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const n=[];for(const{overrides:i,source:r}of e)for(const e in i){t.add(e);const s=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),o=i[e];if(s.configurationDefaultOverrides.push({value:o,source:r}),L.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,r),n.push(...w(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,o,r,s.configurationDefaultOverrideValue);if(!t)continue;s.configurationDefaultOverrideValue=t;const n=this.configurationProperties[e];n&&(this.updatePropertyDefaultValue(e,n),this.updateSchema(e,n))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,t,n){const i={type:"object",default:t.value,description:o.kg("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,a.Mo)(e)),$ref:b,defaultDefaultValue:t.value,source:n,defaultValueSource:n};this.configurationProperties[e]=i,this.defaultLanguageConfigurationOverridesNode.properties[e]=i}mergeDefaultConfigurationsForOverrideIdentifier(e,t,n,i){const r=i?.value||{},o=i?.source??new Map;if(o instanceof Map){for(const e of Object.keys(t)){const i=t[e],a=s.Gv(i)&&(s.b0(r[e])||s.Gv(r[e]));if(a){if(r[e]={...r[e]??{},...i},n)for(const t in i)o.set(`${e}.${t}`,n)}else r[e]=i,n?o.set(e,n):o.delete(e)}return{value:r,source:o}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,n,i){const r=this.configurationProperties[e],o=i?.value??r?.defaultDefaultValue;let a=n;const l=s.Gv(t)&&(void 0!==r&&"object"===r.type||void 0===r&&(s.b0(o)||s.Gv(o)));if(l){if(a=i?.source??new Map,!(a instanceof Map))return void console.error("defaultValueSource is not a Map");for(const i in t)n&&a.set(`${e}.${i}`,n);t={...s.Gv(o)?o:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,n),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,n,i,r=3,o){r=s.z(e.scope)?r:e.scope;const a=e.properties;if(a)for(const e in a){const l=a[e];t&&E(e,l)?delete a[e]:(l.source=n,l.defaultDefaultValue=a[e].default,this.updatePropertyDefaultValue(e,l),L.test(e)?l.scope=void 0:(l.scope=s.z(l.scope)?r:l.scope,l.restricted=s.z(l.restricted)?!!i?.includes(e):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],a[e].policy?.name&&this.policyConfigurations.set(a[e].policy.name,e),!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),o.add(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e]))}const l=e.allOf;if(l)for(const e of l)this.validateAndRegisterProperties(e,t,n,i,r,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const n=e.properties;if(n)for(const e in n)this.updateSchema(e,n[e]);const i=e.allOf;i?.forEach(t)};t(e)}updateSchema(e,t){switch(u.properties[e]=t,t.scope){case 1:d.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:f.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:p.properties[e]=t;break;case 5:p.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:b};this.updatePropertyDefaultValue(t,n),u.properties[t]=n,d.properties[t]=n,g.properties[t]=n,f.properties[t]=n,m.properties[t]=n,p.properties[t]=n}}registerOverridePropertyPatternKey(){const e={type:"object",description:o.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:b};u.patternProperties[y]=e,d.patternProperties[y]=e,g.patternProperties[y]=e,f.patternProperties[y]=e,m.patternProperties[y]=e,p.patternProperties[y]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let i,r;!n||t.disallowConfigurationDefault&&n.source||(i=n.value,r=n.source),s.b0(i)&&(i=t.defaultDefaultValue,r=void 0),s.b0(i)&&(i=S(t.type)),t.default=i,t.defaultValueSource=r}}const v="\\[([^\\]]+)\\]",C=new RegExp(v,"g"),y=`^(${v})+$`,L=new RegExp(y);function w(e){const t=[];if(L.test(e)){let n=C.exec(e);while(n?.length){const i=n[1].trim();i&&t.push(i),n=C.exec(e)}}return(0,i.dM)(t)}function S(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const x=new k;function E(e,t){return e.trim()?L.test(e)?o.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==x.getConfigurationProperties()[e]?o.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==x.getPolicyConfigurations().get(t.policy?.name)?o.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,x.getPolicyConfigurations().get(t.policy?.name)):null:o.kg("config.property.empty","Cannot register an empty property")}c.O.add(h.Configuration,x)},4979:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});class i{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const r=[];function s(e,t,n){t instanceof i||(t=new i(t,[],Boolean(n))),r.push([e,t])}},7778:(e,t,n)=>{"use strict";var i;n.d(t,{_Y:()=>r,u1:()=>o}),function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t}(i||(i={}));const r=o("instantiationService");function s(e,t,n){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n}],t[i.DI_TARGET]=t)}function o(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(t,e,i)};return t.toString=()=>e,i.serviceIds.set(e,t),t}},6223:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var i=n(231),r=n(6374);const s={JSONContribution:"base.contributions.json"};function o(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class a{constructor(){this._onDidChangeSchema=new i.vl,this.schemasById={}}registerSchema(e,t){this.schemasById[o(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const l=new a;r.O.add(s.JSONContribution,l)},458:(e,t,n)=>{"use strict";n.d(t,{rr:()=>Q,$b:()=>J});n(231);var i=n(8894),r=n(5160),s=n(601),o=n(4396),a=n(1337);function l(...e){switch(e.length){case 1:return(0,a.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,a.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,a.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const c=(0,a.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),h=(0,a.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class u{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw(0,o.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){while(!this._isAtEnd()){this._start=this._current;const e=this._advance();switch(e){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(l("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(l("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(l("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&(this._input.charCodeAt(this._current)===e&&(this._current++,!0))}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,n=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),n=u._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){while(39!==this._peek()&&!this._isAtEnd())this._advance();this._isAtEnd()?this._error(c):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,n=!1;while(1){if(e>=this._input.length)return this._current=e,void this._error(h);const i=this._input.charCodeAt(e);if(t)t=!1;else{if(47===i&&!n){e++;break}91===i?n=!0:92===i?t=!0:93===i&&(n=!1)}e++}while(e=this._input.length}}var d=n(7778);const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",r.zx),g.set("isLinux",r.j9),g.set("isWindows",r.uF),g.set("isWeb",r.HZ),g.set("isMacNative",r.zx&&!r.HZ),g.set("isEdge",r.UP),g.set("isFirefox",r.gm),g.set("isChrome",r.H8),g.set("isSafari",r.nr);const f=Object.prototype.hasOwnProperty,m={regexParsingWithErrorRecovery:!0},p=(0,a.kg)("contextkey.parser.error.emptyString","Empty context key expression"),b=(0,a.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),_=(0,a.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),k=(0,a.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),v=(0,a.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),C=(0,a.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),y=(0,a.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),L=(0,a.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class w{static{this._parseError=new Error}constructor(e=m){this._config=e,this._scanner=new u,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?C:void 0;throw this._parsingErrors.push({message:v,offset:e.offset,lexeme:u.getLexeme(e),additionalInfo:t}),w._parseError}return e}catch(e){if(e!==w._parseError)throw e;return}}else this._parsingErrors.push({message:p,offset:0,lexeme:"",additionalInfo:b})}_expr(){return this._or()}_or(){const e=[this._and()];while(this._matchOne(16)){const t=this._and();e.push(t)}return 1===e.length?e[0]:S.or(...e)}_and(){const e=[this._term()];while(this._matchOne(15)){const t=this._term();e.push(t)}return 1===e.length?e[0]:S.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),E.INSTANCE;case 12:return this._advance(),N.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,k),e?.negate()}case 17:return this._advance(),D.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),S.true();case 12:return this._advance(),S.false();case 0:{this._advance();const e=this._expr();return this._consume(1,k),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const n=e.lexeme,i=n.lastIndexOf("/"),r=i===n.length-1?void 0:this._removeFlagsGY(n.substring(i+1));let s;try{s=new RegExp(n.substring(1,i),r)}catch(t){throw this._errExpectedButGot("REGEX",e)}return z.create(t,s)}switch(e.type){case 10:case 19:{const n=[e.lexeme];this._advance();let i=this._peek(),r=0;for(let t=0;t=0){const s=n.slice(t+1,r),o="i"===n[r+1]?"i":"";try{i=new RegExp(s,o)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===i)throw this._errExpectedButGot("REGEX",e);return z.create(t,i)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,_);const e=this._value();return S.notIn(t,e)}const n=this._peek().type;switch(n){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return S.equals(t,e);switch(e){case"true":return S.has(t);case"false":return S.not(t);default:return S.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return S.notEquals(t,e);switch(e){case"true":return S.not(t);case"false":return S.has(t);default:return S.notEquals(t,e)}}case 5:return this._advance(),P.create(t,this._value());case 6:return this._advance(),V.create(t,this._value());case 7:return this._advance(),B.create(t,this._value());case 8:return this._advance(),F.create(t,this._value());case 13:return this._advance(),S.in(t,this._value());default:return S.has(t)}}case 20:throw this._parsingErrors.push({message:y,offset:e.offset,lexeme:"",additionalInfo:L}),w._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){const i=(0,a.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,u.getLexeme(t)),r=t.offset,s=u.getLexeme(t);return this._parsingErrors.push({message:i,offset:r,lexeme:s,additionalInfo:n}),w._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class S{static false(){return E.INSTANCE}static true(){return N.INSTANCE}static has(e){return T.create(e)}static equals(e,t){return A.create(e,t)}static notEquals(e,t){return M.create(e,t)}static regex(e,t){return z.create(e,t)}static in(e,t){return I.create(e,t)}static notIn(e,t){return O.create(e,t)}static not(e){return D.create(e)}static and(...e){return W.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static{this._parser=new w({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(void 0===e||null===e)return;const t=this._parser.parse(e);return t}}function x(e,t){return e.cmp(t)}class E{static{this.INSTANCE=new E}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return N.INSTANCE}}class N{static{this.INSTANCE=new N}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}class T{static create(e,t=null){const n=g.get(e);return"boolean"===typeof n?n?N.INSTANCE:E.INSTANCE:new T(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"===typeof e?e?N.INSTANCE:E.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this)),this.negated}}class A{static create(e,t,n=null){if("boolean"===typeof t)return t?T.create(e,n):D.create(e,n);const i=g.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?N.INSTANCE:E.INSTANCE}return new A(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=g.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?N.INSTANCE:E.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class I{static create(e,t){return new I(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):"string"===typeof n&&"object"===typeof t&&null!==t&&f.call(t,n)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=O.create(this.key,this.valueKey)),this.negated}}class O{static create(e,t){return new O(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=I.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class M{static create(e,t,n=null){if("boolean"===typeof t)return t?D.create(e,n):T.create(e,n);const i=g.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?E.INSTANCE:N.INSTANCE}return new M(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=g.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?E.INSTANCE:N.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class D{static create(e,t=null){const n=g.get(e);return"boolean"===typeof n?n?E.INSTANCE:N.INSTANCE:new D(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:H(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=g.get(this.key);return"boolean"===typeof e?e?E.INSTANCE:N.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this)),this.negated}}function R(e,t){if("string"===typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"===typeof e||"number"===typeof e?t(e):E.INSTANCE}class B{static create(e,t,n=null){return R(t,(t=>new B(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,n=null){return R(t,(t=>new F(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class P{static create(e,t,n=null){return R(t,(t=>new P(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))new V(e,t,n)))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:K(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!==typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class z{static create(e,t){return new z(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this)),this.negated}}class j{static create(e){return new j(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function q(e){let t=null;for(let n=0,i=e.length;ne.expr.length)return 1;for(let t=0,n=this.expr.length;t1){const e=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),r=0===i.length,s=U.create(e.expr.map((e=>W.create([e,t],null,n))),null,r);s&&(i.push(s),i.sort(x))}if(1===i.length)return i[0];if(n){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,n){return U._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());while(e.length>1){const t=e.shift(),n=e.shift(),i=[];for(const e of G(t))for(const t of G(n))i.push(W.create([e,t],null,!1));e.unshift(U.create(i,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class $ extends T{static{this._info=[]}static all(){return $._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,"object"===typeof n?$._info.push({...n,key:e}):!0!==n&&$._info.push({key:e,description:n,type:null!==t&&void 0!==t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return A.create(this.key,e)}}(0,d.u1)("contextKeyService");function H(e,t){return et?1:0}function K(e,t,n,i){return en?1:ti?1:0}function G(e){return 9===e.type?e.expr:[e]}const Q=(0,d.u1)("logService");var J;(function(e){e[e["Off"]=0]="Off",e[e["Trace"]=1]="Trace",e[e["Debug"]=2]="Debug",e[e["Info"]=3]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=5]="Error"})(J||(J={}));J.Info;i.jG;function X(e){switch(e){case J.Trace:return"trace";case J.Debug:return"debug";case J.Info:return"info";case J.Warning:return"warn";case J.Error:return"error";case J.Off:return"off"}}new $("logLevel",X(J.Info))},6374:(e,t,n)=>{"use strict";n.d(t,{O:()=>o});var i=n(9109),r=n(322);class s{constructor(){this.data=new Map}add(e,t){i.ok(r.Kg(e)),i.ok(r.Gv(t)),i.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const o=new s},7732:(e,t,n)=>{"use strict";n.d(t,{buw:()=>I,b1q:()=>A,YtV:()=>F,Ubg:()=>G,IIb:()=>H,pOz:()=>$,whs:()=>q,Stt:()=>U,Hng:()=>W,yLC:()=>be,KoI:()=>me,uMG:()=>pe,x1A:()=>m});var i=n(9109),r=n(3723),s=n(5476),o=n(231),a=n(6223),l=n(6374),c=n(1337);function h(e){return null!==e&&"object"===typeof e&&"light"in e&&"dark"in e}const u={ColorContribution:"base.contributions.colors"},d="default";class g{constructor(){this._onDidChangeSchema=new o.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,r){const s={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r};this.colorsById[e]=s;const o={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(o.deprecationMessage=r),i&&(o.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",o.patternErrorMessage=c.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[o,{type:"string",const:d,description:c.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n?.defaults){const e=h(n.defaults)?n.defaults[t.type]:n.defaults;return L(e,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(e,t)=>{const n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}}const f=new g;function m(e,t,n,i,r){return f.registerColor(e,t,n,i,r)}function p(e,t){switch(e.op){case 0:return L(e.value,t)?.darken(e.factor);case 1:return L(e.value,t)?.lighten(e.factor);case 2:return L(e.value,t)?.transparent(e.factor);case 3:{const n=L(e.background,t);return n?L(e.value,t)?.makeOpaque(n):L(e.value,t)}case 4:for(const n of e.values){const e=L(n,t);if(e)return e}return;case 6:return L(t.defines(e.if)?e.then:e.else,t);case 5:{const n=L(e.value,t);if(!n)return;const i=L(e.background,t);return i?n.isDarkerThan(i)?s.Q1.getLighterColor(n,i,e.factor).transparent(e.transparency):s.Q1.getDarkerColor(n,i,e.factor).transparent(e.transparency):n.transparent(e.factor*e.transparency)}default:throw(0,i.xb)(e)}}function b(e,t){return{op:0,value:e,factor:t}}function _(e,t){return{op:1,value:e,factor:t}}function k(e,t){return{op:2,value:e,factor:t}}function v(...e){return{op:4,values:e}}function C(e,t,n){return{op:6,if:e,then:t,else:n}}function y(e,t,n,i){return{op:5,value:e,background:t,factor:n,transparency:i}}function L(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?s.Q1.fromHex(e):t.getColor(e):e instanceof s.Q1?e:"object"===typeof e?p(e,t):void 0}l.O.add(u.ColorContribution,f);const w="vscode://schemas/workbench-colors",S=l.O.as(a.F.JSONContribution);S.registerSchema(w,f.getColorSchema());const x=new r.uC((()=>S.notifySchemaChanged(w)),200);f.onDidChangeSchema((()=>{x.isScheduled()||x.schedule()}));const E=m("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},c.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),N=(m("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},c.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),m("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},c.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),m("descriptionForeground",{light:"#717171",dark:k(E,.7),hcDark:k(E,.7),hcLight:k(E,.7)},c.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),m("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},c.kg("iconForeground","The default color for icons in the workbench."))),T=m("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},c.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),A=m("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},c.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),I=m("contrastActiveBorder",{light:null,dark:null,hcDark:T,hcLight:T},c.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),O=(m("selection.background",null,c.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),m("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},c.kg("textLinkForeground","Foreground color for links in text.")),m("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},c.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),m("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:s.Q1.black,hcLight:"#292929"},c.kg("textSeparatorForeground","Color for text separators.")),m("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},c.kg("textPreformatForeground","Foreground color for preformatted text segments.")),m("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},c.kg("textPreformatBackground","Background color for preformatted text segments.")),m("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},c.kg("textBlockQuoteBackground","Background color for block quotes in text.")),m("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:s.Q1.white,hcLight:"#292929"},c.kg("textBlockQuoteBorder","Border color for block quotes in text.")),m("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:s.Q1.black,hcLight:"#F2F2F2"},c.kg("textCodeBlockBackground","Background color for code blocks in text.")),m("sash.hoverBorder",T,c.kg("sashActiveBorder","Border color of active sashes.")),m("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:s.Q1.black,hcLight:"#0F4A85"},c.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),M=(m("badge.foreground",{dark:s.Q1.white,light:"#333",hcDark:s.Q1.white,hcLight:s.Q1.white},c.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),m("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},c.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled."))),D=m("scrollbarSlider.background",{dark:s.Q1.fromHex("#797979").transparent(.4),light:s.Q1.fromHex("#646464").transparent(.4),hcDark:k(A,.6),hcLight:k(A,.4)},c.kg("scrollbarSliderBackground","Scrollbar slider background color.")),R=m("scrollbarSlider.hoverBackground",{dark:s.Q1.fromHex("#646464").transparent(.7),light:s.Q1.fromHex("#646464").transparent(.7),hcDark:k(A,.8),hcLight:k(A,.8)},c.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),B=m("scrollbarSlider.activeBackground",{dark:s.Q1.fromHex("#BFBFBF").transparent(.4),light:s.Q1.fromHex("#000000").transparent(.6),hcDark:A,hcLight:A},c.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),F=(m("progressBar.background",{dark:s.Q1.fromHex("#0E70C0"),light:s.Q1.fromHex("#0E70C0"),hcDark:A,hcLight:A},c.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),m("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("editorBackground","Editor background color."))),P=(m("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:s.Q1.white,hcLight:E},c.kg("editorForeground","Editor default foreground color.")),m("editorStickyScroll.background",F,c.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),m("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),m("editorStickyScroll.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),m("editorStickyScroll.shadow",M,c.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),m("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:s.Q1.white},c.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),V=m("editorWidget.foreground",E,c.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),z=m("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:A,hcLight:A},c.kg("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),j=(m("editorWidget.resizeBorder",null,c.kg("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),m("editorError.background",null,c.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},c.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),q=(m("editorError.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},c.kg("errorBorder","If set, color of double underlines for errors in the editor.")),m("editorWarning.background",null,c.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0)),W=m("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},c.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),U=m("editorWarning.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#FFCC00").transparent(.8),hcLight:s.Q1.fromHex("#FFCC00").transparent(.8)},c.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),$=(m("editorInfo.background",null,c.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},c.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),H=m("editorInfo.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},c.kg("infoBorder","If set, color of double underlines for infos in the editor.")),K=(m("editorHint.foreground",{dark:s.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},c.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),m("editorHint.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},c.kg("hintBorder","If set, color of double underlines for hints in the editor.")),m("editorLink.activeForeground",{dark:"#4E94CE",light:s.Q1.blue,hcDark:s.Q1.cyan,hcLight:"#292929"},c.kg("activeLinkForeground","Color of active links.")),m("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},c.kg("editorSelectionBackground","Color of the editor selection."))),G=(m("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:s.Q1.white},c.kg("editorSelectionForeground","Color of the selected text for high contrast.")),m("editor.inactiveSelectionBackground",{light:k(K,.5),dark:k(K,.5),hcDark:k(K,.7),hcLight:k(K,.5)},c.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.selectionHighlightBackground",{light:y(K,F,.3,.6),dark:y(K,F,.3,.6),hcDark:null,hcLight:null},c.kg("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:I,hcLight:I},c.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),m("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},c.kg("editorFindMatch","Color of the current search match.")),m("editor.findMatchForeground",null,c.kg("editorFindMatchForeground","Text color of the current search match.")),m("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},c.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),Q=(m("editor.findMatchHighlightForeground",null,c.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),m("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},c.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.findMatchBorder",{light:null,dark:null,hcDark:I,hcLight:I},c.kg("editorFindMatchBorder","Border color of the current search match.")),m("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:I,hcLight:I},c.kg("findMatchHighlightBorder","Border color of the other search matches."))),J=(m("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:k(I,.4),hcLight:k(I,.4)},c.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),m("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},c.kg("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorHoverWidget.background",P,c.kg("hoverBackground","Background color of the editor hover."))),X=(m("editorHoverWidget.foreground",V,c.kg("hoverForeground","Foreground color of the editor hover.")),m("editorHoverWidget.border",z,c.kg("hoverBorder","Border color of the editor hover.")),m("editorHoverWidget.statusBarBackground",{dark:_(J,.2),light:b(J,.05),hcDark:P,hcLight:P},c.kg("statusBarBackground","Background color of the editor hover status bar.")),m("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:s.Q1.white,hcLight:s.Q1.black},c.kg("editorInlayHintForeground","Foreground color of inline hints"))),Y=m("editorInlayHint.background",{dark:k(O,.1),light:k(O,.1),hcDark:k(s.Q1.white,.1),hcLight:k(O,.1)},c.kg("editorInlayHintBackground","Background color of inline hints")),Z=(m("editorInlayHint.typeForeground",X,c.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),m("editorInlayHint.typeBackground",Y,c.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),m("editorInlayHint.parameterForeground",X,c.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),m("editorInlayHint.parameterBackground",Y,c.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),m("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},c.kg("editorLightBulbForeground","The color used for the lightbulb actions icon."))),ee=(m("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},c.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),m("editorLightBulbAi.foreground",Z,c.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),m("editor.snippetTabstopHighlightBackground",{dark:new s.Q1(new s.bU(124,124,124,.3)),light:new s.Q1(new s.bU(10,50,100,.2)),hcDark:new s.Q1(new s.bU(124,124,124,.3)),hcLight:new s.Q1(new s.bU(10,50,100,.2))},c.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),m("editor.snippetTabstopHighlightBorder",null,c.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),m("editor.snippetFinalTabstopHighlightBackground",null,c.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),m("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.Q1(new s.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},c.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new s.Q1(new s.bU(155,185,85,.2))),te=new s.Q1(new s.bU(255,0,0,.2)),ne=(m("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},c.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},c.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.insertedLineBackground",{dark:ee,light:ee,hcDark:null,hcLight:null},c.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedLineBackground",{dark:te,light:te,hcDark:null,hcLight:null},c.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditorGutter.insertedLineBackground",null,c.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),m("diffEditorGutter.removedLineBackground",null,c.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),m("diffEditorOverview.insertedForeground",null,c.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),m("diffEditorOverview.removedForeground",null,c.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),m("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},c.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),m("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},c.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),m("diffEditor.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("diffEditorBorder","Border color between the two text editors.")),m("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},c.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),m("diffEditor.unchangedRegionBackground","sideBar.background",c.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedRegionForeground","foreground",c.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},c.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),m("widget.shadow",{dark:k(s.Q1.black,.36),light:k(s.Q1.black,.16),hcDark:null,hcLight:null},c.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),ie=(m("widget.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),m("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},c.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"))),re=(m("toolbar.hoverOutline",{dark:null,light:null,hcDark:I,hcLight:I},c.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),m("toolbar.activeBackground",{dark:_(ie,.1),light:b(ie,.1),hcDark:null,hcLight:null},c.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),m("breadcrumb.foreground",k(E,.8),c.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),m("breadcrumb.background",F,c.kg("breadcrumbsBackground","Background color of breadcrumb items.")),m("breadcrumb.focusForeground",{light:b(E,.2),dark:_(E,.1),hcDark:_(E,.1),hcLight:_(E,.1)},c.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),m("breadcrumb.activeSelectionForeground",{light:b(E,.2),dark:_(E,.1),hcDark:_(E,.1),hcLight:_(E,.1)},c.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),m("breadcrumbPicker.background",P,c.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),.5),se=s.Q1.fromHex("#40C8AE").transparent(re),oe=s.Q1.fromHex("#40A6FF").transparent(re),ae=s.Q1.fromHex("#606060").transparent(.4),le=.4,ce=1,he=m("merge.currentHeaderBackground",{dark:se,light:se,hcDark:null,hcLight:null},c.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),ue=(m("merge.currentContentBackground",k(he,le),c.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.incomingHeaderBackground",{dark:oe,light:oe,hcDark:null,hcLight:null},c.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),de=(m("merge.incomingContentBackground",k(ue,le),c.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.commonHeaderBackground",{dark:ae,light:ae,hcDark:null,hcLight:null},c.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),ge=(m("merge.commonContentBackground",k(de,le),c.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},c.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),fe=(m("editorOverviewRuler.currentContentForeground",{dark:k(he,ce),light:k(he,ce),hcDark:ge,hcLight:ge},c.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.incomingContentForeground",{dark:k(ue,ce),light:k(ue,ce),hcDark:ge,hcLight:ge},c.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.commonContentForeground",{dark:k(de,ce),light:k(de,ce),hcDark:ge,hcLight:ge},c.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},c.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",c.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),m("problemsErrorIcon.foreground",j,c.kg("problemsErrorIconForeground","The color used for the problems error icon.")),m("problemsWarningIcon.foreground",W,c.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),m("problemsInfoIcon.foreground",$,c.kg("problemsInfoIconForeground","The color used for the problems info icon.")),m("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},c.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0)),me=(m("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},c.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),m("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},c.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),m("minimap.infoHighlight",{dark:$,light:$,hcDark:H,hcLight:H},c.kg("minimapInfo","Minimap marker color for infos."))),pe=m("minimap.warningHighlight",{dark:W,light:W,hcDark:U,hcLight:U},c.kg("overviewRuleWarning","Minimap marker color for warnings.")),be=m("minimap.errorHighlight",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},c.kg("minimapError","Minimap marker color for errors.")),_e=(m("minimap.background",null,c.kg("minimapBackground","Minimap background color.")),m("minimap.foregroundOpacity",s.Q1.fromHex("#000f"),c.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),m("minimapSlider.background",k(D,.5),c.kg("minimapSliderBackground","Minimap slider background color.")),m("minimapSlider.hoverBackground",k(R,.5),c.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),m("minimapSlider.activeBackground",k(B,.5),c.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),m("charts.foreground",E,c.kg("chartsForeground","The foreground color used in charts.")),m("charts.lines",k(E,.5),c.kg("chartsLines","The color used for horizontal lines in charts.")),m("charts.red",j,c.kg("chartsRed","The red color used in chart visualizations.")),m("charts.blue",$,c.kg("chartsBlue","The blue color used in chart visualizations.")),m("charts.yellow",W,c.kg("chartsYellow","The yellow color used in chart visualizations.")),m("charts.orange",fe,c.kg("chartsOrange","The orange color used in chart visualizations.")),m("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},c.kg("chartsGreen","The green color used in chart visualizations.")),m("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},c.kg("chartsPurple","The purple color used in chart visualizations.")),m("input.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("inputBoxBackground","Input box background.")),m("input.foreground",E,c.kg("inputBoxForeground","Input box foreground.")),m("input.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("inputBoxBorder","Input box border.")),m("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:A,hcLight:A},c.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields."))),ke=m("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},c.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),ve=m("inputOption.activeBackground",{dark:k(T,.4),light:k(T,.2),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},c.kg("inputOption.activeBackground","Background hover color of options in input fields.")),Ce=m("inputOption.activeForeground",{dark:s.Q1.white,light:s.Q1.black,hcDark:E,hcLight:E},c.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),ye=(m("input.placeholderForeground",{light:k(E,.5),dark:k(E,.5),hcDark:k(E,.7),hcLight:k(E,.7)},c.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),m("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("inputValidationInfoBackground","Input validation background color for information severity.")),m("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:E},c.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),m("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:A,hcLight:A},c.kg("inputValidationInfoBorder","Input validation border color for information severity.")),m("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),m("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:E},c.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),m("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:A,hcLight:A},c.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),m("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("inputValidationErrorBackground","Input validation background color for error severity.")),m("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:E},c.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),m("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:A,hcLight:A},c.kg("inputValidationErrorBorder","Input validation border color for error severity.")),m("dropdown.background",{dark:"#3C3C3C",light:s.Q1.white,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("dropdownBackground","Dropdown background."))),Le=(m("dropdown.listBackground",{dark:null,light:null,hcDark:s.Q1.black,hcLight:s.Q1.white},c.kg("dropdownListBackground","Dropdown list background.")),m("dropdown.foreground",{dark:"#F0F0F0",light:E,hcDark:s.Q1.white,hcLight:E},c.kg("dropdownForeground","Dropdown foreground."))),we=m("dropdown.border",{dark:ye,light:"#CECECE",hcDark:A,hcLight:A},c.kg("dropdownBorder","Dropdown border.")),Se=m("button.foreground",s.Q1.white,c.kg("buttonForeground","Button foreground color.")),xe=(m("button.separator",k(Se,.4),c.kg("buttonSeparator","Button separator color.")),m("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},c.kg("buttonBackground","Button background color."))),Ee=(m("button.hoverBackground",{dark:_(xe,.2),light:b(xe,.2),hcDark:xe,hcLight:xe},c.kg("buttonHoverBackground","Button background color when hovering.")),m("button.border",A,c.kg("buttonBorder","Button border color.")),m("button.secondaryForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:s.Q1.white,hcLight:E},c.kg("buttonSecondaryForeground","Secondary button foreground color.")),m("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:s.Q1.white},c.kg("buttonSecondaryBackground","Secondary button background color."))),Ne=(m("button.secondaryHoverBackground",{dark:_(Ee,.2),light:b(Ee,.2),hcDark:null,hcLight:null},c.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),m("radio.activeForeground",Ce,c.kg("radioActiveForeground","Foreground color of active radio option."))),Te=(m("radio.activeBackground",ve,c.kg("radioBackground","Background color of active radio option.")),m("radio.activeBorder",_e,c.kg("radioActiveBorder","Border color of the active radio option.")),m("radio.inactiveForeground",null,c.kg("radioInactiveForeground","Foreground color of inactive radio option.")),m("radio.inactiveBackground",null,c.kg("radioInactiveBackground","Background color of inactive radio option.")),m("radio.inactiveBorder",{light:k(Ne,.2),dark:k(Ne,.2),hcDark:k(Ne,.4),hcLight:k(Ne,.2)},c.kg("radioInactiveBorder","Border color of the inactive radio option.")),m("radio.inactiveHoverBackground",ke,c.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),m("checkbox.background",ye,c.kg("checkbox.background","Background color of checkbox widget.")),m("checkbox.selectBackground",P,c.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),m("checkbox.foreground",Le,c.kg("checkbox.foreground","Foreground color of checkbox widget.")),m("checkbox.border",we,c.kg("checkbox.border","Border color of checkbox widget.")),m("checkbox.selectBorder",N,c.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),m("keybindingLabel.background",{dark:new s.Q1(new s.bU(128,128,128,.17)),light:new s.Q1(new s.bU(221,221,221,.4)),hcDark:s.Q1.transparent,hcLight:s.Q1.transparent},c.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.foreground",{dark:s.Q1.fromHex("#CCCCCC"),light:s.Q1.fromHex("#555555"),hcDark:s.Q1.white,hcLight:E},c.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.border",{dark:new s.Q1(new s.bU(51,51,51,.6)),light:new s.Q1(new s.bU(204,204,204,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:A},c.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),m("keybindingLabel.bottomBorder",{dark:new s.Q1(new s.bU(68,68,68,.6)),light:new s.Q1(new s.bU(187,187,187,.4)),hcDark:new s.Q1(new s.bU(111,195,223)),hcLight:E},c.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),m("list.focusBackground",null,c.kg("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusForeground",null,c.kg("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusOutline",{dark:T,light:T,hcDark:I,hcLight:I},c.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),m("list.focusAndSelectionOutline",null,c.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),m("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),Ae=m("list.activeSelectionForeground",{dark:s.Q1.white,light:s.Q1.white,hcDark:null,hcLight:null},c.kg("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ie=m("list.activeSelectionIconForeground",null,c.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Oe=(m("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveSelectionForeground",null,c.kg("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveSelectionIconForeground",null,c.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveFocusBackground",null,c.kg("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.inactiveFocusOutline",null,c.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),m("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:s.Q1.white.transparent(.1),hcLight:s.Q1.fromHex("#0F4A85").transparent(.1)},c.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),m("list.hoverForeground",null,c.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),m("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},c.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),m("list.dropBetweenBackground",{dark:N,light:N,hcDark:null,hcLight:null},c.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),m("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:T,hcLight:T},c.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree."))),Me=(m("list.focusHighlightForeground",{dark:Oe,light:C(Te,Oe,"#BBE7FF"),hcDark:Oe,hcLight:Oe},c.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),m("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},c.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),m("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},c.kg("listErrorForeground","Foreground color of list items containing errors.")),m("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},c.kg("listWarningForeground","Foreground color of list items containing warnings.")),m("listFilterWidget.background",{light:b(P,0),dark:_(P,0),hcDark:P,hcLight:P},c.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),m("listFilterWidget.outline",{dark:s.Q1.transparent,light:s.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},c.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),m("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:A,hcLight:A},c.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),m("listFilterWidget.shadow",ne,c.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),m("list.filterMatchBackground",{dark:G,light:G,hcDark:null,hcLight:null},c.kg("listFilterMatchHighlight","Background color of the filtered match.")),m("list.filterMatchBorder",{dark:Q,light:Q,hcDark:A,hcLight:I},c.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),m("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},c.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),m("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},c.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),De=(m("tree.inactiveIndentGuidesStroke",k(Me,.4),c.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),m("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},c.kg("tableColumnsBorder","Table border color between columns.")),m("tree.tableOddRowsBackground",{dark:k(E,.04),light:k(E,.04),hcDark:null,hcLight:null},c.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),m("editorActionList.background",P,c.kg("editorActionListBackground","Action List background color.")),m("editorActionList.foreground",V,c.kg("editorActionListForeground","Action List foreground color.")),m("editorActionList.focusForeground",Ae,c.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),m("editorActionList.focusBackground",Te,c.kg("editorActionListFocusBackground","Action List background color for the focused item.")),m("menu.border",{dark:null,light:null,hcDark:A,hcLight:A},c.kg("menuBorder","Border color of menus.")),m("menu.foreground",Le,c.kg("menuForeground","Foreground color of menu items.")),m("menu.background",ye,c.kg("menuBackground","Background color of menu items.")),m("menu.selectionForeground",Ae,c.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),m("menu.selectionBackground",Te,c.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),m("menu.selectionBorder",{dark:null,light:null,hcDark:I,hcLight:I},c.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),m("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:A,hcLight:A},c.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),m("quickInput.background",P,c.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),m("quickInput.foreground",V,c.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),m("quickInputTitle.background",{dark:new s.Q1(new s.bU(255,255,255,.105)),light:new s.Q1(new s.bU(0,0,0,.06)),hcDark:"#000000",hcLight:s.Q1.white},c.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),m("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:s.Q1.white,hcLight:"#0F4A85"},c.kg("pickerGroupForeground","Quick picker color for grouping labels.")),m("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:s.Q1.white,hcLight:"#0F4A85"},c.kg("pickerGroupBorder","Quick picker color for grouping borders.")),m("quickInput.list.focusBackground",null,"",void 0,c.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")));m("quickInputList.focusForeground",Ae,c.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),m("quickInputList.focusIconForeground",Ie,c.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),m("quickInputList.focusBackground",{dark:v(De,Te),light:v(De,Te),hcDark:null,hcLight:null},c.kg("quickInput.listFocusBackground","Quick picker background color for the focused item.")),m("search.resultsInfoForeground",{light:E,dark:k(E,.65),hcDark:E,hcLight:E},c.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),m("searchEditor.findMatchBackground",{light:k(G,.66),dark:k(G,.66),hcDark:G,hcLight:G},c.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),m("searchEditor.findMatchBorder",{light:k(Q,.66),dark:k(Q,.66),hcDark:Q,hcLight:Q},c.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},3711:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>l,zy:()=>g,Yf:()=>c});var i,r=n(231),s=n(8894),o=n(7778),a=n(6374);(function(e){e["DARK"]="dark",e["LIGHT"]="light",e["HIGH_CONTRAST_DARK"]="hcDark",e["HIGH_CONTRAST_LIGHT"]="hcLight"})(i||(i={}));const l=(0,o.u1)("themeService");function c(e){return{id:e}}const h={ThemingContribution:"base.contributions.theming"};class u{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new r.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,s.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}}const d=new u;function g(e){return d.onColorThemeChange(e)}a.O.add(h.ThemingContribution,d);s.jG},5890:(e,t,n)=>{var i={"./simpleWorker":1352,"./simpleWorker.js":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker":1352,"monaco-editor/esm/vs/base/common/worker/simpleWorker.js":1352};function r(e){return Promise.resolve().then((()=>{if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var r=i[e];return n(r)}))}r.keys=()=>Object.keys(i),r.id=5890,e.exports=r},9204:(e,t,n)=>{var i={"./editorBaseApi":[215],"./editorBaseApi.js":[215],"./editorSimpleWorker":[5926],"./editorSimpleWorker.js":[5926],"./editorWorker":[4117,792],"./editorWorker.js":[4117,792],"./editorWorkerHost":[2899],"./editorWorkerHost.js":[2899],"./findSectionHeaders":[6198],"./findSectionHeaders.js":[6198],"./getIconClasses":[2340,792],"./getIconClasses.js":[2340,792],"./languageFeatureDebounce":[2454,792],"./languageFeatureDebounce.js":[2454,792],"./languageFeatures":[2847,792],"./languageFeatures.js":[2847,792],"./languageFeaturesService":[1369,792],"./languageFeaturesService.js":[1369,792],"./languageService":[2657,792],"./languageService.js":[2657,792],"./languagesAssociations":[5911,792],"./languagesAssociations.js":[5911,792],"./languagesRegistry":[7024,792],"./languagesRegistry.js":[7024,792],"./markerDecorations":[3637,792],"./markerDecorations.js":[3637,792],"./markerDecorationsService":[9420,792],"./markerDecorationsService.js":[9420,792],"./model":[9361,792],"./model.js":[9361,792],"./modelService":[2713,792],"./modelService.js":[2713,792],"./resolverService":[4037,792],"./resolverService.js":[4037,792],"./semanticTokensDto":[3699,792],"./semanticTokensDto.js":[3699,792],"./semanticTokensProviderStyling":[4686,792],"./semanticTokensProviderStyling.js":[4686,792],"./semanticTokensStyling":[7284,792],"./semanticTokensStyling.js":[7284,792],"./semanticTokensStylingService":[2205,792],"./semanticTokensStylingService.js":[2205,792],"./textModelSync/textModelSync.impl":[6294],"./textModelSync/textModelSync.impl.js":[6294],"./textModelSync/textModelSync.protocol":[4977,792],"./textModelSync/textModelSync.protocol.js":[4977,792],"./textResourceConfiguration":[6151,792],"./textResourceConfiguration.js":[6151,792],"./treeSitterParserService":[5863,792],"./treeSitterParserService.js":[5863,792],"./treeViewsDnd":[1210,792],"./treeViewsDnd.js":[1210,792],"./treeViewsDndService":[5231,792],"./treeViewsDndService.js":[5231,792],"./unicodeTextModelHighlighter":[7412],"./unicodeTextModelHighlighter.js":[7412],"monaco-editor/esm/vs/editor/common/services/editorBaseApi":[215],"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":[215],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":[5926],"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":[5926],"monaco-editor/esm/vs/editor/common/services/editorWorker":[4117,792],"monaco-editor/esm/vs/editor/common/services/editorWorker.js":[4117,792],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":[2899],"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":[2899],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":[6198],"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":[6198],"monaco-editor/esm/vs/editor/common/services/getIconClasses":[2340,792],"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":[2340,792],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":[2454,792],"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":[2454,792],"monaco-editor/esm/vs/editor/common/services/languageFeatures":[2847,792],"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":[2847,792],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":[1369,792],"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":[1369,792],"monaco-editor/esm/vs/editor/common/services/languageService":[2657,792],"monaco-editor/esm/vs/editor/common/services/languageService.js":[2657,792],"monaco-editor/esm/vs/editor/common/services/languagesAssociations":[5911,792],"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":[5911,792],"monaco-editor/esm/vs/editor/common/services/languagesRegistry":[7024,792],"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":[7024,792],"monaco-editor/esm/vs/editor/common/services/markerDecorations":[3637,792],"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":[3637,792],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":[9420,792],"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":[9420,792],"monaco-editor/esm/vs/editor/common/services/model":[9361,792],"monaco-editor/esm/vs/editor/common/services/model.js":[9361,792],"monaco-editor/esm/vs/editor/common/services/modelService":[2713,792],"monaco-editor/esm/vs/editor/common/services/modelService.js":[2713,792],"monaco-editor/esm/vs/editor/common/services/resolverService":[4037,792],"monaco-editor/esm/vs/editor/common/services/resolverService.js":[4037,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":[3699,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":[3699,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":[4686,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":[4686,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":[7284,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":[7284,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":[2205,792],"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":[2205,792],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":[6294],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":[6294],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":[4977,792],"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":[4977,792],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":[6151,792],"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":[6151,792],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":[5863,792],"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":[5863,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":[1210,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":[1210,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":[5231,792],"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":[5231,792],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":[7412],"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":[7412]};function r(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(r)))}r.keys=()=>Object.keys(i),r.id=9204,e.exports=r},7614:(e,t,n)=>{var i={"./editorBaseApi":215,"./editorBaseApi.js":215,"./editorSimpleWorker":5926,"./editorSimpleWorker.js":5926,"./editorWorker":4117,"./editorWorker.js":4117,"./editorWorkerHost":2899,"./editorWorkerHost.js":2899,"./findSectionHeaders":6198,"./findSectionHeaders.js":6198,"./getIconClasses":2340,"./getIconClasses.js":2340,"./languageFeatureDebounce":2454,"./languageFeatureDebounce.js":2454,"./languageFeatures":2847,"./languageFeatures.js":2847,"./languageFeaturesService":1369,"./languageFeaturesService.js":1369,"./languageService":2657,"./languageService.js":2657,"./languagesAssociations":5911,"./languagesAssociations.js":5911,"./languagesRegistry":7024,"./languagesRegistry.js":7024,"./markerDecorations":3637,"./markerDecorations.js":3637,"./markerDecorationsService":9420,"./markerDecorationsService.js":9420,"./model":9361,"./model.js":9361,"./modelService":2713,"./modelService.js":2713,"./resolverService":4037,"./resolverService.js":4037,"./semanticTokensDto":3699,"./semanticTokensDto.js":3699,"./semanticTokensProviderStyling":4686,"./semanticTokensProviderStyling.js":4686,"./semanticTokensStyling":7284,"./semanticTokensStyling.js":7284,"./semanticTokensStylingService":2205,"./semanticTokensStylingService.js":2205,"./textModelSync/textModelSync.impl":6294,"./textModelSync/textModelSync.impl.js":6294,"./textModelSync/textModelSync.protocol":4977,"./textModelSync/textModelSync.protocol.js":4977,"./textResourceConfiguration":6151,"./textResourceConfiguration.js":6151,"./treeSitterParserService":5863,"./treeSitterParserService.js":5863,"./treeViewsDnd":1210,"./treeViewsDnd.js":1210,"./treeViewsDndService":5231,"./treeViewsDndService.js":5231,"./unicodeTextModelHighlighter":7412,"./unicodeTextModelHighlighter.js":7412,"monaco-editor/esm/vs/editor/common/services/editorBaseApi":215,"monaco-editor/esm/vs/editor/common/services/editorBaseApi.js":215,"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker":5926,"monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js":5926,"monaco-editor/esm/vs/editor/common/services/editorWorker":4117,"monaco-editor/esm/vs/editor/common/services/editorWorker.js":4117,"monaco-editor/esm/vs/editor/common/services/editorWorkerHost":2899,"monaco-editor/esm/vs/editor/common/services/editorWorkerHost.js":2899,"monaco-editor/esm/vs/editor/common/services/findSectionHeaders":6198,"monaco-editor/esm/vs/editor/common/services/findSectionHeaders.js":6198,"monaco-editor/esm/vs/editor/common/services/getIconClasses":2340,"monaco-editor/esm/vs/editor/common/services/getIconClasses.js":2340,"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce":2454,"monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js":2454,"monaco-editor/esm/vs/editor/common/services/languageFeatures":2847,"monaco-editor/esm/vs/editor/common/services/languageFeatures.js":2847,"monaco-editor/esm/vs/editor/common/services/languageFeaturesService":1369,"monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js":1369,"monaco-editor/esm/vs/editor/common/services/languageService":2657,"monaco-editor/esm/vs/editor/common/services/languageService.js":2657,"monaco-editor/esm/vs/editor/common/services/languagesAssociations":5911,"monaco-editor/esm/vs/editor/common/services/languagesAssociations.js":5911,"monaco-editor/esm/vs/editor/common/services/languagesRegistry":7024,"monaco-editor/esm/vs/editor/common/services/languagesRegistry.js":7024,"monaco-editor/esm/vs/editor/common/services/markerDecorations":3637,"monaco-editor/esm/vs/editor/common/services/markerDecorations.js":3637,"monaco-editor/esm/vs/editor/common/services/markerDecorationsService":9420,"monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js":9420,"monaco-editor/esm/vs/editor/common/services/model":9361,"monaco-editor/esm/vs/editor/common/services/model.js":9361,"monaco-editor/esm/vs/editor/common/services/modelService":2713,"monaco-editor/esm/vs/editor/common/services/modelService.js":2713,"monaco-editor/esm/vs/editor/common/services/resolverService":4037,"monaco-editor/esm/vs/editor/common/services/resolverService.js":4037,"monaco-editor/esm/vs/editor/common/services/semanticTokensDto":3699,"monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js":3699,"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling":4686,"monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js":4686,"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling":7284,"monaco-editor/esm/vs/editor/common/services/semanticTokensStyling.js":7284,"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService":2205,"monaco-editor/esm/vs/editor/common/services/semanticTokensStylingService.js":2205,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl":6294,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.impl.js":6294,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol":4977,"monaco-editor/esm/vs/editor/common/services/textModelSync/textModelSync.protocol.js":4977,"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration":6151,"monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js":6151,"monaco-editor/esm/vs/editor/common/services/treeSitterParserService":5863,"monaco-editor/esm/vs/editor/common/services/treeSitterParserService.js":5863,"monaco-editor/esm/vs/editor/common/services/treeViewsDnd":1210,"monaco-editor/esm/vs/editor/common/services/treeViewsDnd.js":1210,"monaco-editor/esm/vs/editor/common/services/treeViewsDndService":5231,"monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js":5231,"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter":7412,"monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js":7412};function r(e){var t=s(e);return n(t)}function s(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=s,e.exports=r,r.id=7614}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}(()=>{n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{n.e=()=>Promise.resolve()})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();(()=>{"use strict";var e=n(1352),t=n(5926),i=n(2899);let r=!1;function s(n){if(r)return;r=!0;const s=new e.SimpleWorkerServer((e=>{globalThis.postMessage(e)}),(e=>new t.EditorSimpleWorker(i.EditorWorkerHost.getChannel(e),n)));globalThis.onmessage=e=>{s.onmessage(e.data)}} /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ -function o(e,t=!1){const n=e.length;let i=0,r="",s=0,o=16,h=0,u=0,d=0,g=0,f=0;function m(t,n){let r=0,s=0;while(r=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}i++,r++}return r=n){t+=e.substring(r,i),f=2;break}const s=e.charCodeAt(i);if(34===s){t+=e.substring(r,i),i++;break}if(92!==s){if(s>=0&&s<=31){if(l(s)){t+=e.substring(r,i),f=2;break}f=6}i++}else{if(t+=e.substring(r,i),i++,i>=n){f=2;break}const s=e.charCodeAt(i++);switch(s){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=m(4,!0);e>=0?t+=String.fromCharCode(e):f=4;break;default:f=5}r=i}}return t}function k(){if(r="",f=0,s=i,u=h,g=d,i>=n)return s=n,o=17;let t=e.charCodeAt(i);if(a(t)){do{i++,r+=String.fromCharCode(t),t=e.charCodeAt(i)}while(a(t));return o=15}if(l(t))return i++,r+=String.fromCharCode(t),13===t&&10===e.charCodeAt(i)&&(i++,r+="\n"),h++,d=i,o=14;switch(t){case 123:return i++,o=1;case 125:return i++,o=2;case 91:return i++,o=3;case 93:return i++,o=4;case 58:return i++,o=6;case 44:return i++,o=5;case 34:return i++,r=_(),o=10;case 47:const a=i-1;if(47===e.charCodeAt(i+1)){i+=2;while(i=12&&e<=15);return e}return{setPosition:p,getPosition:()=>i,scan:t?C:k,getToken:()=>o,getTokenValue:()=>r,getTokenOffset:()=>s,getTokenLength:()=>i-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-g,getTokenError:()=>f}}function a(e){return 32===e||9===e}function l(e){return 10===e||13===e}function c(e){return e>=48&&e<=57}var h;globalThis.onmessage=e=>{r||s(null)},function(e){e[e["lineFeed"]=10]="lineFeed",e[e["carriageReturn"]=13]="carriageReturn",e[e["space"]=32]="space",e[e["_0"]=48]="_0",e[e["_1"]=49]="_1",e[e["_2"]=50]="_2",e[e["_3"]=51]="_3",e[e["_4"]=52]="_4",e[e["_5"]=53]="_5",e[e["_6"]=54]="_6",e[e["_7"]=55]="_7",e[e["_8"]=56]="_8",e[e["_9"]=57]="_9",e[e["a"]=97]="a",e[e["b"]=98]="b",e[e["c"]=99]="c",e[e["d"]=100]="d",e[e["e"]=101]="e",e[e["f"]=102]="f",e[e["g"]=103]="g",e[e["h"]=104]="h",e[e["i"]=105]="i",e[e["j"]=106]="j",e[e["k"]=107]="k",e[e["l"]=108]="l",e[e["m"]=109]="m",e[e["n"]=110]="n",e[e["o"]=111]="o",e[e["p"]=112]="p",e[e["q"]=113]="q",e[e["r"]=114]="r",e[e["s"]=115]="s",e[e["t"]=116]="t",e[e["u"]=117]="u",e[e["v"]=118]="v",e[e["w"]=119]="w",e[e["x"]=120]="x",e[e["y"]=121]="y",e[e["z"]=122]="z",e[e["A"]=65]="A",e[e["B"]=66]="B",e[e["C"]=67]="C",e[e["D"]=68]="D",e[e["E"]=69]="E",e[e["F"]=70]="F",e[e["G"]=71]="G",e[e["H"]=72]="H",e[e["I"]=73]="I",e[e["J"]=74]="J",e[e["K"]=75]="K",e[e["L"]=76]="L",e[e["M"]=77]="M",e[e["N"]=78]="N",e[e["O"]=79]="O",e[e["P"]=80]="P",e[e["Q"]=81]="Q",e[e["R"]=82]="R",e[e["S"]=83]="S",e[e["T"]=84]="T",e[e["U"]=85]="U",e[e["V"]=86]="V",e[e["W"]=87]="W",e[e["X"]=88]="X",e[e["Y"]=89]="Y",e[e["Z"]=90]="Z",e[e["asterisk"]=42]="asterisk",e[e["backslash"]=92]="backslash",e[e["closeBrace"]=125]="closeBrace",e[e["closeBracket"]=93]="closeBracket",e[e["colon"]=58]="colon",e[e["comma"]=44]="comma",e[e["dot"]=46]="dot",e[e["doubleQuote"]=34]="doubleQuote",e[e["minus"]=45]="minus",e[e["openBrace"]=123]="openBrace",e[e["openBracket"]=91]="openBracket",e[e["plus"]=43]="plus",e[e["slash"]=47]="slash",e[e["formFeed"]=12]="formFeed",e[e["tab"]=9]="tab"}(h||(h={}));var u,d=new Array(20).fill(0).map(((e,t)=>" ".repeat(t))),g=200,f={" ":{"\n":new Array(g).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),"\r":new Array(g).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),"\r\n":new Array(g).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t)))},"\t":{"\n":new Array(g).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),"\r":new Array(g).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),"\r\n":new Array(g).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)))}},m=["\n","\r","\r\n"];function p(e,t,n){let i,r,s,a,l;if(t){a=t.offset,l=a+t.length,s=a;while(s>0&&!v(e,s-1))s--;let o=l;while(o1)return b(c,g)+b(u,i+p);const e=u.length*(i+p);return!h||e>f[C][c].length?c+b(u,i+p):e<=0?c:f[C][c][e]}function S(){let e=y.scan();g=0;while(15===e||14===e)14===e&&n.keepLines?g+=1:14===e&&(g=1),e=y.scan();return L=16===e||0!==y.getTokenError(),e}const x=[];function E(n,i,r){L||t&&!(ia)||e.substring(i,r)===n||x.push({offset:i,length:r-i,content:n})}let N=S();if(n.keepLines&&g>0&&E(b(c,g),0,0),17!==N){let e=y.getTokenOffset()+s,t=u.length*i<20&&n.insertSpaces?d[u.length*i]:b(u,i);E(t,s,e)}while(17!==N){let e=y.getTokenOffset()+y.getTokenLength()+s,t=S(),i="",r=!1;while(0===g&&(12===t||13===t)){let n=y.getTokenOffset()+s;E(d[1],e,n),e=y.getTokenOffset()+y.getTokenLength()+s,r=12===t,i=r?w():"",t=S()}if(2===t)1!==N&&p--,n.keepLines&&g>0||!n.keepLines&&1!==N?i=w():n.keepLines&&(i=d[1]);else if(4===t)3!==N&&p--,n.keepLines&&g>0||!n.keepLines&&3!==N?i=w():n.keepLines&&(i=d[1]);else{switch(N){case 3:case 1:p++,i=n.keepLines&&g>0||!n.keepLines?w():d[1];break;case 5:i=n.keepLines&&g>0||!n.keepLines?w():d[1];break;case 12:i=w();break;case 13:g>0?i=w():r||(i=d[1]);break;case 6:n.keepLines&&g>0?i=w():r||(i=d[1]);break;case 10:n.keepLines&&g>0?i=w():6!==t||r||(i="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&g>0?i=w():12!==t&&13!==t||r?5!==t&&17!==t&&(L=!0):i=d[1];break;case 16:L=!0;break}g>0&&(12===t||13===t)&&(i=w())}17===t&&(i=n.keepLines&&g>0?w():n.insertFinalNewline?c:"");const o=y.getTokenOffset()+s;E(i,e,o),N=t}return x}function b(e,t){let n="";for(let i=0;i{const e={};o(e),s.push(r),r=e,i=null},onObjectProperty:e=>{i=e},onObjectEnd:()=>{r=s.pop()},onArrayBegin:()=>{const e=[];o(e),s.push(r),r=e,i=null},onArrayEnd:()=>{r=s.pop()},onLiteralValue:o,onError:(e,n,i)=>{t.push({error:e,offset:n,length:i})}};return x(e,a,n),r[0]}function y(e){if(!e.parent||!e.parent.children)return[];const t=y(e.parent);if("property"===e.parent.type){const n=e.parent.children[0].value;t.push(n)}else if("array"===e.parent.type){const n=e.parent.children.indexOf(e);-1!==n&&t.push(n)}return t}function L(e){switch(e.type){case"array":return e.children.map(L);case"object":const t=Object.create(null);for(let n of e.children){const e=n.children[1];e&&(t[n.children[0].value]=L(e))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function w(e,t,n=!1){return t>=e.offset&&te(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),(()=>r.slice())):()=>!0}function l(e){return e?t=>e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),(()=>r.slice())):()=>!0}const h=a(t.onObjectBegin),d=c(t.onObjectProperty),g=s(t.onObjectEnd),f=a(t.onArrayBegin),m=s(t.onArrayEnd),p=c(t.onLiteralValue),b=l(t.onSeparator),_=s(t.onComment),k=l(t.onError),v=n&&n.disallowComments,C=n&&n.allowTrailingComma;function y(){while(1){const e=i.scan();switch(i.getTokenError()){case 4:L(14);break;case 5:L(15);break;case 3:L(13);break;case 1:v||L(11);break;case 2:L(12);break;case 6:L(16);break}switch(e){case 12:case 13:v?L(10):_();break;case 16:L(1);break;case 15:case 14:break;default:return e}}}function L(e,t=[],n=[]){if(k(e),t.length+n.length>0){let e=i.getToken();while(17!==e){if(-1!==t.indexOf(e)){y();break}if(-1!==n.indexOf(e))break;e=y()}}}function w(e){const t=i.getTokenValue();return e?p(t):(d(t),r.push(t)),y(),!0}function S(){switch(i.getToken()){case 11:const e=i.getTokenValue();let t=Number(e);isNaN(t)&&(L(2),t=0),p(t);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return y(),!0}function x(){return 10!==i.getToken()?(L(3,[],[2,5]),!1):(w(!1),6===i.getToken()?(b(":"),y(),T()||L(4,[],[2,5])):L(5,[],[2,5]),r.pop(),!0)}function E(){h(),y();let e=!1;while(2!==i.getToken()&&17!==i.getToken()){if(5===i.getToken()){if(e||L(4,[],[]),b(","),y(),2===i.getToken()&&C)break}else e&&L(6,[],[]);x()||L(4,[],[2,5]),e=!0}return g(),2!==i.getToken()?L(7,[2],[]):y(),!0}function N(){f(),y();let e=!0,t=!1;while(4!==i.getToken()&&17!==i.getToken()){if(5===i.getToken()){if(t||L(4,[],[]),b(","),y(),4===i.getToken()&&C)break}else t&&L(6,[],[]);e?(r.push(0),e=!1):r[r.length-1]++,T()||L(4,[],[4,5]),t=!0}return m(),e||r.pop(),4!==i.getToken()?L(8,[4],[]):y(),!0}function T(){switch(i.getToken()){case 3:return N();case 1:return E();case 10:return w(!0);default:return S()}}return y(),17===i.getToken()?!!n.allowEmptyContent||(L(4,[],[]),!1):T()?(17!==i.getToken()&&L(9,[],[]),!0):(L(4,[],[]),!1)}(function(e){e.DEFAULT={allowTrailingComma:!1}})(u||(u={}));var E,N,T=o;(function(e){e[e["None"]=0]="None",e[e["UnexpectedEndOfComment"]=1]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=2]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=3]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=4]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=5]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=6]="InvalidCharacter"})(E||(E={})),function(e){e[e["OpenBraceToken"]=1]="OpenBraceToken",e[e["CloseBraceToken"]=2]="CloseBraceToken",e[e["OpenBracketToken"]=3]="OpenBracketToken",e[e["CloseBracketToken"]=4]="CloseBracketToken",e[e["CommaToken"]=5]="CommaToken",e[e["ColonToken"]=6]="ColonToken",e[e["NullKeyword"]=7]="NullKeyword",e[e["TrueKeyword"]=8]="TrueKeyword",e[e["FalseKeyword"]=9]="FalseKeyword",e[e["StringLiteral"]=10]="StringLiteral",e[e["NumericLiteral"]=11]="NumericLiteral",e[e["LineCommentTrivia"]=12]="LineCommentTrivia",e[e["BlockCommentTrivia"]=13]="BlockCommentTrivia",e[e["LineBreakTrivia"]=14]="LineBreakTrivia",e[e["Trivia"]=15]="Trivia",e[e["Unknown"]=16]="Unknown",e[e["EOF"]=17]="EOF"}(N||(N={}));var A,I,O,M,D,R,B,F,P,V,z,j,q,W,U,$,H,K,G,Q,J,X,Y,Z,ee,te,ne,ie,re,se,oe,ae,le,ce,he,ue,de,ge,fe,me,pe,be,_e,ke,ve,Ce,ye,Le,we,Se,xe,Ee,Ne,Te,Ae,Ie,Oe,Me,De,Re,Be,Fe,Pe,Ve,ze,je,qe,We,Ue,$e,He,Ke,Ge,Qe,Je,Xe,Ye,Ze,et,tt,nt=C,it=S,rt=y,st=L;function ot(e,t,n){return p(e,t,n)}function at(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n0?e.lastIndexOf(t)===n:0===n&&e===t}function mt(e){let t="";gt(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(i){return}}}function pt(e){let t=0;for(let n=0;n0&&(i.arguments=n),i}function n(e){let t=e;return bt.defined(t)&&bt.string(t.title)&&bt.string(t.command)}e.create=t,e.is=n}(Q||(Q={})),function(e){function t(e,t){return{range:e,newText:t}}function n(e,t){return{range:{start:e,end:e},newText:t}}function i(e){return{range:e,newText:""}}function r(e){const t=e;return bt.objectLiteral(t)&&bt.string(t.newText)&&B.is(t.range)}e.replace=t,e.insert=n,e.del=i,e.is=r}(J||(J={})),function(e){function t(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i}function n(e){const t=e;return bt.objectLiteral(t)&&bt.string(t.label)&&(bt.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(bt.string(t.description)||void 0===t.description)}e.create=t,e.is=n}(X||(X={})),function(e){function t(e){const t=e;return bt.string(t)}e.is=t}(Y||(Y={})),function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}function i(e,t){return{range:e,newText:"",annotationId:t}}function r(e){const t=e;return J.is(t)&&(X.is(t.annotationId)||Y.is(t.annotationId))}e.replace=t,e.insert=n,e.del=i,e.is=r}(Z||(Z={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function n(e){let t=e;return bt.defined(t)&&ae.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=n}(ee||(ee={})),function(e){function t(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i}function n(e){let t=e;return t&&"create"===t.kind&&bt.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||bt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||bt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Y.is(t.annotationId))}e.create=t,e.is=n}(te||(te={})),function(e){function t(e,t,n,i){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r}function n(e){let t=e;return t&&"rename"===t.kind&&bt.string(t.oldUri)&&bt.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||bt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||bt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Y.is(t.annotationId))}e.create=t,e.is=n}(ne||(ne={})),function(e){function t(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i}function n(e){let t=e;return t&&"delete"===t.kind&&bt.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||bt.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||bt.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Y.is(t.annotationId))}e.create=t,e.is=n}(ie||(ie={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>bt.string(e.kind)?te.is(e)||ne.is(e)||ie.is(e):ee.is(e))))}e.is=t}(re||(re={})),function(e){function t(e){return{uri:e}}function n(e){let t=e;return bt.defined(t)&&bt.string(t.uri)}e.create=t,e.is=n}(se||(se={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){let t=e;return bt.defined(t)&&bt.string(t.uri)&&bt.integer(t.version)}e.create=t,e.is=n}(oe||(oe={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){let t=e;return bt.defined(t)&&bt.string(t.uri)&&(null===t.version||bt.integer(t.version))}e.create=t,e.is=n}(ae||(ae={})),function(e){function t(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}}function n(e){let t=e;return bt.defined(t)&&bt.string(t.uri)&&bt.string(t.languageId)&&bt.integer(t.version)&&bt.string(t.text)}e.create=t,e.is=n}(le||(le={})),function(e){function t(t){const n=t;return n===e.PlainText||n===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",e.is=t}(ce||(ce={})),function(e){function t(e){const t=e;return bt.objectLiteral(e)&&ce.is(t.kind)&&bt.string(t.value)}e.is=t}(he||(he={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(ue||(ue={})),function(e){e.PlainText=1,e.Snippet=2}(de||(de={})),function(e){e.Deprecated=1}(ge||(ge={})),function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}function n(e){const t=e;return t&&bt.string(t.newText)&&B.is(t.insert)&&B.is(t.replace)}e.create=t,e.is=n}(fe||(fe={})),function(e){e.asIs=1,e.adjustIndentation=2}(me||(me={})),function(e){function t(e){const t=e;return t&&(bt.string(t.detail)||void 0===t.detail)&&(bt.string(t.description)||void 0===t.description)}e.is=t}(pe||(pe={})),function(e){function t(e){return{label:e}}e.create=t}(be||(be={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(_e||(_e={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function n(e){const t=e;return bt.string(t)||bt.objectLiteral(t)&&bt.string(t.language)&&bt.string(t.value)}e.fromPlainText=t,e.is=n}(ke||(ke={})),function(e){function t(e){let t=e;return!!t&&bt.objectLiteral(t)&&(he.is(t.contents)||ke.is(t.contents)||bt.typedArray(t.contents,ke.is))&&(void 0===e.range||B.is(e.range))}e.is=t}(ve||(ve={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(Ce||(Ce={})),function(e){function t(e,t,...n){let i={label:e};return bt.defined(t)&&(i.documentation=t),bt.defined(n)?i.parameters=n:i.parameters=[],i}e.create=t}(ye||(ye={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Le||(Le={})),function(e){function t(e,t){let n={range:e};return bt.number(t)&&(n.kind=t),n}e.create=t}(we||(we={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Se||(Se={})),function(e){e.Deprecated=1}(xe||(xe={})),function(e){function t(e,t,n,i,r){let s={name:e,kind:t,location:{uri:i,range:n}};return r&&(s.containerName=r),s}e.create=t}(Ee||(Ee={})),function(e){function t(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}e.create=t}(Ne||(Ne={})),function(e){function t(e,t,n,i,r,s){let o={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==s&&(o.children=s),o}function n(e){let t=e;return t&&bt.string(t.name)&&bt.number(t.kind)&&B.is(t.range)&&B.is(t.selectionRange)&&(void 0===t.detail||bt.string(t.detail))&&(void 0===t.deprecated||bt.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=n}(Te||(Te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Ae||(Ae={})),function(e){e.Invoked=1,e.Automatic=2}(Ie||(Ie={})),function(e){function t(e,t,n){let i={diagnostics:e};return void 0!==t&&null!==t&&(i.only=t),void 0!==n&&null!==n&&(i.triggerKind=n),i}function n(e){let t=e;return bt.defined(t)&&bt.typedArray(t.diagnostics,G.is)&&(void 0===t.only||bt.typedArray(t.only,bt.string))&&(void 0===t.triggerKind||t.triggerKind===Ie.Invoked||t.triggerKind===Ie.Automatic)}e.create=t,e.is=n}(Oe||(Oe={})),function(e){function t(e,t,n){let i={title:e},r=!0;return"string"===typeof t?(r=!1,i.kind=t):Q.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i}function n(e){let t=e;return t&&bt.string(t.title)&&(void 0===t.diagnostics||bt.typedArray(t.diagnostics,G.is))&&(void 0===t.kind||bt.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Q.is(t.command))&&(void 0===t.isPreferred||bt.boolean(t.isPreferred))&&(void 0===t.edit||re.is(t.edit))}e.create=t,e.is=n}(Me||(Me={})),function(e){function t(e,t){let n={range:e};return bt.defined(t)&&(n.data=t),n}function n(e){let t=e;return bt.defined(t)&&B.is(t.range)&&(bt.undefined(t.command)||Q.is(t.command))}e.create=t,e.is=n}(De||(De={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function n(e){let t=e;return bt.defined(t)&&bt.uinteger(t.tabSize)&&bt.boolean(t.insertSpaces)}e.create=t,e.is=n}(Re||(Re={})),function(e){function t(e,t,n){return{range:e,target:t,data:n}}function n(e){let t=e;return bt.defined(t)&&B.is(t.range)&&(bt.undefined(t.target)||bt.string(t.target))}e.create=t,e.is=n}(Be||(Be={})),function(e){function t(e,t){return{range:e,parent:t}}function n(t){let n=t;return bt.objectLiteral(n)&&B.is(n.range)&&(void 0===n.parent||e.is(n.parent))}e.create=t,e.is=n}(Fe||(Fe={})),function(e){e["namespace"]="namespace",e["type"]="type",e["class"]="class",e["enum"]="enum",e["interface"]="interface",e["struct"]="struct",e["typeParameter"]="typeParameter",e["parameter"]="parameter",e["variable"]="variable",e["property"]="property",e["enumMember"]="enumMember",e["event"]="event",e["function"]="function",e["method"]="method",e["macro"]="macro",e["keyword"]="keyword",e["modifier"]="modifier",e["comment"]="comment",e["string"]="string",e["number"]="number",e["regexp"]="regexp",e["operator"]="operator",e["decorator"]="decorator"}(Pe||(Pe={})),function(e){e["declaration"]="declaration",e["definition"]="definition",e["readonly"]="readonly",e["static"]="static",e["deprecated"]="deprecated",e["abstract"]="abstract",e["async"]="async",e["modification"]="modification",e["documentation"]="documentation",e["defaultLibrary"]="defaultLibrary"}(Ve||(Ve={})),function(e){function t(e){const t=e;return bt.objectLiteral(t)&&(void 0===t.resultId||"string"===typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"===typeof t.data[0])}e.is=t}(ze||(ze={})),function(e){function t(e,t){return{range:e,text:t}}function n(e){const t=e;return void 0!==t&&null!==t&&B.is(t.range)&&bt.string(t.text)}e.create=t,e.is=n}(je||(je={})),function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}function n(e){const t=e;return void 0!==t&&null!==t&&B.is(t.range)&&bt.boolean(t.caseSensitiveLookup)&&(bt.string(t.variableName)||void 0===t.variableName)}e.create=t,e.is=n}(qe||(qe={})),function(e){function t(e,t){return{range:e,expression:t}}function n(e){const t=e;return void 0!==t&&null!==t&&B.is(t.range)&&(bt.string(t.expression)||void 0===t.expression)}e.create=t,e.is=n}(We||(We={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function n(e){const t=e;return bt.defined(t)&&B.is(e.stoppedLocation)}e.create=t,e.is=n}(Ue||(Ue={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,e.is=t}($e||($e={})),function(e){function t(e){return{value:e}}function n(e){const t=e;return bt.objectLiteral(t)&&(void 0===t.tooltip||bt.string(t.tooltip)||he.is(t.tooltip))&&(void 0===t.location||F.is(t.location))&&(void 0===t.command||Q.is(t.command))}e.create=t,e.is=n}(He||(He={})),function(e){function t(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i}function n(e){const t=e;return bt.objectLiteral(t)&&R.is(t.position)&&(bt.string(t.label)||bt.typedArray(t.label,He.is))&&(void 0===t.kind||$e.is(t.kind))&&void 0===t.textEdits||bt.typedArray(t.textEdits,J.is)&&(void 0===t.tooltip||bt.string(t.tooltip)||he.is(t.tooltip))&&(void 0===t.paddingLeft||bt.boolean(t.paddingLeft))&&(void 0===t.paddingRight||bt.boolean(t.paddingRight))}e.create=t,e.is=n}(Ke||(Ke={})),function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t}(Ge||(Ge={})),function(e){function t(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}}e.create=t}(Qe||(Qe={})),function(e){function t(e){return{items:e}}e.create=t}(Je||(Je={})),function(e){e.Invoked=0,e.Automatic=1}(Xe||(Xe={})),function(e){function t(e,t){return{range:e,text:t}}e.create=t}(Ye||(Ye={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t}(Ze||(Ze={})),function(e){function t(e){const t=e;return bt.objectLiteral(t)&&O.is(t.uri)&&bt.string(t.name)}e.is=t}(et||(et={})),function(e){function t(e,t,n,i){return new _t(e,t,n,i)}function n(e){let t=e;return!!(bt.defined(t)&&bt.string(t.uri)&&(bt.undefined(t.languageId)||bt.string(t.languageId))&&bt.uinteger(t.lineCount)&&bt.func(t.getText)&&bt.func(t.positionAt)&&bt.func(t.offsetAt))}function i(e,t){let n=e.getText(),i=r(t,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),s=n.length;for(let r=i.length-1;r>=0;r--){let t=i[r],o=e.offsetAt(t.range.start),a=e.offsetAt(t.range.end);if(!(a<=s))throw new Error("Overlapping edit");n=n.substring(0,o)+t.newText+n.substring(a,n.length),s=o}return n}function r(e,t){if(e.length<=1)return e;const n=e.length/2|0,i=e.slice(0,n),s=e.slice(n);r(i,t),r(s,t);let o=0,a=0,l=0;while(o0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return R.create(0,e);while(ne?i=r:n=r+1}let r=n-1;return R.create(r,e-t[r])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1e?i=r:n=r+1}let r=n-1;return{line:r,character:e-t[r]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Nt(e){const t=Et(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function Tt(...e){const t=e[0];let n,i,r;if("string"===typeof t)n=t,i=t,e.splice(0,1),r=e&&"object"===typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let i=t[0];for(let e=1;e0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),r=t.args??{}}const s=Lt?.[n];return s?"string"===typeof s?It(s,r):s.comment?It(s.message,r):It(i,r):It(i,r)}(function(e){function t(e,t,n,i){return new wt(e,t,n,i)}function n(e,t,n){if(e instanceof wt)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function i(e,t){let n=e.getText(),i=St(t.map(Nt),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=0;const s=[];for(const o of i){let t=e.offsetAt(o.range.start);if(tr&&s.push(n.substring(r,t)),o.newText.length&&s.push(o.newText),r=e.offsetAt(o.range.end)}return s.push(n.substr(r)),s.join("")}e.create=t,e.update=n,e.applyEdits=i})(kt||(kt={})),function(e){e[e["Undefined"]=0]="Undefined",e[e["EnumValueMismatch"]=1]="EnumValueMismatch",e[e["Deprecated"]=2]="Deprecated",e[e["UnexpectedEndOfComment"]=257]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=258]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=259]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=260]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=261]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=262]="InvalidCharacter",e[e["PropertyExpected"]=513]="PropertyExpected",e[e["CommaExpected"]=514]="CommaExpected",e[e["ColonExpected"]=515]="ColonExpected",e[e["ValueExpected"]=516]="ValueExpected",e[e["CommaOrCloseBacketExpected"]=517]="CommaOrCloseBacketExpected",e[e["CommaOrCloseBraceExpected"]=518]="CommaOrCloseBraceExpected",e[e["TrailingComma"]=519]="TrailingComma",e[e["DuplicateKey"]=520]="DuplicateKey",e[e["CommentNotPermitted"]=521]="CommentNotPermitted",e[e["PropertyKeysMustBeDoublequoted"]=528]="PropertyKeysMustBeDoublequoted",e[e["SchemaResolveError"]=768]="SchemaResolveError",e[e["SchemaUnsupportedFeature"]=769]="SchemaUnsupportedFeature"}(vt||(vt={})),function(e){e[e["v3"]=3]="v3",e[e["v4"]=4]="v4",e[e["v6"]=6]="v6",e[e["v7"]=7]="v7",e[e["v2019_09"]=19]="v2019_09",e[e["v2020_12"]=20]="v2020_12"}(Ct||(Ct={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ce.Markdown,ce.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}}(yt||(yt={}));var At=/{([^}]+)}/g;function It(e,t){return 0===Object.keys(t).length?e:e.replace(At,((e,n)=>t[n]??e))}var Ot,Mt={"color-hex":{errorMessage:Tt("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:Tt("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:Tt("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:Tt("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:Tt("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:Tt("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:Tt("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:Tt("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},Dt=class{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Rt=class extends Dt{constructor(e,t){super(e,t),this.type="null",this.value=null}},Bt=class extends Dt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}},Ft=class extends Dt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}},Pt=class extends Dt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}},Vt=class extends Dt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}},zt=class extends Dt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},jt=class extends Dt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}};function qt(e){return ht(e)?e?{}:{not:{}}:e}(function(e){e[e["Key"]=0]="Key",e[e["Enum"]=1]="Enum"})(Ot||(Ot={}));var Wt={"http://json-schema.org/draft-03/schema#":Ct.v3,"http://json-schema.org/draft-04/schema#":Ct.v4,"http://json-schema.org/draft-06/schema#":Ct.v6,"http://json-schema.org/draft-07/schema#":Ct.v7,"https://json-schema.org/draft/2019-09/schema":Ct.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ct.v2020_12},Ut=class{constructor(e){this.schemaDraft=e}},$t=class e{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||Xt(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},Ht=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};Ht.instance=new Ht;var Kt=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===vt.EnumValueMismatch&&(e.message=Tt("Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};function Gt(e,t=[]){return new Yt(e,t,[])}function Qt(e){return st(e)}function Jt(e){return rt(e)}function Xt(e,t,n=!1){return t>=e.offset&&t{let i=e(n);const r=n.children;if(Array.isArray(r))for(let e=0;e{const i=B.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return G.create(i,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const i=new $t(t,n),r=Zt(e),s=new Ut(r);return en(this.root,e,new Kt,i,s),i.schemas}return[]}};function Zt(e,t=Ct.v2020_12){let n=e.$schema;return n?Wt[n]??t:t}function en(e,t,n,i,r){if(!e||!i.include(e))return;if("property"===e.type)return en(e.valueNode,t,n,i,r);const s=e;switch(o(),s.type){case"object":h(s);break;case"array":c(s);break;case"string":l(s);break;case"number":a(s);break}function o(){function e(e){return s.type===e||"integer"===e&&"number"===s.type&&s.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Tt("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Tt('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const d of t.allOf){const e=new Kt,t=i.newSub();en(s,qt(d),e,t,r),n.merge(e),i.merge(t)}const o=qt(t.not);if(o){const e=new Kt,a=i.newSub();en(s,o,e,a,r),e.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Tt("Matches a schema that is not allowed.")});for(const t of a.schemas)t.inverted=!t.inverted,i.add(t)}const a=(e,t)=>{const o=[];let a;for(const n of e){const e=qt(n),l=new Kt,c=i.newSub();if(en(s,e,l,c,r),l.hasProblems()||o.push(e),a)if(t||l.hasProblems()||a.validationResult.hasProblems()){const t=l.compare(a.validationResult);t>0?a={schema:e,validationResult:l,matchingSchemas:c}:0===t&&(a.matchingSchemas.merge(c),a.validationResult.mergeEnumValues(l))}else a.matchingSchemas.merge(c),a.validationResult.propertiesMatches+=l.propertiesMatches,a.validationResult.propertiesValueMatches+=l.propertiesValueMatches,a.validationResult.mergeProcessedProperties(l);else a={schema:e,validationResult:l,matchingSchemas:c}}return o.length>1&&t&&n.problems.push({location:{offset:s.offset,length:1},message:Tt("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),i.merge(a.matchingSchemas)),o.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1),Array.isArray(t.oneOf)&&a(t.oneOf,!0);const l=e=>{const t=new Kt,o=i.newSub();en(s,qt(e),t,o,r),n.merge(t),i.merge(o)},c=(e,t,o)=>{const a=qt(e),c=new Kt,h=i.newSub();en(s,a,c,h,r),i.merge(h),n.mergeProcessedProperties(c),c.hasProblems()?o&&l(o):t&&l(t)},h=qt(t.if);if(h&&c(h,qt(t.then),qt(t.else)),Array.isArray(t.enum)){const e=Qt(s);let i=!1;for(const n of t.enum)if(at(e,n)){i=!0;break}n.enumValues=t.enum,n.enumValueMatch=i,i||n.problems.push({location:{offset:s.offset,length:s.length},code:vt.EnumValueMismatch,message:t.errorMessage||Tt("Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}if(ct(t.const)){const e=Qt(s);at(e,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:vt.EnumValueMismatch,message:t.errorMessage||Tt("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let u=t.deprecationMessage;if(u||t.deprecated){u=u||Tt("Value is deprecated");let e="property"===s.parent?.type?s.parent:s;n.problems.push({location:{offset:e.offset,length:e.length},severity:$.Warning,message:u,code:vt.Deprecated})}}function a(e){const i=e.value;function r(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(lt(t.multipleOf)){let s=-1;if(Number.isInteger(t.multipleOf))s=i%t.multipleOf;else{let e=r(t.multipleOf),n=r(i);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier=l&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("Value is above the exclusive maximum of {0}.",l)});const c=o(t.minimum,t.exclusiveMinimum);lt(c)&&ih&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("Value is above the maximum of {0}.",h)})}function l(e){if(lt(t.minLength)&&pt(e.value)t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("String is longer than the maximum length of {0}.",t.maxLength)}),ut(t.pattern)){const i=mt(t.pattern);i?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Tt('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let i;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(i=Tt("URI with a scheme is expected.")):i=Tt("URI is expected.")}else i=Tt("URI expected.");i&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Tt("String is not a URI: {0}",i)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const i=Mt[t.format];e.value&&i.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||i.errorMessage});default:}}function c(e){let s,o;r.schemaDraft>=Ct.v2020_12?(s=t.prefixItems,o=Array.isArray(t.items)?void 0:t.items):(s=Array.isArray(t.items)?t.items:void 0,o=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==s){const t=Math.min(s.length,e.items.length);for(;a=Ct.v2020_12&&n.processedProperties.add(String(t)))}0!==i||lt(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||Tt("Array does not contain required item.")}),lt(t.minContains)&&it.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||Tt("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const c=t.unevaluatedItems;if(void 0!==c)for(let h=0;ht.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){let t=function(){for(let e=0;e{o.delete(e),n.processedProperties.add(e)};if(t.properties)for(const d of Object.keys(t.properties)){a(d);const e=t.properties[d],o=s[d];if(o)if(ht(e))if(e)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||Tt("Property {0} is not allowed.",d)})}else{const t=new Kt;en(o,e,t,i,r),n.mergePropertyMatch(t)}}if(t.patternProperties)for(const d of Object.keys(t.patternProperties)){const e=mt(d);if(e){const l=[];for(const a of o)if(e.test(a)){l.push(a);const e=s[a];if(e){const s=t.patternProperties[d];if(ht(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const i=e.parent;n.problems.push({location:{offset:i.keyNode.offset,length:i.keyNode.length},message:t.errorMessage||Tt("Property {0} is not allowed.",a)})}else{const t=new Kt;en(e,s,t,i,r),n.mergePropertyMatch(t)}}}l.forEach(a)}}const l=t.additionalProperties;if(void 0!==l)for(const d of o){a(d);const e=s[d];if(e)if(!1===l){const i=e.parent;n.problems.push({location:{offset:i.keyNode.offset,length:i.keyNode.length},message:t.errorMessage||Tt("Property {0} is not allowed.",d)})}else if(!0!==l){const t=new Kt;en(e,l,t,i,r),n.mergePropertyMatch(t)}}const c=t.unevaluatedProperties;if(void 0!==c){const e=[];for(const a of o)if(!n.processedProperties.has(a)){e.push(a);const o=s[a];if(o)if(!1===c){const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||Tt("Property {0} is not allowed.",a)})}else if(!0!==c){const e=new Kt;en(o,c,e,i,r),n.mergePropertyMatch(e)}}e.forEach(a)}if(lt(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("Object has more properties than limit of {0}.",t.maxProperties)}),lt(t.minProperties)&&e.properties.length0){c--;while(c>0&&/\s/.test(r.charAt(c)))c--;h=c+1}if(l(e,t,c,h),n&&u(n,!1),i.length+o.length>0){let e=s.getToken();while(17!==e){if(-1!==i.indexOf(e)){a();break}if(-1!==o.indexOf(e))break;e=a()}}return n}function h(){switch(s.getTokenError()){case 4:return c(Tt("Invalid unicode sequence in string."),vt.InvalidUnicode),!0;case 5:return c(Tt("Invalid escape character in string."),vt.InvalidEscapeCharacter),!0;case 3:return c(Tt("Unexpected end of number."),vt.UnexpectedEndOfNumber),!0;case 1:return c(Tt("Unexpected end of comment."),vt.UnexpectedEndOfComment),!0;case 2:return c(Tt("Unexpected end of string."),vt.UnexpectedEndOfString),!0;case 6:return c(Tt("Invalid characters in string. Control characters must be escaped."),vt.InvalidCharacter),!0}return!1}function u(e,t){return e.length=s.getTokenOffset()+s.getTokenLength()-e.offset,t&&a(),e}function d(e){if(3!==s.getToken())return;const t=new Ft(e,s.getTokenOffset());a();let n=!1;while(4!==s.getToken()&&17!==s.getToken()){if(5===s.getToken()){n||c(Tt("Value expected"),vt.ValueExpected);const e=s.getTokenOffset();if(a(),4===s.getToken()){n&&l(Tt("Trailing comma"),vt.TrailingComma,e,e+1);continue}}else n&&c(Tt("Expected comma"),vt.CommaExpected);const e=k(t);e?t.items.push(e):c(Tt("Value expected"),vt.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==s.getToken()?c(Tt("Expected comma or closing bracket"),vt.CommaOrCloseBacketExpected,t):u(t,!0)}const g=new Vt(void 0,0,0);function f(t,n){const i=new zt(t,s.getTokenOffset(),g);let r=p(i);if(!r){if(16!==s.getToken())return;{c(Tt("Property keys must be doublequoted"),vt.PropertyKeysMustBeDoublequoted);const e=new Vt(i,s.getTokenOffset(),s.getTokenLength());e.value=s.getTokenValue(),r=e,a()}}if(i.keyNode=r,"//"!==r.value){const e=n[r.value];e?(l(Tt("Duplicate object key"),vt.DuplicateKey,i.keyNode.offset,i.keyNode.offset+i.keyNode.length,$.Warning),dt(e)&&l(Tt("Duplicate object key"),vt.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,$.Warning),n[r.value]=!0):n[r.value]=i}if(6===s.getToken())i.colonOffset=s.getTokenOffset(),a();else if(c(Tt("Colon expected"),vt.ColonExpected),10===s.getToken()&&e.positionAt(r.offset+r.length).line=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const i={items:[],isIncomplete:!1},r=e.getText(),s=e.offsetAt(t);let o=n.getNodeFromOffset(s,!0);if(this.isInComment(e,o?o.offset:0,s))return Promise.resolve(i);if(o&&s===o.offset+o.length&&s>0){const e=r[s-1];("object"===o.type&&"}"===e||"array"===o.type&&"]"===e)&&(o=o.parent)}const a=this.getCurrentWord(e,s);let l;if(!o||"string"!==o.type&&"number"!==o.type&&"boolean"!==o.type&&"null"!==o.type){let n=s-a.length;n>0&&'"'===r[n-1]&&n--,l=B.create(e.positionAt(n),t)}else l=B.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));const c=!1,h=new Map,u={add:e=>{let t=e.label;const n=h.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";h.has(e)||(t=e)}e.textEdit=J.replace(l,e.insertText),c&&(e.commitCharacters=e.kind===ue.Property?sn:rn),e.label=t,h.set(t,e),i.items.push(e)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then((t=>{const c=[];let d,g=!0,f="";if(o&&"string"===o.type){const e=o.parent;e&&"property"===e.type&&e.keyNode===o&&(g=!e.valueNode,d=e,f=r.substr(o.offset+1,o.length-2),e&&(o=e.parent))}if(o&&"object"===o.type){if(o.offset===s)return i;const m=o.properties;m.forEach((e=>{d&&d===e||h.set(e.keyNode.value,be.create("__"))}));let p="";g&&(p=this.evaluateSeparatorAfter(e,e.offsetAt(l.end))),t?this.getPropertyCompletions(t,n,o,g,p,u):this.getSchemaLessPropertyCompletions(n,o,f,u);const b=Jt(o);this.contributions.forEach((t=>{const n=t.collectPropertyCompletions(e.uri,b,a,g,""===p,u);n&&c.push(n)})),!t&&a.length>0&&'"'!==r.charAt(s-a.length-1)&&(u.add({kind:ue.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,p),insertTextFormat:de.Snippet,documentation:""}),u.setAsIncomplete())}const m={};return t?this.getValueCompletions(t,n,o,s,e,u,m):this.getSchemaLessValueCompletions(n,o,s,e,u),this.contributions.length>0&&this.getContributedValueCompletions(n,o,s,e,u,c),this.promiseConstructor.all(c).then((()=>{if(0===u.getNumberOfProposals()){let t=s;!o||"string"!==o.type&&"number"!==o.type&&"boolean"!==o.type&&"null"!==o.type||(t=o.offset+o.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(m,n,u)}return i}))}))}getPropertyCompletions(e,t,n,i,r,s){const o=t.getMatchingSchemas(e.schema,n.offset);o.forEach((e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach((e=>{const n=t[e];if("object"===typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:ue.Property,label:e,insertText:this.getInsertTextForProperty(e,n,i,r),insertTextFormat:de.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&ft(t.insertText,`$1${r}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(t)}}));const n=e.schema.propertyNames;if("object"===typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t=void 0)=>{const o={kind:ue.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,i,r),insertTextFormat:de.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(o.sortText=n.suggestSortText),o.insertText&&ft(o.insertText,`$1${r}`)&&(o.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(o)};if(n.enum)for(let t=0;t{e.properties.forEach((e=>{const t=e.keyNode.value;i.add({kind:ue.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:de.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&r(e.valueNode),!0)))}else"array"===t.parent.type&&t.parent.items.forEach((e=>{"object"===e.type&&e!==t&&r(e)}));else"object"===t.type&&i.add({kind:ue.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:de.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,i,r){let s=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(s=t.offset+t.length,t=t.parent),!t)return r.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:de.Snippet,documentation:""}),void r.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:de.Snippet,documentation:""});const o=this.evaluateSeparatorAfter(i,s),a=e=>{e.parent&&!Xt(e.parent,n,!0)&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,i),insertText:this.getInsertTextForMatchingNode(e,i,o),insertTextFormat:de.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,o,r)};if("property"===t.type&&n>(t.colonOffset||0)){const i=t.valueNode;if(i&&(n>i.offset+i.length||"object"===i.type||"array"===i.type))return;const s=t.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===s&&e.valueNode&&a(e.valueNode),!0))),"$schema"===s&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(o,r)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0)))}else t.items.forEach(a)}getValueCompletions(e,t,n,i,r,s,o){let a,l,c=i;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(c=n.offset+n.length,l=n,n=n.parent),n){if("property"===n.type&&i>(n.colonOffset||0)){const e=n.valueNode;if(e&&i>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const h=this.evaluateSeparatorAfter(r,c),u=t.getMatchingSchemas(e.schema,n.offset,l);for(const e of u)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=s;if(e.schema.uniqueItems){const e=new Set;n.children.forEach((t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(Qt(t)))})),t={...s,add(t){e.has(t.label)||s.add(t)}}}if(Array.isArray(e.schema.items)){const s=this.findItemAtOffset(n,r,i);s(t.colonOffset||0)){const e=t.keyNode.value,o=t.valueNode;if((!o||n<=o.offset+o.length)&&t.parent){const n=Jt(t.parent);this.contributions.forEach((t=>{const o=t.collectValueCompletions(i.uri,n,e,r);o&&s.push(o)}))}}}else this.contributions.forEach((e=>{const t=e.collectDefaultCompletions(i.uri,r);t&&s.push(t)}))}addSchemaValueCompletions(e,t,n,i){"object"===typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,i),Array.isArray(e.allOf)&&e.allOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,i))),Array.isArray(e.anyOf)&&e.anyOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,i))),Array.isArray(e.oneOf)&&e.oneOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,i))))}addDefaultValueCompletions(e,t,n,i=0){let r=!1;if(ct(e.default)){let s=e.type,o=e.default;for(let e=i;e>0;e--)o=[o],s="array";const a={kind:this.getSuggestionKind(s),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:de.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:Tt("Default value")}:a.detail=Tt("Default value"),n.add(a),r=!0}Array.isArray(e.examples)&&e.examples.forEach((s=>{let o=e.type,a=s;for(let e=i;e>0;e--)a=[a],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:de.Snippet}),r=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((s=>{let o,a,l=e.type,c=s.body,h=s.label;if(ct(c)){let n=e.type;for(let e=i;e>0;e--)c=[c],n="array";o=this.getInsertTextForSnippetValue(c,t),a=this.getFilterTextForSnippetValue(c),h=h||this.getLabelForSnippetValue(c)}else{if("string"!==typeof s.bodyText)return;{let e="",n="",r="";for(let t=i;t>0;t--)e=e+r+"[\n",n=n+"\n"+r+"]",r+="\t",l="array";o=e+r+s.bodyText.split("\n").join("\n"+r)+n+t,h=h||o,a=o.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(l),label:h,documentation:this.fromMarkup(s.markdownDescription)||s.description,insertText:o,insertTextFormat:de.Snippet,filterText:a}),r=!0})),!r&&"object"===typeof e.items&&!Array.isArray(e.items)&&i<5&&this.addDefaultValueCompletions(e.items,t,n,i+1)}addEnumValueCompletions(e,t,n){if(ct(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:de.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let i=0,r=e.enum.length;it[e]=!0)):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e["object"]&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:de.Snippet,detail:Tt("New object"),documentation:""}),e["array"]&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:de.Snippet,detail:Tt("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:de.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:de.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){const n=this.schemaService.getRegisteredSchemaIds((e=>"http"===e||"https"===e));n.forEach((n=>{n.startsWith("http://json-schema.org/draft-")&&(n+="#"),t.add({kind:ue.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:de.Snippet,documentation:""})}))}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){const t=JSON.stringify(e);return t.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){const n=e=>"string"===typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e);return nn(e,"",n)+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return ue.Value;switch(e){case"string":return ue.Value;case"object":return ue.Module;case"property":return ue.Property;default:return ue.Value}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:const n=t.getText().substr(e.offset,e.length);return n}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const i=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(e,t,n,i){const r=this.getInsertTextForValue(e,"");if(!n)return r;const s=r+": ";let o,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;ct(e)&&(o=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(o||1!==t.enum.length||(o=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),ct(t.const)&&(o||(o=this.getInsertTextForGuessedValue(t.const,"")),a++),ct(t.default)&&(o||(o=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(o||(o=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return r}}}return(!o||a>1)&&(o="$1"),s+o+i}getCurrentWord(e,t){let n=t-1;const i=e.getText();while(n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(i.charAt(n)))n--;return i.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=T(e.getText(),!0);n.setPosition(t);const i=n.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const i=T(t.getText(),!0),r=e.items;for(let s=r.length-1;s>=0;s--){const e=r[s];if(n>e.offset+e.length){i.setPosition(e.offset+e.length);const t=i.scan();return 5===t&&n>=i.getTokenOffset()+i.getTokenLength()?s+1:s}if(n>=e.offset)return s}return 0}isInComment(e,t,n){const i=T(e.getText(),!1);i.setPosition(t);let r=i.scan();while(17!==r&&i.getTokenOffset()+i.getTokenLength()r.offset+1&&i{const t={contents:e,range:o};return t},l=Jt(r);for(let c=this.contributions.length-1;c>=0;c--){const t=this.contributions[c],n=t.getInfoContribution(e.uri,l);if(n)return n.then((e=>a(e)))}return this.schemaService.getSchemaForResource(e.uri,n).then((e=>{if(e&&r){const t=n.getMatchingSchemas(e.schema,r.offset);let i,s,o,l;t.every((e=>{if(e.node===r&&!e.inverted&&e.schema&&(i=i||e.schema.title,s=s||e.schema.markdownDescription||ln(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(Qt(r));e.schema.markdownEnumDescriptions?o=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(o=ln(e.schema.enumDescriptions[t])),o&&(l=e.schema.enum[t],"string"!==typeof l&&(l=JSON.stringify(l)))}return!0}));let c="";return i&&(c=ln(i)),s&&(c.length>0&&(c+="\n\n"),c+=s),o&&(c.length>0&&(c+="\n\n"),c+=`\`${cn(l)}\`: ${o}`),a([c])}return null}))}};function ln(e){if(e){const t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3");return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function cn(e){return-1!==e.indexOf("`")?"`` "+e+" ``":e}var hn=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:$.Error)}doValidation(e,t,n,i){if(!this.validationEnabled)return this.promise.resolve([]);const r=[],s={},o=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;s[t]||(s[t]=!0,r.push(e))},a=i=>{let s=n?.trailingCommas?fn(n.trailingCommas):$.Error,a=n?.comments?fn(n.comments):this.commentSeverity,l=n?.schemaValidation?fn(n.schemaValidation):$.Warning,c=n?.schemaRequest?fn(n.schemaRequest):$.Warning;if(i){const r=(n,i)=>{if(t.root&&c){const r=t.root,s="object"===r.type?r.properties[0]:void 0;if(s&&"$schema"===s.keyNode.value){const t=s.valueNode||s,r=B.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));o(G.create(r,n,c,i))}else{const t=B.create(e.positionAt(r.offset),e.positionAt(r.offset+1));o(G.create(t,n,c,i))}}};if(i.errors.length)r(i.errors[0],vt.SchemaResolveError);else if(l){for(const e of i.warnings)r(e,vt.SchemaUnsupportedFeature);const s=t.validate(e,i.schema,l,n?.schemaDraft);s&&s.forEach(o)}dn(i.schema)&&(a=void 0),gn(i.schema)&&(s=void 0)}for(const e of t.syntaxErrors){if(e.code===vt.TrailingComma){if("number"!==typeof s)continue;e.severity=s}o(e)}if("number"===typeof a){const e=Tt("Comments are not permitted in JSON.");t.comments.forEach((t=>{o(G.create(t,e,a,vt.CommentNotPermitted))}))}return r};if(i){const e=i.id||"schemaservice://untitled/"+un++,t=this.jsonSchemaService.registerExternalSchema({uri:e,schema:i});return t.getResolvedSchema().then((e=>a(e)))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((e=>a(e)))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}},un=0;function dn(e){if(e&&"object"===typeof e){if(ht(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=dn(t);if(ht(e))return e}}}function gn(e){if(e&&"object"===typeof e){if(ht(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(ht(t["allowsTrailingCommas"]))return t["allowsTrailingCommas"];if(e.allOf)for(const n of e.allOf){const e=gn(n);if(ht(e))return e}}}function fn(e){switch(e){case"error":return $.Error;case"warning":return $.Warning;case"ignore":return}}var mn=48,pn=57,bn=65,_n=97,kn=102;function vn(e){return e=_n&&e<=kn?e-_n+10:0)}function Cn(e){if("#"===e[0])switch(e.length){case 4:return{red:17*vn(e.charCodeAt(1))/255,green:17*vn(e.charCodeAt(2))/255,blue:17*vn(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*vn(e.charCodeAt(1))/255,green:17*vn(e.charCodeAt(2))/255,blue:17*vn(e.charCodeAt(3))/255,alpha:17*vn(e.charCodeAt(4))/255};case 7:return{red:(16*vn(e.charCodeAt(1))+vn(e.charCodeAt(2)))/255,green:(16*vn(e.charCodeAt(3))+vn(e.charCodeAt(4)))/255,blue:(16*vn(e.charCodeAt(5))+vn(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*vn(e.charCodeAt(1))+vn(e.charCodeAt(2)))/255,green:(16*vn(e.charCodeAt(3))+vn(e.charCodeAt(4)))/255,blue:(16*vn(e.charCodeAt(5))+vn(e.charCodeAt(6)))/255,alpha:(16*vn(e.charCodeAt(7))+vn(e.charCodeAt(8)))/255}}}var yn=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const i=t.root;if(!i)return[];let r=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if(("vscode://defaultsettings/keybindings.json"===s||ft(s.toLowerCase(),"/user/keybindings.json"))&&"array"===i.type){const t=[];for(const o of i.items)if("object"===o.type)for(const i of o.properties)if("key"===i.keyNode.value&&i.valueNode){const a=F.create(e.uri,Ln(e,o));if(t.push({name:wn(i.valueNode),kind:Se.Function,location:a}),r--,r<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),t}return t}const o=[{node:i,containerName:""}];let a=0,l=!1;const c=[],h=(t,n)=>{"array"===t.type?t.items.forEach((e=>{e&&o.push({node:e,containerName:n})})):"object"===t.type&&t.properties.forEach((t=>{const i=t.valueNode;if(i)if(r>0){r--;const s=F.create(e.uri,Ln(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;c.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(i.type),location:s,containerName:n}),o.push({node:i,containerName:a})}else l=!0}))};while(a{"array"===t.type?t.items.forEach(((t,i)=>{if(t)if(r>0){r--;const s=Ln(e,t),o=s,l=String(i),c={name:l,kind:this.getSymbolKind(t.type),range:s,selectionRange:o,children:[]};n.push(c),a.push({result:c.children,node:t})}else c=!0})):"object"===t.type&&t.properties.forEach((t=>{const i=t.valueNode;if(i)if(r>0){r--;const s=Ln(e,t),o=Ln(e,t.keyNode),l=[],c={name:this.getKeyLabel(t),kind:this.getSymbolKind(i.type),range:s,selectionRange:o,children:l,detail:this.getDetail(i)};n.push(c),a.push({result:l,node:i})}else c=!0}))};while(l{const r=[];if(i){let s=n&&"number"===typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const o=t.getMatchingSchemas(i.schema),a={};for(const t of o)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const i=String(t.node.offset);if(!a[i]){const o=Cn(Qt(t.node));if(o){const n=Ln(e,t.node);r.push({color:o,range:n})}if(a[i]=!0,s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),r}}}return r}))}getColorPresentations(e,t,n,i){const r=[],s=Math.round(255*n.red),o=Math.round(255*n.green),a=Math.round(255*n.blue);function l(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let c;return c=1===n.alpha?`#${l(s)}${l(o)}${l(a)}`:`#${l(s)}${l(o)}${l(a)}${l(Math.round(255*n.alpha))}`,r.push({label:c,textEdit:J.replace(i,JSON.stringify(c))}),r}};function Ln(e,t){return B.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function wn(e){return Qt(e)||Tt("")}var Sn,xn={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},En={id:Tt("A unique identifier for the schema."),$schema:Tt("The schema to verify this document against."),title:Tt("A descriptive title of the element."),description:Tt("A long description of the element. Used in hover menus and suggestions."),default:Tt("A default value. Used by suggestions."),multipleOf:Tt("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:Tt("The maximum numerical value, inclusive by default."),exclusiveMaximum:Tt("Makes the maximum property exclusive."),minimum:Tt("The minimum numerical value, inclusive by default."),exclusiveMinimum:Tt("Makes the minimum property exclusive."),maxLength:Tt("The maximum length of a string."),minLength:Tt("The minimum length of a string."),pattern:Tt("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:Tt("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:Tt("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:Tt("The maximum number of items that can be inside an array. Inclusive."),minItems:Tt("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:Tt("If all of the items in the array must be unique. Defaults to false."),maxProperties:Tt("The maximum number of properties an object can have. Inclusive."),minProperties:Tt("The minimum number of properties an object can have. Inclusive."),required:Tt("An array of strings that lists the names of all properties required on this object."),additionalProperties:Tt("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:Tt("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:Tt("A map of property names to schemas for each property."),patternProperties:Tt("A map of regular expressions on property names to schemas for matching properties."),dependencies:Tt("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:Tt("The set of literal values that are valid."),type:Tt("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:Tt("Describes the format expected for the value."),allOf:Tt("An array of schemas, all of which must match."),anyOf:Tt("An array of schemas, where at least one must match."),oneOf:Tt("An array of schemas, exactly one of which must match."),not:Tt("A schema which must not match."),$id:Tt("A unique identifier for the schema."),$ref:Tt("Reference a definition hosted on any location."),$comment:Tt("Comments from schema authors to readers or maintainers of the schema."),readOnly:Tt("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:Tt("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:Tt('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:Tt("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:Tt("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:Tt("Describes the media type of a string property."),contentEncoding:Tt("Describes the content encoding of a string property."),if:Tt('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:Tt('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:Tt('The "else" subschema is used for validation when the "if" subschema fails.')};for(const n in xn.schemas){const e=xn.schemas[n];for(const t in e.properties){let n=e.properties[t];"boolean"===typeof n&&(n=e.properties[t]={});const i=En[t];i&&(n["description"]=i)}}(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",r=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",r=0):r=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),s=a,o=0;continue}}else if(2===i.length||1===i.length){i="",r=0,s=a,o=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(s+1,a):i=e.slice(s+1,a),r=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return i}var i={resolve:function(){for(var e,i="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(i=o+"/"+i,r=47===o.charCodeAt(0))}return i=n(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&r&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var r=1;rc){if(47===n.charCodeAt(a+u))return n.slice(a+u+1);if(0===u)return n.slice(a+u)}else o>c&&(47===e.charCodeAt(r+u)?h=u:0===u&&(h=0));break}var d=e.charCodeAt(r+u);if(d!==n.charCodeAt(a+u))break;47===d&&(h=u)}var g="";for(u=r+h+1;u<=s;++u)u!==s&&47!==e.charCodeAt(u)||(0===g.length?g+="..":g+="/..");return g.length>0?g+n.slice(a+h):(a+=h,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,r=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){r=o;break}}else s=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,r=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!o){r=i+1;break}}else-1===l&&(o=!1,l=i+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=l))}return r===s?s=l:-1===s&&(s=e.length),e.slice(r,s)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){r=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(r,s)},extname:function(e){t(e);for(var n=-1,i=0,r=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===r&&(s=!1,r=a+1),46===l?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){i=a+1;break}}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,r=e.charCodeAt(0),s=47===r;s?(n.root="/",i=1):i=0;for(var o=-1,a=0,l=-1,c=!0,h=e.length-1,u=0;h>=i;--h)if(47!==(r=e.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===r?-1===o?o=h:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){a=h+1;break}return-1===o||-1===l||0===u||1===u&&o===l-1&&o===a+1?-1!==l&&(n.base=n.name=0===a&&s?e.slice(1,l):e.slice(a,l)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(a,o),n.base=e.slice(a,l)),n.ext=e.slice(o,l)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{let e;if(n.r(i),n.d(i,{URI:()=>h,Utils:()=>w}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,r=/^\//,s=/^\/\//;function o(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",l="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,i,r,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,n||a),this.query=i||a,this.fragment=r||a,o(this,s))}get fsPath(){return p(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===i?i=this.path:null===i&&(i=a),void 0===r?r=this.query:null===r&&(r=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new d(t,n,i,r,s)}static parse(e,t=!1){const n=c.exec(e);return n?new d(n[2]||a,v(n[4]||a),v(n[5]||a),v(n[7]||a),v(n[9]||a),t):new d(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){const e=t.indexOf(l,2);-1===e?(n=t.substring(2),t=l):(n=t.substring(2,e),t=t.substring(e)||l)}return new d("file",n,t,a,a)}static from(e){const t=new d(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new d(e);return t._formatted=e.external,t._fsPath=e._sep===u?e.fsPath:null,t}}return e}}const u=e?1:void 0;class d extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=p(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t,n){let i,r=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=g[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function m(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(i=i.replace(/\//g,"\\")),i}function b(e,t){const n=t?m:f;let i="",{scheme:r,authority:s,path:o,query:a,fragment:c}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=l,i+=l),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),c&&(i+="#",i+=t?c:f(c,!1,!1)),i}function _(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+_(e.substr(3)):e}}const k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(k)?e.replace(k,(e=>_(e))):e}var C=n(470);const y=C.posix||C,L="/";var w;!function(e){e.joinPath=function(e,...t){return e.with({path:y.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,i=!1;n[0]!==L&&(n=L+n,i=!0);let r=y.resolve(n,...t);return i&&r[0]===L&&!e.authority&&(r=r.substring(1)),e.with({path:r})},e.dirname=function(e){if(0===e.path.length||e.path===L)return e;let t=y.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return y.basename(e.path)},e.extname=function(e){return y.extname(e.path)}}(w||(w={}))})(),Sn=i})();var{URI:Nn,Utils:Tn}=Sn;function An(e,t){if("string"!==typeof e)throw new TypeError("Expected a string");const n=String(e);let i="";const r=!!t&&!!t.extended,s=!!t&&!!t.globstar;let o=!1;const a=t&&"string"===typeof t.flags?t.flags:"";let l;for(let c=0,h=n.length;c1&&("/"===e||void 0===e||"{"===e||","===e)&&("/"===a||void 0===a||","===a||"}"===a);n?("/"===a?c++:"/"===e&&i.endsWith("\\/")&&(i=i.substr(0,i.length-2)),i+="((?:[^/]*(?:/|$))*)"):i+="([^/]*)"}else i+=".*";break;default:i+=l}return a&&~a.indexOf("g")||(i="^"+i+"$"),new RegExp(i,a)}var In,On="!",Mn="/",Dn=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e=t[0]!==On;e||(t=t.substring(1)),t.length>0&&(t[0]===Mn&&(t=t.substring(1)),this.globWrappers.push({regexp:An("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&(t=jn(t),t.endsWith("/")||(t+="/"),this.folderUri=t)}catch(i){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:i}of this.globWrappers)n.test(e)&&(t=i);return t}getURIs(){return this.uris}},Rn=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new Bn(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((e=>this.service.resolveSchemaContent(e,this)))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Bn=class{constructor(e,t=[]){this.schema=e,this.errors=t}},Fn=class{constructor(e,t=[],n=[],i){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=i}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return qt(t)}getSectionRecursive(e,t){if(!t||"boolean"===typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const i of Object.keys(t.patternProperties)){const r=mt(i);if(r?.test(n))return this.getSectionRecursive(e,t.patternProperties[i])}else{if("object"===typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const i=parseInt(n,10);if(!isNaN(i)&&t.items[i])return this.getSectionRecursive(e,t.items[i])}else if(t.items)return this.getSectionRecursive(e,t.items)}}},Pn=class{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter((t=>{const n=Nn.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))}get promise(){return this.promiseConstructor}dispose(){while(this.callOnDispose.length>0)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;e=zn(e);const n=[e],i=Object.keys(this.schemasById).map((e=>this.schemasById[e]));while(n.length){const e=n.pop();for(let r=0;r{if(!t){const t=Tt("Unable to load schema from '{0}': No content.",qn(e));return new Bn({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push(Tt("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",qn(e))),t=t.trimStart());let i={};const r=[];return i=nt(t,r),r.length&&n.push(Tt("Unable to parse content from '{0}': Parse error at offset {1}.",qn(e),r[0].offset)),new Bn(i,n)}),(t=>{let n=t.toString();const i=t.toString().split("Error: ");return i.length>1&&(n=i[1]),ft(n,".")&&(n=n.substr(0,n.length-1)),new Bn({},[Tt("Unable to load schema from '{0}': {1}.",qn(e),n)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),i=e.schema;let r=i.$schema?zn(i.$schema):void 0;if("http://json-schema.org/draft-03/schema"===r)return this.promise.resolve(new Fn({},[Tt("Draft-03 schemas are not supported.")],[],r));let s=new Set;const o=this.contextService,a=(e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n))),n},l=(e,t,n)=>(t.anchors||(t.anchors=g(e)),t.anchors.get(n)),c=(e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])},h=(e,t,i,r)=>{let s;s=void 0===r||0===r.length?t:"/"===r.charAt(0)?a(t,r):l(t,i,r),s?c(e,s):n.push(Tt("$ref '{0}' in '{1}' can not be resolved.",r||"",i.uri))},u=(e,t,i,r)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=o.resolveRelativePath(t,r.uri)),t=zn(t);const s=this.getOrAddSchemaHandle(t);return s.getUnresolvedSchema().then((o=>{if(r.dependencies.add(t),o.errors.length){const e=i?t+"#"+i:t;n.push(Tt("Problems loading reference '{0}': {1}",e,o.errors[0]))}return h(e,o.schema,s,i),d(e,o.schema,s)}))},d=(e,t,n)=>{const i=[];return this.traverseNodes(e,(e=>{const r=new Set;while(e.$ref){const s=e.$ref,o=s.split("#",2);if(delete e.$ref,o[0].length>0)return void i.push(u(e,o[0],o[1],n));if(!r.has(s)){const i=o[1];h(e,t,n,i),r.add(s)}}e.$recursiveRef&&s.add("$recursiveRef"),e.$dynamicRef&&s.add("$dynamicRef")})),this.promise.all(i)},g=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const i=e.$id||e.id,r=ut(i)&&"#"===i.charAt(0)?i.substring(1):e.$anchor;r&&(t.has(r)?n.push(Tt("Duplicate anchor declaration: '{0}'",r)):t.set(r,e)),e.$recursiveAnchor&&s.add("$recursiveAnchor"),e.$dynamicAnchor&&s.add("$dynamicAnchor")})),t};return d(i,i,t).then((e=>{let t=[];return s.size&&t.push(Tt("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", "))),new Fn(i,n,t,r)}))}traverseNodes(e,t){if(!e||"object"!==typeof e)return Promise.resolve(null);const n=new Set,i=(...e)=>{for(const t of e)dt(t)&&a.push(t)},r=(...e)=>{for(const t of e)if(dt(t))for(const e in t){const n=e,i=t[n];dt(i)&&a.push(i)}},s=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)dt(e)&&a.push(e)},o=e=>{if(Array.isArray(e))for(const t of e)dt(t)&&a.push(t);else dt(e)&&a.push(e)},a=[e];let l=a.pop();while(l)n.has(l)||(n.add(l),t(l),i(l.additionalItems,l.additionalProperties,l.not,l.contains,l.propertyNames,l.if,l.then,l.else,l.unevaluatedItems,l.unevaluatedProperties),r(l.definitions,l.$defs,l.properties,l.patternProperties,l.dependencies,l.dependentSchemas),s(l.anyOf,l.allOf,l.oneOf,l.prefixItems),o(l.items)),l=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],i=jn(e);for(const r of this.filePatternAssociations)if(r.matchesPattern(i))for(const e of r.getURIs())t[e]||(n.push(e),t[e]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=zn(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),i=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:i},i}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),i={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,i)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+Vn++,i=this.addSchemaHandle(e,n);return i.getResolvedSchema().then((e=>t.getMatchingSchemas(e.schema).filter((e=>!e.inverted))))}return this.getSchemaForResource(e.uri,t).then((e=>e?t.getMatchingSchemas(e.schema).filter((e=>!e.inverted)):[]))}},Vn=0;function zn(e){try{return Nn.parse(e).toString(!0)}catch(t){return e}}function jn(e){try{return Nn.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function qn(e){try{const t=Nn.parse(e);if("file"===t.scheme)return t.fsPath}catch(t){}return e}function Wn(e,t){const n=[],i=[],r=[];let s=-1;const o=T(e.getText(),!1);let a=o.scan();function l(e){n.push(e),i.push(r.length)}while(17!==a){switch(a){case 1:case 3:{const t=e.positionAt(o.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};r.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(r.length>0&&r[r.length-1].kind===t){const t=r.pop(),n=e.positionAt(o.getTokenOffset()).line;t&&n>t.startLine+1&&s!==t.startLine&&(t.endLine=n-1,l(t),s=t.startLine)}break}case 13:{const t=e.positionAt(o.getTokenOffset()).line,n=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;1===o.getTokenError()&&t+1=0&&r[e].kind!==q.Region)e--;if(e>=0){const n=r[e];r.length=e,t>n.startLine&&s!==n.startLine&&(n.endLine=t,l(n),s=n.startLine)}}}break}}a=o.scan()}const c=t&&t.rangeLimit;if("number"!==typeof c||n.length<=c)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const h=[];for(let f of i)f<30&&(h[f]=(h[f]||0)+1);let u=0,d=0;for(let f=0;fc){d=f;break}u+=e}}const g=[];for(let f=0;f=e&&i<=t&&a.push(r(e,t)),a.push(r(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(r(s.offset,s.offset+s.length));break}if("property"===s.type||s.parent&&"array"===s.parent.type){const e=o(s.offset+s.length,5);-1!==e&&a.push(r(s.offset,e))}s=s.parent}let l;for(let e=a.length-1;e>=0;e--)l=Fe.create(a[e],l);return l||(l=Fe.create(B.create(t,t))),l}function r(t,n){return B.create(e.positionAt(t),e.positionAt(n))}const s=T(e.getText(),!0);function o(e,t){s.setPosition(e);let n=s.scan();return n===t?s.getTokenOffset()+s.getTokenLength():-1}return t.map(i)}function $n(e,t,n){let i;if(n){const t=e.offsetAt(n.start),r=e.offsetAt(n.end)-t;i={offset:t,length:r}}const r={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return ot(e.getText(),i,r).map((t=>J.replace(B.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)))}(function(e){e[e["Object"]=0]="Object",e[e["Array"]=1]="Array"})(In||(In={}));var Hn=class{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:Gn(this.childrenProperties,e,Kn),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}};function Kn(e,t){const n=e.propertyName.toLowerCase(),i=t.propertyName.toLowerCase();return ni?1:0}function Gn(e,t,n){const i=t.propertyName.toLowerCase(),r=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(is)return e.length;let o=0,a=e.length-1;while(o<=a){let i=a+o>>1,r=n(t,e[i]);if(r>0)o=i+1;else{if(!(r<0))return i;a=i-1}}return-o-1}function Qn(e,t){const n={...t,keepLines:!1},i=kt.applyEdits(e,$n(e,n,void 0)),r=kt.create("test://test.json","json",0,i),s=Jn(r),o=Xn(r,s),a=$n(o,n,void 0),l=kt.applyEdits(o,a);return[J.replace(B.create(R.create(0,0),e.positionAt(e.getText().length)),l)]}function Jn(e){const t=e.getText(),n=T(t,!1);let i,r,s,o=new Hn,a=o,l=o,c=o,h=0,u=0,d=-1,g=-1,f=0,m=0,p=[],b=!1,_=!1;while(17!==(i=n.scan())){if(!0===b&&14!==i&&15!==i&&12!==i&&13!==i&&void 0===l.endLineNumber){let e=n.getTokenStartLine();2===s||4===s?c.endLineNumber=e-1:l.endLineNumber=e-1,f=e,b=!1}if(!0===_&&14!==i&&15!==i&&12!==i&&13!==i&&(f=n.getTokenStartLine(),_=!1),n.getTokenStartLine()!==h){for(let t=h;t0){const t=i.shift(),r=t.propertyTreeArray;let s=t.beginningLineNumber;for(let o=0;o{if("property"===i.type&&"$ref"===i.keyNode.value&&"string"===i.valueNode?.type){const r=i.valueNode.value,s=ri(t,r);if(s){const t=e.positionAt(s.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:ii(e,i.valueNode)})}}return!0})),Promise.resolve(n)}function ii(e,t){return B.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function ri(e,t){const n=oi(t);return n?si(n,e.root):null}function si(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const i=t.properties.find((e=>e.keyNode.value===n));return i?si(e,i.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const i=Number.parseInt(n),r=t.items[i];return r?si(e,r):null}return null}function oi(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(ai)}function ai(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function li(e){const t=e.promiseConstructor||Promise,n=new Pn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(xn);const i=new on(n,e.contributions,t,e.clientCapabilities),r=new an(n,e.contributions,t),s=new yn(n),o=new hn(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),o.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:o.doValidation.bind(o),getLanguageStatus:o.getLanguageStatus.bind(o),parseJSONDocument:e=>tn(e,{collectComments:!0}),newJSONDocument:(e,t)=>Gt(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:i.doResolve.bind(i),doComplete:i.doComplete.bind(i),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:r.doHover.bind(r),getFoldingRanges:Wn,getSelectionRanges:Un,findDefinition:()=>Promise.resolve([]),findLinks:ni,format:(e,t,n)=>$n(e,n,t),sort:(e,t)=>Qn(e,t)}}"undefined"!==typeof fetch&&(ei=function(e){return fetch(e).then((e=>e.text()))});var ci=class{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=li({workspaceContext:{resolveRelativePath:(e,t)=>{const n=t.substr(0,t.lastIndexOf("/")+1);return gi(n,e)}},schemaRequestService:t.enableSchemaRequest?ei:void 0,clientCapabilities:yt.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let e=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,e,this._languageSettings)}return Promise.resolve([])}async doComplete(e,t){let n=this._getTextDocument(e);if(!n)return null;let i=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,i)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let n=this._getTextDocument(e);if(!n)return null;let i=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,i)}async format(e,t,n){let i=this._getTextDocument(e);if(!i)return[];let r=this._languageService.format(i,t,n);return Promise.resolve(r)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),i=this._languageService.findDocumentSymbols2(t,n);return Promise.resolve(i)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),i=this._languageService.findDocumentColors(t,n);return Promise.resolve(i)}async getColorPresentations(e,t,n){let i=this._getTextDocument(e);if(!i)return[];let r=this._languageService.parseJSONDocument(i),s=this._languageService.getColorPresentations(i,r,t,n);return Promise.resolve(s)}async getFoldingRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let i=this._languageService.getFoldingRanges(n,t);return Promise.resolve(i)}async getSelectionRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let i=this._languageService.parseJSONDocument(n),r=this._languageService.getSelectionRanges(n,t,i);return Promise.resolve(r)}async parseJSONDocument(e){let t=this._getTextDocument(e);if(!t)return null;let n=this._languageService.parseJSONDocument(t);return Promise.resolve(n)}async getMatchingSchemas(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t);return Promise.resolve(this._languageService.getMatchingSchemas(t,n))}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let n of t)if(n.uri.toString()===e)return kt.create(e,this._languageId,n.version,n.getValue());return null}},hi="/".charCodeAt(0),ui=".".charCodeAt(0);function di(e){return e.charCodeAt(0)===hi}function gi(e,t){if(di(t)){const n=Nn.parse(e),i=t.split("/");return n.with({path:fi(i)}).toString()}return mi(e,t)}function fi(e){const t=[];for(const i of e)0===i.length||1===i.length&&i.charCodeAt(0)===ui||(2===i.length&&i.charCodeAt(0)===ui&&i.charCodeAt(1)===ui?t.pop():t.push(i));e.length>1&&0===e[e.length-1].length&&t.push("");let n=t.join("/");return 0===e[0].length&&(n="/"+n),n}function mi(e,...t){const n=Nn.parse(e),i=n.path.split("/");for(let r of t)i.push(...r.split("/"));return n.with({path:fi(i)}).toString()}self.onmessage=()=>{s(((e,t)=>new ci(e,t)))}})()})(); \ No newline at end of file +function o(e,t=!1){const n=e.length;let i=0,r="",s=0,o=16,h=0,u=0,d=0,g=0,f=0;function m(t,n){let r=0,s=0;while(r=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}i++,r++}return r=n){t+=e.substring(r,i),f=2;break}const s=e.charCodeAt(i);if(34===s){t+=e.substring(r,i),i++;break}if(92!==s){if(s>=0&&s<=31){if(l(s)){t+=e.substring(r,i),f=2;break}f=6}i++}else{if(t+=e.substring(r,i),i++,i>=n){f=2;break}const s=e.charCodeAt(i++);switch(s){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=m(4,!0);e>=0?t+=String.fromCharCode(e):f=4;break;default:f=5}r=i}}return t}function k(){if(r="",f=0,s=i,u=h,g=d,i>=n)return s=n,o=17;let t=e.charCodeAt(i);if(a(t)){do{i++,r+=String.fromCharCode(t),t=e.charCodeAt(i)}while(a(t));return o=15}if(l(t))return i++,r+=String.fromCharCode(t),13===t&&10===e.charCodeAt(i)&&(i++,r+="\n"),h++,d=i,o=14;switch(t){case 123:return i++,o=1;case 125:return i++,o=2;case 91:return i++,o=3;case 93:return i++,o=4;case 58:return i++,o=6;case 44:return i++,o=5;case 34:return i++,r=_(),o=10;case 47:const a=i-1;if(47===e.charCodeAt(i+1)){i+=2;while(i=12&&e<=15);return e}return{setPosition:p,getPosition:()=>i,scan:t?C:k,getToken:()=>o,getTokenValue:()=>r,getTokenOffset:()=>s,getTokenLength:()=>i-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-g,getTokenError:()=>f}}function a(e){return 32===e||9===e}function l(e){return 10===e||13===e}function c(e){return e>=48&&e<=57}var h;globalThis.onmessage=e=>{r||s(null)},function(e){e[e["lineFeed"]=10]="lineFeed",e[e["carriageReturn"]=13]="carriageReturn",e[e["space"]=32]="space",e[e["_0"]=48]="_0",e[e["_1"]=49]="_1",e[e["_2"]=50]="_2",e[e["_3"]=51]="_3",e[e["_4"]=52]="_4",e[e["_5"]=53]="_5",e[e["_6"]=54]="_6",e[e["_7"]=55]="_7",e[e["_8"]=56]="_8",e[e["_9"]=57]="_9",e[e["a"]=97]="a",e[e["b"]=98]="b",e[e["c"]=99]="c",e[e["d"]=100]="d",e[e["e"]=101]="e",e[e["f"]=102]="f",e[e["g"]=103]="g",e[e["h"]=104]="h",e[e["i"]=105]="i",e[e["j"]=106]="j",e[e["k"]=107]="k",e[e["l"]=108]="l",e[e["m"]=109]="m",e[e["n"]=110]="n",e[e["o"]=111]="o",e[e["p"]=112]="p",e[e["q"]=113]="q",e[e["r"]=114]="r",e[e["s"]=115]="s",e[e["t"]=116]="t",e[e["u"]=117]="u",e[e["v"]=118]="v",e[e["w"]=119]="w",e[e["x"]=120]="x",e[e["y"]=121]="y",e[e["z"]=122]="z",e[e["A"]=65]="A",e[e["B"]=66]="B",e[e["C"]=67]="C",e[e["D"]=68]="D",e[e["E"]=69]="E",e[e["F"]=70]="F",e[e["G"]=71]="G",e[e["H"]=72]="H",e[e["I"]=73]="I",e[e["J"]=74]="J",e[e["K"]=75]="K",e[e["L"]=76]="L",e[e["M"]=77]="M",e[e["N"]=78]="N",e[e["O"]=79]="O",e[e["P"]=80]="P",e[e["Q"]=81]="Q",e[e["R"]=82]="R",e[e["S"]=83]="S",e[e["T"]=84]="T",e[e["U"]=85]="U",e[e["V"]=86]="V",e[e["W"]=87]="W",e[e["X"]=88]="X",e[e["Y"]=89]="Y",e[e["Z"]=90]="Z",e[e["asterisk"]=42]="asterisk",e[e["backslash"]=92]="backslash",e[e["closeBrace"]=125]="closeBrace",e[e["closeBracket"]=93]="closeBracket",e[e["colon"]=58]="colon",e[e["comma"]=44]="comma",e[e["dot"]=46]="dot",e[e["doubleQuote"]=34]="doubleQuote",e[e["minus"]=45]="minus",e[e["openBrace"]=123]="openBrace",e[e["openBracket"]=91]="openBracket",e[e["plus"]=43]="plus",e[e["slash"]=47]="slash",e[e["formFeed"]=12]="formFeed",e[e["tab"]=9]="tab"}(h||(h={}));var u,d=new Array(20).fill(0).map(((e,t)=>" ".repeat(t))),g=200,f={" ":{"\n":new Array(g).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),"\r":new Array(g).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),"\r\n":new Array(g).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t)))},"\t":{"\n":new Array(g).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),"\r":new Array(g).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),"\r\n":new Array(g).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)))}},m=["\n","\r","\r\n"];function p(e,t,n){let i,r,s,a,l;if(t){a=t.offset,l=a+t.length,s=a;while(s>0&&!v(e,s-1))s--;let o=l;while(o1)return b(c,g)+b(u,i+p);const e=u.length*(i+p);return!h||e>f[C][c].length?c+b(u,i+p):e<=0?c:f[C][c][e]}function S(){let e=y.scan();g=0;while(15===e||14===e)14===e&&n.keepLines?g+=1:14===e&&(g=1),e=y.scan();return L=16===e||0!==y.getTokenError(),e}const x=[];function E(n,i,r){L||t&&!(ia)||e.substring(i,r)===n||x.push({offset:i,length:r-i,content:n})}let N=S();if(n.keepLines&&g>0&&E(b(c,g),0,0),17!==N){let e=y.getTokenOffset()+s,t=u.length*i<20&&n.insertSpaces?d[u.length*i]:b(u,i);E(t,s,e)}while(17!==N){let e=y.getTokenOffset()+y.getTokenLength()+s,t=S(),i="",r=!1;while(0===g&&(12===t||13===t)){let n=y.getTokenOffset()+s;E(d[1],e,n),e=y.getTokenOffset()+y.getTokenLength()+s,r=12===t,i=r?w():"",t=S()}if(2===t)1!==N&&p--,n.keepLines&&g>0||!n.keepLines&&1!==N?i=w():n.keepLines&&(i=d[1]);else if(4===t)3!==N&&p--,n.keepLines&&g>0||!n.keepLines&&3!==N?i=w():n.keepLines&&(i=d[1]);else{switch(N){case 3:case 1:p++,i=n.keepLines&&g>0||!n.keepLines?w():d[1];break;case 5:i=n.keepLines&&g>0||!n.keepLines?w():d[1];break;case 12:i=w();break;case 13:g>0?i=w():r||(i=d[1]);break;case 6:n.keepLines&&g>0?i=w():r||(i=d[1]);break;case 10:n.keepLines&&g>0?i=w():6!==t||r||(i="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&g>0?i=w():12!==t&&13!==t||r?5!==t&&17!==t&&(L=!0):i=d[1];break;case 16:L=!0;break}g>0&&(12===t||13===t)&&(i=w())}17===t&&(i=n.keepLines&&g>0?w():n.insertFinalNewline?c:"");const o=y.getTokenOffset()+s;E(i,e,o),N=t}return x}function b(e,t){let n="";for(let i=0;i{const e={};o(e),s.push(r),r=e,i=null},onObjectProperty:e=>{i=e},onObjectEnd:()=>{r=s.pop()},onArrayBegin:()=>{const e=[];o(e),s.push(r),r=e,i=null},onArrayEnd:()=>{r=s.pop()},onLiteralValue:o,onError:(e,n,i)=>{t.push({error:e,offset:n,length:i})}};return x(e,a,n),r[0]}function y(e){if(!e.parent||!e.parent.children)return[];const t=y(e.parent);if("property"===e.parent.type){const n=e.parent.children[0].value;t.push(n)}else if("array"===e.parent.type){const n=e.parent.children.indexOf(e);-1!==n&&t.push(n)}return t}function L(e){switch(e.type){case"array":return e.children.map(L);case"object":const t=Object.create(null);for(let n of e.children){const e=n.children[1];e&&(t[n.children[0].value]=L(e))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function w(e,t,n=!1){return t>=e.offset&&te(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),(()=>r.slice())):()=>!0}function l(e){return e?t=>e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>e(t,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),(()=>r.slice())):()=>!0}const h=a(t.onObjectBegin),d=c(t.onObjectProperty),g=s(t.onObjectEnd),f=a(t.onArrayBegin),m=s(t.onArrayEnd),p=c(t.onLiteralValue),b=l(t.onSeparator),_=s(t.onComment),k=l(t.onError),v=n&&n.disallowComments,C=n&&n.allowTrailingComma;function y(){while(1){const e=i.scan();switch(i.getTokenError()){case 4:L(14);break;case 5:L(15);break;case 3:L(13);break;case 1:v||L(11);break;case 2:L(12);break;case 6:L(16);break}switch(e){case 12:case 13:v?L(10):_();break;case 16:L(1);break;case 15:case 14:break;default:return e}}}function L(e,t=[],n=[]){if(k(e),t.length+n.length>0){let e=i.getToken();while(17!==e){if(-1!==t.indexOf(e)){y();break}if(-1!==n.indexOf(e))break;e=y()}}}function w(e){const t=i.getTokenValue();return e?p(t):(d(t),r.push(t)),y(),!0}function S(){switch(i.getToken()){case 11:const e=i.getTokenValue();let t=Number(e);isNaN(t)&&(L(2),t=0),p(t);break;case 7:p(null);break;case 8:p(!0);break;case 9:p(!1);break;default:return!1}return y(),!0}function x(){return 10!==i.getToken()?(L(3,[],[2,5]),!1):(w(!1),6===i.getToken()?(b(":"),y(),T()||L(4,[],[2,5])):L(5,[],[2,5]),r.pop(),!0)}function E(){h(),y();let e=!1;while(2!==i.getToken()&&17!==i.getToken()){if(5===i.getToken()){if(e||L(4,[],[]),b(","),y(),2===i.getToken()&&C)break}else e&&L(6,[],[]);x()||L(4,[],[2,5]),e=!0}return g(),2!==i.getToken()?L(7,[2],[]):y(),!0}function N(){f(),y();let e=!0,t=!1;while(4!==i.getToken()&&17!==i.getToken()){if(5===i.getToken()){if(t||L(4,[],[]),b(","),y(),4===i.getToken()&&C)break}else t&&L(6,[],[]);e?(r.push(0),e=!1):r[r.length-1]++,T()||L(4,[],[4,5]),t=!0}return m(),e||r.pop(),4!==i.getToken()?L(8,[4],[]):y(),!0}function T(){switch(i.getToken()){case 3:return N();case 1:return E();case 10:return w(!0);default:return S()}}return y(),17===i.getToken()?!!n.allowEmptyContent||(L(4,[],[]),!1):T()?(17!==i.getToken()&&L(9,[],[]),!0):(L(4,[],[]),!1)}(function(e){e.DEFAULT={allowTrailingComma:!1}})(u||(u={}));var E,N,T=o;(function(e){e[e["None"]=0]="None",e[e["UnexpectedEndOfComment"]=1]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=2]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=3]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=4]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=5]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=6]="InvalidCharacter"})(E||(E={})),function(e){e[e["OpenBraceToken"]=1]="OpenBraceToken",e[e["CloseBraceToken"]=2]="CloseBraceToken",e[e["OpenBracketToken"]=3]="OpenBracketToken",e[e["CloseBracketToken"]=4]="CloseBracketToken",e[e["CommaToken"]=5]="CommaToken",e[e["ColonToken"]=6]="ColonToken",e[e["NullKeyword"]=7]="NullKeyword",e[e["TrueKeyword"]=8]="TrueKeyword",e[e["FalseKeyword"]=9]="FalseKeyword",e[e["StringLiteral"]=10]="StringLiteral",e[e["NumericLiteral"]=11]="NumericLiteral",e[e["LineCommentTrivia"]=12]="LineCommentTrivia",e[e["BlockCommentTrivia"]=13]="BlockCommentTrivia",e[e["LineBreakTrivia"]=14]="LineBreakTrivia",e[e["Trivia"]=15]="Trivia",e[e["Unknown"]=16]="Unknown",e[e["EOF"]=17]="EOF"}(N||(N={}));var A,I,O,M,D,R,B,F,P,V,z,j,q,W,U,$,H,K,G,Q,J,X,Y,Z,ee,te,ne,ie,re,se,oe,ae,le,ce,he,ue,de,ge,fe,me,pe,be,_e,ke,ve,Ce,ye,Le,we,Se,xe,Ee,Ne,Te,Ae,Ie,Oe,Me,De,Re,Be,Fe,Pe,Ve,ze,je,qe,We,Ue,$e,He,Ke,Ge,Qe,Je,Xe,Ye,Ze,et,tt,nt=C,it=S,rt=y,st=L;function ot(e,t,n){return p(e,t,n)}function at(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n0?e.lastIndexOf(t)===n:0===n&&e===t}function mt(e){let t="";gt(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function pt(e){let t=0;for(let n=0;n0&&(i.arguments=n),i}function n(e){let t=e;return bt.defined(t)&&bt.string(t.title)&&bt.string(t.command)}e.create=t,e.is=n}(Q||(Q={})),function(e){function t(e,t){return{range:e,newText:t}}function n(e,t){return{range:{start:e,end:e},newText:t}}function i(e){return{range:e,newText:""}}function r(e){const t=e;return bt.objectLiteral(t)&&bt.string(t.newText)&&B.is(t.range)}e.replace=t,e.insert=n,e.del=i,e.is=r}(J||(J={})),function(e){function t(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i}function n(e){const t=e;return bt.objectLiteral(t)&&bt.string(t.label)&&(bt.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(bt.string(t.description)||void 0===t.description)}e.create=t,e.is=n}(X||(X={})),function(e){function t(e){const t=e;return bt.string(t)}e.is=t}(Y||(Y={})),function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}function i(e,t){return{range:e,newText:"",annotationId:t}}function r(e){const t=e;return J.is(t)&&(X.is(t.annotationId)||Y.is(t.annotationId))}e.replace=t,e.insert=n,e.del=i,e.is=r}(Z||(Z={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function n(e){let t=e;return bt.defined(t)&&ae.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=n}(ee||(ee={})),function(e){function t(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i}function n(e){let t=e;return t&&"create"===t.kind&&bt.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||bt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||bt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Y.is(t.annotationId))}e.create=t,e.is=n}(te||(te={})),function(e){function t(e,t,n,i){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r}function n(e){let t=e;return t&&"rename"===t.kind&&bt.string(t.oldUri)&&bt.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||bt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||bt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Y.is(t.annotationId))}e.create=t,e.is=n}(ne||(ne={})),function(e){function t(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i}function n(e){let t=e;return t&&"delete"===t.kind&&bt.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||bt.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||bt.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Y.is(t.annotationId))}e.create=t,e.is=n}(ie||(ie={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>bt.string(e.kind)?te.is(e)||ne.is(e)||ie.is(e):ee.is(e))))}e.is=t}(re||(re={})),function(e){function t(e){return{uri:e}}function n(e){let t=e;return bt.defined(t)&&bt.string(t.uri)}e.create=t,e.is=n}(se||(se={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){let t=e;return bt.defined(t)&&bt.string(t.uri)&&bt.integer(t.version)}e.create=t,e.is=n}(oe||(oe={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){let t=e;return bt.defined(t)&&bt.string(t.uri)&&(null===t.version||bt.integer(t.version))}e.create=t,e.is=n}(ae||(ae={})),function(e){function t(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}}function n(e){let t=e;return bt.defined(t)&&bt.string(t.uri)&&bt.string(t.languageId)&&bt.integer(t.version)&&bt.string(t.text)}e.create=t,e.is=n}(le||(le={})),function(e){function t(t){const n=t;return n===e.PlainText||n===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",e.is=t}(ce||(ce={})),function(e){function t(e){const t=e;return bt.objectLiteral(e)&&ce.is(t.kind)&&bt.string(t.value)}e.is=t}(he||(he={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(ue||(ue={})),function(e){e.PlainText=1,e.Snippet=2}(de||(de={})),function(e){e.Deprecated=1}(ge||(ge={})),function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}function n(e){const t=e;return t&&bt.string(t.newText)&&B.is(t.insert)&&B.is(t.replace)}e.create=t,e.is=n}(fe||(fe={})),function(e){e.asIs=1,e.adjustIndentation=2}(me||(me={})),function(e){function t(e){const t=e;return t&&(bt.string(t.detail)||void 0===t.detail)&&(bt.string(t.description)||void 0===t.description)}e.is=t}(pe||(pe={})),function(e){function t(e){return{label:e}}e.create=t}(be||(be={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(_e||(_e={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function n(e){const t=e;return bt.string(t)||bt.objectLiteral(t)&&bt.string(t.language)&&bt.string(t.value)}e.fromPlainText=t,e.is=n}(ke||(ke={})),function(e){function t(e){let t=e;return!!t&&bt.objectLiteral(t)&&(he.is(t.contents)||ke.is(t.contents)||bt.typedArray(t.contents,ke.is))&&(void 0===e.range||B.is(e.range))}e.is=t}(ve||(ve={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(Ce||(Ce={})),function(e){function t(e,t,...n){let i={label:e};return bt.defined(t)&&(i.documentation=t),bt.defined(n)?i.parameters=n:i.parameters=[],i}e.create=t}(ye||(ye={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Le||(Le={})),function(e){function t(e,t){let n={range:e};return bt.number(t)&&(n.kind=t),n}e.create=t}(we||(we={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Se||(Se={})),function(e){e.Deprecated=1}(xe||(xe={})),function(e){function t(e,t,n,i,r){let s={name:e,kind:t,location:{uri:i,range:n}};return r&&(s.containerName=r),s}e.create=t}(Ee||(Ee={})),function(e){function t(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}e.create=t}(Ne||(Ne={})),function(e){function t(e,t,n,i,r,s){let o={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==s&&(o.children=s),o}function n(e){let t=e;return t&&bt.string(t.name)&&bt.number(t.kind)&&B.is(t.range)&&B.is(t.selectionRange)&&(void 0===t.detail||bt.string(t.detail))&&(void 0===t.deprecated||bt.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}e.create=t,e.is=n}(Te||(Te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Ae||(Ae={})),function(e){e.Invoked=1,e.Automatic=2}(Ie||(Ie={})),function(e){function t(e,t,n){let i={diagnostics:e};return void 0!==t&&null!==t&&(i.only=t),void 0!==n&&null!==n&&(i.triggerKind=n),i}function n(e){let t=e;return bt.defined(t)&&bt.typedArray(t.diagnostics,G.is)&&(void 0===t.only||bt.typedArray(t.only,bt.string))&&(void 0===t.triggerKind||t.triggerKind===Ie.Invoked||t.triggerKind===Ie.Automatic)}e.create=t,e.is=n}(Oe||(Oe={})),function(e){function t(e,t,n){let i={title:e},r=!0;return"string"===typeof t?(r=!1,i.kind=t):Q.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i}function n(e){let t=e;return t&&bt.string(t.title)&&(void 0===t.diagnostics||bt.typedArray(t.diagnostics,G.is))&&(void 0===t.kind||bt.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Q.is(t.command))&&(void 0===t.isPreferred||bt.boolean(t.isPreferred))&&(void 0===t.edit||re.is(t.edit))}e.create=t,e.is=n}(Me||(Me={})),function(e){function t(e,t){let n={range:e};return bt.defined(t)&&(n.data=t),n}function n(e){let t=e;return bt.defined(t)&&B.is(t.range)&&(bt.undefined(t.command)||Q.is(t.command))}e.create=t,e.is=n}(De||(De={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function n(e){let t=e;return bt.defined(t)&&bt.uinteger(t.tabSize)&&bt.boolean(t.insertSpaces)}e.create=t,e.is=n}(Re||(Re={})),function(e){function t(e,t,n){return{range:e,target:t,data:n}}function n(e){let t=e;return bt.defined(t)&&B.is(t.range)&&(bt.undefined(t.target)||bt.string(t.target))}e.create=t,e.is=n}(Be||(Be={})),function(e){function t(e,t){return{range:e,parent:t}}function n(t){let n=t;return bt.objectLiteral(n)&&B.is(n.range)&&(void 0===n.parent||e.is(n.parent))}e.create=t,e.is=n}(Fe||(Fe={})),function(e){e["namespace"]="namespace",e["type"]="type",e["class"]="class",e["enum"]="enum",e["interface"]="interface",e["struct"]="struct",e["typeParameter"]="typeParameter",e["parameter"]="parameter",e["variable"]="variable",e["property"]="property",e["enumMember"]="enumMember",e["event"]="event",e["function"]="function",e["method"]="method",e["macro"]="macro",e["keyword"]="keyword",e["modifier"]="modifier",e["comment"]="comment",e["string"]="string",e["number"]="number",e["regexp"]="regexp",e["operator"]="operator",e["decorator"]="decorator"}(Pe||(Pe={})),function(e){e["declaration"]="declaration",e["definition"]="definition",e["readonly"]="readonly",e["static"]="static",e["deprecated"]="deprecated",e["abstract"]="abstract",e["async"]="async",e["modification"]="modification",e["documentation"]="documentation",e["defaultLibrary"]="defaultLibrary"}(Ve||(Ve={})),function(e){function t(e){const t=e;return bt.objectLiteral(t)&&(void 0===t.resultId||"string"===typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"===typeof t.data[0])}e.is=t}(ze||(ze={})),function(e){function t(e,t){return{range:e,text:t}}function n(e){const t=e;return void 0!==t&&null!==t&&B.is(t.range)&&bt.string(t.text)}e.create=t,e.is=n}(je||(je={})),function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}function n(e){const t=e;return void 0!==t&&null!==t&&B.is(t.range)&&bt.boolean(t.caseSensitiveLookup)&&(bt.string(t.variableName)||void 0===t.variableName)}e.create=t,e.is=n}(qe||(qe={})),function(e){function t(e,t){return{range:e,expression:t}}function n(e){const t=e;return void 0!==t&&null!==t&&B.is(t.range)&&(bt.string(t.expression)||void 0===t.expression)}e.create=t,e.is=n}(We||(We={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function n(e){const t=e;return bt.defined(t)&&B.is(e.stoppedLocation)}e.create=t,e.is=n}(Ue||(Ue={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,e.is=t}($e||($e={})),function(e){function t(e){return{value:e}}function n(e){const t=e;return bt.objectLiteral(t)&&(void 0===t.tooltip||bt.string(t.tooltip)||he.is(t.tooltip))&&(void 0===t.location||F.is(t.location))&&(void 0===t.command||Q.is(t.command))}e.create=t,e.is=n}(He||(He={})),function(e){function t(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i}function n(e){const t=e;return bt.objectLiteral(t)&&R.is(t.position)&&(bt.string(t.label)||bt.typedArray(t.label,He.is))&&(void 0===t.kind||$e.is(t.kind))&&void 0===t.textEdits||bt.typedArray(t.textEdits,J.is)&&(void 0===t.tooltip||bt.string(t.tooltip)||he.is(t.tooltip))&&(void 0===t.paddingLeft||bt.boolean(t.paddingLeft))&&(void 0===t.paddingRight||bt.boolean(t.paddingRight))}e.create=t,e.is=n}(Ke||(Ke={})),function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t}(Ge||(Ge={})),function(e){function t(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}}e.create=t}(Qe||(Qe={})),function(e){function t(e){return{items:e}}e.create=t}(Je||(Je={})),function(e){e.Invoked=0,e.Automatic=1}(Xe||(Xe={})),function(e){function t(e,t){return{range:e,text:t}}e.create=t}(Ye||(Ye={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t}(Ze||(Ze={})),function(e){function t(e){const t=e;return bt.objectLiteral(t)&&O.is(t.uri)&&bt.string(t.name)}e.is=t}(et||(et={})),function(e){function t(e,t,n,i){return new _t(e,t,n,i)}function n(e){let t=e;return!!(bt.defined(t)&&bt.string(t.uri)&&(bt.undefined(t.languageId)||bt.string(t.languageId))&&bt.uinteger(t.lineCount)&&bt.func(t.getText)&&bt.func(t.positionAt)&&bt.func(t.offsetAt))}function i(e,t){let n=e.getText(),i=r(t,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),s=n.length;for(let t=i.length-1;t>=0;t--){let r=i[t],o=e.offsetAt(r.range.start),a=e.offsetAt(r.range.end);if(!(a<=s))throw new Error("Overlapping edit");n=n.substring(0,o)+r.newText+n.substring(a,n.length),s=o}return n}function r(e,t){if(e.length<=1)return e;const n=e.length/2|0,i=e.slice(0,n),s=e.slice(n);r(i,t),r(s,t);let o=0,a=0,l=0;while(o0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return R.create(0,e);while(ne?i=r:n=r+1}let r=n-1;return R.create(r,e-t[r])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1e?i=r:n=r+1}let r=n-1;return{line:r,character:e-t[r]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Nt(e){const t=Et(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function Tt(...e){const t=e[0];let n,i,r;if("string"===typeof t)n=t,i=t,e.splice(0,1),r=e&&"object"===typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let i=t[0];for(let e=1;e0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),r=t.args??{}}const s=Lt?.[n];return s?"string"===typeof s?It(s,r):s.comment?It(s.message,r):It(i,r):It(i,r)}(function(e){function t(e,t,n,i){return new wt(e,t,n,i)}function n(e,t,n){if(e instanceof wt)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function i(e,t){let n=e.getText(),i=St(t.map(Nt),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=0;const s=[];for(const t of i){let i=e.offsetAt(t.range.start);if(ir&&s.push(n.substring(r,i)),t.newText.length&&s.push(t.newText),r=e.offsetAt(t.range.end)}return s.push(n.substr(r)),s.join("")}e.create=t,e.update=n,e.applyEdits=i})(kt||(kt={})),function(e){e[e["Undefined"]=0]="Undefined",e[e["EnumValueMismatch"]=1]="EnumValueMismatch",e[e["Deprecated"]=2]="Deprecated",e[e["UnexpectedEndOfComment"]=257]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=258]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=259]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=260]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=261]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=262]="InvalidCharacter",e[e["PropertyExpected"]=513]="PropertyExpected",e[e["CommaExpected"]=514]="CommaExpected",e[e["ColonExpected"]=515]="ColonExpected",e[e["ValueExpected"]=516]="ValueExpected",e[e["CommaOrCloseBacketExpected"]=517]="CommaOrCloseBacketExpected",e[e["CommaOrCloseBraceExpected"]=518]="CommaOrCloseBraceExpected",e[e["TrailingComma"]=519]="TrailingComma",e[e["DuplicateKey"]=520]="DuplicateKey",e[e["CommentNotPermitted"]=521]="CommentNotPermitted",e[e["PropertyKeysMustBeDoublequoted"]=528]="PropertyKeysMustBeDoublequoted",e[e["SchemaResolveError"]=768]="SchemaResolveError",e[e["SchemaUnsupportedFeature"]=769]="SchemaUnsupportedFeature"}(vt||(vt={})),function(e){e[e["v3"]=3]="v3",e[e["v4"]=4]="v4",e[e["v6"]=6]="v6",e[e["v7"]=7]="v7",e[e["v2019_09"]=19]="v2019_09",e[e["v2020_12"]=20]="v2020_12"}(Ct||(Ct={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ce.Markdown,ce.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}}(yt||(yt={}));var At=/{([^}]+)}/g;function It(e,t){return 0===Object.keys(t).length?e:e.replace(At,((e,n)=>t[n]??e))}var Ot,Mt={"color-hex":{errorMessage:Tt("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:Tt("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:Tt("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:Tt("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:Tt("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:Tt("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:Tt("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:Tt("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},Dt=class{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Rt=class extends Dt{constructor(e,t){super(e,t),this.type="null",this.value=null}},Bt=class extends Dt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}},Ft=class extends Dt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}},Pt=class extends Dt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}},Vt=class extends Dt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}},zt=class extends Dt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},jt=class extends Dt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}};function qt(e){return ht(e)?e?{}:{not:{}}:e}(function(e){e[e["Key"]=0]="Key",e[e["Enum"]=1]="Enum"})(Ot||(Ot={}));var Wt={"http://json-schema.org/draft-03/schema#":Ct.v3,"http://json-schema.org/draft-04/schema#":Ct.v4,"http://json-schema.org/draft-06/schema#":Ct.v6,"http://json-schema.org/draft-07/schema#":Ct.v7,"https://json-schema.org/draft/2019-09/schema":Ct.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ct.v2020_12},Ut=class{constructor(e){this.schemaDraft=e}},$t=class e{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||Xt(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},Ht=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};Ht.instance=new Ht;var Kt=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===vt.EnumValueMismatch&&(e.message=Tt("Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};function Gt(e,t=[]){return new Yt(e,t,[])}function Qt(e){return st(e)}function Jt(e){return rt(e)}function Xt(e,t,n=!1){return t>=e.offset&&t{let i=e(n);const r=n.children;if(Array.isArray(r))for(let e=0;e{const i=B.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return G.create(i,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const i=new $t(t,n),r=Zt(e),s=new Ut(r);return en(this.root,e,new Kt,i,s),i.schemas}return[]}};function Zt(e,t=Ct.v2020_12){let n=e.$schema;return n?Wt[n]??t:t}function en(e,t,n,i,r){if(!e||!i.include(e))return;if("property"===e.type)return en(e.valueNode,t,n,i,r);const s=e;switch(o(),s.type){case"object":h(s);break;case"array":c(s);break;case"string":l(s);break;case"number":a(s);break}function o(){function e(e){return s.type===e||"integer"===e&&"number"===s.type&&s.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Tt("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Tt('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf){const t=new Kt,o=i.newSub();en(s,qt(e),t,o,r),n.merge(t),i.merge(o)}const o=qt(t.not);if(o){const e=new Kt,a=i.newSub();en(s,o,e,a,r),e.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||Tt("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,i.add(e)}const a=(e,t)=>{const o=[];let a;for(const n of e){const e=qt(n),l=new Kt,c=i.newSub();if(en(s,e,l,c,r),l.hasProblems()||o.push(e),a)if(t||l.hasProblems()||a.validationResult.hasProblems()){const t=l.compare(a.validationResult);t>0?a={schema:e,validationResult:l,matchingSchemas:c}:0===t&&(a.matchingSchemas.merge(c),a.validationResult.mergeEnumValues(l))}else a.matchingSchemas.merge(c),a.validationResult.propertiesMatches+=l.propertiesMatches,a.validationResult.propertiesValueMatches+=l.propertiesValueMatches,a.validationResult.mergeProcessedProperties(l);else a={schema:e,validationResult:l,matchingSchemas:c}}return o.length>1&&t&&n.problems.push({location:{offset:s.offset,length:1},message:Tt("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),i.merge(a.matchingSchemas)),o.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1),Array.isArray(t.oneOf)&&a(t.oneOf,!0);const l=e=>{const t=new Kt,o=i.newSub();en(s,qt(e),t,o,r),n.merge(t),i.merge(o)},c=(e,t,o)=>{const a=qt(e),c=new Kt,h=i.newSub();en(s,a,c,h,r),i.merge(h),n.mergeProcessedProperties(c),c.hasProblems()?o&&l(o):t&&l(t)},h=qt(t.if);if(h&&c(h,qt(t.then),qt(t.else)),Array.isArray(t.enum)){const e=Qt(s);let i=!1;for(const n of t.enum)if(at(e,n)){i=!0;break}n.enumValues=t.enum,n.enumValueMatch=i,i||n.problems.push({location:{offset:s.offset,length:s.length},code:vt.EnumValueMismatch,message:t.errorMessage||Tt("Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}if(ct(t.const)){const e=Qt(s);at(e,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:vt.EnumValueMismatch,message:t.errorMessage||Tt("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let u=t.deprecationMessage;if(u||t.deprecated){u=u||Tt("Value is deprecated");let e="property"===s.parent?.type?s.parent:s;n.problems.push({location:{offset:e.offset,length:e.length},severity:$.Warning,message:u,code:vt.Deprecated})}}function a(e){const i=e.value;function r(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(lt(t.multipleOf)){let s=-1;if(Number.isInteger(t.multipleOf))s=i%t.multipleOf;else{let e=r(t.multipleOf),n=r(i);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier=l&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("Value is above the exclusive maximum of {0}.",l)});const c=o(t.minimum,t.exclusiveMinimum);lt(c)&&ih&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("Value is above the maximum of {0}.",h)})}function l(e){if(lt(t.minLength)&&pt(e.value)t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("String is longer than the maximum length of {0}.",t.maxLength)}),ut(t.pattern)){const i=mt(t.pattern);i?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Tt('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let i;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(i=Tt("URI with a scheme is expected.")):i=Tt("URI is expected.")}else i=Tt("URI expected.");i&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||Tt("String is not a URI: {0}",i)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const i=Mt[t.format];e.value&&i.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||i.errorMessage});default:}}function c(e){let s,o;r.schemaDraft>=Ct.v2020_12?(s=t.prefixItems,o=Array.isArray(t.items)?void 0:t.items):(s=Array.isArray(t.items)?t.items:void 0,o=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==s){const t=Math.min(s.length,e.items.length);for(;a=Ct.v2020_12&&n.processedProperties.add(String(t)))}0!==i||lt(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||Tt("Array does not contain required item.")}),lt(t.minContains)&&it.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||Tt("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const c=t.unevaluatedItems;if(void 0!==c)for(let s=0;st.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){let t=function(){for(let e=0;e{o.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const o=t.properties[e],l=s[e];if(l)if(ht(o))if(o)n.propertiesMatches++,n.propertiesValueMatches++;else{const i=l.parent;n.problems.push({location:{offset:i.keyNode.offset,length:i.keyNode.length},message:t.errorMessage||Tt("Property {0} is not allowed.",e)})}else{const e=new Kt;en(l,o,e,i,r),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const l=mt(e);if(l){const c=[];for(const a of o)if(l.test(a)){c.push(a);const o=s[a];if(o){const s=t.patternProperties[e];if(ht(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||Tt("Property {0} is not allowed.",a)})}else{const e=new Kt;en(o,s,e,i,r),n.mergePropertyMatch(e)}}}c.forEach(a)}}const l=t.additionalProperties;if(void 0!==l)for(const e of o){a(e);const o=s[e];if(o)if(!1===l){const i=o.parent;n.problems.push({location:{offset:i.keyNode.offset,length:i.keyNode.length},message:t.errorMessage||Tt("Property {0} is not allowed.",e)})}else if(!0!==l){const e=new Kt;en(o,l,e,i,r),n.mergePropertyMatch(e)}}const c=t.unevaluatedProperties;if(void 0!==c){const e=[];for(const a of o)if(!n.processedProperties.has(a)){e.push(a);const o=s[a];if(o)if(!1===c){const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||Tt("Property {0} is not allowed.",a)})}else if(!0!==c){const e=new Kt;en(o,c,e,i,r),n.mergePropertyMatch(e)}}e.forEach(a)}if(lt(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:Tt("Object has more properties than limit of {0}.",t.maxProperties)}),lt(t.minProperties)&&e.properties.length0){c--;while(c>0&&/\s/.test(r.charAt(c)))c--;h=c+1}if(l(e,t,c,h),n&&u(n,!1),i.length+o.length>0){let e=s.getToken();while(17!==e){if(-1!==i.indexOf(e)){a();break}if(-1!==o.indexOf(e))break;e=a()}}return n}function h(){switch(s.getTokenError()){case 4:return c(Tt("Invalid unicode sequence in string."),vt.InvalidUnicode),!0;case 5:return c(Tt("Invalid escape character in string."),vt.InvalidEscapeCharacter),!0;case 3:return c(Tt("Unexpected end of number."),vt.UnexpectedEndOfNumber),!0;case 1:return c(Tt("Unexpected end of comment."),vt.UnexpectedEndOfComment),!0;case 2:return c(Tt("Unexpected end of string."),vt.UnexpectedEndOfString),!0;case 6:return c(Tt("Invalid characters in string. Control characters must be escaped."),vt.InvalidCharacter),!0}return!1}function u(e,t){return e.length=s.getTokenOffset()+s.getTokenLength()-e.offset,t&&a(),e}function d(e){if(3!==s.getToken())return;const t=new Ft(e,s.getTokenOffset());a();let n=!1;while(4!==s.getToken()&&17!==s.getToken()){if(5===s.getToken()){n||c(Tt("Value expected"),vt.ValueExpected);const e=s.getTokenOffset();if(a(),4===s.getToken()){n&&l(Tt("Trailing comma"),vt.TrailingComma,e,e+1);continue}}else n&&c(Tt("Expected comma"),vt.CommaExpected);const e=k(t);e?t.items.push(e):c(Tt("Value expected"),vt.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==s.getToken()?c(Tt("Expected comma or closing bracket"),vt.CommaOrCloseBacketExpected,t):u(t,!0)}const g=new Vt(void 0,0,0);function f(t,n){const i=new zt(t,s.getTokenOffset(),g);let r=p(i);if(!r){if(16!==s.getToken())return;{c(Tt("Property keys must be doublequoted"),vt.PropertyKeysMustBeDoublequoted);const e=new Vt(i,s.getTokenOffset(),s.getTokenLength());e.value=s.getTokenValue(),r=e,a()}}if(i.keyNode=r,"//"!==r.value){const e=n[r.value];e?(l(Tt("Duplicate object key"),vt.DuplicateKey,i.keyNode.offset,i.keyNode.offset+i.keyNode.length,$.Warning),dt(e)&&l(Tt("Duplicate object key"),vt.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,$.Warning),n[r.value]=!0):n[r.value]=i}if(6===s.getToken())i.colonOffset=s.getTokenOffset(),a();else if(c(Tt("Colon expected"),vt.ColonExpected),10===s.getToken()&&e.positionAt(r.offset+r.length).line=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const i={items:[],isIncomplete:!1},r=e.getText(),s=e.offsetAt(t);let o=n.getNodeFromOffset(s,!0);if(this.isInComment(e,o?o.offset:0,s))return Promise.resolve(i);if(o&&s===o.offset+o.length&&s>0){const e=r[s-1];("object"===o.type&&"}"===e||"array"===o.type&&"]"===e)&&(o=o.parent)}const a=this.getCurrentWord(e,s);let l;if(!o||"string"!==o.type&&"number"!==o.type&&"boolean"!==o.type&&"null"!==o.type){let n=s-a.length;n>0&&'"'===r[n-1]&&n--,l=B.create(e.positionAt(n),t)}else l=B.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));const c=!1,h=new Map,u={add:e=>{let t=e.label;const n=h.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";h.has(e)||(t=e)}e.textEdit=J.replace(l,e.insertText),c&&(e.commitCharacters=e.kind===ue.Property?sn:rn),e.label=t,h.set(t,e),i.items.push(e)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then((t=>{const c=[];let d,g=!0,f="";if(o&&"string"===o.type){const e=o.parent;e&&"property"===e.type&&e.keyNode===o&&(g=!e.valueNode,d=e,f=r.substr(o.offset+1,o.length-2),e&&(o=e.parent))}if(o&&"object"===o.type){if(o.offset===s)return i;const m=o.properties;m.forEach((e=>{d&&d===e||h.set(e.keyNode.value,be.create("__"))}));let p="";g&&(p=this.evaluateSeparatorAfter(e,e.offsetAt(l.end))),t?this.getPropertyCompletions(t,n,o,g,p,u):this.getSchemaLessPropertyCompletions(n,o,f,u);const b=Jt(o);this.contributions.forEach((t=>{const n=t.collectPropertyCompletions(e.uri,b,a,g,""===p,u);n&&c.push(n)})),!t&&a.length>0&&'"'!==r.charAt(s-a.length-1)&&(u.add({kind:ue.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,p),insertTextFormat:de.Snippet,documentation:""}),u.setAsIncomplete())}const m={};return t?this.getValueCompletions(t,n,o,s,e,u,m):this.getSchemaLessValueCompletions(n,o,s,e,u),this.contributions.length>0&&this.getContributedValueCompletions(n,o,s,e,u,c),this.promiseConstructor.all(c).then((()=>{if(0===u.getNumberOfProposals()){let t=s;!o||"string"!==o.type&&"number"!==o.type&&"boolean"!==o.type&&"null"!==o.type||(t=o.offset+o.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(m,n,u)}return i}))}))}getPropertyCompletions(e,t,n,i,r,s){const o=t.getMatchingSchemas(e.schema,n.offset);o.forEach((e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach((e=>{const n=t[e];if("object"===typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:ue.Property,label:e,insertText:this.getInsertTextForProperty(e,n,i,r),insertTextFormat:de.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&ft(t.insertText,`$1${r}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(t)}}));const n=e.schema.propertyNames;if("object"===typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t=void 0)=>{const o={kind:ue.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,i,r),insertTextFormat:de.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(o.sortText=n.suggestSortText),o.insertText&&ft(o.insertText,`$1${r}`)&&(o.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(o)};if(n.enum)for(let t=0;t{e.properties.forEach((e=>{const t=e.keyNode.value;i.add({kind:ue.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:de.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&r(e.valueNode),!0)))}else"array"===t.parent.type&&t.parent.items.forEach((e=>{"object"===e.type&&e!==t&&r(e)}));else"object"===t.type&&i.add({kind:ue.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:de.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,i,r){let s=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(s=t.offset+t.length,t=t.parent),!t)return r.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:de.Snippet,documentation:""}),void r.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:de.Snippet,documentation:""});const o=this.evaluateSeparatorAfter(i,s),a=e=>{e.parent&&!Xt(e.parent,n,!0)&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,i),insertText:this.getInsertTextForMatchingNode(e,i,o),insertTextFormat:de.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,o,r)};if("property"===t.type&&n>(t.colonOffset||0)){const i=t.valueNode;if(i&&(n>i.offset+i.length||"object"===i.type||"array"===i.type))return;const s=t.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===s&&e.valueNode&&a(e.valueNode),!0))),"$schema"===s&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(o,r)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0)))}else t.items.forEach(a)}getValueCompletions(e,t,n,i,r,s,o){let a,l,c=i;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(c=n.offset+n.length,l=n,n=n.parent),n){if("property"===n.type&&i>(n.colonOffset||0)){const e=n.valueNode;if(e&&i>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const h=this.evaluateSeparatorAfter(r,c),u=t.getMatchingSchemas(e.schema,n.offset,l);for(const e of u)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=s;if(e.schema.uniqueItems){const e=new Set;n.children.forEach((t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(Qt(t)))})),t={...s,add(t){e.has(t.label)||s.add(t)}}}if(Array.isArray(e.schema.items)){const s=this.findItemAtOffset(n,r,i);s(t.colonOffset||0)){const e=t.keyNode.value,o=t.valueNode;if((!o||n<=o.offset+o.length)&&t.parent){const n=Jt(t.parent);this.contributions.forEach((t=>{const o=t.collectValueCompletions(i.uri,n,e,r);o&&s.push(o)}))}}}else this.contributions.forEach((e=>{const t=e.collectDefaultCompletions(i.uri,r);t&&s.push(t)}))}addSchemaValueCompletions(e,t,n,i){"object"===typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,i),Array.isArray(e.allOf)&&e.allOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,i))),Array.isArray(e.anyOf)&&e.anyOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,i))),Array.isArray(e.oneOf)&&e.oneOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,i))))}addDefaultValueCompletions(e,t,n,i=0){let r=!1;if(ct(e.default)){let s=e.type,o=e.default;for(let e=i;e>0;e--)o=[o],s="array";const a={kind:this.getSuggestionKind(s),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:de.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:Tt("Default value")}:a.detail=Tt("Default value"),n.add(a),r=!0}Array.isArray(e.examples)&&e.examples.forEach((s=>{let o=e.type,a=s;for(let e=i;e>0;e--)a=[a],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:de.Snippet}),r=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((s=>{let o,a,l=e.type,c=s.body,h=s.label;if(ct(c)){let n=e.type;for(let e=i;e>0;e--)c=[c],n="array";o=this.getInsertTextForSnippetValue(c,t),a=this.getFilterTextForSnippetValue(c),h=h||this.getLabelForSnippetValue(c)}else{if("string"!==typeof s.bodyText)return;{let e="",n="",r="";for(let t=i;t>0;t--)e=e+r+"[\n",n=n+"\n"+r+"]",r+="\t",l="array";o=e+r+s.bodyText.split("\n").join("\n"+r)+n+t,h=h||o,a=o.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(l),label:h,documentation:this.fromMarkup(s.markdownDescription)||s.description,insertText:o,insertTextFormat:de.Snippet,filterText:a}),r=!0})),!r&&"object"===typeof e.items&&!Array.isArray(e.items)&&i<5&&this.addDefaultValueCompletions(e.items,t,n,i+1)}addEnumValueCompletions(e,t,n){if(ct(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:de.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let i=0,r=e.enum.length;it[e]=!0)):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e["object"]&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:de.Snippet,detail:Tt("New object"),documentation:""}),e["array"]&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:de.Snippet,detail:Tt("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:de.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:de.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){const n=this.schemaService.getRegisteredSchemaIds((e=>"http"===e||"https"===e));n.forEach((n=>{n.startsWith("http://json-schema.org/draft-")&&(n+="#"),t.add({kind:ue.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:de.Snippet,documentation:""})}))}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){const t=JSON.stringify(e);return t.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){const n=e=>"string"===typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e);return nn(e,"",n)+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return ue.Value;switch(e){case"string":return ue.Value;case"object":return ue.Module;case"property":return ue.Property;default:return ue.Value}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:const n=t.getText().substr(e.offset,e.length);return n}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const i=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(e,t,n,i){const r=this.getInsertTextForValue(e,"");if(!n)return r;const s=r+": ";let o,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;ct(e)&&(o=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(o||1!==t.enum.length||(o=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),ct(t.const)&&(o||(o=this.getInsertTextForGuessedValue(t.const,"")),a++),ct(t.default)&&(o||(o=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(o||(o=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return r}}}return(!o||a>1)&&(o="$1"),s+o+i}getCurrentWord(e,t){let n=t-1;const i=e.getText();while(n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(i.charAt(n)))n--;return i.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=T(e.getText(),!0);n.setPosition(t);const i=n.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const i=T(t.getText(),!0),r=e.items;for(let e=r.length-1;e>=0;e--){const t=r[e];if(n>t.offset+t.length){i.setPosition(t.offset+t.length);const r=i.scan();return 5===r&&n>=i.getTokenOffset()+i.getTokenLength()?e+1:e}if(n>=t.offset)return e}return 0}isInComment(e,t,n){const i=T(e.getText(),!1);i.setPosition(t);let r=i.scan();while(17!==r&&i.getTokenOffset()+i.getTokenLength()r.offset+1&&i{const t={contents:e,range:o};return t},l=Jt(r);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t],i=n.getInfoContribution(e.uri,l);if(i)return i.then((e=>a(e)))}return this.schemaService.getSchemaForResource(e.uri,n).then((e=>{if(e&&r){const t=n.getMatchingSchemas(e.schema,r.offset);let i,s,o,l;t.every((e=>{if(e.node===r&&!e.inverted&&e.schema&&(i=i||e.schema.title,s=s||e.schema.markdownDescription||ln(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(Qt(r));e.schema.markdownEnumDescriptions?o=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(o=ln(e.schema.enumDescriptions[t])),o&&(l=e.schema.enum[t],"string"!==typeof l&&(l=JSON.stringify(l)))}return!0}));let c="";return i&&(c=ln(i)),s&&(c.length>0&&(c+="\n\n"),c+=s),o&&(c.length>0&&(c+="\n\n"),c+=`\`${cn(l)}\`: ${o}`),a([c])}return null}))}};function ln(e){if(e){const t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3");return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function cn(e){return-1!==e.indexOf("`")?"`` "+e+" ``":e}var hn=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:$.Error)}doValidation(e,t,n,i){if(!this.validationEnabled)return this.promise.resolve([]);const r=[],s={},o=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;s[t]||(s[t]=!0,r.push(e))},a=i=>{let s=n?.trailingCommas?fn(n.trailingCommas):$.Error,a=n?.comments?fn(n.comments):this.commentSeverity,l=n?.schemaValidation?fn(n.schemaValidation):$.Warning,c=n?.schemaRequest?fn(n.schemaRequest):$.Warning;if(i){const r=(n,i)=>{if(t.root&&c){const r=t.root,s="object"===r.type?r.properties[0]:void 0;if(s&&"$schema"===s.keyNode.value){const t=s.valueNode||s,r=B.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));o(G.create(r,n,c,i))}else{const t=B.create(e.positionAt(r.offset),e.positionAt(r.offset+1));o(G.create(t,n,c,i))}}};if(i.errors.length)r(i.errors[0],vt.SchemaResolveError);else if(l){for(const e of i.warnings)r(e,vt.SchemaUnsupportedFeature);const s=t.validate(e,i.schema,l,n?.schemaDraft);s&&s.forEach(o)}dn(i.schema)&&(a=void 0),gn(i.schema)&&(s=void 0)}for(const e of t.syntaxErrors){if(e.code===vt.TrailingComma){if("number"!==typeof s)continue;e.severity=s}o(e)}if("number"===typeof a){const e=Tt("Comments are not permitted in JSON.");t.comments.forEach((t=>{o(G.create(t,e,a,vt.CommentNotPermitted))}))}return r};if(i){const e=i.id||"schemaservice://untitled/"+un++,t=this.jsonSchemaService.registerExternalSchema({uri:e,schema:i});return t.getResolvedSchema().then((e=>a(e)))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((e=>a(e)))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}},un=0;function dn(e){if(e&&"object"===typeof e){if(ht(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=dn(t);if(ht(e))return e}}}function gn(e){if(e&&"object"===typeof e){if(ht(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(ht(t["allowsTrailingCommas"]))return t["allowsTrailingCommas"];if(e.allOf)for(const t of e.allOf){const e=gn(t);if(ht(e))return e}}}function fn(e){switch(e){case"error":return $.Error;case"warning":return $.Warning;case"ignore":return}}var mn=48,pn=57,bn=65,_n=97,kn=102;function vn(e){return e=_n&&e<=kn?e-_n+10:0)}function Cn(e){if("#"===e[0])switch(e.length){case 4:return{red:17*vn(e.charCodeAt(1))/255,green:17*vn(e.charCodeAt(2))/255,blue:17*vn(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*vn(e.charCodeAt(1))/255,green:17*vn(e.charCodeAt(2))/255,blue:17*vn(e.charCodeAt(3))/255,alpha:17*vn(e.charCodeAt(4))/255};case 7:return{red:(16*vn(e.charCodeAt(1))+vn(e.charCodeAt(2)))/255,green:(16*vn(e.charCodeAt(3))+vn(e.charCodeAt(4)))/255,blue:(16*vn(e.charCodeAt(5))+vn(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*vn(e.charCodeAt(1))+vn(e.charCodeAt(2)))/255,green:(16*vn(e.charCodeAt(3))+vn(e.charCodeAt(4)))/255,blue:(16*vn(e.charCodeAt(5))+vn(e.charCodeAt(6)))/255,alpha:(16*vn(e.charCodeAt(7))+vn(e.charCodeAt(8)))/255}}}var yn=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const i=t.root;if(!i)return[];let r=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if(("vscode://defaultsettings/keybindings.json"===s||ft(s.toLowerCase(),"/user/keybindings.json"))&&"array"===i.type){const t=[];for(const o of i.items)if("object"===o.type)for(const i of o.properties)if("key"===i.keyNode.value&&i.valueNode){const a=F.create(e.uri,Ln(e,o));if(t.push({name:wn(i.valueNode),kind:Se.Function,location:a}),r--,r<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),t}return t}const o=[{node:i,containerName:""}];let a=0,l=!1;const c=[],h=(t,n)=>{"array"===t.type?t.items.forEach((e=>{e&&o.push({node:e,containerName:n})})):"object"===t.type&&t.properties.forEach((t=>{const i=t.valueNode;if(i)if(r>0){r--;const s=F.create(e.uri,Ln(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;c.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(i.type),location:s,containerName:n}),o.push({node:i,containerName:a})}else l=!0}))};while(a{"array"===t.type?t.items.forEach(((t,i)=>{if(t)if(r>0){r--;const s=Ln(e,t),o=s,l=String(i),c={name:l,kind:this.getSymbolKind(t.type),range:s,selectionRange:o,children:[]};n.push(c),a.push({result:c.children,node:t})}else c=!0})):"object"===t.type&&t.properties.forEach((t=>{const i=t.valueNode;if(i)if(r>0){r--;const s=Ln(e,t),o=Ln(e,t.keyNode),l=[],c={name:this.getKeyLabel(t),kind:this.getSymbolKind(i.type),range:s,selectionRange:o,children:l,detail:this.getDetail(i)};n.push(c),a.push({result:l,node:i})}else c=!0}))};while(l{const r=[];if(i){let s=n&&"number"===typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const o=t.getMatchingSchemas(i.schema),a={};for(const t of o)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const i=String(t.node.offset);if(!a[i]){const o=Cn(Qt(t.node));if(o){const n=Ln(e,t.node);r.push({color:o,range:n})}if(a[i]=!0,s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),r}}}return r}))}getColorPresentations(e,t,n,i){const r=[],s=Math.round(255*n.red),o=Math.round(255*n.green),a=Math.round(255*n.blue);function l(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let c;return c=1===n.alpha?`#${l(s)}${l(o)}${l(a)}`:`#${l(s)}${l(o)}${l(a)}${l(Math.round(255*n.alpha))}`,r.push({label:c,textEdit:J.replace(i,JSON.stringify(c))}),r}};function Ln(e,t){return B.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function wn(e){return Qt(e)||Tt("")}var Sn,xn={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},En={id:Tt("A unique identifier for the schema."),$schema:Tt("The schema to verify this document against."),title:Tt("A descriptive title of the element."),description:Tt("A long description of the element. Used in hover menus and suggestions."),default:Tt("A default value. Used by suggestions."),multipleOf:Tt("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:Tt("The maximum numerical value, inclusive by default."),exclusiveMaximum:Tt("Makes the maximum property exclusive."),minimum:Tt("The minimum numerical value, inclusive by default."),exclusiveMinimum:Tt("Makes the minimum property exclusive."),maxLength:Tt("The maximum length of a string."),minLength:Tt("The minimum length of a string."),pattern:Tt("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:Tt("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:Tt("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:Tt("The maximum number of items that can be inside an array. Inclusive."),minItems:Tt("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:Tt("If all of the items in the array must be unique. Defaults to false."),maxProperties:Tt("The maximum number of properties an object can have. Inclusive."),minProperties:Tt("The minimum number of properties an object can have. Inclusive."),required:Tt("An array of strings that lists the names of all properties required on this object."),additionalProperties:Tt("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:Tt("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:Tt("A map of property names to schemas for each property."),patternProperties:Tt("A map of regular expressions on property names to schemas for matching properties."),dependencies:Tt("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:Tt("The set of literal values that are valid."),type:Tt("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:Tt("Describes the format expected for the value."),allOf:Tt("An array of schemas, all of which must match."),anyOf:Tt("An array of schemas, where at least one must match."),oneOf:Tt("An array of schemas, exactly one of which must match."),not:Tt("A schema which must not match."),$id:Tt("A unique identifier for the schema."),$ref:Tt("Reference a definition hosted on any location."),$comment:Tt("Comments from schema authors to readers or maintainers of the schema."),readOnly:Tt("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:Tt("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:Tt('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:Tt("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:Tt("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:Tt("Describes the media type of a string property."),contentEncoding:Tt("Describes the content encoding of a string property."),if:Tt('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:Tt('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:Tt('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in xn.schemas){const t=xn.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"===typeof n&&(n=t.properties[e]={});const i=En[e];i&&(n["description"]=i)}}(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",r=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",r=0):r=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),s=a,o=0;continue}}else if(2===i.length||1===i.length){i="",r=0,s=a,o=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(s+1,a):i=e.slice(s+1,a),r=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return i}var i={resolve:function(){for(var e,i="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(i=o+"/"+i,r=47===o.charCodeAt(0))}return i=n(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&r&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var r=1;rc){if(47===n.charCodeAt(a+u))return n.slice(a+u+1);if(0===u)return n.slice(a+u)}else o>c&&(47===e.charCodeAt(r+u)?h=u:0===u&&(h=0));break}var d=e.charCodeAt(r+u);if(d!==n.charCodeAt(a+u))break;47===d&&(h=u)}var g="";for(u=r+h+1;u<=s;++u)u!==s&&47!==e.charCodeAt(u)||(0===g.length?g+="..":g+="/..");return g.length>0?g+n.slice(a+h):(a+=h,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,r=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){r=o;break}}else s=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,r=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!o){r=i+1;break}}else-1===l&&(o=!1,l=i+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=l))}return r===s?s=l:-1===s&&(s=e.length),e.slice(r,s)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){r=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(r,s)},extname:function(e){t(e);for(var n=-1,i=0,r=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===r&&(s=!1,r=a+1),46===l?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){i=a+1;break}}return-1===n||-1===r||0===o||1===o&&n===r-1&&n===i+1?"":e.slice(n,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,r=e.charCodeAt(0),s=47===r;s?(n.root="/",i=1):i=0;for(var o=-1,a=0,l=-1,c=!0,h=e.length-1,u=0;h>=i;--h)if(47!==(r=e.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===r?-1===o?o=h:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){a=h+1;break}return-1===o||-1===l||0===u||1===u&&o===l-1&&o===a+1?-1!==l&&(n.base=n.name=0===a&&s?e.slice(1,l):e.slice(a,l)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(a,o),n.base=e.slice(a,l)),n.ext=e.slice(o,l)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{let e;if(n.r(i),n.d(i,{URI:()=>h,Utils:()=>w}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,r=/^\//,s=/^\/\//;function o(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",l="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,i,r,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,n||a),this.query=i||a,this.fragment=r||a,o(this,s))}get fsPath(){return p(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===i?i=this.path:null===i&&(i=a),void 0===r?r=this.query:null===r&&(r=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new d(t,n,i,r,s)}static parse(e,t=!1){const n=c.exec(e);return n?new d(n[2]||a,v(n[4]||a),v(n[5]||a),v(n[7]||a),v(n[9]||a),t):new d(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){const e=t.indexOf(l,2);-1===e?(n=t.substring(2),t=l):(n=t.substring(2,e),t=t.substring(e)||l)}return new d("file",n,t,a,a)}static from(e){const t=new d(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new d(e);return t._formatted=e.external,t._fsPath=e._sep===u?e.fsPath:null,t}}return e}}const u=e?1:void 0;class d extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=p(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t,n){let i,r=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=g[o];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,s)),r=-1),i+=t):-1===r&&(r=s)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function m(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(i=i.replace(/\//g,"\\")),i}function b(e,t){const n=t?m:f;let i="",{scheme:r,authority:s,path:o,query:a,fragment:c}=e;if(r&&(i+=r,i+=":"),(s||"file"===r)&&(i+=l,i+=l),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?i+=n(s,!1,!0):(i+=n(s.substr(0,e),!1,!0),i+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}i+=n(o,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),c&&(i+="#",i+=t?c:f(c,!1,!1)),i}function _(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+_(e.substr(3)):e}}const k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(k)?e.replace(k,(e=>_(e))):e}var C=n(470);const y=C.posix||C,L="/";var w;!function(e){e.joinPath=function(e,...t){return e.with({path:y.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,i=!1;n[0]!==L&&(n=L+n,i=!0);let r=y.resolve(n,...t);return i&&r[0]===L&&!e.authority&&(r=r.substring(1)),e.with({path:r})},e.dirname=function(e){if(0===e.path.length||e.path===L)return e;let t=y.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return y.basename(e.path)},e.extname=function(e){return y.extname(e.path)}}(w||(w={}))})(),Sn=i})();var{URI:Nn,Utils:Tn}=Sn;function An(e,t){if("string"!==typeof e)throw new TypeError("Expected a string");const n=String(e);let i="";const r=!!t&&!!t.extended,s=!!t&&!!t.globstar;let o=!1;const a=t&&"string"===typeof t.flags?t.flags:"";let l;for(let e=0,t=n.length;e1&&("/"===t||void 0===t||"{"===t||","===t)&&("/"===c||void 0===c||","===c||"}"===c);n?("/"===c?e++:"/"===t&&i.endsWith("\\/")&&(i=i.substr(0,i.length-2)),i+="((?:[^/]*(?:/|$))*)"):i+="([^/]*)"}else i+=".*";break;default:i+=l}return a&&~a.indexOf("g")||(i="^"+i+"$"),new RegExp(i,a)}var In,On="!",Mn="/",Dn=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e=t[0]!==On;e||(t=t.substring(1)),t.length>0&&(t[0]===Mn&&(t=t.substring(1)),this.globWrappers.push({regexp:An("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&(t=jn(t),t.endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:i}of this.globWrappers)n.test(e)&&(t=i);return t}getURIs(){return this.uris}},Rn=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new Bn(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((e=>this.service.resolveSchemaContent(e,this)))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Bn=class{constructor(e,t=[]){this.schema=e,this.errors=t}},Fn=class{constructor(e,t=[],n=[],i){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=i}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return qt(t)}getSectionRecursive(e,t){if(!t||"boolean"===typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const i of Object.keys(t.patternProperties)){const r=mt(i);if(r?.test(n))return this.getSectionRecursive(e,t.patternProperties[i])}else{if("object"===typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const i=parseInt(n,10);if(!isNaN(i)&&t.items[i])return this.getSectionRecursive(e,t.items[i])}else if(t.items)return this.getSectionRecursive(e,t.items)}}},Pn=class{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter((t=>{const n=Nn.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))}get promise(){return this.promiseConstructor}dispose(){while(this.callOnDispose.length>0)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;e=zn(e);const n=[e],i=Object.keys(this.schemasById).map((e=>this.schemasById[e]));while(n.length){const e=n.pop();for(let r=0;r{if(!t){const t=Tt("Unable to load schema from '{0}': No content.",qn(e));return new Bn({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push(Tt("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",qn(e))),t=t.trimStart());let i={};const r=[];return i=nt(t,r),r.length&&n.push(Tt("Unable to parse content from '{0}': Parse error at offset {1}.",qn(e),r[0].offset)),new Bn(i,n)}),(t=>{let n=t.toString();const i=t.toString().split("Error: ");return i.length>1&&(n=i[1]),ft(n,".")&&(n=n.substr(0,n.length-1)),new Bn({},[Tt("Unable to load schema from '{0}': {1}.",qn(e),n)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),i=e.schema;let r=i.$schema?zn(i.$schema):void 0;if("http://json-schema.org/draft-03/schema"===r)return this.promise.resolve(new Fn({},[Tt("Draft-03 schemas are not supported.")],[],r));let s=new Set;const o=this.contextService,a=(e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n))),n},l=(e,t,n)=>(t.anchors||(t.anchors=g(e)),t.anchors.get(n)),c=(e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])},h=(e,t,i,r)=>{let s;s=void 0===r||0===r.length?t:"/"===r.charAt(0)?a(t,r):l(t,i,r),s?c(e,s):n.push(Tt("$ref '{0}' in '{1}' can not be resolved.",r||"",i.uri))},u=(e,t,i,r)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=o.resolveRelativePath(t,r.uri)),t=zn(t);const s=this.getOrAddSchemaHandle(t);return s.getUnresolvedSchema().then((o=>{if(r.dependencies.add(t),o.errors.length){const e=i?t+"#"+i:t;n.push(Tt("Problems loading reference '{0}': {1}",e,o.errors[0]))}return h(e,o.schema,s,i),d(e,o.schema,s)}))},d=(e,t,n)=>{const i=[];return this.traverseNodes(e,(e=>{const r=new Set;while(e.$ref){const s=e.$ref,o=s.split("#",2);if(delete e.$ref,o[0].length>0)return void i.push(u(e,o[0],o[1],n));if(!r.has(s)){const i=o[1];h(e,t,n,i),r.add(s)}}e.$recursiveRef&&s.add("$recursiveRef"),e.$dynamicRef&&s.add("$dynamicRef")})),this.promise.all(i)},g=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const i=e.$id||e.id,r=ut(i)&&"#"===i.charAt(0)?i.substring(1):e.$anchor;r&&(t.has(r)?n.push(Tt("Duplicate anchor declaration: '{0}'",r)):t.set(r,e)),e.$recursiveAnchor&&s.add("$recursiveAnchor"),e.$dynamicAnchor&&s.add("$dynamicAnchor")})),t};return d(i,i,t).then((e=>{let t=[];return s.size&&t.push(Tt("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", "))),new Fn(i,n,t,r)}))}traverseNodes(e,t){if(!e||"object"!==typeof e)return Promise.resolve(null);const n=new Set,i=(...e)=>{for(const t of e)dt(t)&&a.push(t)},r=(...e)=>{for(const t of e)if(dt(t))for(const e in t){const n=e,i=t[n];dt(i)&&a.push(i)}},s=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)dt(e)&&a.push(e)},o=e=>{if(Array.isArray(e))for(const t of e)dt(t)&&a.push(t);else dt(e)&&a.push(e)},a=[e];let l=a.pop();while(l)n.has(l)||(n.add(l),t(l),i(l.additionalItems,l.additionalProperties,l.not,l.contains,l.propertyNames,l.if,l.then,l.else,l.unevaluatedItems,l.unevaluatedProperties),r(l.definitions,l.$defs,l.properties,l.patternProperties,l.dependencies,l.dependentSchemas),s(l.anyOf,l.allOf,l.oneOf,l.prefixItems),o(l.items)),l=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],i=jn(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(i))for(const i of e.getURIs())t[i]||(n.push(i),t[i]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=zn(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),i=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:i},i}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),i={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,i)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+Vn++,i=this.addSchemaHandle(e,n);return i.getResolvedSchema().then((e=>t.getMatchingSchemas(e.schema).filter((e=>!e.inverted))))}return this.getSchemaForResource(e.uri,t).then((e=>e?t.getMatchingSchemas(e.schema).filter((e=>!e.inverted)):[]))}},Vn=0;function zn(e){try{return Nn.parse(e).toString(!0)}catch(t){return e}}function jn(e){try{return Nn.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function qn(e){try{const t=Nn.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function Wn(e,t){const n=[],i=[],r=[];let s=-1;const o=T(e.getText(),!1);let a=o.scan();function l(e){n.push(e),i.push(r.length)}while(17!==a){switch(a){case 1:case 3:{const t=e.positionAt(o.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};r.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(r.length>0&&r[r.length-1].kind===t){const t=r.pop(),n=e.positionAt(o.getTokenOffset()).line;t&&n>t.startLine+1&&s!==t.startLine&&(t.endLine=n-1,l(t),s=t.startLine)}break}case 13:{const t=e.positionAt(o.getTokenOffset()).line,n=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;1===o.getTokenError()&&t+1=0&&r[e].kind!==q.Region)e--;if(e>=0){const n=r[e];r.length=e,t>n.startLine&&s!==n.startLine&&(n.endLine=t,l(n),s=n.startLine)}}}break}}a=o.scan()}const c=t&&t.rangeLimit;if("number"!==typeof c||n.length<=c)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const h=[];for(let e of i)e<30&&(h[e]=(h[e]||0)+1);let u=0,d=0;for(let e=0;ec){d=e;break}u+=t}}const g=[];for(let e=0;e=e&&i<=t&&a.push(r(e,t)),a.push(r(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(r(s.offset,s.offset+s.length));break}if("property"===s.type||s.parent&&"array"===s.parent.type){const e=o(s.offset+s.length,5);-1!==e&&a.push(r(s.offset,e))}s=s.parent}let l;for(let e=a.length-1;e>=0;e--)l=Fe.create(a[e],l);return l||(l=Fe.create(B.create(t,t))),l}function r(t,n){return B.create(e.positionAt(t),e.positionAt(n))}const s=T(e.getText(),!0);function o(e,t){s.setPosition(e);let n=s.scan();return n===t?s.getTokenOffset()+s.getTokenLength():-1}return t.map(i)}function $n(e,t,n){let i;if(n){const t=e.offsetAt(n.start),r=e.offsetAt(n.end)-t;i={offset:t,length:r}}const r={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return ot(e.getText(),i,r).map((t=>J.replace(B.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)))}(function(e){e[e["Object"]=0]="Object",e[e["Array"]=1]="Array"})(In||(In={}));var Hn=class{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:Gn(this.childrenProperties,e,Kn),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}};function Kn(e,t){const n=e.propertyName.toLowerCase(),i=t.propertyName.toLowerCase();return ni?1:0}function Gn(e,t,n){const i=t.propertyName.toLowerCase(),r=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(is)return e.length;let o=0,a=e.length-1;while(o<=a){let i=a+o>>1,r=n(t,e[i]);if(r>0)o=i+1;else{if(!(r<0))return i;a=i-1}}return-o-1}function Qn(e,t){const n={...t,keepLines:!1},i=kt.applyEdits(e,$n(e,n,void 0)),r=kt.create("test://test.json","json",0,i),s=Jn(r),o=Xn(r,s),a=$n(o,n,void 0),l=kt.applyEdits(o,a);return[J.replace(B.create(R.create(0,0),e.positionAt(e.getText().length)),l)]}function Jn(e){const t=e.getText(),n=T(t,!1);let i,r,s,o=new Hn,a=o,l=o,c=o,h=0,u=0,d=-1,g=-1,f=0,m=0,p=[],b=!1,_=!1;while(17!==(i=n.scan())){if(!0===b&&14!==i&&15!==i&&12!==i&&13!==i&&void 0===l.endLineNumber){let e=n.getTokenStartLine();2===s||4===s?c.endLineNumber=e-1:l.endLineNumber=e-1,f=e,b=!1}if(!0===_&&14!==i&&15!==i&&12!==i&&13!==i&&(f=n.getTokenStartLine(),_=!1),n.getTokenStartLine()!==h){for(let t=h;t0){const t=i.shift(),r=t.propertyTreeArray;let s=t.beginningLineNumber;for(let t=0;t{if("property"===i.type&&"$ref"===i.keyNode.value&&"string"===i.valueNode?.type){const r=i.valueNode.value,s=ri(t,r);if(s){const t=e.positionAt(s.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:ii(e,i.valueNode)})}}return!0})),Promise.resolve(n)}function ii(e,t){return B.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function ri(e,t){const n=oi(t);return n?si(n,e.root):null}function si(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const i=t.properties.find((e=>e.keyNode.value===n));return i?si(e,i.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const i=Number.parseInt(n),r=t.items[i];return r?si(e,r):null}return null}function oi(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(ai)}function ai(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function li(e){const t=e.promiseConstructor||Promise,n=new Pn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(xn);const i=new on(n,e.contributions,t,e.clientCapabilities),r=new an(n,e.contributions,t),s=new yn(n),o=new hn(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),o.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:o.doValidation.bind(o),getLanguageStatus:o.getLanguageStatus.bind(o),parseJSONDocument:e=>tn(e,{collectComments:!0}),newJSONDocument:(e,t)=>Gt(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:i.doResolve.bind(i),doComplete:i.doComplete.bind(i),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:r.doHover.bind(r),getFoldingRanges:Wn,getSelectionRanges:Un,findDefinition:()=>Promise.resolve([]),findLinks:ni,format:(e,t,n)=>$n(e,n,t),sort:(e,t)=>Qn(e,t)}}"undefined"!==typeof fetch&&(ei=function(e){return fetch(e).then((e=>e.text()))});var ci=class{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=li({workspaceContext:{resolveRelativePath:(e,t)=>{const n=t.substr(0,t.lastIndexOf("/")+1);return gi(n,e)}},schemaRequestService:t.enableSchemaRequest?ei:void 0,clientCapabilities:yt.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let e=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,e,this._languageSettings)}return Promise.resolve([])}async doComplete(e,t){let n=this._getTextDocument(e);if(!n)return null;let i=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,i)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let n=this._getTextDocument(e);if(!n)return null;let i=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,i)}async format(e,t,n){let i=this._getTextDocument(e);if(!i)return[];let r=this._languageService.format(i,t,n);return Promise.resolve(r)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),i=this._languageService.findDocumentSymbols2(t,n);return Promise.resolve(i)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),i=this._languageService.findDocumentColors(t,n);return Promise.resolve(i)}async getColorPresentations(e,t,n){let i=this._getTextDocument(e);if(!i)return[];let r=this._languageService.parseJSONDocument(i),s=this._languageService.getColorPresentations(i,r,t,n);return Promise.resolve(s)}async getFoldingRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let i=this._languageService.getFoldingRanges(n,t);return Promise.resolve(i)}async getSelectionRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let i=this._languageService.parseJSONDocument(n),r=this._languageService.getSelectionRanges(n,t,i);return Promise.resolve(r)}async parseJSONDocument(e){let t=this._getTextDocument(e);if(!t)return null;let n=this._languageService.parseJSONDocument(t);return Promise.resolve(n)}async getMatchingSchemas(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t);return Promise.resolve(this._languageService.getMatchingSchemas(t,n))}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let n of t)if(n.uri.toString()===e)return kt.create(e,this._languageId,n.version,n.getValue());return null}},hi="/".charCodeAt(0),ui=".".charCodeAt(0);function di(e){return e.charCodeAt(0)===hi}function gi(e,t){if(di(t)){const n=Nn.parse(e),i=t.split("/");return n.with({path:fi(i)}).toString()}return mi(e,t)}function fi(e){const t=[];for(const n of e)0===n.length||1===n.length&&n.charCodeAt(0)===ui||(2===n.length&&n.charCodeAt(0)===ui&&n.charCodeAt(1)===ui?t.pop():t.push(n));e.length>1&&0===e[e.length-1].length&&t.push("");let n=t.join("/");return 0===e[0].length&&(n="/"+n),n}function mi(e,...t){const n=Nn.parse(e),i=n.path.split("/");for(let e of t)i.push(...e.split("/"));return n.with({path:fi(i)}).toString()}self.onmessage=()=>{s(((e,t)=>new ci(e,t)))}})()})(); \ No newline at end of file